/* The city that lights up: the footer of an evening city guide on a black page. The newsletter and three columns
   of links stand in the sky; under them a skyline at dusk, an elevated railway and a river, all drawn on one
   canvas behind; the small print floats on the water. In a real page the footer sits at the bottom: here it
   stands in the middle of the page; to put it back, drop .stage's padding and centring and let .lc take the full
   width at the end of the page. */
:root {
  --page: #000000;          /* the page */
  --sky-top-dusk: #2a2258;  /* the sky at sunset, at the top */
  --sky-mid-dusk: #8c3f74;  /* the sky at sunset, halfway down */
  --sky-low-dusk: #ff9257;  /* the sky at sunset, on the horizon */
  --sun: #ffc887;           /* the sun going down */
  --sky-top: #060919;       /* the sky at night, at the top */
  --sky-mid: #0f1536;       /* the sky at night, halfway down */
  --sky-low: #2b2754;       /* the sky at night, on the horizon */
  --city-glow: #ff9a5c;     /* the warm haze the city's lights throw on the night sky */
  --far-dusk: #7a4d82;      /* the far skyline, at sunset */
  --far: #1a1f47;           /* the far skyline, at night */
  --mid-dusk: #432c5f;      /* the middle row of buildings, at sunset */
  --mid: #10142f;           /* the middle row of buildings, at night */
  --near-dusk: #26193d;     /* the nearest buildings, at sunset */
  --near: #090b1c;          /* the nearest buildings, at night */
  --rim: #ffb27a;           /* the last sun catching the edges of the buildings */
  --glass: #191e3e;         /* a window with the light off */
  --warm: #ffc56a;          /* a window lit by a lamp */
  --amber: #ff9e48;         /* a window lit low and warm */
  --cream: #ffe7b4;         /* a window lit bright */
  --cool: #b9d6ff;          /* a window lit by a screen or a strip light */
  --rail: #05060f;          /* the elevated railway */
  --train: #1d2140;         /* the train's body */
  --train-light: #ffe3a4;   /* the train's windows */
  --water: #04050f;         /* the river */
  --sign-bar: #ff4d6d;      /* the BAR sign */
  --sign-noodles: #ffad33;  /* the NOODLES sign */
  --sign-diner: #4fe3ff;    /* the DINER sign */
  --sign-cinema: #ff6b3b;   /* the CINEMA sign */
  --sign-jazz: #b685ff;     /* the JAZZ sign */
  --sign-theatre: #ffd45e;  /* the THEATRE sign */
  --sign-hotel: #ff3f8e;    /* the HOTEL sign */
  --sign-ferry: #5dffb8;    /* the FERRY sign */
  --sign-books: #fff1c9;    /* the BOOKS sign */
  --field: #11153a;         /* the email field */
  --line: #2c3166;          /* the edges of the field */
  --ink: #f6f2ff;           /* titles and the button */
  --muted: #bdb8e0;         /* links and text */
  --faint: #918db9;         /* the small print and the help under the field */
  --button-ink: #0b0d24;    /* the word on the button */
  --focus: #ffd08a;         /* the focus ring */
  --wrong: #ffa08e;         /* an email that does not look right */
}

* {
  box-sizing: border-box;
}

/* a tap is a click at once: no wait for a double tap */
html {
  touch-action: manipulation;
}

html,
body {
  margin: 0;
  overflow-x: clip;
}

body {
  min-height: 100svh;
  background: var(--page);
  color: var(--ink);
  font-family: 'Bricolage Grotesque Variable', system-ui, sans-serif;
  -webkit-font-smoothing: antialiased;
}

.stage {
  min-height: 100svh;
  display: grid;
  place-items: center;
  padding: 40px 16px;
}

/* ---------------------------------------------------------------- the footer */
.lc {
  position: relative;
  display: flex;
  flex-direction: column;
  width: min(1040px, 100%);
  border-radius: 28px;
  overflow: hidden;
  background: var(--sky-top);
  color: var(--muted);
  isolation: isolate;
  box-shadow: 0 0 0 1px rgba(150, 140, 230, 0.12), 0 40px 80px -40px rgba(255, 150, 90, 0.18);
  /* a finger dragged sideways turns the city; up and down still scrolls the page */
  touch-action: pan-y;
  -webkit-tap-highlight-color: transparent;
}

.lc.is-pointing {
  cursor: pointer;
}

/* the whole city, sky to river, behind everything */
.lc__city {
  position: absolute;
  inset: 0;
  z-index: -1;
  display: block;
  width: 100%;
  height: 100%;
  pointer-events: none;
}

.lc__top {
  position: relative;
  display: grid;
  grid-template-columns: minmax(0, 380px) minmax(0, 1fr);
  gap: 64px;
  align-items: start;
  padding: 30px 36px 0;
}

/* the room the skyline stands in */
.lc__room {
  flex: none;
  height: 182px;
  pointer-events: none;
}

/* ---------------------------------------------------------------- the newsletter */
.lc__form {
  margin: 0;
}

.lc__title {
  margin: 0;
  color: var(--ink);
  font-size: 24px;
  font-weight: 700;
  font-stretch: 78%;
  line-height: 28px;
  letter-spacing: -0.005em;
  text-wrap: balance;
}

.lc__lede {
  margin: 6px 0 14px;
  font-size: 15px;
  line-height: 22px;
  text-wrap: pretty;
}

.lc__field {
  --send-w: 104px;
  position: relative;
  height: 48px;
  border-radius: 999px;
  background: color-mix(in srgb, var(--field) 82%, transparent);
  box-shadow: inset 0 0 0 1px var(--line);
  -webkit-backdrop-filter: blur(6px);
  backdrop-filter: blur(6px);
  transition: box-shadow 0.25s ease;
}

.lc__field:has(.lc__input:focus) {
  box-shadow: inset 0 0 0 1px var(--muted), 0 0 0 4px rgba(255, 208, 138, 0.14);
}

.lc__field.is-wrong,
.lc__field.is-wrong:has(.lc__input:focus) {
  box-shadow: inset 0 0 0 1px var(--wrong), 0 0 0 4px rgba(255, 160, 142, 0.14);
}

.lc__input {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  margin: 0;
  padding: 0 calc(var(--send-w) + 14px) 0 22px;
  border: 0;
  border-radius: inherit;
  outline: none;
  background: transparent;
  color: var(--ink);
  caret-color: var(--focus);
  font: 450 16px/normal 'Bricolage Grotesque Variable', system-ui, sans-serif;
  -webkit-tap-highlight-color: transparent;
}

.lc__input::placeholder {
  color: var(--faint);
  opacity: 1;
}

/* the browser's autofill paints the field light blue: back to the field's own colours */
.lc__input:-webkit-autofill {
  -webkit-text-fill-color: var(--ink);
  -webkit-box-shadow: 0 0 0 60px var(--field) inset;
  caret-color: var(--focus);
}

.lc__input[readonly] {
  color: var(--muted);
}

/* the button: the elastic pill, its word widening while the colour swells under the pointer */
.lc__send {
  position: absolute;
  top: 6px;
  right: 6px;
  bottom: 6px;
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  place-items: center;
  width: var(--send-w);
  margin: 0;
  padding: 0;
  border: 0;
  border-radius: 999px;
  background: transparent;
  color: var(--button-ink);
  font: 650 15px/1 'Bricolage Grotesque Variable', system-ui, sans-serif;
  cursor: pointer;
  isolation: isolate;
  -webkit-tap-highlight-color: transparent;
}

.lc__send > * {
  grid-area: 1 / 1;
}

.lc__send-bg {
  position: absolute;
  inset: 0;
  z-index: -1;
  border-radius: inherit;
  background: linear-gradient(180deg, var(--cream), var(--warm));
  box-shadow: inset 0 -2px 0 rgba(120, 60, 0, 0.18), 0 0 18px -4px rgba(255, 197, 106, 0.55);
  transition: inset 0.6s cubic-bezier(0.3, 1.7, 0.45, 1), transform 0.16s ease-out;
}

.lc__send-label {
  display: block;
  font-stretch: 84%;
  white-space: nowrap;
  transition: font-stretch 0.6s cubic-bezier(0.3, 1.7, 0.45, 1);
}

@media (hover: hover) and (pointer: fine) {
  .lc__send:not([aria-disabled='true']):hover .lc__send-bg {
    inset: -2px -5px;
  }

  .lc__send:not([aria-disabled='true']):hover .lc__send-label {
    font-stretch: 100%;
  }
}

.lc__send:not([aria-disabled='true']):active .lc__send-bg {
  transform: scale(1.03, 0.88);
}

.lc__send[aria-disabled='true'] {
  cursor: default;
}

.lc__send:focus {
  outline: none;
}

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

.lc__spin,
.lc__done {
  width: 22px;
  height: 22px;
  overflow: visible;
  opacity: 0;
  fill: none;
  stroke: currentColor;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.lc__spin {
  stroke-width: 2.4;
  stroke-dasharray: 30 60;
}

.lc__done {
  stroke-width: 2.6;
}

/* the line under the field: help, then what went wrong, then the thanks */
.lc__note {
  position: relative;
  min-height: 20px;
  margin: 10px 0 0 22px;
  color: var(--faint);
  font-size: 13.5px;
  line-height: 20px;
}

.lc__line {
  display: flex;
  align-items: flex-start;
  gap: 7px;
}

.lc__line.is-going {
  position: absolute;
  left: 0;
  right: 0;
  top: 0;
  pointer-events: none;
}

.lc__line svg {
  flex: none;
  width: 15px;
  height: 15px;
  margin-top: 2.5px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.6;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.lc__line.is-wrong {
  color: var(--wrong);
}

.lc__line.is-done {
  color: var(--ink);
}

.lc__line.is-done svg {
  color: var(--warm);
}

/* ---------------------------------------------------------------- the links */
.lc__cols {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 24px;
}

.lc__head {
  margin: 0 0 10px;
  color: var(--ink);
  font-size: 15px;
  font-weight: 650;
  font-stretch: 84%;
  line-height: 20px;
}

.lc__list {
  margin: 0;
  padding: 0;
  list-style: none;
}

/* a link pointed at lights its sign in the city, and takes its colour: the word glows like a tube and widens */
.lc__link {
  position: relative;
  display: inline-block;
  padding: 4px 0;
  border-radius: 6px;
  color: var(--muted);
  font-size: 15px;
  font-stretch: 88%;
  line-height: 22px;
  text-decoration: none;
  white-space: nowrap;
  transition: color 0.3s ease, text-shadow 0.3s ease, font-stretch 0.5s cubic-bezier(0.3, 1.6, 0.45, 1);
  -webkit-tap-highlight-color: transparent;
}

.lc__link.is-on,
.lc__link:focus-visible {
  color: color-mix(in srgb, var(--glow) 55%, #ffffff);
  font-stretch: 100%;
  text-shadow: 0 0 10px color-mix(in srgb, var(--glow) 70%, transparent), 0 0 2px color-mix(in srgb, var(--glow) 60%, transparent);
}

@media (hover: hover) and (pointer: fine) {
  .lc__link:hover {
    color: color-mix(in srgb, var(--glow) 55%, #ffffff);
    font-stretch: 100%;
    text-shadow: 0 0 10px color-mix(in srgb, var(--glow) 70%, transparent), 0 0 2px color-mix(in srgb, var(--glow) 60%, transparent);
  }
}

.lc__link:focus,
.lc__small:focus {
  outline: none;
}

.lc__link:focus-visible,
.lc__small:focus-visible {
  outline: 2px solid var(--focus);
  outline-offset: 2px;
}

/* ---------------------------------------------------------------- the small print, on the water */
.lc__base {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px 28px;
  padding: 10px 36px 18px;
  color: var(--faint);
  font-size: 13px;
  line-height: 20px;
  text-shadow: 0 1px 3px rgba(0, 0, 0, 0.9);
}

.lc__brand {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 4px 12px;
  margin: 0;
}

.lc__mark {
  flex: none;
  width: 26px;
  height: 26px;
  overflow: visible;
}

.lc__mark .m-tower {
  fill: #1c2150;
  stroke: var(--muted);
  stroke-width: 1.3;
  stroke-linejoin: round;
}

.lc__mark .m-lit {
  fill: var(--warm);
}

.lc__mark .m-dark {
  fill: #3a3f78;
}

.lc__mark .m-ground {
  fill: none;
  stroke: var(--muted);
  stroke-width: 1.3;
  stroke-linecap: round;
}

.lc__name {
  color: var(--ink);
  font-family: 'Big Shoulders Display Variable', 'Bricolage Grotesque Variable', sans-serif;
  font-size: 19px;
  font-weight: 800;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.lc__copy {
  display: inline-flex;
  align-items: center;
  gap: 4px;
}

/* the copyright sign, drawn: the character can turn into an emoji on some phones */
.lc__copy svg {
  width: 11px;
  height: 11px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.1;
  stroke-linecap: round;
}

.lc__legal {
  display: flex;
  flex-wrap: wrap;
  gap: 2px 22px;
}

.lc__small {
  padding: 3px 0;
  border-radius: 4px;
  color: var(--faint);
  font-size: 13px;
  line-height: 20px;
  text-decoration: none;
  transition: color 0.25s ease;
}

@media (hover: hover) and (pointer: fine) {
  .lc__small:hover {
    color: var(--ink);
  }
}

/* for screen readers only */
.sr {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip-path: inset(50%);
  white-space: nowrap;
}

/* ---------------------------------------------------------------- a narrower screen */
@media (max-width: 860px) {
  .lc__top {
    grid-template-columns: minmax(0, 1fr);
    gap: 28px;
  }

  .lc__form {
    max-width: 460px;
  }
}

/* a phone: the newsletter on top, the three short columns under it, the city and the river at the bottom */
@media (max-width: 600px) {
  .lc {
    border-radius: 24px;
  }

  .lc__top {
    gap: 22px;
    padding: 26px 20px 0;
  }

  .lc__title {
    font-size: 23px;
  }

  /* a button a thumb can hit */
  .lc__field {
    --send-w: 96px;
    height: 56px;
  }

  .lc__input {
    padding-left: 18px;
  }

  .lc__note {
    margin-left: 18px;
  }

  .lc__cols {
    gap: 12px;
  }

  .lc__head {
    margin-bottom: 2px;
    font-size: 14px;
  }

  /* a whole row to tap */
  .lc__link {
    display: block;
    padding: 11px 0;
    font-size: 14.5px;
  }

  .lc__room {
    height: 214px;
  }

  .lc__base {
    flex-direction: column;
    align-items: flex-start;
    padding: 6px 20px 14px;
  }

  .lc__small {
    padding: 12px 0;
  }

  .lc__legal {
    gap: 0 20px;
  }
}

/* la casella bassa dell'anteprima sul telefono: righe dei link più basse, la città un po' più bassa e spazi più
   stretti, così il piede si vede intero */
@media (max-width: 600px) and (max-height: 760px) {
  .stage {
    padding: 10px 16px;
  }

  .lc__link {
    padding: 6px 0;
  }

  .lc__room {
    height: 186px;
  }

  .lc__small {
    padding: 5px 0;
  }
}

@media (prefers-reduced-motion: reduce) {
  .lc__send-label,
  .lc__send-bg,
  .lc__link {
    transition: color 0.3s ease, text-shadow 0.3s ease;
  }

  .lc__link.is-on,
  .lc__link:focus-visible {
    font-stretch: 88%;
  }
}

@media (prefers-reduced-motion: reduce) and (hover: hover) and (pointer: fine) {
  .lc__link:hover {
    font-stretch: 88%;
  }
}
