/* Amarenco brand tokens (extend shadcn tokens) */
:root {
  --am-slate: #4a6278;
  --am-slate-deep: #2f4658;
  --am-slate-ink: #1c2f3f;
  --am-orange: #e8823a;
  --am-orange-hover: #d6711f;
  --am-cream: #f8f5f0;
  --am-sun: #f3c969;
  --am-leaf: #7ca56a;
  --am-leaf-deep: #4a6b3b;
  --am-border: oklch(0.92 0.005 240);
  --am-surface: #ffffff;
  --am-muted-bg: #f4f6f8;
  --am-ink: #1c2f3f;
  --am-ink-soft: #526a7e;
}

* { box-sizing: border-box; }
html, body { margin: 0; padding: 0; background: var(--am-surface); color: var(--am-ink); }
body { font-family: "Geist", ui-sans-serif, system-ui, sans-serif; font-feature-settings: "ss01", "cv11"; }

a { color: inherit; text-decoration: none; }
button { font-family: inherit; cursor: pointer; border: 0; background: none; padding: 0; color: inherit; }

.font-serif { font-family: "Instrument Serif", Georgia, serif; font-style: italic; font-weight: 400; }
.font-mono { font-family: "Geist Mono", ui-monospace, monospace; }

/* Grid overlay (echo of Amarenco hero grid) */
.grid-overlay {
  background-image:
    linear-gradient(to right, rgba(255,255,255,0.08) 1px, transparent 1px),
    linear-gradient(to bottom, rgba(255,255,255,0.08) 1px, transparent 1px);
  background-size: 60px 60px;
}
.grid-overlay-dark {
  background-image:
    linear-gradient(to right, rgba(28,47,63,0.06) 1px, transparent 1px),
    linear-gradient(to bottom, rgba(28,47,63,0.06) 1px, transparent 1px);
  background-size: 48px 48px;
}

/* Chrome */
.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: var(--am-slate);
  color: white;
  height: 64px;
  display: flex;
  align-items: center;
  padding: 0 32px;
  border-bottom: 1px solid rgba(255,255,255,0.08);
}
.site-header .brand {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  line-height: 1;
}
.site-header .brand .mark {
  font-family: "Geist", sans-serif;
  font-weight: 700;
  font-size: 22px;
  letter-spacing: 0.02em;
  display: flex;
  align-items: baseline;
}
.site-header .brand .mark .sun {
  color: var(--am-orange);
  margin-left: 1px;
  display: inline-block;
  transform: translateY(-2px);
}
.site-header .brand .tagline {
  font-size: 10px;
  color: rgba(255,255,255,0.75);
  letter-spacing: 0.04em;
  margin-top: 4px;
}
.site-nav {
  display: flex;
  gap: 32px;
  margin: 0 auto;
  font-size: 12.5px;
  font-weight: 600;
  letter-spacing: 0.14em;
}
.site-nav a {
  color: rgba(255,255,255,0.85);
  padding: 6px 2px;
  border-bottom: 2px solid transparent;
  transition: color .15s, border-color .15s;
}
.site-nav a:hover { color: white; border-color: var(--am-orange); }
.site-nav a.active { color: white; border-color: var(--am-orange); }

.header-right { display: flex; align-items: center; gap: 18px; }
.icon-btn {
  width: 36px; height: 36px;
  border-radius: 999px;
  display: grid; place-items: center;
  border: 1px solid rgba(255,255,255,0.25);
  color: white;
  transition: all .15s;
}
.icon-btn:hover { background: rgba(255,255,255,0.08); border-color: rgba(255,255,255,0.5); }

.lang-toggle {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.08em;
}
.lang-toggle button { color: rgba(255,255,255,0.6); padding: 4px 6px; }
.lang-toggle button.active { color: var(--am-orange); }
.lang-toggle .sep { color: rgba(255,255,255,0.35); }

/* Footer */
.site-footer {
  background: var(--am-slate-ink);
  color: rgba(255,255,255,0.75);
  padding: 64px 48px 32px;
  font-size: 13.5px;
}

/* Buttons */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 12px 22px;
  font-size: 12.5px;
  font-weight: 600;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  border-radius: 2px;
  transition: all .18s ease;
  white-space: nowrap;
}
.btn-primary {
  background: var(--am-orange);
  color: white;
}
.btn-primary:hover { background: var(--am-orange-hover); transform: translateY(-1px); }
.btn-ghost {
  color: var(--am-ink);
  border: 1px solid var(--am-border);
  background: white;
}
.btn-ghost:hover { border-color: var(--am-ink); }
.btn-light {
  color: white;
  border: 1px solid rgba(255,255,255,0.45);
  background: transparent;
}
.btn-light:hover { background: rgba(255,255,255,0.1); border-color: white; }

/* Placeholder visuals */
.placeholder {
  position: relative;
  background: var(--am-muted-bg);
  overflow: hidden;
}
.placeholder::before {
  content: "";
  position: absolute; inset: 0;
  background-image:
    linear-gradient(135deg, rgba(74,98,120,0.08) 25%, transparent 25%),
    linear-gradient(225deg, rgba(74,98,120,0.08) 25%, transparent 25%),
    linear-gradient(45deg, rgba(74,98,120,0.08) 25%, transparent 25%),
    linear-gradient(315deg, rgba(74,98,120,0.08) 25%, transparent 25%);
  background-size: 20px 20px;
  background-position: 10px 0, 10px 0, 0 0, 0 0;
}

/* Eyebrow */
.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-size: 11px;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  font-weight: 600;
  color: var(--am-orange);
}
.eyebrow::before {
  content: "";
  width: 24px;
  height: 1px;
  background: var(--am-orange);
}

/* Utility */
.muted-ink { color: var(--am-ink-soft); }
.hair { height: 1px; background: var(--am-border); }
.hair-v { width: 1px; background: var(--am-border); }

/* Card */
.project-card {
  background: white;
  border: 1px solid var(--am-border);
  display: flex;
  flex-direction: column;
  transition: border-color .2s, transform .2s;
  cursor: pointer;
}
.project-card:hover { border-color: var(--am-slate); }
.project-card:hover .card-arrow { background: var(--am-orange); color: white; transform: translateX(4px); }

/* 3D viewport */
.threeview {
  position: relative;
  width: 100%;
  background: linear-gradient(180deg, #c8dbe6 0%, #e8e2d2 70%, #d9c9a8 100%);
  overflow: hidden;
}
.threeview canvas { display: block; width: 100%; height: 100%; }

.compass {
  position: absolute;
  top: 16px; right: 16px;
  width: 46px; height: 46px;
  border-radius: 999px;
  background: rgba(255,255,255,0.9);
  backdrop-filter: blur(6px);
  display: grid; place-items: center;
  font-size: 11px; font-weight: 700; color: var(--am-slate-ink);
  border: 1px solid rgba(28,47,63,0.15);
}

.three-controls {
  position: absolute;
  bottom: 16px; left: 16px;
  display: flex; gap: 8px;
  background: rgba(255,255,255,0.92);
  backdrop-filter: blur(6px);
  padding: 6px;
  border-radius: 2px;
  border: 1px solid rgba(28,47,63,0.1);
  font-size: 11px;
  color: var(--am-slate-ink);
}
.three-controls button {
  padding: 6px 10px;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  font-size: 10.5px;
  border-radius: 2px;
}
.three-controls button.active { background: var(--am-slate-ink); color: white; }
.three-controls button:hover:not(.active) { background: rgba(28,47,63,0.06); }

.three-legend {
  position: absolute;
  bottom: 16px; right: 16px;
  background: rgba(255,255,255,0.92);
  backdrop-filter: blur(6px);
  padding: 10px 14px;
  border: 1px solid rgba(28,47,63,0.1);
  font-size: 11px;
  color: var(--am-slate-ink);
  display: flex; flex-direction: column; gap: 6px;
  min-width: 140px;
}
.three-legend .row { display: flex; align-items: center; gap: 8px; }
.three-legend .sw { width: 10px; height: 10px; border-radius: 2px; flex-shrink: 0; }

/* Stat */
.stat {
  padding: 28px 0;
}
.stat .v {
  font-size: 48px;
  font-weight: 300;
  letter-spacing: -0.03em;
  color: var(--am-slate-ink);
  line-height: 1;
  font-variant-numeric: tabular-nums;
}
.stat .v .u { font-size: 18px; font-weight: 500; color: var(--am-ink-soft); margin-left: 4px; letter-spacing: 0; }
.stat .k {
  margin-top: 10px;
  font-size: 11px;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--am-ink-soft);
  font-weight: 600;
}

/* Section */
.section-label {
  font-size: 11px;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  font-weight: 600;
  color: var(--am-orange);
  margin-bottom: 12px;
}

/* Pill/tag */
.tag {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  padding: 5px 10px;
  background: rgba(74,98,120,0.08);
  color: var(--am-slate-ink);
  border-radius: 2px;
}
.tag.orange { background: rgba(232,130,58,0.12); color: var(--am-orange-hover); }
.tag.leaf { background: rgba(124,165,106,0.18); color: var(--am-leaf-deep); }

/* Scrollbar (subtle) */
::-webkit-scrollbar { width: 10px; height: 10px; }
::-webkit-scrollbar-thumb { background: rgba(74,98,120,0.25); border-radius: 999px; }
::-webkit-scrollbar-thumb:hover { background: rgba(74,98,120,0.45); }

/* Filter bar */
.filter-bar {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}
.filter-chip {
  padding: 8px 14px;
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.08em;
  color: var(--am-ink-soft);
  border: 1px solid var(--am-border);
  background: white;
  border-radius: 2px;
  transition: all .15s;
}
.filter-chip:hover { border-color: var(--am-slate); color: var(--am-slate-ink); }
.filter-chip.active { background: var(--am-slate-ink); color: white; border-color: var(--am-slate-ink); }

/* Map placeholder */
.map-frame {
  position: relative;
  background:
    radial-gradient(circle at 30% 40%, rgba(124,165,106,0.18), transparent 40%),
    radial-gradient(circle at 70% 60%, rgba(74,98,120,0.12), transparent 45%),
    #eef2ef;
  overflow: hidden;
}
