/* ==========================================================================
   RetroFrame — site styles

   Palette is taken from the app itself: the amber is the same #FFB74D that
   app/src/main/res/values/colors.xml uses, chosen there because it sits
   against photographs without competing with them. Here it behaves as
   emitted light — the frame glows onto the page — rather than as a flat
   accent, which is why it appears mostly in gradients and shadows.
   ========================================================================== */

:root {
  --ink:        #0E0B08;   /* warm brown-black, not neutral */
  --ink-2:      #141010;
  --dusk:       #1C1613;   /* raised surface */
  --dusk-2:     #241C17;
  --line:       #33291F;

  --ember:      #FFB74D;   /* the app's own accent */
  --ember-hot:  #FFD08A;
  --ember-deep: #F57C00;

  --sage:       #8FA383;   /* pulled from the icon's landscape */

  --bone:       #F0E7D9;
  --bone-dim:   #A79A8B;

  --display: "Fraunces", Georgia, serif;
  --sans: "IBM Plex Sans", system-ui, -apple-system, sans-serif;
  --mono: "IBM Plex Mono", ui-monospace, Menlo, monospace;

  --wrap: 1180px;
  --r: 14px;
}

*, *::before, *::after { box-sizing: border-box; }

html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }

body {
  margin: 0;
  background: var(--ink);
  color: var(--bone);
  font: 400 1rem/1.65 var(--sans);
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
}

img { max-width: 100%; display: block; }

a { color: var(--ember); text-decoration-color: rgba(255, 183, 77, .35); text-underline-offset: 3px; }
a:hover { text-decoration-color: var(--ember); }

:focus-visible {
  outline: 2px solid var(--ember);
  outline-offset: 3px;
  border-radius: 4px;
}

code { font-family: var(--mono); font-size: .92em; color: var(--ember-hot); }

.wrap { width: min(100% - 2.5rem, var(--wrap)); margin-inline: auto; }

/* Narrower measure for sections that are mostly prose. Keeping these at the
   full 1180px left half the row empty and made the page look unfinished. */
.wrap--read { width: min(100% - 2.5rem, 880px); margin-inline: auto; }

.skip {
  position: absolute; left: -9999px;
  background: var(--ember); color: var(--ink);
  padding: .75rem 1.25rem; z-index: 100; border-radius: 0 0 8px 0;
  font-weight: 600;
}
.skip:focus { left: 0; top: 0; }

/* ── type scale ─────────────────────────────────────────────────────────── */

.h2 {
  font-family: var(--display);
  font-optical-sizing: auto;
  font-weight: 500;
  font-size: clamp(1.9rem, 4.2vw, 3rem);
  line-height: 1.06;
  letter-spacing: -.022em;   /* tighter as it grows */
  margin: 0 0 1rem;
}

.lede {
  max-width: 60ch;
  color: var(--bone-dim);
  font-size: 1.075rem;
  margin: 0 0 2.75rem;
}

.eyebrow {
  font-family: var(--mono);
  font-size: .74rem;
  letter-spacing: .14em;    /* positive tracking at small size */
  text-transform: uppercase;
  color: var(--sage);
  margin: 0 0 1.4rem;
}

/* ── top bar ────────────────────────────────────────────────────────────── */

.topbar {
  position: sticky; top: 0; z-index: 50;
  background: rgba(14, 11, 8, .72);
  backdrop-filter: blur(16px) saturate(150%);
  -webkit-backdrop-filter: blur(16px) saturate(150%);
  border-bottom: 1px solid rgba(51, 41, 31, .7);
}
.topbar__in { display: flex; align-items: center; justify-content: space-between; height: 62px; gap: 1rem; }

.brand {
  display: flex; align-items: center; gap: .6rem;
  color: var(--bone); text-decoration: none;
  font-family: var(--display); font-weight: 700; font-size: 1.06rem; letter-spacing: -.01em;
}
.brand img { border-radius: 6px; }

.topbar__nav { display: flex; align-items: center; gap: 1.6rem; }
.topbar__nav a { color: var(--bone-dim); text-decoration: none; font-size: .92rem; }
.topbar__nav a:hover { color: var(--bone); }
.topbar__nav .btn { color: var(--ink); }
@media (max-width: 720px) { .topbar__nav a:not(.btn) { display: none; } }

/* ── buttons ────────────────────────────────────────────────────────────── */

.btn {
  display: inline-flex; flex-direction: column; align-items: center; justify-content: center;
  gap: .15rem;
  min-height: 52px; padding: .8rem 1.6rem;
  border: 1px solid transparent; border-radius: 10px;
  font: 600 1rem/1.2 var(--sans); text-decoration: none; text-align: center;
  cursor: pointer;
  transition: transform .1s ease-out, background-color .18s, border-color .18s, color .18s;
}
.btn:active { transform: scale(.975); }   /* feedback on press, not release */

.btn--primary {
  background: linear-gradient(178deg, var(--ember-hot), var(--ember) 55%, var(--ember-deep));
  color: #241606;
  box-shadow: 0 1px 0 rgba(255, 240, 214, .5) inset, 0 12px 34px -14px rgba(255, 160, 40, .85);
}
.btn--primary:hover { filter: brightness(1.06); }

.btn--ghost { border-color: var(--line); color: var(--bone); background: transparent; }
.btn--ghost:hover { border-color: var(--ember); color: var(--ember); background: rgba(255, 183, 77, .06); }

.btn--sm { min-height: 40px; padding: .45rem 1rem; font-size: .88rem; border-radius: 8px; }
.btn--sm.btn--ghost { color: var(--bone-dim); }
.topbar .btn--sm { background: var(--ember); }

.btn--lg { min-height: 62px; padding: 1rem 2.4rem; font-size: 1.1rem; }

.btn__meta { font: 400 .76rem/1 var(--mono); opacity: .72; letter-spacing: .02em; }

/* ── hero ───────────────────────────────────────────────────────────────── */

.hero { position: relative; padding: clamp(2.5rem, 6vw, 4.75rem) 0 clamp(2.5rem, 6vw, 4.5rem); }

/* light spilling from the frame across the page */
.hero::before {
  content: ""; position: absolute; inset: 0;
  background:
    radial-gradient(58% 46% at 76% 34%, rgba(255, 160, 50, .17), transparent 68%),
    radial-gradient(40% 34% at 20% 8%, rgba(143, 163, 131, .07), transparent 70%);
  pointer-events: none;
}

.hero__in {
  position: relative;
  display: grid; gap: clamp(2.5rem, 5vw, 4rem);
  grid-template-columns: 1fr;
  align-items: center;
}
@media (min-width: 940px) {
  .hero__in { grid-template-columns: minmax(0, .92fr) minmax(0, 1.08fr); }
}

.hero__title {
  font-family: var(--display);
  font-optical-sizing: auto;
  font-weight: 500;
  font-size: clamp(2.5rem, 6.2vw, 4.35rem);
  line-height: .99;
  letter-spacing: -.032em;
  margin: 0 0 1.35rem;
  text-wrap: balance;
}

.hero__lede { max-width: 46ch; color: var(--bone-dim); font-size: 1.09rem; margin: 0 0 2.1rem; }

.hero__cta { display: flex; flex-wrap: wrap; gap: .85rem; margin-bottom: 1.5rem; }

.hero__note {
  max-width: 44ch; margin: 0;
  font-size: .9rem; color: var(--bone-dim);
  padding-left: 1rem; border-left: 2px solid var(--line);
}

/* ── the frame ──────────────────────────────────────────────────────────── */

.hero__demo { perspective: 1400px; }

.stage { position: relative; }

.tablet {
  position: relative;
  padding: 2.4%;
  border-radius: 20px;
  background: linear-gradient(160deg, #3a3129, #191512 42%, #100d0b);
  box-shadow:
    0 0 0 1px rgba(255, 210, 150, .11),
    0 2px 1px rgba(255, 226, 184, .16) inset,
    0 40px 80px -30px rgba(0, 0, 0, .95),
    0 0 130px -30px rgba(255, 150, 40, .32);
  transform: rotateY(-7deg) rotateX(2deg);
  transform-style: preserve-3d;
  will-change: transform;
  transition: transform .5s cubic-bezier(.22, .61, .36, 1);
}
@media (max-width: 939px) { .tablet { transform: none; } }

.tablet__cam {
  position: absolute; top: 50%; left: 1.05%;
  width: 6px; height: 6px; margin-top: -3px;
  border-radius: 50%;
  background: #0a0807;
  box-shadow: 0 0 0 1px rgba(255, 220, 170, .13);
}

.screen {
  position: relative;
  aspect-ratio: 16 / 10;
  border-radius: 7px;
  overflow: hidden;
  background: #000;
  box-shadow: 0 0 0 1px rgba(0, 0, 0, .85) inset;
}

.screen__stack { position: absolute; inset: 0; }
.screen__stack img {
  position: absolute; inset: 0;
  width: 100%; height: 100%; object-fit: cover;
  opacity: 0;
  transition: opacity 1100ms ease-in-out;
}
.screen__stack img.is-on { opacity: 1; }

/* power-on bloom, once, on load */
.screen::after {
  content: ""; position: absolute; inset: 0;
  background: #fff; opacity: 0; pointer-events: none;
}
.screen.is-booting::after { animation: boot 720ms ease-out forwards; }
@keyframes boot {
  0%   { opacity: .85; transform: scaleY(.004); }
  38%  { opacity: .5;  transform: scaleY(1); }
  100% { opacity: 0;   transform: scaleY(1); }
}

.screen__clock {
  position: absolute; top: 0; left: 0; right: 0;
  display: flex; align-items: baseline; justify-content: flex-end; gap: .7rem;
  padding: 3.2% 4%;
  background: linear-gradient(180deg, rgba(0, 0, 0, .42), transparent);
  color: #fff;
  font-size: clamp(.68rem, 1.75vw, 1.02rem);
  text-shadow: 0 2px 5px rgba(0, 0, 0, .75);
  pointer-events: none;
}
.screen__clock strong { font-weight: 500; font-size: 1.16em; font-variant-numeric: tabular-nums; }
.screen__clock span { opacity: .82; }

.screen__hit {
  position: absolute; inset: 0;
  background: none; border: 0; padding: 0;
  cursor: pointer;
}

.screen__controls {
  position: absolute; left: 0; right: 0; bottom: 0;
  display: flex; align-items: center; gap: .35rem;
  padding: 2.6% 3.4%;
  background: linear-gradient(0deg, rgba(0, 0, 0, .78), rgba(0, 0, 0, .22) 70%, transparent);
  opacity: 0;
  transform: translateY(14%);
  transition: opacity .22s ease-out, transform .28s cubic-bezier(.22, .61, .36, 1);
  pointer-events: none;
}
.screen__controls.is-on { opacity: 1; transform: none; pointer-events: auto; }

.ctl {
  display: grid; place-items: center;
  width: clamp(30px, 7.2%, 46px); aspect-ratio: 1;
  border: 0; border-radius: 50%;
  background: rgba(255, 255, 255, .1);
  color: #fff;
  font-size: clamp(.85rem, 2.1vw, 1.2rem); line-height: 1;
  cursor: pointer;
  transition: background-color .15s, transform .1s ease-out, color .15s;
}
.ctl:hover { background: rgba(255, 255, 255, .2); }
.ctl:active { transform: scale(.9); }
.ctl--big { width: clamp(36px, 8.6%, 54px); }
.ctl__spacer { flex: 1; }
.ctl--heart { color: rgba(255, 255, 255, .8); }
.ctl--heart[aria-pressed="true"] { color: #FF6B8A; background: rgba(255, 107, 138, .2); }
.ctl--heart.is-pop { animation: pop 340ms cubic-bezier(.34, 1.56, .64, 1); }
@keyframes pop { 0% { transform: scale(1); } 40% { transform: scale(1.32); } 100% { transform: scale(1); } }

/* the shelf it sits on */
.stage__shelf {
  height: 120px; margin-top: -10px;
  background:
    radial-gradient(48% 100% at 50% 0%, rgba(255, 168, 60, .28), transparent 70%),
    linear-gradient(180deg, rgba(255, 196, 128, .12), transparent 58%);
  filter: blur(9px);
  transform-origin: top;
}

.stage__cap {
  margin: -2.2rem 0 0;
  text-align: center;
  font: 400 .8rem/1.5 var(--mono);
  color: var(--bone-dim);
  letter-spacing: .02em;
}

/* ── sections ───────────────────────────────────────────────────────────── */

.section { padding: clamp(3.5rem, 8vw, 6.5rem) 0; }
.section--tight { padding-block: clamp(1rem, 3vw, 2rem); }
.section--end { padding-bottom: clamp(4.5rem, 10vw, 8rem); }

/* ── candid notice ──────────────────────────────────────────────────────── */

.candid {
  border: 1px solid var(--line);
  border-left: 3px solid var(--sage);
  border-radius: var(--r);
  background: linear-gradient(180deg, rgba(143, 163, 131, .06), transparent);
  padding: clamp(1.5rem, 3.4vw, 2.2rem);
}
.candid__tag {
  margin: 0 0 .8rem;
  font: 500 .74rem/1 var(--mono);
  letter-spacing: .14em; text-transform: uppercase; color: var(--sage);
}
.candid__body { margin: 0 0 .9rem; color: var(--bone-dim); }
.candid__body strong { color: var(--bone); }
.candid__acts { display: flex; flex-wrap: wrap; gap: .7rem; margin-top: 1.3rem; }

/* ── cards ──────────────────────────────────────────────────────────────── */

/* Six cards, so the column count is pinned rather than left to auto-fit —
   auto-fit gave four across at desktop width and orphaned the last two. */
.grid { display: grid; gap: 1.1rem; grid-template-columns: 1fr; }
@media (min-width: 640px)  { .grid { grid-template-columns: repeat(2, 1fr); } }
@media (min-width: 1000px) { .grid { grid-template-columns: repeat(3, 1fr); } }

.card {
  border: 1px solid var(--line);
  border-radius: var(--r);
  background: linear-gradient(168deg, var(--dusk), var(--ink-2));
  padding: 1.5rem;
}
.card h3 {
  margin: 0 0 .55rem;
  font-family: var(--display); font-weight: 500; font-size: 1.22rem;
  letter-spacing: -.012em;
}
.card p { margin: 0; color: var(--bone-dim); font-size: .95rem; }

/* ── screenshots ────────────────────────────────────────────────────────── */

.shots { display: grid; gap: 1.4rem; grid-template-columns: 1fr; }
@media (min-width: 800px) { .shots { grid-template-columns: repeat(2, 1fr); } }

.shot { margin: 0; }
.shot img {
  width: 100%; height: auto;
  border-radius: 10px;
  border: 1px solid var(--line);
  /* The screenshots are of a lit panel, so they get the same spill the frame does. */
  box-shadow: 0 20px 50px -30px rgba(0, 0, 0, .9), 0 0 60px -35px rgba(255, 160, 50, .5);
}
.shot figcaption {
  margin-top: .7rem;
  font-size: .9rem;
  color: var(--bone-dim);
}

/* ── steps ──────────────────────────────────────────────────────────────── */

.steps { list-style: none; margin: 0 0 3rem; padding: 0; display: grid; gap: 1.4rem; }

.step { display: grid; grid-template-columns: auto 1fr; gap: 1.2rem; align-items: start; }
.step__n {
  display: grid; place-items: center;
  width: 40px; height: 40px; border-radius: 50%;
  border: 1px solid var(--line);
  background: var(--dusk);
  font: 500 1rem/1 var(--mono); color: var(--ember);
}
.step h3 { margin: .45rem 0 .4rem; font-family: var(--display); font-weight: 500; font-size: 1.24rem; letter-spacing: -.012em; }
.step p { margin: 0; color: var(--bone-dim); }

.code {
  display: flex; align-items: center; gap: .8rem;
  margin-top: .9rem; padding: .7rem .7rem .7rem 1rem;
  border: 1px solid var(--line); border-radius: 9px;
  background: #0a0807;
}
.code code { flex: 1; min-width: 0; overflow-x: auto; white-space: nowrap; }
.code--wrap code { white-space: normal; word-break: break-all; font-size: .8rem; }

.copy {
  flex: none;
  min-height: 36px; padding: .35rem .85rem;
  border: 1px solid var(--line); border-radius: 7px;
  background: var(--dusk-2); color: var(--bone-dim);
  font: 500 .8rem/1 var(--sans); cursor: pointer;
  transition: color .15s, border-color .15s, transform .1s ease-out;
}
.copy:hover { color: var(--ember); border-color: var(--ember); }
.copy:active { transform: scale(.94); }
.copy.is-done { color: var(--sage); border-color: var(--sage); }

.step__warn {
  margin-top: .8rem !important;
  padding: .8rem 1rem;
  border-left: 2px solid var(--ember);
  background: rgba(255, 183, 77, .07);
  border-radius: 0 8px 8px 0;
  font-size: .92rem;
}

.guides {
  margin: 0 0 2.5rem;
  padding: 1.1rem 1.3rem;
  border: 1px solid var(--line);
  border-radius: var(--r);
  background: linear-gradient(168deg, var(--dusk), var(--ink-2));
}
.guides p { margin: 0; font-size: .95rem; }
.guides__sep { color: var(--bone-dim); margin: 0 .6rem; }

.tips {
  border-top: 1px solid var(--line);
  padding-top: 1.8rem;
}
.tips__h { margin: 0 0 .9rem; font-family: var(--display); font-weight: 500; font-size: 1.2rem; }
.tips p { margin: 0 0 .8rem; color: var(--bone-dim); font-size: .95rem; }
.tips strong { color: var(--bone); }

/* ── ledger ─────────────────────────────────────────────────────────────── */

.ledger {
  border: 1px solid var(--line); border-radius: var(--r);
  overflow: hidden; margin-bottom: 2.5rem;
}
.ledger__row {
  display: grid; grid-template-columns: 1.25fr 1fr 1fr; gap: 1rem;
  padding: .95rem 1.3rem;
  border-bottom: 1px solid rgba(51, 41, 31, .55);
  align-items: baseline;
}
.ledger__row:last-child { border-bottom: 0; }
.ledger__row--head {
  background: var(--dusk);
  font: 500 .72rem/1 var(--mono);
  letter-spacing: .13em; text-transform: uppercase; color: var(--bone-dim);
}
.ledger__k { font-weight: 500; font-size: .95rem; }
.ledger__was { color: var(--bone-dim); font-size: .9rem; text-decoration: line-through; text-decoration-color: rgba(167, 154, 139, .45); }
.ledger__is { color: var(--ember); font-size: .9rem; font-weight: 500; }

@media (max-width: 700px) {
  .ledger__row { grid-template-columns: 1fr; gap: .3rem; padding: 1rem 1.1rem; }
  .ledger__row--head { display: none; }
  .ledger__was::before { content: "was — "; text-decoration: none; color: var(--bone-dim); }
  .ledger__is::before { content: "now — "; opacity: .7; }
}

.notes { display: grid; gap: 1.1rem; grid-template-columns: repeat(auto-fit, minmax(min(100%, 280px), 1fr)); }
.note { border-top: 2px solid var(--line); padding-top: 1.1rem; }
.note h3 { margin: 0 0 .5rem; font-family: var(--display); font-weight: 500; font-size: 1.15rem; }
.note p { margin: 0; color: var(--bone-dim); font-size: .93rem; }

/* ── final ──────────────────────────────────────────────────────────────── */

.final { text-align: center; max-width: 62ch; margin-inline: auto; }
.final__h {
  font-family: var(--display); font-weight: 500;
  font-size: clamp(1.8rem, 4.6vw, 2.9rem); line-height: 1.05; letter-spacing: -.025em;
  margin: 0 0 2rem; text-wrap: balance;
}

.verify { margin-top: 3rem; text-align: left; }
.verify__h {
  margin: 0 0 .7rem;
  font: 500 .74rem/1 var(--mono); letter-spacing: .13em; text-transform: uppercase; color: var(--bone-dim);
}
.verify__note { margin: .8rem 0 0; font-size: .87rem; color: var(--bone-dim); }

/* ── footer ─────────────────────────────────────────────────────────────── */

.foot { border-top: 1px solid var(--line); padding: 3rem 0; background: var(--ink-2); }
.foot__in { display: grid; gap: 1.1rem; }
.foot__lic { margin: 0; color: var(--bone-dim); font-size: .92rem; max-width: 56ch; }
.foot__nav { display: flex; flex-wrap: wrap; gap: 1.4rem; }
.foot__nav a { color: var(--bone-dim); text-decoration: none; font-size: .9rem; }
.foot__nav a:hover { color: var(--ember); }
.foot__end { margin: .6rem 0 0; font: 400 .82rem/1.5 var(--mono); color: #6b6055; }

/* ── reveal ─────────────────────────────────────────────────────────────── */

.reveal { opacity: 0; transform: translateY(14px); }
.reveal.is-in {
  opacity: 1; transform: none;
  transition: opacity .5s ease-out, transform .5s cubic-bezier(.22, .61, .36, 1);
  transition-delay: var(--d, 0ms);
}

/* ── reduced motion ─────────────────────────────────────────────────────── */

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: .01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: .01ms !important;
  }
  .reveal { opacity: 1; transform: none; }
  .tablet { transform: none; }
  .screen__stack img { transition: none; }
}

@media (prefers-contrast: more) {
  :root { --bone-dim: #CFC4B6; --line: #5A4A38; }
  .topbar { background: var(--ink); backdrop-filter: none; }
}

/* ── faq ────────────────────────────────────────────────────────────────── */

.faq { display: grid; gap: .7rem; }

.faq__q {
  border: 1px solid var(--line);
  border-radius: var(--r);
  background: linear-gradient(168deg, var(--dusk), var(--ink-2));
  padding: 0 1.3rem;
  overflow: hidden;
}
.faq__q summary {
  cursor: pointer;
  padding: 1.05rem 0;
  font-family: var(--display);
  font-weight: 500;
  font-size: 1.12rem;
  letter-spacing: -.012em;
  list-style: none;
  display: flex; align-items: center; justify-content: space-between; gap: 1rem;
}
.faq__q summary::-webkit-details-marker { display: none; }
.faq__q summary::after {
  content: "+";
  flex: none;
  font-family: var(--mono);
  font-size: 1.3rem;
  color: var(--ember);
  transition: transform .2s ease-out;
}
.faq__q[open] summary::after { transform: rotate(45deg); }
.faq__q summary:hover { color: var(--ember); }

.faq__q p {
  margin: 0 0 1.15rem;
  color: var(--bone-dim);
  font-size: .97rem;
  max-width: 68ch;
}
.faq__q strong { color: var(--bone); }
