:root {
  --paper: #e8eae7;
  --ink: #111312;
  --dim: #5a5f5b;
  --line: rgba(17, 19, 18, 0.16);
  --tint: rgba(17, 19, 18, 0.05);
  --steel: #1d47f0;
  --gut: clamp(16px, 3vw, 44px);
  --ease: cubic-bezier(0.7, 0, 0.2, 1);
  color-scheme: light;
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --paper: #0d0f0e;
    --ink: #e4e6e2;
    --dim: #8b918c;
    --line: rgba(228, 230, 226, 0.16);
    --tint: rgba(228, 230, 226, 0.06);
    --steel: #6f8dff;
    color-scheme: dark;
  }
}
:root[data-theme="dark"] {
  --paper: #0d0f0e;
  --ink: #e4e6e2;
  --dim: #8b918c;
  --line: rgba(228, 230, 226, 0.16);
  --tint: rgba(228, 230, 226, 0.06);
  --steel: #6f8dff;
  color-scheme: dark;
}

* { box-sizing: border-box; margin: 0; }
[hidden] { display: none !important; }
html, body { background: var(--paper); color: var(--ink); }
body {
  font-family: "Archivo", system-ui, sans-serif;
  font-size: 15px;
  line-height: 1.45;
  -webkit-font-smoothing: antialiased;
  font-variant-numeric: tabular-nums;
}
a { color: inherit; text-underline-offset: 0.2em; text-decoration-thickness: 1px; }
a:hover { text-decoration-thickness: 2px; }
.sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }
:focus-visible { outline: 2px solid var(--ink); outline-offset: 3px; }

/* ---------- lander ---------- */
.lander {
  height: 100svh;
  overflow: hidden;
  display: grid;
  grid-template-rows: auto 1fr auto;
  padding: max(env(safe-area-inset-top), 0px) var(--gut) max(env(safe-area-inset-bottom), 0px);
}
.bar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 16px;
  padding: 18px 0;
  color: var(--dim);
  font-size: 13px;
}
.bar a { text-decoration: none; }
.bar a:hover { color: var(--ink); text-decoration: underline; }

.stage {
  display: flex;
  flex-direction: column;
  justify-content: center;
  min-height: 0;
  gap: clamp(12px, 2.4vh, 32px);
}
#truss {
  display: block;
  width: 100%;
  aspect-ratio: 8 / 1;
  max-height: 44svh;
  touch-action: none;
}
.prop {
  font-size: clamp(1.35rem, 3.05vw, 3.1rem);
  font-weight: 500;
  font-stretch: 100%;
  line-height: 1.08;
  letter-spacing: -0.018em;
  max-width: 24ch;
  text-wrap: balance;
}
.prop .w { position: relative; display: inline-block; }
.prop .w::after {
  content: "";
  position: absolute;
  inset: 0.14em -0.04em 0.1em;
  background: var(--ink);
  clip-path: inset(0 100% 0 0);
  animation:
    bar-in 0.45s var(--ease) calc(0.25s + var(--i) * 45ms) both,
    bar-out 0.55s var(--ease) calc(2.05s + var(--i) * 70ms) forwards;
}
@keyframes bar-in { from { clip-path: inset(0 100% 0 0); } to { clip-path: inset(0 0 0 0); } }
@keyframes bar-out { from { clip-path: inset(0 0 0 0); } to { clip-path: inset(0 0 0 100%); } }

.foot { align-items: end; padding-bottom: 22px; }
.legal { display: flex; flex-wrap: wrap; gap: 6px 18px; justify-content: flex-end; }

.cta {
  font: inherit;
  font-size: 15px;
  font-weight: 600;
  color: var(--ink);
  background: transparent;
  border: 1px solid var(--ink);
  border-radius: 2px;
  padding: 14px 20px;
  cursor: pointer;
  transition: background-color 160ms ease-out, color 160ms ease-out, transform 120ms ease-out;
}
.cta:hover { background: var(--ink); color: var(--paper); }
.cta:active { transform: translateY(1px); }
.cta.solid { background: var(--ink); color: var(--paper); }
.cta.solid:hover { background: var(--dim); border-color: var(--dim); }

@media (max-width: 599px) {
  #truss { aspect-ratio: 2.1 / 1; }
}
@media (max-width: 640px) {
  .foot { flex-direction: column; align-items: stretch; gap: 16px; }
  .foot .cta { width: 100%; }
  .legal { justify-content: space-between; gap: 6px 12px; font-size: 12px; }
}

/* ---------- inquiry sheet ---------- */
.sheet {
  position: fixed;
  inset: 0 0 0 auto;
  width: min(520px, 100vw);
  max-width: 100vw;
  height: 100svh;
  max-height: 100svh;
  margin: 0;
  padding: 0 clamp(20px, 3vw, 40px) 32px;
  border: 0;
  border-left: 1px solid var(--line);
  background: var(--paper);
  color: var(--ink);
  overflow-y: auto;
  transform: translateX(100%);
  transition: transform 420ms var(--ease);
}
.sheet.in { transform: none; }
.sheet::backdrop { background: rgba(10, 12, 11, 0); transition: background-color 420ms ease; }
.sheet.in::backdrop { background: rgba(10, 12, 11, 0.35); }
@media (max-width: 640px) {
  .sheet { inset: auto 0 0 0; width: 100vw; height: 94svh; border-left: 0; border-top: 1px solid var(--line); transform: translateY(100%); }
}
.sheet-head {
  position: sticky; top: 0; z-index: 1;
  display: flex; justify-content: space-between; align-items: center;
  padding: 22px 0 18px;
  background: var(--paper);
}
.sheet-head h2 { font-size: 22px; font-weight: 600; letter-spacing: -0.01em; }
.x { font: inherit; font-size: 13px; color: var(--dim); background: none; border: 0; padding: 8px 0 8px 12px; cursor: pointer; }
.x:hover { color: var(--ink); text-decoration: underline; }

form { display: grid; gap: 22px; }
.f { display: grid; gap: 6px; border: 0; padding: 0; min-width: 0; }
.f > span, .f > legend { font-size: 13px; color: var(--dim); padding: 0; }
.f legend { margin-bottom: 8px; }
input, textarea {
  font: inherit;
  font-size: 17px;
  color: var(--ink);
  background: transparent;
  border: 0;
  border-bottom: 1px solid var(--line);
  border-radius: 0;
  padding: 8px 0 10px;
  width: 100%;
  min-width: 0;
}
textarea { resize: vertical; min-height: 120px; line-height: 1.4; }
textarea::placeholder { color: var(--dim); opacity: 0.7; }
input:focus, textarea:focus { outline: none; border-bottom: 2px solid var(--ink); padding-bottom: 9px; }
.f.bad input, .f.bad textarea { border-bottom-color: var(--ink); border-bottom-style: dashed; }

.chips { display: flex; flex-wrap: wrap; gap: 6px; }
.chips label { position: relative; }
.chips input { position: absolute; opacity: 0; inset: 0; cursor: pointer; }
.chips span {
  display: block;
  font-size: 14px;
  padding: 8px 12px;
  border-radius: 2px;
  background: var(--tint);
  cursor: pointer;
  transition: background-color 140ms ease-out, color 140ms ease-out;
}
.chips label:hover span { background: var(--line); }
.chips input:checked + span { background: var(--ink); color: var(--paper); }
.chips input:focus-visible + span { outline: 2px solid var(--ink); outline-offset: 2px; }

.hp { position: absolute; left: -9999px; width: 1px; height: 1px; overflow: hidden; }
.sent:not([data-mode="post"]) [data-mode="post"], .sent:not([data-mode="mail"]) [data-mode="mail"] { display: none; }
.sent [data-mode] { display: grid; gap: 16px; }
.cta:disabled { opacity: 0.55; cursor: progress; }
.err { font-size: 14px; background: var(--tint); padding: 10px 12px; }
.fine { font-size: 12px; color: var(--dim); }
.sent { display: grid; gap: 16px; padding-top: 12px; }
.sent-big { font-size: 26px; line-height: 1.15; font-weight: 500; letter-spacing: -0.01em; }
.sent .cta { justify-self: start; }

/* ---------- legal pages ---------- */
.doc-page { padding: 0 var(--gut) 64px; }
.doc-page .bar { border-bottom: 1px solid var(--line); margin-bottom: clamp(32px, 8vh, 80px); }
.doc-page .bar .home { color: var(--ink); font-weight: 800; font-stretch: 125%; letter-spacing: 0.01em; font-size: 15px; }
.doc { max-width: 68ch; }
.doc h1 { font-size: clamp(2rem, 5vw, 3.6rem); font-weight: 700; font-stretch: 112%; letter-spacing: -0.02em; line-height: 1; margin-bottom: 14px; }
.doc .eff { color: var(--dim); margin-bottom: 40px; }
.doc h2 { font-size: 18px; font-weight: 650; margin: 36px 0 10px; }
.doc p, .doc li { font-size: 16px; line-height: 1.6; }
.doc p + p, .doc ul + p { margin-top: 12px; }
.doc ul { padding-left: 1.2em; margin-top: 8px; display: grid; gap: 6px; }
.doc address { font-style: normal; line-height: 1.6; }
.doc-foot { margin-top: 64px; padding-top: 18px; border-top: 1px solid var(--line); display: flex; flex-wrap: wrap; gap: 8px 18px; color: var(--dim); font-size: 13px; }

/* ---------- motion ---------- */
@media (prefers-reduced-motion: reduce) {
  .prop .w::after { display: none; }
  .sheet, .sheet::backdrop { transition: none; }
}
.snap .prop .w::after { display: none; }
.snap .sheet, .snap .sheet::backdrop { transition: none; }
