/* VidaFlow Health -- V4 base: the shared layer of the V4.2 design system.
   Loaded by every V4 page (the homepage and the inner pages), BEFORE the
   page-specific layer (home-v4.css on the homepage, site-v4.css on inner
   pages), so those can refine anything here with equal specificity.

   Holds only what more than one page uses: self-hosted fonts, --v4-* tokens,
   the section wrapper + type scale, eyebrows, buttons, and the unified card
   system (V4 cards, legacy .treatment-card markup skinned as V4 cards inside a
   .v4-card-grid, the hair summary). Every class is v4-* prefixed or scoped
   under .v4-card-grid, so nothing here can collide with protocol.css/site.css.

   Type: Fraunces for display headings, DM Sans for everything else,
   self-hosted from /fonts/home-v4/ (Google Fonts' OFL variable files, Latin
   subset) per ruling #2 -- no third-party font request. */

@font-face{font-family:"Fraunces";font-style:normal;font-weight:400 700;font-display:swap;src:url("/fonts/home-v4/fraunces-latin-var.woff2") format("woff2")}
@font-face{font-family:"DM Sans";font-style:normal;font-weight:400 700;font-display:swap;src:url("/fonts/home-v4/dm-sans-latin-var.woff2") format("woff2")}
/* Google's Latin subset omits U+2192 (the arrow our CTAs use), so arrows fell
   back to a system font. This 1.5KB supplement carries only that glyph, cut
   from the same DM Sans build (4.004, OFL -- see OFL-DMSans.txt). Declared
   after the main face and limited by unicode-range, so browsers prefer it for
   "→", download it only on pages containing one, and no other glyph changes.
   (Fraunces has no arrow glyph in any version; arrows are set in DM Sans.) */
@font-face{font-family:"DM Sans";font-style:normal;font-weight:400 700;font-display:swap;src:url("/fonts/home-v4/dm-sans-arrows-var.woff2") format("woff2");unicode-range:U+2192}

:root{
  --v4-navy:#0b285d;
  --v4-navy-2:#071d45;
  --v4-ink:#102a43;
  --v4-blue:#2d7df4;
  --v4-teal:#48c7c2;
  --v4-line:rgba(14,46,91,.14);
  --v4-muted:#5e7284;
  --v4-ease:cubic-bezier(.23,1,.32,1);
  --v4-serif:"Fraunces",Georgia,serif;
  --v4-sans:"DM Sans",Arial,sans-serif;

  /* type scale (display sizes are the homepage's; reading sizes are for long-form pages) */
  --v4-display-1:clamp(3.3rem,6.1vw,5.75rem);   /* homepage hero */
  --v4-display-2:clamp(2.25rem,4.1vw,4.15rem);  /* section titles */
  --v4-display-3:clamp(2.3rem,4.4vw,3.6rem);    /* inner-page titles */
  --v4-reading-h2:clamp(1.55rem,2.3vw,1.95rem);
  --v4-reading-h3:1.2rem;
  --v4-text-lg:18px;
  --v4-text-base:16px;
  --v4-text-reading:17px;
  --v4-text-sm:14px;
  --v4-text-xs:12px;

  /* spacing scale */
  --v4-space-1:4px;
  --v4-space-2:8px;
  --v4-space-3:12px;
  --v4-space-4:16px;
  --v4-space-5:24px;
  --v4-space-6:32px;
  --v4-space-7:48px;
  --v4-space-8:64px;
  --v4-space-9:96px;

  /* shape + depth */
  --v4-radius-sm:11px;
  --v4-radius:18px;
  --v4-radius-lg:24px;
  --v4-radius-xl:30px;
  --v4-shadow-card:0 12px 28px rgba(3,23,59,.16),inset 0 1px 0 #fff;
  --v4-shadow-soft:0 10px 26px rgba(13,51,96,.07);
  --v4-border-card:1.5px solid rgba(120,181,239,.34);
}

/* ---------- section wrapper + type scale ---------- */
.v4-hero,.v4-section{font-family:var(--v4-sans)}
.v4-section{padding:105px 0}
.v4-section h2{margin:13px 0 0;color:var(--v4-navy);font-family:var(--v4-serif);font-size:clamp(2.25rem,4.1vw,4.15rem);font-weight:500;line-height:.99;letter-spacing:-.055em}
.v4-eyebrow{display:inline-flex;align-items:center;gap:8px;margin:0;font-family:var(--v4-sans);font-size:10px;font-weight:700;letter-spacing:.14em;line-height:1.4;text-transform:uppercase}
.v4-eyebrow__dot{display:inline-block;width:7px;height:7px;border-radius:50%;background:currentColor}
.v4-eyebrow--light{color:#aeecea}
.v4-eyebrow--blue{color:#2472df}
.v4-eyebrow--electric{color:#71b3ff}
.v4-section-intro{margin-bottom:40px}
.v4-section-intro--split{display:grid;grid-template-columns:minmax(0,1.2fr) minmax(280px,.8fr);gap:55px;align-items:end}
.v4-section-intro--split>p{max-width:440px;margin:0 0 3px auto;color:var(--v4-muted);font-size:16px;line-height:1.62}
.v4-section-intro--center{max-width:790px;margin-left:auto;margin-right:auto;text-align:center}
.v4-section-intro--center>p:last-child{max-width:600px;margin:18px auto 0;color:var(--v4-muted);font-size:16px;line-height:1.6}
.v4-section-intro--divider{position:relative;padding-bottom:27px}
.v4-section-intro--divider::after{content:"";position:absolute;bottom:0;left:50%;width:76px;height:2px;border-radius:2px;background:var(--v4-blue);transform:translateX(-50%)}
.v4-icon{flex:0 0 auto}
.v4-sr-only{position:absolute;width:1px;height:1px;overflow:hidden;clip:rect(0,0,0,0);white-space:nowrap}

/* ---------- buttons + links ---------- */
.v4-button{display:inline-flex;align-items:center;justify-content:center;gap:8px;padding:14px 21px;border-radius:100px;font-family:var(--v4-sans);font-size:13px;font-weight:700;line-height:1.2;transition:transform 160ms var(--v4-ease),box-shadow 160ms var(--v4-ease),background 160ms var(--v4-ease)}
.v4-button:hover{transform:translateY(-2px);box-shadow:0 10px 24px rgba(4,24,58,.22)}
.v4-button:active{transform:scale(.97)}
.v4-button--electric{color:#fff;background:var(--v4-blue)}
.v4-button--electric:hover{background:#176be5}
.v4-button--ghost-light{color:#fff;border:1px solid rgba(255,255,255,.5);background:transparent}
.v4-button--ghost-light:hover{background:rgba(255,255,255,.1);box-shadow:none}
.v4-button--outline{color:var(--v4-blue);border:1px solid rgba(45,125,244,.42);background:#fff}
.v4-button--outline:hover{background:#edf5ff}
.v4-text-link{display:inline-flex;align-items:center;gap:6px;color:var(--v4-blue);font-size:12px;font-weight:700;transition:gap 150ms var(--v4-ease)}
.v4-text-link:hover{gap:10px}

/* decorative flow lines (SVG); per-use placement lives with the page layer */
.v4-flow{position:absolute;overflow:visible;pointer-events:none}
.v4-flow path{fill:none;stroke:currentColor;stroke-width:1.2;vector-effect:non-scaling-stroke}

/* ---------- unified card system ----------
   V4 cards (.v4-card) and legacy .treatment-card markup inside a .v4-card-grid
   share one card: numbered index + orb (v4_components.card_top / decorate_
   treatment_card), badge, Fraunces title, description, shield requirement line,
   bottom price divider, and the corner blob (::after, cycling 4 tints). */
.v4-card-grid{display:grid;gap:16px}
.v4-card-grid--three{grid-template-columns:repeat(3,1fr)}
.v4-card-grid--four{grid-template-columns:repeat(4,1fr);gap:14px}
.v4-card,
.v4-card-grid .treatment-card{position:relative;overflow:hidden;min-height:346px;padding:24px;display:flex;flex-direction:column;border:1.5px solid rgba(120,181,239,.34);border-radius:18px;background:#fff;color:var(--v4-ink);box-shadow:0 12px 28px rgba(3,23,59,.16),inset 0 1px 0 #fff;transition:transform 180ms var(--v4-ease),box-shadow 180ms var(--v4-ease),border-color 180ms var(--v4-ease)}
.v4-card:hover,
.v4-card-grid .treatment-card:hover{transform:translateY(-4px);border-color:rgba(45,125,244,.73);box-shadow:0 20px 37px rgba(3,23,59,.24),inset 0 1px 0 #fff}
.v4-card::after,
.v4-card-grid .treatment-card::after{content:"";position:absolute;z-index:0;right:-36px;bottom:-39px;width:108px;height:108px;border-radius:50%;background:#cdeaff;opacity:.72;pointer-events:none}
.v4-card:nth-child(4n+2)::after,.v4-card-grid .treatment-card:nth-child(4n+2)::after{background:#c9f0eb}
.v4-card:nth-child(4n+3)::after,.v4-card-grid .treatment-card:nth-child(4n+3)::after{background:#d9d8ff}
.v4-card:nth-child(4n+4)::after,.v4-card-grid .treatment-card:nth-child(4n+4)::after{background:#fae5bd}
.v4-card>*,.v4-card-grid .treatment-card>*{position:relative;z-index:1}

.v4-card__top{display:flex;align-items:flex-start;justify-content:space-between}
.v4-card__num{display:block;color:#839aaa;font-size:10px;font-weight:700;letter-spacing:.1em}
.v4-card__orb{flex:0 0 auto;width:34px;height:34px;border:1px solid #bee9ee;border-radius:50%;background:radial-gradient(circle at 33% 27%,#fff 0 9%,#bfeef0 32%,#69b8e0 100%)}
.v4-card__badge,
.v4-card-grid .treatment-card .card-badge{align-self:flex-start;display:inline-block;margin:14px 0;padding:6px 9px;border-radius:100px;color:#147273;background:#d9f5f1;font-family:var(--v4-sans);font-size:9px;font-weight:700;letter-spacing:.09em;line-height:1.3;text-transform:uppercase}
.v4-card h3,
.v4-card-grid .treatment-card .card-name{margin:0 0 4px;color:var(--v4-navy);font-family:var(--v4-serif);font-size:23px;font-weight:600;line-height:1.06;letter-spacing:-.045em}
.v4-card__format,
.v4-card-grid .treatment-card .card-name-en{margin:0;color:#65808f;font-size:11px}
.v4-card__desc,
.v4-card-grid .treatment-card .card-desc{margin:18px 0 14px;color:#58707e;font-size:13px;line-height:1.5}
.v4-card__req,
.v4-card-grid .treatment-card .rx-disclaimer{display:flex;align-items:center;gap:6px;margin:0 0 16px;color:#687f8d;font-size:11px;line-height:1.4}
.v4-card__req svg,
.v4-card-grid .treatment-card .rx-disclaimer svg{color:var(--v4-blue)}
.v4-card__bottom{margin-top:auto;padding-top:19px;border-top:1px solid var(--v4-line)}
.v4-card__price{display:block;margin-bottom:4px;color:var(--v4-navy);font-size:13px;font-weight:700;line-height:1.5}
.v4-price{white-space:nowrap}
.v4-refund-link{font-size:11px;font-weight:500;color:var(--v4-blue);text-decoration:underline;text-underline-offset:2px}

/* Legacy treatment-card markup: the price takes the bottom divider; renewal
   note, CTA and safety link follow it. */
.v4-card-grid .treatment-card .card-price{margin-top:auto;padding-top:19px;border-top:1px solid var(--v4-line);color:var(--v4-navy);font-family:var(--v4-sans);font-size:13px;font-weight:700;line-height:1.5}
.v4-card-grid .treatment-card .card-renew{margin-top:4px;color:#687f8d;font-size:11px;line-height:1.45}
.v4-card-grid .treatment-card .btn-card-primary{align-self:flex-start;display:inline-flex;align-items:center;justify-content:flex-start;gap:6px;margin-top:6px;padding:0;border-radius:0;background:none;color:var(--v4-blue);font-family:var(--v4-sans);font-size:12px;font-weight:700;letter-spacing:0;text-transform:none;transition:color 150ms var(--v4-ease)}
.v4-card-grid .treatment-card .btn-card-primary:hover{transform:none;background:none;color:#176be5}
.v4-card-grid .treatment-card .btn-card-secondary{align-self:flex-start;margin-top:2px;color:var(--v4-muted);font-size:11px;text-align:left}

/* Hair: compact summary + linked list, same border/radius/shadow language. */
.v4-hair-summary{min-height:354px;display:grid;grid-template-columns:.85fr 1.15fr;gap:35px;align-items:center;padding:25px;border:1.5px solid rgba(120,181,239,.34);border-radius:18px;background:linear-gradient(135deg,#f3fbff,#fff);box-shadow:0 12px 28px rgba(3,23,59,.16),inset 0 1px 0 #fff;color:var(--v4-ink)}
.v4-hair-summary__icon{display:inline-block;margin-bottom:12px;color:var(--v4-blue);font-family:Georgia,serif;font-size:34px;line-height:1}
.v4-hair-summary h3{margin:12px 0 10px;color:var(--v4-navy);font-family:var(--v4-serif);font-size:31px;font-weight:400;line-height:1.08;letter-spacing:-.045em}
.v4-hair-summary__prices{margin:19px 0 12px;color:var(--v4-navy);font-size:16px;font-weight:700;line-height:1.5}
.v4-hair-summary__prices .v4-refund-link,.v4-card__price .v4-refund-link{display:block;margin-top:4px}
.v4-hair-summary__list{display:flex;flex-direction:column;gap:8px}
.v4-hair-row{min-height:54px;padding:10px 14px;display:flex;align-items:center;justify-content:space-between;gap:12px;color:var(--v4-navy);border:1.5px solid rgba(14,46,91,.12);border-radius:11px;background:#fbfdff;font-size:12px;font-weight:700;transition:border-color 150ms var(--v4-ease),transform 150ms var(--v4-ease)}
.v4-hair-row:hover{border-color:var(--v4-blue);transform:translateX(3px)}
.v4-hair-row svg{color:var(--v4-blue)}

/* ================= responsive ================= */
@media (max-width:1120px){
  .v4-card-grid--four,.v4-card-grid--three{grid-template-columns:repeat(2,1fr)}
}
@media (max-width:800px){
  .v4-section{padding:79px 0}
  .v4-section-intro--split{grid-template-columns:1fr;gap:18px}
  .v4-section-intro--split>p{margin:0}
  .v4-hair-summary{grid-template-columns:1fr}
}
@media (max-width:560px){
  .v4-section h2{font-size:2.36rem}
  .v4-button{padding:13px 17px}
  .v4-card-grid--four,.v4-card-grid--three{grid-template-columns:1fr}
  .v4-card,.v4-card-grid .treatment-card{min-height:0}
  .v4-hair-summary{padding:20px}
  .v4-hair-summary h3{font-size:27px}
}

/* Tap targets: every interactive V4 element stays >=44px tall. */
/* (cards and hair rows already set min-heights above 44px -- listing them here would override those with this later, equal-specificity rule) */
.v4-button,.v4-text-link,.v4-card-grid .treatment-card .btn-card-primary{min-height:44px}

@media (prefers-reduced-motion:reduce){
  .v4-button,.v4-card,.v4-card-grid .treatment-card,.v4-hair-row{transition:none}
}
