/* ============================================================
   ICH — Fuerteventura · Editorial redesign
   Inspired by r8iba.com: full-bleed brand-colour sections,
   oversized uppercase display type, split image sections with
   reveal animations, pill outline buttons, footer-as-contact.
   Navigation: GooeyNav (React Bits) ported to vanilla JS/CSS.
   Brand palette preserved: #2563AE / #1a4f8a / #3A3A3A
   ============================================================ */

:root {
  /* Brand */
  --blue: #2563AE;
  --blue-mid: #1a4f8a;
  --deep: #10294A;        /* darkened brand blue — full-bleed sections */
  --deep-accent: #1C3E67; /* decorative corners / separators on deep */
  --ink: #10294A;         /* text on light backgrounds */
  --grey-ink: #3A3A3A;
  --offwhite: #F2F3F5;
  --lightgrey: #E5E8EC;
  --white: #ffffff;

  /* Type */
  --font-display: "Space Grotesk", sans-serif;
  --font-body: "Plus Jakarta Sans", sans-serif;

  /* Layout */
  --px: clamp(20px, 5vw, 72px);
  --nav-clear: 110px; /* clearance under the floating nav */
}

/* ---------- Reset ---------- */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; }
body {
  font-family: var(--font-body);
  font-size: 16px;
  line-height: 1.65;
  color: var(--ink);
  background: var(--offwhite);
  -webkit-font-smoothing: antialiased;
}
img { max-width: 100%; display: block; }
a { color: inherit; text-decoration: none; }
ul { list-style: none; }
button { font-family: inherit; cursor: pointer; }
::selection { background: var(--blue); color: var(--white); }

/* All pages open on the navy header, so paint the root navy too:
   no white flash while the next page loads */
html { background: var(--deep); }

/* ---------- Utilities ---------- */
.px-container { padding-left: var(--px); padding-right: var(--px); }
.py-lg { padding-top: clamp(64px, 9vw, 140px); padding-bottom: clamp(64px, 9vw, 140px); }
.pt-lg { padding-top: clamp(64px, 9vw, 140px); }
.pb-lg { padding-bottom: clamp(64px, 9vw, 140px); }

.bg-deep  { background: var(--deep); color: var(--offwhite); }
.bg-light { background: var(--offwhite); color: var(--ink); }
.bg-grey  { background: var(--lightgrey); color: var(--ink); }
.bg-white { background: var(--white); color: var(--ink); }

/* ---------- Typography ---------- */
.heading-xl, .heading-lg, .heading-md {
  font-family: var(--font-display);
  font-weight: 500;
  line-height: 1.02;
  text-transform: uppercase;
  letter-spacing: -0.01em;
}
.heading-xl { font-size: clamp(42px, 7.2vw, 108px); }
.heading-lg { font-size: clamp(34px, 5vw, 78px); }
.heading-md { font-size: clamp(24px, 2.8vw, 40px); line-height: 1.15; }
.heading-xl em, .heading-lg em { font-style: normal; color: var(--blue); }
.bg-deep .heading-xl em, .bg-deep .heading-lg em { color: #7FB2E8; }

.step-count {
  display: block;
  font-family: var(--font-body);
  font-weight: 700;
  font-size: 12px;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--blue);
}
.bg-deep .step-count { color: #7FB2E8; }

.richtext p { margin-bottom: 1.2em; }
.richtext p:last-child { margin-bottom: 0; }
.richtext-lead { font-size: clamp(19px, 1.9vw, 27px); line-height: 1.45; font-weight: 500; }
.richtext-lead p { margin-bottom: 1em; }

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  height: 46px;
  padding: 0 26px;
  font-family: var(--font-body);
  font-weight: 700;
  font-size: 13px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--ink);
  border: 1px solid var(--ink);
  border-radius: 999px;
  background: transparent;
  transition: color 0.3s, background-color 0.3s, border-color 0.3s;
}
.btn:hover { color: var(--offwhite); background: var(--deep); }
.bg-deep .btn { color: var(--offwhite); border-color: var(--offwhite); }
.bg-deep .btn:hover { color: var(--deep); background: var(--offwhite); }
.btn--solid { color: var(--offwhite); background: var(--deep); }
.btn--solid:hover { background: var(--blue); border-color: var(--blue); color: var(--white); }
.btn-group { display: flex; flex-wrap: wrap; gap: 12px; }

/* ============================================================
   GooeyNav — liquid pill navigation (React Bits, vanilla port)
   ============================================================ */
.gooey-nav {
  --gn-pad: 6px;
  --gn-gap: 4px;
  --gn-font: 14px;
  --gn-x: 16px;
  --gn-y: 9px;
  --gn-frame: rgba(16, 41, 74, 0.78);
  --gn-frame-edge: rgba(255, 255, 255, 0.09);
  --gn-frame-highlight: rgba(255, 255, 255, 0.08);
  --gn-frame-shadow: 0 24px 48px -20px rgba(6, 16, 30, 0.7), 0 6px 16px -8px rgba(6, 16, 30, 0.45);
  --gn-ink: var(--offwhite);
  --gn-muted: rgba(242, 243, 245, 0.65);
  --gn-pill: #F2F3F5;
  --gn-active-ink: var(--deep);
  position: relative;
  display: inline-flex;
  max-width: 100%;
  font-size: var(--gn-font);
  line-height: 1.2;
}
/* The site's fixed top-center nav */
.site-nav {
  position: fixed;
  top: 14px;
  left: 50%;
  transform: translateX(-50%);
  z-index: 100;
  max-width: calc(100vw - 16px);
}
.gooey-nav--framed {
  padding: var(--gn-pad);
  border-radius: 999px;
  background: var(--gn-frame);
  box-shadow: var(--gn-frame-shadow);
  -webkit-backdrop-filter: blur(20px) saturate(1.6);
  backdrop-filter: blur(20px) saturate(1.6);
}
.gooey-nav__stage { position: relative; max-width: 100%; }
.gooey-nav__canvas { position: absolute; top: 0; left: 0; pointer-events: none; }
.gooey-nav__fallback {
  position: absolute;
  top: 0;
  left: 0;
  display: none;
  border-radius: 999px;
  background: var(--gn-pill);
  pointer-events: none;
}
.gooey-nav__list {
  position: relative;
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: var(--gn-gap);
  margin: 0;
  padding: 0;
  list-style: none;
}
.gooey-nav__list--active {
  position: absolute;
  inset: 0;
  color: var(--gn-active-ink);
  visibility: hidden;
  clip-path: inset(100%);
  pointer-events: none;
}
.gooey-nav__item { display: flex; }
.gooey-nav__link {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: var(--gn-y) var(--gn-x);
  border: none;
  border-radius: 999px;
  background: none;
  color: var(--gn-muted);
  font: inherit;
  font-weight: 500;
  text-decoration: none;
  white-space: nowrap;
  cursor: pointer;
  transition: color 0.2s ease;
  -webkit-tap-highlight-color: transparent;
}
.gooey-nav__list--active .gooey-nav__link { color: inherit; }
.gooey-nav__item[data-active] .gooey-nav__link { color: var(--gn-ink); }
.gooey-nav__link:focus-visible { outline: 2px solid var(--gn-ink); outline-offset: 2px; }
.gooey-nav__rim {
  position: absolute;
  inset: 0;
  border-radius: inherit;
  box-shadow:
    inset 0 0 0 1px var(--gn-frame-edge),
    inset 0 1px 0 var(--gn-frame-highlight);
  pointer-events: none;
}
@media (hover: hover) { .gooey-nav__link:hover { color: var(--gn-ink); } }
@media (max-width: 640px) {
  .gooey-nav { --gn-pad: 5px; --gn-gap: 2px; --gn-font: 13px; --gn-x: 12px; --gn-y: 7px; }
  .site-nav { top: 10px; }
}
@media (max-width: 480px) {
  .gooey-nav { --gn-x: 10px; }
}

/* Standalone logo in the top-left corner, outside the nav bar */
.corner-logo {
  position: absolute;
  top: 16px;
  left: clamp(20px, 3vw, 44px);
  z-index: 90;
  display: inline-flex;
  height: clamp(48px, 4.5vw, 66px);
}
.corner-logo img { display: block; height: 100%; width: auto; }
.corner-logo:focus-visible { outline: 2px solid rgba(242, 243, 245, 0.55); outline-offset: 2px; }
@media (max-width: 1023px) { .corner-logo { display: none; } }

/* Language switcher */
.lang-switcher { display: flex; align-items: center; gap: 2px; }
/* Floating language switcher — top-right corner, outside the nav bar */
.corner-lang {
  position: absolute;
  top: 26px;
  right: clamp(20px, 3vw, 44px);
  z-index: 90;
  padding: 4px;
  border-radius: 999px;
  background: rgba(16, 41, 74, 0.55);
  -webkit-backdrop-filter: blur(14px) saturate(1.4);
  backdrop-filter: blur(14px) saturate(1.4);
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.12);
}
.corner-lang .lang-btn { border-radius: 999px; }
@media (max-width: 1023px) { .corner-lang { top: 58px; right: 12px; } }
.lang-btn {
  padding: 4px 10px;
  font-weight: 700;
  font-size: 12px;
  letter-spacing: 0.08em;
  color: var(--offwhite);
  background: transparent;
  border: none;
  border-radius: 8px;
  opacity: 0.55;
  transition: opacity 0.25s, background-color 0.25s;
}
.lang-btn:hover { opacity: 1; }
.lang-btn.active { opacity: 1; background: rgba(127, 178, 232, 0.25); }

/* ---------- Home hero (full-bleed photo with boxed text) ---------- */
.home-hero {
  position: relative;
  min-height: clamp(520px, 82vh, 880px);
  display: flex;
  align-items: center;
  overflow: hidden;
  background-size: cover;
  background-position: center;
  color: var(--offwhite);
}
/* subtle wash so the photo never fights the nav bar */
.home-hero::before {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, rgba(16, 41, 74, 0.45) 0%, rgba(16, 41, 74, 0.05) 40%);
}
.home-hero .hero-main {
  position: relative;
  z-index: 2;
  width: 100%;
  padding-top: var(--nav-clear);
  padding-bottom: clamp(32px, 5vw, 64px);
}
@media (min-width: 992px) { .home-hero .hero-main { padding-left: 12.5%; } }
/* navy boxes behind the text keep it readable on the photo */
.home-hero .hero-kicker {
  display: inline-block;
  margin-bottom: 0;
  padding: 12px 18px;
  background: rgba(16, 41, 74, 0.88);
}
.home-hero .heading-xl {
  display: table;
  max-width: 11em;
  padding: clamp(16px, 2.6vw, 30px) clamp(20px, 3vw, 38px);
  background: rgba(16, 41, 74, 0.88);
}

.image-band {
  position: relative;
  height: clamp(280px, 55vh, 600px);
  background-size: cover;
  background-position: center;
  overflow: hidden;
}

/* ---------- Intro ---------- */
.landing-intro { position: relative; }
.landing-intro .richtext-lead { max-width: 40em; }
.intro-pattern {
  width: min(420px, 46%);
  height: 72px;
  margin-top: clamp(40px, 5vw, 72px);
  margin-left: auto;
  background: repeating-linear-gradient(
    -45deg,
    var(--blue) 0 2px,
    transparent 2px 16px
  );
  opacity: 0.5;
}
.bg-deep .intro-pattern {
  background: repeating-linear-gradient(
    -45deg,
    #7FB2E8 0 2px,
    transparent 2px 16px
  );
}

/* ---------- Two-column editorial rows ---------- */
.row-2 {
  display: grid;
  grid-template-columns: minmax(0, 5fr) minmax(0, 7fr);
  gap: clamp(32px, 5vw, 96px);
  align-items: start;
}
.row-2 .heading-lg { margin-bottom: 0.4em; }
.row-2-offset { display: grid; grid-template-columns: minmax(0, 5fr) minmax(0, 7fr); gap: clamp(32px, 5vw, 96px); }
.row-2-offset > :first-child { display: none; }
@media (min-width: 992px) { .row-2-offset > :first-child { display: block; } }
@media (max-width: 991px) {
  .row-2, .row-2-offset { grid-template-columns: 1fr; }
}
.row-2 .btn, .row-2-offset .btn { margin-top: 32px; }

/* ---------- Images + reveal animation ---------- */
.image-wrap {
  position: relative;
  overflow: hidden;
  background-size: cover;
  background-position: center;
}
.image-reveal {
  position: absolute;
  z-index: 5;
  inset: -1px;
  transform: scaleY(1);
  transform-origin: top;
  transition: transform 0.9s cubic-bezier(0.55, 0, 0.1, 1);
}
.bg-light .image-reveal { background: var(--offwhite); }
.bg-grey .image-reveal { background: var(--lightgrey); }
.bg-white .image-reveal { background: var(--white); }
.bg-deep .image-reveal { background: var(--deep); }
.image-band .image-reveal { background: var(--offwhite); }
.in > .image-reveal, .image-band.in .image-reveal { transform: scaleY(0); }

/* Side-by-side equal image pair */
.image-pair {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: clamp(16px, 2.5vw, 32px);
  padding-top: clamp(40px, 6vw, 80px);
}
.image-pair .image-wrap { aspect-ratio: 16 / 11; }
@media (max-width: 640px) {
  .image-pair { grid-template-columns: 1fr; }
  .image-pair .image-wrap { aspect-ratio: 16 / 10; }
}

/* Staggered editorial image pair */
.stagger-images { position: relative; padding-bottom: clamp(24px, 4vw, 48px); }
.stagger-images .img-a {
  width: 68%;
  margin-left: auto;
  aspect-ratio: 16 / 10;
}
.stagger-images .img-b {
  position: relative;
  z-index: 2;
  width: 46%;
  margin-top: -14%;
  margin-left: var(--px);
  aspect-ratio: 4 / 3;
}
@media (max-width: 767px) {
  .stagger-images .img-a { width: 86%; }
  .stagger-images .img-b { width: 62%; margin-top: -18%; }
}

/* ---------- Split sections ---------- */
.split { display: grid; grid-template-columns: 1fr 1fr; }
.split-image .image-wrap { height: 100%; min-height: clamp(320px, 55vw, 640px); }
.split-content {
  display: flex;
  align-items: center;
  padding: clamp(48px, 7vw, 110px) var(--px);
}
.split-content-container { max-width: 36em; }
.split-reverse .split-image { order: 2; }
@media (max-width: 991px) {
  .split { grid-template-columns: 1fr; }
  .split-reverse .split-image { order: 0; }
  .split-image .image-wrap { min-height: 320px; }
}

/* ---------- Checklist / benefits ---------- */
.checklist li {
  position: relative;
  padding: 14px 0 14px 30px;
  border-top: 1px solid rgba(16, 41, 74, 0.14);
  font-weight: 500;
}
.checklist li:first-child { border-top: none; }
.checklist li::before {
  content: '';
  position: absolute;
  left: 2px; top: 22px;
  width: 11px; height: 11px;
  background: var(--blue);
}
.bg-deep .checklist li { border-top-color: var(--deep-accent); }
.bg-deep .checklist li::before { background: #7FB2E8; }
.richtext + .checklist, .checklist + .richtext { margin-top: 24px; }
.checklist + .btn { margin-top: 36px; }

/* ---------- Services (4 horizontal sections) ---------- */
.services-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: clamp(20px, 2.6vw, 40px);
  margin-top: clamp(40px, 5vw, 80px);
}
@media (max-width: 1100px) { .services-grid { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 620px)  { .services-grid { grid-template-columns: 1fr; } }

.svc { display: block; }
.svc .image-wrap { aspect-ratio: 4 / 3; }
.svc .image-wrap .svc-photo {
  position: absolute; inset: 0;
  background-size: cover; background-position: center;
  transition: transform 0.7s ease;
}
.svc:hover .image-wrap .svc-photo { transform: scale(1.05); }
.svc-body { padding-top: 20px; }
.svc-body .step-count { margin-bottom: 10px; }
.svc-body h3 {
  font-family: var(--font-display);
  font-weight: 500;
  font-size: clamp(18px, 1.5vw, 22px);
  line-height: 1.15;
  text-transform: uppercase;
  min-height: 2.3em;
}
.svc-body p { margin-top: 10px; font-size: 15px; opacity: 0.8; }
.svc-link {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  margin-top: 16px;
  font-weight: 700;
  font-size: 13px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--blue);
}
.svc-link .arrow { transition: transform 0.3s; }
.svc:hover .svc-link .arrow { transform: translateX(6px); }
.bg-deep .svc-link { color: #7FB2E8; }

/* ---------- Numbered process steps ---------- */
.steps-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: clamp(28px, 3vw, 48px);
  margin-top: clamp(40px, 5vw, 72px);
}
@media (max-width: 991px) { .steps-grid { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 560px) { .steps-grid { grid-template-columns: 1fr; } }
.step { padding-top: 22px; border-top: 1px solid var(--deep-accent); }
.bg-light .step, .bg-grey .step, .bg-white .step { border-top-color: rgba(16, 41, 74, 0.18); }
.step .step-count { margin-bottom: 12px; }
.step h4 {
  font-family: var(--font-display);
  font-weight: 500;
  font-size: 19px;
  line-height: 1.2;
  text-transform: uppercase;
}
.step p { margin-top: 10px; font-size: 15px; opacity: 0.8; }

/* ---------- Tiles (inner pages) ---------- */
.tiles {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: clamp(24px, 3vw, 44px);
  margin-top: clamp(36px, 4vw, 64px);
}
@media (max-width: 991px) { .tiles { grid-template-columns: repeat(2, 1fr) !important; } }
@media (max-width: 560px) { .tiles { grid-template-columns: 1fr !important; } }
.tile { padding-top: 22px; border-top: 2px solid var(--ink); }
.bg-deep .tile { border-top-color: var(--deep-accent); }
.tile h3 {
  font-family: var(--font-display);
  font-weight: 500;
  font-size: 18px;
  text-transform: uppercase;
  line-height: 1.2;
}
.tile p { margin-top: 10px; font-size: 15px; opacity: 0.8; }
.tile .step-count { margin-bottom: 12px; }

/* ---------- CTA band ---------- */
.cta-band-main {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: clamp(24px, 4vw, 64px);
  flex-wrap: wrap;
}
.cta-band-main .heading-md { max-width: 18em; }

/* ---------- Inner page hero ---------- */
.page-hero {
  position: relative;
  padding-top: calc(var(--nav-clear) + clamp(16px, 3vw, 40px));
  padding-bottom: clamp(36px, 5vw, 72px);
  overflow: hidden;
}
.page-hero .step-count { margin-bottom: 18px; }
.page-hero .heading-xl { max-width: 10em; }
.page-hero .hero-sub {
  max-width: 34em;
  margin-top: 22px;
  font-size: clamp(16px, 1.3vw, 19px);
  font-weight: 500;
  opacity: 0.85;
}
/* ---------- Contact ---------- */
.contact-layout {
  display: grid;
  grid-template-columns: minmax(0, 5fr) minmax(0, 7fr);
  gap: clamp(40px, 6vw, 110px);
}
@media (max-width: 991px) { .contact-layout { grid-template-columns: 1fr; } }

.contact-list li { border-top: 1px solid rgba(16, 41, 74, 0.14); }
.contact-list li:last-child { border-bottom: 1px solid rgba(16, 41, 74, 0.14); }
.contact-list a, .contact-list .contact-static {
  display: flex;
  align-items: center;
  gap: 16px;
  padding: 18px 0;
  font-weight: 600;
  font-size: clamp(16px, 1.4vw, 19px);
  transition: color 0.25s;
}
.contact-list a:hover { color: var(--blue); }
.contact-list svg { flex: none; width: 22px; height: 22px; stroke: var(--blue); }
.contact-list small {
  display: block;
  font-weight: 700;
  font-size: 11px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  opacity: 0.55;
}

.contact-form .form-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: clamp(20px, 2.5vw, 40px);
}
@media (max-width: 620px) { .contact-form .form-row { grid-template-columns: 1fr; } }
.form-group { margin-bottom: 30px; }
.form-group label {
  display: block;
  margin-bottom: 6px;
  font-weight: 700;
  font-size: 11px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  opacity: 0.6;
}
.form-group input,
.form-group select,
.form-group textarea {
  width: 100%;
  padding: 10px 0;
  font-family: inherit;
  font-size: 17px;
  color: var(--ink);
  background: transparent;
  border: none;
  border-bottom: 1px solid rgba(16, 41, 74, 0.35);
  border-radius: 0;
  outline: none;
  transition: border-color 0.3s;
}
.form-group select { appearance: none; }
.form-group input:focus,
.form-group select:focus,
.form-group textarea:focus { border-bottom-color: var(--blue); }
.form-group textarea { resize: vertical; min-height: 120px; }

/* ---------- Footer (= contact section) ---------- */
.site-footer { position: relative; overflow: hidden; }
.footer-top {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  gap: clamp(32px, 5vw, 96px);
}
/* tighter than the generic .py-lg it carries in the markup */
.site-footer .footer-top {
  padding-top: clamp(28px, 3.5vw, 48px);
  padding-bottom: clamp(16px, 2vw, 28px);
}
.site-footer .heading-lg { font-size: clamp(24px, 3vw, 40px); }
@media (max-width: 991px) { .footer-top { grid-template-columns: 1fr; } }

.footer-contacts li { border-top: 1px solid var(--deep-accent); }
.footer-contacts li:last-child { border-bottom: 1px solid var(--deep-accent); }
.footer-contacts a {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 11px 0;
  font-weight: 600;
  font-size: clamp(14px, 1.2vw, 17px);
  transition: color 0.25s;
}
.footer-contacts a:hover { color: #7FB2E8; }
.footer-contacts svg { flex: none; width: 18px; height: 18px; stroke: #7FB2E8; }
.footer-cta-btn { margin-top: 16px; }

.footer-links {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: clamp(24px, 4vw, 64px);
  margin-top: clamp(14px, 1.8vw, 24px);
  padding-top: clamp(12px, 1.5vw, 20px);
  border-top: 1px solid var(--deep-accent);
}
@media (max-width: 620px) { .footer-links { grid-template-columns: 1fr; } }
.footer-links h4 {
  margin-bottom: 8px;
  font-weight: 700;
  font-size: 11px;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: #7FB2E8;
}
.footer-links li { margin-bottom: 4px; font-size: 13px; }
.footer-links a { opacity: 0.8; transition: opacity 0.25s, color 0.25s; }
.footer-links a:hover { opacity: 1; color: #7FB2E8; }

.footer-bottom {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  flex-wrap: wrap;
  margin-top: clamp(12px, 1.5vw, 20px);
  padding-top: 12px;
  padding-bottom: 16px;
  border-top: 1px solid var(--deep-accent);
  font-size: 13px;
  opacity: 0.85;
}
.footer-bottom img { height: 30px; }

/* ---------- Scroll animations ---------- */
.fade-in-item {
  opacity: 0;
  transform: translateY(32px);
  transition: opacity 0.8s ease, transform 0.8s ease;
}
.fade-in-item.in { opacity: 1; transform: translateY(0); }
.fade-d1 { transition-delay: 0.12s; }
.fade-d2 { transition-delay: 0.24s; }
.fade-d3 { transition-delay: 0.36s; }

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .fade-in-item { opacity: 1; transform: none; transition: none; }
  .image-reveal { display: none; }
}

/* ---------- Small screens ---------- */
@media (max-width: 767px) {
  :root { --nav-clear: 100px; }
}

/* ============================================================
   Mobile navigation — hamburger + full-screen overlay (<= 767px)
   Replaces the fixed pill nav, which covered content on phones.
   ============================================================ */
.mobile-nav-toggle { display: none; }
.mobile-nav { display: none; }

@media (max-width: 767px) {
  /* Hide the pill nav and the floating corner switcher on phones */
  .site-nav { display: none; }
  .corner-lang { display: none; }

  /* Bring the small logo back on phones — the pill nav no longer needs the space */
  .corner-logo { display: inline-flex; height: 42px; top: 12px; left: 16px; }

  .mobile-nav-toggle {
    position: fixed;
    top: 12px;
    right: 14px;
    z-index: 220;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    gap: 5px;
    width: 46px;
    height: 46px;
    border: none;
    border-radius: 50%;
    background: rgba(16, 41, 74, 0.82);
    -webkit-backdrop-filter: blur(14px) saturate(1.4);
    backdrop-filter: blur(14px) saturate(1.4);
    box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.14), 0 8px 24px -10px rgba(6, 16, 30, 0.6);
    cursor: pointer;
    -webkit-tap-highlight-color: transparent;
  }
  .mobile-nav-toggle__bar {
    width: 18px;
    height: 2px;
    border-radius: 2px;
    background: var(--offwhite);
    transition: transform 0.3s ease, opacity 0.2s ease;
  }
  body.mobile-nav-open .mobile-nav-toggle__bar:nth-child(1) { transform: translateY(7px) rotate(45deg); }
  body.mobile-nav-open .mobile-nav-toggle__bar:nth-child(2) { opacity: 0; }
  body.mobile-nav-open .mobile-nav-toggle__bar:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

  .mobile-nav {
    position: fixed;
    inset: 0;
    z-index: 210;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    gap: 44px;
    padding: 90px 24px 48px;
    background: rgba(10, 26, 48, 0.96);
    -webkit-backdrop-filter: blur(18px);
    backdrop-filter: blur(18px);
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.3s ease, visibility 0.3s ease;
  }
  body.mobile-nav-open .mobile-nav { opacity: 1; visibility: visible; }
  body.mobile-nav-open { overflow: hidden; }

  .mobile-nav__links {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 6px;
  }
  .mobile-nav__links a {
    padding: 10px 18px;
    color: var(--offwhite);
    text-decoration: none;
    font-family: var(--font-display);
    font-size: 27px;
    font-weight: 600;
    letter-spacing: 0.01em;
    opacity: 0;
    transform: translateY(14px);
    transition: opacity 0.35s ease, transform 0.35s ease;
  }
  body.mobile-nav-open .mobile-nav__links a { opacity: 1; transform: none; }
  body.mobile-nav-open .mobile-nav__links a:nth-child(1) { transition-delay: 0.05s; }
  body.mobile-nav-open .mobile-nav__links a:nth-child(2) { transition-delay: 0.1s; }
  body.mobile-nav-open .mobile-nav__links a:nth-child(3) { transition-delay: 0.15s; }
  body.mobile-nav-open .mobile-nav__links a:nth-child(4) { transition-delay: 0.2s; }
  body.mobile-nav-open .mobile-nav__links a:nth-child(5) { transition-delay: 0.25s; }

  .mobile-nav__lang {
    padding: 4px;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.08);
    box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.14);
  }
  .mobile-nav__lang .lang-btn { border-radius: 999px; }
}

@media (max-width: 767px) and (prefers-reduced-motion: reduce) {
  .mobile-nav,
  .mobile-nav__links a,
  .mobile-nav-toggle__bar { transition: none; }
}
