/* ═══════════════════════════════════════════════════════════════════
   LIMINAL ISLAND
   Mobile first. Two typefaces, four inks, no accent colour on light
   ground. Colour arrives through photographs.
   ═══════════════════════════════════════════════════════════════════ */

:root{
  /* grounds */
  --paper:        #F2EDE6;  /* page background — never pure white */
  --sand:         #DDD3C4;  /* second surface, alternating bands */

  /* atmosphere — decorative only, NEVER text */
  --sky-violet:   #9689B5;
  --lilac:        #9682A8;
  --pale-sky:     #C4DBED;
  --horizon:      #A58492;
  --blush:        #D3C7C3;

  /* sea */
  --sea:          #47A3BF;
  --deep-sea:     #1D7B88;
  --shallows:     #B5D3E3;

  /* inks — the ONLY text colours */
  --ink:          #251F33;  /* 13.6:1 — all text, buttons, links */
  --deep-haze:    #3B3247;  /* 10.4:1 — long-form body */
  --slate:        #4A4060;  /*  8.2:1 — secondary text */
  --dusk:         #5D4D59;  /*  6.8:1 — captions, meta */

  /* measure & rhythm */
  --measure:      58ch;
  --gutter:       clamp(1.375rem, 5.5vw, 4.5rem);
  --band-y:       clamp(4.5rem, 13vw, 10rem);
  --wide:         84rem;

  --serif:  "Fraunces", Georgia, "Times New Roman", serif;
  --sans:   "Archivo", "Helvetica Neue", Arial, sans-serif;
}

/* ── reset ──────────────────────────────────────────────────────── */

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

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

body{
  margin: 0;
  background: var(--paper);
  color: var(--deep-haze);
  font-family: var(--serif);
  font-optical-sizing: auto;
  font-synthesis-weight: none;
  text-rendering: optimizeLegibility;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

img{ max-width: 100%; height: auto; display: block; }
h1, h2, h3, p, figure, blockquote, ul{ margin: 0; }
ul{ list-style: none; padding: 0; }
hr{ border: 0; }

a{ color: var(--ink); }

:focus-visible{
  outline: 2px solid var(--ink);
  outline-offset: 3px;
}

.vh{
  position: absolute; width: 1px; height: 1px;
  margin: -1px; padding: 0; border: 0;
  clip-path: inset(50%); overflow: hidden; white-space: nowrap;
}

.skip{
  position: absolute; left: -9999px; top: 0; z-index: 200;
  background: var(--paper); color: var(--ink);
  font-family: var(--sans); font-size: .75rem;
  letter-spacing: .2em; text-transform: lowercase;
  padding: .9rem 1.25rem; border: 1px solid var(--ink);
}
.skip:focus{ left: .75rem; top: .75rem; }

/* ── layout ─────────────────────────────────────────────────────── */

.band{
  position: relative;
  padding: var(--band-y) var(--gutter);
}
.band--paper{ background: var(--paper); }
.band--sand { background: var(--sand); }

/* atmosphere: a large field, never anything that holds text */
.band--sea::before{
  content: "";
  position: absolute; inset: 0;
  background: linear-gradient(180deg,
    color-mix(in srgb, var(--shallows) 62%, transparent) 0%,
    transparent 62%);
  pointer-events: none;
}
.band--sea > *{ position: relative; }

/* One column, one left edge. Prose narrows to its measure inside it —
   the page never re-centres itself from section to section. */
.wrap{
  max-width: var(--wide);
  margin-inline: auto;
}
.wrap--wide{ max-width: var(--wide); }

/* ── masthead ───────────────────────────────────────────────────── */

.masthead{
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  gap: 1rem clamp(1rem, 4vw, 2.5rem);
  padding: clamp(1.25rem, 3.5vw, 2.25rem) var(--gutter);
  background: var(--paper);
}

.wordmark{
  font-family: var(--serif);
  font-variation-settings: "opsz" 48, "SOFT" 55, "WONK" 1;
  font-weight: 500;
  font-size: clamp(1.25rem, 2.6vw, 1.5rem);
  letter-spacing: -.01em;
  color: var(--ink);
  text-decoration: none;
  margin-right: auto;
}

.nav__list{
  display: flex;
  align-items: center;
  gap: clamp(1rem, 3.5vw, 2.25rem);
}

.nav__list a,
.nav__soon{
  font-family: var(--sans);
  font-variation-settings: "wdth" 100;
  font-size: .6875rem;
  font-weight: 400;
  letter-spacing: .22em;
  text-transform: lowercase;
}

.nav__list a:not(.button){
  color: var(--ink);
  text-decoration: none;
  border-bottom: 1px solid transparent;
  padding-bottom: .2em;
}
.nav__list a:not(.button):hover{ border-bottom-color: var(--ink); }

/* not a destination yet — styled as preview, deliberately inert */
.nav__soon{ color: var(--dusk); }

/* ── type ───────────────────────────────────────────────────────── */

.display{
  font-family: var(--serif);
  font-variation-settings: "opsz" 144, "SOFT" 55, "WONK" 1;
  font-weight: 400;
  color: var(--ink);
  line-height: .98;
  letter-spacing: -.018em;
  text-wrap: balance;
}
.display--xl{ font-size: clamp(2.875rem, 8vw, 6.25rem); }
.display--md{
  font-size: clamp(2.25rem, 6.5vw, 4rem);
  font-variation-settings: "opsz" 110, "SOFT" 55, "WONK" 1;
  line-height: 1.02;
}

.standfirst{
  font-family: var(--serif);
  font-style: italic;
  font-variation-settings: "opsz" 60, "SOFT" 45, "WONK" 1;
  font-weight: 300;
  font-size: clamp(1.3125rem, 3vw, 2rem);
  line-height: 1.3;
  color: var(--slate);
  max-width: 30ch;
  margin-top: clamp(1.75rem, 5vw, 3rem);
}

.opener{
  font-family: var(--serif);
  font-style: italic;
  font-variation-settings: "opsz" 90, "SOFT" 55, "WONK" 1;
  font-weight: 400;
  font-size: clamp(1.875rem, 5.5vw, 3.25rem);
  line-height: 1.1;
  letter-spacing: -.012em;
  color: var(--ink);
  max-width: 22ch;
  text-wrap: balance;
}

/* Archivo, small, tracked. 0.2em+ on labels; a touch less on sentences,
   which stop being readable at label tracking. */
.tracked{
  font-family: var(--sans);
  font-variation-settings: "wdth" 100;
  font-size: .75rem;
  font-weight: 400;
  letter-spacing: .22em;
  text-transform: lowercase;
  color: var(--dusk);
}
.tracked--sentence{
  font-size: .875rem;
  letter-spacing: .1em;
  text-transform: none;
  line-height: 1.7;
  max-width: 46ch;
  color: var(--slate);
  margin-top: 1.5rem;
}
.muted{ color: var(--dusk); }

/* body prose — ragged right, never justified */
.prose{
  font-family: var(--serif);
  font-variation-settings: "opsz" 24, "SOFT" 30, "WONK" 0;
  font-weight: 400;
  font-size: 1.1875rem;   /* 19px */
  line-height: 1.62;
  color: var(--deep-haze);
  max-width: var(--measure);
  text-align: left;
  hyphens: none;
  margin-top: clamp(2rem, 5vw, 3.25rem);
}
.prose p + p{ margin-top: 1.35em; }
.prose strong{
  font-weight: 600;
  font-variation-settings: "opsz" 24, "SOFT" 30, "WONK" 0;
  color: var(--ink);
}

.pullquote{
  font-family: var(--serif);
  font-style: italic;
  font-variation-settings: "opsz" 100, "SOFT" 60, "WONK" 1;
  font-weight: 300;
  font-size: clamp(1.5rem, 4vw, 2.375rem);
  line-height: 1.24;
  letter-spacing: -.01em;
  color: var(--ink);
  max-width: 26ch;
  margin-top: clamp(2.5rem, 6vw, 4rem);
}

/* drawn, not coded — fades at both ends */
.rule{
  height: 1px;
  background: var(--ink);
  opacity: .28;
  margin: clamp(3rem, 8vw, 5.5rem) 0 0;
  -webkit-mask-image: linear-gradient(90deg, transparent 0%, #000 16%, #000 84%, transparent 100%);
          mask-image: linear-gradient(90deg, transparent 0%, #000 16%, #000 84%, transparent 100%);
}

/* ── hero ───────────────────────────────────────────────────────── */

.hero{ padding-bottom: 0; padding-top: clamp(1.5rem, 5vw, 4rem); }
.hero .display--xl{ max-width: 15ch; }

/* Twilight — the weather of the photograph laid over the band, so the plate
   sits in a sky rather than on paper. A field, never behind anything that
   has to stay legible: the type keeps its own column to the left. */
.hero--twilight::before{
  content: "";
  position: absolute; inset: 0;
  background: linear-gradient(180deg,
    color-mix(in srgb, var(--pale-sky) 56%, transparent) 0%,
    color-mix(in srgb, var(--shallows) 32%, transparent) 40%,
    transparent 76%);
  pointer-events: none;
}
.hero--twilight > *{ position: relative; }

/* The type holds the left edge; the plate takes the right of the same row
   once there is room for both. Below that they stack, type first. */
.hero__grid{
  display: grid;
  grid-template-columns: 1fr;
  gap: clamp(3rem, 9vw, 6.5rem);
}
@media (min-width: 64em){
  .hero__grid{
    grid-template-columns: minmax(0, 1fr) auto;
    gap: clamp(2.5rem, 5vw, 5rem);
    align-items: end;
  }
}

/* ── figures ────────────────────────────────────────────────────── */

.figure{
  position: relative;
  overflow: hidden;
  background: var(--sand);
}
.figure img{ width: 100%; }
/* photograph not dropped in yet — leave the field, drop the broken glyph */
.figure.is-missing img{ visibility: hidden; }

/* The hero plate. The photograph is 2:3 and the picture is the vertical
   line down it — moon, mountain, reflection — so it is held whole and
   contained rather than bled and cropped to a band. Capped against the
   viewport height too: the opening should be seen in one look. */
.figure--plate{ aspect-ratio: 2 / 3; width: 100%; }
.figure--plate img{ height: 100%; object-fit: cover; }
@media (min-width: 64em){
  .figure--plate{ width: min(30rem, 46vh); }
}

/* atmosphere fields standing in until the photographs land */
.tone-shallows{ background: color-mix(in srgb, var(--shallows) 70%, var(--sand)); }
.tone-sea     { background: color-mix(in srgb, var(--sea)      34%, var(--sand)); }
.tone-lilac   { background: color-mix(in srgb, var(--lilac)    34%, var(--sand)); }
.tone-horizon { background: color-mix(in srgb, var(--horizon)  34%, var(--sand)); }
.tone-blush   { background: color-mix(in srgb, var(--blush)    62%, var(--sand)); }
.tone-deep    { background: color-mix(in srgb, var(--deep-sea) 30%, var(--sand)); }
/* --blush is too close to --sand to read as a field on its own, so a frame
   standing empty uses this instead. Keep .tone-blush for plates that have a
   photograph over them. */
.tone-pale-sky{ background: color-mix(in srgb, var(--pale-sky) 60%, var(--sand)); }

/* ── gateways ───────────────────────────────────────────────────── */

.gateways{
  display: grid;
  grid-template-columns: 1fr;
  gap: clamp(2.5rem, 6vw, 3.5rem) clamp(1.25rem, 2.5vw, 2rem);
  margin-top: clamp(2.75rem, 7vw, 4.5rem);
}
@media (min-width: 40em){
  .gateways{ grid-template-columns: repeat(2, 1fr); }
}
@media (min-width: 60em){
  .gateways{ grid-template-columns: repeat(3, 1fr); }
}
@media (min-width: 84em){
  .gateways{ grid-template-columns: repeat(5, 1fr); }
}

.gateway .figure{ aspect-ratio: 4 / 5; }
.gateway .figure img{ height: 100%; object-fit: cover; }

/* a plate, not a billboard — past the first breakpoint the print stays a
   hand's width however wide the column gets */
@media (min-width: 40em){
  .gateway .figure{ max-width: 19rem; }
}

.gateway__name{
  font-family: var(--serif);
  font-variation-settings: "opsz" 40, "SOFT" 55, "WONK" 1;
  font-weight: 400;
  font-size: clamp(1.5rem, 2.4vw, 1.75rem);
  line-height: 1.12;
  letter-spacing: -.01em;
  color: var(--ink);
  margin-top: 1.25rem;
  text-wrap: balance;
}

.gateway__note{
  font-family: var(--sans);
  font-variation-settings: "wdth" 100;
  font-size: .8125rem;
  font-weight: 400;
  line-height: 1.62;
  letter-spacing: .012em;
  color: var(--dusk);
  margin-top: .6rem;
  max-width: 34ch;
}

#gateways .tracked--sentence.muted{ margin-top: clamp(2.5rem, 6vw, 4rem); }

/* ── buttons & fields ───────────────────────────────────────────── */

.button{
  display: inline-block;
  font-family: var(--sans);
  font-variation-settings: "wdth" 100;
  font-size: .75rem;
  font-weight: 500;
  letter-spacing: .22em;
  text-transform: lowercase;
  color: var(--ink);
  background: transparent;
  border: 1px solid var(--ink);
  border-radius: 2px;
  padding: 1.05rem 1.6rem;
  text-decoration: none;
  cursor: pointer;
  transition: background-color .18s ease, color .18s ease;
}
.button:hover{ background: var(--ink); color: var(--paper); }
.button--sm{ padding: .6rem 1.05rem; }

.field{
  font-family: var(--sans);
  font-variation-settings: "wdth" 100;
  font-size: .9375rem;
  font-weight: 400;
  letter-spacing: .02em;
  color: var(--ink);
  background: transparent;
  border: 1px solid color-mix(in srgb, var(--ink) 45%, transparent);
  border-radius: 2px;
  padding: 1rem 1.1rem;
  width: 100%;
  min-width: 0;
}
.field::placeholder{ color: var(--dusk); opacity: 1; }
.field:focus{ border-color: var(--ink); }
.field:focus-visible{ outline-offset: 1px; }

/* ── signup ─────────────────────────────────────────────────────── */

.signup{ margin-top: clamp(2.25rem, 5vw, 3rem); }

.signup__row{
  display: flex;
  flex-direction: column;
  gap: .75rem;
  max-width: 34rem;
}
@media (min-width: 34em){
  .signup__row{ flex-direction: row; align-items: stretch; }
  .signup__row .field{ flex: 1 1 auto; }
  .signup__row .button{ flex: 0 0 auto; }
}

.signup__bot{
  position: absolute;
  left: -9999px;
}

.signup__note{
  font-family: var(--sans);
  font-variation-settings: "wdth" 100;
  font-size: .75rem;
  line-height: 1.65;
  letter-spacing: .05em;
  color: var(--dusk);
  max-width: 44ch;
  margin-top: 1.1rem;
}

.signup__message{
  font-family: var(--serif);
  font-variation-settings: "opsz" 24, "SOFT" 30, "WONK" 0;
  font-size: 1.0625rem;
  line-height: 1.55;
  color: var(--ink);
  max-width: 40ch;
  margin-top: 1.1rem;
}
.signup__message:empty{ margin-top: 0; }

/* error state: heavier ink and a mark. never a red. */
.signup__message--error{
  font-weight: 600;
  display: flex;
  gap: .55rem;
  align-items: baseline;
}
.signup__message--error svg{
  flex: 0 0 auto;
  width: .85em; height: .85em;
  transform: translateY(.05em);
}

.signup.is-done .signup__row,
.signup.is-done .signup__note{ display: none; }
.signup.is-done .signup__message{
  font-size: clamp(1.1875rem, 2.2vw, 1.4375rem);
  margin-top: 0;
}

/* ── one to one ─────────────────────────────────────────────────── */

.price{
  font-family: var(--sans);
  font-variation-settings: "wdth" 100;
  font-size: .8125rem;
  letter-spacing: .2em;
  text-transform: lowercase;
  color: var(--ink);
  margin-top: clamp(2.25rem, 5vw, 3rem);
}
.price .nav__soon{ font-size: inherit; letter-spacing: inherit; }

/* ── footer ─────────────────────────────────────────────────────── */

.footer .rule{ margin-top: clamp(3rem, 8vw, 5rem); }

.footer__grid{
  display: grid;
  grid-template-columns: 1fr;
  gap: clamp(2.25rem, 5vw, 3rem);
}
@media (min-width: 48em){
  .footer__grid{ grid-template-columns: 1.4fr 1fr 1fr; }
}

.footer__mark{
  font-family: var(--serif);
  font-variation-settings: "opsz" 48, "SOFT" 55, "WONK" 1;
  font-weight: 500;
  font-size: 1.375rem;
  color: var(--ink);
}
.footer__line{
  font-family: var(--serif);
  font-style: italic;
  font-variation-settings: "opsz" 40, "SOFT" 45, "WONK" 1;
  font-weight: 300;
  font-size: 1.0625rem;
  color: var(--slate);
  margin-top: .4rem;
}

.footer__list{ display: grid; gap: .8rem; }
.footer__list a,
.footer__list .nav__soon{
  font-family: var(--sans);
  font-variation-settings: "wdth" 100;
  font-size: .75rem;
  letter-spacing: .18em;
  text-transform: lowercase;
}
.footer__list a{
  color: var(--ink);
  text-decoration: none;
  border-bottom: 1px solid transparent;
  padding-bottom: .15em;
}
.footer__list a:hover{ border-bottom-color: var(--ink); }

.footer__base{
  margin-top: clamp(1.75rem, 4vw, 2.5rem);
  display: grid;
  gap: .7rem;
}
.footer__base p{
  font-family: var(--sans);
  font-variation-settings: "wdth" 100;
  font-size: .6875rem;
  line-height: 1.7;
  letter-spacing: .06em;
  color: var(--dusk);
  max-width: 66ch;
}
.footer__base a{ color: var(--dusk); text-decoration: underline; text-underline-offset: .2em; }
.footer__base a:hover{ color: var(--ink); }
.footer__base .nav__soon{ font-size: inherit; letter-spacing: inherit; text-transform: none; }

/* ── 404 ────────────────────────────────────────────────────────── */

/* photograph full-bleed, type under it on paper — guarantees the copy
   keeps its contrast whatever photograph lands here */
.gone{
  display: grid;
  grid-template-rows: minmax(52svh, 1fr) auto;
  min-height: calc(100svh - 5.5rem);
  background: var(--paper);
}
/* min-height:0 so the photograph's intrinsic height can't blow the row out */
.gone__plate{
  position: relative;
  overflow: hidden;
  min-height: 0;
  background: color-mix(in srgb, var(--deep-sea) 30%, var(--sand));
}
/* the source is near-square; hold the swimmer and the moon through the crop */
.gone__plate img{
  position: absolute; inset: 0;
  width: 100%; height: 100%;
  object-fit: cover;
  object-position: 62% 58%;
}
.gone__plate.is-missing img{ visibility: hidden; }
.gone__type{
  padding: clamp(2.5rem, 7vw, 5rem) var(--gutter) clamp(3rem, 8vw, 6rem);
}
.gone__line{
  font-family: var(--serif);
  font-style: italic;
  font-variation-settings: "opsz" 120, "SOFT" 60, "WONK" 1;
  font-weight: 300;
  font-size: clamp(2rem, 7vw, 4.5rem);
  line-height: 1.05;
  letter-spacing: -.015em;
  color: var(--ink);
  max-width: 14ch;
}
.gone__back{
  display: inline-block;
  font-family: var(--sans);
  font-variation-settings: "wdth" 100;
  font-size: .75rem;
  letter-spacing: .22em;
  text-transform: lowercase;
  color: var(--ink);
  text-decoration: none;
  border-bottom: 1px solid var(--ink);
  padding-bottom: .25em;
  margin-top: clamp(1.5rem, 4vw, 2.25rem);
}

/* ── grain ──────────────────────────────────────────────────────── */

.grain{
  position: fixed;
  inset: 0;
  width: 100vw;
  height: 100vh;
  opacity: .4;
  mix-blend-mode: multiply;
  pointer-events: none;
  z-index: 90;
}

/* ── reveal ─────────────────────────────────────────────────────── */

.js .reveal{
  opacity: 0;
  transition: opacity 1.1s ease;
}
.js .reveal.is-in{ opacity: 1; }

@media (prefers-reduced-motion: reduce){
  html{ scroll-behavior: auto; }
  .js .reveal{ opacity: 1; transition: none; }
  *, *::before, *::after{
    animation-duration: .01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: .01ms !important;
  }
}
