/* LimitID — public site styles
   Design language mirrors the macOS demonstrator: paper/ink surfaces, a single
   restrained deep-teal accent, monospaced alias tokens, generous spacing.
   No third-party fonts, no webfonts, no external requests. System font stack. */

:root {
  color-scheme: light dark;

  --ink: #1b1d26;
  --ink-2: #3a3d4a;
  --muted: #5f6472;
  --muted-2: #7b8091;
  --line: #e6e6e2;
  --line-strong: #d5d6d0;

  --paper: #fbfbf9;
  --paper-raised: #ffffff;
  --paper-sunk: #f3f3ef;

  --teal: #0e7c70;
  --teal-strong: #0b6459;
  --teal-ink: #0a5750;
  --teal-wash: #e2efec;
  --teal-wash-2: #d6e9e5;

  --amber: #9a6b12;
  --amber-wash: #f7efdc;

  --charcoal: #23252f;
  --charcoal-2: #1a1c24;

  --radius: 14px;
  --radius-sm: 10px;
  --radius-lg: 22px;

  --shadow-sm: 0 1px 2px rgba(20, 22, 30, 0.05), 0 1px 3px rgba(20, 22, 30, 0.04);
  --shadow-md: 0 4px 18px rgba(20, 22, 30, 0.07), 0 1px 3px rgba(20, 22, 30, 0.05);

  --maxw: 1080px;
  --mono: ui-monospace, "SF Mono", "SFMono-Regular", Menlo, Consolas, "Liberation Mono", monospace;
  --sans: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, "Helvetica Neue", sans-serif;
}

@media (prefers-color-scheme: dark) {
  :root {
    --ink: #eceef4;
    --ink-2: #c7cad4;
    --muted: #a6abba;
    --muted-2: #888ea0;
    --line: #2c2f3a;
    --line-strong: #3a3e4c;

    --paper: #14151b;
    --paper-raised: #1c1e27;
    --paper-sunk: #23252f;

    --teal: #4fbfae;
    --teal-strong: #6bd0c0;
    --teal-ink: #8fe0d2;
    --teal-wash: #17332f;
    --teal-wash-2: #1d3f39;

    --amber: #e0b465;
    --amber-wash: #33291259;

    --line-strong: #3a3e4c;
    --shadow-sm: 0 1px 2px rgba(0, 0, 0, 0.4);
    --shadow-md: 0 6px 22px rgba(0, 0, 0, 0.45);
  }
}

*,
*::before,
*::after { box-sizing: border-box; }

html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after {
    animation-duration: 0.001ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.001ms !important;
    scroll-behavior: auto !important;
  }
}

body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: var(--sans);
  font-size: 17px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

h1, h2, h3 { line-height: 1.15; letter-spacing: -0.015em; color: var(--ink); }
h1 { font-size: clamp(2.1rem, 5vw, 3.2rem); font-weight: 700; margin: 0; }
h2 { font-size: clamp(1.5rem, 3.2vw, 2.05rem); font-weight: 650; margin: 0 0 0.4em; }
h3 { font-size: 1.14rem; font-weight: 640; margin: 0 0 0.3em; }
p { margin: 0 0 1rem; }

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

:focus-visible {
  outline: 3px solid var(--teal);
  outline-offset: 2px;
  border-radius: 4px;
}

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

/* ---- Skip link ---- */
.skip {
  position: absolute;
  left: -9999px;
  top: 0;
  background: var(--teal);
  color: #fff;
  padding: 10px 16px;
  border-radius: 0 0 8px 0;
  z-index: 100;
}
.skip:focus { left: 0; text-decoration: none; }

/* ---- Header ---- */
.site-header {
  position: sticky;
  top: 0;
  z-index: 40;
  background: color-mix(in srgb, var(--paper) 88%, transparent);
  -webkit-backdrop-filter: saturate(1.4) blur(10px);
  backdrop-filter: saturate(1.4) blur(10px);
  border-bottom: 1px solid var(--line);
}
.site-header .wrap {
  display: flex;
  align-items: center;
  gap: 18px;
  height: 64px;
}
.brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-weight: 680;
  font-size: 1.08rem;
  color: var(--ink);
  letter-spacing: -0.01em;
}
.brand:hover { text-decoration: none; }
.brand .mark { width: 26px; height: 26px; border-radius: 7px; display: block; flex: 0 0 auto; box-shadow: var(--shadow-sm); }
.brand b { font-weight: 720; }
.nav {
  margin-left: auto;
  display: flex;
  align-items: center;
  gap: 22px;
}
.nav a {
  color: var(--muted);
  font-size: 0.95rem;
  font-weight: 520;
}
.nav a:hover { color: var(--ink); text-decoration: none; }
.nav .nav-hide { }
@media (max-width: 760px) {
  .nav .nav-hide { display: none; }
}

/* ---- Status badge ---- */
.badge {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  font-size: 0.8rem;
  font-weight: 600;
  letter-spacing: 0.01em;
  padding: 4px 11px;
  border-radius: 999px;
  border: 1px solid var(--line-strong);
  background: var(--paper-raised);
  color: var(--ink-2);
  white-space: nowrap;
}
.badge .dot {
  width: 8px; height: 8px; border-radius: 50%;
  background: var(--amber);
  box-shadow: 0 0 0 3px color-mix(in srgb, var(--amber) 22%, transparent);
}

/* ---- Hero ---- */
.hero { padding: 76px 0 44px; }
.hero .eyebrow {
  display: inline-flex; align-items: center; gap: 10px;
  color: var(--muted);
  font-size: 0.92rem;
  margin-bottom: 22px;
}
.hero h1 { max-width: 15ch; }
.hero .lede {
  font-size: clamp(1.08rem, 2vw, 1.28rem);
  color: var(--ink-2);
  max-width: 40ch;
  margin: 22px 0 8px;
}
.hero .sub {
  color: var(--muted);
  max-width: 52ch;
  font-size: 1.02rem;
}
.hero-actions {
  display: flex; flex-wrap: wrap; gap: 14px; margin-top: 26px;
  align-items: center;
}

.btn {
  display: inline-flex; align-items: center; gap: 9px;
  font: inherit; font-weight: 600; font-size: 0.98rem;
  padding: 11px 20px;
  border-radius: 11px;
  border: 1px solid transparent;
  cursor: pointer;
  transition: background 0.15s ease, border-color 0.15s ease, transform 0.15s ease;
}
.btn-primary { background: var(--teal); color: #fff; box-shadow: var(--shadow-sm); }
.btn-primary:hover { background: var(--teal-strong); text-decoration: none; }
.btn-ghost { background: transparent; color: var(--ink); border-color: var(--line-strong); }
.btn-ghost:hover { background: var(--paper-sunk); text-decoration: none; }
.btn svg { width: 17px; height: 17px; flex: 0 0 auto; }

.hero-note {
  margin-top: 22px;
  font-size: 0.92rem;
  color: var(--muted);
  display: flex; gap: 9px; align-items: flex-start;
  max-width: 56ch;
}
.hero-note svg { width: 17px; height: 17px; flex: 0 0 auto; margin-top: 2px; color: var(--muted-2); }

/* ---- Section scaffolding ---- */
section { padding: 30px 0; }
.section-lead { max-width: 62ch; color: var(--ink-2); margin-bottom: 8px; }
.section-head { margin-bottom: 30px; }
.section-head .kicker {
  text-transform: uppercase;
  letter-spacing: 0.12em;
  font-size: 0.76rem;
  font-weight: 680;
  color: var(--teal-ink);
  margin-bottom: 10px;
}
.divider { border: 0; border-top: 1px solid var(--line); margin: 0; }

/* ---- Mechanism / journey ---- */
.journey {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 18px;
  margin-top: 8px;
}
.step {
  background: var(--paper-raised);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 22px;
  box-shadow: var(--shadow-sm);
  position: relative;
}
.step .n {
  display: inline-flex; align-items: center; justify-content: center;
  width: 30px; height: 30px; border-radius: 9px;
  background: var(--teal-wash); color: var(--teal-ink);
  font-weight: 700; font-size: 0.9rem;
  margin-bottom: 14px;
}
.step h3 { margin-bottom: 6px; }
.step p { color: var(--muted); font-size: 0.96rem; margin: 0; }
.step .flow-icon { position: absolute; top: 24px; right: 22px; color: var(--teal); opacity: 0.5; }
.step .flow-icon svg { width: 20px; height: 20px; }

.journey-track {
  display: flex; align-items: center; gap: 12px;
  margin-top: 26px; flex-wrap: wrap;
  font-family: var(--mono); font-size: 0.86rem; color: var(--muted);
  background: var(--paper-sunk);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 16px 18px;
}
.journey-track .node { color: var(--ink-2); font-weight: 600; }
.journey-track .node.local { color: var(--teal-ink); }
.journey-track .arrow { color: var(--muted-2); }
.journey-track .boundary {
  color: var(--amber); font-weight: 600;
  padding: 2px 8px; border: 1px dashed var(--amber);
  border-radius: 6px;
}
@media (max-width: 560px) {
  .journey-track { flex-direction: column; align-items: flex-start; gap: 8px; }
  .journey-track .arrow { transform: rotate(90deg); margin-left: 6px; }
}

/* alias transform illustration */
.transform-demo {
  margin-top: 26px;
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  gap: 16px;
  align-items: center;
}
.transform-card {
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--paper-raised);
  padding: 16px 18px;
  box-shadow: var(--shadow-sm);
}
.transform-card .label {
  font-size: 0.74rem; text-transform: uppercase; letter-spacing: 0.09em;
  font-weight: 680; color: var(--muted-2); margin-bottom: 10px;
}
.transform-card.local .label { color: var(--teal-ink); }
.transform-card .code {
  font-family: var(--mono); font-size: 0.9rem; line-height: 1.7;
  color: var(--ink-2); word-break: break-word;
}
.tok {
  font-family: var(--mono);
  background: var(--teal-wash); color: var(--teal-ink);
  border: 1px solid var(--teal-wash-2);
  border-radius: 6px; padding: 1px 6px; font-size: 0.86em;
  white-space: nowrap;
}
.raw { background: var(--amber-wash); color: var(--amber); border-radius: 5px; padding: 1px 5px; }
.transform-arrow { color: var(--teal); display: flex; justify-content: center; }
.transform-arrow svg { width: 26px; height: 26px; }
.transform-caption { margin-top: 14px; font-size: 0.9rem; color: var(--muted); }
@media (max-width: 720px) {
  .transform-demo { grid-template-columns: 1fr; }
  .transform-arrow { transform: rotate(90deg); }
}

/* ---- Local-guarantees list ---- */
.grid-2 {
  display: grid; grid-template-columns: 1fr 1fr; gap: 18px; margin-top: 8px;
}
.panel {
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--paper-raised);
  padding: 22px 24px;
  box-shadow: var(--shadow-sm);
}
.panel.stay { border-left: 3px solid var(--teal); }
.panel.leave { border-left: 3px solid var(--amber); }
.panel h3 { display: flex; align-items: center; gap: 9px; }
.panel h3 svg { width: 19px; height: 19px; flex: 0 0 auto; }
.panel.stay h3 svg { color: var(--teal); }
.panel.leave h3 svg { color: var(--amber); }
.ck { list-style: none; margin: 12px 0 0; padding: 0; }
.ck li {
  position: relative; padding-left: 26px; margin-bottom: 10px;
  color: var(--ink-2); font-size: 0.98rem;
}
.ck li::before {
  content: ""; position: absolute; left: 0; top: 8px;
  width: 8px; height: 8px; border-radius: 50%;
}
.panel.stay .ck li::before { background: var(--teal); }
.panel.leave .ck li::before { background: var(--amber); }
.panel .foot { margin: 14px 0 0; font-size: 0.88rem; color: var(--muted); }

/* ---- Screenshots ---- */
.shots { display: grid; grid-template-columns: 1fr 1fr; gap: 22px; margin-top: 8px; }
figure.shot { margin: 0; }
figure.shot .frame {
  border: 1px solid var(--line-strong);
  border-radius: var(--radius);
  overflow: hidden;
  background: var(--paper-raised);
  box-shadow: var(--shadow-md);
}
figure.shot img { display: block; width: 100%; height: auto; }
figure.shot figcaption {
  margin-top: 12px; font-size: 0.92rem; color: var(--muted);
}
figure.shot figcaption b { color: var(--ink-2); font-weight: 620; }
.shots-note { margin-top: 22px; font-size: 0.9rem; color: var(--muted-2); }

/* ---- Limitations ---- */
.limits { display: grid; grid-template-columns: repeat(2, 1fr); gap: 14px 26px; margin-top: 8px; }
.limit {
  display: flex; gap: 12px; align-items: flex-start;
  padding: 14px 0; border-top: 1px solid var(--line);
}
.limit svg { width: 18px; height: 18px; flex: 0 0 auto; margin-top: 3px; color: var(--muted-2); }
.limit h3 { font-size: 1rem; margin: 0 0 3px; }
.limit p { margin: 0; color: var(--muted); font-size: 0.94rem; }

/* ---- Status ---- */
.status-card {
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  background: linear-gradient(180deg, var(--paper-raised), var(--paper-sunk));
  padding: 34px 36px;
  box-shadow: var(--shadow-sm);
}
.status-row { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; margin-bottom: 18px; }
.status-list { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: 1fr 1fr; gap: 10px 26px; }
.status-list li { color: var(--ink-2); font-size: 0.97rem; padding-left: 24px; position: relative; }
.status-list li::before {
  content: ""; position: absolute; left: 0; top: 7px; width: 10px; height: 10px;
  border: 2px solid var(--teal); border-radius: 3px;
}
@media (max-width: 640px) { .status-list { grid-template-columns: 1fr; } }

/* ---- Studio ---- */
.studio {
  display: grid; grid-template-columns: 1.3fr 1fr; gap: 34px; align-items: center;
  border: 1px solid var(--line); border-radius: var(--radius-lg);
  background: var(--paper-raised); padding: 34px 36px; box-shadow: var(--shadow-sm);
}
.studio h2 { margin-bottom: 12px; }
.studio p { color: var(--muted); }
.studio .values { list-style: none; margin: 16px 0 0; padding: 0; }
.studio .values li { padding-left: 22px; position: relative; margin-bottom: 8px; color: var(--ink-2); font-size: 0.96rem; }
.studio .values li::before { content: "—"; position: absolute; left: 0; color: var(--teal); }
@media (max-width: 720px) { .studio { grid-template-columns: 1fr; } }

/* ---- Contact ---- */
.contact { text-align: center; padding: 20px 0 8px; }
.contact h2 { margin-bottom: 10px; }
.contact p { color: var(--muted); max-width: 46ch; margin: 0 auto 20px; }
.mailto {
  display: inline-flex; align-items: center; gap: 10px;
  font-family: var(--mono); font-size: 1.02rem; font-weight: 600;
  padding: 12px 22px; border-radius: 12px;
  border: 1px solid var(--line-strong); background: var(--paper-raised);
  color: var(--teal-ink);
}
.mailto:hover { background: var(--paper-sunk); text-decoration: none; }
.mailto svg { width: 18px; height: 18px; }

/* ---- Footer ---- */
.site-footer {
  border-top: 1px solid var(--line);
  margin-top: 40px;
  padding: 40px 0 56px;
  color: var(--muted);
  font-size: 0.92rem;
}
.footer-grid { display: flex; flex-wrap: wrap; gap: 30px 60px; justify-content: space-between; }
.footer-brand { max-width: 34ch; }
.footer-brand .brand { margin-bottom: 12px; }
.footer-cols { display: flex; gap: 56px; flex-wrap: wrap; }
.footer-cols h4 { font-size: 0.78rem; text-transform: uppercase; letter-spacing: 0.1em; color: var(--muted-2); margin: 0 0 12px; font-weight: 680; }
.footer-cols ul { list-style: none; margin: 0; padding: 0; }
.footer-cols li { margin-bottom: 9px; }
.footer-cols a { color: var(--ink-2); }
.footer-legal { margin-top: 34px; padding-top: 22px; border-top: 1px solid var(--line); font-size: 0.86rem; color: var(--muted-2); }
.footer-legal p { margin: 0 0 6px; }

/* ---- Prose (privacy / 404) ---- */
.prose { max-width: 70ch; padding: 20px 0 10px; }
.prose h1 { font-size: clamp(1.9rem, 4vw, 2.6rem); margin-bottom: 8px; }
.prose .updated { color: var(--muted-2); font-size: 0.9rem; margin-bottom: 30px; }
.prose h2 { font-size: 1.32rem; margin-top: 36px; }
.prose p, .prose li { color: var(--ink-2); }
.prose ul { padding-left: 22px; }
.prose li { margin-bottom: 8px; }
.callout {
  border: 1px solid var(--line); border-left: 3px solid var(--teal);
  background: var(--paper-sunk); border-radius: var(--radius-sm);
  padding: 16px 20px; margin: 22px 0; color: var(--ink-2); font-size: 0.96rem;
}
.callout strong { color: var(--ink); }

/* ---- 404 ---- */
.notfound { text-align: center; padding: 90px 0 60px; }
.notfound .code { font-family: var(--mono); font-size: 3.4rem; color: var(--teal); font-weight: 700; letter-spacing: -0.02em; }
.notfound h1 { margin: 8px 0 10px; }
.notfound p { color: var(--muted); max-width: 44ch; margin: 0 auto 26px; }

@media (max-width: 820px) {
  .journey { grid-template-columns: 1fr; }
  .grid-2 { grid-template-columns: 1fr; }
  .shots { grid-template-columns: 1fr; }
  .limits { grid-template-columns: 1fr; }
}
@media (max-width: 560px) {
  body { font-size: 16px; }
  .wrap { padding: 0 18px; }
  .hero { padding: 52px 0 30px; }
  .status-card, .studio { padding: 24px 22px; }
}
