/* Dun Cairn Labs · site styles */
:root {
  --bg: #0b0d10;
  --surface: #12161b;
  --ink: #e6e9ec;
  --ink-2: #b4bcc5;
  --ink-3: #9aa3ad;
  --line: rgba(230, 233, 236, 0.10);
  --line-2: rgba(230, 233, 236, 0.18);
  --forest: oklch(0.48 0.11 152);      /* fills: buttons, dots, marks */
  --forest-hi: oklch(0.55 0.11 152);   /* hover */
  --forest-text: oklch(0.68 0.12 152); /* green text on dark */
  --on-forest: #eef2ee;
  --ff-sans: "Space Grotesk", -apple-system, BlinkMacSystemFont, "Helvetica Neue", Arial, sans-serif;
  --ff-mono: "JetBrains Mono", ui-monospace, "SF Mono", Menlo, monospace;
  --maxw: 1280px;
  --gutter: clamp(20px, 4vw, 40px);
  --section-y: clamp(80px, 10vw, 128px);
  --radius: 6px;
}

*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0; background: var(--bg); color: var(--ink);
  font-family: var(--ff-sans); font-size: 17px; line-height: 1.55;
  -webkit-font-smoothing: antialiased; -moz-osx-font-smoothing: grayscale;
}
a { color: inherit; text-decoration: none; }
a:hover { color: var(--ink); }
p { margin: 0 0 1em; text-wrap: pretty; }
p:last-child { margin-bottom: 0; }
h1, h2, h3 { margin: 0; font-weight: 600; text-wrap: balance; }
::selection { background: var(--forest); color: var(--on-forest); }
:focus-visible { outline: 2px solid var(--forest-text); outline-offset: 3px; border-radius: 2px; }
.skip { position: absolute; left: 12px; top: -60px; z-index: 100; background: var(--forest); color: var(--on-forest); padding: 12px 16px; border-radius: var(--radius); font-family: var(--ff-mono); font-size: 13px; }
.skip:focus { top: 12px; color: var(--on-forest); }

.wrap { max-width: var(--maxw); margin: 0 auto; padding: 0 var(--gutter); }
section[id], header[id] { scroll-margin-top: 80px; }
.section { padding: var(--section-y) 0; border-top: 1px solid var(--line); }
.mono { font-family: var(--ff-mono); font-size: 12px; color: var(--ink-3); }
.eyebrow { font-family: var(--ff-mono); font-size: 12px; color: var(--ink-3); display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.dot { width: 8px; height: 8px; border-radius: 50%; background: var(--forest); flex: none; }
.sec-head { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.4fr); gap: 32px 64px; align-items: end; margin-bottom: 56px; }
.sec-num { font-family: var(--ff-mono); font-size: 12px; color: var(--forest-text); margin-bottom: 16px; }
.h2 { font-size: clamp(36px, 4.6vw, 56px); line-height: 1.02; letter-spacing: -0.03em; }
.lead { font-size: clamp(17px, 1.5vw, 19px); line-height: 1.6; color: var(--ink-2); max-width: 56ch; }

/* Mark */
.mark { width: 30px; height: 30px; flex: none; }
.mark .beaker { fill: none; stroke: #9aa3ad; stroke-width: 2.5; stroke-linecap: round; stroke-linejoin: round; }
.mark .ticks { fill: none; stroke: var(--forest); stroke-width: 2.5; stroke-linecap: round; }
.mark .stones { fill: var(--ink); }

/* Nav */
.nav { position: sticky; top: 0; z-index: 50; background: var(--bg); border-bottom: 1px solid var(--line); }
.nav-inner { max-width: var(--maxw); margin: 0 auto; padding: 12px var(--gutter); display: flex; align-items: center; justify-content: space-between; gap: 24px; }
.brand { display: flex; align-items: center; gap: 12px; min-height: 44px; }
.wordmark { font-weight: 600; font-size: 17px; letter-spacing: -0.01em; white-space: nowrap; }
.nav-right { display: flex; align-items: center; gap: 28px; }
.nav-links { display: flex; align-items: center; gap: 28px; font-family: var(--ff-mono); font-size: 12px; }
.nav-links a { color: var(--ink-3); min-height: 44px; display: flex; align-items: center; transition: color .15s ease; }
.nav-links a:hover { color: var(--ink); }
.nav-toggle { display: none; appearance: none; border: 0; background: transparent; width: 44px; height: 44px; cursor: pointer; flex-direction: column; align-items: center; justify-content: center; gap: 5px; }
.nav-toggle span { display: block; width: 22px; height: 1.5px; background: var(--ink); transition: transform .25s ease; }
.nav-toggle[aria-expanded="true"] span:first-child { transform: translateY(3.25px) rotate(45deg); }
.nav-toggle[aria-expanded="true"] span:last-child { transform: translateY(-3.25px) rotate(-45deg); }
.nav-mobile { position: fixed; inset: 0; z-index: 40; background: var(--bg); padding: 96px var(--gutter) 40px; display: flex; flex-direction: column; gap: 4px; opacity: 0; visibility: hidden; transition: opacity .25s ease, visibility .25s ease; }
.nav-mobile.is-open { opacity: 1; visibility: visible; }
.nav-mobile a { font-size: 36px; font-weight: 600; letter-spacing: -0.03em; color: var(--ink-2); padding: 8px 0; }
.nav-mobile a:hover { color: var(--ink); }
.nav-mobile .btn { margin-top: 24px; align-self: flex-start; font-size: 16px; letter-spacing: 0; padding: 0 22px; color: var(--on-forest); }

/* Buttons */
.btn { appearance: none; cursor: pointer; display: inline-flex; align-items: center; justify-content: center; gap: 10px; min-height: 48px; padding: 0 22px; border-radius: var(--radius); border: 1px solid var(--forest); background: var(--forest); color: var(--on-forest); font-family: var(--ff-sans); font-size: 15px; font-weight: 600; transition: background .15s ease, border-color .15s ease; }
.btn:hover { background: var(--forest-hi); border-color: var(--forest-hi); color: var(--on-forest); }
.btn[disabled] { opacity: .6; cursor: progress; }
.btn-sm { min-height: 44px; padding: 0 16px; font-family: var(--ff-mono); font-size: 12px; font-weight: 500; }
.btn-ghost { background: transparent; border-color: var(--line-2); color: var(--ink); font-weight: 500; }
.btn-ghost:hover { background: rgba(230, 233, 236, .05); border-color: var(--ink-3); color: var(--ink); }

/* Hero */
.hero { background-image: linear-gradient(rgba(230,233,236,.045) 1px, transparent 1px), linear-gradient(90deg, rgba(230,233,236,.045) 1px, transparent 1px); background-size: 48px 48px; background-position: -1px -1px; }
.hero-inner { display: grid; grid-template-columns: minmax(0, 1.25fr) minmax(0, 1fr); gap: 56px; align-items: center; padding-top: clamp(64px, 9vw, 112px); padding-bottom: clamp(64px, 9vw, 104px); }
.hero h1 { margin-top: 28px; font-size: clamp(52px, 7.4vw, 96px); line-height: .98; letter-spacing: -0.04em; }
.hero h1 .dim { color: #7d8792; }
.hero .lead { margin-top: 32px; max-width: 46ch; }
.hero-ctas { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 40px; }

/* Project panel */
.panel { background: var(--surface); border: 1px solid var(--line); border-radius: 10px; overflow: hidden; font-family: var(--ff-mono); font-size: 13px; }
.panel-head, .panel-foot { display: flex; justify-content: space-between; gap: 16px; padding: 12px 18px; color: var(--ink-3); font-size: 11.5px; }
.panel-head { border-bottom: 1px solid var(--line); }
.panel-row { display: grid; grid-template-columns: 90px minmax(0, 1fr) auto; gap: 16px; align-items: center; padding: 16px 18px; border-bottom: 1px solid rgba(230,233,236,.06); }
.bars { display: flex; gap: 4px; }
.bars i { display: block; width: 28px; height: 6px; border-radius: 2px; background: rgba(230,233,236,.12); }
.bars i.on { background: var(--ink-3); }
.bars.live i.on { background: var(--forest-text); }
.state { color: var(--ink-3); }
.state.live { color: var(--forest-text); }

/* About */
.about-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 1px; background: var(--line); border: 1px solid var(--line); border-radius: 10px; overflow: hidden; }
.fact { background: var(--bg); padding: 28px; }
.fact .mono { display: block; margin-bottom: 12px; }
.fact p { font-size: 16px; color: var(--ink-2); margin: 0; }

/* Approach */
.quote { margin: 0 0 56px; padding-left: 24px; border-left: 2px solid var(--forest); font-size: clamp(22px, 2.4vw, 30px); line-height: 1.3; letter-spacing: -0.015em; max-width: 34ch; }
.steps { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 1px; background: var(--line); border: 1px solid var(--line); border-radius: 10px; overflow: hidden; }
.steps li { background: var(--surface); padding: 24px; display: flex; flex-direction: column; gap: 14px; }
.step-n { display: flex; justify-content: space-between; font-family: var(--ff-mono); font-size: 11.5px; color: var(--ink-3); }
.tag { align-self: flex-start; display: inline-flex; align-items: center; gap: 8px; font-family: var(--ff-mono); font-size: 11.5px; padding: 4px 10px; border-radius: 999px; border: 1px solid var(--line-2); color: var(--ink-2); white-space: nowrap; }
.tag::before { content: ""; width: 6px; height: 6px; border-radius: 50%; border: 1px solid currentColor; }
.tag[data-state="build"]::before { background: linear-gradient(90deg, currentColor 50%, transparent 50%); }
.tag[data-state="testing"] { color: var(--forest-text); border-color: var(--forest); }
.tag[data-state="testing"]::before { background: currentColor; }
.tag[data-state="released"] { color: var(--on-forest); background: var(--forest); border-color: var(--forest); }
.tag[data-state="released"]::before { background: currentColor; }
.steps p { font-size: 15px; line-height: 1.5; color: var(--ink-2); margin: 0; }

/* Principles */
.principles { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); }
.principle { padding: 36px 32px 40px 0; border-right: 1px solid var(--line); }
.principle + .principle { padding-left: 32px; }
.principle:last-child { border-right: 0; }
.principle .num { font-family: var(--ff-mono); font-size: 11.5px; color: var(--forest-text); }
.principle h3 { margin-top: 18px; font-size: 21px; letter-spacing: -0.01em; }
.principle p { margin-top: 10px; font-size: 15px; line-height: 1.55; color: var(--ink-3); }

/* Projects */
.projects { display: flex; flex-direction: column; gap: 12px; }
.project { display: grid; grid-template-columns: 64px minmax(0, 1fr) 200px auto; gap: 24px; align-items: center; padding: 24px 28px; background: var(--surface); border: 1px solid var(--line); border-radius: 10px; }
.project .mono { align-self: start; padding-top: 6px; }
.project h3 { font-size: 24px; letter-spacing: -0.02em; }
.project p { margin: 6px 0 0; font-size: 15px; color: var(--ink-3); max-width: 56ch; }
.project-state { display: flex; flex-direction: column; gap: 10px; }
.project-state .bars i { width: auto; flex: 1; }
.notify { appearance: none; cursor: pointer; background: transparent; border: 1px solid var(--line-2); color: var(--ink); border-radius: var(--radius); min-height: 44px; padding: 0 16px; font-family: var(--ff-mono); font-size: 12px; white-space: nowrap; transition: border-color .15s ease, background .15s ease; }
.notify:hover { border-color: var(--forest-text); background: rgba(230,233,236,.04); }

/* Waitlist */
.wl-box { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 56px; padding: clamp(28px, 4vw, 56px); background: var(--surface); border: 1px solid var(--line); border-radius: 12px; }
.wl-form { display: flex; flex-direction: column; gap: 24px; }
.wl-form[hidden], .wl-done[hidden] { display: none; }
.label { font-family: var(--ff-mono); font-size: 12px; color: var(--ink-2); }
.field { display: flex; flex-direction: column; gap: 10px; }
.input-row { display: flex; gap: 10px; }
.input { flex: 1; min-width: 0; height: 52px; padding: 0 16px; background: var(--bg); color: var(--ink); border: 1px solid var(--line-2); border-radius: var(--radius); font-family: var(--ff-mono); font-size: 15px; outline: none; transition: border-color .15s ease, box-shadow .15s ease; }
.input::placeholder { color: #7d8792; opacity: 1; }
.input:focus { border-color: var(--forest-text); box-shadow: 0 0 0 3px rgba(76, 140, 98, .35); }
.input[aria-invalid="true"] { border-color: var(--ink-2); }
.msg { margin: 0; min-height: 22px; font-size: 14.5px; color: var(--ink); }
fieldset { border: 0; padding: 0; margin: 0; min-width: 0; }
legend { padding: 0; margin-bottom: 12px; }
.chips { display: flex; flex-wrap: wrap; gap: 8px; }
.chip { appearance: none; cursor: pointer; min-height: 44px; padding: 0 16px; display: inline-flex; align-items: center; gap: 10px; border-radius: 999px; background: transparent; color: var(--ink-2); border: 1px solid var(--line-2); font-family: var(--ff-mono); font-size: 12.5px; transition: background .15s ease, color .15s ease, border-color .15s ease; }
.chip::before { content: ""; width: 14px; height: 14px; border-radius: 4px; border: 1px solid currentColor; flex: none; }
.chip:hover { border-color: var(--ink-3); color: var(--ink); }
.chip[aria-pressed="true"] { color: var(--ink); border-color: var(--forest-text); background: rgba(76, 140, 98, .14); }
.chip[aria-pressed="true"]::before { background: var(--forest) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 14 14'%3E%3Cpath d='M3.5 7.2l2.3 2.3 4.7-5' fill='none' stroke='%23eef2ee' stroke-width='1.6' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E") center / 14px no-repeat; border-color: var(--forest); }
.hp { position: absolute; left: -9999px; width: 1px; height: 1px; overflow: hidden; }
.wl-done { display: flex; flex-direction: column; gap: 16px; }
.wl-done h3 { font-size: 26px; letter-spacing: -0.02em; line-height: 1.25; }
.inquiries { margin-top: 32px; display: flex; flex-wrap: wrap; gap: 6px 14px; align-items: baseline; font-size: 15px; color: var(--ink-3); }
.inquiries a, .uline { color: var(--ink); border-bottom: 1px solid var(--line-2); padding: 10px 0 2px; }
.inquiries a:hover, .uline:hover { border-bottom-color: var(--forest-text); }

/* Footer */
.footer { border-top: 1px solid var(--line); padding: 48px 0 56px; }
.footer-inner { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 24px 48px; align-items: start; }
.footer-links { display: flex; flex-wrap: wrap; gap: 4px 28px; margin-top: 12px; font-family: var(--ff-mono); font-size: 12px; }
.footer-links a { min-height: 44px; display: inline-flex; align-items: center; color: var(--ink-3); }
.footer-links a:hover { color: var(--ink); }
.legal { margin: 8px 0 0; font-family: var(--ff-mono); font-size: 11.5px; line-height: 1.7; color: var(--ink-3); max-width: 72ch; }
.footer-meta { font-family: var(--ff-mono); font-size: 12px; color: var(--ink-3); text-align: right; }

/* Simple pages */
.page { padding: clamp(64px, 9vw, 112px) 0 var(--section-y); }
.page h1 { font-size: clamp(44px, 6vw, 72px); line-height: 1; letter-spacing: -0.04em; margin: 16px 0 40px; }
.page h2 { font-size: 22px; letter-spacing: -0.01em; margin: 40px 0 10px; }
.page .prose { max-width: 64ch; color: var(--ink-2); }
.page .prose p { margin-bottom: 1em; }

/* Motion */
.reveal { opacity: 0; transform: translateY(20px); transition: opacity .6s cubic-bezier(.22,1,.36,1), transform .6s cubic-bezier(.22,1,.36,1); }
.reveal.revealed, .no-js .reveal { opacity: 1; transform: none; }
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { transition: none !important; animation: none !important; }
  .reveal { opacity: 1; transform: none; }
}

/* Responsive */
@media (max-width: 960px) {
  .hero-inner { grid-template-columns: 1fr; }
  .principles { grid-template-columns: 1fr 1fr; }
  .principle:nth-child(2) { border-right: 0; }
  .principle:nth-child(3) { padding-left: 0; }
  .principle:nth-child(n+3) { border-top: 1px solid var(--line); }
  .steps { grid-template-columns: 1fr 1fr; }
  .project { grid-template-columns: 48px minmax(0, 1fr) auto; }
  .project-state { grid-column: 2; grid-row: 2; max-width: 220px; }
  .project .notify { grid-column: 3; grid-row: 1 / span 2; }
}
@media (max-width: 820px) {
  .nav-links { display: none; }
  .nav-toggle { display: flex; }
  .nav-right .btn-sm { display: none; }
  .sec-head, .wl-box { grid-template-columns: 1fr; }
  .about-grid { grid-template-columns: 1fr; }
}
@media (max-width: 560px) {
  .principles { grid-template-columns: 1fr; }
  .principle, .principle + .principle { padding: 28px 0; border-right: 0; }
  .principle + .principle { border-top: 1px solid var(--line); }
  .steps { grid-template-columns: 1fr; }
  .project { grid-template-columns: minmax(0, 1fr); gap: 14px; padding: 22px; }
  .project .mono { padding-top: 0; }
  .project-state, .project .notify { grid-column: 1; grid-row: auto; }
  .project .notify { justify-self: start; }
  .panel-row { grid-template-columns: 70px minmax(0,1fr) auto; gap: 10px; }
  .bars i { width: 18px; }
  .input-row { flex-direction: column; }
  .footer-inner { grid-template-columns: 1fr; }
  .footer-meta { text-align: left; }
}
.wl-lead { margin-top: 20px; }
