/* ==========================================================================
   Deisy Almeida — Psicologia Clínica
   Design Tokens, Self-Hosted Webfonts & Editorial Motion Physics
   ========================================================================== */

/* --- Self-Hosted Fonts (only active weights) --- */
@font-face {
  font-family: "Boska";
  src: url("../fonts/boska-400.woff2") format("woff2");
  font-style: normal;
  font-weight: 400;
  font-display: swap;
}

@font-face {
  font-family: "Boska";
  src: url("../fonts/boska-500.woff2") format("woff2");
  font-style: normal;
  font-weight: 500;
  font-display: swap;
}

@font-face {
  font-family: "Cabin Condensed";
  src: url("../fonts/cabin-condensed-400.woff2") format("woff2");
  font-style: normal;
  font-weight: 400;
  font-display: swap;
}

@font-face {
  font-family: "Cabin Condensed";
  src: url("../fonts/cabin-condensed-500.woff2") format("woff2");
  font-style: normal;
  font-weight: 500;
  font-display: swap;
}

@font-face {
  font-family: "Cabin Condensed";
  src: url("../fonts/cabin-condensed-600.woff2") format("woff2");
  font-style: normal;
  font-weight: 600;
  font-display: swap;
}

@font-face {
  font-family: "Cabin Condensed";
  src: url("../fonts/cabin-condensed-700.woff2") format("woff2");
  font-style: normal;
  font-weight: 700;
  font-display: swap;
}

/* Metric-adjusted fallback fonts to prevent layout shift (CLS = 0) */
@font-face {
  font-family: "Boska Placeholder";
  src: local("Times New Roman"), local("Georgia");
  ascent-override: 96.04%;
  descent-override: 25.01%;
  line-gap-override: 9%;
  size-adjust: 99.96%;
}

@font-face {
  font-family: "Cabin Condensed Placeholder";
  src: local("Arial");
  ascent-override: 116.02%;
  descent-override: 30.06%;
  line-gap-override: 0%;
  size-adjust: 83.18%;
}

:root {
  color-scheme: light;
  interpolate-size: allow-keywords;

  /* --- Brand Palette (preserved verbatim) --- */
  --color-cream: #fbf9f6;
  --color-white: #ffffff;
  --color-sage: #8d9d7a;
  --color-peach: #eac5ab;
  --color-forest: #30372f;
  --color-forest-footer: #394438;
  --color-divider: #ded9d2;
  --color-gold-deep: #a99062;
  --color-gold-mid: #b7a174;
  --color-gold-soft: #d7c6a3;
  --color-champagne: #dcceb5;
  --color-hero-heading: #ebf0eb;
  --color-hero-detail: #e3f2e1;

  /* --- Accessible Derived Tokens (exact brand hue, WCAG AA >= 4.5:1) --- */
  --color-sage-cta: #627052;                    /* Hue 87.4deg, L 38%: 5.33:1 vs #fff */
  --color-sage-cta-hover: #535e45;              /* Hue 87.4deg, L 32%: 6.88:1 vs #fff */
  --color-sage-ink: #535e45;                    /* 6.55:1 on cream, 4.85:1 on peach */
  --color-sage-num: #627052;                    /* 5.33:1 on #fff */
  --color-text-primary: var(--color-forest);
  --color-text-muted: #5a5e57;                  /* 6.30:1 on cream, 6.62:1 on #fff */
  --color-text-peach-sub: rgb(48 55 47 / 0.86); /* > 6.2:1 on peach */
  --color-footer-body: rgb(251 249 246 / 0.80); /* 6.91:1 on #394438 */
  --color-footer-muted: rgb(251 249 246 / 0.78); /* 6.10:1 on footer card */
  --color-footer-legal: rgb(251 249 246 / 0.72); /* 5.95:1 on #394438 */

  /* --- Surfaces & Borders --- */
  --surface-peach-gradient: linear-gradient(
    135deg,
    rgb(234 197 171 / 0.72) 0%,
    rgb(234 197 171 / 0.42) 100%
  );
  --surface-sage-tint: rgb(141 157 122 / 0.12);
  --surface-footer-card: rgb(251 249 246 / 0.06);
  --surface-glass-note: rgb(251 249 246 / 0.94);
  --surface-glass-header: rgb(251 249 246 / 0.95);
  --progress-bar-fill: rgb(98 112 82 / 0.58);

  --border-card: rgb(178 154 110 / 0.34);
  --border-card-hover: rgb(141 157 122 / 0.52);
  --border-monogram: rgb(141 157 122 / 0.52);
  --border-glass-note: rgb(255 255 255 / 0.65);
  --border-glass-header: rgb(169 144 98 / 0.22);
  --border-footer-subtle: rgb(251 249 246 / 0.14);
  --border-footer-pill: rgb(251 249 246 / 0.24);

  --gradient-hairline-left: linear-gradient(
    90deg,
    var(--color-gold-deep) 0%,
    var(--color-gold-soft) 48%,
    rgb(215 198 163 / 0) 100%
  );
  --gradient-hairline-center: linear-gradient(
    90deg,
    rgb(169 144 98 / 0) 0%,
    var(--color-gold-mid) 45%,
    rgb(169 144 98 / 0) 100%
  );
  --gradient-portrait-glaze: linear-gradient(
    180deg,
    rgb(234 197 171 / 0.04) 0%,
    rgb(141 157 122 / 0.10) 56%,
    rgb(57 68 56 / 0.24) 100%
  );

  /* --- Typography --- */
  --font-display: "Boska", "Boska Placeholder", Georgia, serif;
  --font-sans: "Cabin Condensed", "Cabin Condensed Placeholder", system-ui, -apple-system, sans-serif;

  /* Fluid scale in rem (max/min <= 2.5 to preserve WCAG 1.4.4 200% zoom) */
  --text-hero: clamp(2.0625rem, 1.3rem + 2.15vw, 3.625rem);
  --text-h2: clamp(1.875rem, 1.3rem + 1.9vw, 3.25rem);
  --text-h2-footer: clamp(1.75rem, 1.4rem + 1.1vw, 2.375rem);
  --text-h3: clamp(1.5rem, 1.25rem + 0.75vw, 2rem);
  --text-lead: clamp(1.0625rem, 1rem + 0.25vw, 1.1875rem);
  --text-body: clamp(1rem, 0.96rem + 0.18vw, 1.125rem);
  --text-title-sm: 1.0625rem;
  --text-cta: 1rem;
  --text-meta: 0.9375rem;
  --text-caption: 0.875rem;
  --text-eyebrow: clamp(0.75rem, 0.72rem + 0.12vw, 0.875rem);

  --leading-hero: 1.05;
  --leading-display: 1.08;
  --leading-heading: 1.15;
  --leading-snug: 1.32;
  --leading-body: 1.6;

  /* --- 8pt Spacing Scale --- */
  --space-1: 0.25rem;   /*  4px */
  --space-2: 0.5rem;    /*  8px */
  --space-3: 0.75rem;   /* 12px */
  --space-4: 1rem;      /* 16px */
  --space-5: 1.25rem;   /* 20px */
  --space-6: 1.5rem;    /* 24px */
  --space-7: 2rem;      /* 32px */
  --space-8: 2.5rem;    /* 40px */
  --space-9: 3rem;      /* 48px */
  --space-10: 4rem;     /* 64px */
  --space-11: 5rem;     /* 80px */
  --space-12: 7rem;     /* 112px */

  --container-max: 75rem; /* 1200px */
  --section-px: clamp(1.25rem, 4vw, 4rem);
  --section-py: clamp(3.5rem, 6.5vw, 7rem);
  --header-offset: 5.25rem;

  /* --- Border Radii --- */
  --radius-icon: 1.125rem;
  --radius-note: 1.25rem;
  --radius-card: 1.75rem;
  --radius-portrait: 2.25rem 2.25rem 9.75rem 2.25rem;
  --radius-portrait-mobile: 1.75rem 1.75rem 6.25rem 1.75rem;
  --radius-pill: 999px;

  /* --- Restraint-First Editorial Shadows --- */
  --shadow-card:
    0 12px 32px -16px rgb(48 55 47 / 0.14),
    0 2px 6px -2px rgb(48 55 47 / 0.06);
  --shadow-card-hover:
    0 20px 44px -18px rgb(48 55 47 / 0.18),
    0 4px 10px -2px rgb(48 55 47 / 0.08);
  --shadow-portrait:
    0 4px 12px rgb(42 37 29 / 0.06),
    0 20px 44px -12px rgb(42 37 29 / 0.12),
    0 40px 80px -24px rgb(74 86 67 / 0.10);
  --shadow-portrait-hover:
    0 6px 18px rgb(42 37 29 / 0.08),
    0 28px 56px -14px rgb(42 37 29 / 0.15),
    0 48px 96px -28px rgb(74 86 67 / 0.13);
  --shadow-note-glass:
    0 10px 30px -8px rgb(42 37 29 / 0.12),
    0 2px 6px rgb(42 37 29 / 0.04);
  --shadow-cta: 0 10px 24px -12px rgb(48 55 47 / 0.34);
  --shadow-header: 0 10px 28px -18px rgb(48 55 47 / 0.18);

  /* --- About Section Refined Tokens --- */
  --surface-note-glass: rgb(252 251 248 / 0.84);
  --border-note-glass: rgb(255 255 255 / 0.78);
  --border-frame-arch: rgb(196 169 132 / 0.40);
  --border-frame-arch-hover: rgb(196 169 132 / 0.65);
  --glow-portrait-ambient: radial-gradient(
    ellipse 70% 60% at 50% 45%,
    rgb(196 169 132 / 0.12) 0%,
    rgb(196 169 132 / 0) 70%
  );
  --gradient-hairline-about: linear-gradient(
    90deg,
    rgb(196 169 132 / 0.75) 0%,
    rgb(196 169 132 / 0.15) 75%,
    transparent 100%
  );
  --color-quote-accent: #9b8970;
  --color-pillar-hover-bg: rgb(196 169 132 / 0.07);
  --color-pillar-line: #5c6b53;
  --color-pillar-num-active: #4a5643;

  /* --- Motion Design Tokens (Heavy Paper & Silk Physics) --- */
  --ease-editorial: cubic-bezier(0.22, 1, 0.36, 1);
  --ease-tactile: cubic-bezier(0.16, 1, 0.3, 1);
  --dur-fast: 240ms;
  --dur-accordion: 420ms;
  --dur-base: 550ms;
  --dur-slow: 900ms;
  --stagger-step: 80ms;

  --focus-ring-dark: var(--color-forest);
  --focus-ring-light: var(--color-cream);
}
