/* Kinkztr public site.
 *
 * The tokens below are the same midnight/bronze set the app mockups in
 * design/ use, so the marketing site and the product do not drift apart. Both
 * schemes are defined; the site follows the visitor's system setting and has
 * no toggle, because a holding page is not somewhere anyone stays long enough
 * to want one.
 */

:root {
  --surface-1: #f7f7f8;
  --surface-2: #ffffff;
  --text-primary: #1a1a1a;
  --text-secondary: #4a4a4a;
  --text-muted: #8a8a8a;
  --border: #e5e5e5;
  --border-strong: #c7c7c7;
  --fill-control: #ececed;

  --brand-midnight: #33253F;
  --brand-bronze: #A87246;
  /* The mark's second ring, and anything that has to read as midnight on the
   * page's own background. It inverts in dark mode; --brand-midnight does not,
   * because it is still the colour of a filled button there. */
  --brand-midnight-ink: #33253F;
  --on-brand: #ffffff;

  --halo-1: rgba(168, 114, 70, 0.16);
  --halo-2: rgba(51, 37, 63, 0.14);

  --font-sans: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  --font-voice: 'Fraunces', Georgia, 'Times New Roman', serif;

  --radius: 14px;
  --radius-pill: 999px;
  --shadow-sm: 0 1px 2px rgba(0, 0, 0, 0.06);
  --shadow-md: 0 4px 16px rgba(0, 0, 0, 0.10);
  --measure: 34rem;

  /* Native controls (the contact form's topic menu) follow the scheme too,
   * rather than opening a white list over the dark page. */
  color-scheme: light dark;
}

@media (prefers-color-scheme: dark) {
  :root {
    --surface-1: #17171a;
    --surface-2: #202024;
    --text-primary: #f2f2f2;
    --text-secondary: #b8b8bd;
    --text-muted: #8b8b93;
    --border: #303035;
    --border-strong: #45454b;
    --fill-control: #2b2b30;

    --brand-bronze: #C0925F;
    --brand-midnight-ink: #C9BBD8;
    --on-brand: #17171a;

    --halo-1: rgba(192, 146, 95, 0.14);
    --halo-2: rgba(201, 187, 216, 0.10);

    --shadow-sm: 0 1px 2px rgba(0, 0, 0, 0.5);
    --shadow-md: 0 4px 20px rgba(0, 0, 0, 0.45);
  }
}

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

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

body {
  margin: 0;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  background: var(--surface-1);
  color: var(--text-primary);
  font-family: var(--font-sans);
  font-size: 16px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

/* The holding page gets a single soft wash behind the fold. It is two radial
 * gradients rather than an image, so it costs nothing to load and scales to
 * any viewport. */
body.is-holding {
  background:
    radial-gradient(60rem 34rem at 15% -10%, var(--halo-1), transparent 70%),
    radial-gradient(52rem 30rem at 92% 6%, var(--halo-2), transparent 70%),
    var(--surface-1);
  background-repeat: no-repeat;
}

a { color: inherit; }

h1, h2, h3 {
  font-family: var(--font-voice);
  font-weight: 600;
  line-height: 1.15;
  letter-spacing: -0.01em;
  margin: 0;
}

.skip {
  position: absolute;
  left: -9999px;
  top: 0;
  padding: 10px 16px;
  background: var(--surface-2);
  border: 1px solid var(--border-strong);
  border-radius: 0 0 var(--radius) 0;
  z-index: 10;
}
.skip:focus { left: 0; }

:where(a, button, input, select, textarea):focus-visible {
  outline: 2px solid var(--brand-bronze);
  outline-offset: 2px;
  border-radius: 4px;
}

/* --- head ------------------------------------------------------------------ */

.site-head {
  display: flex;
  align-items: center;
  gap: 24px;
  padding: 22px clamp(16px, 5vw, 48px);
}

.wordmark {
  display: inline-flex;
  align-items: center;
  gap: 9px;
  text-decoration: none;
  font-weight: 500;
  font-size: 18px;
  letter-spacing: 0.005em;
}
.wordmark .mark { display: block; flex: none; }

.site-nav { margin-left: auto; }
.site-nav ul {
  display: flex;
  gap: clamp(14px, 3vw, 28px);
  margin: 0;
  padding: 0;
  list-style: none;
  font-size: 15px;
}
.site-nav a { color: var(--text-secondary); text-decoration: none; }
.site-nav a:hover { color: var(--text-primary); }

/* --- main ------------------------------------------------------------------ */

main {
  flex: 1 0 auto;
  width: 100%;
  max-width: 68rem;
  margin: 0 auto;
  padding: 0 16px;
}

.hero {
  padding: clamp(32px, 9vh, 88px) 0 clamp(40px, 8vh, 72px);
  max-width: var(--measure);
}

.badge {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  margin: 0 0 22px;
  padding: 6px 14px;
  border: 1px solid var(--border-strong);
  border-radius: var(--radius-pill);
  background: var(--surface-2);
  box-shadow: var(--shadow-sm);
  color: var(--text-secondary);
  font-size: 13px;
  font-weight: 500;
  letter-spacing: 0.02em;
  text-transform: uppercase;
}
.badge::before {
  content: '';
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--brand-bronze);
}

.hero h1 {
  font-size: clamp(2.3rem, 7vw, 3.6rem);
  margin: 0 0 20px;
}

.lede {
  margin: 0 0 32px;
  color: var(--text-secondary);
  font-size: clamp(1.05rem, 2.4vw, 1.2rem);
}

/* --- launch list ----------------------------------------------------------- */

.capture { margin: 0; }

.capture-label {
  display: block;
  margin-bottom: 8px;
  font-size: 14px;
  font-weight: 500;
  color: var(--text-secondary);
}

.capture-row { display: flex; flex-wrap: wrap; gap: 10px; }

.capture input[type="email"] {
  flex: 1 1 15rem;
  min-width: 0;
  padding: 13px 15px;
  border: 1px solid var(--border-strong);
  border-radius: var(--radius);
  background: var(--surface-2);
  color: var(--text-primary);
  font: inherit;
  font-size: 16px; /* 16px or iOS zooms the page on focus */
}
.capture input[type="email"]::placeholder { color: var(--text-muted); }

.capture button {
  flex: 0 0 auto;
  padding: 13px 22px;
  border: 1px solid transparent;
  border-radius: var(--radius);
  background: var(--brand-midnight);
  color: #fff;
  font: inherit;
  font-weight: 500;
  cursor: pointer;
}
.capture button:hover { background: #241a2d; }
@media (prefers-color-scheme: dark) {
  .capture button { background: var(--brand-bronze); color: var(--on-brand); }
  .capture button:hover { background: #cfa26d; }
}
.capture button[disabled] { opacity: 0.55; cursor: progress; }

.gotcha {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip-path: inset(50%);
  white-space: nowrap;
}

.capture-note {
  margin: 12px 0 0;
  color: var(--text-muted);
  font-size: 13.5px;
}
.capture-note a { color: var(--text-secondary); }

.capture-status {
  margin: 12px 0 0;
  font-size: 14.5px;
  font-weight: 500;
  min-height: 1.4em;
}
.capture-status[data-state="ok"] { color: var(--brand-bronze); }
.capture-status[data-state="error"] { color: #d1383d; }
@media (prefers-color-scheme: dark) {
  .capture-status[data-state="error"] { color: #ff8a8d; }
}

.capture-alt {
  margin: 20px 0 0;
  color: var(--text-secondary);
  font-size: 15px;
}
.capture-alt--only { font-size: 1.05rem; }
.capture-alt a { color: var(--brand-bronze); font-weight: 500; }

/* Shown in development only, where a form endpoint is unset: publishconf.py
 * refuses to build production without them. */
.dev-note {
  margin: 16px 0 0;
  padding: 10px 14px;
  border: 1px dashed var(--border-strong);
  border-radius: var(--radius);
  color: var(--text-muted);
  font-size: 14px;
}

/* --- pillars --------------------------------------------------------------- */

.pillars {
  padding: clamp(32px, 6vh, 56px) 0;
  border-top: 1px solid var(--border);
}

.pillars h2 {
  font-size: clamp(1.1rem, 2.6vw, 1.3rem);
  font-family: var(--font-sans);
  font-weight: 600;
  letter-spacing: 0.02em;
  text-transform: uppercase;
  color: var(--text-muted);
  margin-bottom: 28px;
}

/* Two columns, not auto-fit: there are four pillars, and auto-fit resolves to
 * three at common desktop widths, which leaves one card stranded on a row of
 * its own. */
.pillar-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 18px;
  margin: 0;
  padding: 0;
  list-style: none;
}
@media (min-width: 46rem) {
  .pillar-grid { grid-template-columns: 1fr 1fr; }
}

.pillar {
  padding: 22px;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: var(--surface-2);
  box-shadow: var(--shadow-sm);
}
.pillar h3 {
  font-size: 1.12rem;
  margin-bottom: 9px;
  color: var(--brand-midnight-ink);
}
.pillar p { margin: 0; color: var(--text-secondary); font-size: 15.5px; }

/* --- contact --------------------------------------------------------------- */

.contact {
  padding: clamp(32px, 6vh, 56px) 0;
  border-top: 1px solid var(--border);
}
.contact h2 { font-size: clamp(1.5rem, 4vw, 1.9rem); margin-bottom: 12px; }
.contact-lede { margin: 0 0 28px; max-width: var(--measure); color: var(--text-secondary); }

/* The message form: one column, the width of the text above it. It shares
 * .capture's button, note and status styles with the launch list; only the
 * fields are its own. */
.contact-form {
  display: grid;
  gap: 16px;
  max-width: var(--measure);
}
.contact-form .field { display: grid; gap: 6px; }
.contact-form .capture-label { margin-bottom: 0; }
.optional { font-weight: 400; color: var(--text-muted); }

.contact-form :is(input[type="text"], input[type="email"], select, textarea) {
  width: 100%;
  padding: 13px 15px;
  border: 1px solid var(--border-strong);
  border-radius: var(--radius);
  background: var(--surface-2);
  color: var(--text-primary);
  font: inherit;
  font-size: 16px; /* 16px or iOS zooms the page on focus */
}
.contact-form textarea { min-height: 8rem; resize: vertical; }
.contact-form button { justify-self: start; }
.contact-form :is(.capture-note, .capture-status) { margin: 0; }

/* --- prose (pages and news) ------------------------------------------------ */

.prose {
  max-width: var(--measure);
  padding: clamp(28px, 6vh, 56px) 0;
}
.prose h1 { font-size: clamp(1.9rem, 5vw, 2.6rem); margin-bottom: 14px; }
.prose h2 { font-size: 1.35rem; margin: 2em 0 0.5em; }
.prose h3 { font-size: 1.1rem; margin: 1.6em 0 0.4em; }
.prose p, .prose li { color: var(--text-secondary); }
.prose a { color: var(--brand-bronze); }
.prose-meta { color: var(--text-muted); font-size: 14px; margin: 0 0 28px; }
.prose-back { padding-bottom: 40px; }
.prose-back a { color: var(--brand-bronze); }

.archive-list { list-style: none; margin: 0; padding: 0; }
.archive-list li {
  display: flex;
  flex-wrap: wrap;
  gap: 4px 14px;
  padding: 14px 0;
  border-bottom: 1px solid var(--border);
}
.archive-list time { color: var(--text-muted); font-size: 14px; flex: 0 0 8rem; }
.archive-list a { color: var(--text-primary); text-decoration: none; font-weight: 500; }
.archive-list a:hover { color: var(--brand-bronze); }

/* --- foot ------------------------------------------------------------------ */

.site-foot {
  flex: none;
  margin-top: 24px;
  padding: 28px clamp(16px, 5vw, 48px) 36px;
  border-top: 1px solid var(--border);
  font-size: 14px;
  color: var(--text-muted);
}
.foot-legal { margin: 0 0 14px; max-width: 42rem; color: var(--text-secondary); }
.foot-legal strong { color: var(--text-primary); }
.foot-nav ul {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 22px;
  margin: 0 0 12px;
  padding: 0;
  list-style: none;
}
.foot-nav a { color: var(--text-secondary); text-decoration: none; }
.foot-nav a:hover { color: var(--brand-bronze); }
.foot-copy { margin: 0; }

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; }
}
