/* ============================================================
   MORTAL — waitlist landing page
   Locked brand system: MORTAL_BRAND_BRIEF.md
   ============================================================ */

@font-face {
  font-family: "Gillius ADF No2";
  src: url("../fonts/GilliusADFNo2-Regular.otf") format("opentype");
  font-weight: 400;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: "Gillius ADF No2";
  src: url("../fonts/GilliusADFNo2-Bold.otf") format("opentype");
  font-weight: 700;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: "Gillius ADF No2";
  src: url("../fonts/GilliusADFNo2-Italic.otf") format("opentype");
  font-weight: 400;
  font-style: italic;
  font-display: swap;
}
@font-face {
  font-family: "Gillius ADF No2";
  src: url("../fonts/GilliusADFNo2-BoldItalic.otf") format("opentype");
  font-weight: 700;
  font-style: italic;
  font-display: swap;
}
@font-face {
  font-family: "Gillius ADF No2 Condensed";
  src: url("../fonts/GilliusADFNo2Cond-Regular.otf") format("opentype");
  font-weight: 400;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: "Gillius ADF No2 Condensed";
  src: url("../fonts/GilliusADFNo2Cond-Bold.otf") format("opentype");
  font-weight: 700;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: "DejaVu Sans";
  src: url("../fonts/DejaVuSans.ttf") format("truetype");
  font-weight: 400;
  font-style: normal;
  font-display: swap;
}

:root {
  /* Locked palette — MORTAL_BRAND_BRIEF.md */
  --white: #ffffff;
  --orange: #e96622;
  --wordmark-dark: #625b58;
  --ink-blue: #0c2544;
  --bottle-green: #0f3a29;
  --aubergine: #3b1c33;
  --wave-grey: #c9cdd1;
  --watermark-grey: #e4e6e8;

  --font-body: "Gillius ADF No2", -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  --font-condensed: "Gillius ADF No2 Condensed", var(--font-body);
  --font-tagline: "DejaVu Sans", sans-serif;

  --measure: 40rem;
  --gutter: clamp(1.5rem, 5vw, 4rem);

  --ease: cubic-bezier(0.22, 1, 0.36, 1);
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
  scrollbar-width: thin;
  scrollbar-color: var(--wave-grey) transparent;
}

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }
}

::selection {
  background: var(--ink-blue);
  color: var(--white);
}

::-webkit-scrollbar { width: 5px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb { background: var(--wave-grey); }
::-webkit-scrollbar-thumb:hover { background: var(--wordmark-dark); }

body {
  margin: 0;
  background: var(--white);
  color: var(--wordmark-dark);
  font-family: var(--font-body);
  font-weight: 400;
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

img {
  max-width: 100%;
  display: block;
}

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

/* ---------- Section rhythm ---------- */

.section {
  position: relative;
  padding-block: clamp(4.5rem, 10vw, 8rem);
  overflow: hidden;
}

.container {
  max-width: 72rem;
  margin-inline: auto;
  padding-inline: var(--gutter);
  position: relative;
  z-index: 1;
}

.container--narrow {
  max-width: 46rem;
}

h1,
h2 {
  font-weight: 700;
  line-height: 1.15;
  margin: 0 0 1.5rem;
  color: inherit;
  max-width: 22ch;
}

h1 {
  font-size: clamp(2rem, 4.2vw, 3rem);
}

h2 {
  font-size: clamp(1.625rem, 3.2vw, 2.375rem);
}

.lede {
  font-size: clamp(1.0625rem, 1.6vw, 1.25rem);
  max-width: 38ch;
  margin: 0 0 2.5rem;
}

.body-text {
  font-size: 1.0625rem;
  max-width: 38ch;
  margin: 0 0 1.5rem;
}

.body-text--close {
  margin-top: 2rem;
}

.body-text em {
  font-style: italic;
}

/* ---------- 01 Opening (conversion hero) ---------- */

.section--opening {
  min-height: 100svh;
  display: flex;
  flex-direction: column;
  justify-content: center;
  padding-block: clamp(3rem, 10vw, 6rem);
}

.section--opening .container {
  text-align: center;
}

/* Wordmark on top with the tagline tucked under its right side */
.opening__logo {
  display: inline-grid;
  grid-template-columns: auto;
  justify-items: end;
  row-gap: clamp(0.5rem, 1.5vw, 1rem);
  margin: 0 0 1.25rem;
  text-align: left;
}

.opening__lockup {
  width: clamp(240px, 34vw, 440px);
  height: auto;
}

/* Tagline sits underneath and to the right of the wordmark */
.opening__tagline {
  justify-self: end;
  white-space: nowrap;
  font-family: var(--font-tagline);
  font-weight: 400;
  font-size: clamp(1rem, 1.4vw, 1.25rem);
  letter-spacing: 0.01em;
  color: var(--wordmark-dark);
  margin: 0;
}

/* Wavelength graphic sits underneath the email box, aligned to its left edge */
.opening__wave-wrap {
  max-width: 32rem;
  margin: clamp(1rem, 3vw, 1.75rem) auto 0;
  text-align: left;
}

.opening__wave {
  width: clamp(140px, 22vw, 240px);
  height: auto;
}

.section--opening .lede {
  margin-inline: auto;
}

.section--opening .waitlist-form {
  margin-inline: auto;
}

/* ---------- 01 / 07 Waitlist offer ---------- */

/* Standalone band between the aubergine close and the ink footer, so it keeps
   the default section rhythm on both edges. */
.section--offer {
  text-align: left;
}

.waitlist-form {
  max-width: 32rem;
}

.waitlist-form__row {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
  align-items: stretch;
}

.waitlist-form__input {
  flex: 1 1 16rem;
  min-width: 0;
  font-family: var(--font-body);
  font-size: 1rem;
  color: var(--wordmark-dark);
  background: transparent;
  border: none;
  border-bottom: 2px solid var(--wave-grey);
  padding: 0.75rem 0.25rem;
  caret-color: var(--orange);
  transition: border-color 0.2s var(--ease);
}

.waitlist-form__input::placeholder {
  color: var(--wordmark-dark);
}

.waitlist-form__input:focus {
  outline: none;
  border-bottom-color: var(--orange);
}

.waitlist-form__input:invalid:not(:placeholder-shown) {
  border-bottom-color: var(--orange);
}

.waitlist-form__submit {
  flex: 0 0 auto;
  font-family: var(--font-body);
  font-weight: 700;
  font-size: 1rem;
  color: var(--white);
  background: var(--wordmark-dark);
  border: none;
  padding: 0.875rem 1.75rem;
  cursor: pointer;
  transition: background-color 0.2s var(--ease), transform 0.15s var(--ease);
}

.waitlist-form__submit:hover {
  background: var(--ink-blue);
}

.waitlist-form__submit:active {
  transform: translateY(1px);
}

.waitlist-form__submit:focus-visible,
.waitlist-form__input:focus-visible {
  outline: 2px solid var(--orange);
  outline-offset: 2px;
}

.waitlist-form__note {
  font-size: 0.875rem;
  color: var(--wordmark-dark);
  margin: 0.9rem 0 0;
}

.waitlist-form__error {
  font-size: 1.1875rem;
  font-weight: 700;
  color: var(--orange);
  margin: 0.75rem 0 0;
}

.waitlist-confirm {
  max-width: 32rem;
  padding-top: 0.25rem;
}

.waitlist-confirm p {
  font-size: 1.0625rem;
  font-weight: 700;
  color: var(--ink-blue);
  margin: 0;
  padding: 0.9rem 0;
  border-bottom: 2px solid var(--orange);
}

.section--dark .waitlist-confirm p {
  color: var(--white);
}

/* ---------- Dark fields (03, 08) ---------- */

.section--dark {
  background: var(--ink-blue);
  color: var(--white);
}

.section--aubergine {
  background: var(--aubergine);
}

.section--dark h1,
.section--dark h2 {
  color: var(--white);
}

.section--dark .body-text {
  color: rgba(255, 255, 255, 0.85);
}

/* ---------- 03 Shift table ---------- */

.shift-table {
  margin: 2.5rem 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 1.25rem;
  max-width: 40rem;
}

.shift-table__row {
  display: grid;
  grid-template-columns: 4rem 1fr;
  gap: 0.625rem 1rem;
  padding-bottom: 1.25rem;
  border-bottom: 1px solid rgba(255, 255, 255, 0.14);
}

.shift-table__row:last-child {
  border-bottom: none;
}

.shift-table dt {
  font-family: var(--font-condensed);
  font-weight: 700;
  font-size: 0.8125rem;
  letter-spacing: 0.02em;
  color: rgba(255, 255, 255, 0.55);
  align-self: start;
  padding-top: 0.2rem;
}

.shift-table dd {
  margin: 0;
  font-size: 1.0625rem;
  color: rgba(255, 255, 255, 0.92);
}


/* ---------- 04 Answer — full-width title + 2×2 split ---------- */

.answer-split__title {
  max-width: none;
  margin-bottom: clamp(2rem, 4vw, 3rem);
}

.answer-split {
  display: grid;
  grid-template-columns: 1fr;
  gap: clamp(1.5rem, 3vw, 2rem);
}

@media (min-width: 768px) {
  .answer-split {
    grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
    column-gap: clamp(2.5rem, 6vw, 5rem);
    align-items: start;
  }
}

.answer-split__col .body-text {
  max-width: none;
}

.answer-split__col .body-text:last-child {
  margin-bottom: 0;
}

/* ---------- 02 Problem split ---------- */

@media (min-width: 768px) {
  .problem-split {
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
    column-gap: clamp(2.5rem, 6vw, 5rem);
    align-items: start;
  }

  .problem-split__head {
    margin-bottom: 0;
    max-width: none;
  }
}

/* ---------- 03 Method columns ---------- */

.method-cols {
  margin-top: clamp(2.5rem, 5vw, 3.5rem);
  display: grid;
  grid-template-columns: 1fr;
  gap: clamp(2rem, 5vw, 3.5rem);
}

@media (min-width: 820px) {
  .method-cols {
    grid-template-columns: repeat(3, 1fr);
    gap: clamp(1.75rem, 3.5vw, 3rem);
    align-items: start;
  }
}

.method-col__word {
  font-family: var(--font-condensed);
  font-weight: 700;
  font-size: clamp(1.75rem, 3vw, 2.25rem);
  line-height: 1.1;
  color: var(--ink-blue);
  margin: 0 0 0.5rem;
}

.method-col__lede {
  font-weight: 700;
  font-size: 1.0625rem;
  line-height: 1.35;
  margin: 0 0 1.25rem;
}

.method-col .body-text {
  max-width: none;
  font-size: 1rem;
}

.method-col .body-text:last-child {
  margin-bottom: 0;
}

/* ---------- Pull quote (Night Sitters) ---------- */

.pull-quote {
  font-family: var(--font-condensed);
  font-weight: 700;
  font-style: normal;
  font-size: clamp(1.75rem, 3.4vw, 2.5rem);
  line-height: 1.25;
  color: var(--white);
  margin: 2rem 0;
  padding: 0;
  border: none;
  max-width: 16ch;
}

/* ---------- 04 Night sitters split ---------- */

@media (min-width: 768px) {
  .night-split {
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
    column-gap: clamp(2.5rem, 6vw, 5rem);
    align-items: start;
  }

  .night-split__lead .body-text:last-child {
    margin-bottom: 0;
  }

  .night-split__spacer {
    visibility: hidden;
  }
}

/* ---------- Reveal-on-scroll ---------- */

.reveal {
  opacity: 1;
  transform: none;
}

@media (prefers-reduced-motion: no-preference) {
  html.js .reveal {
    opacity: 0;
    transform: translateY(14px);
    transition: opacity 0.7s var(--ease), transform 0.7s var(--ease);
  }

  html.js .reveal.is-visible {
    opacity: 1;
    transform: none;
  }

  /* Opening logo: slow threshold breath */
  html.js .opening__logo.reveal {
    transform: scale(0.98) translateY(8px);
    transition: opacity 1.1s var(--ease), transform 1.1s var(--ease);
  }

  /* Pull quote: left-to-right clip-path wipe — language arriving.
     Keyframe carries its own opacity so the quote stays hidden until the
     wipe starts, and avoids the clip-path trapping IntersectionObserver
     at 0 ratio. */
  @keyframes pull-quote-wipe {
    from { clip-path: inset(0 100% 0 0); opacity: 1; }
    to   { clip-path: inset(0 0% 0 0); opacity: 1; }
  }

  html.js .pull-quote.reveal {
    opacity: 0;
    transform: none;
  }

  html.js .pull-quote.reveal.is-visible {
    animation: pull-quote-wipe 0.6s cubic-bezier(0.16, 1, 0.3, 1) both;
  }

  /* Form confirm crossfade */
  .waitlist-form {
    transition: opacity 0.3s var(--ease);
  }

  .waitlist-form.is-submitting {
    opacity: 0;
    pointer-events: none;
  }

  .waitlist-confirm {
    opacity: 0;
    transition: opacity 0.4s var(--ease);
  }

  .waitlist-confirm.is-visible {
    opacity: 1;
  }
}

/* ---------- Responsive ---------- */

@media (max-width: 640px) {
  .shift-table__row {
    grid-template-columns: 1fr;
  }

  .shift-table dt {
    padding-top: 0;
  }

  .waitlist-form__row {
    flex-direction: column;
    align-items: stretch;
  }

  /* In column layout flex-basis becomes height, not width — reset it */
  .waitlist-form__input {
    flex: 0 0 auto;
  }

  .waitlist-form__submit {
    width: 100%;
  }

  .opening__wave {
    width: clamp(120px, 40vw, 200px);
  }
}

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

.site-footer {
  padding-block: clamp(3rem, 7vw, 5rem);
}

.footer__top {
  display: grid;
  grid-template-columns: 1fr 1fr 1fr;
  gap: clamp(2rem, 5vw, 4rem);
  padding-bottom: clamp(2rem, 4vw, 3rem);
  border-bottom: 1px solid rgba(255, 255, 255, 0.14);
  align-items: start;
}

.footer__brand {
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
  align-items: flex-start;
}

.footer__logo {
  display: flex;
  align-items: center;
  gap: 0.6rem;
}

.footer__symbol {
  width: 2.25rem;
  height: auto;
  flex-shrink: 0;
}

.footer__wordmark {
  height: 1.25rem;
  width: auto;
}

.footer__wave {
  width: clamp(70px, 12vw, 115px);
  height: auto;
  opacity: 0.55;
}

.footer__nav,
.footer__contact {
  display: flex;
  flex-direction: column;
  gap: 0.7rem;
}

.footer__link {
  font-family: var(--font-body);
  font-size: 1rem;
  color: rgba(255, 255, 255, 0.65);
  text-decoration: none;
  transition: color 0.2s var(--ease);
}

.footer__link:hover {
  color: var(--white);
  text-decoration: underline;
  text-underline-offset: 3px;
  text-decoration-color: rgba(255, 255, 255, 0.4);
}

.footer__link:focus-visible {
  outline: 2px solid var(--orange);
  outline-offset: 2px;
}

.footer__base {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 0.75rem;
  padding-top: clamp(1.25rem, 3vw, 1.75rem);
}

.footer__copyright {
  font-size: 0.875rem;
  color: rgba(255, 255, 255, 0.35);
  margin: 0;
  letter-spacing: 0.01em;
}

.footer__legal {
  display: flex;
  gap: 1.75rem;
}

.footer__link--legal {
  font-size: 0.875rem;
  color: rgba(255, 255, 255, 0.35);
}

.footer__link--legal:hover {
  color: rgba(255, 255, 255, 0.65);
}

@media (max-width: 768px) {
  .footer__top {
    grid-template-columns: 1fr 1fr;
    gap: 2.25rem;
  }

  .footer__brand {
    flex-direction: row;
    align-items: center;
    gap: 1.25rem;
    grid-column: 1 / -1;
  }
}

@media (max-width: 520px) {
  .footer__top {
    grid-template-columns: 1fr;
    gap: 2rem;
  }

  .footer__brand {
    flex-direction: row;
    grid-column: auto;
  }

  .footer__base {
    flex-direction: column;
    align-items: flex-start;
    gap: 1rem;
  }

  .footer__legal {
    gap: 1.25rem;
  }
}

/* ---------- Legal sub-pages (privacy.html, terms.html) ---------- */

.legal-page {
  min-height: 100vh;
  background: var(--white);
  color: var(--wordmark-dark);
}

.legal-header {
  padding-block: 2rem;
  border-bottom: 1px solid var(--watermark-grey);
}

.legal-header__inner {
  max-width: 46rem;
  margin-inline: auto;
  padding-inline: var(--gutter);
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.legal-header__mark {
  width: 2rem;
  height: auto;
}

.legal-header__back {
  font-size: 0.9375rem;
  color: var(--wordmark-dark);
  text-decoration: none;
  opacity: 0.6;
  transition: opacity 0.2s var(--ease);
}

.legal-header__back:hover {
  opacity: 1;
}

.legal-header__back:focus-visible {
  outline: 2px solid var(--orange);
  outline-offset: 2px;
}

.legal-content {
  max-width: 46rem;
  margin-inline: auto;
  padding: clamp(3rem, 8vw, 5rem) var(--gutter) clamp(4rem, 10vw, 6rem);
}

.legal-content h1 {
  font-size: clamp(1.625rem, 3.2vw, 2.375rem);
  font-weight: 700;
  line-height: 1.15;
  margin: 0 0 0.5rem;
  max-width: none;
  color: var(--wordmark-dark);
}

.legal-content .legal-meta {
  font-size: 0.875rem;
  color: rgba(98, 91, 88, 0.55);
  margin: 0 0 3rem;
  letter-spacing: 0.01em;
}

.legal-content h2 {
  font-size: clamp(1.125rem, 2vw, 1.375rem);
  font-weight: 700;
  line-height: 1.2;
  margin: 2.5rem 0 0.75rem;
  max-width: none;
  color: var(--wordmark-dark);
}

.legal-content p {
  font-size: 1rem;
  line-height: 1.65;
  margin: 0 0 1rem;
  color: var(--wordmark-dark);
}

.legal-content ul,
.legal-content ol {
  padding-left: 1.25rem;
  margin: 0 0 1rem;
}

.legal-content li {
  font-size: 1rem;
  line-height: 1.65;
  margin-bottom: 0.4rem;
}

.legal-content a {
  color: var(--wordmark-dark);
  text-decoration: underline;
  text-underline-offset: 3px;
  text-decoration-color: rgba(98, 91, 88, 0.4);
  transition: text-decoration-color 0.15s var(--ease);
}

.legal-content a:hover {
  text-decoration-color: var(--wordmark-dark);
}

.legal-content a:focus-visible {
  outline: 2px solid var(--orange);
  outline-offset: 2px;
}

.legal-footer {
  border-top: 1px solid var(--watermark-grey);
  padding: 1.5rem var(--gutter);
  max-width: 46rem;
  margin-inline: auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 0.75rem;
}

.legal-footer__copy {
  font-size: 0.875rem;
  color: rgba(98, 91, 88, 0.45);
  margin: 0;
}

.legal-footer__links {
  display: flex;
  gap: 1.5rem;
}

.legal-footer__links a {
  font-size: 0.875rem;
  color: rgba(98, 91, 88, 0.55);
  text-decoration: none;
  transition: color 0.2s var(--ease);
}

.legal-footer__links a:hover {
  color: var(--wordmark-dark);
}

.legal-footer__links a:focus-visible {
  outline: 2px solid var(--orange);
  outline-offset: 2px;
}

/* ---------- Shift table on light background (problem section) ---------- */

.section:not(.section--dark) .shift-table__row {
  border-bottom-color: rgba(0, 0, 0, 0.1);
}

.section:not(.section--dark) .shift-table dt {
  color: rgba(0, 0, 0, 0.4);
}

.section:not(.section--dark) .shift-table dd {
  color: var(--wordmark-dark);
}

/* ---------- Problem section — culture bar ---------- */

.section--problem {
  padding-bottom: 0;
}

.problem-culture-bar {
  background: #0F3A29;
  margin-top: clamp(3rem, 6vw, 5rem);
  padding-block: clamp(2rem, 4vw, 3rem);
}

.problem-culture-bar p {
  margin: 0;
  font-family: var(--font-condensed);
  font-weight: 700;
  font-size: clamp(1.5rem, 3vw, 2.25rem);
  line-height: 1.2;
  color: #ffffff;
  max-width: 30ch;
}

/* ---------- Story byline ---------- */

.story-byline {
  font-size: 0.875rem;
  color: rgba(255, 255, 255, 0.5);
  margin: 0;
}

/* ---------- 06 Contact items ---------- */

.contact-items {
  margin: 2rem 0;
}

.contact-items p {
  padding-block: 1rem;
  border-bottom: 1px solid rgba(255, 255, 255, 0.14);
  margin: 0;
  font-size: 1.0625rem;
  color: rgba(255, 255, 255, 0.85);
  max-width: 38ch;
}

.contact-items p:first-child {
  border-top: 1px solid rgba(255, 255, 255, 0.14);
}

.contact-items strong {
  color: var(--white);
}

/* ---------- 06 Booking link (Cal.com popup) ---------- */

.contact-book {
  margin: 2.25rem 0 0;
}

.contact-book__link {
  display: inline-block;
  font-family: var(--font-body);
  font-weight: 700;
  font-size: 1rem;
  color: var(--white);
  text-decoration: none;
  padding: 0.875rem 1.75rem;
  border: 1px solid rgba(255, 255, 255, 0.35);
  cursor: pointer;
  transition: background-color 0.2s var(--ease), border-color 0.2s var(--ease),
    transform 0.15s var(--ease);
}

.contact-book__link:hover {
  background: var(--orange);
  border-color: var(--orange);
}

.contact-book__link:active {
  transform: translateY(1px);
}

.contact-book__link:focus-visible {
  outline: 2px solid var(--orange);
  outline-offset: 2px;
}

.contact-book__note {
  font-size: 0.875rem;
  color: rgba(255, 255, 255, 0.6);
  margin: 0.9rem 0 0;
}
