/* Raising More: coming soon, second design ("the room level").

   One number runs the page. --level goes from 0 (dark) to 1 ("more") and lives on the element
   marked data-stage. It lights the name from the bottom up, moves the line and the fader cap,
   and raises the uplighting on the wall. stage.js changes the number. Without scripts the page
   rests at the default set below.

   Contents: fonts, tokens, base, the wall, the meter (name and fader), the scale, the floor,
   the sign-up form, the footer, and the fallbacks (forced colors, reduced motion, print). */

/* ---------- Fonts (self-hosted, SIL Open Font License; see assets/fonts) ---------- */

@font-face {
  font-family: "Bodoni Moda";
  font-style: normal;
  font-weight: 400 900;
  font-display: block;
  src: url("assets/fonts/bodoni-moda-latin.woff2") format("woff2");
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}

@font-face {
  font-family: "Bodoni Moda";
  font-style: italic;
  font-weight: 400 900;
  font-display: block;
  src: url("assets/fonts/bodoni-moda-italic-latin.woff2") format("woff2");
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}

@font-face {
  font-family: Jost;
  font-style: normal;
  font-weight: 300 600;
  font-display: swap;
  src: url("assets/fonts/jost-latin.woff2") format("woff2");
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}

/* ---------- Tokens ---------- */

:root {
  color-scheme: dark;

  --wall: #2f1236;        /* the drape, mid wall */
  --wall-high: #1c0a22;   /* the drape near the ceiling */
  --floor: #150716;       /* the floor, and the page behind everything */
  --ivory: #f7eee3;       /* lit type */
  --ivory-warm: #ffe2c2;  /* lit type nearest the lights */
  --mauve: #d3c3d1;       /* running text on the floor */
  --dim: #b4a0b6;         /* unlit labels and small print */
  --dusk: #9a7d9e;        /* unlit display type, and field borders */
  --brass-hi: #f5e7cf;
  --brass: #dcc195;       /* everything a hand touches is brass */
  --brass-lo: #b08d57;
  --ink: #2a1030;         /* type on brass */
  --alert: #ffb9a8;

  --display: "Bodoni Moda", "Bodoni 72", Didot, "Bodoni MT", Georgia, serif;
  --text: Jost, Futura, "Century Gothic", "Avenir Next", "Segoe UI", sans-serif;

  --gutter: max(clamp(20px, 4.4vw, 72px), calc((100vw - 1680px) / 2));
  --track: 48px;          /* width of the fader's lane */
}

/* ---------- Base ---------- */

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

html {
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
  background: var(--floor);
}

/* The page is at least one screen tall. On a tall screen the wall takes the extra height. */
body {
  display: flex;
  flex-direction: column;
  min-height: 100vh;
  min-height: 100svh;
  margin: 0;
  background: var(--floor);
  color: var(--ivory);
  font: 400 1.0625rem/1.6 var(--text);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

.room {
  flex: 1 0 auto;
  display: flex;
  flex-direction: column;
}

h1,
h2,
p,
ol {
  margin: 0;
}

a {
  color: var(--brass-hi);
  text-underline-offset: .18em;
}

[hidden] {
  display: none !important;
}

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

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

::selection {
  background: var(--brass);
  color: var(--ink);
  -webkit-text-fill-color: var(--ink);
}

/* ---------- The level ---------- */

[data-stage] {
  --level: .8;
  --beam: clamp(150px, 15vw, 236px);   /* distance between two uplights */
}

/* The head script holds the room dark until stage.js starts the opening rise. */
.is-dark [data-stage] {
  --level: 0;
}

/* ---------- The wall ---------- */

.wall {
  --base: clamp(40px, 7vh, 68px);            /* bare wall between the name and the floor */
  --side: 0px;                               /* width of the scale beside the meter: none here */
  position: relative;
  isolation: isolate;
  flex: 1 0 auto;
  display: grid;
  grid-template-columns: var(--gutter) minmax(0, 1fr) var(--gutter);
  grid-template-rows: minmax(auto, 1fr) auto var(--base) auto;
  min-height: min(58vh, 34rem);
  min-height: min(58svh, 34rem);
  overflow: hidden;
  overflow: clip;
  background: var(--floor);
}

/* Decoration only. Four layers: the light, a pulse for the top, the pleats, and film grain. */
.drape {
  grid-column: 1 / -1;
  grid-row: 1 / 4;
  position: relative;
  z-index: -1;
  overflow: hidden;
  background: linear-gradient(to bottom, var(--wall-high) 0%, var(--wall-high) 10%, var(--wall) 74%);
}

.drape > div {
  position: absolute;
  inset: 0;
}

/* The light belongs to the name, not to the wall. The drape repeats the wall's rows, and the
   two light layers take the rows of the name and the bare strip under it, plus a fixed share
   above the name. So the wall behind the unlit part of the name is just as dark on a tall
   screen, where the wall is much taller than the name. */
@supports (grid-template-rows: subgrid) {
  .drape {
    display: grid;
    grid-template-rows: subgrid;
  }

  .drape > .uplight,
  .drape > .bloom {
    grid-row: 2 / 4;
    top: -22%;
  }
}

/* Uplights on the floor, one every --beam. This layer holds the hot pool at the foot of each
   beam, and its ::before holds the beams. The pools stay in the bare strip under the name, so
   the type above always sits on a dark enough wall. The whole layer grows with the level. */
.uplight {
  background: radial-gradient(ellipse 32% 100% at 50% 100%, rgba(255, 226, 190, .6) 0%, rgba(255, 168, 108, .24) 42%, rgba(255, 168, 108, 0) 100%) 50% 100% / var(--beam) var(--base) repeat-x;
  transform-origin: 50% 100%;
  transform: scaleY(calc(.34 + var(--level) * .66));
  opacity: calc(.1 + var(--level) * .9);
}

/* The beams. Where masks are not supported, the light stays one soft wash. */
.uplight::before {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(to top, rgba(196, 70, 48, .5) 0%, rgba(176, 46, 96, .34) 30%, rgba(120, 36, 118, .14) 62%, rgba(120, 36, 118, 0) 90%);
}

/* The gradient is the color of the light by height: amber at the floor, then rose, then plum.
   The mask is its shape: one cone from each fixture, and the spill between the cones. */
@supports ((mask-image: conic-gradient(#000, #000)) or (-webkit-mask-image: conic-gradient(#000, #000))) {
  .uplight::before {
    --cone: conic-gradient(from -32deg at 50% 108%, rgba(0, 0, 0, 0) 0deg, rgba(0, 0, 0, .12) 8deg, rgba(0, 0, 0, .5) 17deg, rgba(0, 0, 0, .9) 25deg, #000 32deg, rgba(0, 0, 0, .9) 39deg, rgba(0, 0, 0, .5) 47deg, rgba(0, 0, 0, .12) 56deg, rgba(0, 0, 0, 0) 64deg, rgba(0, 0, 0, 0) 360deg);
    --spill: linear-gradient(rgba(0, 0, 0, .27), rgba(0, 0, 0, .27));
    background: linear-gradient(to top, rgba(255, 190, 128, .9) 0%, rgba(246, 136, 92, .86) 4%, rgba(222, 84, 98, .72) 10%, rgba(190, 54, 112, .6) 24%, rgba(132, 44, 124, .42) 46%, rgba(84, 34, 104, .2) 70%, rgba(84, 34, 104, 0) 100%);
    -webkit-mask-image: var(--cone), var(--spill);
    mask-image: var(--cone), var(--spill);
    -webkit-mask-size: var(--beam) 100%, 100% 100%;
    mask-size: var(--beam) 100%, 100% 100%;
    -webkit-mask-position: 50% 0, 0 0;
    mask-position: 50% 0, 0 0;
    -webkit-mask-repeat: repeat-x, no-repeat;
    mask-repeat: repeat-x, no-repeat;
  }
}

.bloom {
  background: radial-gradient(ellipse 70% 64% at 50% 100%, rgba(255, 214, 170, .5), rgba(255, 214, 170, 0) 70%);
  opacity: 0;
}

.is-peak .bloom {
  opacity: .1;
  animation: bloom 1.5s ease-out 1;
}

@keyframes bloom {
  0% { opacity: 0; }
  16% { opacity: .42; }
  100% { opacity: .1; }
}

/* The folds of the drape, and a little falloff toward the top corners. */
.pleats {
  background-image:
    radial-gradient(ellipse 85% 120% at 50% 100%, rgba(0, 0, 0, 0) 55%, rgba(0, 0, 0, .3) 100%),
    repeating-linear-gradient(90deg, rgba(0, 0, 0, .2) 0, rgba(0, 0, 0, 0) 9px, rgba(255, 255, 255, .035) 16px, rgba(0, 0, 0, 0) 24px, rgba(0, 0, 0, .2) 41px),
    repeating-linear-gradient(90deg, rgba(0, 0, 0, 0) 0, rgba(0, 0, 0, .13) 38px, rgba(0, 0, 0, 0) 71px, rgba(255, 255, 255, .02) 96px, rgba(0, 0, 0, 0) 127px);
}

.grain {
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='240' height='240'%3E%3Cfilter id='n' x='0' y='0' width='100%25' height='100%25'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.82' numOctaves='2' stitchTiles='stitch'/%3E%3CfeColorMatrix values='.33 .33 .33 0 0 .33 .33 .33 0 0 .33 .33 .33 0 0 0 0 0 0 1'/%3E%3C/filter%3E%3Crect width='240' height='240' filter='url(%23n)'/%3E%3C/svg%3E");
  mix-blend-mode: soft-light;
  opacity: .36;
}

/* The line where the wall meets the floor. */
.drape::after {
  content: "";
  position: absolute;
  right: 0;
  bottom: 0;
  left: 0;
  height: 1px;
  background: rgba(13, 4, 15, .9);
}

/* ---------- Top of the wall ---------- */

.wall-top {
  grid-column: 2;
  grid-row: 1;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  gap: 1.25rem;
  padding: 22px 0 28px;
}

.soon {
  font: italic 400 clamp(1.25rem, 1.1rem + .8vw, 1.625rem)/1.2 var(--display);
  color: var(--ivory);
}

.hint {
  align-self: flex-end;
  font-size: .9375rem;
  line-height: 1.4;
  text-align: right;
  color: var(--mauve);
}

/* ---------- The meter: the name and the fader share one box ---------- */

.meter {
  grid-column: 2;
  grid-row: 2;
  position: relative;
  container-type: inline-size;
}

/* The box of the name is the meter. Line height .86 and the small top padding make the box
   1.747em tall, which puts level .8 exactly on the tops of the round lowercase letters. The
   left padding keeps the serif of the R inside the painted box. Change these together. */
.name {
  margin-left: -.03em;
  padding: .027em 0 0 .03em;
  font: 400 clamp(4.5rem, 21vw, 15rem)/.86 var(--display);
  letter-spacing: -.015em;
  white-space: nowrap;
  color: var(--ivory);
}

/* The size of the name has two limits. The width limit comes first: the longer word fills the
   lane beside the fader (--lane), so the name never runs under the fader, on a very narrow
   screen or with a larger text size set in the browser. The height limit (--tall) keeps the
   name to a third of the screen's height.

   "Raising" is 3.3em wide in the page's own type, so the word is given 3.36em (--word). Where
   a reader's letter spacing or a stand-in typeface makes the word wider, stage.js measures it
   and raises --word on the name.

   The limits are custom properties for a reason. A declaration that holds var() is never
   skipped, so a browser that met a unit it did not know inside one would drop the size
   altogether. The newer units are therefore set only where they are supported. An older
   browser measures the lane from the screen instead, less 16px for a scrollbar. */
.name {
  --word: 3.36;
  --lane: calc(100vw - 2 * var(--gutter) - var(--side) - var(--track) - 30px);
  --tall: 32vh;
  font-size: min(calc(var(--lane) / var(--word)), max(3.75rem, var(--tall)));
}

@supports (width: 1cqi) {
  .name {
    --lane: calc(100cqi - var(--track) - 14px);
  }
}

@supports (height: 1svh) {
  .name {
    --tall: 32svh;
  }
}

/* Each word's box is as wide as its letters, so stage.js hears when that width changes. */
.name span {
  display: block;
  width: -webkit-max-content;
  width: max-content;
}

/* Lit ivory below the level, unlit dusk above it. One hard stop, no blur. */
@supports ((-webkit-background-clip: text) or (background-clip: text)) {
  .name {
    background-image: linear-gradient(to top, var(--ivory-warm) 0, var(--ivory) calc(var(--level) * 60%), var(--ivory) calc(var(--level) * 100%), var(--dusk) calc(var(--level) * 100%));
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
  }
}

.fader {
  position: absolute;
  top: 0;
  right: 0;
  bottom: 0;
  width: var(--track);
  -webkit-user-select: none;
  user-select: none;
  -webkit-tap-highlight-color: transparent;
}

/* stage.js marks the stage is-ready once the fader works. Only then does the fader look and
   act like a control. */
.is-ready .fader {
  cursor: ns-resize;
  touch-action: none;
}

/* The focus ring is drawn around the cap, where the eye already is. */
.fader:focus {
  outline: none;
}

.fader:focus-visible .fader-cap {
  outline: 2px solid var(--ivory);
  outline-offset: 4px;
}

.fader-groove {
  position: absolute;
  top: -10px;
  bottom: -10px;
  left: 50%;
  width: 4px;
  margin-left: -2px;
  border-radius: 2px;
  background: rgba(10, 3, 12, .72);
  box-shadow: 0 0 0 1px rgba(255, 255, 255, .07), inset 0 1px 2px rgba(0, 0, 0, .8);
}

/* Eleven ticks, one every 10 percent. The long ones are the five marks on the scale. */
.fader-ticks {
  --tick: linear-gradient(currentColor, currentColor);
  position: absolute;
  top: -.5px;
  bottom: -.5px;
  left: calc(50% + 14px);
  width: 10px;
  color: rgba(211, 195, 209, .55);
  background-image: var(--tick), var(--tick), var(--tick), var(--tick), var(--tick), var(--tick), var(--tick), var(--tick), var(--tick), var(--tick), var(--tick);
  background-repeat: no-repeat;
  background-size: 10px 1px, 5px 1px, 10px 1px, 5px 1px, 10px 1px, 5px 1px, 10px 1px, 5px 1px, 10px 1px, 5px 1px, 10px 1px;
  background-position: 0 0, 0 10%, 0 20%, 0 30%, 0 40%, 0 50%, 0 60%, 0 70%, 0 80%, 0 90%, 0 100%;
}

/* The rider is as tall as the meter and slides down by the part not yet raised, so its top
   edge is the level. The line and the cap hang on that edge. */
.fader-rider {
  position: absolute;
  inset: 0;
  pointer-events: none;
  transform: translateY(calc((1 - var(--level)) * 100%));
}

.fader-line {
  position: absolute;
  top: -.5px;
  right: 50%;
  width: 200vw;
  height: 1px;
  background: linear-gradient(to left, var(--brass-hi) 0, rgba(245, 231, 207, .66) 260px, rgba(245, 231, 207, .36) 100%);
  box-shadow: 0 0 10px rgba(255, 196, 140, .45);
}

.is-ready .fader-line {
  pointer-events: auto;
  touch-action: none;
}

/* A taller strip to catch a finger on the hairline. */
.is-ready .fader-line::before {
  content: "";
  position: absolute;
  top: -14px;
  right: 0;
  bottom: -14px;
  left: 0;
}

.fader-cap {
  position: absolute;
  top: -20px;
  left: 50%;
  width: 24px;
  height: 40px;
  margin-left: -12px;
  border-radius: 3px;
  background:
    linear-gradient(to bottom, rgba(42, 16, 48, 0) calc(50% - 1px), rgba(42, 16, 48, .9) calc(50% - 1px), rgba(42, 16, 48, .9) calc(50% + 1px), rgba(42, 16, 48, 0) calc(50% + 1px)),
    linear-gradient(to bottom, #fff6e2 0%, var(--brass) 16%, var(--brass-lo) 47%, var(--brass-lo) 53%, var(--brass) 84%, #fff6e2 100%);
  box-shadow: inset 0 0 0 1px rgba(60, 36, 16, .35), 0 6px 14px rgba(0, 0, 0, .5), 0 0 16px rgba(255, 190, 130, .22);
  pointer-events: auto;
  transition: box-shadow .4s ease;
}

/* Makes the target 48 by 48. */
.fader-cap::before {
  content: "";
  position: absolute;
  top: -4px;
  right: -12px;
  bottom: -4px;
  left: -12px;
}

.is-peak .fader-cap {
  box-shadow: inset 0 0 0 1px rgba(60, 36, 16, .35), 0 6px 14px rgba(0, 0, 0, .5), 0 0 26px rgba(255, 206, 150, .6);
}

/* Without scripts nothing can be dragged, so the cap and the hint are not shown. */
html:not(.js) .fader-cap,
html:not(.js) .hint {
  display: none;
}

/* With scripts, the two wait until the fader works. They keep their place while they wait,
   so nothing moves when they appear. If stage.js never arrives, they never show. */
.room:not(.is-ready) .fader-cap,
.room:not(.is-ready) .hint {
  visibility: hidden;
}

/* ---------- The scale ---------- */

.scale {
  grid-column: 2;
  grid-row: 4;
  padding: 1.15rem 0 .35rem;
  list-style: none;
}

.scale li {
  color: var(--dim);
  transition: color .25s ease, opacity .25s ease;
}

.scale li + li {
  margin-top: .85rem;
}

.scale li.is-lit {
  color: var(--ivory);
}

.is-dark .scale li {
  color: var(--dim);
}

.scale-name {
  display: block;
  font: italic 400 1.375rem/1.2 var(--display);
}

.scale-note {
  display: block;
  font-size: .9375rem;
  line-height: 1.45;
}

/* Light on the floor: a short reflection under each uplight, and a soft spill from the wall.
   Under the scale on small screens. */
.wall::after,
.floor::before {
  content: "";
  position: absolute;
  top: 0;
  right: 0;
  left: 0;
  height: 96px;
  background:
    radial-gradient(ellipse 17% 100% at 50% 0, rgba(255, 176, 120, .2) 0%, rgba(226, 84, 96, .08) 44%, rgba(226, 84, 96, 0) 100%) 50% 0 / var(--beam) 100% repeat-x,
    radial-gradient(ellipse 64% 100% at 50% 0, rgba(204, 74, 60, .16), rgba(150, 40, 110, .06) 55%, rgba(150, 40, 110, 0) 78%);
  opacity: calc(.12 + var(--level) * .88);
  pointer-events: none;
}

.wall::after {
  grid-column: 1 / -1;
  grid-row: 4;
  z-index: -1;
  height: auto;
  bottom: 0;
}

/* Small screens: the scale is one readout under the wall. It shows the highest mark reached. */
@media not all and (min-width: 60em) {
  .floor::before {
    content: none;
  }

  /* Older browsers cannot tie the light to the name. There the light fills the wall, and on a
     narrow wall, where the name starts lower, it stops lower too. */
  @supports not (grid-template-rows: subgrid) {
    .drape > .uplight {
      top: 22%;
    }
  }

  /* All five marks share one cell, so the readout is as tall as the tallest and never jumps. */
  .js .scale {
    display: grid;
    align-content: start;
  }

  .js .scale li {
    grid-area: 1 / 1;
    margin-top: 0;
    opacity: 0;
  }

  .js .scale li.is-current {
    opacity: 1;
  }

  .is-dark .scale li.is-current {
    opacity: 0;
  }
}

/* Large screens: the scale stands beside the fader, each name on its own tick. */
@media (min-width: 60em) {
  .wall {
    --scale-w: 18rem;   /* in rem, so the notes still fit on one line at a larger text size */
    --side: var(--scale-w);
    grid-template-columns: var(--gutter) minmax(0, 1fr) var(--scale-w) var(--gutter);
    grid-template-rows: minmax(auto, 1fr) auto var(--base);
    min-height: 0;
  }

  .wall::after {
    content: none;
  }

  .drape {
    grid-row: 1 / -1;
  }

  /* "Coming soon" holds the top of the wall, and the hint stays just above the fader. On a
     screen of ordinary height the two share one line. On a tall screen the hint moves down
     with the name. */
  .wall-top {
    grid-column: 2 / 4;
    flex-direction: row;
    align-items: flex-start;
    padding: clamp(20px, 3.4vh, 36px) 0 clamp(24px, 3.8vh, 38px);
  }

  /* The name also has to leave room for the floor, so the sign-up shows without a scroll. A
     short screen cannot push it below 9.75rem, because the five marks beside it need a meter
     that tall. The width limit still comes first. */
  .name {
    --tall: calc((82vh - 19.5rem) / 1.75);
    font-size: min(calc(var(--lane) / var(--word)), max(9.75rem, var(--tall)));
  }

  @supports (height: 1svh) {
    .name {
      --tall: calc((82svh - 19.5rem) / 1.75);
    }
  }

  .scale {
    grid-column: 3;
    grid-row: 2;
    position: relative;
    padding: 0;
  }

  .scale li {
    position: absolute;
    top: calc((1 - var(--at)) * 100%);
    right: 0;
    left: 20px;
    margin-top: -.84rem;   /* half the name's line, so the name sits on its tick */
  }

  .scale li + li {
    margin-top: -.84rem;
  }
}

/* ---------- The floor ---------- */

.floor {
  position: relative;
  display: grid;
  gap: 2.25rem;
  padding: 1.5rem var(--gutter) 2.75rem;
  background: var(--floor);
}

.floor > section {
  position: relative;
}

.floor h2 {
  font: 400 clamp(1.75rem, 1.35rem + 1.4vw, 2.375rem)/1.12 var(--display);
  letter-spacing: -.005em;
  color: var(--ivory);
}

.floor h2 + p {
  max-width: 36em;
  margin-top: .7rem;
  color: var(--mauve);
}

@media (min-width: 60em) {
  .floor {
    grid-template-columns: minmax(0, 1fr) minmax(360px, 30rem);
    gap: clamp(2.5rem, 6vw, 6rem);
    align-items: start;
    padding: clamp(1.75rem, 4.4vh, 2.75rem) var(--gutter);
  }
}

/* ---------- The sign-up form (hooks and behavior come from main.js, unchanged) ---------- */

.rsvp-form {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 10px 12px;
  margin-top: 1.1rem;
}

.field {
  display: grid;
  gap: 6px;
}

.field-label {
  font-size: .9375rem;
  line-height: 1.4;
  color: var(--mauve);
}

.field-input {
  width: 100%;
  height: 52px;
  padding: 0 16px;
  font: 400 1.0625rem/1.2 var(--text);
  color: var(--ivory);
  background: rgba(255, 255, 255, .045);
  border: 1px solid var(--dusk);
  border-radius: 4px;
  -webkit-appearance: none;
  appearance: none;
}

.field-input:hover {
  border-color: var(--dim);
}

.field-input:focus-visible {
  border-color: var(--brass);
  outline-offset: 2px;
}

.field-input[aria-invalid="true"] {
  border-color: var(--alert);
}

.field-input[readonly] {
  opacity: .7;
}

.field-input:-webkit-autofill {
  -webkit-text-fill-color: var(--ivory);
  box-shadow: 0 0 0 100px #2a1230 inset;
  caret-color: var(--ivory);
}

.button {
  height: 52px;
  padding: 0 26px;
  font: 500 1.0625rem/1 var(--text);
  color: var(--ink);
  background: linear-gradient(to bottom, var(--brass-hi), var(--brass));
  border: 0;
  border-radius: 4px;
  cursor: pointer;
  -webkit-appearance: none;
  appearance: none;
}

.button:hover {
  background: linear-gradient(to bottom, #fff6e2, var(--brass-hi));
}

.button:active {
  transform: translateY(1px);
}

.button:disabled {
  opacity: .6;
  cursor: default;
}

.field-error,
.form-help,
.form-status {
  font-size: .9375rem;
  line-height: 1.5;
}

.field-error {
  color: var(--alert);
}

.form-help {
  color: var(--dim);
}

/* Kept in the layout while empty, so a message does not push the page. */
.form-status {
  min-height: 1.5em;
  color: var(--ivory);
}

@media (min-width: 30em) {
  .rsvp-form {
    grid-template-columns: minmax(0, 1fr) auto;
    align-items: end;
  }

  .rsvp-form > p {
    grid-column: 1 / -1;
  }
}

/* ---------- Footer ---------- */

.foot {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 4px 24px;
  padding: 18px var(--gutter) 26px;
  border-top: 1px solid rgba(255, 255, 255, .08);
  font-size: .875rem;
  line-height: 1.5;
  color: var(--dim);
}

/* ---------- Fallbacks ---------- */

@media (forced-colors: active) {
  /* The decoration goes, so every word stands on the reader's plain page color. One line
     still marks where the wall meets the floor. */
  .drape > div {
    display: none;
  }

  .drape::after {
    background: CanvasText;
  }

  /* The page paints the name itself, in the reader's text color. Left to the browser, a plate
     is laid behind the name, and that plate covers "Coming soon" and the hint above it. */
  .name {
    forced-color-adjust: none;
    background: none;
    color: CanvasText;
    -webkit-text-fill-color: CanvasText;
  }

  .fader-groove {
    background: GrayText;
  }

  .fader-ticks {
    forced-color-adjust: none;
    color: GrayText;
  }

  .fader-line {
    background: CanvasText;
    box-shadow: none;
  }

  .fader-cap {
    background: ButtonText;
    box-shadow: none;
  }

  .field-input,
  .button {
    border: 1px solid ButtonText;
  }
}

@media (prefers-reduced-motion: reduce) {
  .scale li,
  .fader-cap {
    transition: none;
  }

  .is-peak .bloom {
    animation: none;
  }
}

@media print {
  html,
  body {
    background: #fff;
    color: #000;
  }

  .drape,
  .fader,
  .hint,
  .wall::after,
  .floor::before {
    display: none;
  }

  .wall,
  .floor {
    background: none;
  }

  .name {
    background: none;
    -webkit-text-fill-color: currentColor;
    color: #000;
  }

  .soon,
  .scale li,
  .scale li.is-lit,
  .floor h2,
  .floor h2 + p,
  .field-label,
  .field-input,
  .field-error,
  .form-help,
  .form-status,
  .foot,
  a {
    color: #000;
  }

  /* A typed or saved address prints dark, on a plain field. */
  .field-input {
    background: none;
  }

  .field-input:-webkit-autofill {
    -webkit-text-fill-color: #000;
    box-shadow: none;
  }
}
