/* =========================================================
   Metis — shared styling tokens & primitives
   v1.0 · 2026/1 · AGES
   ========================================================= */

:root {
  /* Surfaces */
  --bg: #F4F1EB;          /* off-white quente */
  --bg-2: #EAE7E0;        /* slightly darker surface */
  --bg-card: #FFFFFF;
  --bg-deep: #2C5142;     /* verde musgo escuro */
  --bg-moss: #3D6B55;     /* verde musgo */
  --bg-mint: #E8F3ED;     /* verde claro */
  --bg-mint-2: #C2DCCF;

  /* Text */
  --ink: #1A1E1C;
  --ink-2: #4D5652;
  --ink-3: #8C9691;
  --ink-inverse: #FEFEFE;

  /* Lines */
  --line: #D8D4CC;
  --line-soft: #EAE7E0;
  --line-strong: #1A1E1C;

  /* Accents */
  --accent: #7A3A3A;       /* bordô dessaturado */
  --gold: #E0A52A;
  --moss: #3D6B55;
  --moss-deep: #2C5142;

  /* Type scale */
  --serif: "Lora", Georgia, "Times New Roman", serif;
  --sans:  "Instrument Sans", -apple-system, BlinkMacSystemFont, "Inter", system-ui, sans-serif;
  --ui:    "Inter", -apple-system, BlinkMacSystemFont, system-ui, sans-serif;
  --word:  "Baloo 2", "Baloo Chettan", "Instrument Sans", sans-serif;

  /* Spacing & radii */
  --r-sm: 6px;
  --r:    12px;
  --r-lg: 20px;
  --r-xl: 32px;

  --shadow-soft: 0 1px 2px rgba(26,30,28,.04), 0 8px 24px rgba(26,30,28,.06);
  --shadow-card: 0 1px 2px rgba(26,30,28,.04), 0 18px 40px rgba(26,30,28,.08);
}

* { box-sizing: border-box; }

html {
  scroll-padding-top: 80px;
}
@media (max-width: 920px) {
  html { scroll-padding-top: 76px; }
}

html, body {
  margin: 0;
  padding: 0;
  overflow-x: clip;
  background: var(--bg);
  color: var(--ink);
  font-family: var(--sans);
  font-size: 16px;
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}
@supports not (overflow: clip) {
  html, body { overflow-x: hidden; }
}

img { max-width: 100%; display: block; }
a { color: inherit; text-decoration: none; }

/* ---------- Type ---------- */
.kicker {
  font-family: var(--sans);
  font-weight: 700;
  font-size: 10px;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--ink-3);
  line-height: 1;
}
.kicker .num {
  color: var(--moss);
  margin-right: 10px;
}
.eyebrow {
  font-family: var(--sans);
  font-weight: 700;
  font-size: 11px;
  letter-spacing: 0.06em;
  color: var(--moss-deep);
}
h1, h2, h3 {
  font-family: var(--serif);
  font-weight: 400;
  color: var(--ink);
  letter-spacing: -0.01em;
  margin: 0;
  text-wrap: balance;
}
h1 { font-size: clamp(28px, 5.5vw, 76px); line-height: 1.05; }
h2 { font-size: clamp(24px, 3.4vw, 48px); line-height: 1.1; }
h3 { font-size: clamp(18px, 1.6vw, 24px); line-height: 1.25; }
p  { margin: 0; color: var(--ink-2); text-wrap: pretty; }

.lede { font-size: clamp(16px, 2.2vw, 18px); line-height: 1.55; color: var(--ink-2); }
.mono { font-family: ui-monospace, "SF Mono", "Roboto Mono", monospace; }

/* ---------- Layout ---------- */
.wrap {
  max-width: 1240px;
  margin: 0 auto;
  padding: 0 clamp(16px, 4vw, 32px);
}
@media (max-width: 720px) {
  .wrap { padding: 0 16px; }
}

.section {
  padding: 96px 0;
  border-top: 1px solid var(--line);
}
@media (max-width: 720px) {
  .section { padding: 64px 0; }
}

.section-head {
  display: flex;
  align-items: flex-end;
  gap: 24px;
  margin-bottom: 48px;
  flex-wrap: wrap;
}
.section-head .label-row {
  display: flex;
  align-items: center;
  gap: 12px;
  width: 100%;
  margin-bottom: 24px;
}
.section-head .label-row .rule {
  flex: 1;
  height: 1px;
  background: var(--line);
}
.section-head .title { flex: 1; min-width: 0; }
.section-head .sub { max-width: 420px; }

/* ---------- Nav ---------- */
.nav {
  position: sticky;
  top: 0;
  z-index: 100;
  background: rgba(244,241,235,.86);
  backdrop-filter: saturate(140%) blur(10px);
  -webkit-backdrop-filter: saturate(140%) blur(10px);
  border-bottom: 1px solid var(--line);
}
.nav-inner {
  display: flex;
  align-items: center;
  gap: clamp(12px, 2vw, 24px);
  min-height: 72px;
  width: 100%;
}
.brand {
  display: flex;
  align-items: center;
  gap: 12px;
  text-decoration: none;
  flex-shrink: 0;
  min-width: 0;
}
.brand-mark {
  width: 36px; height: 36px;
  border-radius: 8px;
  background: url("../images/metis-icon.png") center / cover no-repeat, var(--bg-mint);
  flex-shrink: 0;
}
.brand-word {
  font-family: var(--word);
  font-weight: 700;
  font-size: 22px;
  color: var(--moss-deep);
  letter-spacing: -0.02em;
  line-height: 1;
}
.nav-trail {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-shrink: 0;
  margin-left: auto;
}

.nav-cta-download {
  white-space: nowrap;
}
@media (max-width: 380px) {
  .nav-cta-download {
    padding: 10px 12px;
    font-size: 12px;
    gap: 6px;
  }
  .nav-cta-download svg { width: 12px; height: 12px; }
}

.lang-toggle {
  display: inline-flex;
  background: var(--bg-card);
  border: 1px solid var(--line);
  border-radius: 100px;
  padding: 3px;
  font-family: var(--ui);
  font-size: 11px;
  font-weight: 600;
}
.lang-toggle button {
  border: none;
  background: transparent;
  padding: 5px 10px;
  border-radius: 100px;
  cursor: pointer;
  color: var(--ink-3);
  letter-spacing: 0.04em;
  text-transform: uppercase;
}
.lang-toggle button.on {
  background: var(--ink);
  color: var(--ink-inverse);
}

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  font-family: var(--sans);
  font-weight: 600;
  font-size: 14px;
  min-height: 44px;
  padding: 11px 18px;
  border-radius: 100px;
  border: 1px solid transparent;
  cursor: pointer;
  text-decoration: none;
  transition: all .15s ease;
  line-height: 1;
}
.btn-primary {
  background: var(--ink);
  color: var(--ink-inverse);
}
.btn-primary:hover { background: var(--moss-deep); }

.btn-outline {
  background: transparent;
  border-color: var(--line-strong);
  color: var(--ink);
}
.btn-outline:hover { background: var(--ink); color: var(--ink-inverse); }

.btn-ghost {
  background: transparent;
  color: var(--ink-2);
}
.btn-ghost:hover { color: var(--ink); }

/* App store buttons */
.store-btn {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  background: var(--ink);
  color: var(--ink-inverse);
  padding: 10px 18px 10px 14px;
  border-radius: 14px;
  text-decoration: none;
  transition: transform .15s, background .15s;
}
.store-btn:hover { background: var(--moss-deep); transform: translateY(-1px); }
.store-btn .label-row { display: flex; flex-direction: column; gap: 1px; }
.store-btn .small { font-family: var(--ui); font-size: 10px; opacity: .8; letter-spacing: .04em; }
.store-btn .big   { font-family: var(--ui); font-size: 16px; font-weight: 600; letter-spacing: -0.01em; }
.store-btn svg { flex-shrink: 0; }

/* Badge */
.badge {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 4px 12px 4px 9px;
  background: var(--bg-mint);
  border-radius: 100px;
  font-family: var(--sans);
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.04em;
  color: var(--moss-deep);
}
.badge .dot { width: 6px; height: 6px; border-radius: 50%; background: var(--moss); display: inline-block; }

/* ---------- Card primitives ---------- */
.card {
  background: var(--bg-card);
  border: 1px solid var(--line);
  border-radius: var(--r-lg);
  padding: 28px;
}
.card-dashed {
  background: var(--bg-card);
  border: 1.5px dashed var(--line);
  border-radius: var(--r-lg);
}

/* ---------- Footer ---------- */
.footer {
  background: var(--moss-deep);
  color: var(--ink-inverse);
  padding: clamp(48px, 8vw, 80px) 0 32px;
  margin-top: 0;
}
.footer h4 {
  font-family: var(--sans);
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  margin: 0 0 18px;
  color: rgba(255,255,255,.5);
}
.footer-grid {
  display: grid;
  grid-template-columns: 1.5fr 1fr 1fr 1fr 1fr;
  gap: 40px;
  padding-bottom: 56px;
  border-bottom: 1px solid rgba(255,255,255,.12);
}
.footer-grid ul { list-style: none; padding: 0; margin: 0; display: flex; flex-direction: column; gap: 10px; }
.footer-grid a { color: rgba(255,255,255,.75); font-size: 14px; }
.footer-grid a:hover { color: #fff; }
.footer-bottom {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  padding-top: 32px;
  font-family: var(--ui);
  font-size: 12px;
  color: rgba(255,255,255,.5);
  letter-spacing: 0.02em;
}
.footer-bottom-text {
  display: flex;
  flex-direction: column;
  gap: 6px;
  min-width: min(100%, 280px);
}
.footer-bottom-text span:first-child { color: rgba(255,255,255,.65); }
.footer-bottom-lang {
  display: flex;
  align-items: center;
  gap: 12px;
  flex-shrink: 0;
}
.footer-lang-label {
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: rgba(255,255,255,.45);
}
.footer .lang-toggle {
  background: rgba(0,0,0,.2);
  border-color: rgba(255,255,255,.22);
}
.footer .lang-toggle button {
  color: rgba(255,255,255,.72);
  min-width: 40px;
}
.footer .lang-toggle button.on {
  background: #fff;
  color: var(--moss-deep);
}
@media (max-width: 640px) {
  .footer-bottom {
    flex-direction: column;
    align-items: flex-start;
  }
  .footer-bottom-lang {
    width: 100%;
    justify-content: space-between;
    padding-top: 8px;
    border-top: 1px solid rgba(255,255,255,.1);
    margin-top: 4px;
  }
}
.footer .brand-word { color: #fff; }
.footer .brand-mark { background-color: #fff; }
.footer-about {
  font-family: var(--sans);
  font-size: 14px;
  color: rgba(255,255,255,.75);
  line-height: 1.6;
  max-width: 320px;
  margin-top: 18px;
}
@media (max-width: 820px) {
  .footer-grid { grid-template-columns: 1fr 1fr; gap: 32px; }
}
@media (max-width: 520px) {
  .footer-grid { grid-template-columns: 1fr; gap: 32px; }
}

/* ---------- Tweaks visibility ---------- */
.hidden-section { display: none !important; }
