/* Shared look for the static idea pages in /public (ideas.html, the how-to pages
   and /sv). Same gallery-wall language as the app: Bodoni headlines, one vermilion
   accent, framed boards. The fonts are self-hosted so nothing is fetched from Google. */

@font-face {
  font-family: "Bodoni Moda";
  font-style: normal;
  font-weight: 400 900;
  font-display: swap;
  src: url("/fonts/bodoni-moda-latin.woff2") format("woff2");
}
@font-face {
  font-family: "Bodoni Moda";
  font-style: italic;
  font-weight: 400 900;
  font-display: swap;
  src: url("/fonts/bodoni-moda-latin-italic.woff2") format("woff2");
}
@font-face {
  font-family: "Geist";
  font-style: normal;
  font-weight: 100 900;
  font-display: swap;
  src: url("/fonts/geist-latin.woff2") format("woff2");
}

:root {
  --bg: #edece8;
  --bg-2: #e5e3dd;
  --paper: #f9f8f5;
  --ink: #151413;
  --muted: #57544f;
  --faint: #87837c;
  --line: rgba(21, 20, 19, 0.13);
  --line-2: rgba(21, 20, 19, 0.6);
  --accent: #df3f2a;
  --glow: rgba(255, 250, 240, 0.9);
  --frame: #171615;
  --drop: 30, 20, 10;
  --display: "Bodoni Moda", Didot, "Bodoni 72", "Bodoni MT", Georgia, serif;
  --sans: "Geist", "Inter", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  color-scheme: light dark;
}
@media (prefers-color-scheme: dark) {
  :root {
    --bg: #121211;
    --bg-2: #1a1a18;
    --paper: #1e1e1c;
    --ink: #f1efea;
    --muted: #b4b1aa;
    --faint: #7f7c76;
    --line: rgba(241, 239, 234, 0.12);
    --line-2: rgba(241, 239, 234, 0.55);
    --accent: #ff5a40;
    --glow: rgba(255, 233, 199, 0.08);
    --frame: #1e1d1b;
    --drop: 0, 0, 0;
  }
}

* {
  box-sizing: border-box;
}
html,
body {
  margin: 0;
}
body {
  background:
    radial-gradient(70% 520px at 72% 0%, var(--glow), transparent 72%),
    var(--bg);
  color: var(--ink);
  font: 17px/1.65 var(--sans);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  text-rendering: optimizeLegibility;
}
::selection {
  background: color-mix(in oklab, var(--accent) 28%, transparent);
}
a {
  color: inherit;
}
:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 3px;
}
.wrap {
  max-width: 1120px;
  margin: 0 auto;
  padding: 0 clamp(20px, 4vw, 40px);
}

/* ------------------------------------------------------------ header */
header.top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 22px 0;
}
.brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  text-decoration: none;
  font: italic 500 26px/1 var(--display);
  letter-spacing: -0.01em;
}
.mark {
  display: inline-grid;
  place-items: center;
  width: 18px;
  height: 18px;
  border: 2px solid var(--ink);
}
.mark i {
  display: block;
  width: 7px;
  height: 7px;
  background: var(--accent);
}
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-height: 48px;
  padding: 0 22px;
  border: 1px solid var(--line-2);
  border-radius: 999px;
  text-decoration: none;
  font: 600 15px/1.1 var(--sans);
  white-space: nowrap;
  transition:
    background 0.25s,
    color 0.25s,
    border-color 0.25s,
    transform 0.25s cubic-bezier(0.22, 1, 0.36, 1);
}
.btn:hover {
  background: color-mix(in oklab, var(--ink) 7%, transparent);
}
.btn:active {
  transform: translateY(1px) scale(0.985);
}
.btn.primary {
  border-color: var(--ink);
  background: var(--ink);
  color: var(--bg);
}
.btn.primary:hover {
  border-color: var(--accent);
  background: var(--accent);
  color: #fff;
}
header.top .btn {
  min-height: 40px;
  padding: 0 17px;
  font-size: 14px;
}

/* ------------------------------------------------------------ hero */
nav.crumbs {
  margin: clamp(18px, 4vw, 44px) 0 0;
  font: 500 12px/1 ui-monospace, "SF Mono", Menlo, Consolas, monospace;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--faint);
}
nav.crumbs a {
  text-decoration: none;
  color: var(--muted);
}
nav.crumbs a:hover {
  color: var(--accent);
}
/* Bodoni's display cut has hairlines that vanish on screens, so headlines use a
   sturdier optical size and medium weight; everything smaller is set in Geist. */
h1 {
  max-width: 17ch;
  margin: 20px 0 22px;
  font: 500 clamp(38px, 6vw, 76px) / 1 var(--display);
  font-variation-settings: "opsz" 22;
  letter-spacing: -0.028em;
  text-wrap: balance;
}
main > h1:first-child {
  margin-top: clamp(28px, 6vw, 72px);
}
.lede {
  max-width: 44rem;
  margin: 0;
  font-size: clamp(18px, 1.6vw, 21px);
  line-height: 1.5;
  color: var(--muted);
  text-wrap: pretty;
}
.actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin: 30px 0 14px;
}
.note {
  margin: 0;
  font-size: 14.5px;
  color: var(--faint);
}

/* ------------------------------------------------------------ the framed example */
figure {
  position: relative;
  margin: clamp(44px, 7vw, 88px) 0 clamp(20px, 3vw, 40px);
  padding: clamp(28px, 6vw, 72px) clamp(12px, 4vw, 56px) clamp(22px, 3vw, 36px);
  text-align: center;
  background:
    radial-gradient(60% 70% at 50% 8%, var(--glow), transparent 72%),
    var(--bg-2);
  border: 1px solid var(--line);
}
figure img {
  display: block;
  max-width: min(100%, 760px);
  height: auto;
  margin: 0 auto;
  border: 12px solid var(--frame);
  background: #0b0b0a;
  box-shadow:
    0 0 0 1px #000,
    0 2px 3px rgba(var(--drop), 0.2),
    0 28px 50px -18px rgba(var(--drop), 0.45),
    0 70px 110px -40px rgba(var(--drop), 0.5);
}
figcaption {
  max-width: 34rem;
  margin: 28px auto 0;
  font-size: 14.5px;
  line-height: 1.5;
  color: var(--muted);
}

/* ------------------------------------------------------------ body copy */
h2 {
  margin: clamp(52px, 7vw, 88px) 0 22px;
  padding-top: 30px;
  border-top: 1px solid var(--line);
  font: 500 clamp(28px, 3.4vw, 40px) / 1.08 var(--display);
  font-variation-settings: "opsz" 14;
  letter-spacing: -0.022em;
}
main p {
  max-width: 46rem;
  color: var(--muted);
}
main p.lede {
  max-width: 44rem;
}
strong {
  font-weight: 600;
  color: var(--ink);
}
ol.steps {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: clamp(20px, 3vw, 40px);
  margin: 0;
  padding: 0;
  list-style: none;
  counter-reset: step;
}
ol.steps li {
  margin: 0;
  font-size: 16px;
  line-height: 1.55;
  color: var(--muted);
  counter-increment: step;
}
ol.steps li::before {
  content: "0" counter(step);
  display: block;
  margin-bottom: 10px;
  font: 600 13px/1 ui-monospace, "SF Mono", Menlo, Consolas, monospace;
  letter-spacing: 0.12em;
  color: var(--accent);
}
ol.steps li strong {
  display: block;
  margin-bottom: 8px;
  font: 600 20px/1.25 var(--sans);
  letter-spacing: -0.018em;
}
ul.list {
  max-width: 46rem;
  margin: 0;
  padding: 0;
  list-style: none;
}
ul.list li {
  position: relative;
  margin: 0;
  padding: 13px 0 13px 26px;
  border-bottom: 1px solid var(--line);
  color: var(--muted);
}
ul.list li:first-child {
  border-top: 1px solid var(--line);
}
ul.list li::before {
  content: "";
  position: absolute;
  left: 2px;
  top: 24px;
  width: 8px;
  height: 8px;
  background: var(--accent);
}

/* ------------------------------------------------------------ questions */
details {
  max-width: 46rem;
  padding: 0;
  border-top: 1px solid var(--line);
}
details:last-of-type {
  border-bottom: 1px solid var(--line);
}
summary {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  padding: 20px 0;
  list-style: none;
  cursor: pointer;
  font: 600 clamp(17px, 1.6vw, 19px) / 1.35 var(--sans);
  letter-spacing: -0.012em;
  transition: color 0.2s;
}
summary::-webkit-details-marker {
  display: none;
}
summary::after {
  content: "+";
  flex: none;
  display: grid;
  place-items: center;
  width: 32px;
  height: 32px;
  border: 1px solid var(--line-2);
  border-radius: 50%;
  font: 400 20px/1 var(--sans);
  transition:
    background 0.25s,
    color 0.25s,
    transform 0.4s cubic-bezier(0.22, 1, 0.36, 1);
}
summary:hover {
  color: var(--accent);
}
details[open] summary::after {
  background: var(--ink);
  color: var(--bg);
  transform: rotate(45deg);
}
details p {
  margin: 0;
  padding: 0 52px 22px 0;
}

/* ------------------------------------------------------------ more ideas */
.ideas {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
  gap: clamp(16px, 2vw, 26px);
  margin: 26px 0 0;
}
.idea {
  display: flex;
  flex-direction: column;
  overflow: hidden;
  background: var(--paper);
  border: 1px solid var(--line);
  text-decoration: none;
  transition:
    border-color 0.3s,
    box-shadow 0.5s cubic-bezier(0.22, 1, 0.36, 1),
    transform 0.5s cubic-bezier(0.22, 1, 0.36, 1);
}
.idea:hover {
  border-color: var(--line-2);
  box-shadow: 0 30px 50px -32px rgba(var(--drop), 0.55);
  transform: translateY(-5px);
}
.idea img {
  display: block;
  width: 100%;
  height: 190px;
  margin: 0;
  object-fit: cover;
  object-position: top;
  border-bottom: 1px solid var(--line);
}
.idea strong {
  display: block;
  padding: 18px 20px 0;
  font: 600 18px/1.3 var(--sans);
  letter-spacing: -0.015em;
}
.idea span {
  display: block;
  padding: 8px 20px 0;
  font-size: 14.5px;
  line-height: 1.5;
  color: var(--muted);
}
.idea::after {
  content: "See the example \2197";
  display: block;
  margin-top: auto;
  padding: 16px 20px 20px;
  font: 600 13px/1 var(--sans);
  transition: color 0.2s;
}
.idea:hover::after {
  color: var(--accent);
}

/* ------------------------------------------------------------ footer */
footer {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 12px 24px;
  margin-top: clamp(64px, 9vw, 120px);
  padding: 26px 0 44px;
  border-top: 1px solid var(--line);
  font-size: 13.5px;
  color: var(--faint);
}
footer a {
  color: var(--muted);
  text-underline-offset: 3px;
}
footer a:hover {
  color: var(--accent);
}

@media (max-width: 760px) {
  body {
    font-size: 16px;
  }
  ol.steps {
    grid-template-columns: minmax(0, 1fr);
  }
  figure img {
    border-width: 8px;
  }
  .actions .btn {
    flex: 1 1 auto;
  }
  details p {
    padding-right: 0;
  }
}
@media (max-width: 420px) {
  header.top .btn {
    padding: 0 13px;
    font-size: 13px;
  }
}
@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    transition-duration: 0.001ms !important;
  }
}
