/* Calendum — site styles.
   Alloy tokens mirrored by hand from
   Packages/Timeline/Sources/Timeline/Theme.swift. If Theme.swift changes,
   update WEB.md §1.2 and this file together.

   Rules (WEB.md §1): zero JS, no webfonts, no external requests.
   `signal` (the one orange) is SEMANTIC only — price, protection, the
   now-concept. Never decorative. */

:root {
  --bg: #F4F6F8;
  --surface: #FCFDFE;
  --ink: #191A1D;
  --ink-muted: #5F636B;
  --hairline: #E3E6EA;
  --accent: #33373D;
  --signal: #E8590C;

  --measure: 34rem;
  --gutter: 1.5rem;
  --radius: 14px;

  --font: -apple-system, BlinkMacSystemFont, "SF Pro Text", system-ui,
    "Segoe UI", Roboto, sans-serif;
}

@media (prefers-color-scheme: dark) {
  :root {
    --bg: #16171A;
    --surface: #202228;
    --ink: #F2F3F5;
    --ink-muted: #9AA0A8;
    --hairline: #2B2D33;
    --accent: #C9CDD4;
    --signal: #FF6A2C;
  }
}

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

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

body {
  margin: 0;
  padding: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: var(--font);
  font-size: 1.0625rem;
  line-height: 1.6;
  text-rendering: optimizeLegibility;
  -webkit-font-smoothing: antialiased;
}

/* ---------- layout ---------- */

.wrap {
  max-width: var(--measure);
  margin: 0 auto;
  padding: 0 var(--gutter);
}

.wrap--wide {
  max-width: 60rem;
}

section {
  padding: 3.5rem 0;
  border-top: 1px solid var(--hairline);
}

section:first-of-type {
  border-top: 0;
}

/* ---------- masthead ---------- */

.masthead {
  padding: 1.75rem 0;
}

.masthead .wrap {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  flex-wrap: wrap;
}

.wordmark {
  font-size: 1.0625rem;
  font-weight: 600;
  letter-spacing: 0;
  color: var(--ink);
  text-decoration: none;
}

.masthead nav {
  display: flex;
  gap: 1.25rem;
  font-size: 0.9375rem;
}

.masthead nav a {
  color: var(--ink-muted);
  text-decoration: none;
}

.masthead nav a:hover,
.masthead nav a[aria-current="page"] {
  color: var(--ink);
}

/* ---------- type ---------- */

h1,
h2,
h3 {
  line-height: 1.2;
  letter-spacing: -0.015em;
  margin: 0 0 0.75rem;
  font-weight: 600;
}

h1 {
  font-size: clamp(2rem, 6vw, 2.75rem);
}

h2 {
  font-size: 1.5rem;
  margin-top: 0;
}

h3 {
  font-size: 1.125rem;
  margin-top: 2rem;
}

p {
  margin: 0 0 1.125rem;
}

.lede {
  font-size: 1.25rem;
  color: var(--ink-muted);
  line-height: 1.5;
}

.muted {
  color: var(--ink-muted);
}

.small {
  font-size: 0.9375rem;
}

.num {
  font-variant-numeric: tabular-nums;
}

a {
  color: var(--ink);
  text-decoration-color: var(--hairline);
  text-underline-offset: 3px;
}

a:hover {
  text-decoration-color: var(--ink-muted);
}

ul {
  padding-left: 1.15rem;
  margin: 0 0 1.125rem;
}

li {
  margin-bottom: 0.4rem;
}

code {
  font-family: ui-monospace, SFMono-Regular, "SF Mono", Menlo, monospace;
  font-size: 0.9em;
  background: var(--surface);
  border: 1px solid var(--hairline);
  border-radius: 5px;
  padding: 0.1em 0.35em;
}

/* ---------- hero ---------- */

.hero {
  padding-top: 2rem;
  padding-bottom: 1rem;
}

.hero h1 {
  margin-bottom: 1rem;
}

/* The one orange note: protection is the concept `signal` exists for. */
.hero h1 em {
  font-style: normal;
  color: var(--signal);
}

/* ---------- call to action ---------- */

.cta {
  display: flex;
  align-items: baseline;
  gap: 1rem;
  flex-wrap: wrap;
  margin: 1.75rem 0 0.5rem;
}

.button {
  display: inline-block;
  background: var(--accent);
  color: var(--bg);
  font-size: 1rem;
  font-weight: 600;
  padding: 0.7rem 1.4rem;
  border-radius: var(--radius);
  text-decoration: none;
}

.button:hover {
  opacity: 0.88;
}

.price {
  font-variant-numeric: tabular-nums;
  color: var(--signal);
  font-weight: 600;
}

/* ---------- shots ---------- */

.shots {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 1.5rem;
  margin: 0;
  padding: 0;
  list-style: none;
}

.shots img {
  width: 100%;
  height: auto;
  display: block;
  border: 1px solid var(--hairline);
  border-radius: var(--radius);
  background: var(--surface);
}

.shots figcaption {
  margin-top: 0.6rem;
  font-size: 0.9375rem;
  color: var(--ink-muted);
}

.shots figure {
  margin: 0;
}

/* ---------- cards ---------- */

.card {
  background: var(--surface);
  border: 1px solid var(--hairline);
  border-radius: var(--radius);
  padding: 1.25rem 1.4rem;
  margin-bottom: 1rem;
}

.card h3 {
  margin-top: 0;
  font-size: 1rem;
}

.card p:last-child,
.card ul:last-child {
  margin-bottom: 0;
}

/* A visible, deliberate marker for copy the author has not signed off. */
.draft {
  border-left: 3px solid var(--signal);
  background: var(--surface);
  border-radius: 0 var(--radius) var(--radius) 0;
  padding: 1rem 1.25rem;
  margin-bottom: 2rem;
  font-size: 0.9375rem;
  color: var(--ink-muted);
}

/* ---------- definition rows ---------- */

.rows {
  border-top: 1px solid var(--hairline);
  margin: 1.5rem 0;
}

.rows > div {
  border-bottom: 1px solid var(--hairline);
  padding: 0.9rem 0;
  display: grid;
  grid-template-columns: 9rem 1fr;
  gap: 1rem;
}

.rows dt {
  color: var(--ink-muted);
  font-size: 0.9375rem;
  margin: 0;
}

.rows dd {
  margin: 0;
}

@media (max-width: 32rem) {
  .rows > div {
    grid-template-columns: 1fr;
    gap: 0.2rem;
  }
}

/* ---------- footer ---------- */

footer {
  border-top: 1px solid var(--hairline);
  padding: 2.5rem 0 3.5rem;
  color: var(--ink-muted);
  font-size: 0.9375rem;
}

footer nav {
  display: flex;
  gap: 1.25rem;
  flex-wrap: wrap;
  margin-bottom: 1rem;
}

footer a {
  color: var(--ink-muted);
}
