/* ───────── GeoSegment landing — mobile first ───────── */

:root {
  --bg: #f6f4ee;
  --bg-card: #ffffff;
  --ink: #0f1614;
  --ink-soft: #4a544f;
  --ink-faint: #8a938e;
  --rule: #e6e2d6;
  --rule-strong: #cfc9b8;

  --forest: #0d4a1f;
  --forest-deep: #08361a;
  --pixel: #2d8a3e;
  --pixel-bright: #3fa53b;

  --water: #2c7be5;
  --soil: #a86b3d;
  --alert: #c0392b;

  --radius-s: 8px;
  --radius-m: 14px;
  --radius-l: 22px;

  --shadow-card: 0 1px 0 rgba(15, 22, 20, 0.04), 0 6px 24px -8px rgba(15, 22, 20, 0.12);
  --shadow-cta: 0 1px 0 rgba(255, 255, 255, 0.15) inset, 0 10px 24px -10px rgba(13, 74, 31, 0.55);

  --font-ui: "Plus Jakarta Sans", -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  --font-mono: "JetBrains Mono", ui-monospace, "SF Mono", Menlo, monospace;
}

[data-theme="dark"] {
  --bg: #0c130f;
  --bg-card: #131b16;
  --ink: #ecefe8;
  --ink-soft: #a8b2ab;
  --ink-faint: #6a7470;
  --rule: #1f2a23;
  --rule-strong: #2c3a31;
  --forest: #3fa55a;
  --forest-deep: #5cc275;
  --pixel: #5cc275;
  --pixel-bright: #7be08e;
  --shadow-card: 0 1px 0 rgba(0, 0, 0, 0.4), 0 10px 30px -10px rgba(0, 0, 0, 0.6);
  --shadow-cta: 0 1px 0 rgba(255, 255, 255, 0.08) inset, 0 12px 28px -12px rgba(63, 165, 90, 0.55);
}

* { box-sizing: border-box; }

html, body {
  margin: 0;
  padding: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: var(--font-ui);
  font-size: 16px;
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

body {
  min-height: 100vh;
  overflow-x: hidden;
}

img { display: block; max-width: 100%; }
button { font-family: inherit; }

/* ───── Pixel motif background ───── */
.pixel-bg {
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 0;
  background-image:
    linear-gradient(var(--rule) 1px, transparent 1px),
    linear-gradient(90deg, var(--rule) 1px, transparent 1px);
  background-size: 24px 24px;
  background-position: -1px -1px;
  opacity: var(--pixel-bg-opacity, 0.5);
  mask-image: radial-gradient(ellipse at 50% 0%, #000 0%, #000 30%, transparent 75%);
  -webkit-mask-image: radial-gradient(ellipse at 50% 0%, #000 0%, #000 30%, transparent 75%);
}

/* ───── Page shell ───── */
.page {
  position: relative;
  z-index: 1;
  max-width: 480px;
  margin: 0 auto;
  padding: 0 20px 56px;
}

/* ───── Top bar ───── */
.topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 18px 0 14px;
}
.brand {
  display: flex;
  align-items: center;
  gap: 8px;
  font-weight: 700;
  letter-spacing: -0.01em;
  font-size: 16px;
  color: var(--ink);
}
.brand-mark {
  width: 26px;
  height: 26px;
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  grid-template-rows: repeat(3, 1fr);
  gap: 2px;
}
.brand-mark span {
  background: var(--forest);
  border-radius: 1px;
}
.brand-mark span:nth-child(2),
.brand-mark span:nth-child(4),
.brand-mark span:nth-child(9) { background: var(--pixel); }
.brand-mark span:nth-child(3),
.brand-mark span:nth-child(7) { opacity: 0; }
.brand-mark span:nth-child(5) { background: var(--pixel-bright); }

.tag-tcc {
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.04em;
  color: var(--ink-faint);
  text-transform: uppercase;
  padding: 5px 9px;
  border: 1px solid var(--rule);
  border-radius: 999px;
  background: var(--bg-card);
}

/* ───── Hero ───── */
.hero {
  margin-top: 18px;
}
.hero-eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-family: var(--font-mono);
  font-size: 11.5px;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--pixel);
  background: color-mix(in oklab, var(--pixel) 10%, transparent);
  padding: 6px 10px;
  border-radius: 999px;
  margin-bottom: 18px;
}
.hero-eyebrow::before {
  content: "";
  width: 6px;
  height: 6px;
  background: var(--pixel-bright);
  border-radius: 1px;
  box-shadow: 0 0 0 3px color-mix(in oklab, var(--pixel-bright) 25%, transparent);
}

.hero-title {
  font-size: clamp(34px, 9vw, 44px);
  line-height: 1.02;
  letter-spacing: -0.025em;
  font-weight: 700;
  margin: 0 0 14px;
  color: var(--ink);
  text-wrap: balance;
}
.hero-title .pixel-word {
  position: relative;
  color: var(--pixel);
  font-family: var(--font-mono);
  font-weight: 700;
  letter-spacing: -0.01em;
  padding: 0 4px;
}
.hero-title .pixel-word::after {
  content: "";
  position: absolute;
  inset: auto 4px -2px 4px;
  height: 6px;
  background-image: linear-gradient(90deg,
    var(--pixel) 0 25%, transparent 25% 33%,
    var(--pixel-bright) 33% 58%, transparent 58% 66%,
    var(--pixel) 66% 100%);
  opacity: 0.55;
}

.hero-sub {
  font-size: 15.5px;
  line-height: 1.55;
  color: var(--ink-soft);
  margin: 0 0 24px;
  max-width: 38ch;
  text-wrap: pretty;
}

/* ───── Comparison ───── */
.compare {
  position: relative;
  border-radius: var(--radius-l);
  overflow: hidden;
  background: #000;
  box-shadow: var(--shadow-card);
  user-select: none;
  touch-action: pan-y;
  aspect-ratio: 1 / 1;
}
.compare img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  pointer-events: none;
}
.compare-mask {
  position: absolute;
  inset: 0;
  overflow: hidden;
  clip-path: polygon(0 0, var(--cut, 50%) 0, var(--cut, 50%) 100%, 0 100%);
}
.compare-handle {
  position: absolute;
  top: 0;
  bottom: 0;
  left: var(--cut, 50%);
  width: 44px;
  transform: translateX(-22px);
  pointer-events: auto;
  background: transparent;
}
/* linha visual fina centralizada */
.compare-handle .line {
  position: absolute;
  top: 0;
  bottom: 0;
  left: 50%;
  width: 2px;
  background: rgba(255, 255, 255, 0.95);
  transform: translateX(-1px);
  pointer-events: none;
  box-shadow: 0 0 0 1px rgba(0, 0, 0, 0.15);
}
/* círculo */
.compare-handle::before {
  content: "";
  position: absolute;
  top: 50%;
  left: 50%;
  width: 44px;
  height: 44px;
  border-radius: 50%;
  background: #fff;
  transform: translate(-50%, -50%);
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.3);
}
.compare-arrow {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  font-size: 13px;
  font-weight: 700;
  color: var(--forest);
  z-index: 1;
  pointer-events: none;
  line-height: 1;
}
.compare-arrow.left  { right: calc(50% + 6px); }
.compare-arrow.right { left:  calc(50% + 6px); }
.compare-label {
  position: absolute;
  bottom: 10px;
  font-family: var(--font-mono);
  font-size: 10.5px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: #fff;
  background: rgba(0, 0, 0, 0.55);
  padding: 5px 9px;
  border-radius: 999px;
  backdrop-filter: blur(8px);
}
.compare-label.left { left: 12px; }
.compare-label.right { right: 12px; }

/* Static (non-interactive) variant */
.compare.static .compare-mask { clip-path: polygon(0 0, 50% 0, 50% 100%, 0 100%); }
.compare.static .compare-handle { pointer-events: none; }

/* ───── Section lede ───── */
.section-lede {
  font-size: 14.5px;
  line-height: 1.55;
  color: var(--ink-soft);
  margin: -4px 0 16px;
  max-width: 42ch;
}
.section-lede em {
  font-style: normal;
  font-family: var(--font-mono);
  font-size: 13px;
  color: var(--forest);
  padding: 1px 5px;
  background: color-mix(in oklab, var(--forest) 8%, transparent);
  border-radius: 4px;
}

/* ───── Metrics ───── */
.metrics {
  display: grid;
  gap: 10px;
}
.metric {
  padding: 18px 20px;
  background: var(--bg-card);
  border: 1px solid var(--rule);
  border-radius: var(--radius-m);
  display: grid;
  grid-template-columns: auto 1fr;
  grid-template-rows: auto auto;
  column-gap: 16px;
  row-gap: 2px;
  align-items: baseline;
}
.metric-value {
  grid-row: 1 / span 2;
  font-family: var(--font-mono);
  font-weight: 700;
  font-size: 44px;
  line-height: 1;
  letter-spacing: -0.02em;
  color: var(--forest);
  align-self: center;
}
.metric-value span {
  font-size: 22px;
  margin-left: 1px;
  color: var(--pixel);
}
.metric-key {
  font-weight: 700;
  font-size: 14px;
  color: var(--ink);
  letter-spacing: -0.01em;
}
.metric-desc {
  font-size: 12.5px;
  line-height: 1.4;
  color: var(--ink-soft);
}

/* ───── Classes grid ───── */
.classes {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 8px 14px;
  padding: 18px;
  background: var(--bg-card);
  border: 1px solid var(--rule);
  border-radius: var(--radius-m);
}
.class-row {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 6px 0;
  font-size: 13.5px;
  color: var(--ink);
  letter-spacing: -0.005em;
}
.class-swatch {
  width: 18px;
  height: 18px;
  border-radius: 4px;
  flex: 0 0 18px;
  box-shadow: 0 0 0 1px rgba(0, 0, 0, 0.08) inset;
}

/* ───── Architecture cards ───── */
.arch-grid {
  display: grid;
  gap: 10px;
}
.arch-card {
  padding: 18px 20px;
  background: var(--bg-card);
  border: 1px solid var(--rule);
  border-radius: var(--radius-m);
  position: relative;
}
.arch-tag {
  font-family: var(--font-mono);
  font-size: 10.5px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--pixel);
  margin-bottom: 6px;
}
.arch-title {
  font-weight: 700;
  font-size: 15.5px;
  color: var(--ink);
  letter-spacing: -0.015em;
  margin-bottom: 6px;
}
.arch-body {
  font-size: 13.5px;
  line-height: 1.5;
  color: var(--ink-soft);
}
.arch-body strong { color: var(--ink); font-weight: 600; }

/* ───── Section heading ───── */
.section-head {
  display: flex;
  align-items: baseline;
  gap: 10px;
  margin: 40px 0 14px;
}
.section-head .num {
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.1em;
  color: var(--ink-faint);
  text-transform: uppercase;
}
.section-head h2 {
  margin: 0;
  font-size: 18px;
  font-weight: 700;
  letter-spacing: -0.015em;
  color: var(--ink);
}

/* ───── CTAs ───── */
.actions {
  display: flex;
  flex-direction: column;
  gap: 10px;
  margin-top: 18px;
}

.cta {
  display: flex;
  align-items: center;
  gap: 14px;
  width: 100%;
  padding: 16px 18px;
  border-radius: var(--radius-m);
  background: var(--bg-card);
  border: 1px solid var(--rule);
  color: var(--ink);
  text-decoration: none;
  cursor: pointer;
  transition: transform 0.15s ease, border-color 0.15s ease, box-shadow 0.2s ease;
  text-align: left;
  position: relative;
}
.cta:hover { border-color: var(--rule-strong); transform: translateY(-1px); }
.cta:active { transform: translateY(0); }

.cta-icon {
  width: 44px;
  height: 44px;
  flex: 0 0 44px;
  border-radius: 10px;
  display: grid;
  place-items: center;
  background: color-mix(in oklab, var(--forest) 8%, transparent);
  color: var(--forest);
  position: relative;
}
.cta-icon svg { width: 22px; height: 22px; }
.cta-body { flex: 1; min-width: 0; }
.cta-title {
  font-weight: 600;
  font-size: 15.5px;
  color: var(--ink);
  letter-spacing: -0.01em;
  display: flex;
  align-items: center;
  gap: 8px;
}
.cta-meta {
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.04em;
  color: var(--ink-faint);
  text-transform: uppercase;
  margin-top: 3px;
}
.cta-arrow {
  width: 16px;
  height: 16px;
  flex: 0 0 16px;
  color: var(--ink-faint);
  transition: transform 0.2s ease, color 0.2s ease;
}
.cta:hover .cta-arrow { transform: translateX(3px); color: var(--ink); }

/* Primary CTA — software */
.cta.primary {
  background: var(--forest);
  border-color: var(--forest);
  color: #fff;
  box-shadow: var(--shadow-cta);
  padding: 18px 20px;
}
.cta.primary .cta-title { color: #fff; font-size: 16.5px; }
.cta.primary .cta-meta { color: rgba(255, 255, 255, 0.7); }
.cta.primary .cta-icon {
  background: rgba(255, 255, 255, 0.14);
  color: #fff;
}
.cta.primary .cta-arrow { color: rgba(255, 255, 255, 0.7); }
.cta.primary:hover { border-color: var(--forest-deep); background: var(--forest-deep); }
.cta.primary:hover .cta-arrow { color: #fff; }

.cta-pill {
  font-family: var(--font-mono);
  font-size: 10px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  padding: 3px 7px;
  border-radius: 4px;
  background: rgba(255, 255, 255, 0.18);
  color: #fff;
  border: 1px solid rgba(255, 255, 255, 0.22);
}
.cta:not(.primary) .cta-pill {
  background: color-mix(in oklab, var(--pixel) 12%, transparent);
  color: var(--pixel);
  border-color: color-mix(in oklab, var(--pixel) 22%, transparent);
}

/* ───── About strip ───── */
.about {
  margin-top: 36px;
  padding: 22px;
  border-radius: var(--radius-m);
  background: var(--bg-card);
  border: 1px solid var(--rule);
}
.about-rows {
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 10px 16px;
  font-size: 13.5px;
}
.about-rows dt {
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--ink-faint);
  align-self: center;
}
.about-rows dd {
  margin: 0;
  color: var(--ink);
}

.legend {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 14px;
}
.legend-item {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--ink-soft);
}
.legend-swatch {
  width: 10px;
  height: 10px;
  border-radius: 2px;
}

/* ───── Authors ───── */
.authors {
  margin-top: 36px;
}
.authors-list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 12px;
}
.author-row {
  display: flex;
  flex-direction: column;
  gap: 3px;
  padding: 12px 14px;
  border-radius: var(--radius-s);
  border: 1px solid var(--rule);
  background: var(--bg-card);
}
.author-name {
  font-size: 13.5px;
  color: var(--ink);
  letter-spacing: -0.005em;
}
.author-email {
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.02em;
  color: var(--forest);
  text-decoration: none;
  word-break: break-all;
}
.author-email:hover {
  text-decoration: underline;
}

/* ───── Partners ───── */
.partners {
  margin-top: 36px;
  padding-top: 22px;
  border-top: 1px dashed var(--rule-strong);
}
.partners-label {
  font-family: var(--font-mono);
  font-size: 10.5px;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--ink-faint);
  margin-bottom: 14px;
}
.partners-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 12px;
}
.partner {
  aspect-ratio: 1.4 / 1;
  border-radius: var(--radius-s);
  border: 1px solid var(--rule);
  background: var(--bg-card);
  display: grid;
  place-items: center;
  padding: 14px 12px;
}
.partner img {
  max-width: 100%;
  max-height: 56px;
  width: auto;
  height: auto;
  object-fit: contain;
}
[data-theme="dark"] .partner {
  background: #ffffff;
}

/* ───── Footer ───── */
.foot {
  margin-top: 28px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-family: var(--font-mono);
  font-size: 10.5px;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--ink-faint);
}

/* ───── Entry animation ───── */
.fade-up {
  opacity: 0;
  transform: translateY(8px);
  animation: fadeUp 0.6s cubic-bezier(.2,.7,.2,1) forwards;
}
.fade-up.d1 { animation-delay: 0.05s; }
.fade-up.d2 { animation-delay: 0.12s; }
.fade-up.d3 { animation-delay: 0.2s; }
.fade-up.d4 { animation-delay: 0.28s; }
.fade-up.d5 { animation-delay: 0.36s; }
.fade-up.d6 { animation-delay: 0.44s; }
@keyframes fadeUp {
  to { opacity: 1; transform: translateY(0); }
}

/* ───── Wider viewports — keep mobile-feel but soften ───── */
@media (min-width: 720px) {
  .page { max-width: 520px; }
}
