/* Lapwing website: the app's "Archive" palette and type, one light theme only
   (the app has no dark mode, and neither does its website). Fonts are served
   from this site, never from Google: loading them from Google would send every
   visitor's IP address there. */

@font-face {
  font-family: 'Fraunces';
  font-weight: 600;
  font-style: normal;
  font-display: swap;
  src: url('/assets/fonts/Fraunces_600SemiBold.ttf') format('truetype');
}
@font-face {
  font-family: 'Work Sans';
  font-weight: 400;
  font-style: normal;
  font-display: swap;
  src: url('/assets/fonts/WorkSans_400Regular.ttf') format('truetype');
}
@font-face {
  font-family: 'Work Sans';
  font-weight: 500;
  font-style: normal;
  font-display: swap;
  src: url('/assets/fonts/WorkSans_500Medium.ttf') format('truetype');
}

:root {
  color-scheme: light;
  --paper: #EFEDE3;
  --ink: #20282B;
  --deep: #1B2E4A;
  --ochre: #A8863C;
  --teal: #2E6E68;
  --ink-muted: #59636A;
  --ink-faint: #8C949A;
  --paper-edge: #E2DFD1;
  --hairline: rgba(46, 110, 104, 0.26);
  --serif: 'Fraunces', Georgia, 'Times New Roman', serif;
  --sans: 'Work Sans', system-ui, -apple-system, 'Segoe UI', Roboto, sans-serif;
  --gutter: 20px;
}

* { box-sizing: border-box; }

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

body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font: 400 17px/1.6 var(--sans);
  overflow-wrap: break-word;
  hyphens: auto;
}

.wrap {
  max-width: 680px;
  margin: 0 auto;
  padding: 0 var(--gutter);
}

a { color: var(--deep); text-decoration-color: var(--ochre); text-underline-offset: 3px; text-decoration-thickness: 1px; }
a:hover { text-decoration-thickness: 2px; }
a:focus-visible { outline: 2px solid var(--ochre); outline-offset: 2px; }

/* --- header: wordmark on the left, language switch on the right ----------- */
.top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding-top: 24px;
  padding-bottom: 24px;
}
.top .home { display: block; flex-shrink: 1; min-width: 0; line-height: 0; }
.top .home img { height: 30px; width: auto; max-width: 100%; }
.langs { flex-shrink: 0; font-size: 0.9rem; letter-spacing: 0.06em; text-transform: uppercase; color: var(--ink-muted); }
.langs a, .langs strong { padding: 6px 2px; }
/* The language you are on carries the brass underline; the other one is a
   plain link, underlined only on hover (the user found the reverse backwards). */
.langs strong { color: var(--deep); font-weight: 400; text-decoration: underline; text-decoration-color: var(--ochre); text-decoration-thickness: 2px; text-underline-offset: 4px; }
.langs a { color: var(--ink-muted); text-decoration: none; }
.langs a:hover { color: var(--deep); text-decoration: underline; text-decoration-color: var(--ochre); }

/* --- type -------------------------------------------------------------- */
/* Headings break only between words: Safari hyphenated "Ja- pan" in the hero
   (smoke test 70.9). overflow-wrap still breaks a word that cannot fit at all. */
h1, h2, h3, h4 { font-family: var(--serif); font-weight: 600; color: var(--deep); margin: 0; hyphens: manual; -webkit-hyphens: manual; }
h1 { font-size: clamp(2.2rem, 8vw, 3.5rem); line-height: 1.08; letter-spacing: -0.01em; margin: 8px 0 20px; }
h2 { font-size: 1.45rem; line-height: 1.2; margin: 40px 0 10px; }
h3 { font-size: 1.2rem; line-height: 1.25; margin: 0 0 6px; }
p, li { margin: 0 0 12px; }
ul { padding-left: 20px; }

.kicker {
  font-size: 0.8rem;
  font-weight: 500;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--ochre);
  margin: 24px 0 0;
}
.lede { font-size: 1.2rem; line-height: 1.5; color: var(--ink); max-width: 34em; }
.meta { color: var(--ink-muted); font-size: 0.95rem; }

/* --- the four things the app does, numbered like the plan's days ------- */
.features { list-style: none; padding: 0; margin: 48px 0 0; border-top: 1px solid var(--hairline); }
.features li {
  display: grid;
  grid-template-columns: 3.2rem 1fr;
  gap: 4px 12px;
  padding: 24px 0;
  margin: 0;
  border-bottom: 1px solid var(--hairline);
}
.features .num { font-family: var(--serif); font-weight: 600; font-size: 2rem; line-height: 1; color: var(--ochre); }
.features p { margin: 0; }

/* --- a pull-quote style note, brass rule on the left, not boxed --------- */
.note { border-left: 2px solid var(--ochre); padding: 2px 0 2px 16px; margin: 40px 0; }
.note p:last-child { margin-bottom: 0; }
.label { font-size: 0.8rem; font-weight: 500; letter-spacing: 0.14em; text-transform: uppercase; color: var(--teal); margin: 0 0 6px; }

/* --- examples: Explore cards and a plan, drawn like the app draws them -- */
/* 40 px in all above "From the Explore tab", like the gaps between the other
   blocks (it was 64 + the kicker's own 24). */
.examples { margin-top: 40px; }
.examples > .kicker { margin-top: 0px; }
.examples > .meta { margin-top: 4px; }
.cards { margin-top: 20px; }
.card { padding: 24px 0; border-top: 1px solid var(--hairline); }
.card h3 { font-size: 1.35rem; }
.card .blurb { color: var(--ink-muted); margin: 4px 0 14px; }
.photo { display: block; width: 100%; height: auto; aspect-ratio: 1200 / 627; object-fit: cover; border-radius: 3px; background: var(--paper-edge); }
/* the first photo is the button: tapping it shows the other two, no script */
.card details > summary { position: relative; display: block; cursor: pointer; list-style: none; }
.card details > summary::-webkit-details-marker { display: none; }
.card details > summary:focus-visible { outline: 2px solid var(--ochre); outline-offset: 2px; }
.card details .photo + .photo { margin-top: 10px; }
.card details[open] .more { display: none; }
.more {
  position: absolute; right: 8px; bottom: 8px; padding: 3px 8px; border-radius: 3px;
  background: rgba(27, 46, 74, 0.78); color: var(--paper); font-size: 0.75rem; font-weight: 500;
}
.credit { font-size: 0.75rem; color: var(--ink-faint); margin: 6px 0 0; }
.credit a { color: var(--ink-faint); }
.card .summary { font-size: 0.95rem; color: var(--ink-muted); margin: 12px 0 0; }
.card .season { font-size: 0.9rem; color: var(--ink-faint); margin: 8px 0 0; }

.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }

/* the app's primary button: solid navy, uppercase tracked */
.card-action { margin: 16px 0 0; }
.button {
  display: block; text-align: center; padding: 14px 16px; border-radius: 3px;
  background: var(--deep); color: var(--paper); text-decoration: none;
  font-size: 0.85rem; font-weight: 500; letter-spacing: 0.12em; text-transform: uppercase;
}
.button:hover { background: #24395A; }

/* --- the example plan, laid out like the app's plan screen -------------- */
.plan-page .back { margin: 0 0 16px; font-size: 0.95rem; }
.plan-page .back a { color: var(--ink-muted); }
.hero { position: relative; margin: 0 0 16px; }
.hero .photo { aspect-ratio: 4 / 3; }
.hero figcaption {
  position: absolute; inset: auto 0 0 0; padding: 48px 20px 18px; border-radius: 0 0 3px 3px;
  background: linear-gradient(to bottom, rgba(27, 46, 74, 0), rgba(27, 46, 74, 0.82));
  color: var(--paper);
}
.hero-kicker { display: block; font-size: 0.8rem; font-weight: 500; letter-spacing: 0.14em; text-transform: uppercase; opacity: 0.9; }
.hero h1 { color: var(--paper); margin: 4px 0 0; font-size: clamp(2rem, 8vw, 3rem); hyphens: manual; -webkit-hyphens: manual; }
.plan-page .pull { margin: 24px 0 8px; padding: 2px 0 2px 16px; border-left: 2px solid var(--ochre); font-size: 1.1rem; line-height: 1.55; }
.leg { margin-top: 44px; }
.leg-days { margin: 0; font-size: 0.8rem; font-weight: 500; letter-spacing: 0.14em; text-transform: uppercase; color: var(--teal); }
.leg h2 { margin: 6px 0 8px; font-size: 1.6rem; }
.leg .overview { color: var(--ink-muted); }
.leg > .photo { margin-top: 14px; }
/* "Show daily plan": the app's outlined brass button, label and sign in a row */
details.days { margin-top: 18px; }
details.days > summary {
  display: flex; align-items: center; justify-content: space-between; gap: 12px; cursor: pointer; list-style: none;
  padding: 13px 16px; border: 1px solid var(--ochre); border-radius: 3px; color: var(--ochre);
  font-size: 0.85rem; font-weight: 500; letter-spacing: 0.12em; text-transform: uppercase;
}
details.days > summary::-webkit-details-marker { display: none; }
details.days > summary:focus-visible { outline: 2px solid var(--ochre); outline-offset: 2px; }
details.days > summary > .show, details.days > summary > .hide { flex-shrink: 1; min-width: 0; }
details.days > summary > .sign { flex-shrink: 0; font-size: 1.2rem; line-height: 1; }
details.days > summary > .sign::after { content: '+'; }
details.days > summary > .hide { display: none; }
details.days[open] > summary { background: rgba(168, 134, 60, 0.14); }
details.days[open] > summary > .show { display: none; }
details.days[open] > summary > .hide { display: inline; }
details.days[open] > summary > .sign::after { content: '\2013'; }
details.days ol { list-style: none; padding: 0; margin: 4px 0 0; }
.day { margin: 0; padding-top: 32px; }
.day-head { display: flex; align-items: baseline; gap: 10px; margin: 0; }
.day-head .num { font-family: var(--serif); font-weight: 600; font-size: 2.2rem; line-height: 1; color: var(--teal); }
.day-head .date { font-size: 0.85rem; color: var(--ink-faint); }
.day h3 { margin: 4px 0 6px; font-size: 1.2rem; }
.day p { margin: 0; color: var(--ink-muted); }
.day .photo { margin-top: 12px; }
.plan-page .closing { margin-top: 44px; padding-top: 20px; border-top: 1px solid var(--hairline); }
/* On a phone the photos run edge to edge, as in the app. */
@media (max-width: 719px) {
  .plan-page .photo { width: calc(100% + 2 * var(--gutter)); max-width: none; margin-left: calc(-1 * var(--gutter)); border-radius: 0; }
  .hero figcaption { left: calc(-1 * var(--gutter)); right: calc(-1 * var(--gutter)); border-radius: 0; padding-left: calc(20px + var(--gutter)); }
}

/* --- the legal pages read like a plain document ----------------------- */
.doc h1 { font-size: clamp(1.9rem, 6vw, 2.6rem); }
.doc h2 { font-size: 1.2rem; margin-top: 32px; }
.doc dl { margin: 0 0 12px; }
.doc dt { font-weight: 500; margin-top: 12px; }
.doc dd { margin: 0; }

/* --- footer ------------------------------------------------------------ */
.foot {
  margin-top: 64px;
  padding-bottom: 40px;
  font-size: 0.9rem;
  color: var(--ink-muted);
}
/* the rule sits inside the padding, so it is exactly as wide as the text */
.foot::before { content: ""; display: block; border-top: 1px solid var(--hairline); margin-bottom: 20px; }
.foot nav { display: flex; flex-wrap: wrap; gap: 8px 20px; margin-bottom: 12px; }
.foot p { margin: 0 0 6px; }
.foot a { color: var(--ink-muted); }
/* the page you are on stays in the list, marked like the language switch marks
   its language: darker and not underlined, still a link */
.foot a[aria-current="page"] { color: var(--deep); font-weight: 500; text-decoration: none; }

/* the plan page's photo credits: closed behind a small button, opened into a
   quiet box (smoke tests 70.6 and 71.2) */
details.credits { margin: 32px 0 0; font-size: 0.8rem; line-height: 1.5; color: var(--ink-muted); }
details.credits > summary {
  display: inline-flex; align-items: center; gap: 8px; cursor: pointer; list-style: none;
  padding: 6px 12px; border: 1px solid var(--hairline); border-radius: 3px;
  font-size: 0.75rem; font-weight: 500; letter-spacing: 0.12em; text-transform: uppercase; color: var(--ink-muted);
}
details.credits > summary::-webkit-details-marker { display: none; }
details.credits > summary::after { content: '+'; font-size: 1rem; line-height: 1; }
details.credits[open] > summary::after { content: '\2013'; }
details.credits > summary:focus-visible { outline: 2px solid var(--ochre); outline-offset: 2px; }
details.credits ul { list-style: none; padding: 14px 16px 0; margin: 10px 0 0; background: var(--paper-edge); border-radius: 3px 3px 0 0; columns: 2 14rem; column-gap: 24px; }
details.credits li { margin: 0 0 4px; break-inside: avoid; }
details.credits a { color: var(--ink-muted); }
details.credits p { margin: 0; padding: 4px 16px 14px; background: var(--paper-edge); border-radius: 0 0 3px 3px; }
