/* ============================================================
   Sysdev — design tokens
   Derivados da identidade existente: Forest #1C2B1A, Cobre #C4783A,
   Papel #F5F2EE, Fraunces (display/italic) + DM Sans (corpo/UI).
   ============================================================ */

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

html {
  visibility: hidden;
  color-scheme: light;
  scroll-behavior: smooth;
}
html[data-lang-ready="1"] { visibility: visible; }
html[data-theme="dark"] { color-scheme: dark; }

:root {
  --font-display: 'Fraunces', Georgia, serif;
  --font-body: 'DM Sans', system-ui, sans-serif;

  --accent: #C4783A;
  --accent-strong: #A6612B;
  --accent-on: #F5F2EE;

  /* Light theme (padrão) */
  --bg: #F5F2EE;
  --bg-alt: #EFEAE2;
  --surface: #FFFFFF;
  --surface-2: #F0EDE8;
  --text: #1C2B1A;
  --text-muted: #6B6660;
  --line: #DDD8CE;
  --logo-mark: #1C2B1A;
  --shadow: 0 1px 2px rgba(28, 43, 26, 0.04), 0 8px 24px rgba(28, 43, 26, 0.06);
  --focus-ring: #1C2B1A;

  --radius-s: 4px;
  --radius-m: 10px;
  --container: 1180px;

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

html[data-theme="dark"] {
  --bg: #10160D;
  --bg-alt: #141C10;
  --surface: #1C2B1A;
  --surface-2: #202F1D;
  --text: #F1EEE7;
  --text-muted: #A9A49C;
  --line: #2C3A28;
  --logo-mark: #2C3D2A;
  --shadow: 0 1px 2px rgba(0, 0, 0, 0.2), 0 12px 32px rgba(0, 0, 0, 0.35);
  --focus-ring: #F1EEE7;
}

body {
  background: var(--bg);
  color: var(--text);
  font-family: var(--font-body);
  font-size: 16px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  transition: background-color 300ms var(--ease), color 300ms var(--ease);
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.001ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.001ms !important;
    scroll-behavior: auto !important;
  }
}

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

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

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

section[id] { scroll-margin-top: 84px; }

.skip-link {
  position: absolute;
  left: 16px;
  top: -60px;
  z-index: 100;
  background: var(--accent);
  color: var(--accent-on);
  padding: 12px 18px;
  border-radius: var(--radius-s);
  font-weight: 600;
  font-size: 14px;
  transition: top 180ms var(--ease);
}
.skip-link:focus {
  top: 16px;
}

h1, h2, h3, h4 {
  font-family: var(--font-display);
  font-weight: 900;
  letter-spacing: -0.01em;
  line-height: 1.08;
  margin: 0;
}

p { margin: 0; }

.accent {
  font-style: italic;
  font-weight: 700;
  color: var(--accent);
}

.eyebrow {
  font-family: var(--font-body);
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--text-muted);
  display: inline-flex;
  align-items: center;
  gap: 0.6em;
}
.eyebrow::before {
  content: "";
  width: 18px;
  height: 1px;
  background: var(--accent);
  display: inline-block;
}

.container {
  width: 100%;
  max-width: var(--container);
  margin-inline: auto;
  padding-inline: clamp(20px, 5vw, 40px);
}

.section {
  padding-block: clamp(64px, 10vw, 120px);
}
.section-tight { padding-block: clamp(40px, 6vw, 72px); }

.section-head {
  max-width: 640px;
  margin-bottom: clamp(32px, 5vw, 56px);
}
.section-head h2 {
  font-size: clamp(28px, 3.6vw, 42px);
  margin-top: 0.5em;
}

/* ---------- Notch shape (assinatura visual: cantos cortados do símbolo) ---------- */
.notch {
  clip-path: polygon(0 0, calc(100% - 22px) 0, 100% 22px, 100% 100%, 0 100%);
}
.notch-sm {
  clip-path: polygon(0 0, calc(100% - 14px) 0, 100% 14px, 100% 100%, 0 100%);
}

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 0.5em;
  font-family: var(--font-body);
  font-weight: 600;
  font-size: 15px;
  padding: 14px 26px;
  border-radius: var(--radius-s);
  border: 1px solid transparent;
  cursor: pointer;
  transition: transform 180ms var(--ease), background-color 180ms var(--ease), border-color 180ms var(--ease), color 180ms var(--ease);
  white-space: nowrap;
}
.btn:active { transform: translateY(1px); }

.btn-primary {
  background: var(--accent);
  color: var(--accent-on);
}
.btn-primary:hover { background: var(--accent-strong); }

.btn-ghost {
  background: transparent;
  border-color: var(--line);
  color: var(--text);
}
.btn-ghost:hover { border-color: var(--text-muted); }

.btn svg { width: 18px; height: 18px; }

/* ---------- Logo ---------- */
.logo {
  display: inline-flex;
  align-items: center;
  gap: 0.65rem;
}
.logo-mark { flex-shrink: 0; }
.logo-mark polygon.body { fill: var(--logo-mark); transition: fill 300ms var(--ease); }
.logo-mark polygon.corner { fill: var(--accent); }
.logo-mark text { fill: var(--accent); font-family: var(--font-display); font-style: italic; font-weight: 900; }
.logo-word { display: inline-flex; align-items: baseline; font-size: 21px; }
.logo-sys { font-family: var(--font-body); font-weight: 700; color: var(--text); letter-spacing: -0.02em; }
.logo-dev { font-family: var(--font-display); font-weight: 700; font-style: italic; color: var(--accent); }

/* ---------- Header / nav ---------- */
.site-header {
  position: sticky;
  top: 0;
  z-index: 40;
  background: color-mix(in srgb, var(--bg) 88%, transparent);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--line);
}
.nav {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding-block: 16px;
  gap: 24px;
}
.nav-links {
  display: flex;
  align-items: center;
  gap: 28px;
  list-style: none;
  margin: 0;
  padding: 0;
  font-size: 14px;
  font-weight: 500;
}
.nav-links a {
  color: var(--text-muted);
  transition: color 180ms var(--ease);
}
.nav-links a:hover { color: var(--text); }

.nav-actions {
  display: flex;
  align-items: center;
  gap: 10px;
}

.icon-btn {
  width: 38px;
  height: 38px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 999px;
  border: 1px solid var(--line);
  background: transparent;
  color: var(--text);
  cursor: pointer;
  transition: border-color 180ms var(--ease), background-color 180ms var(--ease);
}
.icon-btn:hover { border-color: var(--text-muted); }
.icon-btn svg { width: 18px; height: 18px; }

.lang-btn {
  font-family: var(--font-body);
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.04em;
}

.theme-icon-dark { display: none; }
html[data-theme="dark"] .theme-icon-light { display: none; }
html[data-theme="dark"] .theme-icon-dark { display: block; }

.nav-toggle {
  display: none;
  width: 38px;
  height: 38px;
  border-radius: var(--radius-s);
  border: 1px solid var(--line);
  background: transparent;
  align-items: center;
  justify-content: center;
  cursor: pointer;
}
.nav-toggle svg { width: 20px; height: 20px; }

/* ---------- Hero ---------- */
.hero {
  padding-block: clamp(72px, 12vw, 140px) clamp(56px, 8vw, 96px);
  position: relative;
  overflow: hidden;
}
.hero::before {
  content: "";
  position: absolute;
  inset: -20% -10% auto auto;
  width: 620px;
  height: 620px;
  background: radial-gradient(circle, color-mix(in srgb, var(--accent) 16%, transparent) 0%, transparent 70%);
  pointer-events: none;
}
.hero-inner {
  position: relative;
  max-width: 760px;
}
.hero h1 {
  font-size: clamp(38px, 6vw, 68px);
  margin-top: 0.55em;
}
.hero p.lead {
  margin-top: 24px;
  font-size: clamp(17px, 2vw, 19px);
  color: var(--text-muted);
  max-width: 560px;
}
.hero-ctas {
  display: flex;
  flex-wrap: wrap;
  gap: 14px;
  margin-top: 36px;
}
.hero-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 56px;
}
.hero-tag {
  font-size: 13px;
  font-weight: 600;
  padding: 8px 14px;
  border-radius: 999px;
  border: 1px solid var(--line);
  color: var(--text-muted);
}

/* ---------- Strip (legal / trust) ---------- */
.strip {
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
  background: var(--bg-alt);
}
.strip-inner {
  display: flex;
  flex-wrap: wrap;
  gap: 12px 32px;
  padding-block: 18px;
  font-size: 13px;
  color: var(--text-muted);
}
.strip-inner strong { color: var(--text); font-weight: 600; }

/* ---------- Cards / grid ---------- */
.grid-3 {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 20px;
}
.grid-4 {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 20px;
}

.card {
  background: var(--surface);
  border: 1px solid var(--line);
  padding: 32px 28px;
  box-shadow: var(--shadow);
  display: flex;
  flex-direction: column;
  gap: 14px;
}
.card .card-icon {
  width: 44px;
  height: 44px;
  border-radius: var(--radius-s);
  background: var(--surface-2);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: var(--accent);
}
.card .card-icon svg { width: 22px; height: 22px; }
.card h3 {
  font-size: 19px;
  font-weight: 700;
  font-style: italic;
  color: var(--text);
}
.card p { color: var(--text-muted); font-size: 14.5px; }
.card .card-link {
  margin-top: auto;
  font-size: 13.5px;
  font-weight: 600;
  color: var(--accent);
  display: inline-flex;
  align-items: center;
  gap: 6px;
}
.card .card-link svg { width: 14px; height: 14px; }

/* ---------- Process ---------- */
.process-list {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 28px;
  counter-reset: step;
}
.process-item {
  border-top: 1px solid var(--line);
  padding-top: 20px;
}
.process-num {
  font-family: var(--font-display);
  font-style: italic;
  font-weight: 700;
  color: var(--accent);
  font-size: 15px;
  display: block;
  margin-bottom: 14px;
}
.process-item h3 {
  font-size: 18px;
  font-weight: 700;
  margin-bottom: 8px;
}
.process-item p { color: var(--text-muted); font-size: 14.5px; }

/* ---------- Mission ---------- */
.mission {
  background: var(--surface-2);
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
}
.mission-inner {
  display: grid;
  grid-template-columns: 0.9fr 1.1fr;
  gap: 48px;
  align-items: center;
  padding-block: clamp(56px, 9vw, 100px);
}
.mission blockquote {
  font-family: var(--font-display);
  font-style: italic;
  font-weight: 600;
  font-size: clamp(22px, 3vw, 32px);
  line-height: 1.35;
  color: var(--text);
  margin: 0;
}

/* ---------- Values ---------- */
.values-list {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 1px;
  background: var(--line);
  border: 1px solid var(--line);
}
.value-item {
  background: var(--bg);
  padding: 28px;
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.value-item h3 {
  font-size: 17px;
  font-weight: 700;
  font-style: italic;
}
.value-item p { color: var(--text-muted); font-size: 14.5px; }

/* ---------- About ---------- */
.about-inner {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 48px;
  align-items: start;
}
.about-figure {
  aspect-ratio: 4 / 5;
  background:
    radial-gradient(circle at 18px 18px, color-mix(in srgb, var(--text) 14%, transparent) 1.5px, transparent 1.6px) 0 0 / 24px 24px,
    var(--surface-2);
  border: 1px solid var(--line);
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 28px;
}
.about-figure::after {
  content: "";
  position: absolute;
  inset: 18px;
  border: 1px solid var(--line);
  pointer-events: none;
}
.about-figure .logo-mark-big {
  width: 46%;
  height: auto;
  filter: drop-shadow(0 18px 30px rgba(0, 0, 0, 0.18));
}
.about-figure .logo-mark-big polygon.body { fill: var(--logo-mark); }
.about-figure .logo-mark-big polygon.corner { fill: var(--accent); }
.about-figure .logo-mark-big text { fill: var(--accent); }
.about-figure .figure-caption {
  position: absolute;
  left: 28px;
  bottom: 28px;
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--text-muted);
}
.about-text p { color: var(--text-muted); margin-top: 18px; }
.about-legal {
  margin-top: 28px;
  padding-top: 20px;
  border-top: 1px solid var(--line);
  font-size: 13px;
  color: var(--text-muted);
}

/* ---------- Agency split ---------- */
.agency-split {
  background: var(--text);
  color: var(--bg);
  position: relative;
  overflow: hidden;
}
html[data-theme="dark"] .agency-split { background: var(--surface-2); }
.agency-split .eyebrow { color: color-mix(in srgb, var(--bg) 65%, transparent); }
.agency-split .eyebrow::before { background: var(--accent); }
.agency-split-inner {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 32px;
  padding-block: clamp(48px, 7vw, 80px);
}
.agency-split h2 {
  color: var(--bg);
  font-size: clamp(24px, 3vw, 34px);
  max-width: 480px;
  margin-top: 0.5em;
}
.agency-split p { color: color-mix(in srgb, var(--bg) 70%, transparent); margin-top: 12px; max-width: 440px; }
html[data-theme="dark"] .agency-split h2,
html[data-theme="dark"] .agency-split p { color: var(--text); }
html[data-theme="dark"] .agency-split .eyebrow { color: var(--text-muted); }

/* ---------- Final CTA ---------- */
.cta-final { text-align: center; }
.cta-final h2 {
  font-size: clamp(30px, 4.5vw, 52px);
  max-width: 720px;
  margin-inline: auto;
}
.cta-final p.lead {
  max-width: 480px;
  margin-inline: auto;
  margin-top: 18px;
  color: var(--text-muted);
}
.cta-final .hero-ctas { justify-content: center; margin-top: 32px; }

/* ---------- Footer ---------- */
footer {
  border-top: 1px solid var(--line);
  padding-block: 56px 32px;
}
.footer-grid {
  display: grid;
  grid-template-columns: 1.4fr 1fr 1fr;
  gap: 32px;
}
.footer-tagline {
  margin-top: 16px;
  color: var(--text-muted);
  font-size: 14px;
  max-width: 280px;
}
.footer-col h4 {
  font-family: var(--font-body);
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--text-muted);
  margin-bottom: 14px;
}
.footer-col ul {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 10px;
  font-size: 14.5px;
}
.footer-col a:hover { color: var(--accent); }
.footer-bottom {
  margin-top: 48px;
  padding-top: 24px;
  border-top: 1px solid var(--line);
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 12px;
  font-size: 12.5px;
  color: var(--text-muted);
}

/* ---------- Reveal on scroll ---------- */
.reveal {
  opacity: 0;
  transform: translateY(14px);
  transition: opacity 600ms var(--ease), transform 600ms var(--ease);
}
.reveal.is-visible {
  opacity: 1;
  transform: none;
}

/* ---------- Responsive ---------- */
@media (max-width: 960px) {
  .grid-3, .process-list { grid-template-columns: 1fr 1fr; }
  .grid-4 { grid-template-columns: repeat(2, 1fr); }
  .mission-inner, .about-inner { grid-template-columns: 1fr; }
  .footer-grid { grid-template-columns: 1fr 1fr; }
}

@media (max-width: 720px) {
  .nav-links { display: none; }
  .nav-toggle { display: inline-flex; }
  .nav-actions .btn-primary { display: none; }
  .grid-3, .grid-4, .process-list, .values-list { grid-template-columns: 1fr; }
  .footer-grid { grid-template-columns: 1fr; }
  .agency-split-inner { flex-direction: column; align-items: flex-start; }
}

@media (max-width: 400px) {
  .nav-actions { gap: 6px; }
}

/* Mobile nav drawer */
.nav-drawer {
  display: none;
  flex-direction: column;
  gap: 4px;
  padding: 8px 0 20px;
  border-top: 1px solid var(--line);
}
.nav-drawer.is-open { display: flex; }
.nav-drawer a:not(.btn) {
  padding: 12px 4px;
  font-size: 15px;
  font-weight: 500;
  color: var(--text-muted);
  border-bottom: 1px solid var(--line);
}
.nav-drawer .btn { margin-top: 12px; justify-content: center; }
