/* Home. Quiet and confident — the boldness is spent on the room's transition.

   Full-bleed by construction: every band runs the whole viewport and .wrap
   carries the gutter. Backgrounds reach the edges, text never does, and a
   wide monitor gets more layout rather than more empty margin. */

.wrap {
  width: 100%;
  padding-inline: var(--gutter);
  margin-inline: auto;
}

/* --------------------------------------------------------------- masthead */

.masthead {
  border-bottom: 1px solid var(--rule);
  background: var(--ink);
}
.masthead-in {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  flex-wrap: wrap;
  /* Opened from the home screen, an iPhone draws the page under a
     translucent status bar, so the top of the page starts below it. */
  padding-block: calc(20px + env(safe-area-inset-top, 0px)) 20px;
}
.wordmark {
  font-family: var(--display);
  font-variation-settings: "wdth" 82;
  font-weight: 700;
  font-size: 1rem;
  letter-spacing: 0.02em;
  text-transform: uppercase;
}
.wordmark span { color: var(--lamp); }

/* ------------------------------------------------------------------- hero
   A band of projected light. The headline is the subject, so the light
   falls behind it and the way in sits beside it. */

/* ------------------------------------------------------------ install */

.masthead-end { display: flex; align-items: center; gap: 18px; }
.install-btn { min-height: 36px; padding: 8px 14px; font-size: 0.8125rem; }

/* A phone has room for the tagline or the button, not both — and the button
   is the one that does something. */
@media (max-width: 520px) {
  .masthead-end:has(#installBtn:not([hidden])) .eyebrow { display: none; }
}

/* How to install on an iPhone. A sheet from the bottom edge on a phone, the
   same as the room's More sheet; a card in the middle anywhere wider. */
.install-hint {
  position: fixed;
  inset: 0;
  z-index: 50;
  display: grid;
  align-items: end;
  justify-items: center;
  background: rgba(0, 0, 0, .55);
  animation: install-fade 200ms var(--ease);
}
.install-sheet {
  width: 100%;
  max-width: 460px;
  padding: 26px max(22px, env(safe-area-inset-right, 0px))
           max(22px, env(safe-area-inset-bottom, 0px)) max(22px, env(safe-area-inset-left, 0px));
  background: var(--ink-raised);
  border: 1px solid var(--rule);
  border-bottom: 0;
  border-radius: 14px 14px 0 0;
  animation: install-rise 220ms var(--ease);
}
@media (min-width: 600px) {
  .install-hint { align-items: center; padding: 24px; }
  .install-sheet { border-bottom: 1px solid var(--rule); border-radius: 14px; }
}
.install-sheet img { display: block; width: 56px; height: 56px; margin-bottom: 16px; }
.install-sheet h2 { font-size: 1.375rem; margin-bottom: 12px; }
.install-sheet ol { margin: 0 0 14px; padding-left: 1.3em; color: var(--dim); }
.install-sheet li + li { margin-top: 6px; }
.install-sheet b { color: var(--screen); font-weight: 600; }
.install-sheet p { margin: 0 0 20px; color: var(--muted); font-size: 0.9375rem; }
.install-sheet button { width: 100%; min-height: 48px; }
.share-glyph { vertical-align: -3px; color: var(--lamp); }

@keyframes install-fade { from { opacity: 0; } }
@keyframes install-rise { from { transform: translateY(24px); } }
@media (prefers-reduced-motion: reduce) {
  .install-hint, .install-sheet { animation: none; }
}

.hero {
  position: relative;
  overflow: hidden;
  border-bottom: 1px solid var(--foyer-raised);
  background:
    radial-gradient(120% 150% at 18% 8%, rgba(232, 163, 61, .17) 0%, rgba(232, 163, 61, 0) 58%),
    radial-gradient(90% 120% at 88% 96%, rgba(201, 162, 39, .12) 0%, rgba(201, 162, 39, 0) 62%),
    linear-gradient(162deg, var(--foyer) 0%, #1B1216 62%, var(--ink) 100%);
}

/* A faint sweep, like light falling across a screen. Ambient, not a show. */
.hero::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(100deg, transparent 38%, rgba(242, 237, 228, .05) 50%, transparent 62%);
  animation: sweep 14s ease-in-out infinite;
  pointer-events: none;
}
@keyframes sweep {
  0%, 100% { transform: translateX(-30%); }
  50% { transform: translateX(30%); }
}

.hero-in {
  position: relative;   /* above the sweep */
  z-index: 1;
  display: grid;
  gap: clamp(36px, 4vw, 72px);
  align-items: center;
  padding-block: clamp(48px, 9vh, 104px);
}

/* Two columns only once the entry panel can hold its own width without
   squeezing the headline — content decides this, not a device size. */
@media (min-width: 1000px) {
  .hero-in { grid-template-columns: minmax(0, 1.1fr) minmax(380px, 0.9fr); }
}

.hero h1 {
  font-size: clamp(2.5rem, 6.4vw, 5.25rem);
  font-variation-settings: "wdth" 80, "opsz" 96;
  margin-bottom: 20px;
  max-width: 18ch;
}
.hero .lede {
  font-size: clamp(1rem, 1.5vw, 1.1875rem);
  color: var(--dim);
  max-width: 52ch;
}
.hero .eyebrow { display: block; margin-bottom: 20px; }

/* ------------------------------------------------------------------ entry */

.entry {
  display: grid;
  gap: 14px;
  min-width: 0;
  width: 100%;
  max-width: 520px;
  justify-self: end;
}
@media (max-width: 999px) { .entry { justify-self: stretch; max-width: 620px; } }
.entry-or {
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
  gap: 14px;
  font-family: var(--mono);
  font-size: 0.6875rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--faint);
}
.entry-or::before,
.entry-or::after {
  content: "";
  height: 1px;
  background: var(--rule);
}

.entry-card {
  background: rgba(11, 9, 8, .55);
  border: 1px solid var(--rule);
  border-radius: 5px;
  padding: clamp(18px, 2vw, 24px);
  backdrop-filter: blur(6px);
}
.entry-card h2 {
  font-size: 1.0625rem;
  font-variation-settings: "wdth" 92;
  margin-bottom: 4px;
}
.entry-card p { font-size: 0.875rem; color: var(--muted); margin-bottom: 16px; }
.entry-card > button { width: 100%; }

.join-row { display: flex; gap: 8px; }
/* basis 0 rather than auto: the input's own width:100% would otherwise
   argue with the button over the row, and the loser was the input. */
.join-row input { flex: 1 1 0; min-width: 0; }
.join-row button { flex: 0 0 auto; width: auto; padding-inline: 20px; }

#homeNotice { margin: 0; }

/* ---------------------------------------------------------------- blocks */

.block { padding-block: clamp(56px, 8vh, 96px); }
.block + .block { padding-top: 0; }

.block-head { margin-bottom: clamp(22px, 3vh, 34px); }
.block-head > .eyebrow { display: block; margin-bottom: 10px; }
.block-head > h2 {
  font-size: clamp(1.5rem, 3vw, 2.375rem);
  font-variation-settings: "wdth" 86, "opsz" 40;
  max-width: 20ch;
}

/* ---------------------------------------------------------------- sources
   Cards rather than full-width rows: a row of prose stretched across a wide
   monitor is unreadable, and auto-fit turns spare width into more columns
   instead of longer lines. */

.sources {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 290px), 1fr));
  gap: 2px;
  background: var(--rule);
  border: 1px solid var(--rule);
  border-radius: 5px;
  overflow: hidden;
}
.source {
  background: var(--ink);
  padding: clamp(18px, 2vw, 26px);
  display: flex;
  flex-direction: column;
  gap: 7px;
  min-width: 0;
}
.source h3 {
  font-size: 1.0625rem;
  font-variation-settings: "wdth" 95;
  order: 2;
}
.source p {
  font-size: 0.9375rem;
  color: var(--dim);
  order: 3;
  max-width: 46ch;
}
.source .tag {
  order: 1;
  align-self: flex-start;
  font-family: var(--mono);
  font-size: 0.625rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  padding: 4px 9px;
  border-radius: 2px;
  white-space: nowrap;
  border: 1px solid var(--rule);
  color: var(--muted);
  margin-bottom: 5px;
}
.source .tag.live { color: var(--lamp); border-color: rgba(232, 163, 61, .35); }

/* ------------------------------------------------------------------ steps */

.steps {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 300px), 1fr));
  gap: clamp(24px, 3vw, 44px);
  list-style: none;
  margin: 0;
  padding: 0;
}
.step { min-width: 0; }
.step h3 {
  font-size: 1.0625rem;
  font-variation-settings: "wdth" 95;
  margin-bottom: 6px;
}
.step p { font-size: 0.9375rem; color: var(--dim); max-width: 48ch; }
.step .n {
  font-family: var(--mono);
  font-size: 0.6875rem;
  color: var(--lamp);
  letter-spacing: 0.1em;
  display: block;
  margin-bottom: 10px;
  padding-bottom: 10px;
  border-bottom: 1px solid var(--rule);
}

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

.foot {
  border-top: 1px solid var(--rule);
  padding-block: 28px clamp(40px, 6vh, 72px);
  background: var(--ink-raised);
}
.foot p {
  font-size: 0.875rem;
  color: var(--muted);
  max-width: 74ch;
}
