:root {
  --amber: #E8A020;
  --amber-soft: rgba(232, 160, 32, 0.14);
  --bg: #0A0A0E;
  --surface: #15151B;
  --surface-border: rgba(255, 255, 255, 0.08);
  --text: #F1F1F1;
  --text-dim: #9A9AA4;
  --gutter: clamp(16px, 5vw, 64px);
}
* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  -webkit-font-smoothing: antialiased;
  min-height: 100vh;
  overflow-x: hidden;
}
.accent { color: var(--amber); }

/* ---------- Page shell: header / hero / footer fill the viewport ---------- */
.page {
  position: relative;
  min-height: 100vh;
  min-height: 100dvh;
  display: flex;
  flex-direction: column;
  isolation: isolate;
}
.page-glow {
  position: absolute;
  inset: 0;
  z-index: -1;
  pointer-events: none;
  background:
    radial-gradient(60% 50% at 78% 45%, rgba(232, 160, 32, 0.13) 0%, transparent 70%),
    radial-gradient(50% 40% at 10% 0%, rgba(120, 90, 200, 0.10) 0%, transparent 70%),
    radial-gradient(rgba(255, 255, 255, 0.05) 1px, transparent 1px) 0 0 / 28px 28px;
  -webkit-mask-image: linear-gradient(to bottom, #000 60%, transparent);
          mask-image: linear-gradient(to bottom, #000 60%, transparent);
}

.site-header {
  width: 100%;
  max-width: 1200px;
  margin: 0 auto;
  padding: 22px var(--gutter);
}
.brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  color: var(--text);
  text-decoration: none;
}
.brand-icon {
  width: 30px;
  height: 30px;
  padding: 4px;
  border-radius: 8px;
  border: 1.5px solid var(--amber);
  background: var(--amber-soft);
  object-fit: contain;
}
.brand-name { font-size: 22px; font-weight: 700; letter-spacing: -0.02em; line-height: 1; }

.hero {
  flex: 1;
  width: 100%;
  max-width: 1200px;
  margin: 0 auto;
  padding: 16px var(--gutter) 40px;
  display: grid;
  grid-template-columns: 1fr;
  grid-template-areas: "copy" "visual" "cta";
  align-content: center;
  row-gap: 28px;
  text-align: center;
}
.hero-copy { grid-area: copy; }
.hero-visual { grid-area: visual; min-width: 0; }
.cta-section { grid-area: cta; }

h1 {
  font-size: clamp(30px, 6vw, 56px);
  line-height: 1.08;
  font-weight: 800;
  letter-spacing: -0.03em;
  margin: 0 0 16px;
  overflow-wrap: break-word;
}
.subheading {
  color: var(--text-dim);
  font-size: clamp(15px, 1.6vw, 18px);
  line-height: 1.55;
  max-width: 34em;
  margin: 0 auto;
}

/* ---------- Visual column: app icon (welcome) or the shared item ---------- */
.hero-art {
  position: relative;
  width: min(240px, 60vw);
  margin: 0 auto;
}
.hero-art::before {
  content: "";
  position: absolute;
  inset: 8%;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(232, 160, 32, 0.35), rgba(170, 90, 230, 0.18) 55%, transparent 72%);
  filter: blur(36px);
  z-index: -1;
}
.hero-art img {
  display: block;
  width: 100%;
  height: auto;
  animation: float 6s ease-in-out infinite;
}
@keyframes float {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-10px); }
}
.spinner {
  width: 28px;
  height: 28px;
  margin: 8px auto 20px;
  border: 3px solid var(--surface-border);
  border-top-color: var(--amber);
  border-radius: 50%;
  animation: spin 0.8s linear infinite;
}
@keyframes spin {
  to { transform: rotate(360deg); }
}

/* ---------- Share page (?id=…): single column, phone-first ---------- */
.share-view {
  flex: 1;
  width: 100%;
  max-width: calc(520px + 2 * var(--gutter));
  margin: 0 auto;
  padding: 8px var(--gutter) 40px;
}
.share-content { animation: share-in 0.5s cubic-bezier(.2, .8, .2, 1) both; }
@keyframes share-in {
  from { opacity: 0; transform: translateY(12px); }
  to { opacity: 1; transform: none; }
}
.share-headline {
  font-size: clamp(28px, 7vw, 38px);
  line-height: 1.15;
  margin: 0 0 20px;
}

/* The sender's own words, set apart as a quote attributed to them. */
.share-quote {
  position: relative;
  margin: 0 0 16px;
  padding: 12px 16px 12px 18px;
  border-left: 3px solid var(--amber);
  border-radius: 4px 16px 16px 4px;
  background: linear-gradient(90deg, var(--amber-soft), rgba(232, 160, 32, 0.04));
}
.share-quote-mark {
  display: block;
  width: 18px;
  height: 18px;
  margin-bottom: 4px;
  color: var(--amber);
}
.share-quote blockquote {
  margin: 0;
  font-size: 16px;
  font-weight: 500;
  line-height: 1.4;
  overflow-wrap: break-word;
  white-space: pre-line;
}
.share-quote figcaption {
  margin-top: 6px;
  color: var(--text-dim);
  font-size: 13px;
  font-weight: 600;
}
.share-quote figcaption:empty { display: none; }

/* The shared item: one tappable card (image + title + domain). */
.item-card {
  display: block;
  overflow: hidden;
  border-radius: 20px;
  border: 1px solid var(--surface-border);
  background: var(--surface);
  color: var(--text);
  text-decoration: none;
  box-shadow: 0 18px 40px rgba(0, 0, 0, 0.45);
  transition: border-color 0.15s ease, transform 0.15s ease;
}
a.item-card:hover { border-color: rgba(232, 160, 32, 0.55); transform: translateY(-2px); }
a.item-card:focus-visible { outline: 2px solid var(--amber); outline-offset: 3px; }
.item-image {
  display: block;
  width: 100%;
  aspect-ratio: 1.91 / 1;
  object-fit: cover;
  background: #1E1E25;
}
.item-map {
  width: 100%;
  aspect-ratio: 1.91 / 1;
  background: #1E1E25;
  /* Taps fall through to the card's link. */
  pointer-events: none;
}
.item-map.leaflet-container .leaflet-control-attribution {
  background: rgba(0, 0, 0, 0.55);
  color: rgba(255, 255, 255, 0.75);
  font-size: 10px;
}
.item-body { padding: 16px 18px 18px; }
.item-desc {
  margin: -4px 0 12px;
  color: var(--text-dim);
  font-size: 14px;
  line-height: 1.45;
}
.favicon svg { width: 12px; height: 12px; }
.item-title {
  margin: 0 0 12px;
  font-size: 19px;
  font-weight: 700;
  line-height: 1.3;
  overflow-wrap: break-word;
}
.item-source {
  display: flex;
  align-items: center;
  gap: 8px;
  color: var(--text-dim);
  font-size: 14px;
}
.item-domain {
  flex: 1;
  min-width: 0;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.favicon {
  flex-shrink: 0;
  width: 20px;
  height: 20px;
  border-radius: 5px;
  background: #2A2A32;
  color: var(--text-dim);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 10px;
  font-weight: 700;
}
.item-open {
  flex-shrink: 0;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background: var(--text);
  color: var(--bg);
}
.item-open svg { width: 18px; height: 18px; }

.share-cta { margin-top: 32px; }
.share-cta h2 {
  margin: 0 0 14px;
  font-size: 21px;
  font-weight: 700;
  letter-spacing: -0.02em;
  line-height: 1.3;
}
.cta-button {
  display: block;
  padding: 16px 20px;
  border-radius: 16px;
  background: var(--amber);
  color: #0A0A0E;
  font-size: 18px;
  font-weight: 700;
  text-align: center;
  text-decoration: none;
  transition: transform 0.15s ease, box-shadow 0.15s ease;
}
.cta-button:hover { transform: translateY(-2px); box-shadow: 0 10px 28px rgba(232, 160, 32, 0.3); }
.cta-button:focus-visible { outline: 2px solid var(--amber); outline-offset: 3px; }
.share-qr {
  display: flex;
  align-items: center;
  gap: 16px;
  padding: 12px;
  border-radius: 14px;
  border: 1px solid rgba(232, 160, 32, 0.45);
  background: var(--amber-soft);
}
/* White quiet zone so phone cameras read it against the dark page. */
.share-qr-code {
  flex-shrink: 0;
  width: 104px;
  height: 104px;
  padding: 8px;
  border-radius: 8px;
  background: #fff;
}
.share-qr-code svg { display: block; width: 100%; height: 100%; }
.share-qr-text {
  margin: 0;
  color: var(--text-dim);
  font-size: 14px;
  line-height: 1.45;
}
.share-qr-text strong { color: var(--text); font-weight: 600; }
.share-cta-sub {
  margin: 12px 0 0;
  color: var(--text-dim);
  font-size: 15px;
  line-height: 1.5;
  text-align: center;
}

.empty-state {
  color: var(--text-dim);
  font-size: 14px;
  margin-top: 18px;
  padding: 12px 16px;
  border: 1px dashed var(--surface-border);
  border-radius: 12px;
}

/* ---------- CTA ---------- */
.cta-section h2 {
  font-size: clamp(20px, 2.4vw, 26px);
  line-height: 1.25;
  font-weight: 700;
  letter-spacing: -0.02em;
  margin: 0 0 18px;
}
.feature-list {
  list-style: none;
  margin: 0 auto 26px;
  padding: 0;
  max-width: 520px;
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
  text-align: left;
}
.feature-list li {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 12px;
  font-size: 14px;
  font-weight: 500;
  line-height: 1.3;
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid var(--surface-border);
  border-radius: 12px;
}
.feature-icon {
  flex-shrink: 0;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 32px;
  height: 32px;
  border-radius: 9px;
  background: var(--amber-soft);
  color: var(--amber);
}
.feature-icon svg { width: 17px; height: 17px; }

/* Homepage variants of the share page's button / QR code. */
.home-cta { max-width: 420px; margin: 0 auto; }
.home-qr { display: inline-flex; max-width: 440px; text-align: left; }

/* ---------- Waitlist (closed beta) ---------- */
.waitlist { max-width: 520px; margin: 0 auto 26px; }
.share-cta .waitlist { margin-bottom: 0; }
/* Homepage: headline + waitlist set apart in a soft amber-edged box. */
.waitlist-box {
  max-width: 520px;
  margin: 0 auto;
  padding: 24px 22px;
  border-radius: 22px;
  border: 1px solid rgba(232, 160, 32, 0.28);
  background: linear-gradient(160deg, rgba(232, 160, 32, 0.07), rgba(255, 255, 255, 0.02) 60%);
}
.waitlist-box .waitlist { margin-bottom: 0; }
.waitlist-badge {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  margin: 0 0 14px;
  padding: 6px 12px;
  border-radius: 999px;
  border: 1px solid rgba(232, 160, 32, 0.45);
  background: var(--amber-soft);
  color: var(--amber);
  font-size: 13px;
  font-weight: 600;
}
.pulse-dot {
  position: relative;
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--amber);
}
.pulse-dot::after {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: 50%;
  background: var(--amber);
  animation: pulse 1.8s ease-out infinite;
}
@keyframes pulse {
  from { transform: scale(1); opacity: 0.7; }
  to { transform: scale(3); opacity: 0; }
}
.waitlist-sub {
  margin: 0 0 18px;
  color: var(--text-dim);
  font-size: 15px;
  line-height: 1.55;
}
.waitlist-field {
  position: relative;
  display: flex;
  gap: 6px;
  padding: 6px;
  border-radius: 18px;
  border: 1px solid var(--surface-border);
  background: var(--surface);
  box-shadow: 0 18px 40px rgba(0, 0, 0, 0.45);
  transition: border-color 0.2s ease, box-shadow 0.2s ease;
}
/* A slow amber glow around the field invites the first click. */
.waitlist-field::before {
  content: "";
  position: absolute;
  inset: -1px;
  z-index: -1;
  border-radius: inherit;
  box-shadow: 0 0 0 0 rgba(232, 160, 32, 0.4);
  animation: invite 2.8s ease-in-out infinite;
}
@keyframes invite {
  0%, 100% { box-shadow: 0 0 0 0 rgba(232, 160, 32, 0); }
  50% { box-shadow: 0 0 28px 2px rgba(232, 160, 32, 0.28); }
}
.waitlist-field:focus-within {
  border-color: rgba(232, 160, 32, 0.7);
  box-shadow: 0 0 0 4px rgba(232, 160, 32, 0.15), 0 18px 40px rgba(0, 0, 0, 0.45);
}
.waitlist-field:focus-within::before { animation: none; }
.waitlist-input {
  flex: 1;
  min-width: 0;
  padding: 12px 12px;
  border: 0;
  background: transparent;
  color: var(--text);
  font: inherit;
  font-size: 16px;
}
.waitlist-input::placeholder { color: #6A6A74; }
.waitlist-input:focus { outline: none; }
.waitlist-submit {
  position: relative;
  overflow: hidden;
  flex-shrink: 0;
  padding: 12px 18px;
  border: 0;
  border-radius: 13px;
  background: var(--amber);
  color: #0A0A0E;
  font: inherit;
  font-size: 15px;
  font-weight: 700;
  cursor: pointer;
  transition: transform 0.15s ease, box-shadow 0.15s ease, opacity 0.15s ease;
}
.waitlist-submit::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(110deg, transparent 30%, rgba(255, 255, 255, 0.45) 50%, transparent 70%);
  transform: translateX(-100%);
  animation: shimmer 3.2s ease-in-out infinite;
}
@keyframes shimmer {
  0%, 60% { transform: translateX(-100%); }
  100% { transform: translateX(100%); }
}
.waitlist-submit:hover { transform: translateY(-1px); box-shadow: 0 10px 28px rgba(232, 160, 32, 0.3); }
.waitlist-submit:focus-visible { outline: 2px solid var(--amber); outline-offset: 3px; }
.waitlist-submit:disabled { opacity: 0.7; cursor: progress; transform: none; }
.waitlist-submit:disabled::after { animation-duration: 1s; }
.waitlist-note {
  margin: 12px 0 0;
  color: var(--text-dim);
  font-size: 13px;
  line-height: 1.45;
}
.waitlist-note a { color: var(--amber); }
.waitlist-error {
  margin: 10px 0 0;
  color: #FF8A7A;
  font-size: 13px;
  font-weight: 500;
  text-align: left;
}
.waitlist-form.shake { animation: shake 0.4s ease; }
@keyframes shake {
  20%, 60% { transform: translateX(-6px); }
  40%, 80% { transform: translateX(6px); }
}
.waitlist-success {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 16px 18px;
  border-radius: 18px;
  border: 1px solid rgba(232, 160, 32, 0.45);
  background: linear-gradient(90deg, var(--amber-soft), rgba(232, 160, 32, 0.04));
  text-align: left;
  animation: share-in 0.5s cubic-bezier(.2, .8, .2, 1) both;
}
.waitlist-check {
  flex-shrink: 0;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 44px;
  height: 44px;
  border-radius: 50%;
  background: var(--amber);
  color: #0A0A0E;
  animation: pop 0.5s cubic-bezier(.3, 1.6, .5, 1) 0.15s both;
}
.waitlist-check svg { width: 22px; height: 22px; }
@keyframes pop {
  from { transform: scale(0); }
  to { transform: scale(1); }
}
.waitlist-success-title { margin: 0 0 4px; font-size: 17px; font-weight: 700; }
.waitlist-success-text { margin: 0; color: var(--text-dim); font-size: 14px; line-height: 1.45; }
.visually-hidden {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
}

.store-badges {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  justify-content: center;
}
.store-badge {
  display: block;
  border-radius: 10px;
  transition: transform 0.15s ease, box-shadow 0.15s ease;
}
.store-badge:hover { transform: translateY(-2px); box-shadow: 0 10px 28px rgba(232, 160, 32, 0.25); }
.store-badge:focus-visible { outline: 2px solid var(--amber); outline-offset: 3px; }
/* Official badges, shown at equal height as Apple/Google guidelines ask. */
.store-badge img { display: block; height: 54px; width: auto; }

.site-footer {
  width: calc(100% - 2 * var(--gutter));
  max-width: calc(1200px - 2 * var(--gutter));
  margin: 0 auto;
  padding: 20px 0 calc(20px + env(safe-area-inset-bottom));
  display: flex;
  flex-wrap: wrap;
  gap: 8px 20px;
  justify-content: space-between;
  color: var(--text-dim);
  font-size: 13px;
  border-top: 1px solid var(--surface-border);
}
.footer-links { display: flex; flex-wrap: wrap; gap: 8px 32px; }
.site-footer a { color: var(--text-dim); text-decoration: none; }
.site-footer a:hover { color: var(--text); text-decoration: underline; }

[hidden] { display: none !important; }

/* ---------- Desktop: two-column hero ---------- */
@media (min-width: 900px) {
  .hero {
    grid-template-columns: minmax(0, 1.05fr) minmax(0, 1fr);
    grid-template-rows: auto auto;
    grid-template-areas: "copy visual" "cta visual";
    align-content: center;
    column-gap: 64px;
    row-gap: 36px;
    text-align: left;
  }
  .hero-copy { align-self: end; }
  .cta-section { align-self: start; }
  .hero-visual { align-self: center; }
  .subheading { margin: 0; }
  .feature-list { margin-left: 0; }
  .store-badges { justify-content: flex-start; }
  .home-cta { margin: 0; }
  .waitlist { margin-left: 0; }
  .waitlist-box { margin-left: 0; }
  .hero-art { width: min(420px, 100%); }
}

@media (max-width: 420px) {
  .feature-list { grid-template-columns: 1fr; }
  .store-badge img { height: 48px; }
  .waitlist-field { flex-direction: column; }
  .waitlist-box { padding: 20px 16px; }
  .waitlist-submit { padding: 14px 18px; }
}

@media (prefers-reduced-motion: reduce) {
  .hero-art img, .spinner, .share-content, .pulse-dot::after, .waitlist-field::before,
  .waitlist-submit::after, .waitlist-form.shake, .waitlist-success, .waitlist-check { animation: none; }
}

.gate-overlay {
  position: fixed;
  inset: 0;
  z-index: 100;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
  background: radial-gradient(ellipse at top, #15131c 0%, var(--bg) 55%);
}
.gate-form {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 14px;
  width: 100%;
  max-width: 320px;
  padding: 32px 24px;
  background: var(--surface);
  border: 1px solid var(--surface-border);
  border-radius: 16px;
  text-align: center;
}
.gate-title { font-size: 16px; font-weight: 700; margin: 0; color: var(--text); }
.gate-input {
  width: 100%;
  padding: 10px 14px;
  font-size: 14px;
  color: var(--text);
  background: var(--bg);
  border: 1px solid var(--surface-border);
  border-radius: 8px;
}
.gate-input:focus { outline: 1.5px solid var(--amber); }
.gate-submit {
  width: 100%;
  padding: 10px 14px;
  font-size: 14px;
  font-weight: 700;
  color: var(--bg);
  background: var(--amber);
  border: none;
  border-radius: 8px;
  cursor: pointer;
}
.gate-error { margin: 0; font-size: 12px; color: var(--amber); }
