/* ==========================================================================
   Room for Hebrew – home page
   Sections, top to bottom (each fills the full width, with its own background):
     1. Hero          – slogan and button on dark blue
     2. Picture band  – Dizengoff Square, slides slowly as the page scrolls
     3. Offers        – courses, clubs, private lessons          (snow)
     4. Courses      – every course and club, with a filter     (mist)
     5. Merchandise   – picture band of the branded tote bag, notebook, bottle and pens
     6. About       – photo and short bio                      (snow)
     7. Testimonials  – what students say                        (white)
     8. Contact       – details, form and map                     (navy)
   Space inside a section: --space-2xl between its heading and its content.
   ========================================================================== */

/* The home page runs edge to edge; the sections add their own padding */
.home-main {
  gap: 0;
  padding: 0;
}

/* --------------------------------------------------------------------------
   1. Hero
   Text only, centred, on dark blue. A soft sheen instead of a flat fill, so
   the hero doesn't look like a continuation of the header: a warm glow bottom
   right, a cool one top left, over a diagonal navy gradient.
   -------------------------------------------------------------------------- */
.hero {
  display: grid;
  place-items: center;
  padding: clamp(3rem, 1.5rem + 5vw, 5.5rem) var(--page-inline-padding);
  text-align: center;
  color: var(--white);
  background:
    radial-gradient(circle at 95% 100%, color-mix(in srgb, var(--sun) 12%, transparent), transparent 45%),
    radial-gradient(circle at 5% 0%, color-mix(in srgb, var(--sky) 28%, transparent), transparent 50%),
    linear-gradient(135deg, var(--navy), var(--night));
}

.hero__inner {
  max-width: 52rem;
}

.hero__text {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: var(--space-l);
}

.hero__title {
  font-size: var(--font-size-hero);
  font-weight: 800;
  line-height: 1.02;
  letter-spacing: -0.01em;
  color: var(--white);
}

/* One word of the slogan in the script font */
.hero__title em {
  font-family: var(--font-title-script);
  font-size: 1.2em;
  font-style: normal;
  font-weight: 400;
  color: var(--sun);
}

.hero__lead {
  max-width: 38rem;
  font-size: var(--font-size-lead);
  color: var(--mist);
}

.hero__actions {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: var(--space-m);
}

/* Page-load animation: the hero parts rise one after another. Only for
   visitors who haven't asked for less motion. */
@keyframes hero-rise {
  from {
    opacity: 0;
    transform: translateY(1.5rem);
  }
}

@media (prefers-reduced-motion: no-preference) {
  .hero__text > * {
    animation: hero-rise 900ms var(--ease-out) both;
  }

  .hero__text > :nth-child(2) { animation-delay: 120ms; }
  .hero__text > :nth-child(3) { animation-delay: 240ms; }
}

/* --------------------------------------------------------------------------
   2. Picture band
   The picture is as tall as its own proportions make it, and at least twice
   the band's height, so most of it is out of sight at any moment. js/band.js
   slides it with the scroll (--band-shift), so every part of it comes into
   view. Without the script, or with reduced motion, the top of it shows.
   -------------------------------------------------------------------------- */
.band {
  position: relative;
  height: clamp(8rem, 4rem + 12vw, 14rem);
  overflow: hidden;
  background-color: var(--night);
}

.band__img {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: auto;
  min-height: 200%;
  object-fit: cover;
  transform: translateY(var(--band-shift, 0));
}

/* Photo credit, bottom left of the picture. No box: a dark glow around the
   letters keeps the white text readable on any part of the photo. */
.band__credit {
  position: absolute;
  left: 0.125rem;
  bottom: 0.125rem;
  color: var(--white);
  font-size: var(--font-size-credit);
  line-height: 1;
  text-decoration: none;
  text-shadow:
    0 0 3px var(--night),
    0 0 6px var(--night),
    0 1px 2px var(--night);
}

/* --------------------------------------------------------------------------
   3. Offers – three identical cards. Mobile: Courses, Clubs, Private lessons.
   Desktop: Private lessons, Courses (middle), Clubs.
   The background echoes the hero: soft glows, a cool one top left and a warm
   one bottom right, over the soft section colour.
   -------------------------------------------------------------------------- */
.section--offers {
  padding-block: clamp(2.5rem, 1.5rem + 3vw, 4.5rem);
  background:
    radial-gradient(circle at 5% 0%, color-mix(in srgb, var(--sky) 24%, transparent), transparent 45%),
    radial-gradient(circle at 95% 100%, color-mix(in srgb, var(--sun) 14%, transparent), transparent 45%),
    var(--color-bg-soft);
}

.section--offers .section__head {
  margin-bottom: var(--space-l);
}

.offers {
  display: grid;
  gap: var(--space-m);
  max-width: 52rem;
  padding: 0;
  margin: 0 auto;
  list-style: none;
}

/* A compact hinted card: no fill and no border, only a soft shadow */
.offer {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: var(--space-s);
  height: 100%;
  padding: var(--space-m);
  border-radius: var(--radius-card);
  box-shadow: var(--shadow-raised);
}

/* Icon on the left, title on its right */
.offer__head {
  display: flex;
  align-items: center;
  gap: var(--space-s);
}

.offer__icon {
  flex-shrink: 0;
  width: 1.75rem;
  height: 1.75rem;
  fill: none;
  stroke: var(--color-accent);
  stroke-width: 1.5;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.offer__title {
  font-family: var(--font-body);
  font-size: var(--font-size-body);
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

/* Format tags (In person / Online): accent text on a light accent tint */
.offer__tags {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-xs);
  padding: 0;
  margin: 0;
  list-style: none;
}

.offer__tag {
  padding: 0.125rem 0.625rem;
  font-size: var(--font-size-label);
  font-weight: 700;
  color: var(--color-accent);
  background-color: color-mix(in srgb, var(--color-accent) 12%, transparent);
  border-radius: var(--radius-pill);
}

.offer__text {
  color: var(--color-text-muted);
}

.offer__link {
  display: inline-flex;
  align-self: flex-start;
  margin-top: auto;
  align-items: center;
  gap: var(--space-xs);
  padding-block: var(--space-xs);
  font-size: var(--font-size-footer-link);
  color: var(--color-accent);
  text-decoration: none;
}

/* The whole card is the link: the link's own area is stretched over the card.
   The keyboard focus ring goes around the card, not just the words. */
.offer__link::after {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: var(--radius-card);
}

.offer__link:focus-visible {
  outline: none;
}

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

.offer__link .icon {
  transition: transform var(--duration-base) ease;
}

@media (hover: hover) {
  .offer {
    transition:
      transform var(--duration-base) var(--ease-out),
      box-shadow var(--duration-base) ease;
  }

  .offer:hover {
    transform: translateY(-0.375rem);
    box-shadow: var(--shadow-lift);
  }

  .offer__link:hover {
    text-decoration: underline;
  }

  .offer__link:hover .icon {
    transform: translateX(0.25rem);
  }
}

@media (min-width: 48em) {
  .offers {
    grid-template-columns: repeat(3, 1fr);
  }

  .offers__clubs { order: 1; }
  .offers__courses { order: 2; }
  .offers__private { order: 3; }
}

/* --------------------------------------------------------------------------
   4. Courses – all courses and clubs
   One row of cards on every screen size: swipe, drag with the mouse, or use
   the arrows and dots. Snapping keeps a card in the middle.
   Filters live in a popup, opened from one small button above the row.
   -------------------------------------------------------------------------- */

/* Filter button (centred above the row), with a small count of the options
   chosen */
.courses__toolbar {
  display: flex;
  justify-content: center;
  margin: calc(-1 * var(--space-xl)) 0 var(--space-s);
}

.courses__toolbar[hidden] {
  display: none;
}

.filter-button {
  position: relative;
  display: grid;
  place-items: center;
  width: 2.75rem;
  height: 2.75rem;
  padding: 0;
  color: var(--color-accent);
  background: none;
  border: 2px solid var(--color-accent);
  border-radius: 50%;
  cursor: pointer;
}

.filter-button .icon {
  width: 1.5rem;
  height: 1.5rem;
}

.filter-button__count {
  position: absolute;
  top: -0.375rem;
  right: -0.375rem;
  min-width: 1.25rem;
  padding: 0 0.25rem;
  font-size: var(--font-size-label);
  font-weight: 700;
  line-height: 1.25rem;
  text-align: center;
  color: var(--color-on-strong);
  background: var(--fill-strong);
  border-radius: var(--radius-pill);
}

.filter-button__count[hidden] {
  display: none;
}

@media (hover: hover) {
  .filter-button:hover {
    background-color: var(--color-bg);
  }
}

/* The filter popup: quiet. Small muted group labels, light tinted choices
   (the chosen one filled), no borders. */
.popup.filters {
  gap: var(--space-m);
}

/* Both popups on this page: a humble body-font title, not the heading font */
.popup__title {
  font-family: var(--font-body);
  font-size: var(--font-size-body);
}

.filters__group {
  display: flex;
  flex-direction: column;
  gap: var(--space-xs);
}

/* Group label, with the "?" button next to the level one */
.filters__head {
  display: flex;
  align-items: center;
  gap: 0.25rem;
}

.filters__label {
  font-size: var(--font-size-label);
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--color-text-muted);
}

.filters__chips {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-xs);
}

/* Filter options: small rounded rectangles with a thin outline, so they
   don't look like the pill-shaped tags on the cards. Chosen: filled. */
.chip {
  min-height: 2rem;
  padding: 0.125rem var(--space-s);
  font: inherit;
  font-size: var(--font-size-label);
  font-weight: 600;
  color: var(--color-text);
  background: none;
  border: var(--divider-width) solid var(--color-text-muted);
  border-radius: var(--radius-control);
  cursor: pointer;
}

.chip[aria-pressed="true"] {
  color: var(--color-on-strong);
  background: var(--fill-strong);
  border-color: transparent;
}

@media (hover: hover) {
  .chip[aria-pressed="false"]:hover {
    background-color: var(--color-bg-tint);
  }
}

/* Result count on the left, "Clear all" on the right */
.filters__foot {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--space-m);
  padding-top: var(--space-s);
  border-top: var(--divider-width) solid var(--color-border);
}

.filters__status {
  font-size: var(--font-size-label);
  color: var(--color-text-muted);
}

.filters__clear {
  min-height: 2.25rem;
  padding: 0 var(--space-xs);
  font: inherit;
  font-size: var(--font-size-footer-link);
  font-weight: 600;
  color: var(--color-accent);
  background: none;
  border: 0;
  cursor: pointer;
}

@media (hover: hover) {
  .filters__clear:hover {
    text-decoration: underline;
  }
}

/* The row. A grid with five rows and one column per card: every card spans
   all five rows (through subgrid), so the same part of every card (label,
   title, formats, description, actions) sits at the same height, and
   a part that wraps to more lines makes that row taller on ALL cards. */
.courses {
  --course-width: min(18rem, 78vw);

  display: grid;
  grid-auto-flow: column;
  grid-auto-columns: var(--course-width);
  grid-template-rows: repeat(5, auto);
  gap: var(--space-s) var(--space-m);
  /* Side padding lets the first and last card reach the middle too */
  padding: var(--space-xs) calc((100% - var(--course-width)) / 2) var(--space-l);
  margin: 0;
  overflow-x: auto;
  list-style: none;
  scroll-snap-type: x mandatory;
  /* No scrollbar: the arrows, dots, swiping and dragging move the row */
  scrollbar-width: none;
  /* Cards fade out at both edges instead of ending in a hard line. The mask
     stays with the row's edges, so it works on any section background. */
  mask-image: linear-gradient(to right, transparent, #000 var(--space-xl), #000 calc(100% - var(--space-xl)), transparent);
}

.courses::-webkit-scrollbar {
  display: none;
}

.courses[hidden] {
  display: none;
}

.courses > li {
  display: grid;
  grid-row: span 5;
  grid-template-rows: subgrid;
  scroll-snap-align: center;
}

.courses > li[hidden] {
  display: none;
}

/* Mouse dragging (js/home.js): snapping is paused while the mouse is down */
@media (hover: hover) {
  .courses {
    cursor: grab;
  }

  .courses.is-dragging {
    cursor: grabbing;
    user-select: none;
    scroll-snap-type: none;
  }
}

/* Shown instead of the row when no card matches the filters */
.courses__empty {
  padding: var(--space-xl) 0;
  text-align: center;
  color: var(--color-text-muted);
}

/* Arrows and dots below the row */
.courses__controls {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: var(--space-m);
}

.courses__controls[hidden] {
  display: none;
}

.courses__arrow {
  display: grid;
  place-items: center;
  width: 2.75rem;
  height: 2.75rem;
  padding: 0;
  color: var(--color-on-strong);
  background: var(--fill-strong);
  /* Invisible normally; an outline in Windows high-contrast mode */
  border: 2px solid transparent;
  border-radius: 50%;
  box-shadow: var(--shadow-raised);
  cursor: pointer;
}

.courses__arrow .icon {
  width: 1.5rem;
  height: 1.5rem;
}

.courses__arrow:disabled {
  opacity: 0.35;
  box-shadow: none;
  cursor: default;
}

/* Dots: each is a button with a 1.5rem click area around a smaller dot. The
   others are outlined circles; the current one is filled and stretched into
   a wider pill (shape and fill, not colour alone). */
.courses__dots {
  display: flex;
}

.courses__dot {
  display: grid;
  place-items: center;
  min-width: 1.5rem;
  height: 1.5rem;
  padding: 0;
  color: var(--color-accent);
  background: none;
  border: 0;
  cursor: pointer;
}

.courses__dot::before {
  content: "";
  width: 0.75rem;
  height: 0.75rem;
  border: 2px solid currentColor;
  border-radius: var(--radius-pill);
}

.courses__dot[aria-current="true"] {
  cursor: default;
}

.courses__dot[aria-current="true"]::before {
  width: 1.5rem;
  background-color: currentColor;
}

@media (hover: hover) {
  .courses__arrow:not(:disabled):hover {
    background: var(--fill-strong-hover);
  }

  .courses__dot:not([aria-current="true"]):hover::before {
    background-color: color-mix(in srgb, currentColor 40%, transparent);
  }
}

@media (prefers-reduced-motion: no-preference) {
  .courses__dot::before {
    transition: width var(--duration-base) ease;
  }
}

/* The card: its five parts are the rows of the row's grid */
.course {
  position: relative;
  display: grid;
  grid-row: span 5;
  grid-template-rows: subgrid;
  grid-template-columns: minmax(0, 1fr);
  align-items: start;
  padding: var(--space-m);
  background-color: var(--color-card);
  border: var(--divider-width) solid var(--color-border);
  border-radius: var(--radius-card);
  box-shadow: var(--shadow-card);
}

/* Small Course / Club label with its icon; the discount label (if any)
   floats at the far end of the same line */
.course__kind {
  position: relative;
  display: flex;
  align-items: center;
  gap: var(--space-xs);
  font-size: var(--font-size-label);
  color: var(--color-text-muted);
}

.course__kind .icon {
  color: var(--color-accent);
}

/* Discount label: centred on the line, outside the layout. Same weight as
   the label. */
.course__discount {
  position: absolute;
  top: 50%;
  right: 0;
  padding: 0.125rem 0.625rem;
  font-weight: inherit;
  letter-spacing: 0;
  color: var(--color-on-strong);
  background: var(--fill-strong);
  border-radius: var(--radius-pill);
  transform: translateY(-50%);
}

/* Titles: left-aligned and centred vertically in their row, so a one-line
   title sits level with its neighbours' two-line ones */
.course .offer__title {
  align-self: center;
}

/* Format tags stay on one line */
.course .offer__tags {
  flex-wrap: nowrap;
}

.course__text {
  color: var(--color-text-muted);
}

/* More Details and Ask us on one line (they wrap on the narrowest screens),
   set off from the text by a thin rule */
.course__actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: var(--space-xs);
  align-self: end;
  padding-top: var(--space-s);
  border-top: var(--divider-width) solid var(--color-border);
}

.course__actions .btn--outline {
  padding-inline: var(--space-m);
}

/* Second action: message about this course. The round yellow WhatsApp button
   (same as the header's on mobile); its name is in the hidden text. */
.course__ask {
  flex-shrink: 0;
  width: 3rem;
  height: 3rem;
  padding: 0;
}

.course__ask .icon {
  width: 1.5rem;
  height: 1.5rem;
}

@media (hover: hover) {
  .course {
    transition:
      transform var(--duration-base) var(--ease-out),
      box-shadow var(--duration-base) ease;
  }

  .course:hover {
    transform: translateY(-0.25rem);
    box-shadow: var(--shadow-lift);
  }
}

/* Cards that appear after a filter change fade in */
@keyframes course-in {
  from {
    opacity: 0;
    transform: translateY(0.75rem);
  }
}

@media (prefers-reduced-motion: no-preference) {
  .courses > li.is-entering {
    animation: course-in 450ms var(--ease-out) both;
  }
}

/* --------------------------------------------------------------------------
   7. Testimonials
   -------------------------------------------------------------------------- */
.section--quotes {
  padding-block: clamp(2.5rem, 1.5rem + 3vw, 4rem);
}

.quotes {
  display: grid;
  gap: var(--space-l);
  padding: 0;
  margin: 0;
  list-style: none;
}

.quote {
  display: flex;
  flex-direction: column;
  gap: var(--space-s);
  height: 100%;
  padding: var(--space-l);
  background-color: var(--color-bg-soft);
  border: var(--divider-width) solid var(--color-border);
  border-radius: var(--radius-card);
}

.quote .icon {
  width: 2rem;
  height: 2rem;
  color: var(--color-accent);
}

.quote blockquote {
  flex-grow: 1;
  font-size: var(--font-size-body);
  line-height: var(--line-height-body);
}

.quote figcaption {
  font-size: var(--font-size-footer-link);
  color: var(--color-text-muted);
}

.quote figcaption strong {
  display: block;
  color: var(--color-text);
}

@media (min-width: 48em) {
  .quotes {
    grid-template-columns: repeat(3, 1fr);
  }

  /* Desktop order: Mindful Speaking (2nd in the HTML, the mobile order) goes to the left. */
  .quotes > li:nth-child(2) {
    order: -1;
  }
}

/* --------------------------------------------------------------------------
   5. Merchandise picture band – the same band as the Dizengoff Square one
   (section 2, moved by js/band.js), but the picture keeps its own light blue
   background. The same picture serves both themes.
   -------------------------------------------------------------------------- */
.band--merch {
  background-color: var(--mist);
}

/* --------------------------------------------------------------------------
   6. About – text on the left, photo on the right
   Mobile: everything centred, in the order title, photo, text.
   -------------------------------------------------------------------------- */
.about {
  display: grid;
  gap: var(--space-xl);
  align-items: center;
  max-width: 52rem;
  margin: 0 auto;
  text-align: center;
}

.about__head,
.about__body {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: var(--space-m);
}

.about__head .section__title {
  margin-bottom: var(--space-xs);
}

.about__body p {
  color: var(--color-text-muted);
}

.about__photo {
  position: relative;
  max-width: 9rem;
  width: 100%;
  margin-inline: auto;
}

/* A frame offset behind the photo */
.about__photo::before {
  content: "";
  position: absolute;
  inset: 0.75rem -0.75rem -0.75rem 0.75rem;
  border: 2px solid var(--sky);
  border-radius: var(--radius-card);
}

.about__photo img {
  position: relative;
  width: 100%;
  aspect-ratio: 4 / 5;
  object-fit: cover;
  border-radius: var(--radius-card);
  box-shadow: var(--shadow-lift);
}

@media (min-width: 48em) {
  .about {
    grid-template-areas:
      "head photo"
      "body photo";
    grid-template-columns: 1fr 11rem;
    column-gap: 4.5rem;
    row-gap: var(--space-m);
    text-align: left;
  }

  .about__head,
  .about__body {
    align-items: flex-start;
  }

  .about__head {
    grid-area: head;
    align-self: end;
  }

  .about__body {
    grid-area: body;
    align-self: start;
  }

  .about__photo {
    grid-area: photo;
    max-width: none;
    margin-inline: 0 auto;
  }
}

/* --------------------------------------------------------------------------
   8. Contact – centred title, then details and map beside the form
   Mobile: one column (title, details, form, map). From 768px: the title on
   top, then two columns of the same height: details and map on the left, the
   form on the right.
   -------------------------------------------------------------------------- */
.section--contact {
  padding-block: clamp(2.5rem, 1.5rem + 3vw, 4rem);
}

.contact {
  display: grid;
}

/* The title block is centred, and sits close above the details; the form and
   the map are a larger step away from what is above them */
.contact__heading {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: var(--space-s);
  margin-bottom: calc(var(--space-s) + var(--space-xs));
  text-align: center;
}

.contact__heading .eyebrow {
  color: var(--sky);
}

/* Details: a plain icon and its value, no box around them. In one column it
   has the same width as the form and the map (30rem, centred), so its left
   edge lines up with theirs. */
.contact__list {
  display: flex;
  flex-direction: column;
  width: 100%;
  max-width: 30rem;
  padding: 0;
  margin: 0 auto;
  list-style: none;
}

.contact__item {
  display: inline-flex;
  align-items: center;
  gap: var(--space-s);
  min-height: 2.75rem;
  font-weight: 600;
  color: var(--white);
  text-decoration: none;
  overflow-wrap: anywhere;
}

.contact__item .icon {
  color: var(--sky);
}

/* WhatsApp is the main way to reach us, so its icon is the warm accent */
.contact__item--main .icon {
  color: var(--sun);
}

/* The form: fields on a slightly lighter fill, with a border clear enough
   against the navy (3:1 or better). In one column it is never wider than the
   mobile content width (30rem), centred, like the map. */
.contact__form {
  display: flex;
  flex-direction: column;
  gap: var(--space-s);
  width: 100%;
  max-width: 30rem;
  margin: var(--space-xl) auto 0;
}

.field {
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
}

.field label {
  font-size: var(--font-size-label);
  color: var(--color-on-dark-muted);
}

.field input,
.field textarea {
  width: 100%;
  min-height: 2.75rem;
  padding: 0.5rem var(--space-s);
  font: inherit;
  color: var(--white);
  background-color: rgb(255 255 255 / 0.08);
  border: var(--divider-width) solid rgb(255 255 255 / 0.5);
  border-radius: var(--radius-control);
}

.field textarea {
  resize: vertical;
}

/* The red star marks required fields; the "required" attribute carries the
   meaning for screen readers */
.field__required {
  color: var(--error-on-dark);
}

.field input[aria-invalid="true"],
.field textarea[aria-invalid="true"] {
  border-color: var(--error-on-dark);
}

.field__error {
  font-size: var(--font-size-label);
  color: var(--error-on-dark);
}

/* Agreement check box: the box on the left, the text and its links beside it
   (same look as the check boxes of the application form) */
.field .contact__check {
  display: flex;
  align-items: flex-start;
  gap: var(--space-s);
  font-size: inherit;
  color: inherit;
}

.contact__check input {
  flex-shrink: 0;
  width: 1.25rem;
  height: 1.25rem;
  margin: 0.125rem 0 0;
  min-height: 0;
  accent-color: var(--sky);
}

/* The form stays hidden until js/contact.js shows it */
.contact__form[hidden] {
  display: none;
}

/* Button, spam check and the result of sending, centred under the fields */
.contact__send {
  display: flex;
  flex-direction: column;
  align-items: center;
}

.contact__submit[aria-disabled="true"] {
  opacity: 0.6;
  cursor: default;
}

.contact__status,
.contact__failure {
  text-align: center;
}

.contact__status:not(:empty),
.contact__failure:not(:empty) {
  margin-top: var(--space-xs);
}

.contact__status {
  color: var(--color-on-dark-muted);
}

.contact__status.is-success {
  color: var(--success-on-dark);
}

.contact__failure {
  color: var(--error-on-dark);
}

/* The map: the Google embed fills its box. In one column it is never wider
   than the mobile content width (30rem), centred, so it does not grow huge
   just below the two-column breakpoint. */
.map {
  position: relative;
  aspect-ratio: 4 / 3;
  min-height: 14rem;
  width: 100%;
  max-width: 30rem;
  margin-inline: auto;
  margin-top: var(--space-xl);
  overflow: hidden;
  border: var(--divider-width) solid rgb(255 255 255 / 0.16);
  border-radius: var(--radius-card);
}

.map iframe {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  border: 0;
}

/* From 768px: the title above, then two columns, centred. Details and the map
   on the left, as wide as the details; the form on the right, never wider than
   18rem. Both columns end on the same line: the map grows to the form's
   height, or the message box grows if the left column is the taller one. */
@media (min-width: 48em) {
  .contact {
    grid-template-columns: max-content minmax(0, 18rem);
    grid-template-rows: auto auto 1fr;
    justify-content: center;
    grid-template-areas:
      "heading heading"
      "list form"
      "map form";
    column-gap: var(--space-2xl);
    align-items: start;
  }

  .contact__heading {
    grid-area: heading;
  }

  .contact__list {
    grid-area: list;
    max-width: none;
    margin: 0;
  }

  .contact__form {
    grid-area: form;
    align-self: stretch;
    max-width: none;
    margin: 0;
  }

  .field--grow,
  .field--grow textarea {
    flex-grow: 1;
  }

  .map {
    grid-area: map;
    align-self: stretch;
    aspect-ratio: auto;
    min-height: 12rem;
    max-width: none;
  }
}
