/* ==========================================================================
   HERO
     1. Home hero       (big "OCEAN" wave image, used on the home page)
     2. Page hero       (shorter banner, used on service pages)
     3. Enquiry form    (opens over the home hero; at the end of this file)
   ========================================================================== */


/* ==========================================================================
   1. Home hero
   ========================================================================== */

.hero {
  --hero-base: #1c4248;   /* dark teal at the bottom of the photo; fills any gaps */

  position: relative;
  display: flex;
  flex-direction: column;

  /* Fill one screen height (never taller than the photo's own shape, never under 600px) */
  min-height: max(600px, min(100svh, 66vw));
  padding-top: calc(var(--header-h) + 32px);    /* keeps content clear of the menu */
  padding-bottom: 24px;

  overflow: hidden;
  isolation: isolate;
  color: var(--white);
  background: var(--hero-base);
}

/* --- Background video (falls back to its poster photo) --- */
.hero__media {
  position: absolute;
  inset: 0;
  z-index: -1;
}

.hero__media video {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: 50% 0;
}

/* The video fades and eases in (slight zoom out) when the intro starts.
   js/modules/hero-intro.js adds .is-playing once the video is ready. */
.hero.is-playing .hero__media video,
html:not(.js) .hero__media video {
  animation: hero-video-in 2.4s var(--ease) both;
}

/* Darkening layers over the photo */
.hero__media::after {
  content: "";
  position: absolute;
  inset: 0;
  background:
    /* fades to the site dark color (--dark-bg in base.css) at the bottom,
       flowing into the dark section below */
    linear-gradient(180deg,
      transparent 50%,
      color-mix(in srgb, var(--dark-bg) 45%, transparent) 72%,
      color-mix(in srgb, var(--dark-bg) 85%, transparent) 90%,
      var(--dark-bg) 100%),
    /* soft dark shade on the left so the text is easy to read */
    linear-gradient(90deg, rgba(8, 38, 54, .38) 0%, rgba(8, 38, 54, .12) 45%, transparent 65%);
}

/* --- Intro: big, widely spaced "OCEAN" / "AIR QUALITY" ---
   Drawn and played by js/modules/hero-intro.js (timings live there);
   letter shapes are in js/modules/hero-intro-letters.js. The script puts
   one small image per letter inside .hero-intro__stage. */
.hero-intro {
  position: absolute;
  inset: 0;
  z-index: 2;
  display: grid;
  place-items: center;
  pointer-events: none;
}

/* Both lines together: up to 40% of the screen height,
   but never wider than about 80% of the screen */
.hero-intro__stage {
  position: relative;
  height: min(40vh, 20vw);
  aspect-ratio: 301 / 76;      /* same shape as the stage in hero-intro-letters.js */
}

.hero-intro__stage img {
  position: absolute;
  display: block;
  height: auto;
  opacity: 0;
  will-change: transform, opacity;   /* animate on the graphics card */
}

/* No JavaScript: skip the intro entirely */
html:not(.js) .hero-intro {
  display: none;
}

/* --- Before the intro finishes, keep the photo, text and icons hidden --- */
.js .hero:not(.is-playing):not(.is-ready) .hero__media video,
.js .hero:not(.is-ready) .hero__content > *,
.js .hero:not(.is-ready) .hero-social,
.js .hero:not(.is-ready) .scroll-cue {
  opacity: 0;
  pointer-events: none;   /* not clickable while invisible */
}

/* The text block is centered vertically (margin-block: auto), sitting just
   below the middle of the screen because the top padding (menu space) is
   larger than the bottom padding. If a screen is very short, the hero grows
   instead of cutting anything off. */
.hero__content {
  position: relative;
  z-index: 1;
  /* When the enquiry form closes, stay above the blur until it has faded,
     so the text never flicks blurry (see section 3) */
  transition: z-index 0s .6s;
  margin-block: auto;
  margin-left: 8.5vw;
  max-width: min(40rem, 50vw);
}

/* --- Social icons: stacked vertically, middle of the right edge --- */
.hero-social {
  position: absolute;
  right: 6vw;
  top: 50%;
  transform: translateY(-50%);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: clamp(12px, 1.4vw, 26px);
}

.hero.is-ready .hero-social {
  animation: fade-in 1s var(--ease) .4s both;
}

.hero-social a {
  display: grid;
  place-items: center;
  width: 44px;                 /* comfortable tap target */
  height: 44px;
  color: var(--white);
  opacity: .92;
  transition: color .25s, opacity .25s, transform .25s var(--ease);
}

.hero-social a:hover {
  color: #9fe0ff;
  opacity: 1;
  transform: scale(1.12);
}

.hero-social svg {
  width: clamp(24px, 1.6vw, 32px);
  height: auto;
}

/* Each line fades up one after another once the intro is done (.is-ready).
   "backwards" (not "both") hands control back to normal styles when it ends,
   so later fades (e.g. the buttons hiding behind the enquiry form) are smooth. */
.hero.is-ready .hero__content > * {
  animation: fade-up .9s var(--ease) backwards;
}

.hero.is-ready .hero__content > :nth-child(2) { animation-delay: .15s; }
.hero.is-ready .hero__content > :nth-child(3) { animation-delay: .25s; }
.hero.is-ready .hero__content > :nth-child(4) { animation-delay: .35s; }

/* The h1 sets the headline size; the subtitle is sized relative to it
   so both lines are the same width. js/modules/fit-text.js then
   fine-tunes the subtitle so the widths match exactly. */
.hero__title {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  font-size: clamp(2.8rem, 5.2vw, 6.75rem);   /* "Peace of mind" size */
  text-shadow: 0 2px 24px rgba(5, 30, 45, .25);
}

.hero__title-big,
.hero__title-small {
  width: max-content;          /* each line is only as wide as its text */
}

.hero__title-big {
  font: 800 1em / 1.02 var(--font-display);
  letter-spacing: -.01em;
}

.hero__title-small {
  margin-top: .25em;
  font: 600 .535em / 1.2 var(--font-body);   /* about the same width as the headline */
  letter-spacing: .005em;
  color: rgba(255, 255, 255, .96);
}

/* Short blue line under the title */
.hero__rule {
  display: block;
  width: clamp(64px, 5vw, 110px);
  height: 4px;
  margin: clamp(16px, 1.5vw, 28px) 0 clamp(18px, 1.7vw, 34px);
  border-radius: 2px;
  background: var(--blue);
}

.hero__text {
  max-width: 30em;
  font: 400 clamp(.98rem, 1.12vw, 1.4rem) / 1.6 var(--font-body);
  color: rgba(255, 255, 255, .88);
}

.hero__actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: clamp(22px, 2vw, 38px);
}

.hero__actions {
  align-items: center;
}

.hero__actions .btn {
  height: 50px;
  padding: 0 26px;
  font-size: 14.5px;
}

/* Round call button: phone icon in a glassy circle.
   On hover it fills white and a soft ring ripples out. */
.btn-call {
  position: relative;
  display: grid;
  place-items: center;
  width: 50px;
  height: 50px;
  border: 1px solid rgba(255, 255, 255, .55);
  border-radius: 50%;
  color: var(--white);
  background: rgba(255, 255, 255, .06);
  -webkit-backdrop-filter: blur(6px);
  backdrop-filter: blur(6px);
  transition: background-color .3s, color .3s, border-color .3s, transform .3s var(--ease);
}

.btn-call svg {
  width: 21px;
  height: 21px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.7;
  stroke-linejoin: round;
}

.btn-call::after {
  content: "";
  position: absolute;
  inset: -1px;
  border: 1px solid rgba(255, 255, 255, .6);
  border-radius: 50%;
  opacity: 0;
  pointer-events: none;
}

.btn-call:hover,
.btn-call:focus-visible {
  color: var(--ink);
  background: var(--white);
  border-color: var(--white);
  transform: translateY(-2px);
}

.btn-call:hover::after {
  animation: call-ring 1.4s var(--ease) infinite;
}

.btn-call:hover svg {
  animation: call-wiggle .6s ease-in-out;
}

@keyframes call-ring {
  from { opacity: .7; transform: scale(1); }
  to   { opacity: 0;  transform: scale(1.55); }
}

@keyframes call-wiggle {
  0%, 100% { transform: rotate(0); }
  25%      { transform: rotate(-12deg); }
  50%      { transform: rotate(10deg); }
  75%      { transform: rotate(-6deg); }
}

/* --- Animated "scroll down" mouse icon --- */
.hero.is-ready .scroll-cue {
  animation: fade-in 1s var(--ease) .6s both;
}

.scroll-cue {
  position: absolute;
  left: 50%;
  bottom: 28px;
  width: 26px;
  height: 42px;
  margin-left: -13px;
  border: 2px solid rgba(255, 255, 255, .6);
  border-radius: 14px;
}

.scroll-cue span {
  position: absolute;
  left: 50%;
  top: 8px;
  width: 4px;
  height: 8px;
  margin-left: -2px;
  border-radius: 2px;
  background: var(--white);
  animation: scroll-dot 1.8s ease-in-out infinite;
}


/* ==========================================================================
   2. Page hero (service pages)
   ========================================================================== */

.page-hero {
  position: relative;
  display: flex;
  align-items: flex-end;
  min-height: clamp(460px, 64vh, 640px);
  padding-block: calc(var(--header-h) + 48px) clamp(48px, 6vw, 88px);
  overflow: hidden;
  isolation: isolate;
  color: var(--white);
  background: var(--sea);
}

.page-hero__media {
  position: absolute;
  inset: 0;
  z-index: -1;
}

.page-hero__media img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: 50% 100%;
  animation: hero-zoom 2.2s var(--ease) both;
}

/* Darker overlay than the home hero so the page title stands out */
.page-hero__media::after {
  content: "";
  position: absolute;
  inset: 0;
  background:
    linear-gradient(180deg, rgba(8, 38, 54, .6) 0%, rgba(8, 38, 54, .35) 45%, rgba(8, 38, 54, .8) 100%),
    linear-gradient(90deg, rgba(8, 38, 54, .5), transparent 70%);
}

.page-hero__content > * {
  animation: fade-up .9s var(--ease) both;
}

.page-hero__content > :nth-child(2) { animation-delay: .1s; }
.page-hero__content > :nth-child(3) { animation-delay: .2s; }
.page-hero__content > :nth-child(4) { animation-delay: .3s; }

.page-hero h1 {
  font: 800 clamp(2.4rem, 5vw, 4.5rem) / 1.05 var(--font-display);
  letter-spacing: -.01em;
}

.page-hero__lead {
  max-width: 38em;
  margin-top: 18px;
  font-size: clamp(1.05rem, 1.3vw, 1.25rem);
  color: rgba(255, 255, 255, .88);
}

.page-hero .btn {
  margin-top: 28px;
}


/* ==========================================================================
   Animations
   ========================================================================== */

@keyframes hero-video-in {
  from { scale: 1.07; opacity: 0; }
  to   { scale: 1;    opacity: 1; }
}

@keyframes hero-zoom {
  from { scale: 1.07; opacity: .6; }
  to   { scale: 1;    opacity: 1; }
}

@keyframes fade-up {
  from { opacity: 0; transform: translateY(26px); }
  to   { opacity: 1; transform: none; }
}

@keyframes fade-in {
  from { opacity: 0; }
  to   { opacity: 1; }
}

@keyframes scroll-dot {
  0%   { opacity: 0; transform: translateY(0); }
  30%  { opacity: 1; }
  100% { opacity: 0; transform: translateY(14px); }
}


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

/* Short screens: hide the scroll icon so it never sits on the buttons */
@media (max-height: 820px) {
  .scroll-cue {
    display: none;
  }
}

/* Tablets and phones: the full "OCEAN" artwork on top, text underneath */
@media (max-width: 1099px) {
  .hero {
    --hero-img-w: 130vw;     /* video width on tablets/phones */

    min-height: 0;
    padding-top: 0;
    padding-bottom: 64px;
    /* photo blends into teal (until the photo ends), which then fades to the
       site dark color for the next section */
    background: linear-gradient(180deg, var(--hero-base) calc(var(--hero-img-w) * .577), var(--dark-bg) 100%);
  }

  .hero__media {
    position: relative;
    inset: auto;
    height: calc(var(--hero-img-w) * .577);   /* the video's own height at that width (1248 x 720) */
    overflow: hidden;
  }

  .hero__media video {
    position: absolute;
    left: 50%;
    top: 0;
    width: var(--hero-img-w);
    max-width: none;
    height: auto;
    transform: translateX(-50%);
  }

  .hero__media::after {
    background: linear-gradient(180deg, transparent 45%, var(--hero-base) 100%);
  }

  .hero__content {
    margin: -12vw var(--gutter) 0;   /* text overlaps the bottom of the photo slightly */
    max-width: 720px;
  }

  /* Icons move into a row in the top-right corner of the photo */
  .hero-social {
    top: calc(var(--header-h) + 8px);
    right: calc(var(--gutter) - 10px);
    transform: none;
    flex-direction: row;
    gap: 4px;
  }

  .hero-social svg {
    width: 22px;
  }

  .scroll-cue {
    display: none;
  }
}

/* Phones */
@media (max-width: 760px) {
  .hero {
    --hero-img-w: 150vw;
  }

  .hero__content {
    margin-top: -14vw;
    max-width: none;
  }

  .hero__title { font-size: clamp(2.5rem, 12vw, 3.6rem); }
  .hero__text  { font-size: 1rem; }

  .hero__actions .btn {
    flex: 1 1 auto;
  }

  .page-hero {
    min-height: 420px;
  }
}

/* Visitors who turn off animations: skip the intro, show the text right away
   (hero-intro.js also checks this and adds .is-ready immediately) */
@media (prefers-reduced-motion: reduce) {
  .hero-intro {
    display: none;
  }
}

/* ==========================================================================
   3. Enquiry form (opens over the hero)
   Opened/closed by js/modules/hero-enquiry.js, which adds .is-open.
   Layers, bottom to top:
     hero photo + hero text  ->  blurred by the backdrop below
     .hero-enquiry__backdrop ->  blur + dim (backdrop-filter, so only what's
                                 behind it is blurred)
     .hero-enquiry__panel    ->  the form, sharp
     site header + logo      ->  fixed above the whole hero, always sharp
   ========================================================================== */

/* Stop the page scrolling behind the open form */
html.enquiry-open {
  overflow: hidden;
}

.hero-enquiry {
  position: absolute;
  inset: 0;
  z-index: 3;
  display: flex;
  align-items: center;
  justify-content: flex-end;            /* form on the right, opposite the hero text */
  padding: calc(var(--header-h) + 24px) 6vw 40px 8.5vw;
}

/* Closed: fully removed, so it never sits invisibly over the hero buttons.
   (display: flex above would otherwise override the "hidden" attribute.) */
.hero-enquiry[hidden] {
  display: none;
}

/* While fading in or out, don't catch clicks */
.hero-enquiry:not(.is-open) {
  pointer-events: none;
}

/* Blur + dim everything behind the form (a bit darker on the form side) */
.hero-enquiry__backdrop {
  position: absolute;
  inset: 0;
  background: linear-gradient(90deg, rgba(3, 10, 14, .25) 0%, rgba(3, 10, 14, .45) 55%, rgba(3, 10, 14, .6) 100%);
  -webkit-backdrop-filter: blur(14px) saturate(115%);
  backdrop-filter: blur(14px) saturate(115%);
  opacity: 0;
  will-change: opacity;
  /* closing: fades out just after the form starts leaving */
  transition: opacity .5s cubic-bezier(.4, 0, .2, 1) .1s;
}

.hero-enquiry.is-open .hero-enquiry__backdrop {
  opacity: 1;
  transition-delay: 0s;   /* opening: blur comes in first */
}

/* The form panel slides in from the right.
   Opening: glides in just after the blur starts. Closing: leaves first, a bit quicker. */
.hero-enquiry__panel {
  position: relative;
  width: min(560px, 38vw);
  opacity: 0;
  transform: translateX(40px);
  will-change: opacity, transform;
  transition: opacity .35s ease, transform .45s var(--ease);
}

.hero-enquiry.is-open .hero-enquiry__panel {
  opacity: 1;
  transform: none;
  transition: opacity .5s ease .1s, transform .6s var(--ease) .1s;
}

.hero-enquiry__title {
  margin-bottom: clamp(4px, 1vh, 12px);
  padding-right: 56px;                  /* room for the close button */
  font: 600 clamp(1.4rem, 1.8vw, 1.9rem) / 1.2 var(--font-display);
}

/* × close button, top-right corner */
.hero-enquiry__close {
  position: absolute;
  top: -6px;
  right: 0;
  display: grid;
  place-items: center;
  width: 44px;
  height: 44px;
  border: 1px solid rgba(255, 255, 255, .4);
  border-radius: 50%;
  color: var(--white);
  transition: background-color .25s, border-color .25s, transform .3s var(--ease);
}

.hero-enquiry__close svg {
  width: 18px;
  height: 18px;
  fill: none;
  stroke: currentColor;
  stroke-width: 2;
  stroke-linecap: round;
}

.hero-enquiry__close:hover {
  background: rgba(255, 255, 255, .12);
  border-color: var(--white);
  transform: rotate(90deg);
}

/* --- Form layout --- */
.enquiry-form {
  display: grid;
  gap: clamp(10px, 2vh, 24px);
}

.enquiry-form__row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 32px;
}

/* --- Underlined fields; the label sits inside and floats up when typing --- */
.line-field {
  position: relative;
}

.line-field input,
.line-field select,
.line-field textarea {
  width: 100%;
  padding: 22px 0 9px;
  border: 0;
  border-bottom: 1px solid rgba(255, 255, 255, .55);
  border-radius: 0;
  font: 400 clamp(1rem, 1.15vw, 1.2rem) / 1.3 var(--font-body);
  color: var(--white);
  background: transparent;
  outline: none;
  transition: border-color .25s, box-shadow .25s;
}

.line-field textarea {
  resize: none;
}

.line-field label {
  position: absolute;
  left: 0;
  top: 22px;
  font: 400 clamp(1rem, 1.15vw, 1.2rem) / 1.3 var(--font-body);
  color: rgba(255, 255, 255, .85);
  pointer-events: none;
  transform-origin: left top;
  transition: transform .25s var(--ease), color .25s;
}

/* Label floats up when the field is focused or filled */
.line-field input:focus + label,
.line-field input:not(:placeholder-shown) + label,
.line-field textarea:focus + label,
.line-field textarea:not(:placeholder-shown) + label {
  transform: translateY(-22px) scale(.72);
  color: #9fe0ff;
}

.line-field input:focus,
.line-field select:focus,
.line-field textarea:focus {
  border-bottom-color: var(--blue);
  box-shadow: 0 1px 0 var(--blue);
}

.line-field .is-invalid {
  border-bottom-color: #ff8a8a;
}

/* Keep browser autofill from painting a light background */
.line-field input:-webkit-autofill {
  -webkit-text-fill-color: var(--white);
  transition: background-color 9999s;
}

/* Service dropdown (fallback look if JavaScript is off) */
.line-field--select select {
  padding-right: 32px;
  -webkit-appearance: none;
  appearance: none;
  cursor: pointer;
}

.line-field select option {
  color: var(--ink);
  background: var(--white);
}

/* --- Themed dropdown (built by js/modules/custom-select.js) --- */
.c-select {
  position: relative;
}

/* Looks like the other underlined fields */
.c-select__button {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  width: 100%;
  padding: 22px 0 9px;
  border-bottom: 1px solid rgba(255, 255, 255, .55);
  font: 400 clamp(1rem, 1.15vw, 1.2rem) / 1.3 var(--font-body);
  text-align: left;
  color: rgba(255, 255, 255, .85);     /* placeholder look until something is chosen */
  transition: border-color .25s, box-shadow .25s;
}

.c-select.has-value .c-select__button {
  color: var(--white);
}

.c-select__button:focus-visible,
.c-select.is-open .c-select__button {
  outline: none;
  border-bottom-color: var(--blue);
  box-shadow: 0 1px 0 var(--blue);
}

.c-select__chevron {
  flex: none;
  width: 20px;
  height: 20px;
  fill: none;
  stroke: currentColor;
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
  transition: transform .3s var(--ease);
}

.c-select.is-open .c-select__chevron {
  transform: rotate(180deg);
}

/* The list: dark frosted glass panel with rounded options */
.c-select__list {
  position: absolute;
  top: calc(100% + 8px);
  left: 0;
  right: 0;
  z-index: 5;
  max-height: min(310px, 50vh);         /* fits all six services on most screens */
  overflow-y: auto;
  padding: 6px;
  border: 1px solid rgba(255, 255, 255, .14);
  border-radius: 14px;
  background: rgba(10, 26, 33, .92);
  -webkit-backdrop-filter: blur(16px);
  backdrop-filter: blur(16px);
  box-shadow: 0 24px 48px -16px rgba(0, 0, 0, .7);
  animation: dropdown-in .2s var(--ease);
}

.c-select__option {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 11px 14px;
  border-radius: 9px;
  font-size: .98rem;
  color: rgba(255, 255, 255, .82);
  cursor: pointer;
  transition: background-color .15s, color .15s;
}

.c-select__option:hover,
.c-select__option:focus {
  outline: none;
  background: rgba(255, 255, 255, .08);
  color: var(--white);
}

/* Chosen option: light blue with a check mark */
.c-select__option[aria-selected="true"] {
  color: #9fe0ff;
}

.c-select__option[aria-selected="true"]::after {
  content: "";
  width: 14px;
  height: 14px;
  background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%239fe0ff' stroke-width='3' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M20 6 9 17l-5-5'/%3E%3C/svg%3E") center / contain no-repeat;
}

@keyframes dropdown-in {
  from { opacity: 0; transform: translateY(-6px); }
  to   { opacity: 1; transform: none; }
}

/* --- Message + Send button --- */
.enquiry-form__footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  margin-top: 8px;
}

.enquiry-form .form__status {
  flex: 1;
  text-align: left;
  font-size: .9rem;
  color: #9fe0ff;
}

.enquiry-form .form__status.is-error {
  color: #ffb3b3;
}

/* Send: soft glass pill with a round arrow badge.
   On hover it turns white and the arrow nudges forward. */
.enquiry-form__send {
  flex: none;
  display: inline-flex;
  align-items: center;
  gap: 14px;
  padding: 6px 6px 6px 26px;
  border: 1px solid rgba(255, 255, 255, .35);
  border-radius: 999px;
  font: 500 .95rem / 1 var(--font-display);
  letter-spacing: .14em;
  text-transform: uppercase;
  color: var(--white);
  background: rgba(255, 255, 255, .08);
  -webkit-backdrop-filter: blur(6px);
  backdrop-filter: blur(6px);
  transition: background-color .3s, color .3s, border-color .3s, transform .3s var(--ease), box-shadow .3s;
}

.enquiry-form__send-icon {
  display: grid;
  place-items: center;
  width: 38px;
  height: 38px;
  border-radius: 50%;
  color: var(--ink);
  background: var(--white);
  transition: background-color .3s, color .3s;
}

.enquiry-form__send-icon svg {
  width: 18px;
  height: 18px;
  fill: none;
  stroke: currentColor;
  stroke-width: 2.2;
  stroke-linecap: round;
  stroke-linejoin: round;
  transition: transform .3s var(--ease);
}

.enquiry-form__send:hover,
.enquiry-form__send:focus-visible {
  outline: none;
  border-color: var(--white);
  color: var(--ink);
  background: var(--white);
  transform: translateY(-2px);
  box-shadow: 0 14px 30px -14px rgba(0, 0, 0, .7);
}

.enquiry-form__send:hover .enquiry-form__send-icon,
.enquiry-form__send:focus-visible .enquiry-form__send-icon {
  color: var(--white);
  background: var(--blue);
}

.enquiry-form__send:hover svg,
.enquiry-form__send:focus-visible svg {
  transform: translateX(3px);
}

.enquiry-form__send:active {
  transform: translateY(0) scale(.98);
}

/* --- Desktop: the hero text stays sharp beside the form ---
   It's lifted above the blur layer; only its buttons fade away
   (they aren't needed while the form is open). */
.hero__actions {
  transition: opacity .35s ease, transform .35s var(--ease), visibility 0s;
}

@media (min-width: 1100px) {
  .hero.is-enquiry-open .hero__content {
    z-index: 4;
    transition-delay: 0s;   /* lift above the blur straight away when opening */
  }

  .hero.is-enquiry-open .hero__actions {
    opacity: 0;
    transform: translateY(8px);
    visibility: hidden;
    transition: opacity .3s ease, transform .3s var(--ease), visibility 0s .3s;
  }
}

/* --- Tablets and phones: the form covers the screen and scrolls if needed --- */
@media (max-width: 1099px) {
  .hero-enquiry {
    position: fixed;
    z-index: 45;
    align-items: flex-start;
    justify-content: center;
    overflow-y: auto;
    overscroll-behavior: contain;
    padding: calc(var(--header-h) + 24px) var(--gutter) calc(40px + env(safe-area-inset-bottom, 0px));
  }

  .hero-enquiry__backdrop {
    position: fixed;
    background: rgba(3, 10, 14, .55);
  }

  .hero-enquiry__panel {
    width: min(560px, 100%);
    transform: translateY(30px);
  }
}

@media (max-width: 520px) {
  .enquiry-form__row {
    grid-template-columns: 1fr;
    gap: inherit;
  }
}
