/* =========================================================================
   SKULD — Sistema de estilos (fundação)
   Sistema visual: Sakura Hybrid (light + dark) · fiel à papelaria da marca.
   Tipografia: Gelasio (títulos, serif) + Inter (corpo/marca, sans).
   Motion: diretrizes Emil Kowalski — só transform/opacity, <300ms, reveal 600ms.
   ========================================================================= */

:root {
  /* ---- Cor (paleta Sakura Hybrid) ---- */
  --base: #151018;          /* Base Profunda — presença, controle */
  --base-900: #201827;      /* painel dark */
  --plum: #6f5e86;          /* Plum Estrutural — assinatura, sistema */
  --plum-deep: #443659;     /* Plum profundo — monograma/ícone/selo */
  --plum-light: #8a7aa6;    /* Plum Claro — apoio, tagline */
  --rose: #d9b8a6;          /* Rose Editorial — calor, filetes */
  --rose-bridge: #ead1dc;   /* Rose ponte */
  --ink: #564c5f;           /* Ink secundário — metadados */
  --ink-900: #261f29;       /* texto escuro forte */
  --pearl: #f7f3f5;         /* Pearl Paper — respiro, fundo */
  --pearl-muted: #f1e8ee;   /* fundo muted */
  --body: #1a1a1a;          /* corpo de leitura */
  --grifo: #c00000;         /* Vermelho Grifo — destaque manual, uso raríssimo */

  --line-dark: rgba(255, 255, 255, 0.12);
  --line-light: rgba(38, 31, 41, 0.12);

  --shadow-dark: 0 24px 80px rgba(10, 7, 12, 0.35);
  --shadow-light: 0 20px 60px rgba(47, 36, 58, 0.1);

  /* ---- Tipografia ---- */
  --font-serif: "Gelasio", "Baskerville Old Face", "Palatino Linotype", "Book Antiqua", Georgia, serif;
  --font-sans: "Inter", "Aptos", "Segoe UI", "Helvetica Neue", Arial, sans-serif;

  /* ---- Motion (curvas e durações Emil) ---- */
  --ease-out: cubic-bezier(0.23, 1, 0.32, 1);
  --ease-in-out: cubic-bezier(0.77, 0, 0.175, 1);
  --ease-elegant: cubic-bezier(0.32, 0.72, 0, 1);
  --dur-fast: 160ms;
  --dur-ui: 220ms;
  --dur-reveal: 600ms;

  /* ---- Layout ---- */
  --container: min(72rem, calc(100% - 2.5rem));
  --measure: 42.5rem;
  --radius: 16px;
  --radius-sm: 10px;
}

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

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  font-family: var(--font-sans);
  font-optical-sizing: auto;
  background: var(--pearl);
  color: var(--ink-900);
  line-height: 1.6;
  letter-spacing: -0.006em;
  text-rendering: optimizeLegibility;
  -webkit-font-smoothing: antialiased;
}

img {
  max-width: 100%;
  display: block;
}

a {
  color: inherit;
  text-decoration: none;
}

button,
input,
textarea,
select {
  font: inherit;
}

::selection {
  background: rgba(217, 184, 166, 0.35);
}

/* Foco visível consistente (acessibilidade) */
:focus-visible {
  outline: 2px solid var(--plum);
  outline-offset: 3px;
  border-radius: 4px;
}

.section--dark :focus-visible {
  outline-color: var(--rose);
}

/* Skip link — pular para o conteúdo (acessibilidade) */
.skip-link {
  position: absolute;
  left: -999px;
  top: 0;
  z-index: 100;
  padding: 0.7rem 1rem;
  background: var(--base);
  color: var(--pearl);
  border-radius: 0 0 8px 0;
  font-weight: 600;
}

.skip-link:focus {
  left: 0;
}

/* =========================================================================
   Layout de seções
   ========================================================================= */

.shell {
  width: var(--container);
  margin: 0 auto;
}

.copy-block,
.section-head {
  max-width: var(--measure);
}

.section {
  position: relative;
  padding: clamp(4.5rem, 8vw, 7rem) 0;
  border-top: 1px solid var(--line-light);
}

.section--light {
  background:
    radial-gradient(circle at top right, rgba(217, 184, 166, 0.14), transparent 22rem),
    linear-gradient(180deg, rgba(255, 255, 255, 0.5), rgba(255, 255, 255, 0)),
    var(--pearl);
}

.section--muted {
  background:
    radial-gradient(circle at top left, rgba(111, 94, 134, 0.08), transparent 24rem),
    linear-gradient(180deg, rgba(234, 209, 220, 0.4), rgba(234, 209, 220, 0)),
    var(--pearl-muted);
}

.section--dark {
  color: var(--pearl);
  background:
    radial-gradient(circle at top left, rgba(217, 184, 166, 0.14), transparent 24rem),
    radial-gradient(circle at bottom right, rgba(111, 94, 134, 0.24), transparent 26rem),
    linear-gradient(180deg, var(--base-900) 0%, var(--base) 100%);
  border-top-color: var(--line-dark);
}

/* Textura de grid nas seções escuras (assinatura da papelaria) */
.section--dark::before,
.site-footer::before {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
  background-image:
    linear-gradient(var(--line-dark) 1px, transparent 1px),
    linear-gradient(90deg, var(--line-dark) 1px, transparent 1px);
  background-size: 4.5rem 4.5rem;
  opacity: 0.08;
}

/* =========================================================================
   Elementos-assinatura da marca
   ========================================================================= */

/* Barra vertical plum — acento estrutural na lateral da seção */
.section--bar::after {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  bottom: 0;
  width: 4px;
  background: linear-gradient(180deg, var(--plum), var(--plum-light));
}

/* Filete rosa em gradiente — divisor editorial */
.filete {
  height: 2px;
  border: 0;
  margin: 1.4rem 0;
  background: linear-gradient(90deg, var(--plum), var(--rose) 45%, transparent);
}

/* =========================================================================
   Logo — monograma SK (caixa) + wordmark + tagline
   ========================================================================= */

.brand {
  display: inline-flex;
  align-items: center;
  gap: 0.75rem;
}

.brand__text {
  display: flex;
  flex-direction: column;
  gap: 0.18rem;
  line-height: 1;
}

/* Wordmark: SKULD com a linha-assinatura sob o "KUL" (recorte da logo-mãe) */
.brand__word {
  display: inline-flex;
  font-family: var(--font-sans);
  font-weight: 600;
  font-size: 1.06rem;
  letter-spacing: 0.24em;
  text-indent: 0.24em;
  text-transform: uppercase;
  color: var(--ink-900);
}

.brand__word .mid {
  position: relative;
}

.brand__word .mid::after {
  content: "";
  position: absolute;
  left: 0.04em;
  right: 0.22em;
  bottom: -0.04em;
  height: 0.06em;
  background: currentColor;
}

.brand__meta {
  font-size: 0.62rem;
  font-weight: 600;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--plum);
}

.section--dark .brand__meta {
  color: var(--plum-light);
}

/* =========================================================================
   Tipografia
   ========================================================================= */

h1,
h2,
h3 {
  margin: 0;
}

h1,
.display-title {
  font-family: var(--font-serif);
  font-weight: 700;
  line-height: 0.98;
  letter-spacing: -0.03em;
}

h1 {
  font-size: clamp(3rem, 7vw, 5rem);
}

h2 {
  font-family: var(--font-serif);
  font-weight: 700;
  font-size: clamp(1.9rem, 4.6vw, 3rem);
  line-height: 1.03;
  letter-spacing: -0.025em;
  max-width: 18ch;
}

.display-title {
  font-size: clamp(2rem, 4.8vw, 3.2rem);
  letter-spacing: -0.035em;
}

h3 {
  font-family: var(--font-sans);
  font-weight: 600;
  font-size: 1.06rem;
  line-height: 1.25;
  letter-spacing: -0.01em;
}

p {
  margin: 0;
}

.eyebrow {
  margin: 0 0 1.1rem;
  font-family: var(--font-sans);
  font-size: 0.74rem;
  font-weight: 600;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--plum);
}

.section--dark .eyebrow {
  color: var(--rose);
}

.lead {
  margin-top: 1.3rem;
  font-size: clamp(1.02rem, 1.6vw, 1.18rem);
  max-width: 40ch;
  color: color-mix(in srgb, currentColor 82%, transparent);
}

.section-head {
  margin-bottom: 2.5rem;
}

.section-head p {
  margin-top: 1.2rem;
  color: color-mix(in srgb, currentColor 82%, transparent);
}

/* =========================================================================
   Labels, listas de painel
   ========================================================================= */

.panel-label,
.card-index,
.card-tag {
  display: inline-block;
  margin-bottom: 0.9rem;
  font-family: var(--font-sans);
  font-size: 0.72rem;
  font-weight: 600;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--plum);
}

.section--dark .panel-label,
.section--dark .card-index,
.section--dark .card-tag {
  color: var(--rose);
}

.panel-list,
.about-list {
  margin: 0;
  padding: 0;
  list-style: none;
}

.panel-list li,
.about-list li {
  padding: 0.9rem 0;
  border-top: 1px solid var(--line-light);
}

.section--dark .panel-list li,
.section--dark .about-list li {
  border-top-color: var(--line-dark);
}

.panel-list li:first-child,
.about-list li:first-child {
  border-top: 0;
  padding-top: 0;
}

/* =========================================================================
   Botões
   ========================================================================= */

.button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 3rem;
  padding: 0.85rem 1.4rem;
  border: 1px solid transparent;
  border-radius: 999px;
  font-family: var(--font-sans);
  font-weight: 600;
  font-size: 0.95rem;
  letter-spacing: -0.01em;
  text-align: center;
  cursor: pointer;
  background: linear-gradient(135deg, var(--rose) 0%, var(--rose-bridge) 100%);
  color: var(--ink-900);
  box-shadow: 0 14px 34px rgba(217, 184, 166, 0.2);
  transition:
    transform var(--dur-fast) var(--ease-out),
    box-shadow var(--dur-ui) var(--ease-out),
    background-color var(--dur-ui) var(--ease-out),
    border-color var(--dur-ui) var(--ease-out);
}

.button:active {
  transform: scale(0.97);
}

.button--secondary,
.button--ghost {
  background: transparent;
  border-color: currentColor;
  box-shadow: none;
  color: inherit;
}

@media (hover: hover) and (pointer: fine) {
  .button:hover {
    transform: translateY(-1px);
    box-shadow: 0 18px 40px rgba(217, 184, 166, 0.28);
  }

  .button--secondary:hover,
  .button--ghost:hover {
    background: color-mix(in srgb, currentColor 8%, transparent);
    transform: translateY(-1px);
  }
}

.button-row {
  display: flex;
  flex-wrap: wrap;
  gap: 0.85rem;
  margin-top: 1.9rem;
}

/* =========================================================================
   Header / navegação
   ========================================================================= */

.site-header {
  position: sticky;
  top: 0;
  z-index: 40;
  background: color-mix(in srgb, var(--pearl) 86%, transparent);
  backdrop-filter: blur(20px) saturate(180%);
  -webkit-backdrop-filter: blur(20px) saturate(180%);
  border-bottom: 1px solid var(--line-light);
}

.site-header__inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  min-height: 4.5rem;
}

.site-nav {
  display: none;
  align-items: center;
  gap: 1.5rem;
  font-family: var(--font-sans);
  font-weight: 500;
  font-size: 0.9rem;
  color: var(--ink);
}

.site-nav a {
  position: relative;
  transition: color var(--dur-ui) var(--ease-out);
}

@media (hover: hover) and (pointer: fine) {
  .site-nav a:hover {
    color: var(--ink-900);
  }
}

/* =========================================================================
   Cards genéricos (diagnóstico, serviços, outcomes, sobre, faq)
   ========================================================================= */

.card {
  position: relative;
  padding: 1.6rem;
  border: 1px solid var(--line-light);
  border-radius: var(--radius);
  background: rgba(255, 255, 255, 0.62);
  box-shadow: var(--shadow-light);
}

.section--dark .card {
  border-color: var(--line-dark);
  background: rgba(255, 255, 255, 0.045);
  box-shadow: var(--shadow-dark);
  backdrop-filter: blur(8px);
}

.card h3 {
  max-width: 20ch;
}

.card p {
  margin-top: 0.8rem;
  color: color-mix(in srgb, currentColor 82%, transparent);
}

.grid {
  display: grid;
  gap: 1.1rem;
}

/* Ícone em badge */
.icon-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 2.7rem;
  height: 2.7rem;
  margin-bottom: 1.1rem;
  border-radius: 0.85rem;
  background: rgba(111, 94, 134, 0.1);
  color: var(--plum);
}

.section--dark .icon-badge {
  background: rgba(217, 184, 166, 0.12);
  color: var(--rose);
}

.icon-badge svg {
  width: 1.5rem;
  height: 1.5rem;
  fill: currentColor;
}

/* =========================================================================
   Componentes de seção
   ========================================================================= */

/* Hero — Declaração (manifesto centrado, dark) */
.hero {
  min-height: calc(100vh - 4.5rem);
  display: flex;
  align-items: center;
  text-align: center;
  overflow: hidden;
}

.hero__wrap {
  max-width: 52rem;
  margin: 0 auto;
}

.hero .eyebrow {
  color: var(--rose);
}

.hero h1 {
  margin: 0 auto;
}

/* Logo-mãe (wordmark + ramo de sakura) como peça central do hero */
.hero__wordmark {
  display: block;
  width: min(640px, 82vw);
  height: auto;
  margin: 0 auto;
}

.hero__statement {
  margin: 1.7rem auto 0;
  max-width: 22ch;
  font-family: var(--font-serif);
  font-weight: 600;
  font-size: clamp(1.45rem, 3.2vw, 2.15rem);
  line-height: 1.1;
  letter-spacing: -0.03em;
  color: var(--pearl);
}

.hero .lead {
  margin: 1.5rem auto 0;
  max-width: 52ch;
  color: rgba(247, 243, 245, 0.82);
}

.hero .button-row {
  justify-content: center;
}

.hero__signature {
  margin-top: 2.4rem;
  font-size: 0.82rem;
  letter-spacing: 0.02em;
  color: rgba(247, 243, 245, 0.6);
}

/* Stagger sutil na entrada do hero */
.hero [data-reveal]:nth-child(2) { transition-delay: 0.06s; }
.hero [data-reveal]:nth-child(3) { transition-delay: 0.12s; }
.hero [data-reveal]:nth-child(4) { transition-delay: 0.18s; }
.hero [data-reveal]:nth-child(5) { transition-delay: 0.24s; }

/* Tese — pull quote editorial */
.tese__quote {
  margin: 2rem 0 0;
  padding-top: 1.6rem;
  border-top: 1px solid var(--line-light);
}

.tese__quote p {
  font-family: var(--font-serif);
  font-size: clamp(1.5rem, 3.4vw, 2.2rem);
  font-weight: 600;
  line-height: 1.08;
  letter-spacing: -0.03em;
  max-width: 24ch;
  color: var(--ink-900);
}

/* Problemas — lista com barra plum */
.problem-list {
  display: grid;
  gap: 1.2rem;
}

.problem-item {
  padding: 1.1rem 0 0 1.15rem;
  border-left: 2px solid var(--plum);
}

.problem-item p {
  margin-top: 0.55rem;
  color: color-mix(in srgb, currentColor 80%, transparent);
}

@media (min-width: 48rem) {
  .problem-list {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 1.6rem 2rem;
  }
}

/* Casos — Dossiê (índice numerado / acordeão nativo) */
.dossie {
  border-top: 1px solid var(--line-light);
}

.dossie details {
  border-bottom: 1px solid var(--line-light);
}

.dossie summary {
  display: flex;
  align-items: baseline;
  gap: 1.1rem;
  padding: 1.5rem 0;
  cursor: pointer;
  list-style: none;
}

.dossie summary::-webkit-details-marker {
  display: none;
}

.dossie .num {
  min-width: 2.2rem;
  font-family: var(--font-serif);
  font-size: 1.1rem;
  color: var(--plum);
}

.dossie .ttl {
  flex: 1;
  font-family: var(--font-serif);
  font-weight: 600;
  font-size: clamp(1.2rem, 2.4vw, 1.7rem);
  line-height: 1.12;
  letter-spacing: -0.02em;
}

.dossie .chev {
  color: var(--ink);
  transition: transform var(--dur-ui) var(--ease-out);
}

.dossie details[open] .chev {
  transform: rotate(90deg);
}

.dossie .detail {
  padding: 0 0 1.7rem 3.3rem;
  max-width: 54rem;
}

.dossie .detail p + p {
  margin-top: 0.7rem;
}

.dossie .muted {
  color: color-mix(in srgb, var(--ink-900) 72%, transparent);
}

.dossie .k {
  font-weight: 600;
  color: var(--ink-900);
}

.dossie details[open] .detail {
  animation: fadeIn 360ms var(--ease-out) both;
}

@media (max-width: 34rem) {
  .dossie .detail {
    padding-left: 0;
  }
}

/* Outcomes (o que muda com estrutura) */
.outcomes {
  display: grid;
  gap: 1.1rem;
}

@media (min-width: 48rem) {
  .outcomes {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

/* Sobre */
.about-grid {
  display: grid;
  gap: 1.5rem;
}

.about-role {
  margin-top: 1rem;
  font-weight: 600;
  color: var(--plum);
}

.about-grid .copy-block p + p {
  margin-top: 1rem;
  color: color-mix(in srgb, currentColor 82%, transparent);
}

.about-panel {
  align-self: start;
  padding: 1.6rem;
  border: 1px solid var(--line-light);
  border-radius: var(--radius);
  background: rgba(255, 255, 255, 0.5);
  box-shadow: var(--shadow-light);
}

@media (min-width: 48rem) {
  .about-grid {
    grid-template-columns: minmax(0, 1.2fr) minmax(18rem, 0.8fr);
    align-items: start;
  }
}

/* FAQ */
.faq {
  display: grid;
  gap: 0.9rem;
}

.faq details {
  padding: 1.1rem 1.3rem;
  border: 1px solid var(--line-light);
  border-radius: var(--radius);
  background: rgba(255, 255, 255, 0.55);
  box-shadow: var(--shadow-light);
}

.faq summary {
  list-style: none;
  cursor: pointer;
  font-weight: 600;
}

.faq summary::-webkit-details-marker {
  display: none;
}

.faq details p {
  margin-top: 0.8rem;
  max-width: 62ch;
  color: color-mix(in srgb, currentColor 80%, transparent);
}

/* CTA */
.cta {
  position: relative;
  overflow: hidden;
}

.cta .shell {
  position: relative;
  z-index: 1;
}

.cta h2 {
  font-family: var(--font-serif);
}

/* Selo brasão como marca-d'água discreta */
.cta__seal {
  position: absolute;
  right: -1.5rem;
  bottom: -3rem;
  width: 20rem;
  max-width: 46%;
  height: auto;
  opacity: 0.07;
  pointer-events: none;
  user-select: none;
}

@keyframes fadeIn {
  from { opacity: 0; transform: translateY(6px); }
  to { opacity: 1; transform: none; }
}

/* =========================================================================
   Reveal on scroll (base) — clip-path, dispara uma vez
   ========================================================================= */

[data-reveal] {
  clip-path: inset(0 0 0 0);
  opacity: 1;
  transform: none;
}

.js [data-reveal] {
  opacity: 0;
  transform: translateY(1.1rem);
  transition:
    opacity var(--dur-reveal) var(--ease-in-out),
    transform var(--dur-reveal) var(--ease-in-out);
}

.js [data-reveal].is-visible {
  opacity: 1;
  transform: none;
}

/* =========================================================================
   Footer
   ========================================================================= */

.site-footer {
  position: relative;
  padding: 2.4rem 0 2.8rem;
  color: var(--pearl);
  background: var(--base);
  border-top: 1px solid var(--line-dark);
}

.site-footer__inner {
  position: relative;
  z-index: 1;
  display: flex;
  flex-direction: column;
  gap: 1.4rem;
}

.footer-brand {
  font-family: var(--font-sans);
  font-weight: 700;
  letter-spacing: 0.28em;
  text-transform: uppercase;
  color: var(--rose);
}

.footer-note {
  color: rgba(247, 243, 245, 0.62);
  font-size: 0.9rem;
  max-width: 46ch;
}

.footer-social {
  margin-top: 0.7rem;
  display: flex;
  gap: 0.6rem;
  align-items: center;
}

.site-footer a {
  color: rgba(247, 243, 245, 0.78);
  transition: color var(--dur-ui) var(--ease-out);
}

@media (hover: hover) and (pointer: fine) {
  .site-footer a:hover {
    color: var(--rose);
  }
}

/* =========================================================================
   Responsivo
   ========================================================================= */

@media (min-width: 48rem) {
  .site-nav {
    display: inline-flex;
  }

  .grid--3 {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }

  .grid--2 {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .site-footer__inner {
    flex-direction: row;
    justify-content: space-between;
    align-items: flex-end;
  }
}

/* =========================================================================
   Preferências do usuário (acessibilidade)
   ========================================================================= */

@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;
  }

  /* Reduced motion = menos movimento, não zero: mantém opacidade, remove deslocamento */
  .js [data-reveal] {
    opacity: 0;
    transform: none;
    transition: opacity var(--dur-ui) ease;
  }
}

@media (prefers-reduced-transparency: reduce) {
  .site-header {
    background: var(--pearl);
    backdrop-filter: none;
    -webkit-backdrop-filter: none;
  }

  .section--dark .card {
    backdrop-filter: none;
  }
}

@media (prefers-contrast: more) {
  .card {
    background: #fff;
    border-color: var(--ink);
  }

  .lead,
  .card p,
  .section-head p {
    color: currentColor;
  }
}
