/* ============================================================
   MARIA BRASIL — foundation
   Built on the Auris type system (Essence). White background,
   centered layout, a single trace of rose/wine as accent.
   Type: Neue Haas Grotesk Display (Bold 700 / Roman 400 only)
         · Instrument Serif (italic accent) · JetBrains Mono (labels)
   ============================================================ */

@font-face {
  font-family: "Neue Haas Grotesk Display";
  font-weight: 400; font-style: normal; font-display: swap;
  src: url("nhg-roman.woff2") format("woff2"), url("nhg-roman.woff") format("woff");
}
@font-face {
  font-family: "Neue Haas Grotesk Display";
  font-weight: 700; font-style: normal; font-display: swap;
  src: url("nhg-bold.woff2") format("woff2"), url("nhg-bold.woff") format("woff");
}

:root {
  --bg:        #FFFFFF;     /* white page */
  --bg-soft:   #F6F3EF;     /* subtle warm panel */
  --ink:       #15120F;     /* near-black text */
  --ink-dim:   #5C554D;     /* secondary */
  --ink-faint: #938B82;     /* tertiary / labels */

  --accent:      #C13C66;   /* rose/wine — pulled a touch more toward rose */
  --accent-soft: #D9708F;   /* lighter rose */

  --line:        rgba(21,18,15,0.12);
  --line-strong: rgba(21,18,15,0.22);

  --font-sans:  "Neue Haas Grotesk Display", "Neue Haas Grotesk", "Helvetica Neue", Helvetica, Arial, sans-serif;
  --font-serif: "Instrument Serif", Georgia, serif;
  --font-mono:  "JetBrains Mono", ui-monospace, "SF Mono", Menlo, monospace;

  --maxw: 1120px;
  --gutter: clamp(22px, 5vw, 72px);
  --section-pad: clamp(80px, 12vh, 168px);

  --fs-eyebrow: clamp(11px, 0.78vw, 13px);
  --fs-body:    clamp(16px, 1.12vw, 19px);
  --fs-lead:    clamp(20px, 1.7vw, 28px);
  --fs-h3:      clamp(22px, 2.1vw, 32px);
  --fs-h2:      clamp(30px, 4.2vw, 60px);
  --fs-display: clamp(40px, 5.4vw, 82px);
}

*, *::before, *::after { box-sizing: border-box; }
* { margin: 0; padding: 0; }
html { -webkit-font-smoothing: antialiased; text-rendering: optimizeLegibility; scroll-behavior: smooth; }
body {
  font-family: var(--font-sans);
  background: var(--bg);
  color: var(--ink);
  font-size: var(--fs-body);
  line-height: 1.55;
  font-weight: 400;
  letter-spacing: -0.01em;
  overflow-x: hidden;
}
::selection { background: var(--accent); color: #fff; }
img { max-width: 100%; display: block; }
a { color: inherit; text-decoration: none; }

/* ---- primitives (all centered) ---- */
.wrap { width: 100%; max-width: var(--maxw); margin-inline: auto; padding-inline: var(--gutter); }
.section { padding-block: var(--section-pad); text-align: center; }
.section--soft { background: var(--bg-soft); }

.eyebrow {
  font-family: var(--font-mono);
  font-size: var(--fs-eyebrow);
  letter-spacing: 0.3em;
  text-transform: uppercase;
  color: var(--accent);
  font-weight: 400;
  display: block;
}

/* accent words — Neue Haas heavy with a rose gradient (Essence-style) */
.serif {
  font-family: var(--font-sans);
  font-weight: 700;
  font-style: normal;
  letter-spacing: -0.02em;
  background: linear-gradient(96deg, var(--accent) 0%, var(--accent-soft) 64%, var(--accent-glow, var(--accent-soft)) 100%);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
  color: var(--accent); /* fallback if clip unsupported */
}

h1, h2, h3 { font-weight: 700; letter-spacing: -0.03em; line-height: 1.04; text-wrap: balance; }
h1 { font-size: var(--fs-display); line-height: 1.0; }
h2 { font-size: var(--fs-h2); }
h3 { font-size: var(--fs-h3); }

.lead { font-size: var(--fs-lead); line-height: 1.4; color: var(--ink); font-weight: 400; letter-spacing: -0.015em; text-wrap: pretty; }
.muted { color: var(--ink-dim); }
.measure { max-width: 64ch; margin-inline: auto; }
.measure-narrow { max-width: 48ch; margin-inline: auto; }

a.inline { color: var(--accent); border-bottom: 1px solid color-mix(in oklab, var(--accent) 40%, transparent); transition: border-color .2s; }
a.inline:hover { border-color: var(--accent); }

/* ---- buttons ---- */
.btn {
  font-family: var(--font-sans);
  font-size: clamp(15px, 1.05vw, 17px);
  font-weight: 400; letter-spacing: -0.01em; border: none; cursor: pointer;
  padding: 0.9em 1.7em; border-radius: 100px;
  display: inline-flex; align-items: center; gap: 0.6em;
  transition: transform .35s cubic-bezier(.2,.8,.2,1), background .3s, box-shadow .3s, color .3s;
}
.btn-primary { background: var(--accent); color: #fff; }
.btn-primary:hover { transform: translateY(-2px); box-shadow: 0 12px 38px color-mix(in oklab, var(--accent) 32%, transparent); }
.btn-ghost { background: transparent; color: var(--ink); box-shadow: inset 0 0 0 1px var(--line-strong); }
.btn-ghost:hover { box-shadow: inset 0 0 0 1px var(--accent); color: var(--accent); transform: translateY(-2px); }
.btn .arrow { transition: transform .35s cubic-bezier(.2,.8,.2,1); }
.btn:hover .arrow { transform: translateX(4px); }

/* ---- reveal ---- */
.reveal { opacity: 1; transform: none; transition: opacity .8s cubic-bezier(.2,.7,.2,1), transform .8s cubic-bezier(.2,.7,.2,1); }
html.js .reveal:not(.in):not(.shown) { opacity: 0; transform: translateY(28px); }
.reveal.in { opacity: 1; transform: none; }
.reveal.shown { opacity: 1 !important; transform: none !important; transition: none !important; }
.reveal[data-d="1"] { transition-delay: .08s; }
.reveal[data-d="2"] { transition-delay: .16s; }
.reveal[data-d="3"] { transition-delay: .24s; }
@media (prefers-reduced-motion: reduce) { .reveal { opacity: 1; transform: none; transition: none; } }

/* ---- image-slot placeholder skin (light) ---- */
image-slot {
  --is-placeholder-bg: var(--bg-soft);
  --is-placeholder-fg: var(--ink-faint);
  background: var(--bg-soft);
  border: 1px solid var(--line);
}

/* ============================================================
   ATMOSPHERE — scroll progress, cursor glow, grain
   ============================================================ */
.scroll-progress {
  position: fixed; top: 0; left: 0; height: 3px; width: 0%;
  background: linear-gradient(90deg, var(--accent), var(--accent-soft));
  z-index: 200; pointer-events: none;
  transition: width .12s linear;
}
/* organic, slow-drifting soft aura (Essence-style) — not a hard circle */
.cursor-glow {
  position: fixed; top: 0; left: 0; width: 640px; height: 640px;
  margin: -320px 0 0 -320px; pointer-events: none; z-index: 5; opacity: 0;
  background: radial-gradient(closest-side,
    color-mix(in oklab, var(--accent) 30%, transparent) 0%,
    color-mix(in oklab, var(--accent-soft) 16%, transparent) 42%,
    transparent 72%);
  filter: blur(36px);
  border-radius: 47% 53% 60% 40% / 55% 45% 55% 45%;
  mix-blend-mode: multiply; transition: opacity 1.1s ease;
  will-change: transform;
  animation: auraMorph 14s ease-in-out infinite;
}
@keyframes auraMorph {
  0%,100% { border-radius: 47% 53% 60% 40% / 55% 45% 55% 45%; }
  33%     { border-radius: 60% 40% 45% 55% / 45% 60% 40% 55%; }
  66%     { border-radius: 42% 58% 52% 48% / 60% 42% 58% 40%; }
}
.grain {
  position: fixed; inset: 0; z-index: 60; pointer-events: none; opacity: 0.04;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='160' height='160'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.85' numOctaves='2' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
}
@media (hover: none) { .cursor-glow { display: none; } }

/* ============================================================
   KINETIC TYPE
   ============================================================ */
/* scroll-lit reading text: words dim, brighten as they pass the focal band */
.read .w { opacity: 0.16; transition: opacity .18s linear; }
html:not(.js) .read .w { opacity: 1; }

/* hero headline: ALWAYS visible; entrance animates the whole line (never hides words if it doesn't run) */
.kinetic-h .w { opacity: 1; filter: none; }
.kinetic-h.lit { animation: heroFade 1s cubic-bezier(.2,.7,.2,1); }
@keyframes heroFade { from { opacity: 0; transform: translateY(18px); } to { opacity: 1; transform: none; } }

@media (prefers-reduced-motion: reduce) {
  .read .w { opacity: 1 !important; }
  .kinetic-h.lit { animation: none; }
  .scroll-progress, .cursor-glow { display: none; }
}
