:root {
  --night: #211725;
  --night-deep: #140c17;
  --paper: #efe4cc;
  --paper-light: #f4ecdf;
  --ink: #2b2334;
  --muted: #b9a9bb;
  --gold: #e1bc67;
  --bronze: #c79b45;
  --agave: #789b80;
  --sky: #69aeb8;
  --clay: #b9644b;
  --shell: min(1320px, calc(100% - 40px));
  --serif: Iowan Old Style, Palatino Linotype, Book Antiqua, Palatino, Georgia, serif;
  --mono: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  --sans: system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

* { box-sizing: border-box; }
html { min-width: 0; scroll-behavior: smooth; }
body {
  min-width: 0;
  min-height: 100vh;
  margin: 0;
  overflow-x: clip;
  color: var(--paper-light);
  background:
    linear-gradient(rgba(244, 236, 223, 0.026) 1px, transparent 1px),
    linear-gradient(90deg, rgba(244, 236, 223, 0.026) 1px, transparent 1px),
    radial-gradient(circle at 90% 8%, rgba(105, 174, 184, 0.14), transparent 30rem),
    radial-gradient(circle at 5% 96%, rgba(185, 100, 75, 0.13), transparent 27rem),
    var(--night);
  background-size: 32px 32px, 32px 32px, auto, auto, auto;
  font-family: var(--sans);
  -webkit-font-smoothing: antialiased;
}

img, svg { max-width: 100%; }
a { color: inherit; }
button, a { -webkit-tap-highlight-color: transparent; }
.shell { width: var(--shell); margin-inline: auto; }

.skip-link {
  position: fixed;
  z-index: 50;
  left: 12px;
  top: 10px;
  min-height: 44px;
  display: inline-flex;
  align-items: center;
  padding: 0 15px;
  color: var(--ink);
  background: var(--paper-light);
  transform: translateY(-160%);
}
.skip-link:focus { transform: translateY(0); }

:focus-visible {
  outline: 3px solid var(--gold);
  outline-offset: 3px;
}

.site-header {
  border-bottom: 1px solid rgba(244, 236, 223, 0.16);
  background: rgba(33, 23, 37, 0.88);
  backdrop-filter: blur(12px);
}
.header-inner {
  min-height: 72px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 22px;
}
.brand {
  min-height: 44px;
  display: inline-flex;
  align-items: center;
  gap: 11px;
  color: var(--paper-light);
  text-decoration: none;
}
.brand-mark {
  width: 34px;
  height: 34px;
  flex: 0 0 auto;
  overflow: visible;
  fill: none;
}
.brand-frame { stroke: currentColor; stroke-width: 1.15; opacity: 0.78; }
.brand-contour { stroke: var(--sky); stroke-width: 1.05; }
.brand-trail { stroke: var(--gold); stroke-width: 1.4; stroke-linecap: round; }
.brand-nodes circle { fill: var(--gold); stroke: var(--night); stroke-width: 0.35; }
.brand-text { display: grid; gap: 2px; line-height: 1.05; }
.brand-text strong { font-family: var(--serif); font-size: 1rem; font-weight: 620; }
.brand-text small {
  color: var(--muted);
  font-family: var(--mono);
  font-size: 0.55rem;
  font-weight: 650;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

/* The persistent data mark, above the fold beside the brand: the launcher must
   carry the same "Demo data · resets" badge the interactive cover shows, or the
   first screen a prospect sees is the one screen without the mark. */
.demo-note {
  margin: 0 auto;
  padding: 5px 10px;
  border: 1px solid rgba(244, 236, 223, 0.24);
  border-radius: 999px;
  color: var(--muted);
  font: 650 0.68rem/1 var(--mono);
  letter-spacing: 0.08em;
  text-transform: uppercase;
  white-space: nowrap;
}

.sign-in {
  min-width: 0;
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 10px;
}
.sign-in button {
  min-height: 44px;
  padding: 0 15px;
  border: 1px solid rgba(244, 236, 223, 0.28);
  border-radius: 2px;
  color: var(--paper-light);
  background: transparent;
  font: 680 0.73rem/1 var(--sans);
  letter-spacing: 0.08em;
  text-transform: uppercase;
  opacity: 1;
}
.sign-in button:disabled { cursor: default; opacity: 1; }
.sign-in small {
  max-width: 18ch;
  color: var(--muted);
  font-size: 0.68rem;
  line-height: 1.2;
  text-align: right;
}

main { padding-block: clamp(16px, 2.5vw, 32px); }
.launcher {
  min-height: clamp(560px, calc(100svh - 154px), 760px);
  display: grid;
  grid-template-columns: minmax(335px, 0.82fr) minmax(500px, 1.38fr);
  overflow: hidden;
  position: relative;
  isolation: isolate;
  border: 1px solid rgba(244, 236, 223, 0.19);
  border-radius: 3px;
  background: rgba(20, 12, 23, 0.42);
  box-shadow: 0 26px 70px rgba(11, 7, 14, 0.3);
}
.launcher::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: -1;
  pointer-events: none;
  background:
    radial-gradient(circle at 92% 12%, rgba(79, 118, 146, 0.14), transparent 28rem),
    radial-gradient(circle at 4% 96%, rgba(178, 94, 67, 0.12), transparent 24rem);
}
.launcher-rail {
  min-width: 0;
  min-height: 0;
  display: flex;
  flex-direction: column;
  padding: clamp(20px, 2.8vw, 38px);
  border-right: 1px solid rgba(244, 236, 223, 0.16);
  background: linear-gradient(155deg, rgba(255, 255, 255, 0.025), rgba(255, 255, 255, 0));
}
.eyebrow,
.project-index,
.project-number,
.field-sheet-head,
.field-sheet figcaption {
  font-family: var(--mono);
  text-transform: uppercase;
  letter-spacing: 0.14em;
}
.eyebrow { margin: 0 0 10px; color: var(--muted); font-size: 0.66rem; }
h1 {
  max-width: 8ch;
  margin: 0;
  color: var(--paper-light);
  font-family: var(--serif);
  font-size: clamp(3rem, 5.2vw, 4.25rem);
  font-weight: 560;
  line-height: 0.9;
  letter-spacing: -0.06em;
}
.project-index { margin: clamp(18px, 3vh, 27px) 0 10px; color: #c9b6c9; font-size: 0.62rem; }
.project-stack { display: grid; gap: 11px; }
.project-card {
  --accent: var(--bronze);
  min-width: 0;
  overflow: hidden;
  border: 1px solid rgba(43, 35, 52, 0.28);
  border-left: 4px solid var(--accent);
  border-radius: 2px;
  color: var(--ink);
  background: var(--paper);
  box-shadow: 0 10px 28px rgba(11, 7, 14, 0.2), inset 0 1px rgba(255, 255, 255, 0.58);
}
.project-invasive { --accent: var(--agave); }
.project-restoration { --accent: var(--sky); }
.project-main {
  min-height: 100px;
  display: grid;
  grid-template-columns: 118px minmax(0, 1fr);
  grid-template-rows: auto 1fr;
  column-gap: 15px;
  position: relative;
  color: var(--ink);
  text-decoration: none;
}
.project-main::after {
  content: "";
  position: absolute;
  inset: 6px;
  pointer-events: none;
  border: 1px solid rgba(43, 35, 52, 0.12);
  background:
    linear-gradient(var(--ink), var(--ink)) left top / 13px 1px no-repeat,
    linear-gradient(var(--ink), var(--ink)) left top / 1px 13px no-repeat,
    linear-gradient(var(--ink), var(--ink)) right bottom / 13px 1px no-repeat,
    linear-gradient(var(--ink), var(--ink)) right bottom / 1px 13px no-repeat;
  opacity: 0.42;
}
.project-plate {
  grid-column: 1;
  grid-row: 1 / 3;
  width: 118px;
  height: 100%;
  margin: 0;
  overflow: hidden;
  border-right: 1px solid rgba(43, 35, 52, 0.2);
  background: #e6dac2;
}
.project-plate img {
  width: 100%;
  height: 100%;
  display: block;
  object-fit: cover;
  filter: saturate(0.84) contrast(1.03);
}
.project-number {
  grid-column: 2;
  align-self: end;
  padding: 15px 16px 0 0;
  color: #685a6b;
  font-size: 0.56rem;
  font-weight: 650;
}
.project-foot {
  grid-column: 2;
  min-width: 0;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 11px;
  padding: 3px 16px 15px 0;
}
.project-foot strong { font-size: clamp(1rem, 1.7vw, 1.22rem); line-height: 1.15; }
.project-foot i {
  width: 34px;
  height: 34px;
  flex: 0 0 auto;
  display: grid;
  place-items: center;
  border: 1px solid rgba(43, 35, 52, 0.24);
  border-radius: 50%;
  color: var(--accent);
  font-family: var(--sans);
  font-style: normal;
}
.project-main:focus-visible { outline-offset: -4px; }

.field-sheet {
  min-width: 0;
  min-height: 0;
  margin: clamp(18px, 2.8vw, 38px);
  display: grid;
  grid-template-rows: auto minmax(0, 1fr) auto;
  overflow: hidden;
  position: relative;
  border: 1px solid rgba(225, 188, 103, 0.4);
  background: rgba(20, 12, 23, 0.58);
  box-shadow: inset 0 0 0 8px rgba(244, 236, 223, 0.018), 0 24px 55px rgba(8, 4, 10, 0.32);
}
.field-sheet::before,
.field-sheet::after {
  content: "";
  width: 30px;
  height: 30px;
  position: absolute;
  z-index: 2;
  pointer-events: none;
}
.field-sheet::before { left: 10px; top: 10px; border-left: 1px solid var(--gold); border-top: 1px solid var(--gold); }
.field-sheet::after { right: 10px; bottom: 10px; border-right: 1px solid var(--gold); border-bottom: 1px solid var(--gold); }
.field-sheet-head,
.field-sheet figcaption {
  min-height: 48px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  padding-inline: 18px;
  color: var(--muted);
  font-size: 0.56rem;
}
.field-sheet > img {
  width: 100%;
  height: 100%;
  min-height: 0;
  display: block;
  object-fit: contain;
  padding: clamp(8px, 1.8vw, 22px);
}
.field-sheet figcaption {
  margin: 0 18px;
  padding: 0;
  border-top: 1px solid rgba(244, 236, 223, 0.14);
}
.field-sheet figcaption span:first-child { color: #ead5b0; }

.site-footer { border-top: 1px solid rgba(244, 236, 223, 0.12); }
.footer-inner {
  min-height: 66px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  color: var(--muted);
  font-family: var(--mono);
  font-size: 0.59rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
}
.footer-inner div { display: flex; align-items: center; gap: 20px; }
.footer-inner a { min-height: 44px; display: inline-flex; align-items: center; text-underline-offset: 4px; }

@media (max-width: 940px) {
  .launcher { min-height: 0; grid-template-columns: 1fr; }
  .launcher-rail { border-right: 0; border-bottom: 1px solid rgba(244, 236, 223, 0.16); }
  h1 { max-width: none; }
  .project-stack { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .project-main { min-height: 0; grid-template-columns: 1fr; grid-template-rows: auto auto auto; }
  .project-plate { grid-column: 1; grid-row: 1; width: 100%; height: auto; aspect-ratio: 4 / 3; border-right: 0; border-bottom: 1px solid rgba(43, 35, 52, 0.2); }
  .project-number { grid-column: 1; padding: 12px 12px 0; }
  .project-foot { grid-column: 1; padding: 4px 12px 13px; }
  .field-sheet { min-height: 430px; }
}

@media (max-width: 720px) {
  :root { --shell: min(100% - 28px, 620px); }
  .header-inner { min-height: 68px; gap: 12px; }
  .brand-text small { display: none; }
  .launcher-rail { padding: 20px; }
  h1 { font-size: clamp(3rem, 15vw, 4.2rem); }
  .project-stack { grid-template-columns: 1fr; }
  .project-main { min-height: 116px; grid-template-columns: 112px minmax(0, 1fr); grid-template-rows: auto 1fr; }
  .project-plate { grid-column: 1; grid-row: 1 / 3; width: 112px; height: 100%; aspect-ratio: auto; border-right: 1px solid rgba(43, 35, 52, 0.2); border-bottom: 0; }
  .project-number { grid-column: 2; padding: 14px 14px 0 0; }
  .project-foot { grid-column: 2; padding: 3px 14px 14px 0; }
  .field-sheet { min-height: 0; margin: 14px; }
  .field-sheet > img { min-height: 260px; }
}

@media (max-width: 720px) {
  .demo-note { padding: 4px 8px; font-size: 0.62rem; }
}

@media (max-width: 430px) {
  .brand-mark { width: 30px; height: 30px; }
  .brand-text strong { font-size: 0.9rem; }
  .demo-note { margin: 0; letter-spacing: 0.05em; }
  .sign-in { gap: 6px; }
  .sign-in button { padding-inline: 9px; font-size: 0.67rem; }
  .sign-in small { max-width: 12ch; font-size: 0.6rem; }
  .launcher-rail { padding: 16px; }
  .project-main { grid-template-columns: 100px minmax(0, 1fr); }
  .project-plate { width: 100px; }
  .project-foot i { width: 31px; height: 31px; }
  .field-sheet-head,
  .field-sheet figcaption { padding-inline: 12px; gap: 10px; }
  .field-sheet figcaption { margin-inline: 12px; }
  .footer-inner { align-items: flex-start; flex-direction: column; gap: 0; padding-block: 10px; }
  .footer-inner div { width: 100%; justify-content: space-between; }
}

@media (prefers-reduced-motion: no-preference) {
  html.ddl-motion-ok .brand-contour,
  html.ddl-motion-ok .brand-trail {
    stroke-dasharray: 1;
    stroke-dashoffset: 1;
    animation: brand-draw 520ms cubic-bezier(.2, .8, .2, 1) forwards;
  }
  html.ddl-motion-ok .brand-trail { animation-delay: 90ms; }
  html.ddl-motion-ok .brand-nodes circle {
    opacity: 0;
    transform: scale(0.35);
    transform-origin: center;
    animation: brand-node 260ms cubic-bezier(.2, .8, .2, 1) forwards;
  }
  html.ddl-motion-ok .brand-nodes circle:nth-child(1) { animation-delay: 280ms; }
  html.ddl-motion-ok .brand-nodes circle:nth-child(2) { animation-delay: 330ms; }
  html.ddl-motion-ok .brand-nodes circle:nth-child(3) { animation-delay: 380ms; }
  html.ddl-motion-ok .eyebrow,
  html.ddl-motion-ok h1,
  html.ddl-motion-ok .project-index,
  html.ddl-motion-ok .project-card,
  html.ddl-motion-ok .field-sheet {
    opacity: 0;
    animation: cover-arrive 460ms cubic-bezier(.2, .8, .2, 1) forwards;
  }
  html.ddl-motion-ok h1 { animation-delay: 55ms; }
  html.ddl-motion-ok .project-index { animation-delay: 110ms; }
  html.ddl-motion-ok .project-card:nth-child(1) { animation-delay: 165ms; }
  html.ddl-motion-ok .project-card:nth-child(2) { animation-delay: 220ms; }
  html.ddl-motion-ok .project-card:nth-child(3) { animation-delay: 275ms; }
  html.ddl-motion-ok .field-sheet { animation-delay: 320ms; }
  html.ddl-motion-ok .project-main,
  html.ddl-motion-ok .project-plate img,
  html.ddl-motion-ok .project-foot i {
    transition: transform 180ms cubic-bezier(.2, .8, .2, 1), box-shadow 180ms ease;
  }
}

@media (hover: hover) and (pointer: fine) and (prefers-reduced-motion: no-preference) {
  html.ddl-motion-ok .project-card:hover { transform: translateY(-2px); box-shadow: 0 16px 36px rgba(11, 7, 14, 0.3); }
  html.ddl-motion-ok .project-card:hover .project-plate img { transform: scale(1.012); }
  html.ddl-motion-ok .project-card:hover .project-foot i { transform: translate(1px, -1px); }
}

html.ddl-motion-paused * { animation-play-state: paused !important; }

@keyframes brand-draw { to { stroke-dashoffset: 0; } }
@keyframes brand-node { to { opacity: 1; transform: scale(1); } }
@keyframes cover-arrive {
  from { opacity: 0; transform: translateY(18px); }
  to { opacity: 1; transform: translateY(0); }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after {
    animation: none !important;
    transition-duration: 0.01ms !important;
    transition-delay: 0ms !important;
  }
}
