.is-home,
body[data-page="home"] {
  --home-section-top-space: 9.2rem;
}

.hero-carousel {
  margin-top: 0;
  position: relative;
}

.hero-carousel__stage {
  position: relative;
  width: 100vw;
  margin-left: calc(-50vw + 50%);
  margin-right: calc(-50vw + 50%);
  height: 100vh;
  min-height: 100dvh;
  background: #1e293b;
  overflow: hidden;
}

.hero-slide {
  position: absolute;
  inset: 0;
  opacity: 0;
  transition: opacity 0.8s ease;
}

.hero-slide picture {
  display: block;
  width: 100%;
  height: 100%;
}

.hero-slide img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  /* Fixed scale to prevent white edges during parallax and blur */
  /* and dynamic translateY + blur from JS scroll */
  transform: scale(1.1) translateY(var(--hero-parallax-y, 0));
  filter: blur(var(--hero-blur, 0));
  transition: opacity 0.8s ease;
  will-change: transform, filter;
}

.hero-slide.is-active {
  opacity: 1;
}

/* We removed the explicit transform:scale(1) here to maintain parallax continuity */

.hero-carousel__veil {
  position: absolute;
  inset: 0;
  z-index: 1;
  pointer-events: none;
  background: linear-gradient(90deg, rgba(255, 255, 255, 0.6) 0%, rgba(255, 255, 255, 0.1) 50%, transparent 100%),
    linear-gradient(0deg, rgba(255, 255, 255, 0.3) 0%, transparent 40%);
  mix-blend-mode: overlay;
}

.hero-carousel__overlay {
  position: absolute;
  left: 50%;
  top: var(--hero-safe-top, 112px);
  /* Sublte counter-parallax for the card to feel separated from background */
  transform: translateX(-50%) translateY(calc(var(--hero-parallax-y, 0) * -0.15));
  z-index: 3;
  width: min(840px, calc(100% - 2.5rem));
  background: rgba(255, 255, 255, 0.35);
  backdrop-filter: blur(24px) saturate(140%);
  -webkit-backdrop-filter: blur(24px) saturate(140%);
  border: 1px solid rgba(255, 255, 255, 0.6);
  border-radius: 24px;
  padding: 3.5rem;
  text-align: center;
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.15), inset 0 0 0 1px rgba(255, 255, 255, 0.8);
  display: flex;
  flex-direction: column;
  align-items: center;
  will-change: transform;
}

.hero-carousel__eyebrow {
  display: inline-block;
  background: transparent;
  color: #1a2a44;
  font-family: var(--font-sans);
  font-size: 0.82rem;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  font-weight: 800;
  margin-bottom: 1.2rem;
}

.hero-carousel__title {
  font-family: var(--font-display);
  color: #0c182b;
  font-size: clamp(2.4rem, 4vw, 4.4rem);
  line-height: 1.05;
  font-weight: 800;
  letter-spacing: -0.02em;
  text-wrap: balance;
  margin-bottom: 1.5rem;
}

.hero-carousel__subtitle {
  color: #2b3952;
  font-size: clamp(1.1rem, 1.2vw, 1.3rem);
  line-height: 1.6;
  max-width: 580px;
  margin-bottom: 2.5rem;
  font-weight: 500;
}

.hero-carousel__subtitle:empty {
  display: none;
}

.hero-carousel__actions {
  display: flex;
  gap: 1rem;
  justify-content: center;
  flex-wrap: wrap;
}

.hero-carousel__dots {
  position: absolute;
  left: 50%;
  bottom: 1.2rem;
  transform: translateX(-50%);
  z-index: 4;
  display: flex;
  align-items: center;
  gap: 0.55rem;
  padding: 0.4rem 0.65rem;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.22);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
}

.hero-carousel__dot {
  width: 10px;
  height: 10px;
  border-radius: 999px;
  border: 1px solid rgba(255, 255, 255, 0.75);
  background: rgba(255, 255, 255, 0.45);
  cursor: pointer;
  padding: 0;
  transition: transform 0.22s ease, background-color 0.22s ease, border-color 0.22s ease;
}

.hero-carousel__dot:hover {
  transform: scale(1.1);
  background: rgba(255, 255, 255, 0.75);
}

.hero-carousel__dot:focus-visible {
  outline: 2px solid rgba(255, 255, 255, 0.95);
  outline-offset: 2px;
}



.hero-carousel__dot.is-active {
  transform: scale(1.15);
  background: #ffffff;
  border-color: #ffffff;
}



#services-content {
  position: relative;
}

.services-zone {
  position: relative;
  padding-top: var(--home-section-top-space);
  padding-bottom: 6.25rem;
  background-color: transparent;
  background-image: url('/assets/media/images/fond/fond_1.jpg');
  background-size: cover;
  background-position: center top;
  background-repeat: no-repeat;
  margin-inline: calc(50% - 50vw);
  padding-inline: calc(50vw - 50%);
}

.services-zone>.section {
  margin-top: 0;
  position: relative;
  z-index: 1;
}

#services-content.section--narrow {
  width: min(900px, calc(100vw - 2.4rem));
}

#services-content {
  border-radius: 28px;
  padding: clamp(2.6rem, 3.8vw, 3.8rem) clamp(1.2rem, 2.7vw, 2.5rem);
  background: linear-gradient(180deg, rgba(252, 253, 255, 0.9) 0%, rgba(247, 250, 253, 0.82) 100%);
  border: 1px solid rgba(201, 213, 226, 0.8);
  box-shadow: 0 14px 34px rgba(51, 65, 85, 0.08);
}

#services-content+.section {
  border-radius: 0;
  padding-top: 1.8rem;
}

#services-content .section__lead {
  max-width: 62ch;
  margin-inline: auto;
  text-align: left;
  text-wrap: pretty;
  color: #475569;
  font-size: clamp(1.08rem, 0.45vw + 0.95rem, 1.24rem);
  line-height: 1.72;
}

#services-content .section__lead:first-of-type {
  color: #334155;
  font-weight: 500;
  font-size: clamp(1.14rem, 0.52vw + 0.99rem, 1.32rem);
}

#services-content .section__lead+.section__lead {
  margin-top: 1.55rem;
  padding-top: 1.35rem;
  border-top: 1px solid rgba(148, 163, 184, 0.32);
}

.bento-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(340px, 1fr));
  gap: 1.5rem;
  margin-top: 1rem;
}

.service-highlight {
  margin: 1.9rem auto 0;
  width: min(100%, 980px);
  padding: 0.6rem 0.2rem 0.3rem;
  display: grid;
  grid-template-columns: minmax(240px, 330px) minmax(380px, 620px);
  gap: clamp(1rem, 1.5vw, 1.8rem);
  align-items: center;
  justify-content: center;
}

.service-highlight__visual {
  position: relative;
  isolation: isolate;
  display: flex;
  justify-content: center;
  align-items: center;
}

.service-highlight__visual picture {
  display: flex;
  justify-content: center;
  align-items: center;
}

.service-highlight__visual img {
  position: relative;
  z-index: 1;
  width: min(100%, 320px);
  height: auto;
  object-fit: contain;
  filter: drop-shadow(0 10px 16px #ffffff);
}

.service-highlight__content {
  min-width: 0;
}

@media (min-width: 901px) {
  .service-highlight {
    align-items: end;
  }

  .service-highlight__content {
    align-self: end;
    padding-bottom: 0.2rem;
  }
}

.service-highlight__title {
  margin: 0 0 0.55rem;
  font-family: var(--font-display);
  font-size: clamp(1.62rem, 0.95vw + 1.2rem, 2.2rem);
  line-height: 1.1;
  font-weight: 800;
  color: #64748b;
}

.service-highlight__body {
  margin: 0;
  max-width: 70ch;
  color: #475569;
  font-size: 1.05rem;
  line-height: 1.58;
}

/* ═══════════════════════════════════════════════════════════════════════
   BENTO CARDS — Anti-aliasing-safe rounded corners
   ─────────────────────────────────────────────────────────────────────
   Technique: same as gallery cards (border + overflow:hidden +
   background-clip:padding-box). The padding-box clip prevents the
   background from painting under the white border, eliminating dark
   anti-aliased pixels at rounded corners.

   Glassmorphism: uses filter:blur on __media directly (NOT
   backdrop-filter on the overlay) because backdrop-filter creates
   compositing artifacts at clipped corners.

   ⚠  DO NOT:
   - Remove background-clip:padding-box (causes dark corner artifacts)
   - Use backdrop-filter on overlay (causes compositing corner artifacts)
   - Remove transform:scale on __media:hover (causes blur-edge artifacts)
   ═══════════════════════════════════════════════════════════════════════ */

.bento-card {
  --bento-radius: 24px;
  --bento-frame: 5px;
  position: relative;
  height: 450px;
  min-height: 450px;
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  cursor: pointer;
  text-decoration: none;
  outline: none;
  -webkit-tap-highlight-color: transparent;
  border-radius: var(--bento-radius);
  border: var(--bento-frame) solid #ffffff;
  padding: 0;
  box-sizing: border-box;
  overflow: hidden;
  background: #ffffff;
  background-clip: padding-box;
  /* KEY: prevents bg from painting under border → clean corners */
  isolation: isolate;
  will-change: transform;
  transform: translateZ(0);
  transition: transform 0.5s cubic-bezier(0.16, 1, 0.3, 1),
    box-shadow 0.5s cubic-bezier(0.16, 1, 0.3, 1);
  box-shadow: 0 0 12px rgba(15, 23, 42, 0.08);
}

.bento-card:focus,
.bento-card:focus-visible {
  outline: none !important;
}

.bento-card__inner {
  position: absolute;
  inset: 0;
  border-radius: calc(var(--bento-radius) - var(--bento-frame));
  overflow: hidden;
  background: #ffffff;
  background-clip: padding-box;
  /* Match parent technique */
  isolation: auto;
}

.bento-card:hover,
.bento-card:focus-visible,
.bento-card.is-touch-active {
  transform: translateY(-4px);
  box-shadow: 0 0 16px rgba(15, 23, 42, 0.12);
}

.bento-card__media {
  position: absolute;
  inset: 0;
  z-index: 1;
  background-color: #d5e2ee;
  background-image: linear-gradient(160deg, #dce7f2 0%, #c9d8e7 100%);
  background-image: var(--bg-jpg, var(--bg));
  background-image: image-set(
      var(--bg-webp, var(--bg-jpg, var(--bg))) type("image/webp"),
      var(--bg-jpg, var(--bg)) type("image/jpeg"));
  background-size: cover;
  background-position: var(--bg-pos, center);
  background-repeat: no-repeat;
  transition: opacity 0.4s ease, filter 0.5s cubic-bezier(0.16, 1, 0.3, 1), transform 0.5s cubic-bezier(0.16, 1, 0.3, 1);
}

/* Glassmorphism: blur the image itself (NOT backdrop-filter on overlay)
   to avoid compositing artifacts at clipped corners.
   scale(1.08) prevents blur from exposing edges. */
.bento-card:hover .bento-card__media,
.bento-card:focus-visible .bento-card__media,
.bento-card.is-touch-active .bento-card__media {
  filter: blur(14px) saturate(130%);
  transform: scale(1.08);
}

.bento-card__inner::after {
  content: "";
  position: absolute;
  inset: 0;
  z-index: 2;
  background: linear-gradient(180deg, rgba(0, 0, 0, 0) 40%, rgba(0, 0, 0, 0.7) 100%);
  opacity: 1;
  transition: opacity 0.5s cubic-bezier(0.16, 1, 0.3, 1);
  pointer-events: none;
}

.bento-card:hover .bento-card__inner::after,
.bento-card:focus-visible .bento-card__inner::after,
.bento-card.is-touch-active .bento-card__inner::after {
  opacity: 0;
}

/* Semi-transparent overlay — NO backdrop-filter (see block comment above) */
.bento-card__overlay {
  position: absolute;
  inset: 0;
  z-index: 2;
  background: rgba(235, 241, 246, 0.55);
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.3);
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.5s cubic-bezier(0.16, 1, 0.3, 1), visibility 0s linear 0.5s;
  pointer-events: none;
}

.bento-card:hover .bento-card__overlay,
.bento-card:focus-visible .bento-card__overlay,
.bento-card.is-touch-active .bento-card__overlay {
  opacity: 1;
  visibility: visible;
  transition-delay: 0s;
}

.bento-card__large-title {
  position: absolute;
  top: auto;
  bottom: 1.6rem;
  left: 50%;
  right: auto;
  z-index: 3;
  width: min(88%, 520px);
  padding: 0;
  font-family: var(--font-display);
  font-size: 2.2rem;
  font-weight: 800;
  color: #ffffff;
  margin: 0;
  text-align: center;
  text-wrap: balance;
  text-shadow: 0 4px 16px rgba(0, 0, 0, 0.6);
  opacity: 1;
  filter: blur(0px);
  transform: translateX(-50%) scale(1);
  transition: opacity 0.5s cubic-bezier(0.16, 1, 0.3, 1), filter 0.5s ease, transform 0.5s cubic-bezier(0.16, 1, 0.3, 1);
  pointer-events: none;
}

.bento-card:hover .bento-card__large-title,
.bento-card:focus-visible .bento-card__large-title,
.bento-card.is-touch-active .bento-card__large-title {
  opacity: 0;
  filter: blur(12px);
  transform: translate(-50%, -12px) scale(1.05);
}

.bento-card.reveal {
  opacity: 0;
  transform: translateY(20px);
}

.bento-card.reveal.is-visible {
  opacity: 1;
  transform: none;
  transition-property: opacity, transform, box-shadow;
  transition-duration: 0.8s, 0.5s, 0.5s;
  transition-timing-function: ease, cubic-bezier(0.16, 1, 0.3, 1), cubic-bezier(0.16, 1, 0.3, 1);
  /* The custom property is safely preserved */
  transition-delay: var(--reveal-delay, 0ms);
}

.bento-card__content {
  position: absolute;
  inset: 0;
  z-index: 4;
  padding: 2rem 1.4rem 1.4rem;
  display: flex;
  flex-direction: column;
  justify-content: flex-start;
  pointer-events: none;
  overflow-y: auto;
  scrollbar-width: none;
  /* Hide scrollbar for clean look */
}

.bento-card__content::-webkit-scrollbar {
  display: none;
}

.bento-card:hover .bento-card__content,
.bento-card:focus-visible .bento-card__content,
.bento-card.is-touch-active .bento-card__content {
  pointer-events: auto;
}

.bento-card__small-title {
  font-family: var(--font-display);
  font-size: 1.15rem;
  font-weight: 700;
  color: #0f172a;
  margin: 0 0 0.5rem 0;
  letter-spacing: -0.01em;
  line-height: 1.3;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  text-overflow: ellipsis;
  opacity: 0;
  transform: translateY(20px);
  transition: opacity 0.5s cubic-bezier(0.16, 1, 0.3, 1), transform 0.5s cubic-bezier(0.16, 1, 0.3, 1);
}

.bento-card:hover .bento-card__small-title,
.bento-card:focus-visible .bento-card__small-title,
.bento-card.is-touch-active .bento-card__small-title {
  opacity: 1;
  transform: translateY(0);
  color: #2563eb;
  transition-delay: 0.1s;
}

.bento-card__content p {
  font-size: 1.05rem;
  line-height: 1.5;
  color: #1e293b;
  margin: 0;
  opacity: 0;
  transform: translateY(20px);
  transition: opacity 0.5s cubic-bezier(0.16, 1, 0.3, 1), transform 0.5s cubic-bezier(0.16, 1, 0.3, 1);
}

.bento-card:hover .bento-card__content p,
.bento-card:focus-visible .bento-card__content p,
.bento-card:active .bento-card__content p,
.bento-card.is-touch-active .bento-card__content p {
  opacity: 1;
  transform: translateY(0);
  transition-delay: 0.15s;
}

.section--contact {
  background: #f8fafc;
  color: #1e293b;
  border-top: 1px solid rgba(0, 0, 0, 0.05);
  border-bottom: none;
  padding-block: var(--home-section-top-space) 5rem;
  margin-top: 0;
  position: relative;
}

/* Unified section label style: Services + Contact */
#services-title,
.section--contact .section__overline {
  color: #8c9cb0;
  font-family: var(--font-display);
  font-size: clamp(2.15rem, 1.75vw + 1.2rem, 3.65rem);
  font-weight: 600;
  line-height: 1.14;
  letter-spacing: 0.01em;
  text-transform: none;
}

#services-title {
  margin-bottom: clamp(1.8rem, 2.4vw, 2.7rem);
  /* Avoid conflict between base view-timeline and JS reveal (flicker on scroll). */
  animation: none;
  animation-timeline: auto;
  animation-range: normal;
}

#services-title .services-title__row {
  position: relative;
  display: inline-block;
  white-space: nowrap;
}

#services-title .services-title__icon {
  position: absolute;
  right: 100%;
  top: 50%;
  margin-right: 1.15rem;
  width: clamp(89px, 5.67vw + 34px, 138px);
  height: auto;
  transform: translateY(-52%);
}

.section--contact .section__overline {
  margin: 0 0 1.1rem;
  text-align: center;
}

.section--contact .contact-overline__row {
  position: relative;
  display: inline-block;
  white-space: nowrap;
}

.section--contact .contact-overline__icon {
  position: absolute;
  right: 100%;
  top: 50%;
  margin-right: 1.15rem;
  width: clamp(81px, 5.1vw + 29px, 126px);
  height: auto;
  transform: translateY(-52%);
}

.section--contact .section__title {
  color: #0f172a;
  max-width: 800px;
  margin-inline: auto;
  margin-top: clamp(1.7rem, 1.2vw + 1.2rem, 2.35rem);
  font-size: clamp(1.82rem, 1.05vw + 1.2rem, 2.85rem);
  line-height: 1.2;
}

.contact-title-balanced {
  text-wrap: balance;
  max-width: 600px;
}

#contact-anchor {
  scroll-margin-top: calc(var(--header-content-offset) + 0.35rem);
}

.contact-card-modern {
  background: var(--surface);
  border: 1px solid var(--border-subtle);
  border-radius: 20px;
  padding: 2.5rem 2rem;
  box-shadow: var(--shadow-sm);
  max-width: 420px;
  margin: 3rem auto 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 2rem;
}

.contact-card-modern__top,
.contact-card-modern__bottom {
  display: flex;
  flex-direction: column;
  align-items: center;
  width: 100%;
}

.contact-card-modern__bottom {
  gap: 1rem;
}

.contact-card-modern__identity {
  text-align: center;
}

.contact-card-modern__owner {
  font-weight: 600;
  font-size: 1.125rem;
  margin: 0 0 0.25rem 0;
  color: var(--text-base);
}

.contact-card-modern__divider {
  width: 100%;
  border: none;
  border-top: 1px solid var(--border-subtle);
  margin: 0;
}

.contact-pill-primary,
.contact-pill-secondary {
  display: flex;
  width: 100%;
  border-radius: 999px;
  overflow: hidden;
  transition: transform 0.2s, box-shadow 0.2s, border-color 0.2s;
}

.contact-pill-primary {
  background: var(--brand-dark, #1a2a44);
  color: #ffffff;
  box-shadow: 0 4px 12px rgba(26, 42, 68, 0.2);
}

.contact-pill-secondary {
  background: var(--bg-body, #ffffff);
  border: 1px solid var(--border-subtle);
  color: var(--text-base);
}

.contact-pill-primary:hover,
.contact-pill-secondary:hover {
  transform: translateY(-2px);
}

.contact-pill-primary:hover {
  box-shadow: 0 6px 16px rgba(26, 42, 68, 0.3);
}

.contact-pill-secondary:hover {
  box-shadow: var(--shadow-sm);
  border-color: var(--text-muted);
}

.pill-btn-main {
  flex: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  padding: 0.875rem 1.5rem;
  text-decoration: none;
  font-weight: 500;
  color: inherit;
}

.pill-btn-copy {
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0 1.25rem;
  background: transparent;
  border: none;
  cursor: pointer;
  color: inherit;
  transition: opacity 0.2s, background-color 0.2s, color 0.2s;
}

.contact-pill-primary .pill-btn-copy {
  opacity: 0.8;
}

.contact-pill-primary .pill-btn-copy:hover {
  opacity: 1;
  background: rgba(255, 255, 255, 0.1);
}

.contact-pill-secondary .pill-btn-copy {
  color: var(--text-muted);
}

.contact-pill-secondary .pill-btn-copy:hover {
  color: var(--brand-dark);
  background: rgba(0, 0, 0, 0.04);
}

.contact-pill-primary .pill-divider,
.contact-pill-secondary .pill-divider {
  width: 1px;
  margin: 0.5rem 0;
}

.contact-pill-primary .pill-divider {
  background: rgba(255, 255, 255, 0.2);
}

.contact-pill-secondary .pill-divider {
  background: var(--border-subtle);
}

.contact-form {
  background: #ffffff;
  border: 1px solid rgba(0, 0, 0, 0.05);
  padding: 3.5rem;
  border-radius: 24px;
  box-shadow: 0 10px 40px rgba(0, 0, 0, 0.04), 0 2px 6px rgba(0, 0, 0, 0.02);
  margin-top: 3.5rem;
  display: grid;
  gap: 1.5rem;
  width: min(780px, 100%);
  margin-inline: auto;
}

.form-field {
  position: relative;
}

.form-field--floating input,
.form-field--floating textarea {
  width: 100%;
  border-radius: 12px;
  border: 1px solid #cbd5e1;
  background: #f8fafc;
  color: #0f172a;
  font-size: 1.05rem;
  font-family: inherit;
  /* Extra bottom padding to clear the floating label */
  padding: 1.65rem 1.25rem 0.65rem;
  box-shadow: inset 0 2px 4px rgba(0, 0, 0, 0.02);
  transition: all 0.3s cubic-bezier(0.16, 1, 0.3, 1);
}

.form-field--floating input::placeholder,
.form-field--floating textarea::placeholder {
  color: transparent;
  user-select: none;
}

.form-field--floating label {
  position: absolute;
  top: 1.25rem;
  left: 1.25rem;
  color: #64748b;
  font-size: 1rem;
  /* Start slightly bigger */
  font-weight: 500;
  text-transform: none;
  letter-spacing: normal;
  padding: 0;
  pointer-events: none;
  transform-origin: left top;
  transition: all 0.3s cubic-bezier(0.16, 1, 0.3, 1);
}

/* Floating label activated */
.form-field--floating input:focus~label,
.form-field--floating input:not(:placeholder-shown)~label,
.form-field--floating textarea:focus~label,
.form-field--floating textarea:not(:placeholder-shown)~label {
  transform: translateY(-0.8rem) scale(0.78);
  font-weight: 700;
  color: var(--color-ink-700);
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.form-field--floating input:hover,
.form-field--floating textarea:hover {
  background: #ffffff;
  border-color: #94a3b8;
}

.form-field--floating input:focus,
.form-field--floating textarea:focus {
  background: #ffffff;
  border-color: var(--color-ink-700);
  box-shadow: 0 0 0 4px rgba(30, 78, 135, 0.1), 0 10px 30px rgba(13, 31, 61, 0.05);
  outline: none;
}

/* Validation Styles */
.form-field--floating input.is-invalid,
.form-field--floating textarea.is-invalid {
  border-color: var(--color-danger);
  background: #fffcfc;
}

.form-field--floating input.is-invalid~label,
.form-field--floating textarea.is-invalid~label {
  color: var(--color-danger);
}

.form-field--floating input.is-invalid:focus,
.form-field--floating textarea.is-invalid:focus {
  box-shadow: 0 0 0 4px rgba(191, 30, 46, 0.1);
}

.form-field--floating input.is-valid,
.form-field--floating textarea.is-valid {
  border-color: var(--color-success);
}

/* Shake Animation */
@keyframes formShake {

  0%,
  100% {
    transform: translateX(0);
  }

  20%,
  60% {
    transform: translateX(-6px);
  }

  40%,
  80% {
    transform: translateX(6px);
  }
}

.form-shake {
  animation: formShake 0.4s cubic-bezier(0.36, 0.07, 0.19, 0.97) both;
}

.form-field--floating textarea {
  min-height: 180px;
  resize: vertical;
}

.form-actions {
  margin-top: 1rem;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 1rem;
}

#contact-submit {
  width: 100%;
  padding: 1.15rem;
  font-size: 1.05rem;
  letter-spacing: 0.03em;
  font-weight: 700;
  text-transform: uppercase;
  border-radius: 12px;
  background: linear-gradient(160deg, var(--color-ink-700), var(--color-ink-900));
  border: 1px solid rgba(255, 255, 255, 0.1);
  color: #ffffff;
  box-shadow: 0 8px 24px rgba(13, 31, 61, 0.35), inset 0 1px 1px rgba(255, 255, 255, 0.15);
  transition: all 0.25s cubic-bezier(0.16, 1, 0.3, 1);
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
}

#contact-submit.is-loading {
  color: transparent !important;
  pointer-events: none;
}

#contact-submit.is-loading::after {
  content: "";
  position: absolute;
  width: 20px;
  height: 20px;
  border: 3px solid rgba(255, 255, 255, 0.2);
  border-top-color: #ffffff;
  border-radius: 50%;
  animation: formSpinner 0.8s linear infinite;
}

@keyframes formSpinner {
  to {
    transform: rotate(360deg);
  }
}

#contact-submit:hover {
  background: linear-gradient(160deg, #25609e, var(--color-ink-700));
  box-shadow: 0 14px 36px rgba(13, 31, 61, 0.45), inset 0 1px 1px rgba(255, 255, 255, 0.2);
  transform: translateY(-2px);
}

#contact-submit:active {
  transform: translateY(0);
  box-shadow: 0 4px 14px rgba(13, 31, 61, 0.35);
}

.form-feedback {
  min-height: 1.5rem;
  font-size: 0.9rem;
  font-weight: 500;
  transition: all 0.3s ease;
  opacity: 0;
  transform: translateY(4px);
}

.form-feedback.is-visible {
  opacity: 1;
  transform: translateY(0);
}

.form-feedback.is-error {
  color: var(--color-danger);
}

.form-feedback.is-success {
  color: var(--color-success);
  font-weight: 600;
}

/* Remove spacing between contact section and footer on homepage */
body[data-page="home"] main {
  padding-bottom: 0;
}

body[data-page="home"] .site-footer {
  margin-top: 0;
}

@media (max-width: 1024px) {
  .hero-carousel__overlay {
    max-width: min(520px, calc(100% - 1.4rem));
  }

  .hero-carousel__title {
    font-size: clamp(1.7rem, 2vw + 1rem, 2.8rem);
  }
}

@media (max-width: 900px) {

  .is-home,
  body[data-page="home"] {
    --home-section-top-space: 8.8rem;
  }

  .services-zone {
    padding-bottom: 5.5rem;
  }

  .hero-carousel__overlay {
    left: 50%;
    top: var(--hero-safe-top, 108px);
    transform: translateX(-50%);
    width: calc(100% - 1.5rem);
    padding: 2.5rem 1.5rem;
  }

  .hero-carousel__subtitle {
    display: none;
  }

  .hero-carousel__actions {
    gap: 0.55rem;
    margin-top: 0.9rem;
  }

  .hero-carousel__actions .btn {
    font-size: 0.82rem;
    padding: 0.64rem 0.95rem;
  }

  .hero-carousel__dots {
    bottom: 0.75rem;
  }

  .bento-grid {
    grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
  }

  .bento-card {
    height: 435px;
    min-height: 435px;
  }

  .service-highlight {
    grid-template-columns: 1fr;
    gap: 0.7rem;
    margin-top: 1.55rem;
    padding: 0.4rem 0.2rem 0.1rem;
  }

  .service-highlight__visual img {
    width: min(88vw, 290px);
  }

  .service-highlight__content {
    text-align: center;
  }

  .service-highlight__body {
    margin-inline: auto;
  }

}

@media (max-width: 640px) {

  .is-home,
  body[data-page="home"] {
    --home-section-top-space: 8.2rem;
  }

  .services-zone {
    padding-bottom: 5rem;
  }

  .hero-carousel__title {
    font-size: clamp(1.32rem, 4.8vw + 0.2rem, 2rem);
  }

  .bento-grid {
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  }

  .bento-card {
    height: 420px;
    min-height: 420px;
  }

  .service-highlight {
    margin-top: 1.35rem;
    gap: 0.5rem;
  }

  .service-highlight__title {
    font-size: clamp(1.45rem, 5vw, 2rem);
    margin-bottom: 0.38rem;
  }

  .service-highlight__body {
    font-size: 0.98rem;
    line-height: 1.52;
  }

  #services-title .services-title__row {
    transform: translateX(0.34rem);
  }

  #services-title .services-title__icon {
    width: clamp(70px, 21.6vw, 92px);
    margin-right: -0.24rem;
    transform: translateY(-50%);
  }

  #services-title .services-title__text {
    display: inline-block;
    transform: none;
  }

  .section--contact .contact-overline__icon {
    width: clamp(65px, 19.8vw, 86px);
    margin-right: 0.3rem;
    transform: translateY(-50%);
  }

  .form-field input,
  .form-field textarea {
    font-size: 0.96rem;
  }

  .contact-card-modern {
    padding: 2.2rem 1.25rem;
  }

  .pill-btn-main {
    padding: 0.85rem 1rem;
    font-size: 0.95rem;
  }

  .pill-btn-copy {
    padding: 0 1rem;
  }
}

@media (max-width: 900px) and (pointer: coarse) {
  #services-title .services-title__row {
    transform: translateX(0.34rem);
  }
}

/* =========================================================================
   SCROLL PARALLAX (Modern CSS View Timelines)
   ========================================================================= */
@supports (animation-timeline: view()) {
  .hero-slide {
    animation: heroParallax linear both;
    animation-timeline: view();
    animation-range: exit 0% exit 100%;
    will-change: transform;
  }

  @keyframes heroParallax {
    to {
      transform: translateY(18%);
    }
  }
}

/* =========================================================================
   MICRO-INTERACTIONS — Language switch transition
   ========================================================================= */
[data-i18n],
[data-i18n-placeholder],
[data-i18n-aria] {
  transition: opacity 0.28s cubic-bezier(0.16, 1, 0.3, 1),
    filter 0.28s cubic-bezier(0.16, 1, 0.3, 1),
    transform 0.28s cubic-bezier(0.16, 1, 0.3, 1);
}

.is-transitioning-lang [data-i18n],
.is-transitioning-lang [data-i18n-placeholder],
.is-transitioning-lang [data-i18n-aria] {
  opacity: 0;
  filter: blur(4px);
  transform: translateY(4px);
  will-change: opacity, filter, transform;
}
