/* Little Minutes — littleminutes.com
   Concept: the day runs down to night. The page opens on honey-lit paper,
   scrolls through the book's minutes, and ends — like the book — at dusk. */

@font-face {
  font-family: "Quicksand";
  src: url("/fonts/quicksand.ttf") format("truetype");
  font-weight: 300 700;
  font-display: swap;
}

:root {
  --paper: #f6eedc;      /* honey-lit page */
  --panel: #efe3c9;      /* slightly deeper paper for the book panel */
  --ink: #33261a;        /* warm bear-brown, not grey-black */
  --soft: #7d6a52;       /* quiet text */
  --line: #d9caa9;
  --honey: #b06f14;      /* amber accent, AA on paper */
  --honey-deep: #96590a;
  --moss: #5c7040;
  --sky: #3d5a86;
  --dusk: #182741;       /* the ending */
  --dusk-deep: #101b30;
  --starlight: #f0e6ce;  /* text on dusk */
  --star-dim: #b9c2d8;

  --display: "Quicksand", ui-rounded, "Avenir Next", system-ui, sans-serif;
  --body: "Iowan Old Style", "Palatino", "Book Antiqua", Georgia, serif;

  --corner: 2.4rem;      /* board-book corner */
}

/* Dusk-first dark theme: the whole site moves to night. */
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --paper: #14203a;
    --panel: #1b2946;
    --ink: #ece1c6;
    --soft: #a8a58f;
    --line: #2d3d5e;
    --honey: #e0a33e;
    --honey-deep: #edb95f;
    --moss: #9db07a;
    --sky: #8fa9d2;
    --dusk: #0e1830;
    --dusk-deep: #0a1122;
    --starlight: #f0e6ce;
    --star-dim: #93a0bd;
  }
}
:root[data-theme="dark"] {
  --paper: #14203a;
  --panel: #1b2946;
  --ink: #ece1c6;
  --soft: #a8a58f;
  --line: #2d3d5e;
  --honey: #e0a33e;
  --honey-deep: #edb95f;
  --moss: #9db07a;
  --sky: #8fa9d2;
  --dusk: #0e1830;
  --dusk-deep: #0a1122;
  --starlight: #f0e6ce;
  --star-dim: #93a0bd;
}

* { box-sizing: border-box; }

body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font: 17px/1.7 var(--body);
  -webkit-text-size-adjust: 100%;
}

.col {
  max-width: 46rem;
  margin: 0 auto;
  padding-inline: 1.4rem;
}

h1, h2 {
  font-family: var(--display);
  font-weight: 700;
  letter-spacing: -0.015em;
  text-wrap: balance;
  margin: 0;
}

p { margin: 0; }

a { color: var(--honey-deep); text-decoration-thickness: 1px; text-underline-offset: 2px; }

:focus-visible { outline: 2px solid var(--honey); outline-offset: 3px; }

.label {
  font-family: var(--display);
  font-weight: 600;
  font-size: .74rem;
  letter-spacing: .18em;
  text-transform: uppercase;
  color: var(--soft);
}

/* --- top ---------------------------------------------------------------- */

.top {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 1rem;
  padding-block: 1.6rem .5rem;
}

.wordmark {
  font-family: var(--display);
  font-weight: 700;
  font-size: 1.25rem;
  color: var(--ink);
  text-decoration: none;
}

.top nav {
  font-family: var(--display);
  font-weight: 600;
  font-size: .95rem;
  display: flex;
  gap: 1.3rem;
}

.top nav a { color: var(--soft); text-decoration: none; }
.top nav a:hover { color: var(--honey-deep); }

/* --- hero: the book's first words, one minute at a time ----------------- */

.hero { padding-block: 4.5rem 3.5rem; }

.hero h1 {
  font-size: clamp(2.8rem, 10vw, 5.2rem);
  line-height: 1.04;
  text-transform: lowercase;
}

.hero .word { color: var(--honey); transition: color .4s, opacity .4s; }
.hero .word.turning { opacity: 0; }

.hero .lede {
  margin-top: 1.4rem;
  font-size: 1.2rem;
  max-width: 30em;
  color: var(--soft);
}

/* --- the minutes: facing-page pairs ------------------------------------- */

.minutes {
  display: flex;
  flex-direction: column;
  gap: 3.2rem;
  padding-block: 1rem 4.5rem;
}

.minute {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1.15fr);
  gap: clamp(1.2rem, 4vw, 2.6rem);
  align-items: center;
}

.minute img {
  width: 100%;
  height: auto;
  /* Board-book corners: rounded on the outer edge, tighter at the spine. */
  border-radius: .6rem var(--corner) var(--corner) .6rem;
  box-shadow: 0 14px 30px -14px rgba(30, 20, 8, .45);
}

.minute:nth-child(even) .pic { order: 2; }
.minute:nth-child(even) img { border-radius: var(--corner) .6rem .6rem var(--corner); }

.minute .words {
  display: flex;
  flex-direction: column;
  gap: .5rem;
}

.minute h2 {
  font-size: clamp(1.9rem, 5.5vw, 2.7rem);
  text-transform: lowercase;
}

.minute p { color: var(--soft); max-width: 24em; }

.minute.happy h2 { color: var(--honey); }
.minute.sad h2 { color: var(--sky); }
.minute.laughing h2 { color: var(--moss); }

@media (max-width: 34rem) {
  .minute { grid-template-columns: 1fr; }
  .minute:nth-child(even) .pic { order: 0; }
  .minute .pic { max-width: 17rem; }
}

/* --- the book ------------------------------------------------------------ */

.book {
  background: var(--panel);
  border-block: 1px solid var(--line);
  padding-block: 3.8rem 4.2rem;
}

.book .col {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1.3fr);
  gap: clamp(1.6rem, 5vw, 3rem);
  align-items: center;
}

.book img {
  width: 100%;
  height: auto;
  border-radius: .5rem 1.6rem 1.6rem .5rem;
  box-shadow: 0 2px 4px rgba(30, 20, 8, .18), 0 22px 40px -16px rgba(30, 20, 8, .5);
}

.book .about {
  display: flex;
  flex-direction: column;
  gap: .85rem;
}

.book h2 {
  font-size: clamp(2rem, 6vw, 2.8rem);
  text-transform: lowercase;
}

.book .subtitle { font-style: italic; color: var(--soft); font-size: 1.1rem; }
.book .byline { color: var(--soft); font-size: .95rem; }
.book .blurb { font-size: 1.08rem; }

.specs {
  list-style: none;
  padding: 0;
  margin: .2rem 0 0;
  color: var(--soft);
  font-size: .93rem;
  display: flex;
  flex-direction: column;
  gap: .15rem;
}

.buy-row {
  display: flex;
  align-items: center;
  gap: 1rem;
  flex-wrap: wrap;
  margin-top: .6rem;
}

.buy {
  font-family: var(--display);
  font-weight: 700;
  font-size: 1.05rem;
  background: var(--honey);
  color: var(--paper);
  text-decoration: none;
  padding: .85rem 2rem;
  border-radius: .5rem 1.4rem 1.4rem .5rem;  /* the corner again */
}

.buy:hover { background: var(--honey-deep); }

.price { color: var(--soft); font-size: .92rem; }

@media (max-width: 34rem) {
  .book .col { grid-template-columns: 1fr; }
  .book img { max-width: 17rem; }
}

/* --- press + cards ------------------------------------------------------- */

.plain { padding-block: 3.8rem 0; }
.plain:last-of-type { padding-bottom: 4.5rem; }

.plain .col {
  display: flex;
  flex-direction: column;
  gap: .7rem;
}

.plain h2 { font-size: 1.5rem; text-transform: lowercase; }
.plain p { max-width: 38em; }
.plain .muted { color: var(--soft); }

/* --- dusk: how every minute ends ----------------------------------------- */

.dusk {
  margin-top: 4.5rem;
  background:
    radial-gradient(1px 1px at 12% 18%, var(--star-dim) 50%, transparent 51%),
    radial-gradient(1px 1px at 78% 12%, var(--star-dim) 50%, transparent 51%),
    radial-gradient(1.5px 1.5px at 55% 30%, var(--star-dim) 50%, transparent 51%),
    radial-gradient(1px 1px at 90% 45%, var(--star-dim) 50%, transparent 51%),
    radial-gradient(1px 1px at 30% 55%, var(--star-dim) 50%, transparent 51%),
    linear-gradient(var(--dusk), var(--dusk-deep));
  color: var(--starlight);
  padding-block: 4.5rem 2.8rem;
}

.dusk .col {
  display: flex;
  flex-direction: column;
  gap: 2.2rem;
}

.dusk img {
  width: 100%;
  max-width: 22rem;
  height: auto;
  margin-inline: auto;
  border-radius: .6rem var(--corner) var(--corner) .6rem;
  box-shadow: 0 20px 44px -18px rgba(0, 0, 0, .7);
}

.promise {
  font-size: clamp(1.25rem, 3.6vw, 1.7rem);
  font-style: italic;
  line-height: 1.5;
  max-width: 26em;
  text-wrap: balance;
  text-align: center;
  margin-inline: auto;
}

.promise .from { display: block; margin-top: .6rem; font-style: normal; font-size: .85rem; color: var(--star-dim); }

.dusk .label { color: var(--star-dim); }

.signup {
  display: flex;
  flex-direction: column;
  gap: .6rem;
}

.signup p { max-width: 34em; }

.signup form {
  display: flex;
  flex-wrap: wrap;
  gap: .6rem;
  margin-top: .3rem;
}

.signup input[type="email"] {
  flex: 1 1 15rem;
  font: inherit;
  padding: .75rem .9rem;
  border: 1px solid #3a4a6b;
  border-radius: .45rem;
  background: rgba(255, 255, 255, .06);
  color: var(--starlight);
}

.signup input[type="email"]::placeholder { color: var(--star-dim); }

.signup button {
  font-family: var(--display);
  font-weight: 700;
  font-size: 1rem;
  padding: .75rem 1.5rem;
  border: 0;
  border-radius: .45rem 1.1rem 1.1rem .45rem;
  background: var(--honey);
  color: #1c1508;
  cursor: pointer;
}

.signup .fine { font-size: .85rem; color: var(--star-dim); }

.dusk footer {
  border-top: 1px solid #2c3c5f;
  padding-top: 1.6rem;
  display: flex;
  flex-wrap: wrap;
  gap: .4rem 1.6rem;
  justify-content: space-between;
  font-size: .85rem;
  color: var(--star-dim);
}

.dusk footer a { color: var(--star-dim); }

.dusk.slim { margin-top: 3.5rem; padding-block: 2.6rem 2.4rem; }
.dusk.slim .col { gap: 1.8rem; }

/* --- inner pages (cards, terms, privacy) --------------------------------- */

.page-main {
  padding-block: 3rem 4rem;
  display: flex;
  flex-direction: column;
  gap: .9rem;
}

.page-main h1 {
  font-size: clamp(2rem, 7vw, 3rem);
  text-transform: lowercase;
}

.page-main h2 { font-size: 1.25rem; margin-top: 1rem; text-transform: lowercase; }
.page-main p { max-width: 40em; }
.page-main .muted, .fine { color: var(--soft); font-size: .9rem; }
.page-main .lede { font-size: 1.15rem; color: var(--soft); max-width: 32em; }

@media (prefers-reduced-motion: reduce) {
  * { transition: none !important; animation: none !important; }
}
