/* Colours are per section, from the app's palette, and the same in light and
   dark mode: each [data-theme] sets the page colour and the text on it. */
:root { --phone: #2E2B25; --cream: #F9F4ED; --honey: #E8A33D; }
/* Terracotta only clears 4.5:1 with full ink, so its body text is ink too. */
[data-theme="terra"]   { --page: #C67139; --ink: #201E1D; --muted: #201E1D; }
[data-theme="cream"]   { --page: #F5EAD8; --ink: #201E1D; --muted: #474238; }
[data-theme="sage"]    { --page: #8FA073; --ink: #201E1D; --muted: #272E1B; }
[data-theme="apricot"] { --page: #F6A06B; --ink: #201E1D; --muted: #402310; }
[data-theme="forest"]  { --page: #3D472B; --ink: #F5EAD8; --muted: #E1EECC; }

* { box-sizing: border-box; }
/* Author display rules (.signup is a grid) would otherwise beat [hidden]. */
[hidden] { display: none !important; }
html, body { margin: 0; }
html { scroll-behavior: smooth; }
body {
  background: var(--page); color: var(--ink); overflow-x: hidden;
  font: 400 18px/1.6 Figtree, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  transition: background-color .6s ease;
}
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  body { transition: none; }
}
a { color: var(--ink); }

/* The 3D phone (js/phone.js). Behind the copy, never in the way of a click. */
#stage {
  position: fixed; top: 0; left: 0; width: 100%; height: 100%;
  /* The tall viewport: a phone's URL bar sliding away doesn't resize it. */
  height: 100lvh;
  pointer-events: none; opacity: 0; transition: opacity .8s ease;
}
.has-3d #stage { opacity: 1; }

/* Navigation: a cream bar of hairline cells ending in a solid "Join" block. */
.top {
  position: fixed; inset: 0 0 auto; z-index: 2; height: 56px;
  display: flex; background: color-mix(in srgb, #F5EAD8 92%, transparent);
  backdrop-filter: blur(10px); border-bottom: 1px solid rgba(32, 30, 29, .18);
}
.cell {
  display: flex; align-items: center; justify-content: center; gap: 10px;
  padding: 0 22px; color: #201E1D; text-decoration: none;
  font: 600 15px/1 Figtree, "Segoe UI", Roboto, sans-serif;
  border-right: 1px solid rgba(32, 30, 29, .18);
}
.cell.brand { font: 400 24px/1 Caprasimo, Georgia, serif; margin-right: auto; border-left: 0; }
.cell.brand img { border-radius: 9px; }
.cell.link:hover { background: rgba(32, 30, 29, .06); }
.cell.join {
  border-right: 0; background: #C67139; color: #201E1D; padding: 0 28px;
  text-transform: uppercase; letter-spacing: .06em; font-size: 14px;
}
.cell.join:hover { background: #D67F48; }
.cell:focus-visible { outline: 3px solid #201E1D; outline-offset: -3px; }
/* Phones and tablets: the logo and Join only. */
@media (max-width: 1023px) { .cell.link { display: none; } }
@media (max-width: 599px) {
  .cell.brand { padding: 0 16px; }
  .cell.join { padding: 0 18px; white-space: nowrap; }
}

.button {
  display: inline-block; border: 0; cursor: pointer;
  background: var(--ink); color: var(--page); text-decoration: none;
  font: 600 18px/1 Figtree, "Segoe UI", Roboto, sans-serif;
  padding: 15px 24px; border-radius: 999px;
}
.button:disabled { opacity: .6; cursor: progress; }
.button:focus-visible, input:focus-visible, a:focus-visible {
  outline: 3px solid var(--ink); outline-offset: 3px;
}

main { position: relative; z-index: 1; }
section {
  min-height: 100svh; display: grid; align-items: center; gap: 32px;
  /* Full-bleed so each section is a colour band when the script can't run. */
  padding: 112px max(16px, calc((100% - 1160px) / 2)) 56px;
  background: var(--page); color: var(--ink);
}
@media (min-width: 700px) {
  section {
    grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
    padding-inline: max(32px, calc((100% - 1160px) / 2));
  }
}
/* With js/colours.js running, the body carries the colour and cross-fades it,
   and the sections let the 3D phone show through. */
.colour-js section { background: transparent; }
/* ...and their words take the page's colours too, not their own: a section
   coming onto the screen is drawn over the colour of the one going off it. */
.colour-js main [data-theme] { --page: inherit; --ink: inherit; --muted: inherit; }

.copy { max-width: 32rem; }
h1 { font: 400 clamp(44px, 6.2vw, 76px)/1.02 Caprasimo, Georgia, serif; margin: 0 0 22px; }
h2 { font: 400 clamp(34px, 5vw, 56px)/1.06 Caprasimo, Georgia, serif; margin: 0 0 16px; }
p { margin: 0 0 16px; color: var(--muted); }
.lede { font-size: 21px; }
.hint { font-size: 15px; margin: 10px 0 0; }
.pill {
  font: 700 13px/1 Figtree, "Segoe UI", Roboto, sans-serif;
  letter-spacing: .14em; text-transform: uppercase; color: var(--ink);
  display: inline-block; margin: 0 0 22px; padding: 8px 12px;
  border: 1.5px solid var(--ink); border-radius: 999px;
}

/* Each section's screen in a CSS phone: the whole story when there is no 3D. */
.still {
  margin: 0; justify-self: center; width: min(260px, 64vw);
  padding: 9px; background: var(--phone); border-radius: 38px;
  box-shadow: 0 24px 60px rgba(32, 30, 29, .28);
}
.still img { display: block; width: 100%; height: auto; border-radius: 30px; }
@media (min-width: 1024px) { .has-3d .still { visibility: hidden; } }

/* The form sits on a cream card whatever the section colour. */
#join .copy {
  --ink: #201E1D; --muted: #474238; --page: var(--cream);
  background: var(--cream); color: var(--ink);
  border-radius: 28px; padding: 32px 28px 20px;
  box-shadow: 0 24px 60px rgba(32, 30, 29, .22);
}

/* Under 1024px the 3D phone belongs to the hero alone and scrolls away with
   it. The visit below is flat: each stop as tall as its words, with its
   screen in a CSS phone (none where it would repeat one already shown). */
@media (max-width: 1023px) {
  :root { --stage: calc(56px + 42svh); --gutter: 16px; }
  #stage { position: absolute; height: var(--stage); }
  section { min-height: 0; padding: 64px var(--gutter) 72px; align-items: start; }
  .hero { min-height: 100svh; grid-template-columns: minmax(0, 1fr); padding-top: 88px; }
  /* No 3D: the CSS phone comes after the words, so they still lead. */
  .hero .still { order: 1; margin-top: 8px; }
  .has-3d .hero { padding-top: var(--stage); }
  .has-3d .hero .still { display: none; }
  .still.again { display: none; }
  /* Headline and Join first: they fit the first screen of a small phone. */
  .hero .copy { display: grid; grid-template-columns: auto 1fr; align-items: center; justify-items: start; column-gap: 8px; }
  .hero .copy > :not(.button, .next) { grid-column: 1 / -1; }
  .hero .pill { margin-bottom: 16px; }
  .hero h1 { font-size: clamp(40px, 10.5vw, 64px); margin-bottom: 20px; }
  .hero .lede { order: 1; margin: 22px 0 0; font-size: 19px; }
  .hero .button { white-space: nowrap; }
  .hero .next { margin: 0; padding: 14px 12px; white-space: nowrap; }
}
/* A phone on its side: a shallower 3D band and a one-line headline, so Join
   still makes the first screen. */
@media (max-width: 1023px) and (max-height: 500px) {
  :root { --stage: calc(56px + 30svh); }
  .hero { min-height: 0; }
  .hero h1 { font-size: min(clamp(40px, 10.5vw, 64px), 8svh); }
}
@media (min-width: 700px) and (max-width: 1023px) {
  :root { --gutter: 32px; }
  section { gap: 40px; }
  /* No screen beside it: the words take the width. */
  section:has(> .still.again) { grid-template-columns: minmax(0, 1fr); }
}

.signup { display: grid; gap: 8px; max-width: 26rem; margin-top: 8px; }
.signup label { font-weight: 600; margin-top: 8px; }
.signup input {
  font: inherit; color: #201E1D; background: #FFFFFF;
  border: 1.5px solid rgba(32, 30, 29, .25); border-radius: 14px; padding: 12px 14px;
}
.signup .hint { margin: 0 0 8px; }
.signup .button { justify-self: start; margin-top: 8px; background: #C67139; color: #201E1D; }
.trap { position: absolute; left: -10000px; width: 1px; height: 1px; overflow: hidden; }
.status { min-height: 1.6em; margin: 4px 0 0; color: #8C491A; font-weight: 600; }
.done { font-size: 20px; color: #201E1D; font-weight: 600; }

footer {
  position: relative; z-index: 1; text-align: center;
  padding: 32px 16px 48px; font-size: 15px; color: var(--muted);
  background: var(--page);
}
.colour-js footer { background: transparent; }
footer a { color: var(--ink); }

/* ---- One Saturday visit: each stop a time on the clock ---- */
/* A clock down the left of every stop, joined by a dotted path. */
section.stop { position: relative; }
section.stop::before {
  content: ""; position: absolute; top: 0; bottom: 0;
  left: calc(max(32px, (100% - 1160px) / 2) + 44px);
  border-left: 3px dotted color-mix(in srgb, var(--ink) 40%, transparent);
}
section.stop.first::before { top: 40%; }
.stop .copy { display: grid; grid-template-columns: 100px 1fr; gap: 0 26px; max-width: 40rem; position: relative; }
.stop time { font: 400 34px/1 Caprasimo, Georgia, serif; color: var(--ink); background: var(--page); padding: 10px 0; text-align: center; align-self: start; position: relative; z-index: 1; border-radius: 16px; }
.stop time.word { font-size: 25px; }
.stop time small { display: block; font: 600 13px/1.3 Figtree, sans-serif; color: var(--muted); margin-top: 6px; }
.stop h2 { font-size: clamp(32px, 4.2vw, 50px); }
.quote { font: italic 500 clamp(22px, 2.4vw, 28px)/1.45 Figtree, sans-serif; color: var(--ink); margin: 6px 0 0; }
.stop .said { font: italic 500 17px/1.5 Figtree, sans-serif; color: var(--ink); margin-bottom: 14px; }
/* Pieces of the app beside the words, on the app's own paper. */
.card { background: #F9F4ED; color: #201E1D; border-radius: 22px; padding: 16px 18px; box-shadow: 0 10px 30px rgba(46,43,37,.14); max-width: 26rem; margin-top: 8px; }
.card p, .card span { color: #645C50; }
/* The weather at the apiary, as the home screen shows it */
.wx .now { display: flex; align-items: center; gap: 12px; }
.wx .now b { font: 800 34px/1 Figtree, sans-serif; }
.wx .now strong { display: block; font: 700 17px/1.3 Figtree, sans-serif; }
.wx .now span { font-size: 14px; }
.wx ol { list-style: none; display: grid; grid-template-columns: repeat(7, 1fr); margin: 14px 0 0; padding: 0; text-align: center; font: 600 12.5px/1.3 Figtree, sans-serif; color: #645C50; }
.wx li i { display: flex; align-items: flex-end; width: 12px; height: 30px; margin: 6px auto; border-radius: 6px; background: rgba(32,30,29,.12); overflow: hidden; }
.wx li i::after { content: ""; width: 100%; height: var(--r); background: #4A7FA8; border-radius: 6px; }
.wx li:first-child { color: #201E1D; font-weight: 800; }
/* Apiaries on the map */
.sites { display: grid; gap: 10px; max-width: 26rem; margin-top: 8px; }
.site { display: grid; grid-template-columns: auto 1fr auto; gap: 14px; align-items: center; margin: 0; padding: 14px 18px; }
.site b { display: block; font: 700 17px/1.3 Figtree, sans-serif; }
.site span { font-size: 14px; }
.site em { font: 800 17px/1.2 Figtree, sans-serif; font-style: normal; text-align: right; }
.site em small { display: block; font: 600 13px Figtree, sans-serif; color: #645C50; }
.skep { width: 36px; height: 36px; border-radius: 50%; background: #C67139; display: grid; place-items: center; }
.skep svg { width: 22px; height: 22px; fill: #fff; }
/* Everything a record can hold, in the app's sections */
.sheet { display: grid; grid-template-columns: auto 1fr; gap: 12px 16px; margin: 0; }
.sheet dt { font: 800 15px/30px Figtree, sans-serif; }
.sheet dd { margin: 0; display: flex; flex-wrap: wrap; gap: 6px; }
.sheet dd > span { font: 600 14px/1 Figtree, sans-serif; color: #201E1D; background: #EBDDC5; border-radius: 999px; padding: 8px 12px; }
.sheet dd > .heard { background: #E8A33D; font-weight: 800; }
.card .alert { display: flex; gap: 10px; align-items: center; background: #FFE1D0; color: #643312; border-radius: 16px; padding: 10px 14px; margin: 0 0 14px; font: 700 15px/1.35 Figtree, sans-serif; }
.alert::before { content: "!"; flex: none; width: 22px; height: 22px; border-radius: 50%; background: #8C491A; color: #fff; display: grid; place-items: center; font-weight: 800; }
.stop .card.record { max-width: 32rem; }
/* What happens to your records */
.facts { list-style: none; padding: 6px 18px; max-width: 30rem; }
.facts li { display: grid; grid-template-columns: 26px 1fr; gap: 12px; padding: 12px 0; }
.facts li + li { border-top: 1px solid rgba(32,30,29,.12); }
.facts li::before { content: ""; width: 26px; height: 26px; border-radius: 50%; background: #56633F url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 26 26'%3E%3Cpath d='M8 13.5l3.5 3.5 6.5-7.5' fill='none' stroke='%23fff' stroke-width='2.4' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E"); }
.facts b { color: #201E1D; }
.facts a { color: #8C491A; }
.todo .tabs { display: flex; background: #DCD3C4; border-radius: 999px; padding: 4px; margin-bottom: 12px; font: 800 15px Figtree, sans-serif; }
.todo .tabs span { flex: 1; text-align: center; padding: 7px; border-radius: 999px; color: #645C50; }
.todo .tabs span:first-child { background: #F5EAD8; color: #201E1D; }
.stop .answer p { color: var(--muted); }
[data-theme="forest"] .hive button { background: #E8A33D; }
.hero .next { display: inline-block; margin-left: 18px; font-weight: 600; }
/* Narrow, the clock is a pill on a slim dotted rail down the left edge. */
@media (max-width: 1023px) {
  section.stop::before { left: calc(var(--gutter) + 10px); border-left-width: 2px; }
  section.stop.first::before { top: 76px; }
  .stop .copy { display: block; padding-left: 38px; }
  .stop time {
    display: inline-flex; align-items: baseline; gap: 10px; margin: 0 0 18px;
    padding: 7px 16px 8px; border-radius: 999px; text-align: left;
    font-size: 22px; background: var(--ink); color: var(--page);
  }
  .stop time.word { font-size: 20px; }
  .stop time small { display: inline; margin: 0; color: inherit; font-size: 14px; opacity: .85; }
  /* The stop on the rail: a dot ringed in the page colour. */
  .stop time::before {
    content: ""; position: absolute; left: -32px; top: 50%; translate: 0 -50%;
    width: 9px; height: 9px; border-radius: 50%;
    background: var(--ink); box-shadow: 0 0 0 4px var(--page);
  }
  .stop .card, .stop .sites, .stop .fields { max-width: 30rem; }
}
/* A phone, each stop's screen sits small beside the words under its heading.
   The copy's boxes step aside (display: contents) so its pieces and the
   phone share one grid. Without :has the screen stays under the words. */
@media (max-width: 699px) {
  .stop:has(.still:not(.again)) {
    grid-template-columns: minmax(0, 1fr) 40%; gap: 0 14px;
    padding-left: calc(var(--gutter) + 38px);
    & :is(.copy, .copy > div) { display: contents; }
    & :is(.copy > *, .copy > div > *) { grid-column: 1 / -1; }
    & .copy > div > :is(h2 ~ p) { grid-column: 1; }
    & time { justify-self: start; }
    & .still:not(.again) {
      grid-column: 2; grid-row: 3 / span 2; align-self: start;
      width: 100%; margin: 4px 0 16px; padding: 5px; border-radius: 22px;
      box-shadow: 0 12px 30px rgba(32, 30, 29, .25);
    }
    & .still img { border-radius: 18px; }
    & .quote { font-size: 20px; }
  }
}
/* The narrowest phones: a slimmer phone, so the words keep a few to a line,
   and smaller hero buttons, so both still fit side by side. */
@media (max-width: 359px) {
  .hero :is(.button, .next) { font-size: 16px; }
  .hero .button { padding: 14px 18px; }
  .hero .next { padding-inline: 8px; }
  .stop:has(.still:not(.again)) {
    grid-template-columns: minmax(0, 1fr) 34%; gap: 0 10px;
    & .copy > div > :is(h2 ~ p) { font-size: 16px; }
    & .quote { font-size: 17px; }
  }
}

/* The fields on the record fill in from what was said. */
.fields { display: grid; gap: 8px; }
.field { background: #EBDDC5; border-radius: 16px; padding: 10px 15px; box-shadow: 0 1px 3px rgba(46,43,37,.12); color: #201E1D; }
.field small { display: block; font: 800 11px/1.2 Figtree, sans-serif; letter-spacing: .1em; text-transform: uppercase; color: #645C50; }
.field b { display: block; font: 800 18px/1.3 Figtree, sans-serif; min-height: 23px; }
.field b:empty::after { content: ""; display: block; width: 55%; height: 11px; margin-top: 6px; border-radius: 6px; background: rgba(32,30,29,.12); }
.field.filled { animation: settle .6s ease; }
@keyframes settle { 0% { box-shadow: 0 0 0 4px #E8A33D; } 100% { box-shadow: 0 1px 3px rgba(46,43,37,.12); } }

/* Words appear one at a time, as if being said. */
.w { opacity: 0; transition: opacity .18s; }
.w.on { opacity: 1; }
.said mark { background: transparent; color: inherit; border-radius: 6px; padding: 0 2px; transition: background .4s; }
.said.lit mark { background: rgba(232,163,61,.5); }
.flyer { position: fixed; z-index: 30; pointer-events: none; font: 700 16px/1.3 Figtree, sans-serif; background: #E8A33D; color: #201E1D; padding: 2px 8px; border-radius: 8px; transition: transform .8s cubic-bezier(.5,0,.2,1), opacity .3s .7s; }

/* The fondant task ticks itself off. */
.task { display: flex; gap: 12px; align-items: flex-start; }
.task .tick { width: 32px; height: 32px; flex: none; margin-top: 2px; }
.task .tick circle { fill: none; stroke: #82796A; stroke-width: 2; transition: fill .3s .5s, stroke .3s .5s; }
.task .tick path { fill: none; stroke: #fff; stroke-width: 2.6; stroke-linecap: round; stroke-linejoin: round; stroke-dasharray: 20; stroke-dashoffset: 20; transition: stroke-dashoffset .4s .7s; }
.task b { font-weight: 700; background: linear-gradient(currentColor, currentColor) 0 55% / 0 2px no-repeat; transition: background-size .5s 1s, color .3s 1s; }
.task span { display: block; color: #645C50; font-size: 15px; }
.task.ticked .tick circle { fill: #56633F; stroke: #56633F; }
.task.ticked .tick path { stroke-dashoffset: 0; }
.task.ticked b { background-size: 100% 2px; color: #645C50; }

/* Questions as honeycomb: one per cell, the answer under the comb. */
.hive { --cell: 140px; display: grid; grid-template-columns: repeat(3, var(--cell)); padding-bottom: calc(var(--cell) * .45); }
.hive button { width: var(--cell); height: calc(var(--cell) * .866); margin-left: calc(var(--cell) * -.12); border: 0; cursor: pointer; padding: 0 20px; clip-path: polygon(25% 0, 75% 0, 100% 50%, 75% 100%, 25% 100%, 0 50%); background: #E8A33D; color: #201E1D; font: 700 14.5px/1.25 Figtree, sans-serif; transition: background .2s; }
.hive button:nth-child(3n+1) { margin-left: 0; }
.hive button:nth-child(3n+2) { transform: translateY(50%); }
.hive button[aria-expanded="true"] { background: #201E1D; color: #F5EAD8; }
.hive button:focus-visible { outline: none; background: #8C491A; color: #fff; }
.answer { min-height: 7em; }
/* The questions as a plain list, until js/visit.js makes the comb. */
.faq dt { font-weight: 700; color: var(--ink); }
.faq dd { margin: 0 0 14px; color: var(--muted); }
.answer h3 { font: 700 21px/1.3 Figtree, sans-serif; margin: 0 0 6px; }
/* Narrow, the questions open in place instead (js/visit.js). */
.qa { border-top: 1px solid color-mix(in srgb, var(--ink) 30%, transparent); max-width: 34rem; }
.qa details { border-bottom: 1px solid color-mix(in srgb, var(--ink) 30%, transparent); }
.qa summary {
  display: flex; justify-content: space-between; align-items: center; gap: 16px;
  min-height: 56px; padding: 12px 0; cursor: pointer; list-style: none;
  font: 700 18px/1.35 Figtree, sans-serif; color: var(--ink);
}
.qa summary::-webkit-details-marker { display: none; }
.qa summary::after { content: "+"; flex: none; font: 400 30px/1 Figtree, sans-serif; transition: rotate .2s; }
.qa details[open] summary::after { rotate: 45deg; }
.qa summary:focus-visible { outline: 3px solid var(--ink); outline-offset: 2px; }
.qa p { margin: -2px 0 18px; }


@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { transition: none !important; animation: none !important; }
  .w { opacity: 1; }
}
