/* IkeWebStudio shared design system.
   Used by hand-maintained pages (contact.html). The generated pages
   (index/guide/kit) are self-contained build artifacts and keep their
   own inlined copies — see build.sh. */
@font-face {
  font-family: "Martian Mono";
  src: url("./martian-mono.ttf") format("truetype");
  font-weight: 100 800;
  font-stretch: 75% 112%;
  font-display: swap;
}

:root {
  --paper:    #e7e4db;
  --paper-2:  #ded9cc;
  --ink:      #17150f;
  --ink-70:   rgba(23, 21, 15, 0.66);
  --ink-45:   rgba(23, 21, 15, 0.62);
  --danger:   #b3362b;
  --line:     rgba(23, 21, 15, 0.16);
  --line-2:   rgba(23, 21, 15, 0.30);
  --accent:   #1f2f9e;
  --accent-ink: #ffffff;
  --frame-bg: #0d0c0a;
  --shadow:   0 26px 60px -32px rgba(23, 21, 15, 0.55);
}
@media (prefers-color-scheme: dark) {
  :root {
    --paper:    #131210;
    --paper-2:  #1c1a16;
    --ink:      #e9e6dc;
    --ink-70:   rgba(233, 230, 220, 0.66);
    --ink-45:   rgba(233, 230, 220, 0.52);
    --danger:   #d97568;
    --line:     rgba(233, 230, 220, 0.15);
    --line-2:   rgba(233, 230, 220, 0.28);
    --accent:   #8b9bf6;
    --accent-ink: #0e0d0b;
    --frame-bg: #060605;
    --shadow:   0 30px 70px -34px rgba(0, 0, 0, 0.8);
  }
}
:root[data-theme="light"] {
  --paper: #e7e4db; --paper-2: #ded9cc; --ink: #17150f;
  --ink-70: rgba(23,21,15,0.66); --ink-45: rgba(23,21,15,0.62);
  --danger: #b3362b;
  --line: rgba(23,21,15,0.16); --line-2: rgba(23,21,15,0.30);
  --accent: #1f2f9e; --accent-ink: #ffffff; --frame-bg: #0d0c0a;
  --shadow: 0 26px 60px -32px rgba(23,21,15,0.55);
}
:root[data-theme="dark"] {
  --paper: #131210; --paper-2: #1c1a16; --ink: #e9e6dc;
  --ink-70: rgba(233,230,220,0.66); --ink-45: rgba(233,230,220,0.52);
  --danger: #d97568;
  --line: rgba(233,230,220,0.15); --line-2: rgba(233,230,220,0.28);
  --accent: #8b9bf6; --accent-ink: #0e0d0b; --frame-bg: #060605;
  --shadow: 0 30px 70px -34px rgba(0,0,0,0.8);
}

* { box-sizing: border-box; }

body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: ui-sans-serif, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  font-size: 17px;
  line-height: 1.62;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

.mono {
  font-family: "Martian Mono", ui-monospace, "SF Mono", Menlo, Consolas, monospace;
}

.wrap {
  width: 100%;
  max-width: 1140px;
  margin: 0 auto;
  padding: 0 32px;
}

/* faint drafting grid behind the page */
.sheet {
  position: relative;
  overflow: hidden;
}
.sheet::before {
  content: "";
  position: absolute;
  inset: 0;
  background-image:
    linear-gradient(var(--line) 1px, transparent 1px),
    linear-gradient(90deg, var(--line) 1px, transparent 1px);
  background-size: 46px 46px;
  opacity: 0.35;
  -webkit-mask-image: linear-gradient(180deg, #000 0%, transparent 62%);
  mask-image: linear-gradient(180deg, #000 0%, transparent 62%);
  pointer-events: none;
}

/* ---- masthead ---- */
.masthead {
  position: relative;
  z-index: 1;
  padding-top: 40px;
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 20px 40px;
  flex-wrap: wrap;
  border-bottom: 1px solid var(--line-2);
  padding-bottom: 20px;
}
.mark {
  font-family: "Martian Mono", monospace;
  font-weight: 800;
  font-stretch: 87%;
  font-size: 20px;
  letter-spacing: 0.02em;
  text-transform: uppercase;
  margin: 0;
}
.mark b { color: var(--accent); font-weight: 800; }
a.mark { color: var(--ink); text-decoration: none; }
a.mark:hover { color: var(--accent); }
.meta {
  font-family: "Martian Mono", monospace;
  font-weight: 500;
  font-size: 11.5px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--ink-70);
  text-align: right;
  line-height: 1.9;
}
.meta a { color: var(--ink); text-decoration: none; border-bottom: 1px solid var(--line-2); }
.meta a:hover { color: var(--accent); border-color: var(--accent); }

/* ---- hero / thesis ---- */
.hero {
  position: relative;
  z-index: 1;
  padding: 68px 0 40px;
}
.eyebrow {
  font-family: "Martian Mono", monospace;
  font-weight: 600;
  font-size: 12px;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--accent);
  margin: 0 0 26px;
  display: flex;
  align-items: center;
  gap: 14px;
}
.eyebrow::after {
  content: "";
  height: 1px;
  flex: 1;
  background: var(--line-2);
}
h1 {
  font-family: "Martian Mono", monospace;
  font-weight: 720;
  font-stretch: 82%;
  font-size: clamp(2.1rem, 5.4vw, 4.05rem);
  line-height: 1.02;
  letter-spacing: -0.005em;
  text-transform: uppercase;
  text-wrap: balance;
  margin: 0 0 30px;
  max-width: 20ch;
}
h1 em { font-style: normal; color: var(--accent); }
.lede {
  font-size: clamp(1.08rem, 1.8vw, 1.32rem);
  line-height: 1.5;
  color: var(--ink-70);
  max-width: 54ch;
  margin: 0;
}
.lede strong { color: var(--ink); font-weight: 600; }

/* ---- section label ---- */
.sec-label {
  font-family: "Martian Mono", monospace;
  font-weight: 600;
  font-size: 12px;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--ink-70);
  display: flex;
  align-items: center;
  gap: 14px;
  margin: 0 0 42px;
}
.sec-label span:first-child { color: var(--accent); }
.sec-label::after { content: ""; height: 1px; flex: 1; background: var(--line-2); }

/* ---- CTA button ---- */
.cta {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  background: var(--accent);
  color: var(--accent-ink);
  font-family: "Martian Mono", monospace;
  font-weight: 600;
  font-size: 13px;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  text-decoration: none;
  padding: 16px 26px;
  border: none;
  border-radius: 8px;
  cursor: pointer;
  transition: transform 0.18s ease, filter 0.18s ease;
}
.cta:hover { transform: translateY(-2px); filter: brightness(1.06); }
.cta .arw { transition: transform 0.18s ease; }
.cta:hover .arw { transform: translateX(4px); }
.cta:disabled { opacity: 0.6; cursor: default; transform: none; filter: none; }

footer {
  position: relative;
  z-index: 1;
  border-top: 1px solid var(--line-2);
  padding: 24px 0 46px;
  display: flex;
  justify-content: space-between;
  gap: 16px;
  flex-wrap: wrap;
  font-family: "Martian Mono", monospace;
  font-size: 11px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--ink-45);
}
footer a { color: var(--ink-70); text-decoration: none; border-bottom: 1px solid var(--line-2); }
footer a:hover { color: var(--accent); border-color: var(--accent); }

/* ---- form ---- */
.form-wrap {
  position: relative;
  z-index: 1;
  padding: 46px 0 10px;
  max-width: 720px;
}
.field { margin-bottom: 30px; }
.field-label {
  display: block;
  font-family: "Martian Mono", monospace;
  font-weight: 600;
  font-size: 11.5px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--ink-70);
  margin-bottom: 10px;
}
.field-label .opt { color: var(--ink-45); }
input[type="text"],
input[type="email"],
input[type="url"],
select,
textarea {
  width: 100%;
  background: var(--paper-2);
  color: var(--ink);
  border: 1px solid var(--line-2);
  border-radius: 8px;
  padding: 13px 15px;
  font: inherit;
  font-size: 0.98rem;
}
textarea { min-height: 170px; resize: vertical; }
input:focus-visible,
select:focus-visible,
textarea:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 1px;
  border-color: var(--accent);
}
input[aria-invalid="true"],
select[aria-invalid="true"],
textarea[aria-invalid="true"] { border-color: var(--danger); }
.field-error {
  display: none;
  margin: 8px 0 0;
  font-size: 0.9rem;
  color: var(--danger);
}
.field-error.show { display: block; }

.radio-group {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1px;
  background: var(--line-2);
  border: 1px solid var(--line-2);
  border-radius: 8px;
  overflow: hidden;
}
.radio-cell {
  display: flex;
  align-items: center;
  gap: 12px;
  background: var(--paper);
  padding: 14px 16px;
  cursor: pointer;
  font-size: 0.95rem;
}
.radio-cell:has(input:checked) { background: var(--paper-2); }
.radio-cell input { accent-color: var(--accent); width: 16px; height: 16px; margin: 0; flex: none; }
.radio-cell:has(input:focus-visible) { outline: 2px solid var(--accent); outline-offset: -2px; }

/* honeypot: present in the DOM, invisible to humans */
.hp {
  position: absolute;
  left: -9999px;
  width: 1px;
  height: 1px;
  overflow: hidden;
}

.form-note {
  margin: 26px 0 0;
  font-size: 0.92rem;
  color: var(--ink-70);
}
.form-note a { color: var(--accent); text-decoration: none; border-bottom: 1px solid var(--accent); }
.form-note a:hover { filter: brightness(1.15); }

/* status panels */
.status {
  position: relative;
  z-index: 1;
  padding: 46px 0 10px;
  max-width: 720px;
}
.status-box {
  border: 1px solid var(--line-2);
  border-radius: 10px;
  padding: 30px 28px 34px;
  background: var(--paper-2);
}
.status-box h2 {
  font-family: "Martian Mono", monospace;
  font-weight: 720;
  font-stretch: 84%;
  font-size: clamp(1.3rem, 3vw, 1.8rem);
  text-transform: uppercase;
  margin: 0 0 14px;
}
.status-box p { margin: 0 0 10px; color: var(--ink-70); }
.status-box p:last-child { margin-bottom: 0; }
.status-box a { color: var(--accent); text-decoration: none; border-bottom: 1px solid var(--accent); }
.status-box a:hover { filter: brightness(1.15); }
.status-error { border-color: var(--danger); }
[hidden] { display: none !important; }

@media (max-width: 720px) {
  .wrap { padding: 0 22px; }
  .meta { text-align: left; }
  .masthead { padding-top: 30px; }
  .radio-group { grid-template-columns: 1fr; }
}
@media (prefers-reduced-motion: reduce) {
  .cta, .cta .arw { transition: none; }
}
