/* ==========================================================================
   Sections: hero, about, services, why atlantys, enquiry panel, reveals
   ========================================================================== */

/* Hero ------------------------------------------------------------------- */

.hero {
  position: relative;
  isolation: isolate;
  display: grid;
  grid-template-rows: 1fr auto;
  min-height: 100vh;
  min-height: 100svh;
  padding-top: var(--header-space);
  padding-bottom: clamp(2.5rem, 6vh, 4.5rem);
  overflow: hidden;
  background: #000;
}

.hero__media {
  position: absolute;
  inset: 0;
  z-index: -1;
  background: #000 url("../media/posters/hero-desktop-new-poster.8594bba350.jpg") center 42% / cover no-repeat;
}

.hero__video {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center 42%;
  pointer-events: none;
}

.hero__overlay {
  position: absolute;
  inset: 0;
  background:
    radial-gradient(60% 46% at 50% 56%, rgba(0, 0, 0, 0.42), rgba(0, 0, 0, 0) 72%),
    linear-gradient(180deg,
      rgba(0, 0, 0, 0.62) 0%,
      rgba(0, 0, 0, 0.18) 22%,
      rgba(0, 0, 0, 0.08) 55%,
      rgba(0, 0, 0, 0.45) 86%,
      #000 100%);
}

/* Portrait layouts use the portrait media */
@media (max-aspect-ratio: 4/5) {
  .hero__media {
    background-image: url("../media/posters/hero-mobile-poster.04a606a914.jpg");
    background-position: center center;
  }

  .hero__video {
    object-position: center center;
  }
}

.hero__top {
  grid-row: 2;
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 2rem;
  margin-top: clamp(1.75rem, 4vh, 3rem);
}

.hero__intro {
  max-width: 29.5em;
  padding-left: clamp(0rem, 1.6vw, 1.5rem);
  color: var(--text-soft);
  font-size: clamp(0.975rem, 1.12vw, 1.175rem);
  line-height: 1.55;
}

.hero__statement {
  flex: none;
  max-width: 24em;
  padding-right: clamp(0rem, 1.6vw, 1.5rem);
  color: var(--text-soft);
  font-size: clamp(0.975rem, 1.12vw, 1.175rem);
  line-height: 1.55;
  text-align: right;
}

.hero__center {
  grid-row: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  min-height: 0;
  padding-block: clamp(1.5rem, 4vh, 3rem) 0;
  text-align: center;
}

@media (min-width: 768px) and (max-height: 760px) {
  .hero {
    padding-bottom: 1.25rem;
  }

  .hero__title {
    font-size: clamp(2.6rem, 5.4vw + 0.5rem, 5.75rem);
  }

  .hero .button--hero {
    margin-top: 1.25rem;
  }

  .hero__top {
    margin-top: 1.25rem;
  }
}

.hero__eyebrow {
  margin-bottom: clamp(1rem, 1.6vw, 1.5rem);
  color: rgba(255, 255, 255, 0.8);
  font-size: clamp(0.72rem, 0.88vw, 0.9rem);
  font-weight: 400;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.hero__title {
  font-size: clamp(3rem, 7.2vw + 0.75rem, 9.75rem);
  font-weight: 500;
  line-height: 0.98;
  letter-spacing: -0.045em;
  filter: drop-shadow(0 4px 30px rgba(0, 0, 0, 0.45));
}

.hero__line {
  display: block;
  width: fit-content;
  margin-inline: auto;
  padding-inline: 0.04em;
}

.hero__line--accent {
  padding-bottom: 0.06em;
}

.hero .button--hero {
  margin-top: clamp(1.75rem, 2.8vw, 2.75rem);
}

.hero__play {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  min-height: 2.75rem;
  margin-top: 1rem;
  padding: 0 1.125rem;
  border: 1px solid rgba(255, 255, 255, 0.14);
  border-radius: var(--radius-pill);
  background: rgba(0, 0, 0, 0.5);
  color: var(--text-soft);
  font-size: 0.875rem;
  line-height: 1;
  transition: border-color var(--dur) var(--ease), color var(--dur) var(--ease);
}

.hero__play:hover {
  border-color: rgba(143, 216, 251, 0.45);
  color: #fff;
}

@media (max-width: 767.98px) {
  .hero {
    display: flex;
    flex-direction: column;
    justify-content: center;
    padding-inline: max(var(--gutter), env(safe-area-inset-left)) max(var(--gutter), env(safe-area-inset-right));
    padding-bottom: calc(2.5rem + env(safe-area-inset-bottom));
    overflow: visible;
    text-align: center;
  }

  .hero__top,
  .hero__center {
    display: contents;
  }

  .hero__overlay {
    background:
      radial-gradient(80% 40% at 50% 58%, rgba(0, 0, 0, 0.45), rgba(0, 0, 0, 0) 75%),
      linear-gradient(180deg,
        rgba(0, 0, 0, 0.78) 0%,
        rgba(0, 0, 0, 0.35) 26%,
        rgba(0, 0, 0, 0.12) 50%,
        rgba(0, 0, 0, 0.5) 85%,
        #000 100%);
  }

  .hero__statement {
    display: none;
  }

  .hero__eyebrow { order: 1; }
  .hero__title { order: 2; }

  .hero .button--hero {
    order: 3;
    align-self: center;
  }

  .hero__play {
    order: 4;
    align-self: center;
  }

  .hero__intro {
    order: 5;
    align-self: center;
    width: min(23rem, 100%);
    max-width: none;
    margin: 1.75rem auto 0;
    padding: 0;
    font-size: 0.9375rem;
    line-height: 1.55;
    text-align: center;
  }

  .hero__eyebrow {
    font-size: 0.75rem;
    letter-spacing: 0.06em;
  }

  .hero .button--hero {
    margin-top: 2.25rem;
  }
}

@media (min-width: 560px) and (max-aspect-ratio: 4/5) {
  .hero__title {
    font-size: clamp(3rem, 10.5vw, 7.5rem);
  }
}

@media (max-width: 559.98px) {
  .hero__title {
    font-size: clamp(3.25rem, 18.5vw, 5.5rem);
    line-height: 0.95;
  }

  .hero__word {
    display: block;
  }
}

/* Short phones: start from the top and let the page scroll. Do not shrink the type. */
@media (max-width: 767.98px) and (max-height: 700px) {
  .hero {
    justify-content: flex-start;
    padding-top: calc(var(--header-space) + 1.25rem);
  }

  .hero .button--hero {
    margin-top: 1.5rem;
  }

  .hero__intro {
    margin-top: 1.25rem;
  }
}

/* Generic section -------------------------------------------------------- */

.section {
  position: relative;
  padding-block: clamp(5.5rem, 11vw, 10rem);
}

/* About ------------------------------------------------------------------ */

.about {
  background:
    radial-gradient(50% 60% at 0% 0%, rgba(79, 141, 255, 0.07), transparent 70%),
    var(--bg);
}

.about__grid {
  display: grid;
  grid-template-columns: minmax(0, 7fr) minmax(0, 5fr);
  gap: clamp(2.5rem, 6vw, 7rem);
  align-items: end;
}

.about__lead .section-title {
  max-width: 13ch;
}

.about__body {
  position: relative;
  padding-top: 2rem;
  border-top: 1px solid var(--line-strong);
}

.about__body::before {
  content: "";
  position: absolute;
  top: -1px;
  left: 0;
  width: 4rem;
  height: 1px;
  background: var(--cyan);
}

.about__text {
  color: var(--text-soft);
  font-size: clamp(1.0625rem, 1rem + 0.35vw, 1.3rem);
  line-height: 1.6;
}

.about__support {
  margin-top: 1.5rem;
  color: var(--muted);
  font-size: clamp(1rem, 0.97rem + 0.15vw, 1.0625rem);
  line-height: 1.65;
}

@media (max-width: 899.98px) {
  .about__grid {
    grid-template-columns: 1fr;
    align-items: start;
  }

  .about__body {
    max-width: 38rem;
  }
}

/* Services --------------------------------------------------------------- */

.services {
  background: var(--bg);
}

.section-head {
  display: flex;
  justify-content: space-between;
  align-items: flex-end;
  gap: 2rem 4rem;
  margin-bottom: clamp(3rem, 5vw, 4.5rem);
}

.section-head .section-intro {
  padding-bottom: 0.5rem;
}

@media (max-width: 767.98px) {
  .section-head {
    flex-direction: column;
    align-items: flex-start;
  }
}

/* Service cards: a plain grid by default (no JS, or if the fan fails). */
.services {
  overflow-x: clip;
}

.service-cards {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 1rem;
}

.service-card {
  position: relative;
  display: flex;
  flex-direction: column;
  min-width: 0;
  padding: 1.625rem 1.5rem 1.75rem;
  border: 1px solid var(--line);
  border-radius: 1.5rem;
  background: linear-gradient(180deg, #0b0e12 0%, #050608 100%);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.04);
}

.service-card__slide {
  display: flex;
  flex-direction: column;
  flex: 1 1 auto;
  min-width: 0;
  width: 100%;
}

.service-card__top {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 1.75rem;
}

.service-card__index {
  color: #6f7883;
  font-size: 0.8125rem;
  font-variant-numeric: tabular-nums;
  letter-spacing: 0.08em;
}

.service-card__icon {
  display: grid;
  place-items: center;
  width: 2.75rem;
  height: 2.75rem;
  border: 1px solid rgba(143, 216, 251, 0.18);
  border-radius: 0.875rem;
  background: radial-gradient(circle at 30% 20%, rgba(92, 200, 250, 0.14), rgba(92, 200, 250, 0.03) 70%);
}

.service-card__icon svg {
  width: 1.375rem;
  height: 1.375rem;
  fill: none;
  stroke: var(--cyan-soft);
  stroke-width: 1.4;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.service-card__title {
  font-size: 1.3125rem;
  line-height: 1.22;
  letter-spacing: -0.025em;
}

.service-card__title::after {
  content: "";
  display: block;
  width: 2rem;
  height: 1px;
  margin-top: 1rem;
  background: linear-gradient(90deg, var(--cyan), rgba(92, 200, 250, 0));
}

.service-card__text {
  margin-top: 1rem;
  color: var(--muted);
  font-size: 0.9375rem;
  line-height: 1.6;
}

.service-card__note {
  margin-top: 1.25rem;
  padding-top: 0.875rem;
  border-top: 1px solid var(--line);
  color: var(--muted);
  font-size: 0.8125rem;
  line-height: 1.5;
}

.service-card__note strong {
  color: var(--text-soft);
  font-weight: 500;
}

@media (max-width: 1199.98px) {
  .service-cards {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 599.98px) {
  .service-cards {
    grid-template-columns: 1fr;
  }
}

/* Enhanced card fan (class added by js/services-fan.js after it initialises) */
.service-fan.is-enhanced .service-cards {
  position: relative;
  isolation: isolate;
  display: block;
  height: var(--fan-h, 36rem);
  touch-action: pan-y;
}

.service-fan.is-enhanced .service-cards.is-pickable {
  cursor: pointer;
}

.service-fan.is-enhanced .service-card {
  position: absolute;
  top: var(--fan-top, 3rem);
  left: 50%;
  width: var(--card-w, 18rem);
  height: var(--card-h, auto);
  margin-left: calc(var(--card-w, 18rem) / -2);
  transform-origin: 50% 50%;
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.04),
    0 28px 60px -18px rgba(0, 0, 0, 0.9);
}

.service-fan.is-enhanced .service-card::after {
  content: "";
  position: absolute;
  inset: -1px;
  border-radius: inherit;
  background: #000;
  opacity: 0.42;
  pointer-events: none;
  transition: opacity 360ms var(--ease);
}

.service-fan.is-enhanced .service-card.is-active {
  border-color: rgba(143, 216, 251, 0.26);
  background:
    radial-gradient(90% 55% at 50% 0%, rgba(92, 200, 250, 0.09), transparent 70%),
    linear-gradient(180deg, #0b0e12 0%, #050608 100%);
}

.service-fan.is-enhanced .service-card.is-active::after,
.service-fan.is-enhanced .service-card.is-hovered::after {
  opacity: 0;
}

.service-fan.is-enhanced .service-card.is-offstage {
  pointer-events: none;
}

.service-fan__controls {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 1.125rem;
  margin-top: 1.5rem;
}

.service-fan__nav {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 1.25rem;
  width: 100%;
}

.service-fan__arrow {
  display: grid;
  flex: none;
  place-items: center;
  width: 3rem;
  height: 3rem;
  border: 1px solid var(--line-strong);
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.03);
  color: var(--text-soft);
  transition: border-color var(--dur) var(--ease), color var(--dur) var(--ease), background-color var(--dur) var(--ease);
}

.service-fan__arrow:hover {
  border-color: rgba(143, 216, 251, 0.5);
  background: rgba(92, 200, 250, 0.06);
  color: #fff;
}

.service-fan__status {
  min-width: min(19rem, 100%);
  color: var(--muted);
  font-size: 0.9375rem;
  font-variant-numeric: tabular-nums;
  line-height: 1.4;
  text-align: center;
}

.service-fan__current {
  color: #fff;
  font-weight: 500;
}

.service-fan__dash {
  margin-inline: 0.25rem;
  color: var(--cyan-soft);
}

.service-fan.is-single .service-card::after {
  transition-duration: 420ms;
  transition-timing-function: cubic-bezier(0.4, 0, 0.2, 1);
}

.service-fan__live {
  position: absolute;
  width: 1px;
  height: 1px;
  margin: -1px;
  overflow: hidden;
  clip-path: inset(50%);
  white-space: nowrap;
}

@media (max-width: 559.98px) {
  .service-fan__nav {
    gap: 0.75rem;
  }

  .service-fan__status {
    flex: 1 1 auto;
    min-width: 0;
    font-size: 0.875rem;
  }

  .service-fan__dash {
    display: none;
  }

  .service-fan__current {
    display: block;
  }
}

@media (prefers-reduced-motion: reduce) {
  .service-fan.is-enhanced .service-card::after {
    transition: none;
  }
}

/* Why Atlantys ----------------------------------------------------------- */

.why {
  background:
    radial-gradient(45% 40% at 100% 20%, rgba(124, 108, 240, 0.06), transparent 70%),
    var(--bg);
}

.why__head {
  margin-bottom: clamp(3rem, 5vw, 4.5rem);
}

.reasons {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 2.5rem clamp(1.5rem, 3vw, 3rem);
}

.reason {
  position: relative;
  padding-top: 1.75rem;
  border-top: 1px solid var(--line-strong);
}

.reason__marker {
  position: absolute;
  top: -1px;
  left: 0;
  width: 2.5rem;
  height: 1px;
  background: linear-gradient(90deg, var(--cyan), var(--blue));
}

.reason__title {
  font-size: clamp(1.125rem, 1.05rem + 0.3vw, 1.3rem);
  line-height: 1.25;
  letter-spacing: -0.02em;
}

.reason__text {
  margin-top: 0.75rem;
  color: var(--muted);
  font-size: 0.975rem;
  line-height: 1.6;
}

@media (max-width: 1023.98px) {
  .reasons {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 559.98px) {
  .reasons {
    grid-template-columns: 1fr;
    gap: 2rem;
  }
}

/* Enquiry panel ---------------------------------------------------------- */

.enquiry {
  display: grid;
  grid-template-columns: minmax(0, 5fr) minmax(0, 7fr);
  gap: clamp(2rem, 5vw, 5rem);
  margin-top: clamp(4.5rem, 9vw, 8rem);
  padding: clamp(1.5rem, 4.5vw, 4rem);
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  background:
    radial-gradient(70% 80% at 0% 0%, rgba(92, 200, 250, 0.09), transparent 60%),
    radial-gradient(50% 60% at 100% 100%, rgba(124, 108, 240, 0.06), transparent 60%),
    var(--surface);
  scroll-margin-top: 1.5rem;
}

.enquiry__title {
  max-width: 14ch;
  font-size: clamp(1.875rem, 1.3rem + 2.2vw, 3.25rem);
  line-height: 1.06;
  letter-spacing: -0.04em;
}

.enquiry__lead {
  margin-top: 1.25rem;
  color: var(--text-soft);
  font-size: clamp(1.0625rem, 1rem + 0.25vw, 1.2rem);
}

.enquiry__note {
  max-width: 26rem;
  margin-top: 2rem;
  padding-top: 1.25rem;
  border-top: 1px solid var(--line);
  color: var(--muted);
  font-size: 0.875rem;
  line-height: 1.6;
}

.enquiry-form {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 1.25rem;
  align-content: start;
}

.field {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
  min-width: 0;
}

.field--full {
  grid-column: 1 / -1;
}

.field__label {
  color: var(--text-soft);
  font-size: 0.9375rem;
  font-weight: 500;
}

.field__req {
  color: var(--cyan-soft);
}

.field__optional {
  color: var(--muted);
  font-weight: 400;
}

.field__input {
  width: 100%;
  min-height: 3.125rem;
  padding: 0.8rem 1rem;
  border: 1px solid rgba(255, 255, 255, 0.16);
  border-radius: var(--radius-md);
  background: rgba(255, 255, 255, 0.03);
  font-size: 1rem;
  line-height: 1.4;
  transition: border-color var(--dur) var(--ease), box-shadow var(--dur) var(--ease), background-color var(--dur) var(--ease);
}

.field__input:hover {
  border-color: rgba(255, 255, 255, 0.28);
}

.field__input:focus,
.field__input:focus-visible {
  outline: none;
  border-color: var(--cyan-soft);
  background: rgba(255, 255, 255, 0.05);
  box-shadow: 0 0 0 3px rgba(92, 200, 250, 0.22);
}

.field__input--area {
  min-height: 9.5rem;
  resize: vertical;
}

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

.field__input[aria-invalid="true"]:focus {
  box-shadow: 0 0 0 3px rgba(255, 155, 155, 0.2);
}

.field__error {
  color: var(--error);
  font-size: 0.875rem;
  line-height: 1.4;
}

.enquiry-form__legend {
  margin-top: -0.25rem;
  color: var(--muted);
  font-size: 0.8125rem;
}

.enquiry-form__legend span {
  color: var(--cyan-soft);
}

.enquiry-form__actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 1rem 1.5rem;
  margin-top: 0.25rem;
}

.enquiry-form__status {
  flex: 1 1 16rem;
  color: var(--cyan-soft);
  font-size: 0.9375rem;
  line-height: 1.5;
}

.enquiry-form__status.is-error {
  color: var(--error);
}

@media (max-width: 959.98px) {
  .enquiry {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 559.98px) {
  .enquiry {
    border-radius: 1.25rem;
  }

  .enquiry-form {
    grid-template-columns: 1fr;
  }

  .enquiry-form__actions .button {
    width: 100%;
  }
}

/* Scroll reveal (only when JS is running and motion is acceptable) ------- */

@media (prefers-reduced-motion: no-preference) {
  .reveal-ready .reveal {
    opacity: 0;
    transform: translateY(18px);
    transition: opacity 700ms var(--ease), transform 700ms var(--ease);
  }

  .reveal-ready .reveal.is-visible {
    opacity: 1;
    transform: none;
  }
}
