/* ============================================================
   Hair Care — Design System
   base.css · tokens, reset, tipografia, componentes comuns
   ============================================================ */

/* ---------- Tokens (tema escuro, sobreposto pelo tema claro abaixo) ---------- */
:root {
  --bg: #100e0b;
  --bg-2: #181410;
  --surface: #1e1913;
  --surface-2: #2a2318;
  --text: #f4eee2;
  --muted: #a99d89;
  --accent: #d2a24c;
  --accent-soft: #e6cd9a;
  --accent-ink: #14110c;
  --line: rgba(244, 238, 226, 0.14);
  --line-strong: rgba(244, 238, 226, 0.3);
  --radius: 18px;
  --radius-sm: 10px;
  --font-display: 'Bebas Neue', 'Oswald', 'Haettenschweiler', 'Arial Narrow', Impact, sans-serif;
  --font-sans: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Helvetica, Arial, sans-serif;
  --font-serif: 'Cormorant Garamond', Georgia, 'Times New Roman', serif;
  --ease: cubic-bezier(0.22, 1, 0.36, 1);
  --ease-in-out: cubic-bezier(0.76, 0, 0.24, 1);
  --maxw: 1320px;
  --pad: clamp(20px, 5vw, 72px);
  --shadow: 0 30px 80px -30px rgba(0, 0, 0, 0.7);
}

/* ---------- Tema claro (salão Hair Care) ---------- */
body[data-brand='haircare'] {
  --bg: #fbf7f2;
  --bg-2: #f3ebe2;
  --surface: #ffffff;
  --surface-2: #f7efe6;
  --text: #241d19;
  --muted: #7d6c60;
  --accent: #b9694f;
  --accent-soft: #e6c3b4;
  --accent-ink: #fffaf6;
  --line: rgba(36, 29, 25, 0.13);
  --line-strong: rgba(36, 29, 25, 0.28);
  --shadow: 0 30px 70px -34px rgba(70, 45, 35, 0.35);
  --font-display: 'Cormorant Garamond', Georgia, 'Times New Roman', serif;
}

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

* { margin: 0; padding: 0; }

html {
  -webkit-text-size-adjust: 100%;
  scroll-behavior: smooth;
}

body {
  background: var(--bg);
  color: var(--text);
  font-family: var(--font-sans);
  font-size: 16px;
  line-height: 1.6;
  font-weight: 400;
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

img, svg, video { display: block; max-width: 100%; }
button, input, select, textarea { font: inherit; color: inherit; }
button { background: none; border: 0; cursor: pointer; }
a { color: inherit; text-decoration: none; }
ul, ol { list-style: none; }
::selection { background: var(--accent); color: var(--accent-ink); }

/* scrollbar */
::-webkit-scrollbar { width: 10px; }
::-webkit-scrollbar-track { background: var(--bg); }
::-webkit-scrollbar-thumb { background: var(--line-strong); border-radius: 20px; }

/* ---------- Grão / textura ---------- */
.grain {
  position: fixed;
  inset: 0;
  z-index: 9998;
  pointer-events: none;
  opacity: 0.05;
  mix-blend-mode: overlay;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='300' height='300'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.85' numOctaves='3'/%3E%3C/filter%3E%3Crect width='300' height='300' filter='url(%23n)'/%3E%3C/svg%3E");
}

/* ---------- Layout ---------- */
.wrap { width: 100%; max-width: var(--maxw); margin-inline: auto; padding-inline: var(--pad); }
.section { padding-block: clamp(80px, 11vw, 170px); position: relative; }
.section--tight { padding-block: clamp(56px, 7vw, 100px); }
.grid { display: grid; gap: clamp(20px, 3vw, 40px); }
.hr { height: 1px; background: var(--line); border: 0; }

/* ---------- Tipografia ---------- */
.display {
  font-family: var(--font-display);
  font-weight: 400;
  line-height: 0.86;
  letter-spacing: 0.005em;
  text-transform: uppercase;
  font-size: clamp(3.4rem, 12.5vw, 13rem);
}
body[data-brand='haircare'] .display {
  text-transform: none;
  line-height: 0.92;
  letter-spacing: -0.02em;
  font-weight: 300;
  font-size: clamp(3rem, 11vw, 11rem);
}
.h2 {
  font-family: var(--font-display);
  font-weight: 400;
  text-transform: uppercase;
  letter-spacing: 0.01em;
  line-height: 0.95;
  font-size: clamp(2.1rem, 5.4vw, 5rem);
}
body[data-brand='haircare'] .h2 {
  text-transform: none;
  font-weight: 300;
  letter-spacing: -0.015em;
  line-height: 1.02;
}
.h3 {
  font-family: var(--font-display);
  font-size: clamp(1.3rem, 2.2vw, 2rem);
  font-weight: 400;
  text-transform: uppercase;
  letter-spacing: 0.02em;
  line-height: 1.1;
}
body[data-brand='haircare'] .h3 { text-transform: none; font-weight: 400; }

.lead {
  font-size: clamp(1.02rem, 1.35vw, 1.32rem);
  color: var(--muted);
  max-width: 58ch;
  line-height: 1.65;
}
.body-muted { color: var(--muted); }

.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  font-size: 0.7rem;
  letter-spacing: 0.28em;
  text-transform: uppercase;
  color: var(--accent);
  font-weight: 500;
}
.eyebrow::before {
  content: '';
  width: 34px;
  height: 1px;
  background: currentColor;
}
.serif-it { font-family: var(--font-serif); font-style: italic; font-weight: 300; }

/* ---------- Botões ---------- */
.btn {
  --btn-bg: var(--accent);
  --btn-fg: var(--accent-ink);
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
  padding: 17px 30px;
  border-radius: 100px;
  background: var(--btn-bg);
  color: var(--btn-fg);
  font-size: 0.78rem;
  font-weight: 600;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  overflow: hidden;
  isolation: isolate;
  transition: transform 0.5s var(--ease), color 0.4s var(--ease);
  will-change: transform;
}
.btn::after {
  content: '';
  position: absolute;
  inset: 0;
  z-index: -1;
  background: var(--text);
  transform: translateY(101%);
  transition: transform 0.55s var(--ease);
}
.btn:hover::after { transform: translateY(0); }
.btn:hover { color: var(--bg); }
.btn--ghost {
  --btn-bg: transparent;
  --btn-fg: var(--text);
  border: 1px solid var(--line-strong);
}
.btn--ghost::after { background: var(--text); }
.btn--sm { padding: 12px 22px; font-size: 0.7rem; }
.btn--block { width: 100%; }
.btn:disabled { opacity: 0.4; pointer-events: none; }
body[data-brand='haircare'] .btn { border-radius: 4px; letter-spacing: 0.12em; }
body[data-brand='haircare'] .btn--ghost { border-radius: 4px; }

/* link sublinhado animado */
.link-u {
  position: relative;
  display: inline-block;
  padding-bottom: 3px;
}
.link-u::after {
  content: '';
  position: absolute;
  left: 0;
  bottom: 0;
  width: 100%;
  height: 1px;
  background: currentColor;
  transform-origin: right;
  transform: scaleX(1);
  transition: transform 0.5s var(--ease);
}
.link-u:hover::after { transform-origin: left; transform: scaleX(0); }

/* ---------- Cabeçalho ---------- */
.header {
  position: fixed;
  inset: 0 0 auto 0;
  z-index: 900;
  padding-block: 20px;
  transition: transform 0.6s var(--ease), background 0.4s var(--ease), padding 0.4s var(--ease);
}
.header__inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
}
.header.is-stuck {
  background: color-mix(in srgb, var(--bg) 86%, transparent);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border-bottom: 1px solid var(--line);
  padding-block: 12px;
}
.header.is-hidden { transform: translateY(-110%); }

.logo { display: flex; align-items: baseline; gap: 10px; }
.logo__mark {
  font-family: var(--font-display);
  font-size: 1.5rem;
  letter-spacing: 0.02em;
  text-transform: uppercase;
  line-height: 1;
}
body[data-brand='haircare'] .logo__mark { text-transform: none; font-weight: 400; font-size: 1.7rem; }
.logo__sub {
  font-size: 0.58rem;
  letter-spacing: 0.3em;
  text-transform: uppercase;
  color: var(--muted);
}
@media (max-width: 640px) { .logo__sub { display: none; } }

.nav { display: flex; align-items: center; gap: clamp(18px, 2.4vw, 40px); }
.nav a {
  font-size: 0.76rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--muted);
  transition: color 0.3s var(--ease);
}
.nav a:hover { color: var(--text); }
@media (max-width: 900px) { .nav { display: none; } }

.burger {
  display: none;
  width: 46px;
  height: 46px;
  border: 1px solid var(--line-strong);
  border-radius: 50%;
  align-items: center;
  justify-content: center;
  flex-direction: column;
  gap: 5px;
}
.burger span {
  display: block;
  width: 18px;
  height: 1px;
  background: var(--text);
  transition: transform 0.4s var(--ease), opacity 0.3s;
}
.burger.is-open span:nth-child(1) { transform: translateY(3px) rotate(45deg); }
.burger.is-open span:nth-child(2) { transform: translateY(-3px) rotate(-45deg); }
@media (max-width: 900px) { .burger { display: flex; } }

/* menu mobile */
.menu {
  position: fixed;
  inset: 0;
  z-index: 890;
  background: var(--bg-2);
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: 6px;
  padding: var(--pad);
  clip-path: circle(0% at 92% 6%);
  transition: clip-path 0.8s var(--ease-in-out);
  pointer-events: none;
}
.menu.is-open { clip-path: circle(150% at 92% 6%); pointer-events: auto; }
.menu a {
  font-family: var(--font-display);
  font-size: clamp(2rem, 9vw, 4rem);
  text-transform: uppercase;
  line-height: 1.15;
  opacity: 0;
  transform: translateY(30px);
  transition: opacity 0.6s var(--ease), transform 0.6s var(--ease), color 0.3s;
}
body[data-brand='haircare'] .menu a { text-transform: none; font-weight: 300; }
.menu.is-open a { opacity: 1; transform: none; }
.menu a:hover { color: var(--accent); }

/* ---------- Cursor (só desktop) ---------- */
.cursor {
  position: fixed;
  top: 0; left: 0;
  z-index: 9999;
  pointer-events: none;
  mix-blend-mode: difference;
  display: none;
}
.cursor__dot,
.cursor__ring {
  position: absolute;
  border-radius: 50%;
  transform: translate(-50%, -50%);
}
.cursor__dot { width: 6px; height: 6px; background: #fff; }
.cursor__ring {
  width: 36px; height: 36px;
  border: 1px solid rgba(255, 255, 255, 0.6);
  transition: width 0.35s var(--ease), height 0.35s var(--ease), background 0.35s var(--ease);
}
.cursor.is-active .cursor__ring { width: 74px; height: 74px; background: rgba(255, 255, 255, 0.12); }
@media (hover: hover) and (pointer: fine) { .cursor { display: block; } }

/* ---------- Preloader ---------- */
.preloader {
  position: fixed;
  inset: 0;
  z-index: 10000;
  background: var(--bg);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 26px;
}
.preloader__mark {
  font-family: var(--font-display);
  font-size: clamp(2.2rem, 7vw, 5rem);
  text-transform: uppercase;
  letter-spacing: 0.02em;
  line-height: 1;
  overflow: hidden;
}
body[data-brand='haircare'] .preloader__mark { text-transform: none; font-weight: 300; }
.preloader__bar { width: min(260px, 60vw); height: 1px; background: var(--line); overflow: hidden; }
.preloader__fill { height: 100%; width: 0%; background: var(--accent); }
.preloader__num { font-size: 0.68rem; letter-spacing: 0.3em; color: var(--muted); }
.preloader.is-done { transform: translateY(-100%); transition: transform 1s var(--ease-in-out); }

/* ---------- Barra de progresso ---------- */
.progress {
  position: fixed;
  top: 0; left: 0;
  height: 2px;
  width: 0%;
  background: var(--accent);
  z-index: 950;
}

/* ---------- Reveal ---------- */
[data-reveal] { opacity: 0; transform: translateY(38px); }
[data-reveal].is-in {
  opacity: 1;
  transform: none;
  transition: opacity 0.9s var(--ease), transform 1s var(--ease);
}
[data-reveal-delay='1'].is-in { transition-delay: 0.08s; }
[data-reveal-delay='2'].is-in { transition-delay: 0.16s; }
[data-reveal-delay='3'].is-in { transition-delay: 0.24s; }
[data-reveal-delay='4'].is-in { transition-delay: 0.32s; }

.line-mask { display: block; overflow: hidden; }
.line-mask > span { display: block; transform: translateY(105%); }
.is-in .line-mask > span,
.line-mask.is-in > span { transform: none; transition: transform 1.05s var(--ease); }

/* ---------- Marquee ---------- */
.marquee {
  display: flex;
  overflow: hidden;
  gap: 0;
  border-block: 1px solid var(--line);
  padding-block: 18px;
  user-select: none;
}
.marquee__track {
  display: flex;
  gap: 44px;
  padding-right: 44px;
  flex: none;
  align-items: center;
  animation: marquee 26s linear infinite;
}
.marquee__track span {
  font-family: var(--font-display);
  font-size: clamp(1.5rem, 3.4vw, 2.8rem);
  text-transform: uppercase;
  color: var(--muted);
  white-space: nowrap;
}
body[data-brand='haircare'] .marquee__track span { text-transform: none; font-weight: 300; }
.marquee__track i { color: var(--accent); font-style: normal; }
.marquee:hover .marquee__track { animation-play-state: paused; }
@keyframes marquee { to { transform: translateX(-100%); } }

/* ---------- Cartões / superfícies ---------- */
.card {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: clamp(22px, 3vw, 38px);
  transition: transform 0.6s var(--ease), border-color 0.4s var(--ease), background 0.4s;
}
.card:hover { border-color: var(--line-strong); transform: translateY(-6px); }

.pill {
  display: inline-block;
  padding: 6px 14px;
  border: 1px solid var(--line-strong);
  border-radius: 100px;
  font-size: 0.66rem;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--muted);
}
body[data-brand='haircare'] .pill { border-radius: 3px; }

/* ---------- Rodapé ---------- */
.footer {
  background: var(--bg-2);
  border-top: 1px solid var(--line);
  padding-top: clamp(60px, 8vw, 110px);
}
.footer__grid {
  display: grid;
  grid-template-columns: 1.4fr 1fr 1fr;
  gap: 40px;
  padding-bottom: 60px;
}
@media (max-width: 860px) { .footer__grid { grid-template-columns: 1fr; } }
.footer__title {
  font-size: 0.68rem;
  letter-spacing: 0.26em;
  text-transform: uppercase;
  color: var(--muted);
  margin-bottom: 18px;
}
.footer__bottom {
  border-top: 1px solid var(--line);
  padding-block: 26px;
  display: flex;
  justify-content: space-between;
  gap: 16px;
  flex-wrap: wrap;
  font-size: 0.76rem;
  color: var(--muted);
}
.footer__big {
  font-family: var(--font-display);
  font-size: clamp(3rem, 15vw, 13rem);
  line-height: 0.8;
  text-transform: uppercase;
  color: transparent;
  -webkit-text-stroke: 1px var(--line-strong);
  padding-bottom: 10px;
  letter-spacing: 0.01em;
}
body[data-brand='haircare'] .footer__big { text-transform: none; font-weight: 300; }

/* ---------- Utilitários ---------- */
.stack-sm > * + * { margin-top: 10px; }
.stack > * + * { margin-top: 18px; }
.stack-lg > * + * { margin-top: 34px; }
.text-accent { color: var(--accent); }
.center { text-align: center; }
.flex-between { display: flex; align-items: center; justify-content: space-between; gap: 20px; flex-wrap: wrap; }
.sr-only {
  position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px;
  overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0;
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: 0.01ms !important; transition-duration: 0.01ms !important; }
  html { scroll-behavior: auto; }
}
