/* ==========================================================================
   Studio Branndo — Site
   Estética: calm, confident, editorial. Inspiração Apple + Dieter Rams.
   ========================================================================== */

@import url('https://fonts.googleapis.com/css2?family=Geist:wght@300;400;500;600;700;800&display=swap');

:root {
  /* Paleta oficial */
  --slate:      #A2AAAD;
  --bone:       #F3F3F3;
  --ink:        #353434;
  --teal:       #558D96;
  --teal-deep:  #3B6066;
  --white:      #FFFFFF;
  --ghost:      #BFBFBF;

  --ink-soft:   #5A5959;
  --ink-mute:   #8E8D8D;

  --hair:           rgba(53, 52, 52, 0.12);
  --hair-on-slate:  rgba(255, 255, 255, 0.18);

  --font: "Geist", "Helvetica Neue", Helvetica, Arial, sans-serif;

  --tr-tight:   -0.03em;
  --tr-tighter: -0.06em;

  --nav-h: 56px;
  --maxw: 1200px;
  --pad: 32px;

  --ease: cubic-bezier(0.22, 1, 0.36, 1);

  /* Tokens semânticos (claro = padrão) */
  --nav-bg:        rgba(243, 243, 243, 0.72);
  --nav-bg-solid:  rgba(243, 243, 243, 0.96);
  --band-slate-bg: var(--slate);
  --band-ink-bg:   var(--ink);
  --band-teal-bg:  var(--teal-deep);
  --footer-bg:     var(--ink);
  --card-bg:       var(--bone);

  /* Liquid glass */
  --glass-fill:      rgba(255, 255, 255, 0.55);
  --glass-edge:      rgba(255, 255, 255, 0.55);
  --glass-highlight: rgba(255, 255, 255, 0.45);
  --glass-shadow:    0 10px 34px rgba(20, 20, 20, 0.14);
  --glass-lift:      0 20px 50px rgba(20, 20, 20, 0.16);

  color-scheme: light;
}

/* ---------- Dark mode ---------------------------------------------------- */
/* Valores escuros: aplicados quando o sistema pede escuro (sem escolha
   manual em contrário) ou quando o usuário força data-theme="dark". */
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --bone:       #121212;
    --ink:        #ECECEC;
    --teal:       #6FB1BB;
    --teal-deep:  #86C0C9;
    --ghost:      #4A4A4A;
    --ink-soft:   #B5B5B5;
    --ink-mute:   #8A8A8A;

    --hair:           rgba(255, 255, 255, 0.12);
    --hair-on-slate:  rgba(255, 255, 255, 0.16);

    --nav-bg:        rgba(17, 17, 17, 0.72);
    --nav-bg-solid:  rgba(17, 17, 17, 0.96);
    --band-slate-bg: #20262A;
    --band-ink-bg:   #191919;
    --band-teal-bg:  #244A50;
    --footer-bg:     #0C0C0C;
    --card-bg:       #1A1A1A;

    --glass-fill:      rgba(40, 40, 42, 0.46);
    --glass-edge:      rgba(255, 255, 255, 0.12);
    --glass-highlight: rgba(255, 255, 255, 0.16);
    --glass-shadow:    0 10px 34px rgba(0, 0, 0, 0.5);
    --glass-lift:      0 20px 50px rgba(0, 0, 0, 0.6);

    color-scheme: dark;
  }
}

:root[data-theme="dark"] {
  --bone:       #121212;
  --ink:        #ECECEC;
  --teal:       #6FB1BB;
  --teal-deep:  #86C0C9;
  --ghost:      #4A4A4A;
  --ink-soft:   #B5B5B5;
  --ink-mute:   #8A8A8A;

  --hair:           rgba(255, 255, 255, 0.12);
  --hair-on-slate:  rgba(255, 255, 255, 0.16);

  --nav-bg:        rgba(17, 17, 17, 0.72);
  --nav-bg-solid:  rgba(17, 17, 17, 0.96);
  --band-slate-bg: #20262A;
  --band-ink-bg:   #191919;
  --band-teal-bg:  #244A50;
  --footer-bg:     #0C0C0C;
  --card-bg:       #1A1A1A;

  --glass-fill:      rgba(40, 40, 42, 0.46);
  --glass-edge:      rgba(255, 255, 255, 0.12);
  --glass-highlight: rgba(255, 255, 255, 0.16);
  --glass-shadow:    0 10px 34px rgba(0, 0, 0, 0.5);
  --glass-lift:      0 20px 50px rgba(0, 0, 0, 0.6);

  color-scheme: dark;
}

/* ---------- Liquid glass (material reutilizável) ------------------------- */
.glass {
  background: var(--glass-fill);
  -webkit-backdrop-filter: saturate(180%) blur(20px);
  backdrop-filter: saturate(180%) blur(20px);
  border: 1px solid var(--glass-edge);
  box-shadow: var(--glass-shadow), inset 0 1px 0 var(--glass-highlight);
}
/* Sem suporte a backdrop-filter: cai pro preenchimento sólido do tema */
@supports not ((backdrop-filter: blur(1px)) or (-webkit-backdrop-filter: blur(1px))) {
  .glass, .service, .contact-list { background: var(--card-bg); }
}
/* Respeita preferência por menos transparência */
@media (prefers-reduced-transparency: reduce) {
  .glass, .service, .contact-list, .case-meta-item {
    -webkit-backdrop-filter: none; backdrop-filter: none;
    background: var(--card-bg);
  }
}

* { box-sizing: border-box; margin: 0; padding: 0; }

html { scroll-behavior: smooth; }

body {
  font-family: var(--font);
  color: var(--ink);
  background: var(--bone);
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  letter-spacing: var(--tr-tight);
  transition: background 240ms var(--ease), color 240ms var(--ease);
}

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

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

::selection { background: var(--teal); color: var(--white); }

/* ---------- Nav ---------------------------------------------------------- */
.nav {
  position: fixed; top: 0; left: 0; right: 0; z-index: 100;
  height: var(--nav-h);
  display: flex; align-items: center;
  padding: 0 var(--pad);
  background: var(--nav-bg);
  -webkit-backdrop-filter: saturate(180%) blur(24px);
  backdrop-filter: saturate(180%) blur(24px);
  border-bottom: 1px solid var(--hair);
  box-shadow: inset 0 1px 0 var(--glass-highlight);
  transition: background 240ms var(--ease), box-shadow 240ms var(--ease), border-color 240ms var(--ease);
}
.nav__inner {
  width: 100%; max-width: var(--maxw); margin: 0 auto;
  display: flex; align-items: center; gap: 28px;
}
.nav__brand { display: flex; align-items: center; gap: 10px; }
.nav__brand .mono { height: 20px; width: auto; color: var(--ink); }
.nav__name { font-size: 16px; font-weight: 600; letter-spacing: -0.02em; color: var(--ink); }
.mono path { fill: currentColor; }
.nav__spacer { flex: 1; }
.nav__links { display: flex; gap: 30px; align-items: center; }
.nav__links a {
  font-size: 13px; font-weight: 500; color: var(--ink);
  letter-spacing: -0.01em; opacity: 0.85;
  transition: opacity 160ms var(--ease);
}
.nav__links a:hover, .nav__links a[aria-current="page"] { opacity: 1; color: var(--teal-deep); }
.nav__cta {
  font-size: 13px; font-weight: 500; color: var(--bone);
  background: var(--ink); padding: 8px 16px; border-radius: 999px;
  transition: background 160ms var(--ease);
}
.nav__cta:hover { background: var(--teal-deep); color: var(--bone); }
.nav__burger { display: none; background: none; border: 0; cursor: pointer; padding: 8px; }
.nav__burger span { display: block; width: 20px; height: 1.5px; background: var(--ink); margin: 4px 0; transition: transform 240ms var(--ease), opacity 160ms var(--ease); transform-origin: center; }
.nav--open .nav__burger span:nth-child(1) { transform: translateY(5.5px) rotate(45deg); }
.nav--open .nav__burger span:nth-child(2) { opacity: 0; }
.nav--open .nav__burger span:nth-child(3) { transform: translateY(-5.5px) rotate(-45deg); }

/* Toggle de tema */
.theme-toggle {
  display: inline-flex; align-items: center; justify-content: center;
  width: 34px; height: 34px; border: 0; border-radius: 999px;
  background: none; color: var(--ink); cursor: pointer; opacity: 0.85;
  transition: opacity 160ms var(--ease), background 160ms var(--ease);
}
.theme-toggle:hover { opacity: 1; background: var(--hair); }
.theme-toggle svg { width: 18px; height: 18px; }
.theme-toggle .icon-sun { display: none; }
:root[data-theme="dark"] .theme-toggle .icon-sun { display: block; }
:root[data-theme="dark"] .theme-toggle .icon-moon { display: none; }
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) .theme-toggle .icon-sun { display: block; }
  :root:not([data-theme="light"]) .theme-toggle .icon-moon { display: none; }
}

/* ---------- Layout base -------------------------------------------------- */
main { padding-top: var(--nav-h); }
.wrap { max-width: var(--maxw); margin: 0 auto; padding: 0 var(--pad); }
.wrap--narrow { max-width: 820px; }

.section { padding: 120px 0; }
.section--tight { padding: 80px 0; }

.eyebrow {
  font-size: 14px; font-weight: 400; color: var(--teal-deep);
  letter-spacing: -0.01em; margin-bottom: 22px;
}
.eyebrow::before { content: "/ "; opacity: 0.6; }

/* ---------- Tipografia --------------------------------------------------- */
.hero-title {
  font-weight: 500; line-height: 1.0; letter-spacing: var(--tr-tight);
  font-size: clamp(40px, 7vw, 88px); text-wrap: balance;
}
.display {
  font-weight: 500; line-height: 1.02; letter-spacing: var(--tr-tight);
  font-size: clamp(32px, 5vw, 56px); text-wrap: balance;
}
.h2 {
  font-weight: 500; line-height: 1.05; letter-spacing: var(--tr-tight);
  font-size: clamp(26px, 3.4vw, 40px);
}
.h3 {
  font-weight: 500; line-height: 1.1; letter-spacing: var(--tr-tight);
  font-size: clamp(20px, 2.2vw, 26px);
}
.lead {
  font-size: clamp(18px, 2vw, 22px); font-weight: 400; line-height: 1.5;
  letter-spacing: -0.01em; color: var(--ink-soft);
}
.body { font-size: 17px; font-weight: 400; line-height: 1.6; letter-spacing: -0.01em; color: var(--ink-soft); }
.italic { font-style: italic; }

/* ---------- Botões ------------------------------------------------------- */
.btn {
  display: inline-flex; align-items: center; gap: 8px;
  font-size: 15px; font-weight: 500; letter-spacing: -0.01em;
  padding: 13px 24px; border-radius: 999px; cursor: pointer;
  border: 1px solid transparent; transition: 180ms var(--ease);
}
.btn--solid { background: var(--ink); color: var(--bone); }
.btn--solid:hover { background: var(--teal-deep); }
.btn--ghost {
  background: var(--glass-fill);
  -webkit-backdrop-filter: saturate(180%) blur(14px);
  backdrop-filter: saturate(180%) blur(14px);
  color: var(--ink); border-color: var(--glass-edge);
  box-shadow: inset 0 1px 0 var(--glass-highlight);
}
.btn--ghost:hover { background: var(--ink); color: var(--bone); border-color: var(--ink); box-shadow: none; }
.btn--on-dark {
  background: rgba(255, 255, 255, 0.16);
  -webkit-backdrop-filter: saturate(180%) blur(14px);
  backdrop-filter: saturate(180%) blur(14px);
  color: var(--white); border-color: rgba(255, 255, 255, 0.30);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.25);
}
.btn--on-dark:hover { background: rgba(255, 255, 255, 0.26); }
.btn--link { padding: 0; background: none; color: var(--teal-deep); font-weight: 500; }
.btn--link:hover { color: var(--ink); }
.btn--link .arrow { transition: transform 180ms var(--ease); }
.btn--link:hover .arrow { transform: translateX(4px); }

/* ---------- Hero --------------------------------------------------------- */
.hero {
  min-height: calc(92vh - var(--nav-h));
  display: flex; flex-direction: column; justify-content: center;
  padding: 80px 0;
}
.hero .lead { margin-top: 28px; max-width: 600px; }
.hero__actions { margin-top: 44px; display: flex; gap: 14px; flex-wrap: wrap; }

/* ---------- Manifesto (slate band) --------------------------------------- */
.band { background: var(--band-slate-bg); color: var(--white); }
.band .eyebrow { color: var(--white); opacity: 0.85; }
.band .lead, .band .body { color: rgba(255,255,255,0.86); }
.band--ink { background: var(--band-ink-bg); color: var(--white); }
.band--ink .lead, .band--ink .body { color: rgba(255,255,255,0.78); }
.band--teal { background: var(--band-teal-bg); color: var(--white); }
.band--teal .eyebrow { color: var(--white); opacity: 0.8; }
.band--teal .lead { color: rgba(255,255,255,0.88); }

.manifesto-quote {
  font-weight: 500; letter-spacing: var(--tr-tight); line-height: 1.12;
  font-size: clamp(28px, 4.4vw, 52px); text-wrap: balance; max-width: 16ch;
}
.manifesto-quote .italic { color: rgba(255,255,255,0.62); }

/* ---------- Serviços ----------------------------------------------------- */
.grid { display: grid; gap: 16px; background: transparent; }
.grid--3 { grid-template-columns: repeat(3, 1fr); }
.grid--2 { grid-template-columns: repeat(2, 1fr); }

.service {
  background: var(--glass-fill);
  -webkit-backdrop-filter: saturate(180%) blur(20px);
  backdrop-filter: saturate(180%) blur(20px);
  border: 1px solid var(--glass-edge);
  border-radius: 22px;
  box-shadow: var(--glass-shadow), inset 0 1px 0 var(--glass-highlight);
  padding: 40px 32px 44px;
  display: flex; flex-direction: column; min-height: 280px;
  transition: transform 320ms var(--ease), box-shadow 320ms var(--ease);
}
.service:hover { transform: translateY(-4px); box-shadow: var(--glass-lift), inset 0 1px 0 var(--glass-highlight); }
.service__num { font-size: 13px; font-weight: 500; color: var(--ink-mute); letter-spacing: 0.02em; }
.service__title { margin-top: auto; padding-top: 40px; }
.service__desc { margin-top: 16px; }

/* ---------- Cases grid --------------------------------------------------- */
.cases { display: grid; grid-template-columns: repeat(2, 1fr); gap: 4px; }
.case-card {
  position: relative; display: block; overflow: hidden;
  background: var(--slate); aspect-ratio: 4 / 3;
  color: var(--white);
}
.case-card__media { position: absolute; inset: 0; }
.case-card__media img { width: 100%; height: 100%; object-fit: cover; }
.case-card__media::after {
  content: ""; position: absolute; inset: 0;
  background: linear-gradient(180deg, rgba(53,52,52,0) 40%, rgba(53,52,52,0.72) 100%);
}
.case-card__placeholder {
  position: absolute; inset: 0; display: flex; align-items: center; justify-content: center;
  background: var(--slate);
}
.case-card__placeholder .mono { width: 64px; opacity: 0.5; }
.case-card__body {
  position: relative; z-index: 2; height: 100%;
  display: flex; flex-direction: column; justify-content: flex-end;
  padding: 36px;
}
.case-card__kicker {
  align-self: flex-start;
  font-size: 12px; font-weight: 500; letter-spacing: -0.01em; color: #fff;
  padding: 5px 12px; border-radius: 999px; margin-bottom: 2px;
  background: rgba(255, 255, 255, 0.16);
  -webkit-backdrop-filter: saturate(160%) blur(12px);
  backdrop-filter: saturate(160%) blur(12px);
  border: 1px solid rgba(255, 255, 255, 0.28);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.30);
}
.case-card__title { margin-top: 8px; font-weight: 500; font-size: clamp(22px, 2.6vw, 30px); letter-spacing: var(--tr-tight); line-height: 1.05; }
.case-card__tags { margin-top: 14px; font-size: 12px; font-weight: 500; opacity: 0.8; letter-spacing: 0.01em; }
.case-card .case-card__media img { transition: transform 600ms var(--ease); }
.case-card:hover .case-card__media img { transform: scale(1.04); }
.case-card--full { grid-column: 1 / -1; aspect-ratio: 16 / 7; }

/* ---------- Clientes / prova social -------------------------------------- */
.clients { display: flex; flex-wrap: wrap; gap: 12px 14px; }
.client-chip {
  font-size: clamp(20px, 2.6vw, 32px); font-weight: 500; letter-spacing: var(--tr-tight);
  color: var(--ink); padding: 6px 0;
}
.client-chip + .client-chip::before { content: "·"; color: var(--ghost); margin: 0 14px; }

/* ---------- Case page ---------------------------------------------------- */
.case-hero { padding: 100px 0 60px; }
.case-hero__meta { display: flex; gap: 14px; flex-wrap: wrap; margin-top: 44px; }
.case-meta-item {
  min-width: 140px; padding: 16px 20px; border-radius: 16px;
  background: var(--glass-fill);
  -webkit-backdrop-filter: saturate(180%) blur(18px);
  backdrop-filter: saturate(180%) blur(18px);
  border: 1px solid var(--glass-edge);
  box-shadow: var(--glass-shadow), inset 0 1px 0 var(--glass-highlight);
}
.case-meta-item dt { font-size: 12px; font-weight: 500; color: var(--ink-mute); letter-spacing: 0.04em; text-transform: uppercase; }
.case-meta-item dd { margin-top: 8px; font-size: 16px; font-weight: 500; color: var(--ink); letter-spacing: -0.01em; }

.case-figure { margin: 4px 0; }
.case-figure img { width: 100%; height: auto; }
.case-figure--full img { width: 100%; }
.figure-placeholder {
  aspect-ratio: 16 / 9; background: var(--slate);
  display: flex; align-items: center; justify-content: center;
}
.figure-placeholder .mono { width: 80px; opacity: 0.45; }
.figure-placeholder span { color: var(--white); opacity: 0.6; font-size: 14px; font-weight: 500; }

.prose { max-width: 680px; }
.prose p { font-size: 19px; line-height: 1.6; color: var(--ink-soft); letter-spacing: -0.01em; }
.prose p + p { margin-top: 24px; }
.prose h3 { margin-bottom: 16px; margin-top: 8px; }

.next-case { border-top: 1px solid var(--hair); }
.next-case a { display: flex; align-items: baseline; justify-content: space-between; gap: 20px; padding: 60px 0; }
.next-case .h2 { transition: color 180ms var(--ease); }
.next-case a:hover .h2 { color: var(--teal-deep); }

/* ---------- Contato ------------------------------------------------------ */
.contact-grid { display: grid; grid-template-columns: 1.1fr 0.9fr; gap: 60px; align-items: start; }
.contact-list {
  margin-top: 8px; border-radius: 20px; overflow: hidden;
  background: var(--glass-fill);
  -webkit-backdrop-filter: saturate(180%) blur(20px);
  backdrop-filter: saturate(180%) blur(20px);
  border: 1px solid var(--glass-edge);
  box-shadow: var(--glass-shadow), inset 0 1px 0 var(--glass-highlight);
}
.contact-list a { display: block; padding: 20px 22px; border-top: 1px solid var(--hair); transition: background 160ms var(--ease); }
.contact-list a:first-child { border-top: 0; }
.contact-list a:hover { background: var(--hair); }
.contact-list__row { display: flex; align-items: center; justify-content: space-between; gap: 16px; }
.contact-list__label { font-size: 13px; color: var(--ink-mute); font-weight: 500; letter-spacing: 0.02em; }
.contact-list__value { font-size: clamp(18px, 2.2vw, 24px); font-weight: 500; letter-spacing: var(--tr-tight); transition: color 160ms var(--ease); }
.contact-list a:hover .contact-list__value { color: var(--teal-deep); }

/* ---------- Footer ------------------------------------------------------- */
.footer { background: var(--footer-bg); color: var(--white); padding: 80px 0 40px; }
.footer__top { display: flex; justify-content: space-between; gap: 40px; flex-wrap: wrap; align-items: flex-start; }
.footer__brand .wordmark { height: 28px; width: auto; }
.footer__brand .wordmark path { fill: var(--white); }
.footer__tag { margin-top: 18px; max-width: 260px; font-size: 14px; line-height: 1.5; color: rgba(255,255,255,0.6); }
.footer__cols { display: flex; gap: 64px; flex-wrap: wrap; }
.footer__col h4 { font-size: 12px; font-weight: 500; letter-spacing: 0.06em; text-transform: uppercase; color: rgba(255,255,255,0.5); margin-bottom: 16px; }
.footer__col a { display: block; font-size: 15px; font-weight: 500; color: rgba(255,255,255,0.85); padding: 6px 0; letter-spacing: -0.01em; }
.footer__col a:hover { color: var(--white); }
.footer__bottom { margin-top: 64px; padding-top: 24px; border-top: 1px solid var(--hair-on-slate); display: flex; justify-content: space-between; gap: 16px; flex-wrap: wrap; font-size: 13px; color: rgba(255,255,255,0.5); }

/* ---------- Reveal anim -------------------------------------------------- */
.reveal { opacity: 0; transform: translateY(16px); transition: opacity 700ms var(--ease), transform 700ms var(--ease); }
.reveal.in { opacity: 1; transform: none; }
@keyframes nav-menu-in {
  from { opacity: 0; transform: translateY(-8px) scale(0.98); }
  to   { opacity: 1; transform: none; }
}
@media (prefers-reduced-motion: reduce) {
  .reveal { opacity: 1; transform: none; transition: none; }
  .nav--open .nav__links { animation: none; }
  html { scroll-behavior: auto; }
}

/* ---------- Responsivo --------------------------------------------------- */
@media (max-width: 860px) {
  :root { --pad: 22px; }
  .section { padding: 80px 0; }

  /* Nav = cápsula de vidro flutuante */
  .nav {
    top: 12px; left: 14px; right: 14px; width: calc(100% - 28px);
    height: 52px; border-radius: 26px;
    padding: 0 8px 0 18px;
    border: 1px solid var(--glass-edge);
    border-bottom: 1px solid var(--glass-edge);
    box-shadow: var(--glass-shadow), inset 0 1px 0 var(--glass-highlight);
  }
  main { padding-top: 84px; }
  .nav__inner { gap: 8px; flex-wrap: nowrap; }
  .nav__brand { margin-right: auto; }
  .nav__spacer { display: none; }
  .nav__name { display: none; }
  .nav__cta { display: none; }

  .nav__links { display: none; }
  .nav__burger { display: block; }
  .nav--open .nav__links {
    display: flex; flex-direction: column; gap: 2px;
    position: absolute; top: calc(100% + 10px); left: 0; right: 0;
    background: var(--nav-bg-solid);
    -webkit-backdrop-filter: saturate(180%) blur(24px);
    backdrop-filter: saturate(180%) blur(24px);
    padding: 10px; border-radius: 22px;
    border: 1px solid var(--glass-edge);
    box-shadow: var(--glass-shadow), inset 0 1px 0 var(--glass-highlight);
    animation: nav-menu-in 260ms var(--ease);
  }
  .nav--open .nav__links a {
    padding: 13px 14px; font-size: 16px; opacity: 1; border-radius: 14px;
    transition: background 160ms var(--ease), color 160ms var(--ease);
  }
  .nav--open .nav__links a:hover,
  .nav--open .nav__links a:active { background: var(--hair); }

  .grid--3, .grid--2 { grid-template-columns: 1fr; }
  .cases { grid-template-columns: 1fr; }
  .case-card, .case-card--full { aspect-ratio: 4 / 3; }
  .contact-grid { grid-template-columns: 1fr; gap: 40px; }
  .footer__top { flex-direction: column; }
}
