/* Teal + ivory.
 *
 * From the clinic's design brief (December 2026): signature muted teal #637879
 * and neutral ivory #F5F3EF, Cormorant Garamond for headlines with one italic
 * accent word, a small clean sans (Inter) for body, navigation and buttons,
 * rounded pill buttons, layered cards on ivory, teal header and footer bands.
 *
 * Both brand colours are used exactly as given. The rest is derived, because
 * each pairing has a contrast floor (WCAG AA, 4.5:1 for small text):
 *
 *   white   on teal #637879   4.67:1   header and footer text, buttons
 *   ivory   on teal #637879   4.22:1   large text only (the brief notes this)
 *   teal    on ivory          4.22:1   italic accent words, which are display size
 *   #4c5e5f on ivory          6.17:1   the "darker teal shade" for small teal text
 *   #3f4f50 on ivory          7.75:1   headings
 *   #2c3535 on ivory         11.36:1   body text: the dark neutral the brief asks for
 *
 * tools/theme/check-contrast.mjs measures the rendered page in both modes.
 */

:root {
  color-scheme: light;

  /* ---- brand, exactly as supplied ---- */
  --ivy-c-brand:            #637879;
  --ivy-c-brand-strong:     #4c5e5f;
  --ivy-c-brand-deep:       #3f4f50;
  --ivy-c-brand-tint:       #e9eeec;

  /* ---- ground ---- */
  --ivy-c-bg:               #f5f3ef;   /* ivory, exactly as supplied */
  --ivy-c-surface:          #fbfaf7;   /* ivory lifted toward white: cards */
  --ivy-c-ink:              #26302f;
  --ivy-c-body:             #2c3535;
  --ivy-c-muted:            #556667;   /* 5.44:1 on ivory */
  --ivy-c-border:           #dedad2;
  --ivy-c-on-brand:         #ffffff;
  --ivy-c-focus:            #3f4f50;
  --ivy-c-success:          #4f7d5f;
  --ivy-c-danger:           #9d4b46;

  /* ---- type ---- */
  --ivy-font-heading: "Cormorant Garamond", "Cormorant", Georgia, "Times New Roman", serif;
  --ivy-font-body:    "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  --ivy-font-mono:    ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;

  /* Light, high-contrast serif for headlines, as the brief asks. Cormorant
     Garamond at 300 only works large; smaller headings step up to 500. */
  --ivy-weight-display: 300;
  --ivy-weight-heading: 500;
  --ivy-weight-medium:  500;
  --ivy-weight-body:    300;

  --ivy-text-xs:   0.75rem;
  --ivy-text-sm:   0.875rem;
  --ivy-text-base: 1rem;
  --ivy-text-lg:   1.3rem;
  --ivy-text-xl:   1.75rem;
  --ivy-text-2xl:  2.5rem;
  --ivy-text-3xl:  3.25rem;
  --ivy-text-display: clamp(2.6rem, 1.6rem + 4.2vw, 5rem);

  --ivy-leading-tight:  1.08;
  --ivy-leading-snug:   1.3;
  --ivy-leading-normal: 1.75;      /* "generous line spacing" */
  --ivy-tracking-wide:  0.08em;
  --ivy-tracking-caps:  0.16em;    /* eyebrows, nav, category titles */
  --ivy-tracking-tight: -0.015em;  /* headlines, "tightly spaced" */
  --ivy-underline-offset: 0.2em;
  --ivy-underline-thickness: 1px;

  /* ---- component colour ---- */
  --ivy-heading-color:     #3f4f50;
  --ivy-accent-color:      #637879;   /* the italic accent word */
  --ivy-link-color:        #4c5e5f;
  --ivy-link-hover:        #26302f;
  --ivy-eyebrow-color:     #4c5e5f;
  --ivy-breadcrumb-color:  #556667;
  --ivy-breadcrumb-link:   #4c5e5f;

  --ivy-header-bg:         #637879;
  --ivy-header-fg:         #ffffff;
  --ivy-footer-bg:         #637879;
  --ivy-footer-fg:         #ffffff;
  --ivy-rule-on-brand:     rgba(255, 255, 255, 0.3);

  --ivy-cta-bg:            #637879;
  --ivy-cta-bg-hover:      #4c5e5f;
  --ivy-cta-fg:            #ffffff;
  --ivy-cta-radius:        var(--ivy-radius-pill);
  /* The Book Now pill sits on the teal header, so it inverts. */
  --ivy-header-cta-bg:       #f5f3ef;
  --ivy-header-cta-bg-hover: #ffffff;
  --ivy-header-cta-fg:       #3f4f50;

  --ivy-submenu-bg:        #fbfaf7;
  --ivy-submenu-fg:        #2c3535;
  --ivy-submenu-hover-bg:  #e9eeec;
  --ivy-submenu-heading:   #4c5e5f;
  --ivy-submenu-radius:    var(--ivy-radius-md);
  --ivy-submenu-shadow:    0 18px 40px rgba(38, 48, 47, 0.14);
  --ivy-submenu-width:     15rem;

  /* The old video hero, still used by any template that asks for it. */
  --ivy-hero-fg:           #ffffff;
  --ivy-hero-overlay:      linear-gradient(180deg, rgba(38,48,47,0.30) 0%, rgba(38,48,47,0.55) 100%);
  --ivy-hero-fallback-bg:  #637879;
  --ivy-hero-min-height:   min(78vh, 44rem);
  --ivy-hero-align:        center;

  /* The brand hero: text-led on ivory, layered with a soft teal wash so it
     reads as a designed space rather than an empty band. */
  --ivy-brand-hero-bg:
    radial-gradient(120% 80% at 50% 0%, rgba(99, 120, 121, 0.10) 0%, rgba(99, 120, 121, 0) 60%),
    linear-gradient(180deg, #f5f3ef 0%, #efece6 100%);
  --ivy-brand-hero-min-height: min(82vh, 46rem);
  --ivy-crest-hero-width:   clamp(9.5rem, 7rem + 8vw, 14rem);
  /* The photo hero (slideshow): ivory type over a teal-dark wash that keeps
     it legible on any photo the clinic adds - same in both colour modes. */
  --ivy-photo-hero-overlay: linear-gradient(180deg, rgba(31, 41, 41, 0.50) 0%, rgba(31, 41, 41, 0.42) 45%, rgba(31, 41, 41, 0.62) 100%);
  --ivy-photo-hero-fg:      #f5f3ef;
  --ivy-photo-hero-bg:      #2a3535;   /* behind the photos before they load: ivory on it 11.6:1 */
  --ivy-photo-hero-accent:  #dce7e5;
  --ivy-photo-hero-rule:    rgba(245, 243, 239, 0.35);
  --ivy-slide-fade:         1400ms;
  /* Testimonials: large serif, sentence case, centred. */
  --ivy-quote-size:         clamp(1.5rem, 1.1rem + 1.4vw, 2.1rem);
  --ivy-crest-header-width: 6.25rem;
  --ivy-crest-header-width-small: 4.5rem;
  --ivy-crest-footer-width: 8.5rem;

  /* ---- cards and sections ---- */
  --ivy-card-bg:           #fbfaf7;
  --ivy-card-border:       rgba(99, 120, 121, 0.14);
  --ivy-card-shadow:       0 1px 2px rgba(38, 48, 47, 0.04), 0 8px 24px rgba(38, 48, 47, 0.05);
  --ivy-card-shadow-hover: 0 2px 4px rgba(38, 48, 47, 0.05), 0 20px 44px rgba(38, 48, 47, 0.10);
  --ivy-card-lift:         -3px;
  --ivy-card-accent:       #637879;   /* the hairline that grows on hover */
  --ivy-section-alt-bg:    #eeebe5;   /* a deeper ivory: the brief turns the mockup's cool greys to ivory */
  --ivy-section-teal-bg:   #637879;
  --ivy-section-teal-fg:   #ffffff;

  --ivy-tab-fg:            #556667;
  --ivy-tab-active-fg:     #3f4f50;
  --ivy-tab-rule:          #dedad2;
  --ivy-tab-active-rule:   #637879;

  --ivy-team-size:         9.5rem;
  --ivy-team-ring:         rgba(99, 120, 121, 0.25);
  --ivy-team-placeholder-bg: #e8e3da;   /* deeper ivory, not the mockup's cool grey */

  /* ---- shape and depth ---- */
  --ivy-radius-sm:   4px;
  --ivy-radius-md:   10px;
  --ivy-radius-lg:   18px;
  --ivy-radius-pill: 999px;
  --ivy-media-radius: 10px;
  --ivy-border-width: 1px;
  --ivy-shadow-sm: 0 1px 2px rgba(38, 48, 47, 0.06);
  --ivy-shadow-md: 0 8px 22px rgba(38, 48, 47, 0.10);
  --ivy-shadow-lg: 0 22px 50px rgba(38, 48, 47, 0.14);

  --ivy-focus-width: 2px;
  --ivy-focus-offset: 3px;

  /* ---- rhythm: generous, for a calm editorial feel ---- */
  --ivy-space-3xs: 0.3rem;
  --ivy-space-2xs: 0.55rem;
  --ivy-space-xs:  0.85rem;
  --ivy-space-sm:  1.15rem;
  --ivy-space-md:  1.75rem;
  --ivy-space-lg:  2.75rem;
  --ivy-space-xl:  4.25rem;
  --ivy-space-2xl: 6.25rem;
  --ivy-space-3xl: 8.5rem;
  --ivy-gutter:    1.5rem;
  --ivy-nav-gap:   1.6rem;
  --ivy-logo-gap:  0.75rem;
  --ivy-logo-height: 3rem;
  --ivy-logo-height-small: 2.4rem;

  --ivy-width-content: 42rem;
  --ivy-width-wide:    70rem;
  --ivy-width-full:    80rem;

  --ivy-card-image-ratio:    4 / 3;
  --ivy-feature-image-ratio: 16 / 9;

  --ivy-duration: 240ms;
  --ivy-duration-slow: 420ms;
  --ivy-ease: cubic-bezier(0.22, 0.61, 0.36, 1);
}

/* ---------------------------------------------------------------------------
   Dark mode. The teal carries over as the bands and accents; ivory becomes
   the ink, so it is still the same two colours.
   --------------------------------------------------------------------------- */
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    color-scheme: dark;

    --ivy-c-bg:           #121817;
    --ivy-c-surface:      #19211f;
    --ivy-c-ink:          #f5f3ef;
    --ivy-c-body:         #e6e3dd;
    --ivy-c-muted:        #b5c2c0;
    --ivy-c-border:       #2d3836;
    --ivy-c-brand:        #8fa7a7;
    --ivy-c-brand-strong: #a9bfbe;
    --ivy-c-brand-deep:   #c9d6d4;
    --ivy-c-brand-tint:   #1e2928;
    --ivy-c-on-brand:     #121817;
    --ivy-c-focus:        #f5f3ef;

    --ivy-heading-color:    #d3dedc;
    --ivy-accent-color:     #a9bfbe;
    --ivy-link-color:       #a9bfbe;
    --ivy-link-hover:       #f5f3ef;
    --ivy-eyebrow-color:    #a9bfbe;
    --ivy-breadcrumb-color: #b5c2c0;
    --ivy-breadcrumb-link:  #f5f3ef;

    --ivy-header-bg:  #2f3d3d;
    --ivy-header-fg:  #f5f3ef;
    --ivy-footer-bg:  #2f3d3d;
    --ivy-footer-fg:  #f5f3ef;
    --ivy-rule-on-brand: rgba(245, 243, 239, 0.22);

    --ivy-cta-bg:       #a9bfbe;
    --ivy-cta-bg-hover: #c9d6d4;
    --ivy-cta-fg:       #121817;
    --ivy-header-cta-bg:       #f5f3ef;
    --ivy-header-cta-bg-hover: #ffffff;
    --ivy-header-cta-fg:       #1e2928;

    --ivy-submenu-bg:       #19211f;
    --ivy-submenu-fg:       #e6e3dd;
    --ivy-submenu-hover-bg: #1e2928;
    --ivy-submenu-heading:  #a9bfbe;
    --ivy-submenu-shadow:   0 18px 40px rgba(0, 0, 0, 0.6);

    --ivy-hero-fg:          #f5f3ef;
    --ivy-hero-overlay:     linear-gradient(180deg, rgba(6,9,9,0.5) 0%, rgba(6,9,9,0.74) 100%);
    --ivy-hero-fallback-bg: #19211f;
    --ivy-brand-hero-bg:
      radial-gradient(120% 80% at 50% 0%, rgba(143, 167, 167, 0.14) 0%, rgba(143, 167, 167, 0) 60%),
      linear-gradient(180deg, #121817 0%, #151c1b 100%);

    --ivy-card-bg:           #19211f;
    --ivy-card-border:       rgba(169, 191, 190, 0.14);
    --ivy-card-shadow:       0 1px 2px rgba(0, 0, 0, 0.4), 0 8px 24px rgba(0, 0, 0, 0.3);
    --ivy-card-shadow-hover: 0 2px 4px rgba(0, 0, 0, 0.5), 0 20px 44px rgba(0, 0, 0, 0.45);
    --ivy-card-accent:       #a9bfbe;
    --ivy-section-alt-bg:    #172020;
    --ivy-section-teal-bg:   #2f3d3d;
    --ivy-section-teal-fg:   #f5f3ef;

    --ivy-tab-fg:          #b5c2c0;
    --ivy-tab-active-fg:   #f5f3ef;
    --ivy-tab-rule:        #2d3836;
    --ivy-tab-active-rule: #a9bfbe;

    --ivy-team-ring:           rgba(169, 191, 190, 0.3);
    --ivy-team-placeholder-bg: #1e2928;

    --ivy-shadow-sm: 0 1px 2px rgba(0, 0, 0, 0.5);
    --ivy-shadow-md: 0 8px 22px rgba(0, 0, 0, 0.55);
    --ivy-shadow-lg: 0 22px 50px rgba(0, 0, 0, 0.6);
  }
}

/* Explicit dark: the toggle must win over the system setting, both ways. */
:root[data-theme="dark"] {
  color-scheme: dark;

  --ivy-c-bg:           #121817;
  --ivy-c-surface:      #19211f;
  --ivy-c-ink:          #f5f3ef;
  --ivy-c-body:         #e6e3dd;
  --ivy-c-muted:        #b5c2c0;
  --ivy-c-border:       #2d3836;
  --ivy-c-brand:        #8fa7a7;
  --ivy-c-brand-strong: #a9bfbe;
  --ivy-c-brand-deep:   #c9d6d4;
  --ivy-c-brand-tint:   #1e2928;
  --ivy-c-on-brand:     #121817;
  --ivy-c-focus:        #f5f3ef;

  --ivy-heading-color:    #d3dedc;
  --ivy-accent-color:     #a9bfbe;
  --ivy-link-color:       #a9bfbe;
  --ivy-link-hover:       #f5f3ef;
  --ivy-eyebrow-color:    #a9bfbe;
  --ivy-breadcrumb-color: #b5c2c0;
  --ivy-breadcrumb-link:  #f5f3ef;

  --ivy-header-bg:  #2f3d3d;
  --ivy-header-fg:  #f5f3ef;
  --ivy-footer-bg:  #2f3d3d;
  --ivy-footer-fg:  #f5f3ef;
  --ivy-rule-on-brand: rgba(245, 243, 239, 0.22);

  --ivy-cta-bg:       #a9bfbe;
  --ivy-cta-bg-hover: #c9d6d4;
  --ivy-cta-fg:       #121817;
  --ivy-header-cta-bg:       #f5f3ef;
  --ivy-header-cta-bg-hover: #ffffff;
  --ivy-header-cta-fg:       #1e2928;

  --ivy-submenu-bg:       #19211f;
  --ivy-submenu-fg:       #e6e3dd;
  --ivy-submenu-hover-bg: #1e2928;
  --ivy-submenu-heading:  #a9bfbe;
  --ivy-submenu-shadow:   0 18px 40px rgba(0, 0, 0, 0.6);

  --ivy-hero-fg:          #f5f3ef;
  --ivy-hero-overlay:     linear-gradient(180deg, rgba(6,9,9,0.5) 0%, rgba(6,9,9,0.74) 100%);
  --ivy-hero-fallback-bg: #19211f;
  --ivy-brand-hero-bg:
    radial-gradient(120% 80% at 50% 0%, rgba(143, 167, 167, 0.14) 0%, rgba(143, 167, 167, 0) 60%),
    linear-gradient(180deg, #121817 0%, #151c1b 100%);

  --ivy-card-bg:           #19211f;
  --ivy-card-border:       rgba(169, 191, 190, 0.14);
  --ivy-card-shadow:       0 1px 2px rgba(0, 0, 0, 0.4), 0 8px 24px rgba(0, 0, 0, 0.3);
  --ivy-card-shadow-hover: 0 2px 4px rgba(0, 0, 0, 0.5), 0 20px 44px rgba(0, 0, 0, 0.45);
  --ivy-card-accent:       #a9bfbe;
  --ivy-section-alt-bg:    #172020;
  --ivy-section-teal-bg:   #2f3d3d;
  --ivy-section-teal-fg:   #f5f3ef;

  --ivy-tab-fg:          #b5c2c0;
  --ivy-tab-active-fg:   #f5f3ef;
  --ivy-tab-rule:        #2d3836;
  --ivy-tab-active-rule: #a9bfbe;

  --ivy-team-ring:           rgba(169, 191, 190, 0.3);
  --ivy-team-placeholder-bg: #1e2928;

  --ivy-shadow-sm: 0 1px 2px rgba(0, 0, 0, 0.5);
  --ivy-shadow-md: 0 8px 22px rgba(0, 0, 0, 0.55);
  --ivy-shadow-lg: 0 22px 50px rgba(0, 0, 0, 0.6);
}

/* Explicit light, so the toggle can override a dark system preference. */
:root[data-theme="light"] { color-scheme: light; }

/* ---------------------------------------------------------------------------
   Skin-level type treatment.
   --------------------------------------------------------------------------- */
.ivy-main h1, .ivy-main h2, .ivy-page-header h1 {
  font-weight: var(--ivy-weight-display);
  letter-spacing: var(--ivy-tracking-tight);
}
.ivy-main h1 em, .ivy-main h2 em { color: var(--ivy-accent-color); font-style: italic; }
/* Eyebrows: small italic serif capitals, as in "We've Got Your Glow". */
.ivy-eyebrow {
  font-family: var(--ivy-font-heading);
  font-style: italic;
  font-weight: var(--ivy-weight-medium);
  font-size: var(--ivy-text-base);   /* Cormorant italic sets small; at sm it read as a footnote */
  letter-spacing: var(--ivy-tracking-caps);
}
