/* The invitation, field notes and colophon remain in the story's shared world. */
.story-closing {
  --closing-ink: var(--ink, #f3f4ee);
  --closing-muted: var(--ink-soft, #b4b9b9);
  --closing-accent: var(--accent, #ccff00);
  --closing-line: rgb(246 230 206 / 14%);
  color: var(--closing-ink);
  position: relative;
  z-index: 4;
  isolation: isolate;
  padding-inline: clamp(20px, 5vw, 88px);
  background: transparent;
}

.story-closing a {
  color: inherit;
  text-underline-offset: 0.22em;
}
.story-closing :focus-visible {
  outline: 2px solid var(--closing-accent);
  outline-offset: 5px;
}
.story-closing .icon-arrow {
  flex: 0 0 auto;
}
.story-invitation,
.story-closing .ground-inner,
.story-closing .questions-inner,
.story-closing .site-colophon {
  width: min(100%, 1120px);
  margin-inline: auto;
}

.story-invitation {
  display: grid;
  grid-template-columns: 1fr 1.1fr;
  gap: clamp(28px, 5vw, 88px);
  align-items: start;
  padding-block: clamp(72px, 10vw, 160px);
  scroll-margin-top: 96px;
}
.story-invitation h2 {
  margin: 0;
  font-size: clamp(40px, 5.4vw, 78px);
  font-weight: 550;
  line-height: 0.98;
  letter-spacing: -0.055em;
  text-wrap: balance;
}
.story-invitation form {
  min-width: 0;
  padding-top: 6px;
}
.story-invitation .field-label {
  display: block;
  font-size: 14px;
  margin-bottom: 12px;
}
.story-invitation .form-row {
  display: flex;
  align-items: stretch;
  gap: 8px;
}
.story-invitation input[type="email"] {
  min-width: 0;
  flex: 1;
  min-height: 54px;
  border: 1px solid rgb(245 255 253 / 25%);
  border-radius: 9px;
  background: rgb(231 242 244 / 7%);
  color: inherit;
  font: inherit;
  font-size: 16px;
  padding: 14px 16px;
  box-shadow: inset 0 1px rgb(255 255 255 / 9%);
}
.story-invitation input::placeholder {
  color: #b0b6b6;
  opacity: 1;
}
.story-invitation .button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
  min-height: 54px;
  flex: 0 0 auto;
  padding: 14px 20px;
  border: 1px solid transparent;
  border-radius: 9px;
  color: #11160b;
  background: var(--closing-accent);
  font: inherit;
  font-size: 15px;
  font-weight: 650;
  cursor: pointer;
}
.story-invitation .button:disabled {
  cursor: wait;
  opacity: 0.65;
}
.story-invitation .consent {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  margin-block: 20px 0;
  color: var(--closing-muted);
  font-size: 13px;
  line-height: 1.6;
}
.story-invitation .consent input {
  width: 18px;
  height: 18px;
  flex: 0 0 18px;
  accent-color: var(--closing-accent);
  margin: 3px 0 0;
}
.story-invitation .signup-footnote,
.story-invitation .form-status {
  font-size: 13px;
  line-height: 1.6;
  color: var(--closing-muted);
}
.story-invitation .form-status:empty {
  margin: 0;
}
.story-invitation .form-status:not(:empty) {
  margin-top: 18px;
  color: var(--closing-ink);
}
.story-closing .honey {
  position: absolute;
  clip-path: inset(50%);
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  width: 1px;
  height: 1px;
  overflow: hidden;
}

.story-closing .ground-notes {
  background: none;
  padding-block: 36px 72px;
}
.story-closing .ground-notes-head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 20px;
}
.story-closing .ground-notes-head h2,
.story-closing #faq-heading {
  font-size: clamp(24px, 3vw, 36px);
  font-weight: 500;
  letter-spacing: -0.035em;
}
.story-closing .text-link {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: 14px;
  white-space: nowrap;
}
.story-closing .notes-list a {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  padding-block: 25px;
  text-decoration: none;
  border-bottom: 1px solid var(--closing-line);
}
.story-closing .notes-list h3 {
  font-size: clamp(17px, 1.8vw, 24px);
  line-height: 1.35;
  font-weight: 450;
  margin: 0;
  max-width: 48ch;
}
.story-closing .notes-list .notes-arrow {
  color: var(--closing-muted);
}
.story-closing .questions-panel {
  position: relative;
  inset: auto;
  display: block;
  background: none;
  border: 0;
  padding-block: 0 72px;
}
.story-closing .questions-inner {
  padding: 0;
  background: none;
  box-shadow: none;
}
.story-closing .faq-list details {
  border-bottom: 1px solid var(--closing-line);
}
.story-closing .faq-list summary {
  padding-block: 22px;
  font-size: clamp(16px, 1.7vw, 20px);
  cursor: pointer;
}
.story-closing .faq-list p {
  color: var(--closing-muted);
  max-width: 70ch;
  font-size: 15px;
  line-height: 1.8;
  margin: 0 0 24px;
}
.story-closing .question-links {
  display: flex;
  flex-wrap: wrap;
  gap: 16px 24px;
  margin-top: 30px;
  font-size: 14px;
}
.story-closing .site-colophon {
  display: flex;
  flex-wrap: wrap;
  gap: 18px 28px;
  padding-block: 36px 48px;
  border-top: 1px solid var(--closing-line);
  font-size: 13px;
  color: var(--closing-muted);
}
.story-closing .site-colophon button {
  color: inherit;
  background: none;
  font: inherit;
  border: 0;
  padding: 0;
  cursor: pointer;
  text-decoration: underline;
}
.story-closing .cookie-panel {
  position: fixed;
  z-index: 100;
  inset: auto 20px 20px auto;
  width: min(400px, calc(100vw - 40px));
  box-sizing: border-box;
  padding: 24px;
  border: 1px solid var(--closing-line);
  border-radius: 12px;
  background: #241e19;
  box-shadow: 0 16px 50px rgb(0 0 0 / 35%);
}
.story-closing .cookie-panel[hidden] {
  display: none;
}
.story-closing .cookie-panel h2 {
  font-size: 18px;
  margin: 0 0 12px;
}
.story-closing .cookie-panel p {
  font-size: 14px;
  line-height: 1.6;
  color: var(--closing-muted);
}
.story-closing .cookie-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}
.story-closing .cookie-actions button {
  min-height: 44px;
  padding: 10px 14px;
  color: inherit;
  background: #352d25;
  border: 1px solid var(--closing-line);
  border-radius: 7px;
  font: inherit;
  font-size: 13px;
  cursor: pointer;
}

@media (max-width: 700px) {
  .story-invitation {
    grid-template-columns: 1fr;
    gap: 28px;
    padding-block: 72px;
  }
  .story-invitation h2 {
    max-width: 10ch;
  }
  .story-invitation .form-row {
    flex-direction: column;
    gap: 10px;
  }
  .story-invitation .button {
    width: 100%;
  }
  .story-closing .ground-notes-head {
    align-items: flex-start;
  }
  .story-closing .ground-notes-head h2 {
    max-width: 9ch;
    margin-block: 0 20px;
  }
  .story-closing .ground-notes-head .text-link {
    margin-top: 5px;
  }
  .story-closing .notes-list a {
    padding-block: 22px;
    gap: 20px;
  }
  .story-closing .site-colophon {
    gap: 18px 22px;
  }
}
@media (prefers-contrast: more), (prefers-reduced-transparency: reduce) {
  .story-invitation input[type="email"] {
    background: #242a2c;
    border-color: #bdb3a6;
  }
  .story-closing {
    --closing-muted: #d6dada;
    --closing-line: #8e999b;
  }
}
@media (forced-colors: active) {
  .story-closing {
    --closing-ink: CanvasText;
    --closing-muted: CanvasText;
    --closing-line: CanvasText;
    --closing-accent: Highlight;
  }
  .story-invitation input[type="email"],
  .story-invitation .button {
    border: 1px solid ButtonText;
    background: Canvas;
    color: CanvasText;
  }
}

.feature-paths {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: var(--s7);
  max-width: 1120px;
  margin-inline: auto;
  padding-top: var(--s8);
}
.feature-paths > a {
  display: flex;
  align-items: center;
  gap: var(--s4);
  min-height: 74px;
  padding-block: var(--s4);
  border-bottom: 1px solid var(--closing-line);
  font-size: clamp(14px, 1.5vw, 18px);
}
.feature-paths > a > svg {
  width: 42px;
  height: 42px;
  flex: 0 0 42px;
  color: var(--ink-soft);
}
.feature-paths > a > span:last-child {
  margin-inline-start: auto;
  color: var(--ink-soft);
}
.feature-paths > a:hover {
  text-decoration: none;
  border-color: var(--closing-accent);
}
.feature-paths > a:hover > svg {
  color: var(--closing-accent);
}
@media (max-width: 700px) {
  .feature-paths {
    grid-template-columns: 1fr;
    gap: 0;
    padding-top: var(--s6);
  }
}

#waitlist {
  scroll-margin-top: 108px;
}
/* Links inside running text are underlined, so they are not told apart by
   hover alone (WCAG 1.4.1): the consent and analytics notices, and the help
   link the form adds to its status. */
.story-closing .consent a,
.story-closing .cookie-panel p a,
.story-closing .form-status a,
.story-closing .signup-footnote a {
  color: var(--closing-ink);
  text-decoration: underline;
  text-underline-offset: 0.2em;
}
/* The email field's edge meets 3:1 against the page and its own fill. */
.story-invitation input[type="email"] {
  border-color: #8a959a;
}
@media (prefers-contrast: more), (prefers-reduced-transparency: reduce) {
  .story-invitation input[type="email"] {
    border-color: #bdb3a6;
  }
}

/* Questions and field notes share one row, so the page ends in two short
   columns instead of two long, thin sections. */
.closing-columns {
  display: grid;
  grid-template-columns: minmax(0, 1.1fr) minmax(0, 0.9fr);
  gap: clamp(32px, 5vw, 88px);
  align-items: start;
  width: min(100%, 1120px);
  margin-inline: auto;
  padding-block: clamp(56px, 8vw, 120px) clamp(24px, 4vw, 56px);
}
.story-closing .closing-columns .questions-inner,
.story-closing .closing-columns .ground-inner {
  width: auto;
}
.story-closing .closing-columns .ground-notes,
.story-closing .closing-columns .questions-panel {
  padding-block: 0;
}
.story-closing .closing-columns #faq-heading,
.story-closing .closing-columns .ground-notes-head h2 {
  margin-top: 0;
}
.story-closing .closing-columns .notes-list h3 {
  font-size: 17px;
}
.story-closing .closing-columns .notes-list a {
  padding-block: 20px;
}
@media (max-width: 900px) {
  .closing-columns {
    grid-template-columns: minmax(0, 1fr);
    gap: 56px;
  }
}

/* The last frame: the invitation is made in the room the page opened in.
   The cast sits on the far side; the reading side falls into shadow, like
   the title card at the top. */
.story-closing .story-invitation {
  position: relative;
  isolation: isolate;
  grid-template-columns: minmax(0, 30rem);
  gap: 22px;
  align-content: end;
  width: min(100%, 1240px);
  min-height: clamp(400px, 42vw, 580px);
  margin-block: clamp(24px, 4vw, 56px) clamp(40px, 6vw, 88px);
  padding: clamp(32px, 5vw, 72px);
  overflow: hidden;
  border: 1px solid var(--hairline);
  border-radius: 32px;
  box-sizing: border-box;
}
.story-invitation-scene {
  position: absolute;
  inset: 0;
  z-index: -2;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: 62% 50%;
}
.story-invitation::after {
  content: "";
  position: absolute;
  inset: 0;
  z-index: -1;
  background:
    linear-gradient(
      90deg,
      rgb(14 11 9 / 94%) 0%,
      rgb(14 11 9 / 84%) 34%,
      rgb(14 11 9 / 30%) 62%,
      rgb(14 11 9 / 6%) 100%
    ),
    linear-gradient(0deg, rgb(14 11 9 / 50%) 0%, rgb(14 11 9 / 0%) 45%);
}
[dir="rtl"] .story-invitation-scene {
  transform: scaleX(-1);
}
[dir="rtl"] .story-invitation::after {
  transform: scaleX(-1);
}
.story-invitation-copy p {
  margin: 14px 0 0;
  color: var(--closing-muted);
  font-size: 17px;
  line-height: 1.5;
}
.story-closing .story-invitation form {
  padding-top: 0;
}
/* Narrower than a laptop, the frame stacks: the room on top as a picture,
   fading into the panel, and the form below it, so neither covers the other. */
@media (max-width: 1000px) {
  .story-closing .story-invitation {
    display: block;
    min-height: 0;
    padding: 0 0 clamp(24px, 4vw, 40px);
    border-radius: 24px;
    background: rgb(27 23 19 / 80%);
  }
  .story-invitation-scene {
    position: relative;
    z-index: 0;
    display: block;
    height: auto;
    aspect-ratio: 16 / 9;
    object-position: 70% 55%;
    -webkit-mask-image: linear-gradient(180deg, #000 62%, transparent 100%);
    mask-image: linear-gradient(180deg, #000 62%, transparent 100%);
  }
  .story-invitation::after {
    display: none;
  }
  .story-closing .story-invitation .story-invitation-copy,
  .story-closing .story-invitation form {
    max-width: 34rem;
    padding-inline: clamp(20px, 5vw, 48px);
  }
  .story-closing .story-invitation form {
    margin-top: 20px;
  }
}
