/* Spark & Wonder Labs — shared site styles.
   Tokens follow the v2.0 brand guide; see ~/projects/wiki/brands/swl/brand-system.md */

:root {
  --gold: #C9983E;
  --ochre: #9A7630;
  --abyss: #090E1C;
  --midnight: #10172A;
  --ivory: #F2EEE7;
  --ink-2: rgba(242, 238, 231, 0.66);
  --ink-3: rgba(242, 238, 231, 0.42);
  --line: rgba(242, 238, 231, 0.12);
  --line-gold: rgba(201, 152, 62, 0.28);
  --serif: 'Cormorant Garamond', Georgia, 'Times New Roman', serif;
  --sans: 'DM Sans', system-ui, -apple-system, 'Segoe UI', sans-serif;
  --wrap: 1120px;
  --gutter: clamp(20px, 5vw, 48px);
}

* { box-sizing: border-box; margin: 0; padding: 0; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
body {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  background: var(--abyss);
  color: var(--ivory);
  font-family: var(--sans);
  font-size: 17px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}
body {
  background-image: radial-gradient(ellipse 80% 70% at 60% 0%, var(--midnight) 0%, rgba(16, 23, 42, 0) 100%);
  background-repeat: no-repeat;
  background-size: 100% 1100px;
}
a { color: inherit; }
img, svg { display: block; }
::selection { background: var(--gold); color: var(--abyss); }

.wrap { width: 100%; max-width: var(--wrap); margin-inline: auto; padding-inline: var(--gutter); }

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

.skip {
  position: absolute; left: var(--gutter); top: -48px;
  padding: 8px 12px; background: var(--gold); color: var(--abyss);
  font-size: 14px; text-decoration: none; transition: top .15s;
}
.skip:focus { top: 12px; z-index: 10; }

/* ---------- Header ---------- */

.site-head {
  border-bottom: 1px solid var(--line);
}
.site-head .wrap {
  display: flex; align-items: center; justify-content: space-between; gap: 24px;
  min-height: 84px;
}
.brand {
  display: inline-flex; align-items: center; gap: 14px;
  color: var(--ivory); text-decoration: none;
}
.brand .mark { width: 38px; height: auto; flex-shrink: 0; }
.brand .name {
  font-family: var(--serif); font-weight: 600; font-size: 24px; line-height: 1; letter-spacing: 0.005em;
  display: flex; align-items: baseline; gap: 10px; white-space: nowrap;
}
.brand .name small {
  font-family: var(--sans); font-weight: 500; font-size: 10px; letter-spacing: 0.34em;
  color: var(--gold); transform: translateY(-1px);
}
.site-nav { display: flex; gap: clamp(18px, 3vw, 36px); }
.site-nav a {
  color: var(--ink-2); font-size: 15px; text-decoration: none;
  padding: 6px 0; border-bottom: 1px solid transparent; transition: color .2s, border-color .2s;
}
.site-nav a:hover, .site-nav a[aria-current="page"] { color: var(--ivory); }
.site-nav a[aria-current="page"] { border-bottom-color: var(--gold); }

/* ---------- Type ---------- */

h1, h2, h3 { font-family: var(--serif); font-weight: 600; line-height: 1.05; letter-spacing: -0.005em; }
.display { font-size: clamp(42px, 6.4vw, 72px); line-height: 0.98; letter-spacing: -0.01em; text-wrap: balance; }
.h2 { font-size: clamp(30px, 3.6vw, 40px); }
.lede { font-family: var(--serif); font-weight: 400; font-size: clamp(22px, 2.6vw, 28px); line-height: 1.3; color: var(--ink-2); text-wrap: pretty; }
.measure { max-width: 60ch; }
.quiet { color: var(--ink-2); }
.small { font-size: 15px; }

.inline-link {
  color: var(--ivory); text-decoration: none;
  border-bottom: 1px solid var(--line-gold); transition: color .2s, border-color .2s;
}
.inline-link:hover { color: var(--gold); border-bottom-color: var(--gold); }

.more {
  display: inline-flex; align-items: baseline; gap: 8px;
  color: var(--gold); font-size: 15px; text-decoration: none;
  border-bottom: 1px solid var(--line-gold); padding-bottom: 2px; transition: border-color .2s;
}
.more:hover { border-bottom-color: var(--gold); }

/* ---------- Sections ---------- */

.section { padding-block: clamp(56px, 8vw, 96px); border-top: 1px solid var(--line); }
.section-head { display: flex; align-items: baseline; justify-content: space-between; gap: 24px; flex-wrap: wrap; margin-bottom: clamp(28px, 4vw, 44px); }
.split { display: grid; grid-template-columns: minmax(0, 5fr) minmax(0, 7fr); gap: clamp(28px, 5vw, 72px); align-items: start; }
.split .h2 { max-width: 12ch; }
.prose > * + * { margin-top: 1.1em; }
.prose p { color: var(--ink-2); max-width: 62ch; text-wrap: pretty; }
.prose .lead { color: var(--ivory); }

/* ---------- Status ---------- */

.status { display: inline-flex; align-items: center; gap: 9px; font-size: 14px; color: var(--ink-2); white-space: nowrap; }
.status::before { content: ""; width: 7px; height: 7px; border-radius: 50%; background: var(--ink-3); flex-shrink: 0; }
.status.live { color: var(--gold); }
.status.live::before { background: var(--gold); box-shadow: 0 0 0 3px rgba(201, 152, 62, 0.18); }

/* ---------- Forms ---------- */

.field { display: flex; gap: 10px; flex-wrap: wrap; }
.field input {
  flex: 1 1 240px; min-width: 0; height: 48px; padding: 0 14px;
  background: rgba(242, 238, 231, 0.04); border: 1px solid var(--line); border-radius: 4px;
  color: var(--ivory); font: inherit; font-size: 16px; transition: border-color .2s, background .2s;
}
.field input::placeholder { color: var(--ink-3); }
.field input:hover { border-color: rgba(242, 238, 231, 0.24); }
.field input:focus { outline: none; border-color: var(--gold); background: rgba(242, 238, 231, 0.06); }
.field button {
  height: 48px; padding: 0 22px; border-radius: 4px; border: 1px solid var(--gold);
  background: var(--gold); color: var(--abyss); font: inherit; font-size: 15px; font-weight: 500;
  cursor: pointer; transition: background .2s, border-color .2s;
}
.field button:hover { background: #D6A850; border-color: #D6A850; }
.field button:disabled { opacity: .6; cursor: progress; }
.form-note { margin-top: 12px; font-size: 14px; color: var(--ink-2); min-height: 1.5em; }
.form-note.ok { color: var(--gold); }
.form-note.err { color: #E8B4A0; }
.hp { position: absolute; left: -9999px; width: 1px; height: 1px; overflow: hidden; }

/* ---------- Footer ---------- */

.site-foot { margin-top: auto; border-top: 1px solid var(--line); padding-block: clamp(40px, 6vw, 64px) 32px; color: var(--ink-2); font-size: 15px; }
.foot-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 32px 48px; }
.site-foot h3 { font-family: var(--sans); font-weight: 500; font-size: 13px; color: var(--ink-3); margin-bottom: 10px; }
.site-foot address { font-style: normal; line-height: 1.55; }
.site-foot ul { list-style: none; }
.site-foot li + li { margin-top: 6px; }
.site-foot a { color: var(--ink-2); text-decoration: none; border-bottom: 1px solid transparent; transition: color .2s, border-color .2s; }
.site-foot a:hover { color: var(--ivory); border-bottom-color: var(--line-gold); }
.foot-base { margin-top: 40px; padding-top: 20px; border-top: 1px solid var(--line); display: flex; justify-content: space-between; gap: 16px; flex-wrap: wrap; font-size: 14px; color: var(--ink-3); }
.foot-base a { color: var(--ink-2); }

@media (max-width: 760px) {
  .split { grid-template-columns: 1fr; }
  .split .h2 { max-width: none; }
  .foot-grid { grid-template-columns: 1fr; gap: 28px; }
  .brand .name { font-size: 21px; }
  .brand .name small { display: none; }
  .site-nav a { font-size: 14px; }
}

/* Phones: brand + nav no longer fit on one row (~430px), so the nav drops to its own row. */
@media (max-width: 480px) {
  .site-head .wrap { flex-wrap: wrap; row-gap: 6px; min-height: 0; padding-block: 16px 10px; }
  .site-nav { gap: 24px; }
}
