/* =========================================================================
   Hiperfocadas — Design Tokens
   Import once at the top of every artifact: <link rel="stylesheet" href="...">
   ========================================================================= */

@import url('https://fonts.googleapis.com/css2?family=Fraunces:opsz,wght,SOFT,WONK@9..144,200..900,0..100,0..1&family=Inter:wght@400;500;600;700&display=swap');

:root {
  /* ----- BRAND COLORS (raw) ------------------------------------------------ */
  --terracota: #D4A28C;       /* cor-âncora / hug color */
  --terracota-deep: #B8826A;  /* hover/press for terracota surfaces */
  --terracota-soft: #E8C7B5;  /* tints, subtle backgrounds */

  --areia: #F2EAE0;           /* default background — sand */
  --areia-claro: #F8F2EA;     /* cards on areia */
  --areia-escuro: #EDE3D7;    /* hover on areia surfaces */

  --musgo: #4A5D4F;           /* the brand "black" — moss green */
  --musgo-deep: #2A3530;      /* dark mode bg, ultra-strong text */
  --musgo-soft: #6B7D70;      /* secondary text */

  --lavanda: #B5A9C4;         /* links, special states */
  --lavanda-deep: #948AA6;    /* hover for lavanda */
  --lavanda-soft: #D6CFE0;    /* very subtle accents */

  --mostarda: #C99A4D;        /* signature accent — use sparingly */
  --mostarda-deep: #A87E36;   /* hover/press */

  --carvao: #3A3A3A;          /* body text small — softer than pure black */
  --carvao-soft: #6E6E6E;     /* metadata, captions */

  /* ----- ALPHAS (for borders, overlays, washes) --------------------------- */
  --musgo-04: rgba(74, 93, 79, 0.04);
  --musgo-08: rgba(74, 93, 79, 0.08);
  --musgo-12: rgba(74, 93, 79, 0.12);
  --musgo-24: rgba(74, 93, 79, 0.24);
  --musgo-60: rgba(74, 93, 79, 0.60);

  --lavanda-30: rgba(181, 169, 196, 0.30);
  --lavanda-60: rgba(181, 169, 196, 0.60);

  --terracota-30: rgba(212, 162, 140, 0.30);

  /* ----- SEMANTIC ROLES --------------------------------------------------- */
  --bg: var(--areia);
  --bg-elevated: var(--areia-claro);
  --bg-hover: var(--areia-escuro);

  --fg: var(--musgo);             /* primary text */
  --fg-secondary: var(--carvao);  /* body text */
  --fg-tertiary: var(--carvao-soft);
  --fg-on-terracota: var(--musgo);
  --fg-on-musgo: var(--areia);

  --link: var(--lavanda-deep);
  --accent: var(--mostarda);
  --accent-deep: var(--mostarda-deep);

  --border: var(--musgo-12);
  --border-strong: var(--musgo-24);
  --divider: var(--lavanda-30);

  --focus-ring: var(--lavanda);

  /* ----- TYPOGRAPHY ------------------------------------------------------- */
  --font-display: "Fraunces", "Cormorant Garamond", Georgia, serif;
  --font-body: "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", system-ui, sans-serif;
  --font-mono: "JetBrains Mono", "SF Mono", ui-monospace, monospace;

  /* Type scale (modular, ~1.25 ratio with breathing) */
  --fs-display-xl: 72px;   /* hero, one-of-a-kind */
  --fs-display-lg: 56px;   /* page hero */
  --fs-display-md: 40px;
  --fs-display-sm: 32px;

  --fs-h1: 36px;
  --fs-h2: 28px;
  --fs-h3: 22px;
  --fs-h4: 18px;

  --fs-body-lg: 18px;
  --fs-body: 16px;       /* min on web — accessibility */
  --fs-body-sm: 14px;
  --fs-caption: 13px;

  /* Line heights — generous, breathing */
  --lh-display: 1.05;
  --lh-heading: 1.2;
  --lh-body: 1.6;
  --lh-tight: 1.4;

  /* Letter spacing */
  --ls-display: -0.01em;   /* slight tighten on big display */
  --ls-heading: 0;
  --ls-body: 0;
  --ls-caption: 0.02em;    /* slight open on tiny text */

  /* ----- SPACING (8-base) ------------------------------------------------- */
  --space-1: 4px;
  --space-2: 8px;
  --space-3: 12px;
  --space-4: 16px;
  --space-5: 24px;
  --space-6: 32px;
  --space-7: 48px;
  --space-8: 64px;
  --space-9: 96px;
  --space-10: 128px;

  /* ----- RADII ------------------------------------------------------------ */
  --radius-xs: 4px;     /* tiny — chips, tags only */
  --radius-sm: 8px;     /* inputs */
  --radius-md: 12px;    /* images, secondary cards */
  --radius-lg: 16px;    /* default card */
  --radius-xl: 24px;    /* buttons, hero blocks */
  --radius-2xl: 32px;   /* big modal corners */
  --radius-pill: 999px; /* full pill */

  /* ----- SHADOWS (warm-neutral, never blue-tinted) ------------------------ */
  --shadow-sm: 0 1px 2px rgba(74, 93, 79, 0.06), 0 1px 1px rgba(74, 93, 79, 0.04);
  --shadow-md: 0 4px 12px rgba(74, 93, 79, 0.08), 0 2px 4px rgba(74, 93, 79, 0.04);
  --shadow-lg: 0 12px 32px rgba(74, 93, 79, 0.10), 0 4px 8px rgba(74, 93, 79, 0.05);
  --shadow-xl: 0 24px 64px rgba(74, 93, 79, 0.12), 0 8px 16px rgba(74, 93, 79, 0.06);

  /* ----- MOTION ----------------------------------------------------------- */
  --ease-out: cubic-bezier(0.22, 1, 0.36, 1);     /* default — calm */
  --ease-in-out: cubic-bezier(0.65, 0, 0.35, 1);
  --dur-fast: 200ms;
  --dur-base: 350ms;
  --dur-slow: 600ms;
  --dur-hover: 250ms;

  /* ----- LAYOUT ----------------------------------------------------------- */
  --content-max: 1200px;
  --reading-max: 680px;
  --touch-min: 44px;
}

/* =========================================================================
   DARK MODE
   ========================================================================= */
@media (prefers-color-scheme: dark) {
  :root {
    --bg: var(--musgo-deep);
    --bg-elevated: #34403B;
    --bg-hover: #3D4943;

    --fg: var(--areia);
    --fg-secondary: #DCD3C7;
    --fg-tertiary: #A89D90;
    --fg-on-musgo: var(--areia);

    --border: rgba(242, 234, 224, 0.10);
    --border-strong: rgba(242, 234, 224, 0.20);
  }
}

[data-theme="dark"] {
  --bg: var(--musgo-deep);
  --bg-elevated: #34403B;
  --bg-hover: #3D4943;
  --fg: var(--areia);
  --fg-secondary: #DCD3C7;
  --fg-tertiary: #A89D90;
  --border: rgba(242, 234, 224, 0.10);
  --border-strong: rgba(242, 234, 224, 0.20);
}

/* =========================================================================
   BASE — applied via classes; do not auto-apply to body so artifacts can opt in
   ========================================================================= */
.hf-base,
body.hf-base {
  background: var(--bg);
  color: var(--fg-secondary);
  font-family: var(--font-body);
  font-size: var(--fs-body);
  line-height: var(--lh-body);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  font-feature-settings: "cv11", "ss03";
}

/* =========================================================================
   SEMANTIC TYPE — pair-friendly classes; use on real elements
   Always lowercase content. Never UPPERCASE.
   ========================================================================= */
.hf-display-xl,
.hf-display-lg,
.hf-display-md,
.hf-display-sm,
.hf-h1,
.hf-h2,
.hf-h3,
.hf-h4 {
  font-family: var(--font-display);
  color: var(--fg);
  letter-spacing: var(--ls-display);
  font-weight: 400;
  text-wrap: balance;
}

.hf-display-xl { font-size: var(--fs-display-xl); line-height: var(--lh-display); font-weight: 300; }
.hf-display-lg { font-size: var(--fs-display-lg); line-height: var(--lh-display); font-weight: 300; }
.hf-display-md { font-size: var(--fs-display-md); line-height: var(--lh-display); }
.hf-display-sm { font-size: var(--fs-display-sm); line-height: var(--lh-heading); }

.hf-h1 { font-size: var(--fs-h1); line-height: var(--lh-heading); }
.hf-h2 { font-size: var(--fs-h2); line-height: var(--lh-heading); }
.hf-h3 { font-size: var(--fs-h3); line-height: var(--lh-heading); }
.hf-h4 { font-size: var(--fs-h4); line-height: var(--lh-tight); }

.hf-subtitle {
  font-family: var(--font-body);
  font-weight: 600;
  font-size: var(--fs-body-lg);
  color: var(--fg);
  line-height: var(--lh-tight);
}

.hf-body-lg { font-size: var(--fs-body-lg); line-height: var(--lh-body); color: var(--fg-secondary); text-wrap: pretty; }
.hf-body    { font-size: var(--fs-body);    line-height: var(--lh-body); color: var(--fg-secondary); text-wrap: pretty; }
.hf-body-sm { font-size: var(--fs-body-sm); line-height: var(--lh-body); color: var(--fg-secondary); }

.hf-caption {
  font-size: var(--fs-caption);
  line-height: var(--lh-tight);
  letter-spacing: var(--ls-caption);
  color: var(--fg-tertiary);
}

.hf-eyebrow {
  font-family: var(--font-body);
  font-size: var(--fs-caption);
  font-weight: 500;
  letter-spacing: 0.08em;
  text-transform: lowercase;  /* never uppercase */
  color: var(--mostarda);
}

.hf-link {
  color: var(--link);
  text-decoration-color: var(--lavanda-30);
  text-decoration-thickness: 1px;
  text-underline-offset: 3px;
  transition: text-decoration-color var(--dur-hover) var(--ease-out);
}
.hf-link:hover { text-decoration-color: var(--lavanda); }

/* =========================================================================
   UTILITIES — small set, often used
   ========================================================================= */
.hf-star::before {
  content: "✶";
  color: var(--mostarda);
  margin-right: 0.4em;
  font-size: 0.85em;
  vertical-align: 0.05em;
}

.hf-divider {
  height: 1px;
  background: var(--divider);
  border: 0;
  margin: var(--space-6) 0;
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.001ms !important;
    transition-duration: 150ms !important;
  }
}
