/* recesstoday.com
   The app's own palette (src/theme/colors.ts) and its voices: an italic
   serif for headlines (the app's Canela Italic, here Instrument Serif),
   a rounded sans for reading (Circular Std in the app; Figtree here, since
   Circular is licensed for the app bundle and not for a public site), and a
   monospace for labels. The site is dark on purpose: Recess is dark by
   default and the welcome screen never changes, so the site doesn't either. */

:root {
  --ink: #0A0C14;
  --surface: #131826;
  --soft: #232A3D;
  --line: rgba(255, 255, 255, 0.10);
  --line-strong: rgba(255, 255, 255, 0.32);
  --text: #F2F4FA;
  --text-2: #A9B0C4;
  --muted: #8891A9;
  --lime: #B9F466;
  --lime-bright: #C9FF72;
  --on-lime: #0F1A08;
  --friday: #8B8CF6;
  --amber: #FFEAA3;
  --red: #FF7A7A;
  --radius: 22px;
  color-scheme: dark;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  background: var(--ink);
  color: var(--text);
  font-family: "Figtree", "Circular Std", "Helvetica Neue", Arial, sans-serif;
  font-size: 17px;
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
}
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { animation: none !important; transition: none !important; }
}
a { color: inherit; }
img { max-width: 100%; height: auto; display: block; }
:focus-visible { outline: 2px solid var(--lime); outline-offset: 3px; border-radius: 6px; }
::selection { background: var(--lime); color: var(--on-lime); }

.grain {
  position: fixed; inset: 0; pointer-events: none; z-index: 50;
  opacity: 0.11; mix-blend-mode: soft-light;
}
.wrap { width: 100%; max-width: 1080px; margin-inline: auto; padding-inline: 24px; }

/* Type */
.display {
  font-family: "Instrument Serif", "Canela", Georgia, "Times New Roman", serif;
  font-style: italic; font-weight: 400; letter-spacing: -0.01em; line-height: 1.04;
  text-wrap: balance; margin: 0;
}
h1.display { font-size: clamp(42px, 6.4vw, 78px); }
h2.display { font-size: clamp(34px, 4.6vw, 54px); }
.display-sm { font-size: clamp(28px, 3.4vw, 36px); }
h3 { font-size: 20px; margin: 0; font-weight: 700; letter-spacing: -0.005em; }
.eyebrow {
  font-family: "IBM Plex Mono", "Menlo", monospace; font-size: 12px; letter-spacing: 0.14em;
  text-transform: uppercase; color: var(--lime); margin: 0;
}
.lede { font-size: clamp(18px, 2vw, 21px); color: var(--text-2); max-width: 34em; margin: 0; text-wrap: pretty; }
p { margin: 0; }
.body { color: var(--text-2); max-width: 36em; text-wrap: pretty; }
.mono { font-family: "IBM Plex Mono", "Menlo", monospace; letter-spacing: 0.04em; }

/* Nav */
.nav { display: flex; align-items: center; justify-content: space-between; padding-block: 22px; gap: 16px; }
.wordmark { height: 22px; width: auto; }
.nav-links { display: flex; align-items: center; gap: 22px; font-size: 15px; color: var(--text-2); }
.nav-links a { text-decoration: none; }
.nav-links a:hover, .nav-links a[aria-current="page"] { color: var(--text); }
.nav .btn { min-height: 40px; padding-inline: 16px; font-size: 14px; }

/* Buttons */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 10px;
  min-height: 50px; padding: 0 22px; border-radius: 999px; font-weight: 700; font-size: 16px;
  text-decoration: none; border: 1px solid transparent; transition: transform .15s ease; cursor: pointer;
  font-family: inherit;
}
.btn:hover { transform: translateY(-1px); }
.btn-lime { background: var(--lime); color: var(--on-lime); }
.btn-matte { background: var(--surface); color: var(--text); border-color: var(--line-strong); }
.btn svg { width: 18px; height: 18px; }
.store-row { display: flex; flex-wrap: wrap; gap: 12px; align-items: center; }
.store-note { color: var(--muted); font-size: 14px; }

/* Home: hero */
.hero { display: grid; grid-template-columns: 1.15fr 0.85fr; gap: 48px; align-items: center; padding-block: 40px 72px; }
.hero-words { display: grid; gap: 22px; }
.hero-card { display: flex; justify-content: center; padding: 12px 24px 28px; }

/* A hand-stacked pile of friends' cards. The poses are set here by order so
   the pile is right with no script at all; deck.js then moves data-pos
   around to flick the top card to the back. */
.deck { position: relative; width: min(380px, 100%); aspect-ratio: 880 / 1040; cursor: pointer; }
.deck-card {
  position: absolute; inset: 0; width: 100%; height: 100%;
  transition: transform .65s cubic-bezier(.2, .7, .2, 1), opacity .65s ease;
  will-change: transform;
}
.deck-card:nth-child(1), .deck-card[data-pos="0"] { transform: rotate(-2deg); z-index: 4; opacity: 1; }
.deck-card:nth-child(2), .deck-card[data-pos="1"] { transform: translate(16px, 10px) rotate(3deg) scale(.97); z-index: 3; opacity: 1; }
.deck-card:nth-child(3), .deck-card[data-pos="2"] { transform: translate(-18px, 18px) rotate(-5deg) scale(.94); z-index: 2; opacity: 1; }
.deck-card:nth-child(n+4), .deck-card[data-pos="3"] { transform: translate(22px, 26px) rotate(6deg) scale(.91); z-index: 1; opacity: 1; }
/* Once the script is driving, position comes from data-pos alone. */
.deck.is-live .deck-card[data-pos="0"] { transform: rotate(-2deg); z-index: 4; }
.deck.is-live .deck-card[data-pos="1"] { transform: translate(16px, 10px) rotate(3deg) scale(.97); z-index: 3; }
.deck.is-live .deck-card[data-pos="2"] { transform: translate(-18px, 18px) rotate(-5deg) scale(.94); z-index: 2; }
.deck.is-live .deck-card[data-pos="3"] { transform: translate(22px, 26px) rotate(6deg) scale(.91); z-index: 1; }
.deck.is-live .deck-card.leaving { transform: translate(115%, -6%) rotate(16deg); opacity: 0; z-index: 5; }
.deck-card.no-transition { transition: none; }

/* Home: sections */
section { padding-block: 64px; border-top: 1px solid var(--line); }
.split { display: grid; grid-template-columns: 1fr 1fr; gap: 56px; align-items: center; }
.split.flip > .words { order: 2; }
.words { display: grid; gap: 16px; }
.figure { display: flex; justify-content: center; }
.figure img { width: 100%; max-width: 520px; }
.figure.narrow img { max-width: 300px; }
.figure-note { color: var(--muted); font-size: 14px; margin-top: 12px; }

.two { display: grid; grid-template-columns: 1fr 1fr; gap: 40px; margin-top: 36px; }
/* align-content: start, or the two columns' rows stretch to share the taller
   one's height and the shorter paragraph drifts down from its heading. */
.two > div { display: grid; gap: 12px; align-content: start; padding-top: 22px; border-top: 1px solid var(--line-strong); }

/* A small picture above each kind of friend, both the same height so the
   headings stay level. Left: a few small moments, the "two weeks of small
   things". Right: a run of city postmarks ending in one Friday. */
.kind-art { height: 132px; display: flex; align-items: flex-end; margin-bottom: 10px; }
.moments figure {
  /* Five prints, sized off the viewport below ~480px so the pile fits a phone. */
  margin: 0 -14px 0 0; width: clamp(62px, 18vw, 92px); aspect-ratio: 260 / 320; border-radius: 12px; overflow: hidden; position: relative;
  transform: rotate(var(--r, 0deg)); box-shadow: 0 10px 22px rgba(0, 0, 0, .45); transition: transform .3s ease;
  flex: none;
}
.moments figure:nth-child(even) { z-index: 1; transform: translateY(-8px) rotate(var(--r, 0deg)); }
.moments img { width: 100%; height: 100%; object-fit: cover; }
.moments figcaption {
  /* Centred: the prints overlap at their edges, so a corner label gets covered. */
  position: absolute; left: 0; right: 0; text-align: center; bottom: 7px; font-family: "IBM Plex Mono", monospace; font-size: 10px;
  letter-spacing: .1em; text-transform: uppercase; color: var(--text); text-shadow: 0 1px 6px rgba(0, 0, 0, .7);
}
.two > div:hover .moments figure { transform: translateY(-4px) rotate(calc(var(--r, 0deg) * 1.4)); }
.two > div:hover .moments figure:nth-child(even) { transform: translateY(-14px) rotate(calc(var(--r, 0deg) * 1.4)); }

.stamps { align-items: center; }
.stamp {
  /* Sized off the viewport below ~460px so six stamps always fit a phone. */
  width: clamp(54px, 16vw, 78px); height: clamp(54px, 16vw, 78px); border-radius: 50%; border: 1px solid var(--line-strong); flex: none;
  display: grid; place-items: center; margin-right: -16px; transform: rotate(var(--r, 0deg));
  font-family: "IBM Plex Mono", monospace; font-size: 9px; letter-spacing: .08em; text-transform: uppercase;
  color: var(--muted); background: var(--ink); transition: transform .3s ease;
}
.stamp:nth-child(even) { transform: translateY(10px) rotate(var(--r, 0deg)); }
.stamp:nth-child(3n) { transform: translateY(-10px) rotate(var(--r, 0deg)); }
.stamp.friday {
  width: clamp(66px, 19vw, 92px); height: clamp(66px, 19vw, 92px); margin-left: 8px; border: 0; background: var(--lime); color: var(--on-lime);
  font-size: 11px; font-weight: 500; z-index: 1; transform: rotate(var(--r, 0deg));
  box-shadow: 0 10px 24px rgba(0, 0, 0, .4);
}
.two > div:hover .stamp.friday { transform: rotate(0deg) scale(1.06); }
.two h3 { font-family: "Instrument Serif", Georgia, serif; font-style: italic; font-weight: 400; font-size: 30px; letter-spacing: -0.01em; line-height: 1.1; text-wrap: balance; }

.close { text-align: center; display: grid; gap: 22px; justify-items: center; padding-block: 80px; }
.close .body { max-width: 30em; }
.close .display { max-width: 16em; }

/* Inner pages */
.page { padding-block: 24px 72px; display: grid; gap: 28px; }
.page-head { display: grid; gap: 14px; padding-block: 24px 8px; }
.prose { max-width: 68ch; display: grid; gap: 18px; color: var(--text-2); }
.prose h2 { color: var(--text); font-size: 22px; margin: 22px 0 0; letter-spacing: -0.005em; }
.prose h2.display { font-size: clamp(30px, 4vw, 44px); margin-top: 28px; }
.prose p { text-wrap: pretty; }
.prose strong { color: var(--text); font-weight: 700; }
.prose a { color: var(--text); }
.prose .address { white-space: pre-line; }
.prose .updated { color: var(--muted); font-family: "IBM Plex Mono", monospace; font-size: 13px; letter-spacing: .04em; }
.summary { background: var(--surface); border-radius: 16px; padding: 20px 22px; color: var(--text); max-width: 68ch; }

/* FAQ */
.faq-group { display: grid; gap: 24px; padding-block: 28px; border-top: 1px solid var(--line); }
.faq-group:first-of-type { border-top: 0; }
.qa { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.4fr); gap: 12px 40px; max-width: 900px; }
.qa h3 { font-size: 19px; }
.qa p { color: var(--text-2); text-wrap: pretty; }

/* Recess+ */
.plans { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; max-width: 720px; }
.plan { background: var(--surface); border-radius: var(--radius); padding: 26px; display: grid; gap: 8px; position: relative; }
.plan.best { outline: 1px solid var(--lime); }
.plan .tag { position: absolute; top: 18px; right: 18px; font-family: "IBM Plex Mono", monospace; font-size: 11px; letter-spacing: .12em; text-transform: uppercase; color: var(--on-lime); background: var(--lime); border-radius: 999px; padding: 5px 10px; }
.plan .name { color: var(--muted); font-size: 14px; }
.plan .price { font-family: "Instrument Serif", Georgia, serif; font-style: italic; font-size: 40px; line-height: 1; }
.plan .per { color: var(--text-2); font-size: 15px; }
.features { list-style: none; margin: 0; padding: 0; display: grid; gap: 12px; max-width: 520px; }
.features li { display: flex; gap: 14px; align-items: baseline; font-size: 18px; }
.features li::before { content: ""; width: 8px; height: 8px; border-radius: 50%; background: var(--lime); flex: none; position: relative; top: -2px; }
.fine { color: var(--muted); font-size: 14px; max-width: 48em; }

/* Support */
.support-links { display: grid; gap: 12px; max-width: 480px; }
.support-links a {
  display: flex; align-items: center; justify-content: space-between; gap: 16px;
  background: var(--surface); border-radius: 16px; padding: 18px 20px; text-decoration: none; font-weight: 500;
}
.support-links a span { color: var(--muted); font-weight: 400; font-size: 14px; }
.support-links a:hover { background: var(--soft); }

/* Footer */
footer { border-top: 1px solid var(--line); padding-block: 28px 48px; display: flex; flex-wrap: wrap; gap: 16px 28px; align-items: center; justify-content: space-between; color: var(--muted); font-size: 14px; }
footer nav { display: flex; flex-wrap: wrap; gap: 8px 20px; }
footer a { text-decoration: none; }
footer a:hover { color: var(--text); }
/* The maker's mark: Recess is one of Quirktastic's apps. */
footer .maker { margin-left: 10px; padding-left: 12px; border-left: 1px solid var(--line-strong); white-space: nowrap; }

@media (max-width: 860px) {
  .hero { grid-template-columns: 1fr; gap: 40px; padding-block: 24px 56px; }
  .hero-card { order: 2; }
  .split, .split.flip { grid-template-columns: 1fr; gap: 32px; }
  .split.flip > .words { order: 0; }
  .two { grid-template-columns: 1fr; gap: 28px; }
  .nav-links a:not(.btn) { display: none; }
  section { padding-block: 48px; }
  .qa { grid-template-columns: 1fr; gap: 8px; }
  .plans { grid-template-columns: 1fr; }
}
