/* ==========================================================================
   Night City Media — parent brand gateway
   ========================================================================== */

@font-face {
  font-family: "Instrument Sans";
  src: url("../fonts/instrument-sans-latin-wght.woff2") format("woff2-variations"),
       url("../fonts/instrument-sans-latin-wght.woff2") format("woff2");
  font-weight: 400 700;
  font-style: normal;
  font-display: swap;
}

@font-face {
  font-family: "Instrument Serif";
  src: url("../fonts/instrument-serif-latin-italic.woff2") format("woff2");
  font-weight: 400;
  font-style: italic;
  font-display: swap;
}

/* ---------- Tokens ---------- */
:root {
  /* Surfaces */
  --paper: #f3eee6;          /* warm off-white */
  --night: #150c1a;          /* near-black aubergine */
  --plum: #2b1633;           /* deep plum */

  /* Text */
  --ink: #1c1022;
  --ink-soft: #4b3b52;
  --on-night: #f3eee6;
  --on-night-soft: #bdb0c8;

  /* Atmosphere, drawn from the photograph and logo */
  --lavender: #c9bdf2;
  --violet: #8f7fbf;
  --peach: #f5b08a;
  --ember: #f08b2e;
  --violet-ink: #6a5a9e;     /* violet, dark enough for type on paper */

  /* Business accents */
  --records: #b4b8ff;        /* lilac-blue, on night */
  --records-ink: #4b4fb4;    /* lilac-blue, on paper */
  --web: #ff8a66;            /* coral, on night */
  --web-ink: #b5431f;        /* coral, on paper */
  --sephyr: #f2c879;         /* canopy gold, on night */
  --sephyr-ink: #86611a;     /* canopy gold, on paper */

  /* Lines */
  --rule-paper: rgb(28 16 34 / 0.2);
  --rule-night: rgb(243 238 230 / 0.16);

  /* Type */
  --sans: "Instrument Sans", "Helvetica Neue", Arial, sans-serif;
  --serif: "Instrument Serif", "Iowan Old Style", Georgia, serif;

  /* Layout */
  --gutter: clamp(16px, 2.8vw, 48px);
  --gap: clamp(10px, 1.4vw, 24px);

  /* Motion */
  --ease-out: cubic-bezier(0.16, 1, 0.3, 1);
  --ease-soft: cubic-bezier(0.22, 0.61, 0.36, 1);
}

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

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

body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: var(--sans);
  font-size: 1rem;
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  text-rendering: optimizeLegibility;
  overflow-x: clip;
}

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

h1, h2, h3, p, figure, ul { margin: 0; }
ul { padding: 0; list-style: none; }

a {
  color: inherit;
  text-decoration: none;
  -webkit-tap-highlight-color: transparent;
}

:focus-visible {
  outline: 2px solid var(--focus, var(--ink));
  outline-offset: 4px;
  border-radius: 1px;
}

.sprite { position: absolute; width: 0; height: 0; overflow: hidden; }

.icon {
  width: 0.72em;
  height: 0.72em;
  flex: none;
  stroke-width: 1.5;
  stroke-linecap: square;
  overflow: visible;
  transition: transform 0.45s var(--ease-out);
}

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

.skip-link {
  position: absolute;
  top: 12px;
  left: var(--gutter);
  z-index: 100;
  padding: 12px 16px;
  background: var(--ink);
  color: var(--paper);
  font-size: 0.9375rem;
  font-weight: 500;
  transform: translateY(-160%);
  transition: transform 0.2s var(--ease-soft);
}
.skip-link:focus-visible {
  transform: none;
  outline-color: var(--ember);
}

/* ==========================================================================
   Header
   ========================================================================== */
.site-header {
  position: relative;
  z-index: 3;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: clamp(10px, 1.6vw, 22px) var(--gutter) 0;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: clamp(8px, 1vw, 14px);
  min-height: 48px;
}

/* the square sky tile — a small echo of the cover */
.brand__mark {
  width: 48px;
  height: 48px;
  flex: none;
  object-fit: cover;
}

.brand__name {
  font-size: 0.9375rem;
  font-weight: 500;
  letter-spacing: -0.01em;
  line-height: 1.1;
}

/* the one header link: a jump to the contact details further down */
.site-header__contact {
  position: relative;
  display: inline-flex;
  align-items: center;
  min-height: 44px;
  padding: 0 4px;
  font-size: 0.9375rem;
  font-weight: 500;
  letter-spacing: -0.01em;
}

.site-header__contact::after {
  content: "";
  position: absolute;
  left: 4px;
  right: 4px;
  bottom: 8px;
  height: 1px;
  background: currentColor;
  transform-origin: left;
  transition: transform 0.45s var(--ease-out);
}

.site-header__contact:hover::after,
.site-header__contact:focus-visible::after {
  transform: scaleX(0);
  transform-origin: right;
}

/* ==========================================================================
   Hero — editorial cover
   ========================================================================== */
.hero {
  --h1: clamp(64px, min(10.4vw, 21svh), 300px); /* headline size — NIGHTCITY must clear the intro */
  --lh: 0.8;                                     /* headline leading */
  --cut: 1.5;                                    /* lines of headline above the photo edge */

  --plate-ratio: 2.15;

  position: relative;
  display: grid;
  grid-template-columns: repeat(12, minmax(0, 1fr));
  column-gap: var(--gap);
  padding: clamp(20px, 4.2svh, 64px) var(--gutter) 0;
}

/* Night rises behind the lower part of the photograph: dusk above, night below.
   Only visible in the gutters, it lets the plate bridge the two surfaces. */
@media (min-width: 1000px) {
  .hero::after {
    content: "";
    position: absolute;
    inset: auto 0 0;
    height: calc((100vw - 2 * var(--gutter)) / var(--plate-ratio) * 0.3);
    background: var(--night);
  }
}

/* Row 1 is at least --cut headline lines tall, or taller if the intro needs
   the room — so the photograph's top edge never runs through the links. */
.hero::before {
  content: "";
  grid-column: 1;
  grid-row: 1;
  height: calc(var(--h1) * var(--lh) * var(--cut));
}

/* Headline ---------------------------------------------------------------- */
/* The headline sits at the foot of row 1 and hangs half a line into the
   photograph, so MEDIA always straddles the photo's top edge — however tall
   the intro beside it makes that row. */
.headline {
  grid-column: 1 / -1;
  grid-row: 1;
  align-self: end;
  margin-bottom: calc(var(--h1) * var(--lh) * -0.5);
  position: relative;
  z-index: 2;
  display: grid;
  grid-template-columns: subgrid;
  font-size: var(--h1);
  font-weight: 400;
  line-height: var(--lh);
  letter-spacing: -0.062em;
  text-transform: uppercase;
  pointer-events: none;
}

.headline__line {
  display: block;
  white-space: nowrap;
  /* only the bottom edge clips, so lines can rise into place */
  clip-path: inset(-0.3em -0.3em 0 -0.3em);
}

.headline__line > span { display: inline-block; }

.headline__line--1 { grid-column: 1 / -1; }
.headline__line--2 { grid-column: 3 / -1; }

/* Intro: statement + destinations ---------------------------------------- */
.intro {
  grid-column: 8 / -1;
  grid-row: 1;
  position: relative;
  z-index: 2;
  align-self: start;
  /* sits on NIGHT's cap line, and keeps clear air above the photograph */
  padding-top: calc(var(--h1) * 0.012);
  padding-bottom: clamp(18px, 2.2vw, 32px);
}

.intro__statement {
  font-family: var(--serif);
  font-style: italic;
  font-size: clamp(1.625rem, 2.3vw, 2.625rem);
  line-height: 1.02;
  letter-spacing: -0.01em;
  text-wrap: balance;
}

.intro__sub {
  max-width: 40em;
  margin-top: 0.75em;
  color: var(--ink-soft);
  font-size: clamp(0.9375rem, 1.05vw, 1.0625rem);
  line-height: 1.5;
  text-wrap: pretty;
}

.intro__links {
  margin-top: clamp(14px, 1.5vw, 24px);
  border-top: 1px solid var(--rule-paper);
}

.intro__links li { border-bottom: 1px solid var(--rule-paper); }

.dest {
  --accent: var(--ink);
  position: relative;
  display: flex;
  align-items: center;
  gap: 12px;
  min-height: clamp(44px, 3.4vw, 56px);
  padding: 6px 2px 6px 0;
  font-size: clamp(1rem, 1.3vw, 1.3125rem);
  font-weight: 500;
  letter-spacing: -0.015em;
  line-height: 1.2;
  transition: color 0.3s var(--ease-soft);
}

.dest--records { --accent: var(--records-ink); }
.dest--web { --accent: var(--web-ink); }
.dest--sephyr { --accent: var(--sephyr-ink); }

.dest__label {
  display: inline-flex;
  align-items: center;
  gap: 12px;
}

/* small accent marker — the only place the three colours meet on the cover */
.dest__label::before {
  content: "";
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--accent);
  flex: none;
}

/* accent rule that draws across the hairline on hover/focus */
.dest::after {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  bottom: -1px;
  height: 1px;
  background: var(--accent);
  transform: scaleX(0);
  transform-origin: left;
  transition: transform 0.6s var(--ease-out);
}

/* what you'll find there, set quietly before the arrow */
.dest__meta {
  margin-left: auto;
  color: var(--ink-soft);
  font-size: 0.8125rem;
  font-weight: 500;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  white-space: nowrap;
}

.dest .icon { width: 0.9em; height: 0.9em; }

.dest:hover,
.dest:focus-visible { color: var(--accent); }
.dest:hover::after,
.dest:focus-visible::after { transform: scaleX(1); }
.dest:hover .icon,
.dest:focus-visible .icon { transform: translate(3px, -3px); }

/* Photograph plate -------------------------------------------------------- */
.plate {
  grid-column: 1 / -1;
  grid-row: 2;
  position: relative;
  z-index: 1;
  overflow: hidden;
  background: #9d8fd8; /* sky tone while the image decodes */
}

.plate__img {
  width: 100%;
  height: auto;
  aspect-ratio: var(--plate-ratio);
  object-fit: cover;
  object-position: 36% 42%;
}

/* ==========================================================================
   Two worlds
   ========================================================================== */
.worlds {
  --focus: var(--peach);
  position: relative;
  margin-top: clamp(56px, 9vw, 96px);
  padding: clamp(72px, 10vw, 170px) var(--gutter) clamp(56px, 7vw, 120px);
  background: var(--night);
  color: var(--on-night);
}

.worlds:focus { outline: none; }

.worlds__title {
  display: grid;
  font-size: clamp(3rem, 8.4vw, 10rem);
  font-weight: 400;
  line-height: 0.86;
  letter-spacing: -0.055em;
}

.worlds__title-line--2 {
  padding-left: 1.72em;
  font-family: var(--serif);
  font-style: italic;
  letter-spacing: -0.03em;
  color: var(--lavender);
}

.worlds__list {
  position: relative;
  display: grid;
  grid-template-columns: 1fr;
  margin-top: clamp(48px, 7vw, 120px);
}

/* Rules are drawn as lines (not borders) so they can draw themselves in */
.worlds__list::before,
.world + .world::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 1px;
  background: var(--rule-night);
  transform-origin: left center;
}

.world {
  --accent: var(--records);
  position: relative;
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  grid-template-areas:
    "meta    meta"
    "name    arrow"
    "desc    desc"
    "preview preview"
    "body    body"
    "offer   offer"
    "foot    foot";
  align-items: start;
  padding: clamp(22px, 2.6vw, 40px) 0 clamp(36px, 4.4vw, 72px);
}

.world--web { --accent: var(--web); }
.world--sephyr { --accent: var(--sephyr); }

/* "Coming soon" — a quiet outlined tag at the end of the meta line */
.world__tag {
  margin-left: auto;
  padding: 3px 9px 2px;
  border: 1px solid color-mix(in srgb, var(--accent) 55%, transparent);
  border-radius: 999px;
  color: var(--accent);
  font-size: 0.6875rem;
  letter-spacing: 0.1em;
  white-space: nowrap;
}


.world__meta {
  grid-area: meta;
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: clamp(28px, 4vw, 64px);
  font-size: 0.8125rem;
  font-weight: 500;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--on-night-soft);
}

.world__num {
  color: var(--accent);
  font-variant-numeric: tabular-nums;
}

.world__dash {
  width: 28px;
  height: 1px;
  background: currentColor;
}

.world__name {
  grid-area: name;
  align-self: end;
  display: grid;
  font-size: clamp(2.75rem, 12vw, 8.5rem);
  font-weight: 400;
  line-height: 0.84;
  letter-spacing: -0.058em;
  text-transform: uppercase;
  transition: color 0.4s var(--ease-soft);
}

.world__arrow {
  grid-area: arrow;
  width: clamp(40px, 6vw, 104px);
  height: clamp(40px, 6vw, 104px);
  margin-left: 16px;
  stroke-width: 1.25;
  color: var(--accent);
  transition: transform 0.6s var(--ease-out);
}

.world__desc {
  grid-area: desc;
  margin-top: clamp(18px, 2vw, 30px);
  font-family: var(--serif);
  font-style: italic;
  font-size: clamp(1.5rem, 2.3vw, 2.375rem);
  line-height: 1.1;
  color: var(--on-night);
}

.world__preview {
  grid-area: preview;
  margin-top: clamp(24px, 3vw, 44px);
  overflow: hidden;
  border: 1px solid var(--rule-night);
  background: #0d0a14;
}

.world__preview img {
  width: 100%;
  height: auto;
  aspect-ratio: 1897 / 940;
  transition: transform 1.1s var(--ease-out), opacity 0.4s var(--ease-soft);
  opacity: 0.92;
}

/* What each side does and who it is for ---------------------------------- */
.world__body {
  grid-area: body;
  max-width: 38em;
  margin-top: clamp(24px, 2.6vw, 40px);
  color: var(--on-night-soft);
  font-size: clamp(1rem, 1.1vw, 1.125rem);
  line-height: 1.6;
  text-wrap: pretty;
}

.world__body cite { font-style: italic; }

.world__offer {
  grid-area: offer;
  margin-top: clamp(24px, 2.6vw, 40px);
}

.world__label {
  margin: 0 0 10px;
  color: var(--accent);
  font-size: 0.8125rem;
  font-weight: 500;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.world__services {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  column-gap: clamp(16px, 2vw, 32px);
}

.world__services li {
  padding: 11px 0;
  border-top: 1px solid var(--rule-night);
  color: var(--on-night);
  font-size: clamp(0.9375rem, 1vw, 1.0625rem);
  font-weight: 500;
  letter-spacing: -0.01em;
  line-height: 1.3;
}

.world__foot {
  grid-area: foot;
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  justify-content: space-between;
  gap: 8px 24px;
  margin-top: clamp(18px, 2vw, 28px);
  padding-top: clamp(14px, 1.6vw, 22px);
  border-top: 1px solid var(--rule-night);
}

.world__link {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  min-height: 44px;
  font-size: clamp(1.0625rem, 1.4vw, 1.375rem);
  font-weight: 500;
  letter-spacing: -0.015em;
  color: var(--on-night);
  transition: color 0.3s var(--ease-soft);
}

.world__link-label {
  background: linear-gradient(currentColor, currentColor) 0 100% / 100% 1px no-repeat;
  padding-bottom: 3px;
  transition: background-size 0.6s var(--ease-out);
}

.world__link .icon { width: 0.85em; height: 0.85em; }

/* the whole entry is one generous target */
.world__link::after {
  content: "";
  position: absolute;
  inset: 0;
  z-index: 1;
}

.world__link:focus-visible { outline: none; }
.world__link:focus-visible::after {
  outline: 2px solid var(--accent);
  outline-offset: 6px;
}

.world__url {
  font-size: 0.875rem;
  letter-spacing: 0.02em;
  color: var(--on-night-soft);
}

.world:hover .world__name,
.world:focus-within .world__name { color: var(--accent); }
.world:hover .world__link,
.world:focus-within .world__link { color: var(--accent); }
.world:hover .world__arrow,
.world:focus-within .world__arrow { transform: translate(8px, -8px); }
.world:hover .world__link .icon,
.world:focus-within .world__link .icon { transform: translate(3px, -3px); }
.world:hover .world__link-label,
.world:focus-within .world__link-label { background-size: 0 1px; background-position: 100% 100%; }
.world:hover .world__preview img,
.world:focus-within .world__preview img { transform: scale(1.025); opacity: 1; }

/* ==========================================================================
   About — why the two sit together, and how to get in touch
   ========================================================================== */
.about {
  display: grid;
  grid-template-columns: repeat(12, minmax(0, 1fr));
  column-gap: var(--gap);
  row-gap: clamp(32px, 5vw, 56px);
  padding: clamp(72px, 10vw, 160px) var(--gutter);
}

.about__title {
  grid-column: 1 / -1;
  display: grid;
  align-content: start;
  font-size: clamp(2.5rem, 6vw, 6.5rem);
  font-weight: 400;
  line-height: 0.9;
  letter-spacing: -0.05em;
}

.about__title-line--2 {
  padding-left: 1.1em;
  font-family: var(--serif);
  font-style: italic;
  letter-spacing: -0.025em;
  color: var(--violet-ink);
}

.about__body {
  grid-column: 1 / -1;
  max-width: 36em;
  font-size: clamp(1.0625rem, 1.3vw, 1.3125rem);
  line-height: 1.55;
  text-wrap: pretty;
}

.about__body p + p { margin-top: 1em; }

.contact {
  margin-top: clamp(36px, 4.4vw, 64px);
  padding-top: clamp(16px, 1.8vw, 24px);
  border-top: 1px solid var(--rule-paper);
}

.contact__title {
  color: var(--ink-soft);
  font-size: 0.8125rem;
  font-weight: 500;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.contact__text {
  margin-top: 8px;
  color: var(--ink-soft);
  font-size: clamp(0.9375rem, 1.05vw, 1.0625rem);
}

.contact__email {
  display: inline-flex;
  align-items: center;
  min-height: 44px;
  margin-top: 6px;
  font-family: var(--serif);
  font-style: italic;
  font-size: clamp(1.625rem, 3vw, 2.75rem);
  letter-spacing: -0.01em;
  overflow-wrap: anywhere;
  background: linear-gradient(currentColor, currentColor) 0 100% / 100% 1px no-repeat;
  transition: color 0.3s var(--ease-soft), background-size 0.6s var(--ease-out);
}

.contact__email:hover,
.contact__email:focus-visible {
  color: var(--web-ink);
  background-size: 0 1px;
  background-position: 100% 100%;
}

@media (min-width: 900px) {
  .about__title { grid-column: 1 / 7; }
  .about__body { grid-column: 7 / -1; }
}

/* ==========================================================================
   Footer
   ========================================================================== */
.site-footer {
  --focus: var(--peach);
  padding: clamp(28px, 3.4vw, 48px) var(--gutter) clamp(24px, 3vw, 40px);
  background: var(--night);
  color: var(--on-night-soft);
  font-size: 0.875rem;
  border-top: 1px solid var(--rule-night);
}

.site-footer__top {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-start;
  justify-content: space-between;
  gap: 24px 48px;
}

.brand--footer { color: var(--on-night); }
.brand--footer .brand__mark { width: 56px; height: 56px; }

.site-footer__place {
  margin-top: 10px;
  color: var(--on-night-soft);
}

.site-footer__label {
  margin-bottom: 2px;
  color: var(--on-night-soft);
  font-size: 0.75rem;
  font-weight: 500;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.site-footer__social ul {
  display: flex;
  flex-wrap: wrap;
  gap: 0 28px;
}

.site-footer__legal {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  justify-content: space-between;
  gap: 4px 32px;
  margin-top: clamp(20px, 2.4vw, 32px);
  padding-top: clamp(12px, 1.4vw, 18px);
  border-top: 1px solid var(--rule-night);
  font-size: 0.8125rem;
  line-height: 1.55;
}

.site-footer__legal p:first-child { max-width: 62ch; }

.site-footer__company {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0 18px;
}

.site-footer__ch {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  min-height: 44px;
  color: var(--on-night);
  font-weight: 500;
  text-decoration: underline;
  text-decoration-thickness: 1px;
  text-underline-offset: 4px;
  text-decoration-color: var(--rule-night);
  transition: color 0.3s var(--ease-soft), text-decoration-color 0.3s var(--ease-soft);
}

.site-footer__ch:hover,
.site-footer__ch:focus-visible {
  color: var(--peach);
  text-decoration-color: currentColor;
}
.site-footer__ch:hover .icon,
.site-footer__ch:focus-visible .icon { transform: translate(2px, -2px); }

.site-footer__link {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  min-height: 44px;
  color: var(--on-night);
  font-weight: 500;
  transition: color 0.3s var(--ease-soft);
}

.site-footer__link--records:hover { color: var(--records); }
.site-footer__link--web:hover { color: var(--web); }
.site-footer__link:hover .icon,
.site-footer__link:focus-visible .icon { transform: translate(2px, -2px); }

/* ==========================================================================
   Responsive
   ========================================================================== */

/* Shorter laptop screens: tighten the space around the intro so the pumps
   stay in the first view beneath three destination links. */
@media (min-width: 1000px) and (max-height: 820px) {
  .hero { padding-top: 12px; }
  .intro { padding-bottom: 14px; }
  .intro__sub { margin-top: 0.55em; }
  .intro__links { margin-top: 12px; }
}

/* Tablet: intro moves beneath the photograph */
@media (max-width: 999px) {
  .hero { --h1: clamp(56px, min(16.4vw, 30svh), 200px); }

  .headline__line--2 { grid-column: 5 / -1; }

  .intro {
    grid-column: 1 / -1;
    grid-row: 3;
    display: grid;
    grid-template-columns: repeat(12, minmax(0, 1fr));
    column-gap: var(--gap);
    padding-top: clamp(24px, 4vw, 40px);
    padding-bottom: 0;
  }

  .intro__statement,
  .intro__sub { grid-column: 1 / 10; }

  .intro__links {
    grid-column: 1 / -1;
    margin-top: 24px;
  }

  .hero { --plate-ratio: 1.6; }
  .plate__img { object-position: 30% 45%; }
}

/* Phone */
@media (max-width: 699px) {
  .hero {
    --h1: clamp(40px, 18.4vw, 150px);
    padding-top: 12px;
  }

  .headline__line--2 { grid-column: 1 / -1; text-align: right; }

  .intro { display: block; padding-top: 24px; }
  .intro__links { margin-top: 20px; }
  .intro__statement { font-size: 1.875rem; }

  .plate {
    margin-left: calc(var(--gutter) * -1);
    margin-right: calc(var(--gutter) * -1);
  }
  .hero { --plate-ratio: 1.08; }
  .plate__img { object-position: 50% 45%; }

  .site-header .brand__mark { width: 40px; height: 40px; }
  .site-header__contact { font-size: 0.875rem; }
  .world__services { grid-template-columns: 1fr; }
}

@media (max-width: 380px) {
  .dest { flex-wrap: wrap; column-gap: 8px; }
}

/* Phones in landscape: keep the station in the first view */
@media (max-width: 999px) and (max-height: 520px) and (orientation: landscape) {
  .hero {
    --h1: clamp(48px, 21svh, 120px);
    --plate-ratio: 2.15;
  }
}

/* Three worlds side by side from small laptops up */
@media (min-width: 1100px) {
  .worlds__list { grid-template-columns: repeat(3, minmax(0, 1fr)); }

  /* share row tracks across the entries, so previews, copy and links line up */
  @supports (grid-template-rows: subgrid) {
    .world {
      grid-row: span 7;
      grid-template-rows: subgrid;
      row-gap: 0;
    }
  }

  .world { padding-right: clamp(20px, 2.2vw, 44px); }
  .world + .world { padding-left: clamp(20px, 2.2vw, 44px); }
  .world:last-child { padding-right: 0; }

  /* the dividers between the worlds become vertical */
  .world + .world::before {
    right: auto;
    bottom: 0;
    width: 1px;
    height: auto;
    transform-origin: center top;
  }

  /* NIGHTCITY has to fit a third of the width, beside its arrow */
  .world__name { font-size: clamp(2.75rem, 4.1vw, 6rem); }
  .world__arrow {
    width: clamp(32px, 3.4vw, 72px);
    height: clamp(32px, 3.4vw, 72px);
  }
  .world__services { grid-template-columns: 1fr; }

  /* the address sits under the link in every column, not only where it wraps */
  .world__foot {
    flex-direction: column;
    align-items: flex-start;
    gap: 2px;
  }
}

/* Desktop: the night section continues straight on from the photograph */
@media (min-width: 1000px) {
  .worlds { margin-top: 0; }
}

/* ==========================================================================
   Motion — a brief reveal, only when welcome
   ========================================================================== */
@media (prefers-reduced-motion: no-preference) {
  html { scroll-behavior: smooth; }

  .headline__line > span {
    animation: line-rise 1.15s var(--ease-out) both;
  }
  .headline__line--1 > span { animation-delay: 0.05s; }
  .headline__line--2 > span { animation-delay: 0.14s; }

  .plate__img { animation: plate-settle 2.2s var(--ease-out) both; }
}

@keyframes line-rise {
  from { transform: translateY(108%); }
  to { transform: none; }
}

@keyframes plate-settle {
  from { transform: scale(1.06); }
  to { transform: none; }
}

/* ==========================================================================
   Two worlds — scroll-in assembly (driven by assets/js/fx.js)
   Letters, words and panels arrive from random directions, de-blurring as
   they settle. Nothing is hidden unless the script has run (html.fx) and
   the visitor welcomes motion. Selectors use :where() so hover states win.
   ========================================================================== */
.fx-word,
.fx-char,
.fx-scramble { display: inline-block; }
.fx-word,
.fx-scramble { white-space: nowrap; }
.fx-line { transform-origin: left center; }

.world__scan {
  position: absolute;
  inset: 0;
  z-index: 2;
  pointer-events: none;
  opacity: 0;
}

.world__scan::before {
  content: "";
  position: absolute;
  background: var(--accent);
  box-shadow: 0 0 14px 1px var(--accent);
  box-shadow: 0 0 14px 1px var(--accent), 0 0 44px 8px color-mix(in srgb, var(--accent) 35%, transparent);
}

[data-from="left"] > .world__scan::before  { top: 0; bottom: 0; right: 0; width: 2px; }
[data-from="right"] > .world__scan::before { top: 0; bottom: 0; left: 0; width: 2px; }
[data-from="top"] > .world__scan::before   { left: 0; right: 0; bottom: 0; height: 2px; }
[data-from="bottom"] > .world__scan::before { left: 0; right: 0; top: 0; height: 2px; }

@media screen and (prefers-reduced-motion: no-preference) {
  /* --- waiting, out of view --- */
  :where(html.fx .fx-scope:not(.is-in)) .fx-piece {
    opacity: 0;
    transform:
      perspective(700px)
      translate3d(var(--dx, 0), var(--dy, 0), 0)
      rotateX(var(--rx, 0deg)) rotateY(var(--ry, 0deg)) rotate(var(--rz, 0deg))
      scale(var(--sc, 1));
    filter: blur(var(--bl, 10px));
    transition: none;
  }

  :where(html.fx .fx-scope:not(.is-in)) .fx-line { transform: scaleX(0); }

  :where(html.fx .fx-scope:not(.is-in)) .world__preview { clip-path: var(--clip-from); }
  :where(html.fx .fx-scope:not(.is-in)) .world__preview picture {
    transform: scale(1.22);
    filter: saturate(0) brightness(1.7);
  }
  :where(html.fx .fx-scope:not(.is-in)) [data-from="left"] > .world__scan   { opacity: 1; transform: translateX(-100%); }
  :where(html.fx .fx-scope:not(.is-in)) [data-from="right"] > .world__scan  { opacity: 1; transform: translateX(100%); }
  :where(html.fx .fx-scope:not(.is-in)) [data-from="top"] > .world__scan    { opacity: 1; transform: translateY(-100%); }
  :where(html.fx .fx-scope:not(.is-in)) [data-from="bottom"] > .world__scan { opacity: 1; transform: translateY(100%); }

  :where(html.fx) .world.fx-scope:not(.is-in)::before,
  :where(html.fx) .worlds__list:not(.lines-in)::before { transform: scaleX(0); }

  /* --- arriving --- */
  :where(html.fx .fx-scope.is-in:not(.fx-done)) .fx-piece {
    transition:
      opacity 0.9s var(--ease-soft) var(--d, 0s),
      transform 1.5s var(--ease-out) var(--d, 0s),
      filter 1.2s var(--ease-out) var(--d, 0s);
    will-change: transform, opacity, filter;
  }

  :where(html.fx .fx-scope.is-in:not(.fx-done)) .fx-line {
    transition: transform 1.1s var(--ease-out) var(--d, 0s);
  }

  :where(html.fx .fx-scope.is-in:not(.fx-done)) .world__preview {
    clip-path: inset(0 0 0 0);
    transition: clip-path 1.4s var(--ease-out) var(--d, 0s);
  }
  :where(html.fx .fx-scope.is-in:not(.fx-done)) .world__preview picture {
    transition:
      transform 1.9s var(--ease-out) var(--d, 0s),
      filter 1.5s var(--ease-soft) calc(var(--d, 0s) + 0.25s);
  }
  :where(html.fx .fx-scope.is-in:not(.fx-done)) .world__scan {
    transition:
      transform 1.4s var(--ease-out) var(--d, 0s),
      opacity 0.6s var(--ease-soft) calc(var(--d, 0s) + 0.9s);
  }

  :where(html.fx) .world.fx-scope.is-in:not(.fx-done)::before {
    transition: transform 1.6s var(--ease-out) 0.05s;
  }
  :where(html.fx) .worlds__list::before { transition: transform 1.6s var(--ease-out); }
}

/* the divider between the worlds grows downwards when it stands vertical */
@media screen and (min-width: 1100px) and (prefers-reduced-motion: no-preference) {
  :where(html.fx) .world.fx-scope:not(.is-in)::before { transform: scaleY(0); }
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    transition-duration: 0.01ms !important;
  }
}
