/* ============================================================
   Libreopolis — landing page styles
   Aesthetic: "reconstructed artifact" — a pixel-art city sim
   rebuilt from its binary. Blue-black night, phosphor-green HUD
   accent lifted from the SC2K status bar, knowing Win95 bevels.
   ============================================================ */

:root {
  /* palette */
  --bg:        #080b11;   /* deep blue-black (the game at night) */
  --bg-2:      #0b0f17;
  --panel:     #10151f;
  --panel-2:   #141b28;
  --ink:       #e9e6dc;   /* warm off-white */
  --muted:     #8b93a1;
  --faint:     #5c6472;
  --line:      #212a39;
  --line-2:    #2c3749;

  --green:     #38df76;   /* phosphor HUD green — primary accent */
  --green-hi:  #6bffab;
  --green-dim: #1c7c48;
  --blue:      #4f8dff;   /* SC2K water */
  --tan:       #d6ad63;   /* SC2K terrain */

  /* bevels — the Win95 chrome nod */
  --bevel-lt: rgba(255,255,255,.10);
  --bevel-dk: rgba(0,0,0,.55);

  /* type */
  --pixel: "Silkscreen", "Courier New", monospace;
  --mono:  "IBM Plex Mono", ui-monospace, "SF Mono", Menlo, monospace;
  --sans:  "IBM Plex Sans", ui-sans-serif, system-ui, sans-serif;

  --maxw: 1140px;
  --radius: 12px;
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }

body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: var(--sans);
  font-size: 17px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  overflow-x: hidden;
  /* faint isometric grid, drawn once behind everything */
  background-image:
    repeating-linear-gradient( 30deg, transparent 0 63px, rgba(79,141,255,.030) 63px 64px),
    repeating-linear-gradient(-30deg, transparent 0 63px, rgba(79,141,255,.030) 63px 64px);
  background-attachment: fixed;
}

code, pre { font-family: var(--mono); }
code { font-size: .9em; color: var(--green-hi); }

::selection { background: var(--green); color: #04120a; }

a { color: var(--green); text-decoration: none; }
a:hover { color: var(--green-hi); }

.skip {
  position: absolute; left: -9999px; top: 0;
  background: var(--green); color: #04120a; padding: 10px 16px;
  font: 600 14px/1 var(--mono); z-index: 100; border-radius: 0 0 8px 0;
}
.skip:focus { left: 0; }

/* ───────────────── shared type ───────────────── */

.eyebrow {
  font-family: var(--pixel);
  font-size: 12px;
  letter-spacing: .04em;
  color: var(--green);
  text-transform: uppercase;
  margin: 0 0 18px;
  text-shadow: 0 0 14px rgba(56,223,118,.45);
}

h1 {
  font-family: var(--mono);
  font-weight: 700;
  font-size: clamp(2.05rem, 4.6vw, 3.35rem);
  line-height: 1.06;
  letter-spacing: -.02em;
  margin: 0 0 22px;
}

h2 {
  font-family: var(--mono);
  font-weight: 600;
  font-size: clamp(1.7rem, 3.6vw, 2.5rem);
  line-height: 1.12;
  letter-spacing: -.015em;
  margin: 0 0 16px;
}

h3 {
  font-family: var(--mono);
  font-weight: 600;
  font-size: 1.12rem;
  letter-spacing: -.01em;
  margin: 0 0 8px;
}

.section-lede { color: var(--muted); font-size: 1.08rem; max-width: 60ch; margin: 0; }
.section-note { color: var(--faint); font-size: .95rem; max-width: 60ch; margin: 14px 0 0; }
.section-note code { color: var(--tan); }

/* ───────────────── nav ───────────────── */

.nav {
  position: sticky; top: 0; z-index: 50;
  backdrop-filter: blur(10px);
  background: color-mix(in srgb, var(--bg) 78%, transparent);
  border-bottom: 1px solid var(--line);
}
.nav-inner {
  max-width: var(--maxw); margin: 0 auto;
  padding: 14px 24px;
  display: flex; align-items: center; justify-content: space-between; gap: 18px;
}
.brand { display: inline-flex; align-items: center; gap: 11px; color: var(--ink); }
.brand-name { font-family: var(--pixel); font-size: 18px; letter-spacing: .01em; }
.brand-mark {
  width: 15px; height: 15px; display: inline-block;
  background: var(--green);
  box-shadow: 0 0 12px rgba(56,223,118,.6);
  /* an isometric diamond */
  clip-path: polygon(50% 0, 100% 50%, 50% 100%, 0 50%);
  animation: pulse 3.2s ease-in-out infinite;
}
@keyframes pulse { 50% { opacity: .55; } }

.nav-links { display: flex; align-items: center; gap: 26px; }
.nav-links a { color: var(--muted); font-size: .92rem; font-weight: 500; }
.nav-links a:hover { color: var(--ink); }
.nav-cta {
  color: var(--green) !important;
  font-family: var(--mono); font-weight: 600;
  padding: 7px 14px; border: 1px solid var(--green-dim);
  border-radius: 8px; background: rgba(56,223,118,.06);
}
.nav-cta:hover { background: rgba(56,223,118,.13); border-color: var(--green); }
@media (max-width: 620px) {
  .nav-links a:not(.nav-cta) { display: none; }
}

/* ───────────────── buttons ───────────────── */

.btn {
  display: inline-flex; align-items: center; gap: 9px;
  font-family: var(--mono); font-weight: 600; font-size: .98rem;
  padding: 13px 22px; border-radius: 10px;
  border: 1px solid transparent; cursor: pointer;
  transition: transform .12s ease, box-shadow .2s ease, background .2s ease;
}
.btn:active { transform: translateY(1px); }
.btn-primary {
  background: var(--green); color: #04120a;
  box-shadow: 0 0 0 1px rgba(56,223,118,.4), 0 10px 30px -10px rgba(56,223,118,.55);
}
.btn-primary:hover { background: var(--green-hi); color: #04120a; box-shadow: 0 0 0 1px var(--green-hi), 0 14px 40px -12px rgba(56,223,118,.7); }
.btn-ghost {
  background: transparent; color: var(--ink);
  border-color: var(--line-2);
}
.btn-ghost:hover { border-color: var(--green-dim); color: var(--green-hi); background: rgba(56,223,118,.05); }

/* ───────────────── hero ───────────────── */

.hero {
  position: relative;
  max-width: var(--maxw); margin: 0 auto;
  padding: clamp(56px, 11vw, 120px) 24px clamp(60px, 9vw, 110px);
  overflow: visible;
}
/* radial glow behind the hero */
.hero-bg {
  position: absolute; inset: -10% -20% auto auto;
  width: 900px; height: 900px; pointer-events: none; z-index: 0;
  background: radial-gradient(circle at 68% 38%, rgba(56,223,118,.16), transparent 55%),
              radial-gradient(circle at 85% 30%, rgba(79,141,255,.14), transparent 50%);
  filter: blur(6px);
}
/* the floating isometric city, feathered into the dark */
.hero-city {
  position: absolute; z-index: 0; pointer-events: none;
  top: clamp(20px, 6vw, 70px); right: -14%;
  width: min(74vw, 940px); aspect-ratio: 1800 / 1114;
  background: url("assets/hero-city.png") center/contain no-repeat;
  -webkit-mask-image: radial-gradient(ellipse 62% 60% at 50% 48%, #000 42%, transparent 78%);
          mask-image: radial-gradient(ellipse 62% 60% at 50% 48%, #000 42%, transparent 78%);
  opacity: .95;
  animation: bob 9s ease-in-out infinite;
}
@keyframes bob { 50% { transform: translateY(-14px); } }

.hero-inner { position: relative; z-index: 2; max-width: 680px; }
.hero .lede {
  font-size: 1.18rem; color: var(--muted);
  max-width: 46ch; margin: 0 0 30px;
}
.hero .lede code { color: var(--tan); }

.cta-row { display: flex; flex-wrap: wrap; gap: 14px; margin-bottom: 18px; }

.fineprint { font-size: .88rem; color: var(--faint); margin: 0 0 30px; max-width: 44ch; }

.chips { list-style: none; display: flex; flex-wrap: wrap; gap: 9px; padding: 0; margin: 0; }
.chips li {
  font-family: var(--mono); font-size: .76rem; color: var(--muted);
  padding: 6px 11px; border-radius: 6px;
  background: var(--panel);
  border: 1px solid var(--line);
  border-top-color: var(--bevel-lt);
  border-left-color: var(--bevel-lt);
  border-bottom-color: var(--bevel-dk);
  border-right-color: var(--bevel-dk);
}

/* stagger reveal on load */
.reveal { opacity: 0; transform: translateY(14px); animation: rise .7s cubic-bezier(.2,.7,.2,1) forwards; animation-delay: var(--d, 0ms); }
@keyframes rise { to { opacity: 1; transform: none; } }
@media (prefers-reduced-motion: reduce) {
  .reveal { opacity: 1; transform: none; animation: none; }
  .hero-city, .brand-mark { animation: none; }
}

/* ───────────────── section frame ───────────────── */

.showcase, .features, .build, .closer {
  max-width: var(--maxw); margin: 0 auto;
  padding: clamp(48px, 8vw, 96px) 24px;
  position: relative; z-index: 2;
}

/* ───────────────── screenshot ───────────────── */

.showcase-head { max-width: 62ch; margin-bottom: 40px; }

.monitor { margin: 0; }
.monitor-frame {
  border-radius: var(--radius);
  padding: 10px;
  background: linear-gradient(180deg, #1a2230, #0d1119);
  border: 1px solid var(--line-2);
  border-top-color: var(--bevel-lt);
  border-left-color: var(--bevel-lt);
  box-shadow:
    0 1px 0 var(--bevel-lt) inset,
    0 40px 80px -40px rgba(0,0,0,.9),
    0 0 60px -20px rgba(79,141,255,.25);
}
.monitor-frame img {
  display: block; width: 100%; height: auto;
  border-radius: 6px;
  image-rendering: pixelated;   /* keep the pixel art crisp */
}
.monitor figcaption {
  margin-top: 16px; font-family: var(--mono); font-size: .86rem;
  color: var(--faint); text-align: center;
}
.monitor figcaption code { color: var(--tan); }

/* ───────────────── features ───────────────── */

.features-head { max-width: 62ch; margin-bottom: 44px; }

.grid {
  list-style: none; padding: 0; margin: 0;
  display: grid; gap: 16px;
  grid-template-columns: repeat(auto-fill, minmax(268px, 1fr));
}
.card {
  position: relative;
  padding: 24px 22px 22px;
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  transition: transform .16s ease, border-color .16s ease, background .16s ease;
  overflow: hidden;
}
.card::before {
  content: ""; position: absolute; inset: 0 0 auto 0; height: 2px;
  background: linear-gradient(90deg, var(--green), transparent 65%);
  opacity: 0; transition: opacity .16s ease;
}
.card:hover {
  transform: translateY(-3px);
  border-color: var(--line-2);
  background: var(--panel-2);
}
.card:hover::before { opacity: 1; }
.card p { margin: 0; color: var(--muted); font-size: .96rem; }
.card-tag {
  display: inline-flex; align-items: center; justify-content: center;
  min-width: 34px; height: 26px; padding: 0 8px; margin-bottom: 14px;
  font-family: var(--mono); font-weight: 600; font-size: .8rem;
  color: var(--green-hi);
  background: rgba(56,223,118,.08);
  border: 1px solid var(--green-dim);
  border-radius: 6px;
}
.card-quiet { background: transparent; border-style: dashed; }
.card-quiet .card-tag { color: var(--faint); border-color: var(--line-2); background: transparent; }

/* ───────────────── build ───────────────── */

.build {
  display: grid; gap: 40px;
  grid-template-columns: 1fr 1fr; align-items: center;
}
.build-copy { max-width: 52ch; }

.terminal {
  border-radius: var(--radius); overflow: hidden;
  background: #06090e;
  border: 1px solid var(--line-2);
  box-shadow: 0 30px 70px -35px rgba(0,0,0,.9), 0 0 0 1px var(--bevel-lt) inset;
}
.term-bar {
  display: flex; align-items: center; gap: 7px;
  padding: 11px 14px;
  background: linear-gradient(180deg, #141b26, #0d131c);
  border-bottom: 1px solid var(--line);
}
.term-bar .dot { width: 11px; height: 11px; border-radius: 50%; background: #2b3444; }
.term-bar .dot:nth-child(1) { background: #e06c6c; }
.term-bar .dot:nth-child(2) { background: #e0b84f; }
.term-bar .dot:nth-child(3) { background: var(--green); }
.term-title { margin-left: 8px; font-family: var(--mono); font-size: .78rem; color: var(--faint); }
.term-body {
  margin: 0; padding: 22px 20px; overflow-x: auto;
  font-size: .92rem; line-height: 1.85; color: var(--ink);
}
.term-body .c { color: var(--faint); }
.term-body .p { color: var(--green); user-select: none; }
.term-body .a { color: var(--tan); }

/* ───────────────── closer ───────────────── */

.closer { max-width: 760px; text-align: center; }
.closer .eyebrow { display: inline-block; }
.closer blockquote {
  margin: 0 0 30px; padding: 0;
  font-family: var(--mono); font-weight: 500;
  font-size: clamp(1.15rem, 2.6vw, 1.5rem); line-height: 1.5;
  color: var(--ink); letter-spacing: -.01em;
}
.closer blockquote::before { content: "“"; color: var(--green); }
.closer blockquote::after  { content: "”"; color: var(--green); }

/* ───────────────── footer ───────────────── */

.foot {
  border-top: 1px solid var(--line);
  margin-top: 40px;
  background: var(--bg-2);
}
.foot-inner {
  max-width: var(--maxw); margin: 0 auto; padding: 44px 24px 22px;
  display: flex; flex-wrap: wrap; gap: 28px; justify-content: space-between; align-items: flex-start;
}
.foot-brand .brand-name { font-family: var(--pixel); font-size: 16px; }
.foot-brand p { margin: 10px 0 0; color: var(--faint); font-size: .9rem; max-width: 40ch; }
.foot-links { display: flex; gap: 24px; }
.foot-links a { color: var(--muted); font-size: .92rem; font-family: var(--mono); }
.foot-links a:hover { color: var(--green-hi); }
.disclaimer {
  max-width: var(--maxw); margin: 0 auto; padding: 22px 24px 40px;
  color: var(--faint); font-size: .8rem; line-height: 1.7;
  border-top: 1px solid var(--line);
}

/* ───────────────── responsive ───────────────── */

@media (max-width: 860px) {
  .build { grid-template-columns: 1fr; gap: 28px; }
  .hero-city { opacity: .4; right: -30%; top: 40px; }
  .hero-inner { max-width: 100%; }
}
@media (max-width: 560px) {
  body { font-size: 16px; }
  .hero { padding-top: 44px; }
  .hero-city { display: none; }
  .cta-row .btn { flex: 1 1 auto; justify-content: center; }
}
