/* Shared styles for every page on publishercockpit.com. */

:root {
  --bg: #0f1418;
  --bg-deep: #0a0e11;
  --panel: #161d23;
  --field: #0f1418;
  --rule: #232d35;
  --fg: #e8eef2;
  --muted: #8f9da8;
  --track: #2a363f;
  --accent: #f2b33d;
  --btn-bg: #f2b33d;
  --btn-fg: #14191d;
  --error: #ff9b8a;
  --glow: rgba(242, 179, 61, 0.10);
  --sans: system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  --mono: ui-monospace, "SF Mono", Menlo, Consolas, monospace;
  color-scheme: dark;
}
@media (prefers-color-scheme: light) {
  :root {
    --bg: #f4f6f7;
    --bg-deep: #e9edef;
    --panel: #ffffff;
    --field: #f4f6f7;
    --rule: #d5dce1;
    --fg: #14191d;
    --muted: #55616b;
    --track: #d5dce1;
    --accent: #b06f00;
    --btn-bg: #8a5600;
    --btn-fg: #ffffff;
    --error: #b3261e;
    --glow: rgba(176, 111, 0, 0.08);
    color-scheme: light;
  }
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
html, body { min-height: 100%; }
body {
  margin: 0;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  background:
    radial-gradient(900px 520px at 85% -10%, var(--glow), transparent 60%),
    linear-gradient(180deg, var(--bg) 0%, var(--bg-deep) 100%);
  background-attachment: fixed;
  color: var(--fg);
  font-family: var(--sans);
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
}
a { color: inherit; }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 4px; border-radius: 2px; }
.wrap { width: 100%; max-width: 1040px; margin: 0 auto; padding-inline: 20px; }

/* Header */
header { padding-top: 40px; }
header.wrap { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 16px 32px; }
.brand { display: flex; align-items: center; gap: 12px; text-decoration: none; }
.mark { width: 40px; height: 40px; flex: none; }
.wordmark { font-size: 1.15rem; font-weight: 600; letter-spacing: 0.01em; }
nav ul { margin: 0; padding: 0; list-style: none; display: flex; flex-wrap: wrap; gap: 6px 24px; }
nav a { color: var(--muted); font-size: 0.95rem; text-decoration: none; padding: 4px 0; border-bottom: 2px solid transparent; }
nav a:hover { color: var(--fg); }
nav a[aria-current="page"] { color: var(--fg); border-bottom-color: var(--accent); }

/* Hero */
main { flex: 1; padding: 72px 0 80px; }
.label {
  margin: 0 0 20px;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 10px;
  font-family: var(--mono);
  font-size: 0.72rem;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--accent);
}
.label .for { color: var(--muted); }
.lamp {
  width: 7px; height: 7px; border-radius: 50%;
  background: var(--accent);
  box-shadow: 0 0 10px var(--accent);
  animation: lamp 3s ease-in-out infinite;
}
@keyframes lamp { 0%, 100% { opacity: 0.5; } 50% { opacity: 1; } }
h1 {
  margin: 0;
  max-width: 16ch;
  font-size: clamp(2.3rem, 7vw, 4rem);
  font-weight: 650;
  line-height: 1.06;
  letter-spacing: -0.025em;
}
.lede { margin: 24px 0 0; max-width: 56ch; font-size: 1.15rem; color: var(--muted); }
.button {
  display: inline-block;
  padding: 13px 22px;
  border: 0;
  border-radius: 8px;
  background: var(--btn-bg);
  color: var(--btn-fg);
  font: inherit;
  font-weight: 600;
  text-decoration: none;
  cursor: pointer;
}
.button:hover { filter: brightness(1.08); }
.button[disabled] { opacity: 0.6; cursor: progress; }
.hero-cta { margin: 32px 0 0; display: flex; flex-wrap: wrap; align-items: center; gap: 12px 18px; }
.hero-cta span { color: var(--muted); font-size: 0.95rem; }

/* The three dials on the home page */
.panel {
  margin: 56px 0 0;
  padding: 0;
  list-style: none;
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 16px;
}
.dial {
  padding: 24px 24px 22px;
  background: var(--panel);
  border: 1px solid var(--rule);
  border-radius: 12px;
}
.dial svg { display: block; width: 100%; max-width: 190px; height: auto; margin: 0 0 14px; }
.dial .track { stroke: var(--track); }
.dial .sweep { stroke: var(--accent); }
.dial .needle {
  stroke: var(--fg);
  transform-box: view-box;
  transform-origin: 60px 64px;
  transform: rotate(var(--a));
  animation: settle 1.6s cubic-bezier(0.2, 0.9, 0.25, 1.15) both;
}
.dial .hub { fill: var(--fg); }
@keyframes settle { from { transform: rotate(-90deg); } to { transform: rotate(var(--a)); } }
.dial h2 {
  margin: 0 0 6px;
  font-family: var(--mono);
  font-size: 0.78rem;
  font-weight: 600;
  letter-spacing: 0.18em;
  text-transform: uppercase;
}
.dial p { margin: 0; color: var(--muted); font-size: 0.98rem; }

/* Sections below the hero */
section { margin-top: 96px; }
.eyebrow {
  margin: 0 0 14px;
  font-family: var(--mono);
  font-size: 0.72rem;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--accent);
}
.eyebrow.quiet { color: var(--muted); }
.eyebrow .lamp { display: inline-block; margin-right: 10px; vertical-align: 0.1em; }
section h2 {
  margin: 0;
  max-width: 24ch;
  font-size: clamp(1.6rem, 4.2vw, 2.4rem);
  font-weight: 650;
  line-height: 1.14;
  letter-spacing: -0.02em;
}
.intro { margin: 16px 0 0; max-width: 60ch; color: var(--muted); font-size: 1.05rem; }

/* Problem and solution points */
.points {
  margin: 36px 0 0;
  padding: 0;
  list-style: none;
  counter-reset: point;
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 16px;
}
.points li {
  counter-increment: point;
  padding: 24px;
  background: var(--panel);
  border: 1px solid var(--rule);
  border-radius: 12px;
}
.points li::before {
  content: counter(point, decimal-leading-zero);
  display: block;
  margin-bottom: 12px;
  font-family: var(--mono);
  font-size: 0.78rem;
  letter-spacing: 0.14em;
  color: var(--muted);
}
.points.solve li::before { color: var(--accent); }
.points h3 { margin: 0 0 8px; font-size: 1.1rem; font-weight: 600; line-height: 1.3; }
.points p { margin: 0; color: var(--muted); }

/* Audience cards on the home page */
.audiences {
  margin: 36px 0 0;
  padding: 0;
  list-style: none;
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 16px;
}
.audiences a {
  display: flex;
  flex-direction: column;
  height: 100%;
  padding: 24px;
  background: var(--panel);
  border: 1px solid var(--rule);
  border-radius: 12px;
  text-decoration: none;
  transition: border-color 0.15s ease;
}
.audiences a:hover { border-color: var(--accent); }
.audiences h3 { margin: 0 0 8px; font-size: 1.15rem; font-weight: 600; }
.audiences p { margin: 0 0 18px; color: var(--muted); }
.audiences .more { margin-top: auto; color: var(--accent); font-weight: 600; font-size: 0.95rem; }

/* Early access */
.access {
  display: grid;
  grid-template-columns: minmax(0, 1.05fr) minmax(0, 1fr);
  gap: 32px 48px;
  align-items: start;
  padding: 40px;
  background: var(--panel);
  border: 1px solid var(--rule);
  border-radius: 16px;
  scroll-margin-top: 24px;
}
.access h2 { max-width: 18ch; }
.access .intro + .intro { margin-top: 12px; }
.access .intro strong { color: var(--fg); font-weight: 600; }
.signup { display: grid; gap: 16px; }
.field { display: grid; gap: 6px; }
.field label { font-size: 0.9rem; font-weight: 600; }
.field input {
  width: 100%;
  padding: 12px 14px;
  border: 1px solid var(--rule);
  border-radius: 8px;
  background: var(--field);
  color: var(--fg);
  font: inherit;
  font-size: 1rem;
}
.field input:focus-visible { outline-offset: 1px; border-color: var(--accent); }
/* The honeypot. People never see it or tab into it. */
.hp { position: absolute; left: -9999px; width: 1px; height: 1px; overflow: hidden; }
.signup .button { justify-self: start; }
.fine { margin: 0; color: var(--muted); font-size: 0.88rem; }
.status { margin: 0; font-size: 0.95rem; }
.status:empty { display: none; }
.status[data-kind="error"] { color: var(--error); }
.done h3 { margin: 0 0 8px; font-size: 1.3rem; letter-spacing: -0.01em; }
.done p { margin: 0; color: var(--muted); }

/* Short standalone pages: welcome, not found, and the signup replies without JavaScript */
.notice { padding-block: 96px; }
.notice h1 { font-size: clamp(2rem, 6vw, 3.2rem); max-width: 18ch; }
.back { display: inline-block; margin-top: 32px; color: var(--accent); font-weight: 600; text-underline-offset: 3px; }

/* Privacy page: a long notice page */
.privacy { max-width: 46rem; }
.privacy .fine { margin-top: 12px; }
.privacy h2 { margin: 44px 0 10px; font-size: 1.35rem; letter-spacing: -0.01em; }
.privacy p, .privacy li { color: var(--muted); line-height: 1.65; }
.privacy ul { margin: 0; padding-left: 1.2em; }
.privacy li { margin: 10px 0; }
.privacy strong { color: var(--fg); }
.privacy a:not(.back) { color: var(--accent); text-underline-offset: 3px; }

/* Footer */
footer { border-top: 1px solid var(--rule); padding: 22px 0 28px; color: var(--muted); font-size: 0.9rem; }
footer .wrap { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 8px 24px; }
footer p { margin: 0; }
footer a { text-underline-offset: 3px; }
footer a:hover { color: var(--fg); }

@media (max-width: 760px) {
  header { padding-top: 28px; }
  main { padding: 48px 0 56px; }
  section { margin-top: 64px; }
  .panel { grid-template-columns: 1fr; margin-top: 40px; }
  .dial { display: grid; grid-template-columns: 96px 1fr; column-gap: 18px; align-items: center; padding: 18px; }
  .dial svg { grid-row: 1 / 3; margin: 0; }
  .dial h2 { align-self: end; }
  .dial p { align-self: start; }
  .points, .audiences { grid-template-columns: 1fr; }
  .access { grid-template-columns: 1fr; padding: 24px; }
  .signup .button { justify-self: stretch; text-align: center; }
  .notice { padding-block: 56px; }
}
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .lamp, .dial .needle { animation: none; }
}
