:root {
  /* Reclaim Your Time logo + site */
  --ryt-red: #c8202f;
  --ryt-navy: #2b3a92;
  --ryt-blue: #1474af;
  --ryt-sky: #8db4de;
  --ryt-mist: #ebebef;
  /* flyer */
  --lime: #4dff1f;
  --lime-ink: #1f9e00;
  --flyer-red: #ff1a1a;
  --ink: #111;
  --paper: #fff;

  --display: "Comic Neue", "Comic Sans MS", "Chalkboard SE", cursive;
  --body: "Libre Franklin", system-ui, sans-serif;
  --label: "Archivo Narrow", "Arial Narrow", sans-serif;
  --hand: "Caveat", "Bradley Hand", cursive;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font: 400 17px/1.55 var(--body);
  overflow-x: hidden;
}
img { max-width: 100%; display: block; }
a { color: var(--ryt-blue); }
.wrap { width: min(1120px, 100% - 32px); margin-inline: auto; }
.section { padding: 56px 0 8px; }
.spark { display: inline-block; animation: twinkle 2.4s ease-in-out infinite; }
@keyframes twinkle { 50% { transform: scale(1.25) rotate(15deg); opacity: .7; } }

/* ---------- ticker ---------- */
.ticker { background: var(--lime); border-bottom: 3px solid var(--ink); overflow: hidden; white-space: nowrap; font: 700 15px/1 var(--display); }
.ticker__track { display: inline-flex; animation: scroll 40s linear infinite; padding: 8px 0; }
@keyframes scroll { to { transform: translateX(-50%); } }

/* ---------- top bar ---------- */
.topbar { display: flex; align-items: center; justify-content: space-between; gap: 16px; padding: 10px 16px; border-bottom: 1px solid var(--ryt-mist); }
.brand { display: flex; align-items: center; gap: 10px; text-decoration: none; color: var(--ryt-navy); font: 700 15px/1.1 var(--label); text-transform: uppercase; letter-spacing: .04em; }
.brand em { color: var(--ryt-red); font-style: normal; }
.topnav { display: flex; gap: 18px; font: 700 16px var(--display); }
.topnav a { color: var(--ink); text-decoration: none; }
.topnav a:hover { color: var(--ryt-red); text-decoration: underline wavy var(--lime-ink); }
@media (max-width: 640px) { .topnav { display: none; } }

/* ---------- hero ---------- */
.hero { position: relative; padding: 28px 0 24px; }
.hero__head { display: flex; align-items: center; gap: clamp(8px, 2vw, 28px); }
.hero__title { margin: 0; font: 700 clamp(32px, 9.4vw, 128px)/1 var(--display); letter-spacing: -.02em; white-space: nowrap; }
.hero__stamp {
  flex: 0 0 auto;
  font: 700 clamp(11px, 2vw, 24px)/1 var(--display); text-transform: uppercase; text-align: center; letter-spacing: 0; white-space: nowrap;
  color: var(--flyer-red); border: clamp(2px, .3vw, 4px) solid var(--flyer-red); border-radius: 10px; padding: .45em .6em;
  transform: rotate(12deg); opacity: .9;
}
.hero__grass {
  position: relative; display: inline-flex; align-items: flex-end;
  width: 150px; height: 64px; padding: 8px 12px;
  background: linear-gradient(180deg, #a9e34b 0%, #4c9a1b 45%, #1f5a0c 100%);
  border-radius: 4px; box-shadow: inset 0 14px 0 -6px #c7f26f;
  transform: rotate(-3deg);
}
.hero__grass::before {
  content: ""; position: absolute; inset: -10px 0 auto; height: 20px;
  background: repeating-linear-gradient(100deg, transparent 0 5px, #6dbb2a 5px 7px, transparent 7px 12px);
  -webkit-mask: linear-gradient(transparent, #000); mask: linear-gradient(transparent, #000);
}
.hero__grass span { color: #fff; font: 700 17px/1 var(--display); text-shadow: 0 2px 4px rgba(0,0,0,.4); }
.hero__cta { display: flex; align-items: center; flex-wrap: wrap; gap: 34px 24px; }
.hero__when { margin: 26px 0 6px; font: 800 clamp(22px, 3.4vw, 40px)/1.15 var(--body); }
.hero__when b { font-weight: 800; }
.hero__thanks { margin: 0 0 18px; font: 500 clamp(24px, 3.4vw, 36px)/1.2 var(--hand); color: #333; max-width: 46ch; }
.hero__tags { list-style: none; padding: 0; margin: 0 0 22px; display: flex; flex-wrap: wrap; align-items: center; gap: 6px 22px; font: 700 clamp(22px, 3vw, 34px)/1.2 var(--display); }
.hero__tags .g { color: var(--lime); -webkit-text-stroke: 1.5px var(--lime-ink); }
.hero__tags .r { color: var(--flyer-red); }
.hero__tags .rainbow { font-size: 1.3em; line-height: 1; }
.scroll-cue { display: inline-block; font: 700 18px var(--display); color: var(--ink); text-decoration: none; background: var(--lime); border: 2px solid var(--ink); padding: 8px 16px; border-radius: 999px; box-shadow: 3px 3px 0 var(--ink); }
.scroll-cue:hover { transform: translate(-1px, -1px); box-shadow: 4px 4px 0 var(--ink); }

/* ---------- section titles ---------- */
.section__title { margin: 0 0 4px; font: 700 clamp(34px, 5vw, 56px)/1 var(--display); }
.section__title .hl { background: linear-gradient(transparent 58%, var(--lime) 58%); padding: 0 4px; }
.section__sub { margin: 0 0 22px; font: 500 24px/1.2 var(--hand); color: #555; }

/* ---------- polaroid wall ---------- */
.polaroid-wall {
  margin-bottom: 40px;
  display: grid; grid-template-columns: repeat(auto-fill, minmax(210px, 1fr));
  gap: 34px 26px; padding: 26px 10px 10px;
  background: radial-gradient(var(--ryt-mist) 1.5px, transparent 1.5px) 0 0 / 22px 22px;
  border-radius: 14px;
}
.polaroid {
  position: relative; border: 0; padding: 0; background: none; cursor: zoom-in;
  transform: rotate(var(--tilt, 0deg)); transition: transform .2s ease, z-index 0s;
  filter: drop-shadow(0 6px 10px rgba(0,0,0,.18));
}
.polaroid:hover, .polaroid:focus-visible { transform: rotate(0) scale(1.06); z-index: 2; outline: none; }
.polaroid:focus-visible { filter: drop-shadow(0 0 0 3px var(--ryt-blue)); }
.polaroid img { width: 100%; height: auto; background: #fff; border-radius: 4% / 2.5%; }
.polaroid::before { /* tape */
  content: ""; position: absolute; top: -12px; left: 50%; width: 70px; height: 24px;
  transform: translateX(-50%) rotate(-4deg);
  background: rgba(255, 245, 160, .75); border: 1px solid rgba(0,0,0,.05); z-index: 1;
}
.polaroid:nth-child(3n)::before { background: rgba(141, 180, 222, .7); transform: translateX(-50%) rotate(5deg); }
.polaroid:nth-child(4n)::before { background: rgba(77, 255, 31, .45); }
/* placeholder polaroid frame */
.ph-polaroid { background: #fbfbf8; padding: 10px 10px 46px; }
.ph-polaroid .ph { aspect-ratio: 1; }
.ph-polaroid figcaption { position: absolute; left: 0; right: 0; bottom: 10px; font: 600 22px/1 var(--hand); color: #333; text-align: center; }

/* ---------- digital gallery ---------- */
.gallery { display: grid; grid-template-columns: repeat(auto-fill, minmax(170px, 1fr)); gap: 10px; }
.tile {
  position: relative; border: 3px solid var(--ink); padding: 0; background: var(--ryt-mist);
  aspect-ratio: 1; overflow: hidden; cursor: zoom-in; border-radius: 4px;
  box-shadow: 4px 4px 0 var(--ryt-sky);
  transition: transform .15s ease, box-shadow .15s ease;
  animation: pop .35s ease both;
}
.tile:nth-child(5n+2) { box-shadow: 4px 4px 0 var(--lime); }
.tile:nth-child(5n+4) { box-shadow: 4px 4px 0 #ffb3b8; }
.tile:hover, .tile:focus-visible { transform: translate(-2px, -2px) rotate(-1deg); box-shadow: 7px 7px 0 var(--ryt-blue); outline: none; }
.tile img, .tile .ph { width: 100%; height: 100%; object-fit: cover; }
@keyframes pop { from { opacity: 0; transform: scale(.92); } }
.more-wrap { text-align: center; margin: 28px 0 0; }
.btn-more {
  font: 700 22px var(--display); padding: 12px 28px; cursor: pointer;
  background: var(--paper); color: var(--ink); border: 3px solid var(--ink); border-radius: 999px;
  box-shadow: 4px 4px 0 var(--ink);
}
.btn-more:hover { background: var(--lime); }
.btn-more[hidden] { display: none; }

/* placeholder art */
.ph { display: grid; place-items: center; text-align: center; width: 100%; color: #fff; font: 700 15px/1.2 var(--display); text-shadow: 0 1px 2px rgba(0,0,0,.35); }
.ph b { display: block; font-size: 42px; line-height: 1.1; text-shadow: none; }

/* ---------- MySpace-ish modules ---------- */
.module { border: 2px solid var(--ryt-navy); border-radius: 6px; overflow: hidden; background: var(--paper); margin-bottom: 28px; }
.module__bar { background: var(--ryt-blue); color: #fff; font: 700 17px/1 var(--label); text-transform: uppercase; letter-spacing: .05em; padding: 11px 16px; }
.module__bar small { text-transform: none; opacity: .85; font-weight: 600; }
.module__bar--lime { background: var(--lime); color: var(--ink); }
.module__body { padding: 24px; }
.module--feature { border-width: 3px; box-shadow: 8px 8px 0 var(--ryt-sky); }
.module--partner { border-color: var(--ink); }

.app { display: grid; grid-template-columns: 1fr auto; gap: 32px; align-items: center; }
.app__logo { width: 96px; height: 96px; float: right; margin: 0 0 8px 16px; }
.app h2 { margin: 0 0 10px; font: 700 clamp(28px, 4vw, 42px)/1.05 var(--display); color: var(--ryt-navy); }
.lede { font-size: 18px; margin: 0 0 14px; }
.checks { list-style: none; padding: 0; margin: 0 0 22px; }
.checks li { padding-left: 30px; position: relative; margin: 6px 0; }
.checks li::before { content: "✓"; position: absolute; left: 0; top: -1px; width: 22px; height: 22px; display: grid; place-items: center; font-weight: 800; color: var(--ink); background: var(--lime); border-radius: 50%; font-size: 14px; }
.app__cta { display: flex; align-items: center; gap: 14px; flex-wrap: wrap; }
.appstore {
  display: inline-flex; align-items: center; gap: 10px; background: #000; color: #fff; text-decoration: none;
  padding: 9px 20px 9px 16px; border-radius: 12px; border: 1px solid #a6a6a6;
}
.appstore svg { width: 26px; height: 30px; }
.appstore span { display: flex; flex-direction: column; font: 600 24px/1 -apple-system, "SF Pro Display", "Helvetica Neue", Arial, sans-serif; letter-spacing: -.01em; }
.appstore small { font-size: 12px; font-weight: 500; letter-spacing: 0; margin-bottom: 2px; }
.appstore:hover { background: #222; }
.ios-note { font: 600 22px var(--hand); color: #555; }

.app__qr { display: none; }
.qr-card { background: #fff; border: 3px solid var(--ink); border-radius: 12px; padding: 16px; text-align: center; box-shadow: 5px 5px 0 var(--lime); transform: rotate(2deg); }
.qr-card #qr { width: 180px; height: 180px; margin: 0 auto; }
.qr-card #qr img, .qr-card #qr canvas { width: 180px !important; height: 180px !important; }
.qr-card p { margin: 10px 0 0; font: 700 17px/1.2 var(--display); }
.qr-card p span { font-weight: 400; font-size: 14px; color: #555; }

/* desktop/laptop: show QR code */
@media (hover: hover) and (pointer: fine) and (min-width: 820px) {
  .app__qr { display: block; }
}
@media (max-width: 819px) {
  .app { grid-template-columns: 1fr; }
}

/* ---------- Top 8 ---------- */
.friends__intro { margin: 0 0 16px; font: 700 15px var(--label); text-transform: uppercase; letter-spacing: .05em; color: var(--ryt-navy); }
.top8 { display: grid; grid-template-columns: repeat(2, 1fr); gap: 20px 16px; }
@media (min-width: 520px) { .top8 { grid-template-columns: repeat(4, 1fr); } }
@media (min-width: 1000px) { .top8 { grid-template-columns: repeat(8, 1fr); } }
.friend { display: flex; flex-direction: column; text-decoration: none; color: var(--ryt-blue); font: 700 15px/1.2 var(--body); }
.friend__pic { aspect-ratio: 1; border: 2px solid var(--ryt-sky); background: #fff; display: grid; place-items: center; overflow: hidden; margin-bottom: 8px; padding: 14%; transition: border-color .15s, transform .15s; }
.friend__pic img { width: 100%; height: 100%; object-fit: contain; }
.friend__pic--cover { padding: 0; }
.friend__pic--cover img { object-fit: cover; }
.friend__pic { container-type: inline-size; }
.friend__pic:has(.friend__wordmark) { padding: 5%; }
.friend__wordmark { font: 400 14px/1.15 "Marcellus", Georgia, serif; font-size: 14.5cqi; letter-spacing: .12em; padding-left: .12em; text-align: center; color: #3d3a36; }
.friend__emoji { font-size: clamp(60px, 6vw, 76px); line-height: 1; }
.friend small.friend__handle { color: var(--ryt-blue); font-weight: 600; }
.friend__name { text-decoration: underline; text-underline-offset: 3px; }
.friend small { display: block; color: #555; font-weight: 400; font-size: 13px; margin-top: 2px; }
.friend__cta { display: inline-block; align-self: flex-start; margin-top: 8px; font: 700 14px var(--display); color: var(--ink); background: var(--lime); border: 2px solid var(--ink); border-radius: 999px; padding: 4px 10px; white-space: nowrap; }
.friend:hover .friend__pic { border-color: var(--ryt-red); transform: rotate(-1.5deg); }

/* ---------- signup ---------- */
.signup {
  position: relative; background: var(--ryt-mist); border: 3px solid var(--ink); border-radius: 18px;
  padding: 36px clamp(20px, 5vw, 56px); margin-bottom: 56px;
}
.signup h2 { margin: 0 0 6px; font: 700 clamp(34px, 5vw, 54px)/1 var(--display); }
.signup > p { margin: 0 0 20px; max-width: 52ch; }
.form { display: grid; grid-template-columns: repeat(auto-fit, minmax(210px, 1fr)); gap: 14px 18px; align-items: end; }
.form label { display: flex; flex-direction: column; gap: 6px; font: 700 15px var(--label); text-transform: uppercase; letter-spacing: .04em; }
.form label small { text-transform: none; letter-spacing: 0; font-weight: 600; color: #666; }
.form input[type=text], .form input[type=email] {
  font: 400 17px var(--body); padding: 12px 14px; border: 2px solid var(--ink); border-radius: 8px; background: #fff;
}
.form input:focus { outline: 3px solid var(--ryt-sky); outline-offset: 1px; }
.form .check { flex-direction: row; align-items: center; gap: 10px; text-transform: none; font: 600 16px var(--body); letter-spacing: 0; grid-column: 1 / -1; }
.form .check input { width: 20px; height: 20px; accent-color: var(--ryt-blue); }
.form button {
  grid-column: 1 / -1; justify-self: start; cursor: pointer;
  font: 700 22px var(--display); padding: 12px 30px; color: #fff; background: var(--ryt-red);
  border: 3px solid var(--ink); border-radius: 999px; box-shadow: 4px 4px 0 var(--ink);
}
.form button:hover { background: #a5141f; }
.form button:disabled { opacity: .6; cursor: wait; }
.form__msg { grid-column: 1 / -1; margin: 0; font: 700 18px var(--display); min-height: 1em; }
.hp { position: absolute; left: -9999px; }

/* ---------- footer ---------- */
.footer { display: flex; align-items: center; justify-content: center; gap: 12px; padding: 22px 16px 34px; border-top: 1px solid var(--ryt-mist); font-size: 14px; color: #555; text-align: left; }
.footer p { margin: 0; }

/* ---------- lightbox ---------- */
.lightbox {
  position: fixed; inset: 0; z-index: 100; display: grid; grid-template-columns: 64px 1fr 64px; align-items: center;
  background: rgba(10, 14, 40, .92); padding: 20px 8px;
  animation: fade .2s ease;
}
.lightbox[hidden] { display: none; }
@keyframes fade { from { opacity: 0; } }
.lb-figure { margin: 0; display: flex; flex-direction: column; align-items: center; gap: 12px; min-width: 0; }
.lb-img { display: grid; place-items: center; }
.lb-img img { max-width: 100%; max-height: calc(100vh - 110px); max-height: calc(100dvh - 110px); object-fit: contain; border-radius: 4px; box-shadow: 0 10px 40px rgba(0,0,0,.5); animation: pop .25s ease; }
.lb-img img.is-polaroid { border-radius: 14px; }
.lb-img .ph { width: min(80vw, 70vh); aspect-ratio: 1; border-radius: 4px; font-size: 22px; }
.lb-img .ph b { font-size: 80px; }
.lb-figure figcaption { color: #fff; font: 700 16px var(--display); }
.lb-nav, .lb-close {
  background: var(--lime); color: var(--ink); border: 2px solid var(--ink); cursor: pointer; border-radius: 50%;
  width: 52px; height: 52px; font: 700 34px/1 var(--display); display: grid; place-items: center; justify-self: center;
}
.lb-nav:hover, .lb-close:hover { background: #fff; }
.lb-close { position: absolute; top: 14px; right: 14px; font-size: 30px; width: 46px; height: 46px; z-index: 2; }
@media (max-width: 640px) {
  .lightbox { grid-template-columns: 1fr; padding: 64px 8px calc(96px + env(safe-area-inset-bottom)); }
  .lb-nav { position: absolute; bottom: calc(18px + env(safe-area-inset-bottom)); }
  .lb-prev { left: 20px; }
  .lb-next { right: 20px; }
  .lb-img img { max-height: calc(100dvh - 180px - env(safe-area-inset-bottom)); }
  .lb-figure figcaption { position: absolute; left: 90px; right: 90px; bottom: calc(32px + env(safe-area-inset-bottom)); text-align: center; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; }
  html { scroll-behavior: auto; }
}
.nw { white-space: nowrap; }
.friend__pic img[src$="kl-logo.svg"] { width: 70%; height: 70%; }
