/*
 * yappp.in — the marketing page.
 *
 * Same tokens as the app (apps/mobile/src/theme.ts): warm paper, ink, and one
 * fixed ember. Instrument Serif for display, the same face the prototypes used.
 * No build step and no JavaScript: the pin animations are CSS on inline SVG.
 */

:root {
  --paper: #f4efe6;
  --paper2: #ece5d8;
  --ink: #231d15;
  --ink60: rgba(35, 29, 21, .60);
  --ink38: rgba(35, 29, 21, .38);
  --ink14: rgba(35, 29, 21, .14);
  --ink08: rgba(35, 29, 21, .08);
  --ember: #e2761f;
  --ember-hot: #f0932b;
  --ember-deep: #b84a10;
  --on-ember: #fff4e8;
  --ember-tint: rgba(226, 118, 31, .12);

  --serif: "Instrument Serif", Georgia, "Times New Roman", serif;
  --sans: Inter, -apple-system, "Segoe UI", Helvetica, Arial, sans-serif;
  --mono: ui-monospace, Menlo, Consolas, monospace;

  --measure: 1440px;
  --gutter: clamp(20px, 6vw, 120px);
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: var(--sans);
  font-size: clamp(17px, 1.15vw, 21px);
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}
a { color: inherit; text-decoration: none; }
h1, h2, h3 { font-family: var(--serif); font-weight: 400; margin: 0; letter-spacing: -.01em; }
h1 { font-size: clamp(56px, 9.5vw, 184px); line-height: .95; }
h2 { font-size: clamp(40px, 5.5vw, 104px); line-height: 1.0; }
h3 { font-size: clamp(28px, 2.2vw, 40px); line-height: 1.1; }
em { font-style: italic; color: var(--ember); }
p { margin: 0; }

.eyebrow, .mono {
  font-family: var(--mono);
  font-size: 11px;
  letter-spacing: .12em;
  text-transform: uppercase;
  color: var(--ink60);
}

/* ---------------------------------------------------------------- nav */
.nav {
  position: sticky; top: 0; z-index: 10;
  display: flex; align-items: center; justify-content: space-between;
  padding: 14px var(--gutter);
  background: color-mix(in srgb, var(--paper) 82%, transparent);
  backdrop-filter: blur(14px) saturate(1.2);
  -webkit-backdrop-filter: blur(14px) saturate(1.2);
  border-bottom: 1px solid var(--ink08);
}
.wordmark { font-family: var(--serif); font-size: clamp(34px, 2.6vw, 44px); letter-spacing: -.02em; line-height: 1; }
.nav nav { display: flex; gap: 28px; align-items: center; font-size: 14px; color: var(--ink60); }
.nav nav a:hover { color: var(--ink); }
.pill {
  color: var(--on-ember) !important;
  background: var(--ember);
  padding: 8px 16px; border-radius: 100px;
  font-weight: 500;
}
.pill:hover { background: var(--ember-hot); }
@media (max-width: 640px) { .nav nav a:not(.pill) { display: none; } }

/* ---------------------------------------------------------------- hero */
.hero {
  max-width: var(--measure); margin: 0 auto;
  min-height: calc(100vh - 72px);
  padding: clamp(48px, 6vw, 96px) var(--gutter) 40px;
  display: grid;
  grid-template-columns: 1.15fr .85fr;
  grid-template-areas:
    "eyebrow phone"
    "title   phone"
    "lede    phone"
    "cta     phone"
    ".       hint";
  column-gap: 40px;
  align-items: center;
}
.hero .eyebrow { grid-area: eyebrow; margin-bottom: 20px; }
.hero h1 { grid-area: title; }
.hero .lede {
  grid-area: lede;
  font-size: clamp(18px, 1.6vw, 28px); color: var(--ink60);
  max-width: 34ch; margin-top: 28px;
}
.cta {
  grid-area: cta; justify-self: start;
  margin-top: 36px;
  padding: 14px 22px; border-radius: 100px;
  border: 1px solid var(--ink14);
  font-size: 15px; font-weight: 500;
  transition: background .2s, border-color .2s;
}
.cta:hover { background: var(--ember-tint); border-color: var(--ember); }

@media (max-width: 860px) {
  .hero h1 br { display: none; }
  .hero {
    grid-template-columns: 1fr;
    grid-template-areas: "eyebrow" "title" "lede" "cta" "phone" "hint";
  }
  .phone { margin-top: 56px; justify-self: center; }
  .phone-hint { justify-self: center; }
}

/* ---------------------------------------------------------------- phone */
/* Inside the phone, colours come from --p-* which app.js sets per bucket. */
.phone {
  grid-area: phone;
  width: min(440px, 82vw, 22vw + 120px);
  aspect-ratio: 390 / 800;
  border-radius: 46px;
  background: #0d0b08;
  padding: 12px;
  box-shadow:
    0 40px 80px -30px rgba(35, 29, 21, .45),
    0 0 0 1px rgba(255, 255, 255, .06) inset;
  justify-self: end;
  container-type: inline-size;
  --p-paper: var(--paper); --p-ink: var(--ink); --p-ink60: var(--ink60);
  --p-ink38: var(--ink38); --p-surface: rgba(250,246,239,.94);
  user-select: none;
}
.phone-hint {
  grid-area: hint; justify-self: end;
  margin-top: 14px; font-family: var(--mono); font-size: 11px; letter-spacing: .12em;
  text-transform: uppercase; color: var(--ink38);
}
.phone-screen {
  position: relative; overflow: hidden;
  width: 100%; height: 100%;
  border-radius: 36px;
  background: var(--p-paper);
  color: var(--p-ink);
  transition: background .5s;
  /* Everything inside scales with the phone, not the page. */
  font-size: 4.6cqw;
}
.map { position: absolute; inset: 0; }
.map canvas { outline: none; }

.topbar {
  position: absolute; top: 0; left: 0; right: 0;
  padding: 14px 14px 10px;
  background: linear-gradient(var(--p-paper) 55%, transparent);
  pointer-events: none;
}
.topbar > * { pointer-events: auto; }
.brand-row { display: flex; justify-content: space-between; align-items: baseline; margin-bottom: 10px; }
.brand { font-family: var(--serif); font-size: 2em; letter-spacing: -.02em; color: var(--p-ink); }
.brand .wm-p { font-style: italic; color: var(--ember); }
.count { font-size: .6em; color: var(--p-ink60); text-align: right; }

.chips {
  display: flex; gap: 4px;
  padding: 4px; border-radius: 100px;
  background: var(--p-surface);
  box-shadow: 0 6px 20px -8px rgba(35, 29, 21, .35);
}
.chip {
  flex: 1; text-align: center; cursor: pointer;
  font-family: var(--mono); font-size: .68em; letter-spacing: .08em; text-transform: uppercase;
  padding: .55em 0; border-radius: 100px; color: var(--p-ink60); white-space: nowrap;
  background: transparent; border: 0;
  transition: background .25s, color .25s;
}
.chip.on { background: var(--p-ink); color: var(--p-paper); }

.pills { display: flex; gap: 5px; margin-top: 8px; overflow-x: auto; scrollbar-width: none; padding-bottom: 2px; }
.pills::-webkit-scrollbar { display: none; }
.ipill {
  flex: none; cursor: pointer;
  font-family: var(--sans); font-size: .72em; font-weight: 500;
  padding: .45em .85em; border-radius: 100px;
  background: var(--p-surface); color: var(--p-ink60);
  border: 1px solid transparent;
  transition: background .15s, color .15s;
}
.ipill.on { background: var(--ember); color: var(--on-ember); }

.sheet {
  position: absolute; left: 0; right: 0; bottom: 0;
  padding: 10px 16px 20px;
  border-radius: 26px 26px 0 0;
  background: var(--p-surface);
  color: var(--p-ink);
  box-shadow: 0 -10px 40px -12px rgba(35, 29, 21, .35);
  transition: background .5s;
  max-height: 42%;
  overflow: hidden;
}
.sheet::after {
  /* OSM attribution, kept visible on purpose (ODbL). */
  content: "Map © OpenStreetMap contributors";
  display: block; margin-top: 8px;
  font-family: var(--mono); font-size: .5em; letter-spacing: .04em; color: var(--p-ink38);
}
.grab { width: 36px; height: 4px; border-radius: 2px; background: var(--p-ink38); opacity: .5; margin: 0 auto 10px; }
.sheet .mono { font-size: .62em; color: var(--p-ink60); }
.sheet .row {
  display: flex; align-items: center; justify-content: space-between; gap: 12px;
  padding: 9px 0; cursor: pointer;
}
.sheet .row + .row { border-top: 1px solid color-mix(in srgb, var(--p-ink) 10%, transparent); }
.sheet .title { font-family: var(--serif); font-size: 1.35em; line-height: 1.1; margin-top: 2px; }
.sheet .title.big { font-size: 1.9em; margin-top: 4px; }
.sheet .sub { font-size: .78em; color: var(--p-ink60); margin-top: 2px; }
.sheet .empty { font-size: .85em; color: var(--p-ink60); padding: 14px 0 6px; }
.sheet .tags { display: flex; gap: 4px; flex-wrap: wrap; margin: 8px 0 6px; }
.sheet .tags span {
  font-family: var(--mono); font-size: .58em; letter-spacing: .06em; text-transform: uppercase;
  padding: 3px 8px; border-radius: 100px;
  border: 1px solid color-mix(in srgb, var(--p-ink) 18%, transparent); color: var(--p-ink60);
}
.sheet .tags span.hit { background: var(--ember); border-color: var(--ember); color: var(--on-ember); }
.back {
  font-family: var(--mono); font-size: .62em; letter-spacing: .08em; text-transform: uppercase;
  color: var(--p-ink60); background: none; border: 0; padding: 0 0 8px; cursor: pointer;
}
.join {
  flex: none; cursor: pointer;
  font-family: var(--sans); font-size: .82em; font-weight: 600;
  padding: .6em 1.1em; border-radius: 100px; border: 0;
  background: var(--ember); color: var(--on-ember);
  transition: background .15s, transform .1s;
}
button.join { display: block; width: 100%; margin-top: 12px; padding: .9em; font-size: .9em; }
button.join:active { transform: scale(.98); }
.join.request { background: transparent; color: var(--p-ink); box-shadow: inset 0 0 0 1px color-mix(in srgb, var(--p-ink) 22%, transparent); }
.join.in { background: var(--p-ink); color: var(--p-paper); }
.join.requested { background: transparent; color: var(--p-ink60); box-shadow: inset 0 0 0 1px color-mix(in srgb, var(--p-ink) 14%, transparent); }
.join.full { background: transparent; color: var(--p-ink38); box-shadow: inset 0 0 0 1px color-mix(in srgb, var(--p-ink) 10%, transparent); cursor: default; }

/* ---------------------------------------------------------------- beats */
.beats {
  max-width: var(--measure); margin: 0 auto;
  padding: clamp(80px, 12vw, 180px) var(--gutter) 0;
  display: grid; gap: clamp(72px, 10vw, 140px);
}
.beat { max-width: 60%; }
@media (max-width: 860px) { .beat { max-width: 100%; } }
.beat .eyebrow { margin-bottom: 18px; }
.beat p:not(.eyebrow) { margin-top: 22px; font-size: clamp(18px, 1.6vw, 28px); color: var(--ink60); max-width: 46ch; }
.beat:nth-child(2) { margin-left: auto; }
.tag {
  display: inline-block;
  font-family: var(--mono); font-size: .6em; letter-spacing: .06em; text-transform: uppercase;
  padding: 4px 10px; border-radius: 100px;
  background: var(--ink); color: var(--paper);
  vertical-align: 2px;
}

/* ---------------------------------------------------------------- wall */
.wall {
  max-width: var(--measure); margin: clamp(100px, 14vw, 200px) auto 0;
  padding: 0 var(--gutter);
}
.wall .eyebrow { margin-bottom: 28px; }
.wall ul { list-style: none; margin: 0; padding: 0; }
.wall li {
  font-family: var(--serif);
  font-size: clamp(30px, 4.2vw, 72px); line-height: 1.12;
  padding: .32em 0;
  border-top: 1px solid var(--ink08);
  color: var(--ink);
  transition: color .2s, padding-left .3s;
}
.wall li:hover { color: var(--ember); padding-left: .3em; }
.wall li:last-child { border-bottom: 1px solid var(--ink08); }
.wall-note { margin-top: 28px; color: var(--ink60); font-size: clamp(17px, 1.4vw, 24px); }

/* ---------------------------------------------------------------- doors */
.doors {
  max-width: var(--measure); margin: 0 auto;
  padding: clamp(100px, 14vw, 200px) var(--gutter) 0;
}
.doors .eyebrow { margin-bottom: 18px; }
.door-grid {
  margin-top: 48px;
  display: grid; grid-template-columns: 1fr 1fr; gap: 14px;
}
.door {
  padding: 34px 30px 32px;
  border-radius: 24px;
  background: var(--paper2);
  border: 1px solid var(--ink08);
}
.door p { margin-top: 12px; color: var(--ink60); font-size: clamp(16px, 1.2vw, 22px); max-width: 38ch; }
.door-ico { width: 44px; height: 44px; border-radius: 50%; margin-bottom: 26px; }
.door-ico.open { background: var(--ember); box-shadow: 0 0 0 8px var(--ember-tint); }
.door-ico.approval {
  background: transparent;
  border: 2px dashed var(--ember);
  position: relative;
}
.door-ico.approval::after {
  content: ""; position: absolute; inset: 11px;
  border-radius: 50%; background: var(--ember);
}
@media (max-width: 720px) { .door-grid { grid-template-columns: 1fr; } }

/* ---------------------------------------------------------------- safety */
.safety {
  margin: clamp(100px, 14vw, 200px) 0 0;
  padding: clamp(80px, 10vw, 140px) var(--gutter);
  background: #14110d; color: #f6efe2;
}
.safety > * { max-width: var(--measure); margin-left: auto; margin-right: auto; }
.safety h2 em { color: var(--ember-hot); }
.safety ul {
  list-style: none; padding: 0;
  margin-top: 56px;
  display: grid; grid-template-columns: 1fr 1fr; gap: 28px 48px;
}
.safety li { color: rgba(246, 239, 226, .62); font-size: clamp(16px, 1.2vw, 22px); max-width: 40ch; padding-top: 18px; border-top: 1px solid rgba(246,239,226,.12); }
.safety li strong { display: block; color: #f6efe2; font-weight: 500; margin-bottom: 4px; }
@media (max-width: 720px) { .safety ul { grid-template-columns: 1fr; } }

/* ---------------------------------------------------------------- get */
.get {
  max-width: var(--measure); margin: 0 auto;
  padding: clamp(100px, 14vw, 200px) var(--gutter) clamp(80px, 10vw, 140px);
  text-align: center;
}
.get .eyebrow { margin-bottom: 18px; }
.get h2 { line-height: 1.05; }
.get > p:not(.eyebrow) { margin: 22px auto 0; color: var(--ink60); font-size: clamp(17px, 2vw, 20px); max-width: 48ch; }
.stores { margin-top: 40px; display: flex; gap: 12px; justify-content: center; flex-wrap: wrap; }
.store {
  padding: 14px 22px; border-radius: 14px;
  background: var(--ink); color: var(--paper);
  font-size: 14px; font-weight: 500;
  opacity: .55;
}
.get .small { font-size: 14px !important; margin-top: 28px !important; }
.get .small a { color: var(--ember); border-bottom: 1px solid var(--ember-tint); }

/* ---------------------------------------------------------------- footer */
footer {
  max-width: var(--measure); margin: 0 auto;
  padding: 32px var(--gutter) 48px;
  border-top: 1px solid var(--ink08);
  display: flex; justify-content: space-between; align-items: center; gap: 16px; flex-wrap: wrap;
  font-size: 13px; color: var(--ink60);
}
footer .wordmark { font-size: 30px; color: var(--ink); }
footer a:hover { color: var(--ink); }

/* The wordmark, exactly as the app sets it: serif, the second p italic ember. */
.wordmark .wm-p { font-style: italic; color: var(--ember); }
