/* =========================================================
   BASE — reset + body + a11y + typography defaults
   ========================================================= */

*, *::before, *::after { box-sizing: border-box; }

html {
  scroll-behavior: smooth;
  scroll-padding-top: 88px;
  -webkit-text-size-adjust: 100%;
  text-rendering: optimizeLegibility;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
    scroll-behavior: auto !important;
  }
}

body {
  margin: 0;
  font-family: var(--font-body);
  font-weight: 400;
  font-size: var(--step-0);
  line-height: 1.6;
  color: var(--fg);
  background: var(--bg);
  font-feature-settings: 'kern' 1, 'liga' 1, 'calt' 1;
  overflow-x: hidden;
  min-height: 100vh;
  position: relative;
}

/* Cormorant fine-tuning: oldstyle figures, contextual ligatures */
.hero__title, h1, h2, h3,
.essence__quote, .essence__quote-2,
.contact-close__title,
.conceito__tagline,
.suite__note, .timeline__note, .atendimento__note, .decifrador__note,
.faq-item summary {
  font-feature-settings: 'kern' 1, 'liga' 1, 'dlig' 1, 'onum' 1, 'ss01' 1;
}

::selection { background: var(--deep-2); color: var(--deep-12); }

/* Headings (default — sections override) */
h1, h2, h3, h4, h5, h6 {
  margin: 0;
  font-family: var(--font-display);
  font-weight: 400;
  color: var(--fg-display);
  letter-spacing: -0.012em;
  line-height: 1.1;
}

h1 em, h2 em, h3 em {
  font-style: italic;
  color: var(--accent);
}

p { margin: 0 0 var(--space-s) 0; max-width: var(--measure); }
p:last-child { margin-bottom: 0; }

/* Links */
a {
  color: var(--accent);
  text-decoration: none;
  text-underline-offset: 4px;
  text-decoration-thickness: 1px;
  transition: color var(--dur-base) var(--ease-out-soft),
              background-color var(--dur-base) var(--ease-out-soft);
}
a:hover { color: var(--deep-11); text-decoration: underline; }

/* Lists */
ul, ol { margin: 0; padding: 0; }
ul { list-style: none; }

/* Images */
img, svg, video {
  max-width: 100%;
  height: auto;
  display: block;
}

/* Buttons reset */
button {
  font-family: inherit;
  cursor: pointer;
  background: none;
  border: 0;
  color: inherit;
  padding: 0;
}

/* Focus */
:focus { outline: none; }
:focus-visible {
  outline: none;
  box-shadow: var(--ring-focus);
  border-radius: var(--r-xs);
}

/* Skip link */
.skip-link {
  position: absolute;
  top: -100px;
  left: 0;
  background: var(--deep-9);
  color: var(--cream-50);
  padding: var(--space-s) var(--space-m);
  z-index: var(--z-skip);
  font-weight: 600;
  border-radius: 0 0 var(--r-s) 0;
  transition: top var(--dur-base) var(--ease-out-soft);
}
.skip-link:focus,
.skip-link:focus-visible {
  top: 0;
  color: var(--cream-50);
  text-decoration: none;
}

/* Container */
.container {
  width: 100%;
  max-width: var(--container);
  margin: 0 auto;
  padding-inline: var(--gutter);
}
.container--wide   { max-width: var(--container-wide); }
.container--narrow { max-width: var(--container-narrow); }

/* Section base */
.section {
  padding-block: var(--section-y);
  position: relative;
}

/* Eyebrow (label small caps mono) */
.eyebrow {
  font-family: var(--font-mono);
  font-size: var(--step--2);
  font-weight: 500;
  text-transform: uppercase;
  letter-spacing: 0.14em;
  color: var(--fg-muted);
  display: inline-block;
  margin-bottom: var(--space-s);
}

/* Display title */
.display {
  font-family: var(--font-display);
  font-weight: 400;
  font-size: var(--step-7);
  line-height: 0.96;
  letter-spacing: -0.012em;
  color: var(--fg-display);
}

.display em { font-style: italic; color: var(--accent); }

/* Lede */
.lede {
  font-size: var(--step-1);
  line-height: 1.55;
  color: var(--fg-muted);
  max-width: var(--measure);
}

/* Meta line (mono) */
.meta-line {
  font-family: var(--font-mono);
  font-size: var(--step--2);
  font-weight: 500;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  color: var(--fg-faint);
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-2xs);
  align-items: center;
}
.meta-line__sep { opacity: 0.45; }

/* Visually hidden */
.sr-only {
  position: absolute !important;
  width: 1px; height: 1px;
  padding: 0; margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

/* Scroll progress bar */
.scroll-progress {
  position: fixed;
  top: 0; left: 0;
  width: 100%;
  height: 2px;
  background: transparent;
  z-index: calc(var(--z-nav) - 1);
  pointer-events: none;
}
.scroll-progress__bar {
  height: 100%;
  width: 0%;
  background: linear-gradient(90deg, var(--deep-9), var(--teal-9), var(--sage-8));
  transition: width 80ms linear;
}

/* Grain overlay */
.grain-overlay {
  position: fixed;
  inset: 0;
  width: 100vw;
  height: 100vh;
  pointer-events: none;
  z-index: var(--z-grain);
  opacity: 0.04;
  mix-blend-mode: multiply;
}

/* Watermark child silhouette (used in 3 sections) */
.child-watermark {
  position: absolute;
  pointer-events: none;
  color: var(--sage-8);
  opacity: 0.07;
  z-index: 0;
}

/* Body content above grain/watermarks */
main, header, footer { position: relative; z-index: var(--z-content); }

/* Custom cursor (desktop only) */
@media (hover: hover) and (pointer: fine) {
  .has-custom-cursor *,
  .has-custom-cursor a,
  .has-custom-cursor button { cursor: none !important; }
  body.has-custom-cursor { cursor: none; }
}
.cursor-dot,
.cursor-ring {
  position: fixed;
  top: 0; left: 0;
  pointer-events: none;
  z-index: var(--z-cursor);
  border-radius: 50%;
  transform: translate(-50%, -50%);
  mix-blend-mode: multiply;
}
.cursor-dot {
  width: 6px; height: 6px;
  background: var(--deep-9);
  transition: transform 60ms var(--ease-out-soft);
}
.cursor-ring {
  width: 32px; height: 32px;
  border: 1px solid var(--deep-9);
  transition: width var(--dur-base) var(--ease-spring),
              height var(--dur-base) var(--ease-spring),
              transform 200ms var(--ease-out-soft);
}
.cursor-ring.is-magnetic {
  width: 56px; height: 56px;
  background: var(--deep-1);
  border-color: var(--deep-9);
}
@media (max-width: 1023px) { .cursor-dot, .cursor-ring { display: none; } }
@media (prefers-reduced-motion: reduce) { .cursor-dot, .cursor-ring { display: none; } }
