/* MilePost Technology — "Appalachian Apex" design system
   Parchment canvas, forest pine structure, ridge-amber actions, circuit-gold accents.
   Space Grotesk for display + labels, Manrope for reading. */

:root {
  --canvas: #FAF9F5;
  --white: #FFFFFF;
  --stone: #F2EFE9;
  --line: #E3DFD5;
  --ink: #1B221B;
  --ink-2: #424840;
  --ink-3: #73796F;
  --pine: #284A28;
  --pine-deep: #113314;
  --pine-dark: #0E1F0F;
  --amber: #D96818;
  --amber-hover: #BF560E;
  --gold: #D8A232;
  --gold-text: #9E6E00;
  --moss-tint: rgba(40, 74, 40, .08);

  --display: "Space Grotesk", "Segoe UI", system-ui, sans-serif;
  --body: "Manrope", "Segoe UI", system-ui, sans-serif;

  --r-sm: .25rem; --r: .5rem; --r-lg: 1rem;
  --e1: 0 2px 8px -2px rgba(40, 74, 40, .05), 0 1px 3px 0 rgba(27, 34, 27, .03);
  --e2: 0 8px 24px -4px rgba(40, 74, 40, .08), 0 4px 8px -2px rgba(217, 104, 24, .04);
  --e3: 0 20px 48px -8px rgba(27, 34, 27, .16), 0 1px 2px 0 rgba(217, 104, 24, .08);

  --max: 78rem;
  --gutter: clamp(1rem, 4vw, 2.5rem);
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; scroll-padding-top: 5rem; }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }
body {
  margin: 0; background: var(--canvas); color: var(--ink);
  font-family: var(--body); font-size: 1.0625rem; line-height: 1.65;
  -webkit-font-smoothing: antialiased;
}
img { max-width: 100%; }
a { color: inherit; }
:focus-visible { outline: 3px solid rgba(217, 104, 24, .55); outline-offset: 3px; border-radius: var(--r-sm); }
.wrap { max-width: var(--max); margin: 0 auto; padding: 0 var(--gutter); }

h1, h2, h3, h4 { font-family: var(--display); color: var(--ink); margin: 0; }
h2 { font-size: clamp(1.75rem, 3.2vw, 2.4rem); line-height: 1.15; letter-spacing: -0.02em; font-weight: 700; }
h3 { font-size: 1.3rem; line-height: 1.3; letter-spacing: -0.01em; font-weight: 600; }
p { margin: 0; }

.label {
  font-family: var(--display); font-weight: 600; font-size: .75rem; letter-spacing: .08em; text-transform: uppercase;
  color: var(--pine); display: inline-flex; align-items: center; gap: .5rem;
}
.label::before { content: ""; width: 1.25rem; height: 2px; background: var(--amber); }

/* Buttons */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: .5rem;
  font-family: var(--display); font-weight: 600; font-size: .98rem; text-decoration: none;
  padding: .75rem 1.5rem; border-radius: var(--r); border: 1.5px solid transparent;
  transition: background-color .15s, border-color .15s;
}
.btn-primary { background: var(--amber); color: #fff; }
.btn-primary:hover { background: var(--amber-hover); }
.btn-solid { background: var(--pine); color: #fff; }
.btn-solid:hover { background: #1E381E; }
.btn-outline { border-color: var(--pine); color: var(--pine); }
.btn-outline:hover { background: rgba(40, 74, 40, .06); }
.actions { display: flex; flex-wrap: wrap; gap: .75rem; margin-top: 2rem; }

/* Header */
.site-head { position: sticky; top: 0; z-index: 20; background: rgba(250, 249, 245, .9); backdrop-filter: blur(10px); -webkit-backdrop-filter: blur(10px); border-bottom: 1px solid var(--line); }
.site-head .wrap { display: flex; align-items: center; justify-content: space-between; gap: 1rem; height: 4.5rem; }
.brand { display: flex; align-items: center; gap: .6rem; text-decoration: none; flex: none; }
.brand .shield { height: 2.6rem; width: auto; }
.brand .word { height: 2.05rem; width: auto; }
.nav { display: flex; align-items: center; gap: clamp(.75rem, 2.2vw, 2rem); font-family: var(--display); font-weight: 500; font-size: .95rem; }
.nav a { text-decoration: none; color: var(--ink-2); }
.nav a:not(.btn):hover { color: var(--pine); }
.nav .btn { padding: .55rem 1.1rem; color: #fff; }
@media (max-width: 900px) { .nav .hide-md { display: none; } }
@media (max-width: 520px) { .nav .hide-sm { display: none; } .brand .word { height: 1.7rem; } .brand .shield { height: 2.2rem; } }

/* Hero */
.hero { padding: clamp(3rem, 7vw, 5.5rem) 0 clamp(3rem, 6vw, 4.5rem); position: relative; overflow: hidden; }
.hero-grid { display: grid; grid-template-columns: minmax(0, 1.05fr) minmax(0, 1fr); gap: clamp(2rem, 5vw, 4.5rem); align-items: center; }
@media (max-width: 920px) { .hero-grid { grid-template-columns: 1fr; } }
.hero h1 {
  margin-top: 1.25rem;
  font-size: clamp(2.4rem, 5.2vw, 3.6rem); line-height: 1.06; letter-spacing: -0.03em; font-weight: 700;
  max-width: 16ch;
}
.hero .lede { margin-top: 1.4rem; font-size: clamp(1.05rem, 1.5vw, 1.2rem); line-height: 1.7; color: var(--ink-2); max-width: 36rem; }

/* Topographic panel: the hero's one loud element */
.topo { position: relative; background: var(--white); border: 1px solid var(--line); border-radius: var(--r-lg); box-shadow: var(--e3); overflow: hidden; }
.topo-bar { display: flex; align-items: center; justify-content: space-between; gap: 1rem; padding: .7rem 1rem; border-bottom: 1px solid var(--line); background: var(--stone); font-family: var(--display); font-size: .78rem; color: var(--ink-2); }
.topo-bar b { font-weight: 600; color: var(--ink); }
.live { display: inline-flex; align-items: center; gap: .45rem; font-weight: 600; color: var(--gold-text); }
.live::before { content: ""; width: 7px; height: 7px; border-radius: 50%; background: var(--gold); box-shadow: 0 0 10px rgba(216, 162, 50, .8); }
.topo svg { display: block; width: 100%; height: auto; }
.topo .pl { font-family: var(--display); font-size: 17px; font-weight: 600; fill: var(--ink); letter-spacing: .02em; }
.topo .pl-main { font-size: 19px; font-weight: 700; fill: var(--pine-deep); }
.topo .tick { font-family: var(--display); font-size: 14px; fill: var(--ink-3); }
.topo-foot { display: flex; flex-wrap: wrap; justify-content: space-between; gap: .25rem 1rem; padding: .6rem 1rem; border-top: 1px solid var(--line); font-size: .74rem; color: var(--ink-3); }
.node-pulse { transform-origin: center; transform-box: fill-box; animation: pulse 2.6s ease-out infinite; }
@keyframes pulse { 0% { opacity: .7; transform: scale(.6); } 100% { opacity: 0; transform: scale(2.4); } }
@media (prefers-reduced-motion: reduce) { .node-pulse { animation: none; opacity: 0; } }

/* Data strip */
.sources { border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); background: var(--white); }
.sources .wrap { display: flex; flex-wrap: wrap; align-items: center; gap: .75rem 2.25rem; padding-top: 1.1rem; padding-bottom: 1.1rem; }
.sources span { font-family: var(--display); font-size: .9rem; font-weight: 500; color: var(--ink-2); }
.sources .lead { color: var(--ink-3); font-weight: 400; }

/* Sections */
.section { padding: clamp(4rem, 9vw, 6.5rem) 0; }
.section-head { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 1rem 3rem; align-items: end; margin-bottom: clamp(2rem, 4vw, 3rem); }
.section-head h2 { margin-top: .9rem; max-width: 20ch; }
.section-head p { color: var(--ink-2); max-width: 34rem; }
@media (max-width: 820px) { .section-head { grid-template-columns: 1fr; } }

/* Project grid */
.grid { display: grid; grid-template-columns: repeat(12, minmax(0, 1fr)); gap: 1.5rem; }
.card { background: var(--white); border: 1px solid var(--line); border-radius: var(--r-lg); box-shadow: var(--e1); overflow: hidden; display: flex; flex-direction: column; }
.card .body { padding: 1.5rem 1.6rem 1.7rem; display: flex; flex-direction: column; gap: .6rem; flex: 1; }
.card .body p { color: var(--ink-2); font-size: 1rem; }
.card .meta { display: flex; flex-wrap: wrap; gap: .5rem; align-items: center; }
.card figure { margin: 0; border-bottom: 1px solid var(--line); background: #0b120c; }
.card figure img, .card figure svg { display: block; width: 100%; height: auto; }
.card figcaption { font-size: .72rem; color: var(--ink-3); background: var(--stone); padding: .45rem 1.6rem; border-top: 1px solid var(--line); }
.span-7 { grid-column: span 7; } .span-5 { grid-column: span 5; }
@media (max-width: 920px) { .span-7, .span-5 { grid-column: span 12; } }
.accent-top { border-top: 3px solid var(--amber); }
.pixel { flex: 1; min-height: 14rem; position: relative; }
.pixel img { image-rendering: pixelated; position: absolute; inset: 0; width: 100%; height: 100% !important; object-fit: cover; }
@media (max-width: 920px) { .pixel { flex: none; aspect-ratio: 16 / 10; } }
.card .note { font-size: .85rem !important; color: var(--ink-3) !important; }
.card .next { font-size: .95rem !important; color: var(--pine) !important; font-weight: 600; }

.chip { font-family: var(--display); font-size: .7rem; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; padding: .28rem .55rem; border-radius: var(--r-sm); }
.chip-live { background: rgba(40, 74, 40, .1); color: var(--pine); }
.chip-wip { background: rgba(216, 162, 50, .15); color: var(--gold-text); display: inline-flex; align-items: center; gap: .4rem; }
.chip-wip::before { content: ""; width: 6px; height: 6px; border-radius: 50%; background: var(--gold); box-shadow: 0 0 8px rgba(216, 162, 50, .7); }
.chip-tag { background: var(--stone); color: var(--ink-2); }

/* Allegany AI panel */
.aai { position: relative; background: var(--pine-deep); color: #EBF3E7; border: 0; }
.aai::before { content: ""; position: absolute; inset: 0; background: url("brand/contours-gold.svg") center / 140% no-repeat; opacity: .32; pointer-events: none; }
.aai > * { position: relative; }
.aai h3 { color: #fff; font-size: 1.6rem; }
.aai .body p { color: #B9CDB5; }
.aai .next { color: #F7BD4B !important; }
.aai .chip-wip { background: rgba(216, 162, 50, .18); color: #F7BD4B; }
.stats { list-style: none; margin: .75rem 0 0; padding: 0; display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); border-top: 1px solid rgba(235, 243, 231, .15); }
.stats li { padding: 1rem .75rem 0 0; font-size: .85rem; color: #B9CDB5; line-height: 1.35; }
.stats b { display: block; font-family: var(--display); font-size: clamp(1.5rem, 2.6vw, 2rem); font-weight: 700; color: #fff; letter-spacing: -0.02em; margin-bottom: .2rem; }

/* How it fits: circuit waypoint stepper */
.how { background: var(--white); border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); }
.steps { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 0; position: relative; counter-reset: s; }
.steps li { position: relative; padding: 0 1.5rem 0 0; counter-increment: s; }
.steps .node { position: relative; display: flex; align-items: center; height: 2.5rem; margin-bottom: 1.25rem; }
.steps .node::before { content: counter(s); position: relative; z-index: 1; display: grid; place-items: center; width: 2.5rem; height: 2.5rem; border-radius: var(--r); background: var(--pine); color: #fff; font-family: var(--display); font-weight: 700; }
.steps .node::after { content: ""; position: absolute; left: 2.5rem; right: 0; top: 50%; height: 2px; background: repeating-linear-gradient(90deg, var(--gold) 0 10px, transparent 10px 16px); }
.steps li:last-child .node::after { display: none; }
.steps li:last-child .node::before { background: var(--amber); }
.steps h3 { font-size: 1.12rem; }
.steps p { margin-top: .4rem; color: var(--ink-2); font-size: .97rem; }
@media (max-width: 860px) {
  .steps { grid-template-columns: 1fr; gap: 1.75rem; }
  .steps li { padding: 0 0 0 3.5rem; }
  .steps .node { position: absolute; left: 0; top: 0; margin: 0; }
  .steps .node::after { display: none; }
}

/* Crewdeck banner (keeps Crewdeck's own look) */
.crewdeck {
  position: relative; overflow: hidden; display: flex; align-items: center; gap: clamp(1rem, 3vw, 2.5rem);
  background: #000; color: #eef0f5; border-radius: var(--r-lg); padding: clamp(1.5rem, 3.5vw, 2.25rem);
  text-decoration: none; border: 1px solid #1b1d24; box-shadow: var(--e3);
}
.crewdeck::before, .crewdeck::after { content: ""; position: absolute; border-radius: 50%; filter: blur(50px); pointer-events: none; }
.crewdeck::before { width: 18rem; height: 18rem; right: -4rem; top: -9rem; background: rgba(240, 164, 107, .32); }
.crewdeck::after { width: 15rem; height: 15rem; right: 12rem; bottom: -10rem; background: rgba(111, 183, 255, .26); }
.crewdeck > * { position: relative; }
.cd-lockup { display: flex; align-items: center; gap: .9rem; flex: none; }
.cd-word { font-family: "Oxanium", sans-serif; font-weight: 800; letter-spacing: .12em; font-size: 1.45rem; line-height: 1; }
.cd-sub { font-family: "Geist Mono", ui-monospace, monospace; font-size: .78rem; color: #9aa0ad; margin-top: .35rem; }
.cd-sub b { font-weight: 400; color: #c3c7d1; }
.cd-sub i { font-style: normal; color: #7fe0c2; }
.crewdeck p { flex: 1; color: #c3c7d1; font-family: "Geist", system-ui, sans-serif; font-size: 1.02rem; }
.crewdeck .go { font-family: "Geist", system-ui, sans-serif; font-weight: 600; white-space: nowrap; border-bottom: 1px solid rgba(255,255,255,.35); }
.crewdeck:hover .go { border-color: #7fe0c2; }
@media (max-width: 820px) { .crewdeck { flex-direction: column; align-items: flex-start; } }

/* About / roots */
.about-grid { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: clamp(2rem, 6vw, 5rem); align-items: start; }
@media (max-width: 860px) { .about-grid { grid-template-columns: 1fr; } }
.about-grid h2 { margin-top: .9rem; }
.about-grid p { margin-top: 1rem; color: var(--ink-2); max-width: 34rem; }
.miles { list-style: none; margin: 0; padding: 0; background: var(--white); border: 1px solid var(--line); border-radius: var(--r-lg); box-shadow: var(--e1); }
.miles li { display: grid; grid-template-columns: 6.5rem 1fr; gap: 1rem; align-items: baseline; padding: 1.15rem 1.5rem; border-bottom: 1px solid var(--line); }
.miles li:last-child { border-bottom: 0; }
.miles .n { font-family: var(--display); font-weight: 700; font-size: 1.9rem; line-height: 1; letter-spacing: -0.03em; color: var(--pine); }
.miles .n small { font-size: .85rem; font-weight: 600; margin-left: .15rem; color: var(--ink-3); letter-spacing: 0; }
.miles .t { font-family: var(--display); font-weight: 600; }
.miles .t span { display: block; font-family: var(--body); font-weight: 400; color: var(--ink-3); font-size: .93rem; }

/* Contact + footer */
.contact { background: var(--pine-deep); color: #EBF3E7; position: relative; overflow: hidden; }
.contact::before { content: ""; position: absolute; inset: 0; background: url("brand/contours-gold.svg") 85% 40% / 70rem no-repeat; opacity: .18; pointer-events: none; }
.contact .wrap { position: relative; display: grid; grid-template-columns: minmax(0, 1.2fr) minmax(0, 1fr); gap: 2rem 4rem; align-items: center; }
@media (max-width: 860px) { .contact .wrap { grid-template-columns: 1fr; } }
.contact h2 { color: #fff; margin-top: .9rem; }
.contact .label { color: #F7BD4B; }
.contact p { margin-top: 1rem; color: #B9CDB5; max-width: 34rem; }
.contact-card { background: rgba(255,255,255,.06); border: 1px solid rgba(235,243,231,.14); border-radius: var(--r-lg); padding: 1.5rem; }
.contact-card dl { margin: 0; display: grid; gap: 1rem; }
.contact-card dt { font-family: var(--display); font-size: .72rem; letter-spacing: .08em; text-transform: uppercase; color: #92b98e; font-weight: 600; }
.contact-card dd { margin: .2rem 0 0; color: #fff; font-family: var(--display); font-weight: 500; font-size: 1.05rem; }

.site-foot { background: var(--pine-dark); color: #92a88f; font-size: .88rem; }
.site-foot .wrap { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 1rem; padding-top: 1.75rem; padding-bottom: 1.75rem; }
.site-foot .brand .word { height: 1.6rem; }
.site-foot .brand .shield { height: 2rem; }
.site-foot a { color: #cfdccb; text-decoration: none; }
.site-foot a:hover { color: #fff; }
.foot-links { display: flex; gap: 1.5rem; flex-wrap: wrap; }
.card:has(.pixel) .body { flex: none; }
@media (max-width: 600px) {
  .topo .pl { font-size: 30px; } .topo .pl-main { font-size: 32px; } .topo .tick { font-size: 24px; }
}

/* Software page */
.page-hero { padding: clamp(3rem, 7vw, 5rem) 0 clamp(2rem, 4vw, 3rem); }
.page-hero h1 { margin-top: 1.1rem; font-size: clamp(2.2rem, 4.6vw, 3.2rem); line-height: 1.08; letter-spacing: -0.03em; font-weight: 700; }
.page-hero .lede { margin-top: 1rem; font-size: clamp(1.05rem, 1.5vw, 1.2rem); color: var(--ink-2); max-width: 38rem; }
.nav a[aria-current="page"] { color: var(--pine); box-shadow: inset 0 -2px 0 var(--amber); }

.products { display: grid; grid-template-columns: minmax(0, 2fr) minmax(0, 1fr); gap: 1.5rem; align-items: stretch; }
@media (max-width: 900px) { .products { grid-template-columns: 1fr; } }
.product-cd {
  position: relative; overflow: hidden; background: #000; color: #eef0f5; border-radius: var(--r-lg);
  padding: clamp(1.5rem, 4vw, 2.75rem); box-shadow: var(--e3); border: 1px solid #1b1d24;
  font-family: "Geist", system-ui, sans-serif;
}
.product-cd::before, .product-cd::after { content: ""; position: absolute; border-radius: 50%; filter: blur(60px); pointer-events: none; }
.product-cd::before { width: 22rem; height: 22rem; right: -6rem; top: -10rem; background: rgba(240, 164, 107, .30); }
.product-cd::after { width: 18rem; height: 18rem; right: 10rem; bottom: -12rem; background: rgba(111, 183, 255, .24); }
.product-cd > * { position: relative; }
.cd-top { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: center; gap: 1rem; }
.product-cd .cd-word { color: #eef0f5; font-size: clamp(1.6rem, 3vw, 2rem); margin: 0; }
.cd-chip { font-size: .78rem; font-weight: 600; color: #7fe0c2; border: 1px solid rgba(127, 224, 194, .35); padding: .3rem .7rem; border-radius: 999px; }
.cd-lede { margin-top: 1.5rem; font-size: 1.12rem; line-height: 1.6; color: #eef0f5; max-width: 40rem; }
.cd-points { list-style: none; margin: 1.5rem 0 0; padding: 0; display: grid; gap: .75rem; max-width: 42rem; }
.cd-points li { padding-left: 1.4rem; position: relative; color: #9aa0ad; line-height: 1.55; }
.cd-points li::before { content: ""; position: absolute; left: 0; top: .55rem; width: .55rem; height: .55rem; border-radius: 2px; background: #7fe0c2; transform: skewX(-20deg); }
.cd-points b { color: #eef0f5; font-weight: 600; }
.cd-actions { display: flex; flex-wrap: wrap; gap: .75rem; margin-top: 2rem; }
.cd-btn { display: inline-flex; align-items: center; padding: .75rem 1.25rem; border-radius: 12px; font-weight: 600; text-decoration: none; background: #eef0f5; color: #000; border: 1px solid #eef0f5; }
.cd-btn:hover { background: #fff; }
.cd-btn-ghost { background: rgba(255,255,255,.06); color: #eef0f5; border-color: rgba(255,255,255,.14); }
.cd-btn-ghost:hover { background: rgba(255,255,255,.12); }
.product-next { border: 1.5px dashed var(--line); border-radius: var(--r-lg); padding: clamp(1.5rem, 3vw, 2rem); display: flex; flex-direction: column; align-items: flex-start; gap: .75rem; background: rgba(255,255,255,.5); }
.product-next h2 { font-size: 1.35rem; }
.product-next p { color: var(--ink-2); }
.product-next .btn { margin-top: auto; }
