/* ==========================================================================
   HAVEN. — the page itself: ground, type, the two buttons and the small
   editorial pieces every chapter uses.
   ========================================================================== */
*, *::before, *::after { box-sizing: border-box; }

html { -webkit-text-size-adjust: 100%; }

body {
  margin: 0;
  background: var(--chalk);
  color: var(--ink);
  font-family: var(--sans);
  font-size: 17px;
  line-height: 1.55;
  font-weight: 400;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

img { display: block; max-width: 100%; }
figure { margin: 0; }
ul, ol { margin: 0; padding: 0; list-style: none; }
button { font: inherit; color: inherit; }

a { color: inherit; }
a:focus-visible, button:focus-visible, input:focus-visible,
select:focus-visible, textarea:focus-visible {
  outline: 2px solid var(--deep);
  outline-offset: 3px;
}

.wrap { width: var(--wrap); margin-inline: auto; }

/* --- the one z-index that matters ---------------------------------------
   The lens is a fixed window at z-index 3 (see lens.css). Everything that
   must read OVER it says so here, once; everything else — section grounds,
   the empty station frames — stays below and is passed in front of. */
.wrap, .horizon__type, .horizon__cue, .head, .menu, .panel, .scrim, .skip {
  position: relative;
  z-index: 4;
}

main > section { position: relative; }

/* --- type ---------------------------------------------------------------- */
.display {
  font-family: var(--serif);
  font-weight: 400;
  line-height: .96;
  letter-spacing: -.01em;
  margin: 0;
}
.d-huge { font-size: var(--d-huge); }
.d-big  { font-size: var(--d-big); }
.d-mid  { font-size: var(--d-mid); line-height: 1.06; }

/* The editorial label. There is no monospace on this page: the small
   functional type is the same grotesk, tracked out and set in caps. A
   typewriter face would have made a warm island magazine read like a
   dashboard. */
.label {
  font-size: .69rem;
  font-weight: 600;
  letter-spacing: .18em;
  text-transform: uppercase;
  line-height: 1.5;
  margin: 0;
}

.eyebrow { color: var(--deep); margin-bottom: 1.6rem; }

.lead {
  font-size: clamp(1.05rem, 1.5vw, 1.28rem);
  line-height: 1.5;
  color: var(--ink-70);
  max-width: 46ch;
  margin: 1.4rem 0 0;
}
.lead--small { font-size: 1rem; max-width: 42ch; }

.hint { color: var(--ink-45); margin-top: 1.4rem; }

/* Demo notes are part of the work, not an apology: this is a fictional brand
   and every page that shows one owes the reader that sentence. */
.demo-note {
  font-size: .78rem;
  line-height: 1.5;
  color: var(--ink-45);
  max-width: 60ch;
  margin: 2.4rem 0 0;
  padding-left: 1rem;
  border-left: 1px solid var(--ink-18);
}

/* --- buttons -------------------------------------------------------------- */
.btn {
  display: inline-flex;
  align-items: center;
  gap: .7rem;
  font-size: .74rem;
  font-weight: 600;
  letter-spacing: .16em;
  text-transform: uppercase;
  text-decoration: none;
  padding: 1.05rem 1.6rem;
  border: 1px solid var(--ink);
  background: none;
  cursor: pointer;
  transition: background .32s var(--ease), color .32s var(--ease);
}
.btn--solid { background: var(--ink); color: var(--chalk); border-color: var(--ink); }
.btn--solid:hover { background: var(--deep); border-color: var(--deep); }
.btn--quiet { border-color: transparent; padding-inline: .2rem; }
.btn--quiet::after {
  content: '';
  position: absolute; left: .2rem; right: .2rem; bottom: .85rem;
  height: 1px; background: currentColor;
  transform: scaleX(1); transform-origin: left;
  transition: transform .38s var(--ease);
}
.btn--quiet { position: relative; }
.btn--quiet:hover::after { transform: scaleX(.35); }
.btn__arrow { transition: transform .38s var(--ease); }
.btn:hover .btn__arrow { transform: translateX(.4rem); }

/* --- the shared editorial pieces ------------------------------------------ */

/* A row in a typographic selector. Used by the intentions and by the ways to
   live — one component, two chapters, because they are the same object: a
   large word you press, with a rule that draws itself under it. */
.rows { border-top: 1px solid var(--ink-18); }
.row__hit {
  display: grid;
  grid-template-columns: 2.6rem 1fr auto;
  align-items: baseline;
  gap: 1rem;
  width: 100%;
  padding: 1.15rem 0;
  border: 0;
  border-bottom: 1px solid var(--ink-18);
  background: none;
  text-align: left;
  cursor: pointer;
  position: relative;
}
.row__hit::before {
  content: '';
  position: absolute; left: 0; right: 0; bottom: -1px; height: 1px;
  background: var(--deep);
  transform: scaleX(0); transform-origin: left;
  transition: transform .5s var(--ease);
}
.row__hit[aria-pressed="true"]::before,
.row__hit[aria-expanded="true"]::before { transform: scaleX(1); }
.row__no {
  font-size: .68rem; font-weight: 600; letter-spacing: .14em;
  color: var(--ink-45);
}
.row__title {
  font-family: var(--serif);
  font-size: clamp(1.5rem, 2.6vw, 2.15rem);
  line-height: 1;
  transition: color .3s var(--ease), transform .45s var(--ease);
}
.row__hit:hover .row__title { transform: translateX(.35rem); }
.row__hit[aria-pressed="true"] .row__title,
.row__hit[aria-expanded="true"] .row__title { color: var(--deep); }
.row__mark {
  font-size: .8rem; color: var(--ink-45);
  opacity: 0; transform: translateX(-.5rem);
  transition: opacity .3s var(--ease), transform .3s var(--ease);
}
.row__hit:hover .row__mark,
.row__hit[aria-pressed="true"] .row__mark,
.row__hit[aria-expanded="true"] .row__mark { opacity: 1; transform: none; }
.rows--tight .row__hit { padding: .85rem 0; }
.rows--tight .row__title { font-size: clamp(1.1rem, 1.8vw, 1.4rem); }

/* the little word-set under a preference */
.tags { display: flex; flex-wrap: wrap; gap: .5rem; margin-top: 1.4rem; }
.tags li {
  border: 1px solid var(--ink-18);
  border-radius: 999px;
  padding: .38rem .8rem;
  color: var(--ink-70);
}

.points { margin-top: 1rem; }
.points li {
  font-size: .72rem; font-weight: 600; letter-spacing: .14em;
  text-transform: uppercase;
  padding: .8rem 0;
  border-bottom: 1px solid var(--ink-18);
  display: flex; align-items: center; gap: .8rem;
}
.points li::before {
  content: ''; width: 1.5rem; height: 1px; background: var(--sea); flex: none;
}

.skip {
  position: absolute; left: -9999px; top: 0;
  background: var(--ink); color: var(--chalk);
  padding: 1rem 1.4rem; font-size: .8rem;
}
.skip:focus { left: 0; z-index: 60; }

.noscript {
  max-width: 46rem; margin: 6rem auto; padding: 0 var(--gutter);
  font-size: 1rem; line-height: 1.6;
}

/* the native cursor keeps its meaning: core/cursor.js runs in context mode
   here, so there is no branded dot to style. VÉRA already had one, and a
   second landing with a trailing circle would be the same site twice. */
.cursor { display: none; }
