/* Ilaria & Niclas: warm Italian summer. Terracotta, citrus, garden green on warm ivory. */

@font-face {
  font-family: "Fraunces";
  src: url("../fonts/fraunces-latin-wght-normal.woff2") format("woff2");
  font-weight: 100 900;
  font-style: normal;
  font-display: swap;
}

@font-face {
  font-family: "Fraunces";
  src: url("../fonts/fraunces-latin-wght-italic.woff2") format("woff2");
  font-weight: 100 900;
  font-style: italic;
  font-display: swap;
}

@font-face {
  font-family: "Figtree";
  src: url("../fonts/figtree-latin-wght-normal.woff2") format("woff2");
  font-weight: 300 900;
  font-style: normal;
  font-display: swap;
}

@font-face {
  font-family: "Caveat";
  src: url("../fonts/caveat-latin-wght-normal.woff2") format("woff2");
  font-weight: 400 700;
  font-style: normal;
  font-display: swap;
}

:root {
  color-scheme: light;
  --paper: #fbf3e4;
  --paper-deep: #f3e2c8;
  --paper-bright: #fffaf0;
  --sage: #e6ead6;
  --ink: #3a2a20;
  --ink-soft: #6b5648;
  --terracotta: #a8431f;
  --terracotta-deep: #8a3516;
  --citrus: #e8912d;
  --lemon: #f2c14e;
  --leaf: #4f6b3a;
  --line: #dcc4a3;
  --error: #9b1c1c;
  --error-soft: #fdecea;
  --on-terracotta: #fff7ea;

  --serif: "Fraunces", "Iowan Old Style", Georgia, serif;
  --sans: "Figtree", "Segoe UI", system-ui, sans-serif;
  --hand: "Caveat", "Segoe Print", "Bradley Hand", cursive;

  /* Fluid type. Each maximum stays under 2.5 times its minimum so browser zoom still enlarges text. */
  --step--1: clamp(0.86rem, 0.82rem + 0.15vw, 0.95rem);
  --step-0: clamp(1rem, 0.95rem + 0.25vw, 1.15rem);
  --step-1: clamp(1.25rem, 1.1rem + 0.6vw, 1.6rem);
  --step-2: clamp(1.6rem, 1.3rem + 1.4vw, 2.5rem);
  --step-3: clamp(2.1rem, 1.5rem + 2.8vw, 3.9rem);
  --step-4: clamp(3.2rem, 1.6rem + 6.6vw, 7.2rem);
  --step-hand: clamp(1.45rem, 1.3rem + 0.8vw, 2rem);

  --space: clamp(1.1rem, 0.6rem + 2vw, 2.5rem);
  --section: clamp(4rem, 2.5rem + 7vw, 8.5rem);
  --wrap: 72rem;
  --radius: 1.25rem;
}

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

[hidden] {
  display: none !important;
}

html {
  scroll-behavior: smooth;
  scroll-padding-top: 5.5rem;
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
}

body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: var(--sans);
  font-size-adjust: from-font;
  font-size: var(--step-0);
  line-height: 1.65;
  overflow-wrap: break-word;
}

h1,
h2,
h3,
.serif {
  font-family: var(--serif);
  font-size-adjust: from-font;
}

.hand {
  font-family: var(--hand);
  font-size-adjust: from-font;
}

h1,
h2,
h3 {
  margin: 0;
  font-weight: 480;
  line-height: 1.08;
  letter-spacing: -0.015em;
  text-wrap: balance;
}

h2 {
  font-size: var(--step-3);
}

h3 {
  font-size: var(--step-1);
  line-height: 1.25;
  letter-spacing: -0.005em;
}

p,
address,
figure,
ol,
ul,
fieldset {
  margin: 0;
}

address {
  font-style: normal;
}

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

img {
  height: auto;
}

a {
  color: inherit;
  text-decoration-thickness: 0.08em;
  text-underline-offset: 0.2em;
}

:focus-visible {
  outline: 3px solid var(--leaf);
  outline-offset: 3px;
  border-radius: 0.3rem;
}

section:focus {
  outline: none;
}

.flow > * + * {
  margin-block-start: 1em;
}

.wrap {
  width: min(100% - 2 * var(--space), var(--wrap));
  margin-inline: auto;
}

.narrow {
  max-width: 44rem;
}

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

.skip-link {
  position: absolute;
  left: 1rem;
  top: -5rem;
  z-index: 30;
  background: var(--ink);
  color: var(--paper);
  padding: 0.7rem 1rem;
  border-radius: 0.5rem;
}

.skip-link:focus {
  top: 1rem;
}

/* Placeholders for facts still to come. Meant to be impossible to miss. */
.todo {
  background: #ffe27a;
  color: var(--ink);
  font-family: var(--sans);
  font-size-adjust: from-font;
  font-style: normal;
  font-weight: 500;
  padding: 0.05em 0.35em;
  border-radius: 0.3em;
  outline: 1px dashed var(--terracotta);
  -webkit-box-decoration-break: clone;
  box-decoration-break: clone;
}

/* Buttons and links */

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  min-height: 2.9rem;
  padding: 0.75em 1.45em;
  border: 1.5px solid var(--terracotta);
  border-radius: 999px;
  background: var(--terracotta);
  color: var(--on-terracotta);
  font: inherit;
  font-weight: 600;
  line-height: 1.2;
  text-decoration: none;
  cursor: pointer;
  transition: background-color 160ms ease, transform 160ms ease;
}

.btn:hover {
  background: var(--terracotta-deep);
  border-color: var(--terracotta-deep);
  transform: translateY(-2px);
}

.btn[disabled] {
  cursor: progress;
  opacity: 0.7;
  transform: none;
}

.btn-ghost {
  background: transparent;
  border-color: var(--ink);
  color: var(--ink);
}

.btn-ghost:hover {
  background: var(--ink);
  border-color: var(--ink);
  color: var(--paper);
}

.btn-small {
  min-height: 2.5rem;
  padding: 0.5em 1.1em;
  font-size: var(--step--1);
}

.link-button {
  padding: 0.35rem 0.2rem;
  border: 0;
  background: none;
  color: var(--terracotta);
  font: inherit;
  font-weight: 600;
  text-decoration: underline;
  text-underline-offset: 0.2em;
  cursor: pointer;
}

.text-link {
  color: var(--terracotta);
  font-weight: 600;
}

.text-link:hover,
.link-button:hover {
  color: var(--terracotta-deep);
}

.actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.8rem;
}

/* Top bar and menu */

.topbar {
  position: sticky;
  top: 0;
  z-index: 20;
  display: flex;
  align-items: center;
  gap: 0.75rem;
  padding: 0.7rem var(--space);
  background: rgb(251 243 228 / 0.93);
  border-bottom: 1px solid var(--line);
  backdrop-filter: blur(8px);
}

.monogram {
  font-family: var(--serif);
  font-size-adjust: from-font;
  font-size: 1.5rem;
  font-weight: 500;
  letter-spacing: 0.02em;
  line-height: 1;
  text-decoration: none;
}

.monogram span {
  color: var(--terracotta);
  font-style: italic;
  padding-inline: 0.12em;
}

.topbar-here {
  flex: 1;
  min-width: 0;
  overflow: hidden;
  color: var(--terracotta);
  font-size: 1.4rem;
  line-height: 1;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.photo-upload {
  margin-block-end: 1.5rem;
}

.photo-picker-button {
  background: transparent;
  color: var(--terracotta);
}

.photo-picker-button:enabled:hover {
  background: var(--terracotta);
  color: var(--on-terracotta);
}

.photo-picker-button:disabled:hover {
  border-color: var(--terracotta);
  background: transparent;
}

.photo-upload button {
  justify-self: start;
}

.photo-share-action {
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.photo-share-action button {
  max-inline-size: 100%;
  overflow-wrap: anywhere;
}

.photo-share-action button:enabled {
  flex: none;
  max-inline-size: 53%;
}

.photo-share-arrow,
.photo-share-reminder {
  display: none;
  color: #ce2027;
}

.photo-share-arrow {
  flex: 0 0 clamp(2rem, calc(19% - 0.5rem), 7rem);
  block-size: auto;
}

.photo-share-reminder {
  min-inline-size: 0;
  font-family: var(--hand);
  font-size: clamp(1.375rem, 1.15rem + 0.9vw, 1.875rem);
  font-weight: 700;
  line-height: 1.1;
  overflow-wrap: anywhere;
}

.photo-share-action button:enabled ~ :is(.photo-share-arrow, .photo-share-reminder) {
  display: block;
}

@media (max-width: 36rem) {
  .photo-share-action {
    display: grid;
    grid-template-columns: 2.25rem minmax(0, 1fr);
    gap: 0.25rem;
  }

  .photo-share-action button {
    grid-column: 1 / -1;
  }

  .photo-share-action button:enabled {
    max-inline-size: 100%;
  }

  .photo-share-arrow {
    inline-size: 2.25rem;
    block-size: 2.25rem;
    rotate: 90deg;
  }
}

.photo-selection {
  overflow-wrap: anywhere;
}

.lang-switch {
  display: flex;
  gap: 0.15rem;
}

.lang-switch button {
  display: grid;
  place-items: center;
  min-inline-size: 2.5rem;
  min-block-size: 2.5rem;
  padding: 0;
  border: 2px solid transparent;
  border-radius: 999px;
  background: none;
  cursor: pointer;
}

.lang-switch img {
  border: 1px solid rgb(58 42 32 / 0.35);
  border-radius: 3px;
}

.lang-switch button[aria-pressed="true"] {
  background: var(--ink);
  border-color: var(--ink);
}

@media (pointer: coarse) {
  .lang-switch button {
    min-inline-size: 2.75rem;
    min-block-size: 2.75rem;
  }
}

@media (forced-colors: active) {
  .lang-switch button[aria-pressed="true"] {
    border-color: Highlight;
  }
}

.menu-button {
  display: inline-flex;
  align-items: center;
  gap: 0.55rem;
  min-height: 2.5rem;
  padding: 0.5em 1em;
  border: 1.5px solid var(--ink);
  border-radius: 999px;
  background: none;
  color: var(--ink);
  font: inherit;
  font-size: var(--step--1);
  font-weight: 600;
  cursor: pointer;
}

.menu-button::before {
  content: "";
  width: 1rem;
  height: 0.6rem;
  border-block: 2px solid currentColor;
}

.menu-button:hover {
  background: var(--ink);
  color: var(--paper);
}

@media (max-width: 25rem) {
  .topbar:has(.lang-switch:not([hidden])) {
    flex-wrap: wrap;
    gap: 0.25rem;
    padding-inline: 0.5rem;
  }

  .topbar:has(.lang-switch:not([hidden])) :is(.btn-small, .menu-button) {
    padding-inline: 0.6em;
  }

  .topbar:has(.lang-switch:not([hidden])) .menu-button {
    gap: 0.35rem;
  }

  .topbar:has(.lang-switch:not([hidden])) .menu-button::before {
    width: 0.75rem;
  }
}

.menu {
  width: min(100% - 2rem, 46rem);
  max-height: min(100% - 2rem, 46rem);
  padding: clamp(1.25rem, 1rem + 2vw, 2.5rem);
  border: 1.5px solid var(--ink);
  border-radius: var(--radius);
  background: var(--paper);
  color: var(--ink);
  box-shadow: 6px 7px 0 var(--citrus);
}

.menu::backdrop {
  background: rgb(58 42 32 / 0.5);
}

.menu-head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 1rem;
  margin-block-end: 1rem;
}

.menu-head h2 {
  color: var(--terracotta);
  font-family: var(--hand);
  font-size-adjust: from-font;
  font-size: var(--step-hand);
  font-weight: 500;
  letter-spacing: 0;
}

.menu-list {
  display: grid;
  gap: 0 2rem;
  padding: 0;
  list-style: none;
  counter-reset: menu;
}

@media (min-width: 40rem) {
  .menu-list {
    grid-template-columns: 1fr 1fr;
    grid-template-rows: repeat(7, auto);
    grid-auto-flow: column;
  }
}

.menu-list li {
  counter-increment: menu;
  border-bottom: 1px dashed var(--line);
}

.menu-list a {
  display: flex;
  align-items: baseline;
  gap: 0.8rem;
  padding: 0.55rem 0.25rem;
  font-family: var(--serif);
  font-size-adjust: from-font;
  font-size: var(--step-1);
  line-height: 1.25;
  text-decoration: none;
}

.menu-list a::before {
  content: counter(menu, decimal-leading-zero);
  color: var(--terracotta);
  font-family: var(--sans);
  font-size-adjust: from-font;
  font-size: 0.8rem;
  font-weight: 600;
  letter-spacing: 0.05em;
}

.menu-list a:hover {
  color: var(--terracotta);
}

.menu-list a[aria-current="true"] {
  color: var(--terracotta);
  font-style: italic;
  text-decoration: underline;
  text-decoration-thickness: 1.5px;
}

/* Sections */

.band {
  padding-block: var(--section);
}

.band-deep {
  background: var(--paper-deep);
}

.band-sage {
  background: var(--sage);
}

.band-terracotta {
  background: var(--terracotta);
  color: var(--on-terracotta);
}

.kicker {
  display: inline-block;
  margin-block-end: 0.35rem;
  color: var(--terracotta);
  font-family: var(--hand);
  font-size-adjust: from-font;
  font-size: var(--step-hand);
  line-height: 1.1;
  rotate: -2deg;
}

.band-terracotta .kicker {
  color: var(--lemon);
}

.section-head {
  max-width: 46rem;
  margin-block-end: clamp(1.75rem, 1.2rem + 2vw, 3rem);
}

.section-head > p:not(.kicker) {
  margin-block-start: 1rem;
  color: var(--ink-soft);
  font-size: var(--step-1);
  line-height: 1.5;
}

.band-terracotta .section-head > p:not(.kicker) {
  color: var(--on-terracotta);
}

.split {
  display: grid;
  gap: clamp(2rem, 1rem + 4vw, 5rem);
  align-items: center;
}

@media (min-width: 52rem) {
  .split {
    grid-template-columns: 1.1fr 0.9fr;
  }

  .split-reverse > :first-child {
    order: 2;
  }
}

.note {
  color: var(--ink-soft);
  font-size: var(--step--1);
}

/* Hero */

.hero {
  padding-block: clamp(2rem, 1rem + 4vw, 4.5rem) var(--section);
  overflow: clip;
}

.hero-grid {
  display: grid;
  gap: clamp(2.5rem, 1rem + 5vw, 5rem);
  align-items: center;
}

@media (min-width: 56rem) {
  .hero-grid {
    grid-template-columns: 1.08fr 0.92fr;
  }
}

.hero-kicker {
  display: inline-block;
  color: var(--terracotta);
  font-size: clamp(1.9rem, 1.5rem + 1.6vw, 2.9rem);
  line-height: 1;
  rotate: -3deg;
}

.hero-title {
  margin-block: 0.12em 0.25em;
  font-size: var(--step-4);
  font-weight: 420;
  line-height: 0.95;
  letter-spacing: -0.03em;
}

.hero-title .line {
  display: block;
}

.amp {
  color: var(--terracotta);
  font-style: italic;
  font-weight: 400;
}

.hero-facts {
  display: grid;
  gap: 0.1rem;
  margin-block-end: 1.4rem;
  font-family: var(--serif);
  font-size-adjust: from-font;
  font-size: var(--step-1);
  line-height: 1.35;
}

.hero-facts p + p {
  color: var(--terracotta);
}

.lede {
  max-width: 34rem;
  margin-block-end: 1.8rem;
  color: var(--ink-soft);
  font-size: var(--step-1);
  line-height: 1.5;
}

.hero-art {
  position: relative;
  width: min(100%, 27rem);
  margin-inline: auto;
}

.arch {
  overflow: hidden;
  aspect-ratio: 3 / 4;
  border: 1.5px solid var(--ink);
  border-radius: 999px 999px var(--radius) var(--radius);
  background: var(--paper-deep);
  box-shadow: 7px 8px 0 var(--citrus);
}

.arch img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.hero-branch {
  position: absolute;
  top: -1.5rem;
  left: -2.75rem;
  width: clamp(7rem, 5rem + 8vw, 11rem);
  rotate: -14deg;
  pointer-events: none;
}

.hero-art figcaption,
.art figcaption {
  margin-block-start: 1.1rem;
  color: var(--ink-soft);
  font-size: 1.35rem;
  line-height: 1.2;
  text-align: center;
}

/* Our story */

.story-video-toggle {
  max-inline-size: 100%;
  padding: 0.55em 1.15em 0.55em 0.65em;
  list-style: none;
}

.story-video-toggle::-webkit-details-marker {
  display: none;
}

.story-video-toggle svg {
  flex: none;
  inline-size: 1.75rem;
  block-size: 1.75rem;
  border-radius: 50%;
  background: var(--on-terracotta);
  color: var(--terracotta-deep);
}

.story-video[open] .story-video-toggle svg {
  rotate: -90deg;
}

.story-video video {
  display: block;
  inline-size: min(100%, 20rem);
  block-size: auto;
  aspect-ratio: 9 / 16;
  margin-block-start: 0.75rem;
  border-radius: var(--radius);
  background: var(--ink);
}

.story-video video[data-private-src]:not([src]) {
  display: none;
}

.story-gallery {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 16rem), 1fr));
  gap: 2rem;
  max-inline-size: 41rem;
  margin-block-start: 2.5rem;
}

.story-gallery img {
  aspect-ratio: 3 / 4;
  object-fit: cover;
  background: var(--paper);
}

.arch-photo {
  width: min(100%, 23rem);
  margin-inline: auto;
}

.arch-photo .arch {
  box-shadow: 7px 8px 0 var(--leaf);
}

.arch-photo figcaption {
  margin-block-start: 1.1rem;
  color: var(--ink-soft);
  font-size: 1.35rem;
  line-height: 1.2;
  text-align: center;
}

.sprig {
  width: 12rem;
  margin-block: 1.5rem;
}

/* The day */

.timeline {
  max-width: 50rem;
  padding: 0;
  list-style: none;
}

.timeline li {
  display: grid;
  grid-template-columns: minmax(5rem, 9rem) 1fr;
  gap: clamp(1rem, 0.5rem + 2vw, 2.5rem);
  padding-block: 1.35rem;
  border-top: 1.5px dashed var(--line);
}

.timeline li:last-child {
  border-bottom: 1.5px dashed var(--line);
}

.timeline .time {
  color: var(--terracotta);
  font-family: var(--serif);
  font-size-adjust: from-font;
  font-size: var(--step-1);
  line-height: 1.25;
}

.timeline h3 {
  margin-block-end: 0.3rem;
}

.timeline p {
  color: var(--ink-soft);
}

/* Cards */

.cards {
  display: grid;
  gap: clamp(1.25rem, 0.8rem + 1.6vw, 2rem);
}

@media (min-width: 44rem) {
  .cards.two {
    grid-template-columns: 1fr 1fr;
  }
}

@media (min-width: 58rem) {
  .cards.three {
    grid-template-columns: repeat(3, 1fr);
  }
}

.card {
  position: relative;
  padding: clamp(1.4rem, 1rem + 1.6vw, 2.25rem);
  border: 1.5px solid var(--ink);
  border-radius: var(--radius);
  background: var(--paper);
  box-shadow: 5px 6px 0 var(--lemon);
}

.card h3 {
  margin-block-end: 0.5rem;
}

.card-label {
  margin-block-end: 0.6rem;
  color: var(--terracotta);
  font-size: var(--step--1);
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
}

.card-place {
  font-family: var(--serif);
  font-size-adjust: from-font;
  font-size: var(--step-2);
  line-height: 1.12;
}

.card address {
  margin-block: 0.9rem;
  color: var(--ink-soft);
}

.pin {
  display: inline-grid;
  place-items: center;
  width: 2.2rem;
  height: 2.2rem;
  margin-block-end: 0.8rem;
  border-radius: 50%;
  background: var(--terracotta);
  color: var(--on-terracotta);
  font-weight: 700;
  line-height: 1;
}

/* Map */

.map {
  max-width: 42rem;
  margin-block-start: clamp(1.75rem, 1rem + 2.5vw, 3rem);
  margin-inline: auto;
}

.map svg {
  width: 100%;
  height: auto;
  border: 1.5px solid var(--ink);
  border-radius: var(--radius);
  background: var(--paper-bright);
  /* Default colour for labels; shapes and coloured labels set their own fill. */
  fill: var(--ink);
}

.map text {
  font-family: var(--hand);
  font-size-adjust: from-font;
}

.map .map-small {
  font-family: var(--sans);
  font-size-adjust: from-font;
}

.map figcaption {
  margin-block-start: 0.8rem;
  color: var(--ink-soft);
  font-size: var(--step--1);
}

/* Illustrations beside text */

.art {
  margin-inline: auto;
}

.art img {
  width: 100%;
  border: 1.5px solid var(--ink);
  border-radius: var(--radius);
  box-shadow: 7px 8px 0 var(--citrus);
}

/* Travel */

.cols {
  display: grid;
  gap: clamp(1.5rem, 1rem + 2vw, 3rem);
}

@media (min-width: 52rem) {
  .cols {
    grid-template-columns: repeat(3, 1fr);
  }
}

.cols h3 {
  margin-block-end: 0.6rem;
  padding-block-end: 0.6rem;
  border-bottom: 1.5px solid var(--ink);
}

/* Good to know */

.know h3 {
  font-size: var(--step-2);
}

.know img {
  width: 2.6rem;
  margin-block-end: 0.9rem;
}

/* FAQ */

.faq {
  max-width: 50rem;
  border-top: 1.5px solid var(--ink);
}

.faq details {
  border-bottom: 1.5px solid var(--ink);
}

.faq summary {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding-block: 1.1rem;
  font-family: var(--serif);
  font-size-adjust: from-font;
  font-size: var(--step-1);
  line-height: 1.3;
  cursor: pointer;
  list-style: none;
}

.faq summary::-webkit-details-marker {
  display: none;
}

.faq summary::after {
  content: "+";
  flex: none;
  display: grid;
  place-items: center;
  width: 2rem;
  height: 2rem;
  border-radius: 50%;
  background: var(--terracotta);
  color: var(--on-terracotta);
  font-family: var(--sans);
  font-size-adjust: from-font;
  font-size: 1.3rem;
  line-height: 1;
}

.faq details[open] summary::after {
  content: "\2212";
}

.faq details > p {
  max-width: 42rem;
  padding-block-end: 1.3rem;
  color: var(--ink-soft);
}

/* RSVP */

.rsvp-card {
  max-width: 46rem;
  padding: clamp(1.4rem, 0.8rem + 3vw, 3rem);
  border: 1.5px solid var(--ink);
  border-radius: var(--radius);
  background: var(--paper);
  color: var(--ink);
  box-shadow: 7px 8px 0 var(--lemon);
}

.rsvp-form {
  display: grid;
  gap: 1.5rem;
}

.rsvp-group {
  display: grid;
  gap: 1.5rem;
}

.field {
  display: grid;
  gap: 0.4rem;
  min-width: 0;
  padding: 0;
  border: 0;
}

.field > label,
.field > legend {
  padding: 0;
  font-weight: 600;
}

.field > legend {
  margin-block-end: 0.4rem;
}

.hint {
  color: var(--ink-soft);
  font-size: var(--step--1);
}

.field input:not([type="radio"]),
.field textarea {
  width: 100%;
  min-height: 2.9rem;
  padding: 0.65em 0.8em;
  border: 1.5px solid var(--ink-soft);
  border-radius: 0.65rem;
  background: var(--paper-bright);
  color: var(--ink);
  font: inherit;
}

.field textarea {
  min-height: 6.5rem;
  resize: vertical;
}

.field-row {
  display: grid;
  gap: 1.25rem;
}

@media (min-width: 34rem) {
  .field-row {
    grid-template-columns: 1fr 1fr;
  }
}

.options {
  display: grid;
  gap: 0.6rem;
}

@media (min-width: 34rem) {
  .options {
    grid-template-columns: repeat(auto-fit, minmax(12rem, 1fr));
  }
}

.option {
  display: flex;
  align-items: center;
  gap: 0.65rem;
  min-height: 2.9rem;
  padding: 0.55rem 0.9rem;
  border: 1.5px solid var(--line);
  border-radius: 0.75rem;
  background: var(--paper-bright);
  cursor: pointer;
}

.option input {
  flex: none;
  width: 1.15rem;
  height: 1.15rem;
  margin: 0;
  accent-color: var(--terracotta);
}

.option:has(input:checked) {
  border-color: var(--terracotta);
  background: #fff0db;
  box-shadow: inset 0 0 0 1px var(--terracotta);
}

.option:has(input:focus-visible) {
  outline: 3px solid var(--leaf);
  outline-offset: 2px;
}

.error-msg {
  display: none;
  color: var(--error);
  font-size: var(--step--1);
  font-weight: 600;
}

.error-icon {
  display: inline-grid;
  place-items: center;
  width: 1.2em;
  height: 1.2em;
  margin-inline-end: 0.3em;
  border-radius: 50%;
  background: var(--error);
  color: #fff;
  font-size: 0.85em;
  line-height: 1;
}

/* Errors appear only after the guest has left a field or tried to send. */
.field :is(input, textarea):user-invalid {
  border-color: var(--error);
  background: var(--error-soft);
}

.field:has(:user-invalid) > .error-msg,
.error-msg.is-shown {
  display: block;
}

.hp {
  position: absolute;
  left: -200vw;
  width: 1px;
  height: 1px;
  overflow: hidden;
}

.form-status:not(:empty) {
  padding: 0.85rem 1rem;
  border: 1.5px solid var(--ink);
  border-radius: 0.75rem;
  background: var(--paper-bright);
  font-weight: 600;
}

.form-status[data-kind="error"] {
  border-color: var(--error);
  background: var(--error-soft);
  color: var(--error);
}

.form-notes {
  display: grid;
  gap: 0.5rem;
  color: var(--ink-soft);
  font-size: var(--step--1);
}

.thanks h3 {
  margin-block-end: 0.75rem;
  font-size: var(--step-2);
}

.thanks:focus {
  outline: none;
}

/* Footer */

.footer {
  padding-block: clamp(3rem, 2rem + 4vw, 5rem) 2.5rem;
  text-align: center;
}

.footer .skyline {
  width: min(100%, 60rem);
  margin: 0 auto 2rem;
}

.footer-names {
  font-family: var(--serif);
  font-size-adjust: from-font;
  font-size: var(--step-2);
  line-height: 1.2;
}

.footer p + p {
  margin-block-start: 0.4rem;
  color: var(--ink-soft);
}

/* Password gate */

.gate {
  display: grid;
  place-items: center;
  min-height: 100vh;
  min-height: 100dvh;
  padding: var(--space);
}

.gate-card {
  position: relative;
  width: min(100%, 30rem);
  padding: clamp(1.75rem, 1rem + 4vw, 3.25rem);
  border: 1.5px solid var(--ink);
  border-radius: 999px 999px var(--radius) var(--radius);
  background: var(--paper-bright);
  box-shadow: 7px 8px 0 var(--citrus);
  text-align: center;
}

.gate-card > img {
  width: 5.5rem;
  margin: 1.5rem auto 0.5rem;
}

.gate-kicker {
  color: var(--terracotta);
  font-size: var(--step-hand);
  line-height: 1;
}

.gate-title {
  margin-block: 0.2em 0.5em;
  font-size: clamp(2.2rem, 1.6rem + 3vw, 3.4rem);
  font-weight: 440;
}

.gate-text {
  margin-block-end: 1.5rem;
  color: var(--ink-soft);
}

.gate-form {
  display: grid;
  gap: 1rem;
  text-align: start;
}

.gate-row {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 0.5rem;
  align-items: center;
}

.gate-status {
  min-height: 1.6em;
  color: var(--ink-soft);
  font-size: var(--step--1);
}

.gate-status[data-kind="error"] {
  color: var(--error);
  font-weight: 600;
}

.gate-help {
  margin-block-start: 1.25rem;
  color: var(--ink-soft);
  font-size: var(--step--1);
}

.gate [aria-invalid="true"] {
  border-color: var(--error);
  background: var(--error-soft);
}

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }

  .btn {
    transition: none;
  }

  .btn:hover {
    transform: none;
  }
}

@media print {
  .topbar,
  .menu,
  .gate {
    display: none;
  }
}
