/* ============================================================
   W-AI — Site Institucional (wai.tec.br)
   Design system herdado do ecossistema W-AI (landing/PWA):
   Playfair Display + Inter, dourado #D4A030 sobre fundo #0C0910.
   ============================================================ */

:root {
  --gold:        #D4A030;
  --gold-soft:   #E6BE5E;
  --gold-deep:   #A87A1E;
  --bordo:       #8C1824;
  --bordo-soft:  #9C2D3B;
  --bg:          #0C0910;
  --bg-soft:     #14101A;
  --bg-card:     #1A1520;
  --text:        #F5F1E8;
  --text-dim:    #C9C0B0;
  --text-muted:  #8A7E68;
  --border:      rgba(212, 160, 48, 0.15);
  --border-str:  rgba(212, 160, 48, 0.32);

  --font-serif: 'Playfair Display', Georgia, 'Times New Roman', serif;
  --font-sans:  'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;

  --wrap: 1120px;
  --radius: 14px;
  --shadow: 0 18px 48px rgba(0, 0, 0, 0.45);
}

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

html { scroll-behavior: smooth; scroll-padding-top: 88px; }

body {
  background: var(--bg);
  color: var(--text);
  font-family: var(--font-sans);
  font-size: 17px;
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  overflow-x: hidden;
}

img, svg { max-width: 100%; height: auto; display: block; }
a { color: var(--gold); text-decoration: none; transition: color .2s ease; }
a:hover { color: var(--gold-soft); }

::selection { background: var(--bordo); color: var(--text); }

:focus-visible { outline: 2px solid var(--gold); outline-offset: 3px; border-radius: 4px; }

/* ---------- Layout ---------- */
.wrap { width: 100%; max-width: var(--wrap); margin: 0 auto; padding: 0 24px; }

section { position: relative; }
.section { padding: 88px 0; }
.section--tight { padding: 64px 0; }
.section--alt { background: var(--bg-soft); border-top: 1px solid var(--border); border-bottom: 1px solid var(--border); }

.grid { display: grid; gap: 28px; }
.grid-2 { grid-template-columns: repeat(2, 1fr); }
.grid-3 { grid-template-columns: repeat(3, 1fr); }
.grid-4 { grid-template-columns: repeat(4, 1fr); }

/* ---------- Tipografia ---------- */
h1, h2, h3, h4 { font-family: var(--font-serif); font-weight: 700; line-height: 1.15; letter-spacing: -0.5px; }
h1 { font-size: clamp(38px, 5.6vw, 64px); }
h2 { font-size: clamp(29px, 3.6vw, 42px); }
h3 { font-size: clamp(20px, 2.2vw, 25px); }
h4 { font-size: 19px; }

p + p { margin-top: 16px; }
.lead { font-size: clamp(18px, 2vw, 21px); color: var(--text-dim); line-height: 1.6; }
.muted { color: var(--text-muted); }
.small { font-size: 14px; }

.eyebrow {
  display: inline-flex; align-items: center; gap: 10px;
  font-family: var(--font-sans); font-size: 12px; font-weight: 600;
  letter-spacing: 2.4px; text-transform: uppercase; color: var(--gold);
  margin-bottom: 18px;
}
.eyebrow::before { content: ''; width: 28px; height: 1px; background: var(--gold); opacity: .7; }

.section-head { max-width: 720px; margin-bottom: 48px; }
.section-head.center { margin-left: auto; margin-right: auto; text-align: center; }
.section-head.center .eyebrow::before { display: none; }
.section-head h2 + p { margin-top: 18px; }

.serif-quote {
  font-family: var(--font-serif); font-style: italic; font-weight: 600;
  font-size: clamp(21px, 2.8vw, 30px); line-height: 1.45; color: var(--gold-soft);
}

/* ---------- Botões ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 10px;
  font-family: var(--font-sans); font-size: 15px; font-weight: 600;
  padding: 14px 28px; border-radius: 999px; border: 1px solid transparent;
  cursor: pointer; transition: transform .18s ease, box-shadow .18s ease, background .2s ease, color .2s ease;
  white-space: nowrap;
}
.btn:hover { transform: translateY(-2px); }
.btn--primary { background: linear-gradient(135deg, var(--gold) 0%, var(--gold-deep) 100%); color: #17110A; }
.btn--primary:hover { color: #17110A; box-shadow: 0 12px 28px rgba(212, 160, 48, .28); }
.btn--ghost { border-color: var(--border-str); color: var(--text); }
.btn--ghost:hover { color: var(--gold); border-color: var(--gold); background: rgba(212, 160, 48, .06); }
.btn--wine { background: var(--bordo); color: var(--text); }
.btn--wine:hover { background: var(--bordo-soft); color: var(--text); box-shadow: 0 12px 28px rgba(140, 24, 36, .35); }
.btn-row { display: flex; flex-wrap: wrap; gap: 14px; }

/* ---------- Header ---------- */
.accent-line {
  position: fixed; inset: 0 0 auto 0; height: 3px; z-index: 60;
  background: linear-gradient(90deg, var(--bordo) 0%, var(--gold) 50%, var(--bordo) 100%);
  opacity: .65;
}

.site-header {
  position: sticky; top: 0; z-index: 50;
  background: rgba(12, 9, 16, .82);
  backdrop-filter: blur(14px); -webkit-backdrop-filter: blur(14px);
  border-bottom: 1px solid transparent;
  transition: border-color .25s ease, background .25s ease;
}
.site-header.is-scrolled { border-bottom-color: var(--border); background: rgba(12, 9, 16, .94); }
.site-header .wrap { display: flex; align-items: center; justify-content: space-between; gap: 24px; height: 76px; }

.brand { display: flex; align-items: center; gap: 12px; color: var(--text); }
.brand:hover { color: var(--text); }
.brand img { width: 40px; height: 40px; border-radius: 9px; }
.brand-name { font-family: var(--font-serif); font-size: 21px; font-weight: 700; color: var(--gold); letter-spacing: .5px; line-height: 1; }
.brand-tag { display: block; font-family: var(--font-sans); font-size: 10px; font-weight: 500; letter-spacing: 1.8px; text-transform: uppercase; color: var(--text-muted); margin-top: 4px; }

.nav { display: flex; align-items: center; gap: 32px; }
.nav a { font-size: 15px; font-weight: 500; color: var(--text-dim); position: relative; }
.nav a::after {
  content: ''; position: absolute; left: 0; right: 0; bottom: -7px; height: 1.5px;
  background: var(--gold); transform: scaleX(0); transform-origin: left; transition: transform .22s ease;
}
.nav a:hover, .nav a[aria-current="page"] { color: var(--gold); }
.nav a:hover::after, .nav a[aria-current="page"]::after { transform: scaleX(1); }
.nav .btn { color: #17110A; }
.nav .btn::after { display: none; }

.nav-toggle {
  display: none; width: 44px; height: 44px; border: 1px solid var(--border-str);
  border-radius: 10px; background: transparent; cursor: pointer;
  align-items: center; justify-content: center; flex-direction: column; gap: 5px;
}
.nav-toggle span { display: block; width: 18px; height: 1.5px; background: var(--gold); transition: transform .22s ease, opacity .22s ease; }
.nav-toggle[aria-expanded="true"] span:nth-child(1) { transform: translateY(6.5px) rotate(45deg); }
.nav-toggle[aria-expanded="true"] span:nth-child(2) { opacity: 0; }
.nav-toggle[aria-expanded="true"] span:nth-child(3) { transform: translateY(-6.5px) rotate(-45deg); }

/* ---------- Hero ---------- */
.hero { position: relative; overflow: hidden; padding: 96px 0 88px; }
.hero::before {
  content: ''; position: absolute; inset: 0; z-index: 0; pointer-events: none;
  background:
    radial-gradient(ellipse 80% 60% at 15% 0%, rgba(140, 24, 36, .20) 0%, transparent 60%),
    radial-gradient(ellipse 70% 55% at 85% 25%, rgba(212, 160, 48, .10) 0%, transparent 65%);
}
.hero > .wrap { position: relative; z-index: 1; }
.hero-grid { display: grid; grid-template-columns: 1.05fr .95fr; gap: 56px; align-items: center; }
.hero h1 { color: var(--text); }
.hero h1 em { font-style: italic; color: var(--gold); }
.hero .lead { margin-top: 24px; max-width: 56ch; }
.hero .btn-row { margin-top: 36px; }
.hero-art { position: relative; }
.hero-art svg { width: 100%; filter: drop-shadow(0 24px 60px rgba(0, 0, 0, .6)); }

.hero-stats { display: flex; flex-wrap: wrap; gap: 40px; margin-top: 52px; padding-top: 32px; border-top: 1px solid var(--border); }
.hero-stats .stat b { display: block; font-family: var(--font-serif); font-size: 30px; color: var(--gold); line-height: 1.1; }
.hero-stats .stat span { font-size: 13px; color: var(--text-muted); letter-spacing: .4px; }

/* ---------- Page hero (páginas internas) ---------- */
.page-hero { padding: 72px 0 56px; border-bottom: 1px solid var(--border); position: relative; overflow: hidden; }
.page-hero::before {
  content: ''; position: absolute; inset: 0; z-index: 0; pointer-events: none;
  background: radial-gradient(ellipse 70% 100% at 20% 0%, rgba(140, 24, 36, .16) 0%, transparent 65%);
}
.page-hero > .wrap { position: relative; z-index: 1; }
.page-hero .lead { max-width: 70ch; margin-top: 18px; }

/* ---------- Cards ---------- */
.card {
  background: linear-gradient(160deg, var(--bg-card) 0%, rgba(20, 16, 26, .55) 100%);
  border: 1px solid var(--border); border-radius: var(--radius);
  padding: 32px 28px; transition: transform .22s ease, border-color .22s ease, box-shadow .22s ease;
}
.card:hover { transform: translateY(-4px); border-color: var(--border-str); box-shadow: var(--shadow); }
.card h3 { margin-bottom: 12px; }
.card h3 + p, .card p { color: var(--text-dim); font-size: 16px; }
.card .card-icon { width: 52px; height: 52px; margin-bottom: 20px; color: var(--gold); }
.card .card-icon svg { width: 100%; height: 100%; }
.card--flat:hover { transform: none; box-shadow: none; }

.card-num {
  font-family: var(--font-serif); font-size: 15px; font-weight: 700; color: var(--bg);
  width: 34px; height: 34px; border-radius: 50%; background: var(--gold);
  display: flex; align-items: center; justify-content: center; margin-bottom: 18px;
}

/* ---------- Split (texto + arte) ---------- */
.split { display: grid; grid-template-columns: 1fr 1fr; gap: 56px; align-items: center; }
.split--reverse .split-art { order: -1; }
.split-art svg { width: 100%; }

/* ---------- Listas ---------- */
.checklist { list-style: none; display: grid; gap: 14px; margin-top: 24px; }
.checklist li { position: relative; padding-left: 32px; color: var(--text-dim); font-size: 16px; }
.checklist li::before {
  content: ''; position: absolute; left: 0; top: 9px; width: 16px; height: 9px;
  border-left: 2px solid var(--gold); border-bottom: 2px solid var(--gold);
  transform: rotate(-45deg);
}

.dl-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 1px; background: var(--border); border: 1px solid var(--border); border-radius: var(--radius); overflow: hidden; }
.dl-grid > div { background: var(--bg-card); padding: 22px 24px; }
.dl-grid dt { font-size: 12px; letter-spacing: 1.6px; text-transform: uppercase; color: var(--text-muted); margin-bottom: 6px; }
.dl-grid dd { font-size: 16px; color: var(--text); }

/* ---------- Timeline ---------- */
.timeline { list-style: none; position: relative; padding-left: 34px; }
.timeline::before { content: ''; position: absolute; left: 7px; top: 8px; bottom: 8px; width: 1px; background: linear-gradient(180deg, var(--gold) 0%, var(--bordo) 100%); opacity: .5; }
.timeline li { position: relative; padding-bottom: 34px; }
.timeline li:last-child { padding-bottom: 0; }
.timeline li::before { content: ''; position: absolute; left: -34px; top: 7px; width: 15px; height: 15px; border-radius: 50%; background: var(--bg); border: 2px solid var(--gold); }
.timeline b { display: block; font-family: var(--font-serif); font-size: 19px; color: var(--gold); }
.timeline span { color: var(--text-dim); font-size: 16px; }

/* ---------- CTA ---------- */
.cta {
  border: 1px solid var(--border-str); border-radius: 20px; padding: 56px 48px; text-align: center;
  background:
    radial-gradient(ellipse 90% 140% at 50% 0%, rgba(140, 24, 36, .28) 0%, transparent 70%),
    var(--bg-card);
}
.cta h2 { margin-bottom: 16px; }
.cta .lead { max-width: 58ch; margin: 0 auto 32px; }
.cta .btn-row { justify-content: center; }

/* ---------- Formulário ---------- */
.form-card { background: var(--bg-card); border: 1px solid var(--border); border-radius: var(--radius); padding: 36px 32px; position: relative; }
.field { display: block; margin-bottom: 20px; }
.field > span { display: block; font-size: 13px; font-weight: 600; letter-spacing: .6px; color: var(--text-dim); margin-bottom: 8px; }
.field > span em { font-style: normal; color: var(--bordo-soft); }
.field input, .field select, .field textarea {
  width: 100%; background: rgba(12, 9, 16, .75); color: var(--text);
  border: 1px solid var(--border); border-radius: 10px; padding: 13px 16px;
  font-family: var(--font-sans); font-size: 16px; transition: border-color .2s ease, box-shadow .2s ease;
}
.field input:focus, .field select:focus, .field textarea:focus {
  outline: none; border-color: var(--gold); box-shadow: 0 0 0 3px rgba(212, 160, 48, .12);
}
.field textarea { min-height: 140px; resize: vertical; }
.field select { appearance: none; -webkit-appearance: none; background-image: linear-gradient(45deg, transparent 50%, var(--gold) 50%), linear-gradient(135deg, var(--gold) 50%, transparent 50%); background-position: calc(100% - 20px) 21px, calc(100% - 14px) 21px; background-size: 6px 6px, 6px 6px; background-repeat: no-repeat; }
.field-row { display: grid; grid-template-columns: 1fr 1fr; gap: 20px; }
.consent { display: flex; gap: 12px; align-items: flex-start; font-size: 14px; color: var(--text-muted); margin-bottom: 24px; }
.consent input { width: 18px; height: 18px; margin-top: 3px; accent-color: var(--gold); flex-shrink: 0; }
.hp { position: absolute; left: -9999px; opacity: 0; height: 0; overflow: hidden; }
.form-status { margin-top: 18px; font-size: 15px; display: none; padding: 14px 16px; border-radius: 10px; }
.form-status.is-ok { display: block; color: #9ED9A8; background: rgba(60, 140, 80, .12); border: 1px solid rgba(120, 200, 140, .3); }
.form-status.is-err { display: block; color: #F0A9A9; background: rgba(160, 40, 40, .12); border: 1px solid rgba(200, 90, 90, .3); }

/* ---------- Canais de contato ---------- */
.channel { display: flex; gap: 16px; align-items: flex-start; padding: 20px 0; border-bottom: 1px solid var(--border); }
.channel:last-child { border-bottom: none; }
.channel-icon { width: 42px; height: 42px; flex-shrink: 0; color: var(--gold); border: 1px solid var(--border); border-radius: 11px; display: flex; align-items: center; justify-content: center; }
.channel-icon svg { width: 20px; height: 20px; }
.channel b { display: block; font-size: 13px; letter-spacing: 1.4px; text-transform: uppercase; color: var(--text-muted); font-weight: 600; margin-bottom: 4px; }
.channel a, .channel p { font-size: 16px; color: var(--text); }
.channel a:hover { color: var(--gold); }

/* ---------- Rodapé ---------- */
.site-footer { border-top: 1px solid var(--border); background: var(--bg-soft); padding: 64px 0 32px; }
.footer-grid { display: grid; grid-template-columns: 1.5fr 1fr 1fr 1.2fr; gap: 40px; }
.footer-grid h5 { font-family: var(--font-sans); font-size: 12px; letter-spacing: 1.8px; text-transform: uppercase; color: var(--gold); margin-bottom: 18px; font-weight: 600; }
.footer-grid ul { list-style: none; display: grid; gap: 11px; }
.footer-grid a, .footer-grid p { font-size: 15px; color: var(--text-dim); }
.footer-grid a:hover { color: var(--gold); }
.footer-brand p { margin-top: 18px; max-width: 34ch; font-size: 15px; color: var(--text-muted); }
.footer-bottom {
  margin-top: 48px; padding-top: 26px; border-top: 1px solid var(--border);
  display: flex; flex-wrap: wrap; gap: 12px 28px; justify-content: space-between; align-items: center;
  font-size: 13px; color: var(--text-muted);
}
.footer-bottom a { color: var(--text-muted); }
.footer-bottom a:hover { color: var(--gold); }

/* ---------- Legal ---------- */
.legal { max-width: 780px; }
.legal h2 { font-size: 26px; margin: 44px 0 14px; }
.legal h3 { font-size: 19px; margin: 28px 0 10px; }
.legal p, .legal li { color: var(--text-dim); font-size: 16px; }
.legal ul, .legal ol { margin: 14px 0 14px 22px; display: grid; gap: 8px; }

/* ---------- Projetos / galerias ---------- */
.projeto { padding: 84px 0; border-top: 1px solid var(--border); }
.projeto:first-of-type { border-top: none; }

.projeto-head { display: grid; grid-template-columns: 1fr 1fr; gap: 56px; align-items: start; margin-bottom: 44px; }
.projeto-head h2 { margin-bottom: 16px; }
.projeto-head p { color: var(--text-dim); }

.tags { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 22px; }
.tag {
  font-size: 11.5px; font-weight: 600; letter-spacing: 1px; text-transform: uppercase;
  color: var(--gold); border: 1px solid var(--border-str); border-radius: 999px; padding: 5px 13px;
}

.shots { display: grid; gap: 20px; }
.shots-2 { grid-template-columns: repeat(2, 1fr); }
.shots-3 { grid-template-columns: repeat(3, 1fr); }
.shots-5 { grid-template-columns: repeat(5, 1fr); }
.shots + .shots { margin-top: 20px; }

.shot { margin: 0; }
.shot img {
  width: 100%; border-radius: 12px; border: 1px solid var(--border);
  background: var(--bg-card); cursor: zoom-in;
  transition: transform .25s ease, border-color .25s ease, box-shadow .25s ease;
}
.shot img:hover { transform: translateY(-4px); border-color: var(--border-str); box-shadow: var(--shadow); }
.shot figcaption { margin-top: 11px; font-size: 13px; line-height: 1.45; color: var(--text-muted); }
.shots--fone .shot img { border-radius: 18px; }

.nota-imagem {
  margin-top: 26px; font-size: 13px; color: var(--text-muted); line-height: 1.55;
  border-left: 2px solid var(--border-str); padding-left: 16px; max-width: 76ch;
}

/* Vitrine de projetos na home */
.vitrine { display: grid; grid-template-columns: repeat(2, 1fr); gap: 24px; }
.vitrine a {
  display: block; border: 1px solid var(--border); border-radius: var(--radius);
  overflow: hidden; background: var(--bg-card); color: var(--text);
  transition: transform .22s ease, border-color .22s ease, box-shadow .22s ease;
}
.vitrine a:hover { transform: translateY(-4px); border-color: var(--border-str); box-shadow: var(--shadow); color: var(--text); }
.vitrine img { width: 100%; aspect-ratio: 16 / 9; object-fit: cover; object-position: top center; border-bottom: 1px solid var(--border); }
.vitrine .vitrine-txt { padding: 24px 26px 28px; }
.vitrine h3 { font-size: 21px; margin-bottom: 8px; }
.vitrine p { font-size: 15px; color: var(--text-dim); }
.vitrine .vitrine-mais { display: inline-block; margin-top: 16px; font-size: 14px; font-weight: 600; color: var(--gold); }

/* Lightbox */
.lightbox {
  position: fixed; inset: 0; z-index: 100; display: none;
  align-items: center; justify-content: center; padding: 40px 24px;
  background: rgba(6, 4, 8, .95); cursor: zoom-out;
}
.lightbox.is-open { display: flex; }
.lightbox img { max-width: min(1200px, 100%); max-height: 90vh; width: auto; border-radius: 10px; box-shadow: 0 30px 80px rgba(0,0,0,.7); }
.lightbox-fechar {
  position: absolute; top: 18px; right: 22px; width: 44px; height: 44px;
  border: 1px solid var(--border-str); border-radius: 50%; background: transparent;
  color: var(--gold); font-size: 22px; line-height: 1; cursor: pointer;
}
.lightbox-fechar:hover { background: rgba(212, 160, 48, .1); }

/* ---------- Animação de entrada ---------- */
.reveal { opacity: 0; transform: translateY(22px); transition: opacity .6s ease, transform .6s ease; }
.reveal.is-visible { opacity: 1; transform: none; }

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { animation-duration: .01ms !important; transition-duration: .01ms !important; }
  .reveal { opacity: 1; transform: none; }
}

/* ---------- Responsivo ---------- */
@media (max-width: 980px) {
  .hero-grid, .split { grid-template-columns: 1fr; gap: 40px; }
  .split--reverse .split-art { order: 0; }
  .hero-art { max-width: 460px; margin: 0 auto; }
  .grid-4 { grid-template-columns: repeat(2, 1fr); }
  .grid-3 { grid-template-columns: repeat(2, 1fr); }
  .footer-grid { grid-template-columns: 1fr 1fr; gap: 36px; }
  .projeto-head { grid-template-columns: 1fr; gap: 28px; }
  .shots-3 { grid-template-columns: repeat(2, 1fr); }
  .shots-5 { grid-template-columns: repeat(3, 1fr); }
}

@media (max-width: 760px) {
  body { font-size: 16px; }
  .section { padding: 64px 0; }
  .nav-toggle { display: flex; }
  .nav {
    position: fixed; inset: 79px 0 auto 0; flex-direction: column; align-items: stretch; gap: 0;
    background: var(--bg-soft); border-bottom: 1px solid var(--border);
    padding: 8px 24px 24px; transform: translateY(-130%); transition: transform .3s ease; z-index: 45;
  }
  .nav.is-open { transform: none; }
  .nav a { padding: 15px 0; border-bottom: 1px solid var(--border); font-size: 16px; }
  .nav a::after { display: none; }
  .nav .btn { margin-top: 18px; justify-content: center; border-bottom: none; }
  .grid-2, .grid-3, .grid-4, .field-row, .dl-grid, .vitrine { grid-template-columns: 1fr; }
  .footer-grid { grid-template-columns: 1fr; }
  .projeto { padding: 60px 0; }
  .shots-2, .shots-3 { grid-template-columns: 1fr; }
  .shots-5 { grid-template-columns: repeat(2, 1fr); }
  .cta { padding: 40px 24px; }
  .hero-stats { gap: 28px; }
  .hero-stats .stat { flex: 1 1 40%; }
}
