/* Coda's public website. The same palette and type as the app (app/globals.css): charcoal and warm paper, a restrained
   ruby, Cormorant Garamond for the editorial voice and the system UI face for reading. Dark follows the app's default;
   light follows the device. No gradients, no cards: type, space and hairlines. */

@font-face {
  font-family: "Cormorant Garamond";
  font-style: normal;
  font-weight: 500 700;
  font-display: swap;
  src: url("/fonts/cormorant-garamond-latin.woff2") format("woff2");
}

:root {
  color-scheme: dark;
  --canvas: #111214;
  --text: #f3f0ea;
  --text-secondary: #d6d0c7;
  --text-muted: #98938e;
  --label: #a9a197;
  --border: #2a2b2f;
  --border-strong: #47484e;
  --accent: #bc2431;
  --accent-pressed: #a9202c;
  --on-accent: #fff8f2;
  --link-cue: #bc2431;
  --artwork-empty: #1b1c1f;
  --font-display: "Cormorant Garamond", Georgia, serif;
  --font-ui: -apple-system, BlinkMacSystemFont, "SF Pro Text", system-ui, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  --gutter: max(1.25rem, env(safe-area-inset-left));
}

@media (prefers-color-scheme: light) {
  :root {
    color-scheme: light;
    --canvas: #f6f1ea;
    --text: #231f1d;
    --text-secondary: #46403b;
    --text-muted: #716a64;
    --label: #6e655d;
    --border: #e4dcd1;
    --border-strong: #c3b8aa;
    --accent: #981b2f;
    --accent-pressed: #7e1526;
    --link-cue: #c3b8aa;
    --artwork-empty: #ece5db;
  }
}

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

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

body {
  background: var(--canvas);
  color: var(--text);
  display: flex;
  flex-direction: column;
  font-family: var(--font-ui);
  font-size: 1.0625rem;
  line-height: 1.6;
  margin: 0;
  min-height: 100vh;
  min-height: 100dvh;
  -webkit-font-smoothing: antialiased;
}

a { color: inherit; text-decoration-color: var(--link-cue); text-decoration-thickness: 1px; text-underline-offset: 0.2em; }
a:hover { text-decoration-color: currentColor; }
a:focus-visible, .button:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; border-radius: 4px; }

.site-header, .site-footer, main { margin: 0 auto; max-width: 46rem; padding-left: var(--gutter); padding-right: var(--gutter); width: 100%; }

.site-header { padding-top: max(1.4rem, env(safe-area-inset-top)); padding-bottom: 1rem; }
.wordmark { font-family: var(--font-display); font-size: 1.75rem; font-weight: 600; letter-spacing: -0.01em; text-decoration: none; }

main { flex: 1; padding-bottom: 4rem; padding-top: 2.5rem; }

h1, h2 { font-family: var(--font-display); font-weight: 600; letter-spacing: -0.01em; margin: 0; text-wrap: balance; }
h1 { font-size: clamp(2.3rem, 8vw, 3.6rem); line-height: 1.06; margin-bottom: 1.1rem; }
h2 { font-size: 1.5rem; line-height: 1.15; }
p { margin: 0 0 1rem; }

.lead { color: var(--text-secondary); font-size: 1.15rem; max-width: 34rem; }
.quiet { color: var(--text-muted); font-size: 0.95rem; }
.eyebrow { color: var(--label); font-size: 0.72rem; font-weight: 600; letter-spacing: 0.13em; margin: 0 0 0.6rem; text-transform: uppercase; }
.eyebrow a { text-decoration: none; }
.eyebrow a:hover { text-decoration: underline; }

.button {
  align-items: center;
  background: var(--accent);
  border-radius: 8px;
  color: var(--on-accent);
  display: inline-flex;
  font-weight: 600;
  justify-content: center;
  margin: 0.5rem 0 1.25rem;
  min-height: 48px;
  padding: 0 1.6rem;
  text-decoration: none;
}
.button:hover { background: var(--accent-pressed); }

.pending-note { border-left: 2px solid var(--accent); color: var(--text-secondary); margin: 1.25rem 0; padding: 0.15rem 0 0.15rem 0.9rem; }
.text-link { font-weight: 600; }

/* Landing */
.landing .hero { padding: 2rem 0 2.5rem; }
.landing h1 { font-size: clamp(2.7rem, 11vw, 4.6rem); max-width: 12ch; }
.principles { border-top: 1px solid var(--border); list-style: none; margin: 1rem 0 0; padding: 0; }
.principles li { border-bottom: 1px solid var(--border); display: grid; gap: 0.35rem; padding: 1.4rem 0; }
.principles p { color: var(--text-secondary); margin: 0; }
@media (min-width: 720px) {
  .principles li { gap: 2rem; grid-template-columns: 14rem minmax(0, 1fr); align-items: baseline; }
}

/* Legal and support */
.prose { max-width: 38rem; }

/* Shared show and episode pages */
.item-detail { display: grid; gap: 1.5rem; }
.artwork {
  aspect-ratio: 1;
  border: 1px solid var(--border);
  border-radius: 11px;
  display: block;
  height: auto;
  max-width: 15rem;
  object-fit: cover;
  width: 62%;
}
.artwork-empty {
  align-items: center;
  background: var(--artwork-empty);
  color: var(--text-muted);
  display: flex;
  font-family: var(--font-display);
  font-size: 2rem;
  justify-content: center;
}
.item-detail h1 { font-size: clamp(2rem, 7vw, 3rem); margin-bottom: 0.6rem; }
.byline { color: var(--text-secondary); font-size: 1.05rem; margin-bottom: 0.4rem; }
.meta { color: var(--text-muted); font-size: 0.92rem; margin: 0; }
.description { border-top: 1px solid var(--border); color: var(--text-secondary); overflow-wrap: anywhere; padding-top: 1.4rem; }
.description ul { margin: 0 0 1rem; padding-left: 1.2rem; }
.listen-links { color: var(--text-muted); font-size: 0.95rem; margin: 0; }
.listen-links span { margin-right: 0.15rem; }
.get-coda { border-top: 1px solid var(--border); margin-top: 2.5rem; padding-top: 1.75rem; }
.get-coda p:first-child { font-family: var(--font-display); font-size: 1.45rem; line-height: 1.25; max-width: 28rem; }

@media (min-width: 720px) {
  main { padding-top: 4rem; }
  .item-detail { align-items: end; column-gap: 2.25rem; grid-template-columns: 15rem minmax(0, 1fr); }
  .item-detail .artwork { width: 100%; }
  .item-detail > :not(.artwork):not(.item-heading) { grid-column: 1 / -1; }
}

/* Shared public List pages */
.list-items { border-top: 1px solid var(--border); list-style: none; margin: 0; padding: 0; }
.list-items li { border-bottom: 1px solid var(--border); }
.list-items a, .list-items .list-item { align-items: center; display: grid; gap: 0.9rem; grid-template-columns: 3.5rem minmax(0, 1fr);
  padding: 0.8rem 0; text-decoration: none; }
.list-items img, .list-item-empty { aspect-ratio: 1; border: 1px solid var(--border); border-radius: 7px; height: auto; object-fit: cover; width: 3.5rem; }
.list-item-empty { align-items: center; background: var(--artwork-empty); color: var(--text-muted); display: flex; font-family: var(--font-display); justify-content: center; }
.list-items strong { display: block; font-weight: 600; overflow-wrap: anywhere; }
.list-items small { color: var(--text-muted); display: block; font-size: 0.88rem; }
.list-items .unavailable strong { color: var(--text-muted); font-weight: 400; }
.list-more { color: var(--text-muted); font-size: 0.95rem; margin: 0; }
.featured-list { margin-top: 2.5rem; }
.featured-list h2 { font-size: 1.6rem; margin-bottom: 0.8rem; }

.site-footer { border-top: 1px solid var(--border); padding-bottom: max(1.75rem, env(safe-area-inset-bottom)); padding-top: 1.25rem; }
.site-footer nav { display: flex; flex-wrap: wrap; gap: 0.4rem 1.5rem; }
.site-footer a { color: var(--text-muted); font-size: 0.92rem; text-decoration: none; }
.site-footer a:hover { color: var(--text); }
