/* Memory Tickets — memorytickets.app
   The sage theme of the App Store screenshots (compose_v2.py: SAGE #8FDFB8 on the app's
   #0a0b10, warming to a deep teal), so the site and the store listing read as one product.
   One light "paper" band per page keeps the dark theme from turning gloomy. */

:root {
  --bg: #0a0b10;
  --bg-teal: #13201f;
  --bg-raised: #111719;
  --text: #ecedf0;
  --muted-1: #a2a7b4;
  --muted-2: #7c8190;
  --hairline: #1f2628;
  --border: #33403e;
  --accent: #8fdfb8;
  --accent-strong: #6cc79c;
  --accent-deep: #1c3a31;
  --glow: rgba(143, 223, 184, 0.14);

  --paper: #efe9dc;
  --paper-2: #e6ddca;
  --paper-text: #26282c;
  --paper-muted: #5f5a4f;
  /* Small mono text on --paper needs 4.5:1 (WCAG AA); the lighter #2e7a58 gave 4.29:1.
     This one is 5.34:1 on --paper and 4.79:1 on --paper-2. */
  --paper-accent: #266a4c;

  --sans: -apple-system, BlinkMacSystemFont, "SF Pro Display", "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  --mono: ui-monospace, "SF Mono", SFMono-Regular, Menlo, Consolas, monospace;

  --wrap: 1160px;
  --gutter: 16px;
  color-scheme: dark;
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: var(--sans);
  font-size: 17px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

/* The widths images get below are repeated in the pages' `sizes` attributes (build.py,
   pages/body-*.html), which decide how large a file a phone downloads: change both together. */
img { max-width: 100%; height: auto; display: block; }
a { color: var(--accent); text-decoration: none; }
a:hover { text-decoration: underline; text-underline-offset: 3px; }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; border-radius: 4px; }

.wrap { max-width: var(--wrap); margin: 0 auto; padding: 0 var(--gutter); }
@media (min-width: 720px) { :root { --gutter: 32px; } }

/* ---------- header ---------- */

.site-header { position: relative; z-index: 5; border-bottom: 1px solid var(--hairline); background: rgba(10, 11, 16, 0.7); backdrop-filter: blur(12px); }
.site-header .wrap { display: flex; align-items: center; justify-content: space-between; height: 64px; }
.brand { display: flex; align-items: center; gap: 10px; color: var(--text); font-weight: 600; letter-spacing: -0.01em; }
.brand:hover { text-decoration: none; }
.brand img { width: 32px; height: 32px; border-radius: 8px; }
.nav { display: flex; align-items: center; gap: 20px; }
.nav > a { color: var(--muted-1); font-size: 15px; }
.nav > a:hover { color: var(--text); text-decoration: none; }
.lang { font-family: var(--mono); font-size: 13px; letter-spacing: 0.12em; }
.lang a { color: var(--muted-2); padding: 6px 6px; }
.lang a[aria-current="true"] { color: var(--accent); }

/* ---------- type ---------- */

.eyebrow { font-family: var(--mono); font-size: 12px; letter-spacing: 0.22em; text-transform: uppercase; color: var(--accent); margin: 0 0 16px; }
h1, h2, h3 { font-weight: 600; letter-spacing: -0.025em; line-height: 1.08; margin: 0; }
h1 { font-size: clamp(40px, 6.6vw, 70px); }
h2 { font-size: clamp(32px, 4.8vw, 50px); }
h3 { font-size: 20px; letter-spacing: -0.01em; line-height: 1.3; }
.soft { color: var(--muted-2); }
.lead { font-size: clamp(18px, 2.1vw, 21px); color: var(--muted-1); max-width: 33em; margin: 24px 0 0; }

section { position: relative; padding: 88px 0; }
@media (min-width: 900px) { section { padding: 120px 0; } }

/* The store screenshots' ground: near-black at the top, deep teal at the bottom. */
.teal { background: linear-gradient(180deg, var(--bg) 0%, var(--bg-teal) 100%); }
.teal-up { background: linear-gradient(0deg, var(--bg) 0%, var(--bg-teal) 100%); }

/* ---------- hero ---------- */

.hero { padding: 48px 0 88px; overflow: hidden; background:
  radial-gradient(60% 70% at 80% 30%, rgba(143, 223, 184, 0.16), transparent 70%),
  linear-gradient(180deg, var(--bg) 0%, var(--bg-teal) 100%); }
.hero .wrap { display: grid; gap: 40px; align-items: center; }
@media (min-width: 960px) { .hero { padding: 72px 0 120px; } .hero .wrap { grid-template-columns: 1fr 1.05fr; gap: 56px; } }

.cta { display: flex; flex-wrap: wrap; align-items: center; gap: 16px 24px; margin-top: 36px; }
.cta .badge img { height: 54px; width: auto; }
.soon { font-family: var(--mono); font-size: 12px; letter-spacing: 0.14em; text-transform: uppercase; color: var(--muted-2); }
.facts { display: flex; flex-wrap: wrap; gap: 8px 20px; margin: 28px 0 0; padding: 0; list-style: none; font-size: 14px; color: var(--muted-1); }
.facts li::before { content: "✓"; color: var(--accent); margin-right: 8px; }

/* The camera roll: a tilted wall of photos that fades out, with the one ticket on top. */
.roll-scene { position: relative; height: 460px; }
@media (min-width: 560px) { .roll-scene { height: 560px; } }
.roll {
  position: absolute; inset: -12% -30% -12% -10%;
  display: grid; grid-template-columns: repeat(5, 1fr); gap: 10px;
  transform: rotate(-11deg);
  -webkit-mask-image: radial-gradient(70% 70% at 50% 50%, #000 45%, transparent 85%);
          mask-image: radial-gradient(70% 70% at 50% 50%, #000 45%, transparent 85%);
  opacity: 0.9;
}
.roll img { width: 100%; aspect-ratio: 1; object-fit: cover; border-radius: 10px; }
.roll-ticket { position: absolute; top: 50%; left: 50%; width: 46%; max-width: 250px; transform: translate(-50%, -50%) rotate(4deg); filter: drop-shadow(0 30px 50px rgba(0, 0, 0, 0.6)); z-index: 1; }

/* ---------- paper band ---------- */

.paper { background: var(--paper); color: var(--paper-text); }
.paper .eyebrow { color: var(--paper-accent); }
.paper .soft { color: var(--paper-muted); }
.paper a { color: var(--paper-accent); }

.story .wrap { display: grid; gap: 48px; align-items: center; }
@media (min-width: 900px) { .story .wrap { grid-template-columns: 1.15fr 1fr; gap: 72px; } }
.story p:not(.eyebrow) { font-size: clamp(18px, 2.1vw, 21px); line-height: 1.6; color: var(--paper-muted); margin: 24px 0 0; }
.story p:not(.eyebrow) strong { color: var(--paper-text); font-weight: 600; }

.fan { position: relative; height: 420px; max-width: 480px; width: 100%; margin: 0 auto; }
.fan img { position: absolute; width: 42%; top: 50%; left: 50%; filter: drop-shadow(0 22px 34px rgba(40, 30, 10, 0.35)); }
.fan img:nth-child(1) { transform: translate(-92%, -52%) rotate(-9deg); }
.fan img:nth-child(2) { transform: translate(-8%, -54%) rotate(8deg); }
.fan img:nth-child(3) { transform: translate(-50%, -46%) rotate(-1.5deg); z-index: 1; }
@media (min-width: 560px) { .fan { height: 520px; } .fan img { width: 48%; } }
@media (prefers-reduced-motion: no-preference) {
  .fan img { transition: transform 0.5s cubic-bezier(0.2, 0.8, 0.2, 1); }
  .fan:hover img:nth-child(1) { transform: translate(-98%, -53%) rotate(-12deg); }
  .fan:hover img:nth-child(2) { transform: translate(-2%, -55%) rotate(11deg); }
}

/* ---------- how it works: photo in, ticket out ---------- */

.split { display: grid; gap: 56px; align-items: center; }
@media (min-width: 900px) { .split { grid-template-columns: 1fr 1fr; gap: 72px; } }

.steps { list-style: none; padding: 0; margin: 40px 0 0; counter-reset: step; display: grid; gap: 26px; }
.steps li { counter-increment: step; display: grid; grid-template-columns: 44px 1fr; gap: 4px 16px; }
.steps li::before { content: counter(step, decimal-leading-zero); grid-row: span 2; font-family: var(--mono); font-size: 13px; letter-spacing: 0.1em; color: var(--accent); padding-top: 3px; }
.steps p { margin: 0; color: var(--muted-1); }

.transform { position: relative; height: 480px; max-width: 520px; width: 100%; margin: 0 auto; }
.transform .photo { position: absolute; left: 0; top: 6%; width: 62%; border-radius: 14px; transform: rotate(-6deg); box-shadow: 0 0 0 6px #fff, 0 30px 50px rgba(0, 0, 0, 0.55); }
.transform .ticket { position: absolute; right: 0; bottom: 0; width: 44%; transform: rotate(5deg); filter: drop-shadow(0 30px 50px rgba(0, 0, 0, 0.6)); }
.transform .arrow { position: absolute; left: 44%; top: 50%; width: 72px; color: var(--accent); transform: rotate(18deg); }
@media (max-width: 480px) { .transform { height: 380px; } }

/* ---------- store gallery ---------- */

.gallery { display: flex; gap: 18px; overflow-x: auto; scroll-snap-type: x mandatory; padding: 8px var(--gutter) 24px; margin: 48px calc(var(--gutter) * -1) 0; scrollbar-width: none; }
.gallery::-webkit-scrollbar { display: none; }
.gallery img { flex: 0 0 auto; width: min(240px, 62vw); border-radius: 22px; scroll-snap-align: start; box-shadow: 0 0 0 1px var(--border), 0 24px 40px rgba(0, 0, 0, 0.45); }
@media (min-width: 1100px) {
  .gallery { display: grid; grid-template-columns: repeat(6, 1fr); overflow: visible; margin: 56px 0 0; padding: 0; }
  .gallery img { width: 100%; border-radius: 18px; }
}

/* ---------- features ---------- */

.features { display: grid; gap: 20px; margin-top: 56px; }
@media (min-width: 720px) { .features { grid-template-columns: repeat(3, 1fr); } }
.feature { background: var(--bg-raised); border: 1px solid var(--hairline); border-radius: 22px; overflow: hidden; display: flex; flex-direction: column; }
.feature .shot { background: radial-gradient(90% 80% at 50% 0%, rgba(143, 223, 184, 0.22), transparent 70%), var(--bg-teal); padding: 28px 28px 0; height: 300px; overflow: hidden; }
.feature .shot img { width: 72%; margin: 0 auto; border-radius: 22px 22px 0 0; box-shadow: 0 0 0 1px var(--border); }
.feature .body { padding: 24px 24px 28px; }
.feature p { margin: 8px 0 0; color: var(--muted-1); font-size: 16px; }
.tag { display: inline-block; font-family: var(--mono); font-size: 11px; letter-spacing: 0.14em; text-transform: uppercase; color: var(--accent); border: 1px solid var(--accent-deep); background: rgba(143, 223, 184, 0.08); border-radius: 999px; padding: 2px 9px; margin-left: 8px; vertical-align: 3px; }

/* ---------- plans ---------- */

.plans { display: grid; gap: 20px; margin-top: 56px; }
@media (min-width: 720px) { .plans { grid-template-columns: 1fr 1fr; } }
.plan { border: 1px solid var(--border); border-radius: 22px; padding: 32px 28px; background: rgba(255, 255, 255, 0.02); }
.plan.pro { border-color: var(--accent-strong); background: linear-gradient(180deg, rgba(143, 223, 184, 0.12), transparent 65%); }
.plan ul { margin: 20px 0 0; padding: 0; list-style: none; display: grid; gap: 12px; }
.plan li { padding-left: 26px; position: relative; color: var(--muted-1); }
.plan li::before { content: "✓"; position: absolute; left: 0; color: var(--accent); }
.plan .note { margin: 20px 0 0; font-size: 14px; color: var(--muted-2); }

/* ---------- guides teaser ---------- */

.guide-grid { display: grid; gap: 20px; margin-top: 48px; }
@media (min-width: 720px) { .guide-grid { grid-template-columns: repeat(3, 1fr); } }
.guide-tile { display: flex; flex-direction: column; border-radius: 20px; overflow: hidden; background: var(--bg-raised); border: 1px solid var(--hairline); color: var(--text); }
.guide-tile:hover { text-decoration: none; border-color: var(--accent-deep); }
.guide-tile img { aspect-ratio: 16 / 10; object-fit: cover; width: 100%; }
.guide-tile span { display: block; padding: 18px 20px 22px; font-weight: 600; font-size: 18px; line-height: 1.3; letter-spacing: -0.01em; }
.guide-tile small { display: block; font-family: var(--mono); font-size: 11px; letter-spacing: 0.16em; text-transform: uppercase; color: var(--accent); font-weight: 400; margin-bottom: 8px; }

/* ---------- privacy ---------- */

.privacy .wrap { max-width: 820px; text-align: center; }
.privacy p:not(.eyebrow) { color: var(--muted-1); font-size: 19px; margin: 24px auto 0; }
.privacy .lock { width: 56px; height: 56px; margin: 0 auto 24px; border-radius: 16px; display: grid; place-items: center; background: var(--accent-deep); color: var(--accent); }

/* ---------- faq ---------- */

.faq { margin-top: 40px; border-top: 1px solid var(--hairline); }
.faq details { border-bottom: 1px solid var(--hairline); }
.faq summary { list-style: none; cursor: pointer; padding: 22px 36px 22px 0; font-size: 18px; font-weight: 500; position: relative; }
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after { content: "+"; position: absolute; right: 4px; top: 18px; font-size: 24px; font-weight: 300; color: var(--accent); }
.faq details[open] summary::after { content: "–"; }
.faq details p { margin: 0 0 24px; color: var(--muted-1); max-width: 40em; }

/* ---------- closing: a full-bleed photo ---------- */

.closing { text-align: center; padding: 140px 0; background-size: cover; background-position: center; }
.closing::before { content: ""; position: absolute; inset: 0; background: linear-gradient(180deg, rgba(10, 11, 16, 0.55), rgba(10, 11, 16, 0.8)); }
.closing .wrap { position: relative; }
.closing .cta { justify-content: center; }
.closing .soft { color: #c9ccd4; }

.site-footer { border-top: 1px solid var(--hairline); padding: 40px 0 56px; font-size: 14px; color: var(--muted-2); }
.site-footer .wrap { display: flex; flex-wrap: wrap; gap: 16px 28px; justify-content: space-between; }
.site-footer nav { display: flex; flex-wrap: wrap; gap: 8px 24px; }
.site-footer a { color: var(--muted-1); }

/* ---------- guides ---------- */

.article { padding: 40px 0 96px; background: linear-gradient(180deg, var(--bg-teal) 0, var(--bg) 520px); }
.article .wrap { max-width: 780px; }
.crumbs { font-size: 14px; color: var(--muted-2); margin-bottom: 40px; }
.crumbs a { color: var(--muted-1); }
.article-head h1 { font-size: clamp(34px, 5.4vw, 52px); }
.dek { font-size: clamp(18px, 2.2vw, 21px); color: var(--muted-1); margin: 20px 0 0; }
.meta { font-family: var(--mono); font-size: 12px; letter-spacing: 0.1em; text-transform: uppercase; color: var(--muted-2); margin: 24px 0 0; }

.cover { margin: 40px 0 0; }
.cover:not(.roll-cover) > img { width: 100%; border-radius: 22px; aspect-ratio: 16 / 9; object-fit: cover; }
.cover.roll-cover { position: relative; height: 340px; overflow: hidden; border-radius: 22px; background: var(--bg-teal); }
.cover.roll-cover .roll { inset: -20% -10%; }
.cover.roll-cover .roll-ticket { height: 86%; width: auto; max-width: none; }

.prose { margin-top: 48px; font-size: 18px; line-height: 1.72; color: #d3d6dc; }
.prose p, .prose ul, .prose ol { margin: 0 0 22px; }
.prose h2 { font-size: clamp(26px, 3.4vw, 32px); margin: 56px 0 18px; color: var(--text); scroll-margin-top: 24px; }
.prose h3 { font-size: 21px; margin: 36px 0 12px; color: var(--text); }
.prose strong { color: var(--text); font-weight: 600; }
.prose ul, .prose ol { padding-left: 22px; }
.prose li { margin: 0 0 10px; padding-left: 4px; }
.prose li::marker { color: var(--accent); }
.prose a { text-decoration: underline; text-decoration-color: rgba(143, 223, 184, 0.45); text-underline-offset: 3px; }
.prose .tip { border-left: 2px solid var(--accent-strong); background: var(--bg-raised); padding: 16px 20px; border-radius: 0 12px 12px 0; color: var(--muted-1); font-size: 17px; }
.prose figure.photo { margin: 36px 0; }
.prose figure.photo img { width: 100%; border-radius: 18px; }
.prose figure.photo.tall { max-width: 460px; margin-left: auto; margin-right: auto; }
.prose figure.photo figcaption { font-size: 14px; color: var(--muted-2); margin-top: 10px; }

.ticket-figure { margin: 36px auto; width: min(300px, 70%); }
.ticket-figure img { filter: drop-shadow(0 20px 36px rgba(0, 0, 0, 0.5)); transform: rotate(-2deg); }

.app-card { display: grid; grid-template-columns: 110px 1fr; gap: 24px; align-items: center; margin: 56px 0 0; padding: 24px; border: 1px solid var(--accent-deep); border-radius: 22px; background: linear-gradient(135deg, rgba(143, 223, 184, 0.14), var(--bg-raised) 60%); }
.prose .app-card { margin: 40px 0; }
.app-card-ticket { width: 110px; transform: rotate(-4deg); filter: drop-shadow(0 12px 20px rgba(0, 0, 0, 0.5)); }
.app-card p { margin: 0 0 14px; color: var(--muted-1); font-size: 16px; line-height: 1.55; }
.app-card .app-card-name { display: flex; align-items: center; gap: 10px; color: var(--text); font-weight: 600; font-size: 17px; margin-bottom: 8px; }
.app-card-name img { border-radius: 7px; }
.app-card .badge img { height: 45px; width: auto; }
@media (max-width: 480px) { .app-card { grid-template-columns: 76px 1fr; gap: 16px; padding: 18px; } .app-card-ticket { width: 76px; } }

.related { margin-top: 64px; border-top: 1px solid var(--hairline); padding-top: 32px; }
.related .guide-grid { margin-top: 20px; }

.guide-list { list-style: none; padding: 0; margin: 48px 0 0; display: grid; gap: 20px; }
@media (min-width: 720px) { .guide-list { grid-template-columns: 1fr 1fr; } }
.guide-card { display: flex; flex-direction: column; height: 100%; border: 1px solid var(--hairline); border-radius: 20px; overflow: hidden; background: var(--bg-raised); color: var(--text); }
.guide-card:hover { text-decoration: none; border-color: var(--accent-deep); }
.guide-card img { width: 100%; aspect-ratio: 16 / 10; object-fit: cover; }
.guide-card .guide-body { display: grid; gap: 8px; padding: 22px 22px 26px; }
.guide-card .eyebrow { margin: 0; }
.guide-title { font-size: 21px; font-weight: 600; letter-spacing: -0.015em; line-height: 1.25; }
.guide-desc { color: var(--muted-1); font-size: 15px; }
.more-link { margin: 28px 0 0; font-size: 17px; }

/* 404: one page for both languages, the second one set apart below the first. */
.notfound-other { margin-top: 56px; padding-top: 40px; border-top: 1px solid var(--hairline); }
.notfound-other h2 { font-size: clamp(28px, 4vw, 40px); }
