/* =========================================================================
   Lantern — landing page
   Warm dark, the same palette the app itself uses, so arriving at the real
   thing feels like the same room rather than a different site.
   ========================================================================= */

:root {
  --coal-900: #0b0907;
  --coal-850: #110e0b;
  --coal-800: #17130f;
  --line: rgba(255, 226, 184, .09);
  --line-strong: rgba(255, 226, 184, .18);
  --cream: #f4ece2;
  --cream-dim: #b9ab99;
  --cream-faint: #7b6d60;
  --flame: #d9b56c;
  --flame-soft: #efd9a6;
  --flame-deep: #a8823f;
  --ok: #6fd6a1;
  --off: #c98b7a;
  --serif: "Iowan Old Style", "Palatino Linotype", Palatino, Georgia, serif;
  --sans: ui-sans-serif, -apple-system, "Segoe UI", Roboto, Inter, sans-serif;
  --radius: 22px;
}

*, *::before, *::after { box-sizing: border-box; }
html, body { margin: 0; padding: 0; }
img, svg { max-width: 100%; }
a { color: inherit; }

html { scroll-behavior: smooth; }
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { animation: none !important; transition: none !important; }
}

body {
  min-height: 100vh;
  font-family: var(--sans);
  font-size: 16px;
  line-height: 1.6;
  color: var(--cream);
  background:
    radial-gradient(1200px 700px at 50% -15%, #1e160e 0%, transparent 62%),
    radial-gradient(800px 500px at 88% 110%, #171009 0%, transparent 60%),
    var(--coal-900);
  -webkit-font-smoothing: antialiased;
}

/* Paper, not plastic. */
.grain {
  position: fixed; inset: 0; pointer-events: none; z-index: 0; opacity: .05;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='160' height='160'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.9' numOctaves='2' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
}
header, main, footer { position: relative; z-index: 1; }

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

/* ------------------------------------------------------------------ chrome */

.top {
  display: flex; justify-content: space-between; align-items: center;
  gap: 16px; max-width: 1040px; margin: 0 auto; padding: 22px 20px;
  font-size: 14px;
}
.top a { color: var(--cream-dim); text-decoration: none; }
.top a:hover { color: var(--cream); }

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

.hero {
  max-width: 720px; margin: 0 auto; padding: 40px 20px 20px; text-align: center;
}

/* A lantern flame: a soft core with a slow, irregular breathe. */
.flame {
  width: 74px; height: 74px; margin: 0 auto 26px; position: relative;
  display: grid; place-items: center;
}
.flame::before {
  content: ""; position: absolute; inset: -30px; border-radius: 50%;
  background: radial-gradient(circle, rgba(217, 181, 108, .28) 0%, transparent 62%);
  animation: glow 5.5s ease-in-out infinite;
}
.flame span {
  width: 30px; height: 30px; border-radius: 50% 50% 46% 46%;
  background: radial-gradient(circle at 50% 62%, #fff4dc 0%, var(--flame) 45%, var(--flame-deep) 100%);
  box-shadow: 0 0 30px rgba(217, 181, 108, .55), 0 0 70px rgba(217, 181, 108, .22);
  animation: flicker 5.5s ease-in-out infinite;
}
@keyframes glow {
  0%, 100% { opacity: .85; transform: scale(1); }
  40%      { opacity: 1;   transform: scale(1.06); }
  70%      { opacity: .78; transform: scale(.98); }
}
@keyframes flicker {
  0%, 100% { transform: scale(1) translateY(0); }
  35%      { transform: scale(1.05) translateY(-1px); }
  60%      { transform: scale(.97) translateY(1px); }
}

h1 {
  font-family: var(--serif); font-weight: 500; letter-spacing: .06em;
  font-size: clamp(44px, 9vw, 72px); margin: 0 0 14px;
  background: linear-gradient(180deg, var(--cream) 0%, var(--flame-soft) 120%);
  -webkit-background-clip: text; background-clip: text; color: transparent;
}

.lede {
  color: var(--cream-dim); font-size: clamp(16px, 2.2vw, 18px);
  margin: 0 auto 34px; max-width: 54ch;
}

/* ------------------------------------------------------------------- enter */

.enter { display: grid; gap: 14px; justify-items: center; }

.btn {
  display: grid; gap: 2px; justify-items: center;
  padding: 16px 40px; min-width: 260px;
  border-radius: 999px; text-decoration: none;
  color: #1a1206; font-weight: 600;
  background: linear-gradient(180deg, var(--flame-soft) 0%, var(--flame) 55%, var(--flame-deep) 100%);
  box-shadow:
    0 18px 40px -18px rgba(217, 181, 108, .75),
    0 1px 0 rgba(255, 255, 255, .35) inset;
  transition: transform .18s ease, box-shadow .3s ease, filter .3s ease;
}
.btn:hover {
  transform: translateY(-2px);
  box-shadow:
    0 24px 52px -18px rgba(217, 181, 108, .85),
    0 1px 0 rgba(255, 255, 255, .45) inset;
}
.btn:active { transform: translateY(0); }
.btn-label { font-size: 17px; letter-spacing: .01em; }
.btn-sub { font-size: 12px; opacity: .72; font-weight: 500; }

/* Asleep: still a link, but it stops pretending to be an invitation. */
.btn.is-down {
  background: linear-gradient(180deg, #2a231c 0%, #1d1813 100%);
  color: var(--cream-dim);
  box-shadow: 0 1px 0 rgba(255, 226, 184, .07) inset;
}
.btn.is-down:hover { transform: none; box-shadow: 0 1px 0 rgba(255, 226, 184, .07) inset; }

.status {
  display: inline-flex; align-items: center; gap: 9px;
  margin: 0; font-size: 13px; color: var(--cream-faint);
}
.status .dot {
  width: 8px; height: 8px; border-radius: 50%;
  background: var(--cream-faint); flex: 0 0 auto;
}
.status[data-state="checking"] .dot { animation: pulse 1.4s ease-in-out infinite; }
.status[data-state="up"] .dot {
  background: var(--ok); box-shadow: 0 0 0 4px rgba(111, 214, 161, .14);
}
.status[data-state="up"] { color: var(--cream-dim); }
.status[data-state="down"] .dot { background: var(--off); }
@keyframes pulse { 0%, 100% { opacity: .35; } 50% { opacity: 1; } }

.fineprint {
  margin: 30px auto 0; max-width: 46ch;
  font-size: 13px; color: var(--cream-faint);
}

/* ------------------------------------------------------------------ panels */

.panels {
  max-width: 1040px; margin: 70px auto 0; padding: 0 20px;
  display: grid; gap: 16px;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
}

.glass {
  padding: 26px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background:
    linear-gradient(160deg, rgba(255, 226, 184, .055) 0%, rgba(255, 226, 184, .012) 55%),
    rgba(23, 19, 15, .55);
  backdrop-filter: blur(14px) saturate(120%);
  -webkit-backdrop-filter: blur(14px) saturate(120%);
  box-shadow:
    0 24px 60px -40px rgba(0, 0, 0, .95),
    0 1px 0 rgba(255, 226, 184, .07) inset;
  transition: border-color .35s ease, transform .35s ease;
}
.glass:hover { border-color: var(--line-strong); transform: translateY(-2px); }

.glass h2 {
  font-family: var(--serif); font-weight: 500; font-size: 19px;
  margin: 0 0 8px; color: var(--cream);
}
.glass p { margin: 0 0 10px; color: var(--cream-dim); font-size: 15px; }
.glass p:last-child { margin-bottom: 0; }

.strip { max-width: 1040px; margin: 16px auto 0; padding: 0 20px; }
.wide { padding: 30px; }

/* ------------------------------------------------------------------ footer */

footer {
  max-width: 1040px; margin: 80px auto 0; padding: 26px 20px 60px;
  border-top: 1px solid var(--line);
  display: flex; justify-content: space-between; align-items: center;
  gap: 14px; flex-wrap: wrap;
  font-size: 13px; color: var(--cream-faint);
}
footer .links { display: flex; gap: 18px; flex-wrap: wrap; }
footer a { text-decoration: none; }
footer a:hover { color: var(--cream); }

@media (max-width: 560px) {
  .btn { width: 100%; min-width: 0; }
  .hero { padding-top: 24px; }
}

/* ------------------------------------------------------------------- tour
   The feature list. Three columns on a desk, one on a phone, and the cards
   are masonry-ish by nature because their content decides their height. */

.tour { max-width: 1040px; margin: 78px auto 0; padding: 0 20px; }

.tour-head { max-width: 58ch; margin: 0 0 26px; }
.tour-head h2 {
  font-family: var(--serif); font-weight: 500;
  font-size: clamp(26px, 4vw, 36px); margin: 0 0 10px; color: var(--cream);
}
.tour-head p { margin: 0; color: var(--cream-dim); }

.tour .panels {
  margin: 0; padding: 0;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  align-items: start;
}

.glass h3 {
  /* flex-start, not center: a title that wraps to two lines would otherwise
     drag the icon down to the middle of the block. */
  display: flex; align-items: flex-start; gap: 10px;
  font-family: var(--serif); font-weight: 500; font-size: 18.5px;
  margin: 0 0 8px; color: var(--cream);
}
.glass h3 .ic {
  display: grid; place-items: center;
  width: 30px; height: 30px; flex: 0 0 auto;
  border: 1px solid var(--line); border-radius: 9px;
  background: rgba(217, 181, 108, .09);
  font-size: 14px; color: var(--flame);
  margin-top: -1px;
}

.glass > p {
  margin: 0 0 12px; color: var(--cream-dim); font-size: 14.5px;
}

.glass ul {
  margin: 0; padding: 0; list-style: none;
  display: grid; gap: 9px;
}
.glass ul li {
  position: relative;
  padding-left: 17px;
  font-size: 14px; line-height: 1.55; color: var(--cream-dim);
}
/* A small ember rather than a bullet. */
.glass ul li::before {
  content: ""; position: absolute; left: 0; top: .58em;
  width: 6px; height: 6px; border-radius: 50%;
  background: var(--flame-deep);
  box-shadow: 0 0 7px rgba(217, 181, 108, .5);
}
.glass ul li b { color: var(--cream); font-weight: 600; }

@media (max-width: 560px) {
  .tour { margin-top: 56px; }
  .glass ul li { font-size: 14.5px; }
}

/* ------------------------------------------------------- app download link
   Added when the Android build got a page of its own. The landing page keeps
   one primary action - enter Lantern - so this stays deliberately quieter. */

.toplinks { display: flex; gap: 18px; align-items: center; }

.alt {
  margin-top: 2px;
  font-size: 13.5px; color: var(--cream-dim); text-decoration: none;
  border-bottom: 1px solid transparent;
  transition: color .2s ease, border-color .2s ease;
}
.alt:hover { color: var(--flame); border-bottom-color: var(--flame); }
