/* ==========================================================================
   thesecondchancecinema.com
   Palette and type are drawn from the book cover: night-sky teal curtains,
   ticket gold, cream letters, and the pale blue of the author name.
   ========================================================================== */

/* Self-hosted variable font, latin subset only (~38KB each). The single
   file covers weights 500-700. Body text uses system serifs at zero cost. */
@font-face {
  font-family: "Playfair Display";
  font-style: normal;
  font-weight: 500 700;
  font-display: swap;
  src: url("/fonts/playfair-display-latin.woff2") format("woff2");
}
@font-face {
  font-family: "Playfair Display";
  font-style: italic;
  font-weight: 500 700;
  font-display: swap;
  src: url("/fonts/playfair-display-latin-italic.woff2") format("woff2");
}

:root {
  --night: #0d2833;        /* deep night teal, near the cover's edges */
  --night-soft: #14394a;   /* curtain teal for gradients */
  --teal: #16606e;         /* links and accents on light backgrounds */
  --teal-dark: #0f4a56;
  --gold: #e4d087;         /* the ticket */
  --gold-bright: #efdfa2;
  --gold-deep: #a3853a;    /* gold that passes contrast on cream */
  --cream: #faf7ef;        /* page background */
  --cream-deep: #f1ead8;   /* alternate sections */
  --sky: #a9d3e2;          /* Thea's name on the cover */
  --ink: #22333c;
  --ink-soft: #506069;
  --line: #e3dcc8;

  --font-display: "Playfair Display", Georgia, serif;
  --font-body: Georgia, "Iowan Old Style", "Palatino Linotype", serif;
  --font-ui: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;

  /* A sprinkle of stars, tiled. Inline SVG costs a few hundred bytes and
     zero requests. */
  --stars: url('data:image/svg+xml,<svg xmlns="http://www.w3.org/2000/svg" width="220" height="220"><g fill="%23a9d3e2" opacity=".5"><circle cx="18" cy="34" r="1"/><circle cx="94" cy="12" r=".7"/><circle cx="170" cy="52" r="1.1"/><circle cx="60" cy="96" r=".6"/><circle cx="205" cy="130" r=".8"/><circle cx="130" cy="170" r="1"/><circle cx="30" cy="190" r=".7"/><circle cx="86" cy="210" r=".9"/></g><path d="M148 88l1.4 4.6 4.6 1.4-4.6 1.4-1.4 4.6-1.4-4.6-4.6-1.4 4.6-1.4z" fill="%23e4d087" opacity=".65"/></svg>');
}

* { box-sizing: border-box; margin: 0; padding: 0; }

html { scroll-behavior: smooth; }

body {
  font-family: var(--font-body);
  font-size: 1.0625rem;
  color: var(--ink);
  background-color: var(--cream);
  line-height: 1.7;
}

h1, h2, h3, h4 {
  font-family: var(--font-display);
  font-weight: 600;
  color: var(--night);
  line-height: 1.18;
  margin-bottom: 1rem;
}

h1 { font-size: clamp(2rem, 4.5vw, 3rem); letter-spacing: .01em; }
h2 { font-size: clamp(1.5rem, 3vw, 2rem); margin-top: .5rem; }
h3 { font-size: 1.3rem; }

p, ul, ol { margin-bottom: 1.1rem; }

a { color: var(--teal); text-underline-offset: 3px; }
a:hover { color: var(--teal-dark); }

img { max-width: 100%; height: auto; display: block; }

.eyebrow {
  font-family: var(--font-ui);
  font-size: .78rem;
  font-weight: 600;
  letter-spacing: .14em;
  text-transform: uppercase;
  color: var(--gold-deep);
  margin-bottom: .75rem;
}

/* Layout ------------------------------------------------------------------ */

.container { max-width: 1060px; margin: 0 auto; padding: 3.5rem 1.5rem; }
.container.tight { padding-top: 2.5rem; padding-bottom: 2.5rem; }
.prose { max-width: 46rem; }
.prose-center { max-width: 46rem; margin-left: auto; margin-right: auto; }

.section-alt { background-color: var(--cream-deep); }

.section-dark {
  background-color: var(--night);
  background-image: var(--stars), linear-gradient(160deg, var(--night-soft), var(--night) 65%);
  color: #e9eef0;
}
.section-dark h1, .section-dark h2, .section-dark h3 { color: var(--gold-bright); }
.section-dark a { color: var(--sky); }
.section-dark .eyebrow { color: var(--gold); }

/* Header ------------------------------------------------------------------ */

.site-header {
  background-color: var(--night);
  background-image: linear-gradient(180deg, var(--night-soft), var(--night));
  border-bottom: 1px solid rgba(228, 208, 135, .25);
  padding: 1rem 1.5rem;
}

.site-header .inner {
  max-width: 1060px;
  margin: 0 auto;
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  justify-content: space-between;
  gap: .5rem 2rem;
}

.wordmark {
  font-family: var(--font-display);
  font-size: 1.25rem;
  font-weight: 600;
  color: var(--gold);
  text-decoration: none;
  white-space: nowrap;
}
.wordmark:hover { color: var(--gold-bright); }

.site-nav {
  font-family: var(--font-ui);
  font-size: .92rem;
  display: flex;
  flex-wrap: wrap;
  gap: .2rem 1.4rem;
}
.site-nav a { color: #dce6ea; text-decoration: none; }
.site-nav a:hover, .site-nav a[aria-current="page"] { color: var(--gold); }
.site-nav a[aria-current="page"] { border-bottom: 2px solid var(--gold); padding-bottom: 2px; }

/* Hero -------------------------------------------------------------------- */

.hero {
  display: grid;
  grid-template-columns: minmax(260px, 380px) 1fr;
  gap: 3.5rem;
  align-items: center;
  max-width: 1060px;
  margin: 0 auto;
  padding: 4rem 1.5rem;
}

.hero-cover img {
  width: 100%;
  border-radius: 6px;
  box-shadow: 0 18px 45px rgba(0, 10, 15, .55);
}

.hero-text .tagline {
  font-family: var(--font-display);
  font-style: italic;
  font-size: 1.25rem;
  color: var(--sky);
  margin-bottom: .75rem;
}

.hero-text h1 { color: #f5f1e4; margin-bottom: .35rem; }

.hero-text .byline {
  font-family: var(--font-ui);
  font-size: 1.05rem;
  color: var(--sky);
  margin-bottom: 1.25rem;
}

.hero-text .accolade {
  font-family: var(--font-ui);
  font-size: .85rem;
  letter-spacing: .08em;
  text-transform: uppercase;
  color: var(--gold);
  margin-bottom: 1.25rem;
}

.hero-text blockquote {
  border-left: 3px solid var(--gold);
  padding-left: 1rem;
  margin-bottom: 1.5rem;
  font-style: italic;
  color: #dfe7ea;
}
.hero-text blockquote cite { display: block; font-style: normal; font-family: var(--font-ui); font-size: .85rem; color: var(--sky); margin-top: .4rem; }

/* Buttons ------------------------------------------------------------------ */

.btn {
  display: inline-block;
  font-family: var(--font-ui);
  font-weight: 600;
  font-size: 1rem;
  text-decoration: none;
  text-align: center;
  padding: .85rem 1.6rem;
  border-radius: 6px;
  border: 2px solid var(--gold);
  background-color: var(--gold);
  color: var(--night);
  transition: background .15s ease, color .15s ease;
}
.btn:hover { background-color: var(--gold-bright); border-color: var(--gold-bright); color: var(--night); }

.btn-outline { background-color: transparent; color: var(--gold); }
.btn-outline:hover { background-color: var(--gold); color: var(--night); }

/* Dark sections tint links sky blue; buttons must keep their own colors.
   These selectors outrank the `.section-dark a` rule. */
.section-dark a.btn, .app-feature a.btn { color: var(--night); }
.section-dark a.btn:hover, .app-feature a.btn:hover { color: var(--night); }
.section-dark a.btn-outline, .app-feature a.btn-outline { color: var(--gold); }
.section-dark a.btn-outline:hover, .app-feature a.btn-outline:hover { color: var(--night); }

/* Outline button for light backgrounds */
.btn-teal { border-color: var(--teal); background: transparent; color: var(--teal); }
.btn-teal:hover { background-color: var(--teal); border-color: var(--teal); color: #fff; }

.btn-solid-teal { border-color: var(--teal); background-color: var(--teal); color: #fff; }
.btn-solid-teal:hover { background-color: var(--teal-dark); border-color: var(--teal-dark); color: #fff; }

.cta-row { display: flex; flex-wrap: wrap; gap: .8rem; margin-bottom: .9rem; }

.micro {
  font-family: var(--font-ui);
  font-size: .85rem;
  color: var(--ink-soft);
}
.section-dark .micro, .hero .micro { color: #b7c7ce; }

/* Cards -------------------------------------------------------------------- */

.card-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  gap: 1.4rem;
  margin: 1.5rem 0;
}

.card {
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 1.5rem;
  box-shadow: 0 2px 10px rgba(13, 40, 51, .05);
}
.card h3 { margin-bottom: .4rem; }
.card h3 a { color: var(--night); text-decoration: none; }
.card h3 a:hover { color: var(--teal); text-decoration: underline; }
.card p { margin-bottom: .6rem; font-size: .98rem; }
.card .micro { margin-bottom: 0; }

/* Whole-card link: the card carries one link (the title). The stretched
   pseudo-element makes the entire card a click target, including the
   "Read the guide" cue, without adding a second link to the same URL. */
.card-link { position: relative; transition: border-color .15s ease, box-shadow .15s ease, transform .15s ease; }
.card-link h3 a::after { content: ""; position: absolute; inset: 0; }
.card-link:hover { border-color: var(--gold); box-shadow: 0 6px 18px rgba(13, 40, 51, .12); transform: translateY(-2px); }
.card-link:hover h3 a { color: var(--teal); text-decoration: none; }
.card-link:hover .micro { color: var(--teal); }
.card-link .micro { transition: color .15s ease; }

.card-icon {
  width: 64px;
  height: 64px;
  border-radius: 15px;
  margin-bottom: 1rem;
  box-shadow: 0 4px 12px rgba(13, 40, 51, .18);
}

/* Highlight and feature blocks --------------------------------------------- */

.highlight-box {
  background: #fff;
  border: 1px solid var(--line);
  border-left: 5px solid var(--gold);
  border-radius: 8px;
  padding: 1.8rem 2rem;
  margin: 2rem 0;
}
.highlight-box h2, .highlight-box h3 { margin-top: 0; }

/* Dark featured-app block used at the bottom of read-alike articles */
.app-feature {
  background-color: var(--night);
  background-image: var(--stars), linear-gradient(150deg, var(--night-soft), var(--night) 70%);
  color: #e9eef0;
  border-radius: 10px;
  padding: 2.2rem 2rem;
  margin: 2.5rem 0;
}
.app-feature h2, .app-feature h3 { color: var(--gold-bright); margin-top: 0; }
.app-feature a { color: var(--sky); }
.app-feature .app-feature-head { display: flex; align-items: center; gap: 1.1rem; margin-bottom: 1rem; }
.app-feature .app-feature-head img { width: 72px; height: 72px; border-radius: 16px; }
.app-feature .app-feature-head h2, .app-feature .app-feature-head h3 { margin-bottom: .1rem; }
.app-feature .micro { color: #b7c7ce; }

/* Read-alike book entries --------------------------------------------------- */

.book-entry { margin-bottom: 2.2rem; }
.book-entry h2 { margin-bottom: .35rem; }
.book-entry .book-meta {
  font-family: var(--font-ui);
  font-size: .88rem;
  color: var(--ink-soft);
  margin-bottom: .7rem;
}
.book-entry.book-entry-featured {
  background: var(--cream-deep);
  border: 1px solid var(--line);
  border-left: 5px solid var(--gold);
  border-radius: 8px;
  padding: 1.6rem 1.8rem;
}
.book-entry.book-entry-featured h2 { margin-top: 0; }

/* App page hero -------------------------------------------------------------- */

.app-hero { text-align: left; }
.app-hero .app-hero-head { display: flex; align-items: center; gap: 1.5rem; margin-bottom: 1.4rem; flex-wrap: wrap; }
.app-hero .app-hero-head img { width: 108px; height: 108px; border-radius: 24px; box-shadow: 0 10px 26px rgba(0, 10, 15, .5); }
.app-hero h1 { margin-bottom: .2rem; }
.app-hero .tagline { font-family: var(--font-display); font-style: italic; font-size: 1.3rem; color: var(--sky); margin-bottom: 0; }

.badge-soon {
  display: inline-block;
  font-family: var(--font-ui);
  font-size: .78rem;
  font-weight: 700;
  letter-spacing: .1em;
  text-transform: uppercase;
  color: var(--night);
  background: var(--gold);
  border-radius: 999px;
  padding: .3rem .9rem;
  margin-bottom: 1rem;
}

/* Notify form ----------------------------------------------------------------- */

.notify-form { margin: 1.2rem 0; max-width: 30rem; }
.notify-form .fields { display: flex; flex-wrap: wrap; gap: .7rem; }
.notify-form input[type="email"] {
  flex: 1 1 220px;
  font-family: var(--font-ui);
  font-size: 1rem;
  padding: .8rem 1rem;
  border: 2px solid var(--night-soft);
  border-radius: 6px;
  background: #fff;
  color: var(--ink);
}
.notify-form input[type="email"]:focus { outline: 2px solid var(--gold); outline-offset: 1px; }
.notify-form button {
  font-family: var(--font-ui);
  font-weight: 600;
  font-size: 1rem;
  padding: .8rem 1.5rem;
  border-radius: 6px;
  border: 2px solid var(--gold);
  background: var(--gold);
  color: var(--night);
  cursor: pointer;
}
.notify-form button:hover { background: var(--gold-bright); border-color: var(--gold-bright); }
/* Honeypot field: hidden from people, tempting to bots */
.notify-form .hp { position: absolute; left: -6000px; }

/* Feature lists on app pages */
.feature-list { list-style: none; padding-left: 0; }
.feature-list li { padding-left: 1.6rem; position: relative; margin-bottom: .85rem; }
.feature-list li::before { content: "✦"; position: absolute; left: 0; color: var(--gold-deep); }
.section-dark .feature-list li::before { content: "✦"; color: var(--gold); }

/* Checklist-style link lists (guides on the homepage etc.) */
.guide-list { list-style: none; padding-left: 0; }
.guide-list li { padding-left: 1.7rem; position: relative; margin-bottom: .7rem; }
.guide-list li::before { content: "→"; position: absolute; left: 0; color: var(--gold-deep); font-family: var(--font-ui); }

/* Discussion questions */
.question-list { counter-reset: q; list-style: none; padding-left: 0; }
.question-list li { counter-increment: q; margin-bottom: 1.3rem; padding-left: 3rem; position: relative; }
.question-list li::before {
  content: counter(q);
  position: absolute;
  left: 0;
  top: .1rem;
  width: 2rem;
  height: 2rem;
  border-radius: 50%;
  background: var(--night);
  color: var(--gold);
  font-family: var(--font-display);
  font-weight: 600;
  display: flex;
  align-items: center;
  justify-content: center;
}
.question-list li strong { font-family: var(--font-display); color: var(--night); }

/* Footer ------------------------------------------------------------------------ */

.site-footer {
  background-color: var(--night);
  background-image: var(--stars), linear-gradient(200deg, var(--night-soft), var(--night) 60%);
  color: #c9d6db;
  font-size: .95rem;
  margin-top: 3rem;
}
.site-footer .container { padding-top: 2.8rem; padding-bottom: 2.2rem; }
.site-footer .bio {
  max-width: 46rem;
  border-left: 3px solid var(--gold);
  padding-left: 1.2rem;
  margin-bottom: 1.6rem;
}
.site-footer a { color: var(--sky); }
.site-footer a:hover { color: #fff; }
.site-footer nav {
  font-family: var(--font-ui);
  font-size: .88rem;
  display: flex;
  flex-wrap: wrap;
  gap: .4rem 1.5rem;
  margin-bottom: 1.4rem;
}
.site-footer nav a { text-decoration: none; }
.site-footer .legal { font-family: var(--font-ui); font-size: .8rem; color: #8fa4ac; margin-bottom: 0; }

/* Accessibility ------------------------------------------------------------------ */

:focus-visible { outline: 3px solid var(--gold-deep); outline-offset: 2px; }
.section-dark :focus-visible, .site-header :focus-visible, .site-footer :focus-visible { outline-color: var(--gold); }

.skip-link {
  position: absolute;
  left: -6000px;
  font-family: var(--font-ui);
  background: var(--gold);
  color: var(--night);
  padding: .6rem 1rem;
  z-index: 10;
}
.skip-link:focus { left: .5rem; top: .5rem; }

/* Responsive ---------------------------------------------------------------------- */

@media (max-width: 760px) {
  .hero { grid-template-columns: 1fr; gap: 2.2rem; padding: 2.5rem 1.5rem; text-align: center; }
  .hero-cover img { max-width: 280px; margin: 0 auto; }
  .hero-text blockquote { text-align: left; }
  .cta-row { justify-content: center; }
  .cta-row .btn { flex: 1 1 100%; }
  .container { padding: 2.4rem 1.25rem; }
  .app-hero .app-hero-head { justify-content: flex-start; }
  .highlight-box, .app-feature { padding: 1.4rem 1.2rem; }
}

/* Print: used on the book club guide so the questions come out as a clean,
   shareable handout. Pages mark non-essential blocks with class="no-print". */
@media print {
  .site-header, .site-footer, .no-print { display: none !important; }
  body { background: #fff; color: #000; font-size: 11pt; }
  .container { padding: 0; max-width: none; }
  a { color: #000; text-decoration: none; }
  .question-list li::before { background: #fff; color: #000; border: 1px solid #000; }
  .print-credit { display: block !important; font-size: 9pt; margin-top: 2rem; border-top: 1px solid #000; padding-top: .5rem; }
}
.print-credit { display: none; }
