/* Arbolinea - shared stylesheet. Flat deploy, no build step. */

/* ---------- Tokens ---------- */
:root {
  --bg: #0E1411;
  --bg-alt: #131A16;
  --panel: #182019;
  --hairline: #26302A;

  --text: #EFF3EE;
  --text-2: #DDE4DE;
  --muted: #B8C2BA; /* never darker than this on dark backgrounds */

  --ice: #8FC6E8;
  --ice-deep: #4E86AC;
  --timber: #D2A878;
  --timber-deep: #A97F4F;

  --pill-live-text: #A8E4B4;
  --pill-live-border: #3E5B48;

  --font-head: "Space Grotesk", "Segoe UI", system-ui, sans-serif;
  --font-body: "Public Sans", "Segoe UI", system-ui, sans-serif;
  --font-mono: "Spline Sans Mono", "Consolas", monospace;

  --radius: 16px;
  --maxw: 1080px;
}

/* ---------- Reset / base ----------
   Hard requirement: every surface declares its own solid background.
   html, body, main, every section, and footer are painted explicitly. */
* { margin: 0; padding: 0; box-sizing: border-box; }

html {
  background: var(--bg);
  color-scheme: dark;
  scroll-behavior: smooth;
}

body {
  background: var(--bg);
  color: var(--text);
  font-family: var(--font-body);
  font-size: 17px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

main { background: var(--bg); display: block; }
section { background: var(--bg); }

img, svg { max-width: 100%; display: block; }

a { color: var(--ice); text-decoration: none; }
a:hover { text-decoration: underline; }

/* Visible focus states on all interactive elements */
a:focus-visible,
button:focus-visible {
  outline: 2px solid var(--ice);
  outline-offset: 3px;
  border-radius: 4px;
}

h1, h2, h3 {
  font-family: var(--font-head);
  line-height: 1.15;
  color: var(--text);
}

.wrap {
  max-width: var(--maxw);
  margin: 0 auto;
  padding: 0 24px;
}

/* ---------- Nav ---------- */
.nav {
  position: sticky;
  top: 0;
  z-index: 50;
  background: rgba(14, 20, 17, 0.92); /* solid enough to pass contrast; backdrop blur below */
  backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--hairline);
}

.nav-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  height: 64px;
}

.brand {
  display: flex;
  align-items: center;
  gap: 10px;
  color: var(--ice); /* mark uses currentColor: ice in nav */
  font-family: var(--font-head);
  font-weight: 600;
  font-size: 1.1rem;
  letter-spacing: 0.02em;
}
.brand:hover { text-decoration: none; }
.brand .mark { width: 30px; height: 30px; flex: none; }
.brand .wordmark { color: var(--text); }

.nav-links {
  display: flex;
  align-items: center;
  gap: 22px;
  font-family: var(--font-mono);
  font-size: 0.8rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
}
.nav-links a { color: var(--text-2); white-space: nowrap; }
.nav-links a:hover { color: var(--ice); text-decoration: none; }

/* ---------- Hero ---------- */
.hero {
  background: var(--bg);
  padding: 96px 0 88px;
  border-bottom: 1px solid var(--hairline);
  position: relative;
  overflow: hidden;
}

/* Front Range ridgeline behind the hero text: white outline, faint enough
   that headline contrast is untouched (decorative only). */
.hero-range {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  width: 100%;
  height: 62%;
  color: #EFF3EE;
  opacity: 0.14;
  pointer-events: none;
}

.hero .wrap {
  position: relative;
  z-index: 1;
}

.eyebrow {
  font-family: var(--font-mono);
  font-size: 0.8rem;
  text-transform: uppercase;
  letter-spacing: 0.14em;
  color: var(--ice);
  margin-bottom: 18px;
}

.hero h1 {
  font-size: clamp(2.1rem, 6vw, 3.6rem);
  font-weight: 700;
  max-width: 18ch;
  margin-bottom: 20px;
}

/* Gradient on "Finishing is." - ice into timber.
   Fallback to solid ice where background-clip: text is unsupported,
   so the text can never render invisible. */
.grad { color: var(--ice); }
@supports ((-webkit-background-clip: text) or (background-clip: text)) {
  .grad {
    background: linear-gradient(100deg, #A7D6F0 0%, #D8EDF9 45%, #E2BE8F 100%);
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
  }
}

.tagline {
  font-family: var(--font-mono);
  font-size: 0.9rem;
  letter-spacing: 0.06em;
  color: var(--muted);
  margin-bottom: 22px;
}

.hero p.thesis {
  color: var(--text-2);
  max-width: 56ch;
  margin-bottom: 34px;
}

.btn-row { display: flex; flex-wrap: wrap; gap: 14px; }

.btn {
  display: inline-block;
  font-family: var(--font-head);
  font-weight: 600;
  font-size: 0.95rem;
  padding: 13px 26px;
  border-radius: 10px;
  border: 1px solid transparent;
  transition: transform 0.15s ease, background 0.15s ease, border-color 0.15s ease;
}
.btn:hover { text-decoration: none; transform: translateY(-2px); }

.btn-primary {
  background: var(--ice);
  color: #0B1B26; /* dark ink on ice, AA+ */
}
.btn-primary:hover { background: #A7D6F0; }

.btn-secondary {
  background: var(--panel);
  color: var(--text);
  border-color: var(--hairline);
}
.btn-secondary:hover { border-color: var(--ice-deep); }

/* ---------- Sections ---------- */
.section { padding: 84px 0; border-bottom: 1px solid var(--hairline); }
.section-alt { background: var(--bg-alt); }

.section-head { margin-bottom: 40px; max-width: 60ch; }
.section-head h2 { font-size: clamp(1.6rem, 4vw, 2.2rem); margin: 10px 0 12px; }
.section-head p { color: var(--muted); }

.eyebrow-timber { color: var(--timber); }

/* ---------- Cards ---------- */
.grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 20px;
}

.card {
  background: var(--panel);
  border: 1px solid var(--hairline);
  border-radius: var(--radius);
  padding: 26px 24px;
  display: flex;
  flex-direction: column;
  gap: 12px;
  transition: transform 0.18s ease, border-color 0.18s ease;
}
.card h3 { font-size: 1.2rem; }
.card p { color: var(--muted); font-size: 0.95rem; }
.card .meta {
  margin-top: auto;
  padding-top: 14px;
  font-family: var(--font-mono);
  font-size: 0.75rem;
  letter-spacing: 0.06em;
  color: var(--muted);
  border-top: 1px solid var(--hairline);
}

.card-ice:hover { transform: translateY(-4px); border-color: var(--ice-deep); }
.card-timber:hover { transform: translateY(-4px); border-color: var(--timber-deep); }

/* Status pills */
.pill {
  align-self: flex-start;
  font-family: var(--font-mono);
  font-size: 0.7rem;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  padding: 4px 10px;
  border-radius: 999px;
  border: 1px solid var(--hairline);
  color: var(--muted);
}
.pill-live {
  color: var(--pill-live-text);
  border-color: var(--pill-live-border);
  background: rgba(62, 91, 72, 0.18);
}
.pill-ice { color: var(--ice); border-color: var(--ice-deep); }
.pill-timber { color: var(--timber); border-color: var(--timber-deep); }

/* Services numbering */
.card .num {
  font-family: var(--font-mono);
  font-size: 0.8rem;
  color: var(--ice);
  letter-spacing: 0.1em;
}

/* Doctrine panel */
.doctrine {
  margin-top: 36px;
  background: var(--panel);
  border: 1px solid var(--ice-deep);
  border-radius: var(--radius);
  padding: 30px 28px;
}
.doctrine .label {
  font-family: var(--font-mono);
  font-size: 0.75rem;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  color: var(--ice);
  margin-bottom: 12px;
}
.doctrine p {
  font-family: var(--font-head);
  font-size: 1.2rem;
  line-height: 1.45;
  color: var(--text-2);
  max-width: 46ch;
}
.doctrine-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 28px 40px;
}
.doctrine .sublabel {
  font-family: var(--font-mono);
  font-size: 0.72rem;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  color: var(--muted);
  margin-bottom: 8px;
}

/* ---------- About ---------- */
.about-grid {
  display: grid;
  grid-template-columns: 1.4fr 1fr;
  gap: 32px;
  align-items: start;
}
.about-grid p { color: var(--text-2); max-width: 58ch; }

.contact-card {
  background: var(--panel);
  border: 1px solid var(--hairline);
  border-radius: var(--radius);
  padding: 26px 24px;
}
.contact-card h3 { font-size: 1.05rem; margin-bottom: 14px; }
.contact-card ul { list-style: none; }
.contact-card li {
  display: flex;
  gap: 10px;
  align-items: baseline;
  padding: 6px 0;
  font-size: 0.95rem;
}
.contact-card .k {
  font-family: var(--font-mono);
  font-size: 0.72rem;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--muted);
  min-width: 72px;
}

/* ---------- Footer ---------- */
footer {
  background: var(--bg-alt);
  padding: 34px 0;
}
.footer-inner {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 16px;
  flex-wrap: wrap;
}
.footer-inner .entity { color: var(--text-2); font-size: 0.9rem; }
.footer-inner .tag {
  font-family: var(--font-mono);
  font-size: 0.8rem;
  letter-spacing: 0.08em;
  color: var(--muted);
}

/* ---------- Skills stub page ---------- */
.stub {
  min-height: 55vh;
  display: flex;
  flex-direction: column;
  justify-content: center;
  background: var(--bg);
}

/* ---------- Responsive (down to 380px) ---------- */
@media (max-width: 640px) {
  /* Keep nav on one row: mark only, tighter mono links */
  .brand .wordmark { display: none; }
  .nav-links { gap: 14px; font-size: 0.72rem; }
  .hero { padding: 72px 0 64px; }
  .section { padding: 64px 0; }
  .about-grid { grid-template-columns: 1fr; }
}

@media (max-width: 400px) {
  .nav-links { gap: 10px; letter-spacing: 0.04em; }
  .wrap { padding: 0 18px; }
}

/* ---------- Reduced motion ---------- */
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  * { transition: none !important; animation: none !important; }
  .btn:hover, .card-ice:hover, .card-timber:hover { transform: none; }
}
