/* ══════════════════════════════════════════════════
   SERVIZIO MARKETING AI — pages.css
   The inner pages: services · research (results.html) ·
   about · contact. Loaded after style.css and stb.css.

   These are normal one-column pages (no scroll stage).
   They are built from the home page's .stb-… components;
   this file adds only the page frame (.pg-…) and the few
   pieces that belong to one page.

   1  frame + tokens      5  research
   2  page hero           6  about
   3  sections + close    7  contact
   4  services (ladder)   8  narrow screens · theme · motion
   ══════════════════════════════════════════════════ */

/* ── 1 · FRAME + TOKENS ─────────────────────────── */
:root {
  --pg-gutter: 52px;                               /* same edge as the nav */
  --pg-max:    clamp(1180px, 76vw, 1320px);        /* the page column, gutters included */
  --pg-glow:   rgba(212,184,104,0.085);
  --pg-soft:   rgba(245,243,239,0.78);             /* body copy one step brighter than --muted */
}
[data-theme="light"] {
  --pg-glow: rgba(160,131,56,0.13);
  --pg-soft: rgba(13,7,0,0.74);
}

.pg { position: relative; display: block; }
.pg-wrap {
  width: 100%;
  max-width: var(--pg-max);
  margin: 0 auto;
  padding: 0 var(--pg-gutter);
}
.pg-wrap--narrow { max-width: 984px; }             /* contact: an 880px column */

.pg a:focus-visible,
.pg button:focus-visible {
  outline: 2px solid var(--gold);
  outline-offset: 4px;
  border-radius: 4px;
}
.pg .btn:focus-visible { border-radius: 9999px; }
.pg .btn .stb-arrow { font-weight: 700; }
.pg .btn:hover .stb-arrow { transform: translateX(4px); }

/* ── 2 · PAGE HERO ──────────────────────────────── */
.pg-hero {
  position: relative;
  overflow: hidden;
  padding: clamp(150px, 14.6vw, 220px) 0 clamp(64px, 7.6vw, 112px);
}
.pg-hero::before {                                  /* soft gold light from the top left */
  content: '';
  position: absolute;
  inset: 0;
  background: radial-gradient(64% 92% at 6% 0%, var(--pg-glow) 0%, rgba(212,184,104,0) 70%);
  pointer-events: none;
}
.pg-hero::after {                                   /* the crest, as a quiet watermark that runs off the right edge */
  content: '';
  position: absolute;
  right: -5vw;
  bottom: -7%;
  height: min(86%, 640px);
  aspect-ratio: 887 / 1114;
  background: url("../img/crest.svg") center / contain no-repeat;
  opacity: 0.075;
  pointer-events: none;
}
.pg-hero > .pg-wrap { position: relative; z-index: 1; }

.pg-eyebrow {
  display: flex;
  align-items: center;
  gap: 16px;
  margin-bottom: clamp(22px, 3.4vh, 36px);
}
.pg-eyebrow::before {
  content: '';
  flex: 0 0 auto;
  width: clamp(28px, 3.4vw, 56px);
  height: 1px;
  background: var(--gold);
  opacity: 0.7;
}

.pg-h1 {
  font-family: 'Playfair Display', serif;
  font-size: clamp(44px, 6.2vw, 112px);
  font-weight: 900;
  line-height: 0.99;
  letter-spacing: -0.032em;
  color: var(--text);
}
.pg-lede {
  margin-top: clamp(22px, 3.4vh, 36px);
  font-size: clamp(18px, 1.7vw, 28px);
  font-weight: 300;
  line-height: 1.5;
  color: var(--muted);
  max-width: 29em;
  text-wrap: pretty;
}
/* services: the "what we do" statement sits under the H1 as the lede */
.pg-hero .stb-statement {
  margin: clamp(26px, 4vh, 44px) 0 0;
  font-size: clamp(23px, 2.6vw, 46px);
  font-weight: 600;
  line-height: 1.22;
  letter-spacing: -0.018em;
  max-width: 23em;
}
.pg-hero-more { margin-top: clamp(28px, 4.4vh, 46px); }
.pg-nowrap { white-space: nowrap; }

/* ── 3 · SECTIONS + CLOSING CTA ─────────────────── */
.pg-sec {
  position: relative;
  padding: clamp(72px, 8.6vw, 132px) 0;
  border-top: 1px solid var(--div);
}
.pg-h2 {
  font-family: 'Playfair Display', serif;
  font-size: clamp(28px, 3.3vw, 62px);
  font-weight: 700;
  line-height: 1.1;
  letter-spacing: -0.022em;
  color: var(--text);
}

/* the closing call to action: the home page's card, laid out as a band */
.pg-sec.pg-close { padding-top: clamp(56px, 6.2vw, 96px); }
.pg-close .stb-cta { padding: clamp(28px, 3.6vw, 60px) clamp(28px, 4vw, 68px); }
.pg-close .stb-cta-title { font-size: clamp(30px, 3.5vw, 66px); }
.pg-close .stb-cta-line  { margin-bottom: clamp(24px, 3.6vh, 36px); }

/* ── 4 · SERVICES · THE LADDER ──────────────────── */
/* LEVEL 1 — by far the biggest block on the page */
.pg-l1 {
  border-top-color: transparent;
  background: radial-gradient(74% 30% at 0% 0%, rgba(212,184,104,0.10) 0%, rgba(212,184,104,0) 72%);
}
.pg-l1::before {                                    /* gold rule that opens the Level 1 block */
  content: '';
  position: absolute;
  top: -1px; left: 0; right: 0;
  height: 1px;
  background: linear-gradient(90deg, var(--gold) 0%, var(--stb-gold-line) 42%, rgba(212,184,104,0) 100%);
}
.pg-l1 .stb-offer-title { margin-bottom: clamp(30px, 4.4vw, 66px); }
.pg-l1 .stb-offer-title--ads { margin-bottom: clamp(16px, 2.4vh, 26px); }
.pg-l1 .stb-feature {
  grid-template-columns: clamp(42px, 5.4vw, 92px) minmax(0, 1fr);
  padding: clamp(17px, 2vw, 30px) 0;
}
.pg-l1 .stb-feature-text { font-size: clamp(22px, 2.5vw, 46px); }
.pg-l1 .stb-features { margin-bottom: clamp(30px, 4vw, 56px); }
.pg-ads {                                           /* the second half of Level 1 */
  margin-top: clamp(56px, 7vw, 108px);
  padding-top: clamp(48px, 6vw, 92px);
  border-top: 1px solid var(--div-strong);
}

/* LEVEL 2 · LEVEL 3 · THE SCHOOL — clearly smaller, in a narrower column */
.pg-sec.pg-sec--more { padding: clamp(56px, 6vw, 92px) 0; }
.pg-more { max-width: 860px; }

/* WHO IT'S FOR — heading on the left, the five points on the right */
.pg-fit .stb-lead { margin-bottom: clamp(18px, 2.6vh, 26px); }

/* ── 5 · RESEARCH ───────────────────────────────── */
.pg--research .pg-hero { padding-bottom: clamp(36px, 4vw, 60px); }
.pg-sec.pg-sec--facts { padding-top: clamp(20px, 2.6vw, 40px); border-top: 0; }
.pg-facts {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px;
}
.pg-facts .stb-fact {
  position: relative;
  grid-template-columns: minmax(0, 1fr);
  grid-template-rows: auto auto 1fr;
  align-items: start;
  row-gap: 0;
  padding: clamp(26px, 2.6vw, 44px) clamp(24px, 2.5vw, 44px) clamp(28px, 2.7vw, 46px);
  border-radius: 12px;
  border-color: var(--div-strong);
}
.pg-facts .stb-fact:hover { border-color: var(--stb-gold-line); transform: translateY(-4px); }
.pg-fact-idx {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: clamp(26px, 3.4vw, 56px);
  font-family: 'Lato', sans-serif;
  font-size: 11px;
  font-weight: 700;
  line-height: 1.4;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--gold);
}
.pg-fact-idx::after {
  content: '';
  flex: 1 1 auto;
  height: 1px;
  background: var(--div-strong);
}
.pg-facts .stb-fact-num {
  font-size: clamp(64px, 6.7vw, 128px);
  margin-bottom: clamp(18px, 2vw, 32px);
}
.pg-facts .stb-fact-body {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  height: 100%;
}
.pg-facts .stb-fact-text {
  font-size: clamp(15.5px, 1.2vw, 19px);
  margin-bottom: clamp(20px, 2vw, 30px);
}
.pg-facts .stb-textlink { margin-top: auto; }

/* "Want every study and source?" */
.pg-all-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 28px 48px;
}
.pg-all-row .stb-eyebrow { margin-bottom: 14px; }

/* ── 6 · ABOUT ──────────────────────────────────── */
.pg-hero--quote::after { display: none; }           /* the quote takes the full width */
.pg-quote {
  max-width: 16.5em;
  padding-left: clamp(20px, 2.5vw, 46px);
  border-left: 2px solid var(--gold);
  font-family: 'Playfair Display', serif;
  font-style: italic;
  font-size: clamp(31px, 4.6vw, 86px);
  font-weight: 600;
  line-height: 1.13;
  letter-spacing: -0.022em;
  color: var(--text);
  text-wrap: balance;
}
.pg-quote-gold {
  display: block;
  margin-top: 0.22em;
  color: var(--gold);
}

.pg-story-grid {
  display: grid;
  grid-template-columns: minmax(0, 3fr) minmax(0, 9fr);
  column-gap: clamp(32px, 5vw, 88px);
  align-items: start;
}
.pg-story-crest {
  width: clamp(64px, 6.4vw, 108px);
  height: auto;
  margin-top: clamp(8px, 1.4vw, 20px);
}
.pg-story .stb-story-body {
  font-size: clamp(18px, 1.62vw, 27px);
  line-height: 1.72;
  color: var(--pg-soft);
  max-width: 31em;
  margin-bottom: clamp(30px, 3.4vw, 52px);
}
.pg-story .stb-sign { font-size: clamp(16px, 1.3vw, 22px); }

.pg-why .stb-why { margin-bottom: clamp(44px, 5.6vw, 84px); }
.pg-values-label {
  font-family: 'Lato', sans-serif;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--muted);
  margin-bottom: 18px;
}
.pg-values { display: flex; flex-wrap: wrap; gap: 10px; }
.pg-value {
  padding: 13px 24px;
  border: 1px solid var(--div-strong);
  border-radius: 100px;
  font-size: clamp(13px, 1vw, 15px);
  font-weight: 400;
  line-height: 1.4;
  letter-spacing: 0.03em;
  color: var(--muted);
  transition: border-color 0.25s, color 0.25s;
}
.pg-value strong { font-weight: 700; color: var(--text); transition: color 0.25s; }
.pg-value:hover { border-color: var(--stb-gold-line-strong); }
.pg-value:hover strong { color: var(--gold); }

/* ── 7 · CONTACT ────────────────────────────────── */
.pg--contact .pg-hero { padding-bottom: clamp(40px, 4.6vw, 64px); }
.pg--contact .pg-hero::after { display: none; }
.pg--contact .pg-h1 { font-size: clamp(38px, 5.5vw, 78px); line-height: 1.02; }
.pg-steps { margin-top: clamp(38px, 5.4vh, 60px); }
.pg-steps .stb-beat-text { font-size: clamp(17px, 1.45vw, 23px); font-weight: 600; }
.pg-steps .stb-beat-num  { font-size: 14px; min-width: 26px; }

.pg-sec.pg-sec--form { padding-top: 0; border-top: 0; }
.pg-form-card {
  padding: clamp(24px, 3.2vw, 48px);
  border: 1px solid var(--stb-gold-line);
  border-radius: 14px;
  background:
    radial-gradient(120% 70% at 0% 0%, rgba(212,184,104,0.10) 0%, rgba(212,184,104,0) 62%),
    var(--card-bg);
}
.pg-form { display: flex; flex-direction: column; gap: 20px; }
.pg-form .form-field input,
.pg-form .form-field textarea { border-radius: 6px; }
/* the consent line is a sentence, not a field label */
.pg-form .consent-label {
  text-transform: none;
  letter-spacing: 0;
  font-weight: 400;
}
.pg-form .consent-label input[type="checkbox"] {
  padding: 0;
  border-radius: 3px;
  resize: none;
}
.pg-form .consent-text { color: var(--muted); }
/* submit: the idle label, and "Sending…" while the form is busy */
.pg-form #formSubmit .btn-txt { display: none; }
.pg-form #formSubmit:disabled .btn-txt { display: inline; }
.pg-form #formSubmit:disabled .pg-btn-idle,
.pg-form #formSubmit:disabled .btn-arr { display: none; }
.pg-form #formSubmit:disabled { opacity: 0.72; cursor: progress; transform: none; }

.pg-expect { margin-top: clamp(56px, 6.4vw, 96px); }
.pg-expect-title {
  margin-bottom: clamp(20px, 2.4vw, 30px);
  font-family: 'Playfair Display', serif;
  font-size: clamp(24px, 2.4vw, 36px);
  font-weight: 700;
  line-height: 1.15;
  letter-spacing: -0.016em;
  color: var(--text);
}
.pg-expect-list {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  column-gap: clamp(28px, 4vw, 56px);
  border-top: 1px solid var(--div-strong);
}
.pg-expect-item {
  display: grid;
  grid-template-columns: 34px minmax(0, 1fr);
  column-gap: 12px;
  align-items: baseline;
  padding: clamp(18px, 2vw, 24px) 0;
  border-bottom: 1px solid var(--div);
}
.pg-expect-num {
  font-family: 'Playfair Display', serif;
  font-size: 14px;
  font-weight: 600;
  letter-spacing: 0.06em;
  color: var(--gold);
}
.pg-expect-text {
  font-size: clamp(15.5px, 1.2vw, 18px);
  font-weight: 400;
  line-height: 1.55;
  color: var(--pg-soft);
  text-wrap: pretty;
}

.pg-direct {
  margin-top: clamp(48px, 5vw, 72px);
  padding-top: clamp(28px, 3vw, 40px);
  border-top: 1px solid var(--div);
  display: flex;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 10px 32px;
  font-size: 13.5px;
  line-height: 1.6;
  color: var(--muted);
}
.pg-direct-links { display: flex; align-items: center; flex-wrap: wrap; gap: 6px 10px; }
.pg-direct a { color: var(--muted); transition: color 0.2s; }
.pg-direct a:hover { color: var(--gold); }
.pg-direct-sep { color: var(--faint); user-select: none; }

/* ── 8 · NARROW SCREENS · THEME · MOTION ────────── */
/* price rows: the one-column page has room for name left, price right down to a tablet */
@media (min-width: 821px) and (max-width: 1240px) {
  .pg .stb-price { grid-template-columns: minmax(0, 1fr) auto; row-gap: 0; }
  .pg .stb-price-amt { flex-direction: column; flex-wrap: nowrap; align-items: flex-end; gap: 6px; text-align: right; }
}

@media (min-width: 1041px) {
  .pg-fit {
    display: grid;
    grid-template-columns: minmax(0, 5fr) minmax(0, 6fr);
    column-gap: clamp(48px, 6vw, 108px);
    align-items: start;
  }
  .pg-fit .stb-head { margin-bottom: 0; }
  .pg-fit .stb-h2--long { font-size: clamp(30px, 3.1vw, 54px); }   /* sized for the narrower left column */
}

@media (min-width: 901px) {
  .pg-close .stb-cta {
    flex-direction: row;
    align-items: center;
    justify-content: space-between;
    gap: 32px 56px;
  }
  .pg-close .stb-cta-line { margin-bottom: 0; }
  .pg-close .stb-cta .btn { flex: 0 0 auto; }
}

@media (max-width: 1040px) {
  .pg-hero::after { display: none; }
  /* research: the three cards go back to the home page's rows (number left, text right) */
  .pg-facts { grid-template-columns: minmax(0, 1fr); gap: 3px; }
  .pg-facts .stb-fact {
    grid-template-columns: clamp(170px, 25vw, 260px) minmax(0, 1fr);
    grid-template-rows: auto auto;
    column-gap: clamp(20px, 3vw, 36px);
    align-items: center;
    border-radius: 8px;
  }
  .pg-facts .stb-fact:hover { transform: none; }
  .pg-fact-idx { grid-column: 1 / -1; margin-bottom: 18px; }
  .pg-facts .stb-fact-num { font-size: clamp(60px, 8.4vw, 92px); margin-bottom: 0; }
  .pg-facts .stb-fact-text { margin-bottom: 14px; }
  .pg-facts .stb-textlink { margin-top: 0; }
}

@media (max-width: 900px) {
  :root { --pg-gutter: 28px; }
  .pg-hero { padding: 136px 0 64px; }
  .pg-h1 { font-size: clamp(40px, 11.4vw, 76px); }
  .pg-lede { font-size: clamp(17px, 4.5vw, 22px); }
  .pg-hero .stb-statement { font-size: clamp(22px, 5.9vw, 34px); }
  .pg-sec { padding: clamp(60px, 9vh, 84px) 0; }

  .pg-l1 .stb-feature { grid-template-columns: 40px minmax(0, 1fr); padding: 16px 0; }
  .pg-l1 .stb-feature-text { font-size: clamp(21px, 5.8vw, 34px); }

  .pg-story-grid { grid-template-columns: minmax(0, 1fr); row-gap: 20px; }
  .pg-story-side { display: flex; align-items: center; justify-content: space-between; gap: 20px; }
  .pg-story-side .stb-eyebrow { margin-bottom: 0; }
  .pg-story-crest { width: 54px; margin-top: 0; }
  .pg-story .stb-story-body { font-size: clamp(17px, 4.5vw, 21px); }
  .pg-quote { font-size: clamp(29px, 7.8vw, 54px); padding-left: 20px; }

  .pg--contact .pg-h1 { font-size: clamp(36px, 10.4vw, 64px); }
  .pg-steps { margin-top: 30px; }
  .pg-steps .stb-beat-text { font-size: clamp(17px, 4.6vw, 22px); }
}

@media (max-width: 768px) {
  :root { --pg-gutter: 24px; }
  /* the bar sits in the page flow on a phone, so the hero needs no room for it,
     and its light starts lower so there is no hard edge under the bar */
  .pg-hero { padding: 44px 0 56px; }
  .pg-hero::before { background: radial-gradient(96% 60% at 0% 48%, var(--pg-glow) 0%, rgba(212,184,104,0) 72%); }
  .pg--contact .pg-hero { padding-bottom: 36px; }
}

@media (max-width: 700px) {
  .pg-facts .stb-fact { grid-template-columns: minmax(0, 1fr); padding: 26px 24px 28px; }
  .pg-facts .stb-fact-num { font-size: clamp(60px, 17vw, 96px); margin-bottom: 14px; }
  .pg-fact-idx { margin-bottom: 22px; }
  .pg-expect-list { grid-template-columns: minmax(0, 1fr); }
  .pg-all-row .btn { max-width: 100%; }
  .pg-direct { flex-direction: column; gap: 14px; }
  .pg-direct-links:first-child { flex-direction: column; align-items: flex-start; gap: 6px; }
  .pg-direct-links:first-child .pg-direct-sep { display: none; }
}

@media (max-width: 480px) {
  .pg .btn-lg { padding: 16px 28px; }
  .pg .stb-cta .btn,
  .pg-all-row .btn { max-width: 100%; }
  .pg-value { padding: 12px 18px; border-radius: 22px; }
  .pg-story .stb-sign { flex-direction: column; align-items: flex-start; gap: 16px; font-size: 15.5px; }
  .pg-form-card { padding: 22px 18px; }
}
@media (max-width: 380px) {
  .pg .btn { white-space: normal; text-align: center; justify-content: center; }
}

/* light theme */
[data-theme="light"] .pg-l1 {
  background: radial-gradient(74% 30% at 0% 0%, rgba(160,131,56,0.12) 0%, rgba(160,131,56,0) 72%);
}
[data-theme="light"] .pg-form-card {
  background:
    radial-gradient(120% 70% at 0% 0%, rgba(160,131,56,0.13) 0%, rgba(160,131,56,0) 62%),
    var(--card-bg);
}
[data-theme="light"] .pg-hero::after { opacity: 0.13; }

/* hero entrance (only once stb.js has run; without it everything is simply visible) */
.stb-js .pg-hero [data-rise] {
  opacity: 0;
  transform: translate3d(0, 26px, 0);
}
.stb-js.stb-ready .pg-hero [data-rise] {
  opacity: 1;
  transform: none;
  transition: opacity 0.9s var(--ease), transform 1s var(--ease);
}
.stb-js.stb-ready .pg-hero [data-rise="2"] { transition-delay: 0.07s; }
.stb-js.stb-ready .pg-hero [data-rise="3"] { transition-delay: 0.14s; }
.stb-js.stb-ready .pg-hero [data-rise="4"] { transition-delay: 0.21s; }
@media (prefers-reduced-motion: reduce) {
  .stb-js .pg-hero [data-rise] { opacity: 1; transform: none; }
}
