/* ---------- Tokens ---------- */
:root {
  --font-display: "Fraunces", Georgia, serif;
  --font-body: "Inter", system-ui, -apple-system, sans-serif;
  --radius: 4px;
  --wrap: 1180px;
  --ease: cubic-bezier(0.2, 0.7, 0.2, 1);
}
[data-theme="light"] {
  --bg: #f6f3ee;
  --bg-alt: #ece7df;
  --surface: #fffdf9;
  --text: #1c1b19;
  --muted: #6b665e;
  --line: #d9d2c6;
  --accent: #b5562b;       /* terracotta */
  --accent-ink: #ffffff;
  --blueprint: #1f3a5f;
  --band: #1f2a33;
  --band-text: #f3efe8;
}
[data-theme="dark"] {
  --bg: #121315;
  --bg-alt: #191b1e;
  --surface: #1e2024;
  --text: #ece8e1;
  --muted: #9c978e;
  --line: #2e3136;
  --accent: #e07a4a;
  --accent-ink: #121315;
  --blueprint: #8fb3e0;
  --band: #0b0c0d;
  --band-text: #ece8e1;
}

/* ---------- Base ---------- */
*,
*::before,
*::after { box-sizing: border-box; }
html { scroll-behavior: smooth; scroll-padding-top: 80px; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font: 400 17px/1.65 var(--font-body);
  -webkit-font-smoothing: antialiased;
  transition: background-color 0.3s, color 0.3s;
}
img { max-width: 100%; display: block; }
a { color: inherit; }
h1, h2, h3 { font-family: var(--font-display); font-weight: 400; line-height: 1.12; margin: 0 0 0.5em; letter-spacing: -0.01em; }
h1 { font-size: clamp(2.6rem, 6vw, 4.6rem); font-weight: 300; }
h2 { font-size: clamp(2rem, 4vw, 3rem); }
h3 { font-size: 1.3rem; font-weight: 500; }
h1 em, h2 em { font-style: italic; color: var(--accent); }
p { margin: 0 0 1em; }
.wrap { width: min(var(--wrap), 100% - 2.5rem); margin-inline: auto; }
.muted { color: var(--muted); }
.small { font-size: 0.875rem; }
.eyebrow {
  font-size: 0.78rem; font-weight: 600; letter-spacing: 0.16em; text-transform: uppercase;
  color: var(--accent); margin-bottom: 1rem;
}
.skip { position: absolute; left: -999px; }
.skip:focus { left: 1rem; top: 1rem; z-index: 100; background: var(--surface); padding: 0.5rem 1rem; }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; }

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex; align-items: center; gap: 0.5rem;
  padding: 0.85rem 1.5rem; border-radius: var(--radius);
  background: var(--accent); color: var(--accent-ink);
  font: 600 0.95rem var(--font-body); text-decoration: none; border: 1px solid var(--accent);
  cursor: pointer; transition: transform 0.2s var(--ease), filter 0.2s;
}
.btn:hover { transform: translateY(-2px); filter: brightness(1.06); }
.btn--sm { padding: 0.55rem 1rem; font-size: 0.85rem; }
.btn--ghost { background: transparent; color: var(--text); border-color: var(--line); }
.btn--ghost:hover { border-color: var(--text); }
.btn--light { background: var(--band-text); color: var(--band); border-color: var(--band-text); }
.btn--ghost-light { background: transparent; color: var(--band-text); border-color: rgba(255, 255, 255, 0.3); }

/* ---------- Nav ---------- */
.nav {
  position: sticky; top: 0; z-index: 50;
  background: color-mix(in srgb, var(--bg) 85%, transparent);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid transparent;
  transition: border-color 0.3s;
}
.nav.is-scrolled { border-bottom-color: var(--line); }
.nav__inner { display: flex; align-items: center; justify-content: space-between; height: 72px; gap: 1rem; }
.brand { display: flex; align-items: center; gap: 0.7rem; text-decoration: none; }
.brand__mark { width: 30px; height: 30px; fill: none; stroke: var(--accent); stroke-width: 1.8; stroke-linejoin: round; }
.brand b { font-family: var(--font-display); font-weight: 500; font-size: 1.25rem; display: block; line-height: 1; }
.brand small { font-size: 0.68rem; letter-spacing: 0.2em; text-transform: uppercase; color: var(--muted); }
.nav__links { display: flex; gap: 2rem; }
.nav__links a { text-decoration: none; font-size: 0.92rem; color: var(--muted); transition: color 0.2s; }
.nav__links a:hover { color: var(--text); }
.nav__actions { display: flex; align-items: center; gap: 0.75rem; }
.theme-toggle {
  width: 40px; height: 40px; display: grid; place-items: center;
  background: transparent; border: 1px solid var(--line); border-radius: 50%; color: var(--text); cursor: pointer;
}
.theme-toggle svg { width: 18px; height: 18px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; }
[data-theme="light"] .i-sun, [data-theme="dark"] .i-moon { display: none; }
.menu-toggle { display: none; background: none; border: 0; width: 40px; height: 40px; cursor: pointer; flex-direction: column; justify-content: center; gap: 6px; }
.menu-toggle span { display: block; height: 1.5px; width: 22px; margin-inline: auto; background: var(--text); transition: transform 0.3s; }
.nav.is-open .menu-toggle span:first-child { transform: translateY(3.75px) rotate(45deg); }
.nav.is-open .menu-toggle span:last-child { transform: translateY(-3.75px) rotate(-45deg); }

/* ---------- Hero ---------- */
.hero { padding: clamp(3rem, 8vw, 6rem) 0 clamp(4rem, 8vw, 7rem); }
.hero__grid { display: grid; grid-template-columns: 1.1fr 1fr; gap: 4rem; align-items: center; }
.lede { font-size: 1.15rem; color: var(--muted); max-width: 32rem; }
.hero__cta { display: flex; flex-wrap: wrap; gap: 0.75rem; margin: 2rem 0; }
.rating { display: flex; align-items: center; gap: 0.6rem; font-size: 0.9rem; color: var(--muted); }
.stars { color: #e3a008; letter-spacing: 2px; }
.blueprint { width: 100%; height: auto; }
.bp-gridline { fill: none; stroke: var(--blueprint); stroke-opacity: 0.12; stroke-width: 0.6; }
.bp-lines path { fill: none; stroke: var(--blueprint); stroke-width: 1.6; stroke-linejoin: round; }
.bp-lines .dim { stroke-width: 0.8; stroke-dasharray: 0; }
.bp-label { fill: var(--blueprint); font: 500 11px var(--font-body); letter-spacing: 0.12em; text-anchor: middle; }
.draw { stroke-dasharray: 1200; stroke-dashoffset: 1200; animation: draw 2.4s var(--ease) forwards; }
.draw:nth-child(2) { animation-delay: 0.3s; } .draw:nth-child(3) { animation-delay: 0.5s; }
.draw:nth-child(4) { animation-delay: 0.7s; } .draw:nth-child(5) { animation-delay: 0.9s; }
.draw:nth-child(6) { animation-delay: 1.1s; } .draw:nth-child(7) { animation-delay: 1.2s; }
.draw:nth-child(n+8) { animation-delay: 1.5s; }
@keyframes draw { to { stroke-dashoffset: 0; } }

/* ---------- Sections ---------- */
.section { padding: clamp(4rem, 9vw, 7rem) 0; }
.section--alt { background: var(--bg-alt); }
.section__head { max-width: 40rem; margin-bottom: 3rem; }
.split { display: grid; grid-template-columns: 1fr 1.2fr; gap: 4rem; }
.chips { list-style: none; padding: 0; margin: 1.5rem 0 0; display: flex; flex-wrap: wrap; gap: 0.5rem; }
.chips li { border: 1px solid var(--line); border-radius: 999px; padding: 0.35rem 0.9rem; font-size: 0.85rem; color: var(--muted); }

/* Services */
.cards { display: grid; grid-template-columns: repeat(3, 1fr); gap: 1px; background: var(--line); border: 1px solid var(--line); }
.card { background: var(--surface); padding: 2.2rem; transition: background-color 0.3s; }
.card:hover { background: var(--bg); }
.card__icon { width: 36px; height: 36px; fill: none; stroke: var(--accent); stroke-width: 1.4; stroke-linejoin: round; stroke-linecap: round; margin-bottom: 1.4rem; }
.card p { color: var(--muted); font-size: 0.95rem; margin: 0; }

/* Process */
.steps { list-style: none; padding: 0; margin: 0; display: grid; grid-template-columns: repeat(5, 1fr); gap: 2rem; counter-reset: s; }
.step { border-top: 1px solid var(--text); padding-top: 1.2rem; }
.step__n { display: block; font-family: var(--font-display); font-size: 0.95rem; color: var(--accent); margin-bottom: 0.6rem; }
.step p { color: var(--muted); font-size: 0.92rem; }

/* Projects */
.projects { display: grid; grid-template-columns: repeat(2, 1fr); gap: 1.5rem; }
.project { background: var(--surface); border: 1px solid var(--line); overflow: hidden; }
.project img, .project__ph { aspect-ratio: 16 / 10; width: 100%; object-fit: cover; }
.project__ph {
  display: grid; place-items: center;
  background-image: linear-gradient(var(--line) 1px, transparent 1px), linear-gradient(90deg, var(--line) 1px, transparent 1px);
  background-size: 24px 24px; background-color: var(--bg);
}
.project__ph svg { width: 40%; fill: none; stroke: var(--blueprint); stroke-width: 1; opacity: 0.55; }
.project__meta { padding: 1.3rem 1.5rem; }
.project__meta span { font-size: 0.72rem; letter-spacing: 0.16em; text-transform: uppercase; color: var(--accent); font-weight: 600; }
.project__meta h3 { margin: 0.3rem 0 0.2rem; }
.project__meta p { margin: 0; color: var(--muted); font-size: 0.9rem; }

/* Band */
.band { background: var(--band); color: var(--band-text); padding: clamp(4rem, 8vw, 6rem) 0; text-align: center; }
.band p { opacity: 0.75; }
.band .hero__cta { justify-content: center; margin-bottom: 0; }

/* Contact */
.contact { display: grid; grid-template-columns: 1fr 1fr; gap: 4rem; align-items: start; }
.info { margin: 0 0 2rem; }
.info > div { display: grid; grid-template-columns: 7rem 1fr; gap: 1rem; padding: 1rem 0; border-bottom: 1px solid var(--line); }
.info dt { font-size: 0.78rem; letter-spacing: 0.12em; text-transform: uppercase; color: var(--muted); padding-top: 0.2rem; }
.info dd { margin: 0; }
.info a { text-decoration: none; border-bottom: 1px solid var(--line); }
.form { background: var(--surface); border: 1px solid var(--line); padding: 2rem; display: grid; gap: 1rem; }
.form h3 { margin: 0; }
.form p { margin: 0; }
.form label { display: grid; gap: 0.4rem; font-size: 0.85rem; font-weight: 500; }
.form input, .form select, .form textarea {
  font: inherit; font-size: 1rem; color: var(--text); background: var(--bg);
  border: 1px solid var(--line); border-radius: var(--radius); padding: 0.75rem 0.9rem;
}
.form input:focus, .form select:focus, .form textarea:focus { outline: none; border-color: var(--accent); }
.form__error { color: var(--accent); font-size: 0.9rem; }
.map { margin-top: 3rem; border: 1px solid var(--line); overflow: hidden; }
.map iframe { display: block; width: 100%; height: 380px; border: 0; }
[data-theme="dark"] .map iframe { filter: invert(0.9) hue-rotate(180deg) saturate(0.6); }

/* Footer */
.footer { border-top: 1px solid var(--line); padding: 2rem 0; font-size: 0.85rem; color: var(--muted); }
.footer__inner { display: flex; justify-content: space-between; flex-wrap: wrap; gap: 1rem; }
.footer p { margin: 0; }
.footer a { text-decoration: none; }
.footer a:hover { color: var(--text); }

/* WhatsApp FAB */
.fab {
  position: fixed; right: 1.25rem; bottom: 1.25rem; z-index: 40;
  width: 54px; height: 54px; border-radius: 50%; display: grid; place-items: center;
  background: #25d366; color: #fff; box-shadow: 0 8px 24px rgba(0, 0, 0, 0.2); transition: transform 0.2s;
}
.fab:hover { transform: scale(1.08); }
.fab svg { width: 28px; height: 28px; fill: currentColor; }

/* Reveal */
.reveal { opacity: 0; transform: translateY(18px); transition: opacity 0.8s var(--ease) var(--d, 0ms), transform 0.8s var(--ease) var(--d, 0ms); }
.reveal.in { opacity: 1; transform: none; }

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .reveal { opacity: 1; transform: none; transition: none; }
  .draw { animation: none; stroke-dashoffset: 0; }
}

/* ---------- Responsive ---------- */
@media (max-width: 960px) {
  .hero__grid, .split, .contact { grid-template-columns: 1fr; gap: 2.5rem; }
  .hero__art { max-width: 440px; }
  .cards { grid-template-columns: repeat(2, 1fr); }
  .steps { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 760px) {
  .nav__links {
    position: absolute; top: 72px; left: 0; right: 0; flex-direction: column; gap: 0;
    background: var(--bg); border-bottom: 1px solid var(--line);
    max-height: 0; overflow: hidden; transition: max-height 0.35s var(--ease);
  }
  .nav.is-open .nav__links { max-height: 320px; }
  .nav__links a { padding: 1rem 1.25rem; border-top: 1px solid var(--line); }
  .menu-toggle { display: flex; }
  .nav__actions .btn--sm { display: none; }
  .cards, .projects, .steps { grid-template-columns: 1fr; }
  .info > div { grid-template-columns: 1fr; gap: 0.25rem; }
}
