/* ============================================================
   landing.css — the "pick a door" experience
   Two notebooks, one author.
   ============================================================ */

/* The landing has its own masthead variant: no in-page nav,
   just the master brand + tiny meta on the right. */
body.landing {
  /* keep default master palette */
  background: var(--cream);
}
body.landing .masthead {
  background: transparent;
  backdrop-filter: none;
  -webkit-backdrop-filter: none;
  border-bottom: 0;
  position: relative;
}
body.landing .masthead__inner { padding-block: 1.4rem; }
body.landing .masthead__brand { font-size: 1.5rem; }
body.landing .masthead__brand small { letter-spacing: 0.22em; }

/* ---- Hero strip above the doors ---- */
.landing-prelude {
  padding-block: clamp(1.5rem, 4vw, 3rem) clamp(2.5rem, 5vw, 4rem);
  text-align: center;
}
.landing-prelude__eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 1rem;
  font-family: var(--mono);
  font-size: var(--fs-cap);
  letter-spacing: 0.26em;
  text-transform: uppercase;
  color: var(--muted);
  margin-bottom: 1.6rem;
}
.landing-prelude__eyebrow .dash {
  width: 48px; height: 1px; background: var(--accent);
}
.landing-prelude__title {
  font-family: var(--serif);
  font-size: clamp(2.4rem, 6vw, 4.6rem);
  line-height: 1;
  letter-spacing: -0.025em;
  font-variation-settings: "opsz" 48;
  font-weight: 400;
  max-width: none;        /* one line on desktop — fills the empty sides */
  margin-inline: auto;
}
.landing-prelude__title em {
  font-style: italic;
  color: var(--accent);
  font-variation-settings: "opsz" 48;
}
/* Headline: one line on desktop, two lines on mobile */
.landing-prelude__title .title-break { display: none; }
@media (max-width: 640px) {
  .landing-prelude__title { max-width: 22ch; }
  .landing-prelude__title .title-break { display: block; }
}
.landing-prelude__sub {
  margin-top: 1.4rem;
  font-family: var(--mono);
  font-size: var(--fs-cap);
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--muted);
}
.landing-prelude__sub .pip {
  display: inline-block;
  width: 4px; height: 4px;
  background: var(--accent);
  border-radius: 50%;
  vertical-align: middle;
  margin: 0 0.6rem 2px;
}

/* ---- Door diorama ---- */
.doors {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0;
  width: min(1440px, 100% - calc(var(--gutter) * 2));
  margin-inline: auto;
  min-height: min(620px, 68vh);
  border-top: 1px solid var(--ink);
  border-bottom: 1px solid var(--ink);
  position: relative;
  padding-block: 0;   /* panels sit flush with the top/bottom lines — no dead space */
}
.doors::before {
  /* the seam: the binding between the two notebooks */
  content: "";
  position: absolute;
  top: 0; bottom: 0; left: 50%;
  width: 1px;
  background: var(--ink);
  z-index: 3;
}
.doors::after {
  /* small mark on the seam */
  content: "";
  position: absolute;
  top: 50%; left: 50%;
  width: 11px; height: 11px;
  border-radius: 50%;
  background: var(--cream);
  border: 1px solid var(--ink);
  transform: translate(-50%, -50%);
  z-index: 4;
}

.door {
  position: relative;
  display: grid;
  grid-template-rows: auto 1fr auto;
  padding: clamp(2rem, 4vw, 3.5rem) clamp(1.6rem, 3.5vw, 3rem);
  text-decoration: none;
  color: inherit;
  overflow: hidden;
  isolation: isolate;
  transition:
    background var(--t-base) var(--ease),
    color var(--t-base) var(--ease),
    flex var(--t-base) var(--ease);
}

/* ===== TRAVEL door — midnight + persimmon ===== */
.door--travel {
  background: #0f1418;          /* matches travel midnight */
  color: #f4f1ea;
}
.door--travel .door__art {
  display: none;   /* Director: solid dark, no background photo — readability first */
}
.door--travel .door__art img {
  position: absolute;
  inset: 0;
  width: 100%; height: 100%;
  object-fit: cover;
  filter: saturate(1.05) contrast(1.08) brightness(0.78);
  opacity: 0.55;
  transition: opacity var(--t-slow) var(--ease), transform calc(1200ms * var(--motion) + 1ms) var(--ease);
}
.door--travel .door__art::after {
  /* dark wash + grain */
  content: "";
  position: absolute; inset: 0;
  background:
    linear-gradient(180deg, rgba(15, 20, 24, 0.35) 0%, rgba(15, 20, 24, 0.10) 35%, rgba(15, 20, 24, 0.70) 100%),
    repeating-linear-gradient(0deg, rgba(255, 255, 255, 0.025) 0 1px, transparent 1px 3px);
}
.door--travel:hover .door__art img,
.door--travel:focus-visible .door__art img {
  opacity: 0.78;
  transform: scale(1.025);
}
.door--travel .door__accent { color: #ff3d77; }
.door--travel .door__manifest { color: rgba(244, 241, 234, 0.78); }
.door--travel .door__manifest .n { color: rgba(244, 241, 234, 0.55); }
.door--travel .door__manifest li { border-bottom-color: rgba(244, 241, 234, 0.18); }

/* ===== MUSINGS door — quiet, paper-white ===== */
.door--musings {
  background: #fefdf9;          /* musings paper */
  color: #14131a;
}
.door--musings .door__art {
  position: absolute;
  inset: 0;
  z-index: 0;
  pointer-events: none;
  /* faint ruled-paper lines */
  background-image:
    repeating-linear-gradient(0deg, transparent 0 41px, rgba(20, 19, 26, 0.05) 41px 42px),
    radial-gradient(ellipse at 80% 10%, rgba(79, 100, 80, 0.06) 0%, transparent 55%);
  opacity: 0.85;
}
.door--musings .door__accent { color: #4f6450; }

/* ---- Shared door internals ---- */
.door__head {
  position: relative;
  z-index: 1;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 1rem;
  font-family: var(--mono);
  font-size: var(--fs-cap);
  letter-spacing: 0.22em;
  text-transform: uppercase;
}
.door__vol {
  display: inline-flex;
  align-items: center;
  gap: 0.7rem;
}
.door__vol::before {
  content: "";
  width: 28px; height: 1px;
  background: currentColor;
  opacity: 0.6;
}
.door__no { opacity: 0.6; }

/* Peek-through strip — what's actually inside the room right now */
.door__peek {
  position: relative;
  z-index: 1;
  margin-top: 1.1rem;
  padding-top: 1rem;
  border-top: 1px dotted currentColor;
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 0.4rem 1.2rem;
  align-items: start;
  align-content: start;
  opacity: 0.92;
  /* Fixed height: both doors' peek blocks are identical, so the big names
     (Travel./Musings.) always start on the same line. Title is clamped to 2 lines. */
  height: 7rem;
  overflow: hidden;
}
.door__peek-label {
  font-family: var(--mono);
  font-size: var(--fs-cap);
  letter-spacing: 0.22em;
  text-transform: uppercase;
  opacity: 0.6;
}
.door__peek-date {
  font-family: var(--mono);
  font-size: var(--fs-cap);
  letter-spacing: 0.22em;
  text-transform: uppercase;
  opacity: 0.6;
  justify-self: end;
}
.door__peek-title {
  grid-column: 1 / -1;
  font-family: var(--serif);
  font-style: italic;
  font-weight: 400;
  font-size: clamp(1.05rem, 1.5vw, 1.3rem);
  line-height: 1.3;
  font-variation-settings: "opsz" 22;
  letter-spacing: -0.005em;
  max-width: 30ch;
  /* Lock to exactly 2 lines so both doors stay the same height and the names align,
     no matter how long a post title is (longer titles truncate cleanly). */
  display: -webkit-box;
  -webkit-line-clamp: 2;
  line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  min-height: calc(1.3em * 2);
}
.door--travel .door__peek-title { color: #f4f1ea; }   /* was harsh fuchsia — cream reads clean on the dark door */
.door--musings .door__peek-title { color: #4f6450; }
.door--travel .door__peek { border-top-color: rgba(244, 241, 234, 0.22); }
.door--musings .door__peek { border-top-color: rgba(20, 19, 26, 0.18); }

.door__body {
  position: relative;
  z-index: 1;
  align-self: start;   /* top-align so both names start on the same line (was center) */
  padding-block: clamp(2rem, 4vw, 3rem);
}
.door__name {
  font-family: var(--serif);
  font-weight: 400;
  font-size: clamp(4rem, 11vw, 9.5rem);
  line-height: 0.9;
  letter-spacing: -0.04em;
  font-variation-settings: "opsz" 72;
}
.door__name em {
  font-style: italic;
  font-variation-settings: "opsz" 72;
}
.door--travel .door__name em { color: #ff3d77; margin-left: 0.08em; }   /* nudge the period off the "l" */
.door--musings .door__name { font-style: italic; color: #14131a; opacity: 0.85; }   /* Musings voice: italic, same grey as the marginalia (ink @ 85%) */
.door--musings .door__name em { color: #4f6450; margin-left: 0.08em; }   /* green accent period (parallel to Travel's pink) */

.door__lede {
  font-family: var(--serif);
  font-size: clamp(1.1rem, 1.5vw, 1.4rem);
  line-height: 1.45;
  font-style: italic;
  font-variation-settings: "opsz" 22;
  max-width: 32ch;
  margin-top: 1.6rem;
  color: inherit;
  opacity: 0.85;
  min-height: calc(1.45em * 5);   /* reserve 5 lines so both doors' manifests stay aligned */
}

.door__manifest {
  list-style: none;
  margin: 1.8rem 0 0;
  padding: 0;
  display: grid;
  gap: 0.55rem;
  font-family: var(--mono);
  font-size: var(--fs-cap);
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--ink-soft);
}
.door__manifest li {
  display: grid;
  grid-template-columns: 36px 1fr auto;
  gap: 1rem;
  align-items: baseline;
  padding-block: 0.35rem;
  border-bottom: 1px dotted rgba(33, 28, 20, 0.22);
}
.door--musings .door__manifest li { border-bottom-color: rgba(20, 19, 26, 0.18); }
.door__manifest .n { color: var(--muted); }
.door__manifest .c { font-size: 12px; opacity: 0.65; }

.door__foot {
  position: relative;
  z-index: 1;
  display: flex;
  justify-content: space-between;
  align-items: end;
  gap: 1rem;
  padding-top: 1.6rem;
  border-top: 1px solid currentColor;
}
.door__foot .place {
  font-family: var(--serif);
  font-style: italic;
  font-size: 1.05rem;
  opacity: 0.7;
  max-width: 28ch;
  line-height: 1.4;
}
.door__cta {
  font-family: var(--mono);
  font-size: var(--fs-cap);
  letter-spacing: 0.22em;
  text-transform: uppercase;
  display: inline-flex;
  align-items: center;
  gap: 0.8rem;
  padding: 0.7rem 0;
  border-bottom: 1px solid currentColor;
  transition: gap var(--t-base) var(--ease), color var(--t-base) var(--ease);
}
.door__cta .arr { display: inline-block; transition: transform var(--t-base) var(--ease); }
.door:hover .door__cta { gap: 1.2rem; }
.door--travel:hover .door__cta { color: #ff3d77; }
.door--musings:hover .door__cta { color: #4f6450; }
.door:hover .door__cta .arr { transform: translateX(6px); }

/* Door focus halo (accessibility) */
.door:focus-visible {
  outline: 0;
  box-shadow: inset 0 0 0 2px var(--accent);
}

/* Hover treatment — no column resize (that caused the seam to jump).
   Instead, subtly settle the un-hovered door into a quieter state. */
@media (min-width: 900px) and (hover: hover) {
  .doors:has(.door:hover) .door:not(:hover),
  .doors:has(.door:focus-visible) .door:not(:focus-visible) {
    opacity: 0.72;
    transition: opacity var(--t-slow) var(--ease);
  }
  .doors .door {
    transition:
      opacity var(--t-base) var(--ease),
      background var(--t-base) var(--ease);
  }
}

/* Mobile: stack the doors */
@media (max-width: 900px) {
  .doors {
    grid-template-columns: 1fr;
    min-height: auto;
  }
  .doors::before {
    top: auto;
    left: 0; right: 0;
    width: auto; height: 1px;
    top: 50%;
  }
  .doors::after { top: 50%; }
  .door { min-height: 78vw; }
  .door__name { font-size: clamp(3.5rem, 18vw, 6rem); }
}

/* ---- Below the doors: editorial postscript ---- */
.postscript {
  width: min(1440px, 100% - calc(var(--gutter) * 2));   /* match the doors' width */
  margin: clamp(2.5rem, 5vw, 4rem) auto 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  gap: 2rem;
  padding-block: 2.5rem 3rem;
}
.postscript__eyebrow {
  font-family: var(--mono);
  font-size: var(--fs-cap);
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--muted);
  font-weight: 400;
  margin: 0;
}
.postscript__cols {
  width: 100%;
  columns: 2;
  column-gap: clamp(2.5rem, 5vw, 5rem);
  text-align: left;
}
.postscript__cols p {
  font-size: clamp(0.95rem, 1.2vw, 1.15rem);
  line-height: 1.65;
  color: var(--ink-soft);
  margin: 0;
  break-inside: avoid;          /* keep each paragraph whole in its column */
}
.postscript__cols p + p { margin-top: 1.2rem; }   /* space between the two paragraphs */
.postscript__col h3 {
  font-family: var(--mono);
  font-size: var(--fs-cap);
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--muted);
  margin-bottom: 1.2rem;
  font-weight: 400;
}
.postscript__col p {
  font-size: clamp(1.2rem, 1.7vw, 1.5rem);
  line-height: 1.6;
  color: var(--ink-soft);
}
.postscript__col em { font-style: italic; }
.postscript__col strong { font-weight: 500; color: var(--ink); }

.postscript__note {
  font-family: var(--serif);
  font-style: italic;
  font-size: clamp(1.2rem, 1.9vw, 1.6rem);
  line-height: 1.45;
  font-variation-settings: "opsz" 22;
  text-align: center;
  color: var(--ink);
  max-width: 36ch;
  margin-inline: auto;
}
.postscript__note::before,
.postscript__note::after {
  content: "—";
  display: block;
  font-style: normal;
  color: var(--accent);
  font-family: var(--mono);
  margin-block: 0.6rem;
  letter-spacing: 0.2em;
}

.postscript__signature {
  text-align: center;
  font-family: var(--mono);
  font-size: var(--fs-cap);
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--muted);
  line-height: 1.8;
}
.postscript__signature strong {
  font-family: var(--serif);
  font-style: italic;
  font-weight: 400;
  font-size: 1.4rem;
  display: block;
  color: var(--ink);
  letter-spacing: -0.005em;
  text-transform: none;
}

@media (max-width: 900px) {
  .postscript { grid-template-columns: 1fr; text-align: left; }
  .postscript__signature { text-align: left; }
}

/* ---- A quiet "What's new" ribbon ---- */
.dispatch {
  width: min(1440px, 100% - calc(var(--gutter) * 2));
  margin-inline: auto;
  margin-bottom: clamp(2rem, 4vw, 3rem);
  display: grid;
  grid-template-columns: auto 1fr auto;
  gap: 2rem;
  align-items: center;
  padding: 1rem 1.4rem;
  border-block: 1px solid var(--rule);
  font-family: var(--mono);
  font-size: var(--fs-cap);
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--muted);
}
.dispatch__label {
  color: var(--accent);
  display: inline-flex;
  align-items: center;
  gap: 0.6rem;
}
.dispatch__label::before {
  content: "";
  width: 7px; height: 7px;
  background: var(--accent);
  border-radius: 50%;
  animation: pulse calc(2400ms * var(--motion) + 1ms) ease-in-out infinite;
}
.dispatch__body {
  color: var(--ink);
  font-family: var(--serif);
  font-style: italic;
  font-size: 1.05rem;
  letter-spacing: 0;
  text-transform: none;
  font-variation-settings: "opsz" 18;
}
.dispatch__body strong { font-weight: 500; }
.dispatch__date {
  white-space: nowrap;
}

@media (max-width: 760px) {
  .dispatch {
    grid-template-columns: 1fr;
    gap: 0.4rem;
    text-align: left;
  }
}

/* Hero rise on landing */
.landing-prelude > *,
.dispatch,
.doors,
.postscript {
  opacity: 0;
  transform: translateY(calc(10px * var(--motion)));
  animation: hero-rise calc(900ms * var(--motion) + 1ms) var(--ease) forwards;
}
.landing-prelude > *:nth-child(1) { animation-delay:  60ms; }
.landing-prelude > *:nth-child(2) { animation-delay: 180ms; }
.landing-prelude > *:nth-child(3) { animation-delay: 280ms; }
.dispatch                           { animation-delay: 380ms; }
.doors                              { animation-delay: 460ms; }
.postscript                         { animation-delay: 720ms; }

@keyframes hero-rise {
  to { opacity: 1; transform: none; }
}
