/* Atlantys Systems — public homepage */

:root {
  --background: #FBFBF8;
  --text-primary: #1D1D1F;
  --text-secondary: #6E6E73;
  --border: #D2D2D7;
  --surface: #FFFFFF;
  --focus: #1D1D1F;

  --font-sans: -apple-system, BlinkMacSystemFont, "SF Pro Display",
    "SF Pro Text", "Helvetica Neue", Helvetica, Arial, sans-serif;

  --nav-height: 4rem;
  --page-pad: clamp(1rem, 4vw, 2.5rem);
  --content-max: 68rem;
  --prose-max: min(100%, 90rem); /* up to ~1440px */
  --radius-btn: 6px;
  --radius-card: 18px;
  --radius-panel: 0.75rem;
  --shadow-card: 0 1px 2px rgba(29, 29, 31, 0.04),
    0 8px 24px rgba(29, 29, 31, 0.04);
  --shadow-card-hover: 0 2px 4px rgba(29, 29, 31, 0.06),
    0 14px 32px rgba(29, 29, 31, 0.08);
  --shadow-modal: 0 8px 28px rgba(29, 29, 31, 0.1);
  --touch-min: 44px;
  --safe-top: env(safe-area-inset-top, 0px);
  --safe-right: env(safe-area-inset-right, 0px);
  --safe-bottom: env(safe-area-inset-bottom, 0px);
  --safe-left: env(safe-area-inset-left, 0px);
  --ease: cubic-bezier(0.22, 1, 0.36, 1);
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }

  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
    scroll-behavior: auto !important;
  }
}

body {
  margin: 0;
  min-height: 100vh;
  min-height: 100dvh;
  background: var(--background);
  color: var(--text-primary);
  font-family: var(--font-sans);
  font-size: 1.0625rem;
  font-weight: 400;
  line-height: 1.47;
  letter-spacing: -0.011em;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

img,
svg {
  display: block;
  max-width: 100%;
}

a {
  color: inherit;
  text-decoration-thickness: 1px;
  text-underline-offset: 0.2em;
}

a:hover {
  text-decoration-thickness: 2px;
}

button,
input,
select,
textarea {
  font: inherit;
  color: inherit;
}

button {
  cursor: pointer;
}

ul {
  margin: 0;
  padding: 0;
  list-style: none;
}

p {
  margin: 0;
}

h1,
h2,
h3 {
  margin: 0;
  font-family: var(--font-sans);
  font-weight: 600;
  line-height: 1.08;
  letter-spacing: -0.022em;
  color: var(--text-primary);
}

.visually-hidden {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

.skip-link {
  position: absolute;
  top: calc(0.75rem + var(--safe-top));
  left: calc(0.75rem + var(--safe-left));
  z-index: 1000;
  padding: 0.7rem 1.2rem;
  background: var(--text-primary);
  color: var(--background);
  border-radius: var(--radius-btn);
  text-decoration: none;
  transform: translateY(-150%);
}

.skip-link:focus {
  transform: translateY(0);
  outline: 2px solid var(--focus);
  outline-offset: 2px;
}

/* ——— Shared button system ——— */

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.35rem;
  min-height: var(--touch-min);
  min-width: var(--touch-min);
  padding: 0.7rem 1.2rem;
  border: 1px solid transparent;
  border-radius: var(--radius-btn);
  background: transparent;
  font-family: var(--font-sans);
  font-size: 1.0625rem;
  font-weight: 500;
  letter-spacing: -0.016em;
  line-height: 1.2;
  text-decoration: none;
  text-align: center;
  white-space: nowrap;
  transition: background-color 0.15s var(--ease), color 0.15s var(--ease),
    border-color 0.15s var(--ease), filter 0.15s var(--ease);
}

.btn:hover {
  text-decoration: none;
}

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

.btn:active {
  opacity: 0.92;
}

.btn--primary {
  background: var(--text-primary);
  color: #FFFFFF;
  border-color: var(--text-primary);
}

.btn--primary:hover {
  background: var(--text-primary);
  border-color: var(--text-primary);
  filter: brightness(1.08);
}

.btn--secondary {
  background: #FFFFFF;
  color: var(--text-primary);
  border-color: var(--border);
}

.btn--secondary:hover {
  border-color: var(--text-primary);
}

.btn--nav {
  min-height: var(--touch-min);
  min-width: auto;
  width: auto;
  padding: 0.4rem 0.55rem;
  border: none;
  border-radius: 0;
  background: transparent;
  color: var(--text-primary);
  box-shadow: none;
  font-size: 0.9375rem;
  font-weight: 500;
  letter-spacing: -0.016em;
  transition: transform 0.2s var(--ease);
}

.btn--nav.btn--primary,
.btn--nav.btn--secondary {
  background: transparent;
  color: var(--text-primary);
  border: none;
  filter: none;
}

.btn--nav:hover,
.btn--nav.btn--primary:hover,
.btn--nav.btn--secondary:hover {
  background: transparent;
  border: none;
  color: var(--text-primary);
  filter: none;
  transform: scale(1.08);
  text-decoration: none;
}

.btn--nav:active,
.btn--nav.btn--primary:active,
.btn--nav.btn--secondary:active {
  opacity: 1;
  transform: scale(1.04);
}

.btn--nav:focus-visible {
  outline: 2px solid var(--focus);
  outline-offset: 3px;
}

.btn--nav .btn__label {
  position: static;
  width: auto;
  height: auto;
  margin: 0;
  overflow: visible;
  clip: auto;
  white-space: nowrap;
}

.btn--nav .btn__icon {
  display: none !important;
}

.btn__icon {
  display: none;
  align-items: center;
  justify-content: center;
  line-height: 0;
}

.btn__icon svg {
  display: block;
}

/* ——— Navigation ——— */

.site-header {
  position: fixed;
  inset: 0 0 auto 0;
  z-index: 100;
  padding-top: var(--safe-top);
  /* Solid fallback when backdrop-filter is unavailable */
  background: #FBFBF8;
  border-bottom: 1px solid rgba(0, 0, 0, 0.08);
}

@supports (
  (-webkit-backdrop-filter: saturate(180%) blur(20px)) or
    (backdrop-filter: saturate(180%) blur(20px))
) {
  .site-header {
    background: rgba(251, 251, 248, 0.78);
    -webkit-backdrop-filter: saturate(180%) blur(20px);
    backdrop-filter: saturate(180%) blur(20px);
  }
}

.nav {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
  /* Fixed base height — do not use --nav-height here (avoids circular resize lock) */
  min-height: 4rem;
  /* Widen container so edge gaps ≈ 30% of prior desktop gaps */
  width: min(100%, calc(70vw + 0.3 * (var(--content-max) + 8rem)));
  margin: 0 auto;
  padding: 0.35rem calc(var(--page-pad) + var(--safe-right)) 0.35rem
    calc(var(--page-pad) + var(--safe-left));
}

@media (min-width: 768px) {
  .nav {
    /* Keep ~30% of prior horizontal padding on desktop/tablet */
    padding-left: calc(0.3 * var(--page-pad) + var(--safe-left));
    padding-right: calc(0.3 * var(--page-pad) + var(--safe-right));
  }
}

.nav__brand {
  flex: 0 1 auto;
  min-width: 0;
  font-family: var(--font-sans);
  font-size: 1.125rem;
  font-weight: 600;
  letter-spacing: -0.02em;
  line-height: 1.2;
  text-decoration: none;
  color: var(--text-primary);
}

.nav__brand:hover {
  text-decoration: none;
  opacity: 0.75;
}

.nav__actions {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  flex-wrap: nowrap;
  gap: 0.45rem;
  flex: 0 0 auto;
  min-width: 0;
}

/* Compact mobile nav: bare icon actions (no chrome) */
@media (max-width: 767px) {
  :root {
    --page-pad: 1.35rem; /* ~21.6px gutters */
  }

  .nav {
    min-height: 3.5rem;
    gap: 0.5rem;
    padding-block: 0.25rem;
  }

  .nav__brand {
    /* ~8% smaller than desktop brand (1.125rem) */
    font-size: 1.035rem;
  }

  .nav__actions {
    gap: 0.15rem;
    /* Icons: Inquire left, Call right (DOM order remains Call → Inquire for text/desktop) */
    flex-direction: row-reverse;
  }

  .btn--nav,
  .btn--nav.btn--primary,
  .btn--nav.btn--secondary {
    min-height: var(--touch-min);
    min-width: var(--touch-min);
    padding: 0.25rem;
    border: none;
    border-radius: 0;
    background: transparent;
    box-shadow: none;
    color: var(--text-primary);
    filter: none;
  }

  .btn--nav:hover,
  .btn--nav.btn--primary:hover,
  .btn--nav.btn--secondary:hover,
  .btn--nav:active,
  .btn--nav.btn--primary:active,
  .btn--nav.btn--secondary:active {
    border: none;
    background: transparent;
    box-shadow: none;
    filter: none;
  }

  .btn--nav .btn__label {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border: 0;
  }

  .btn--nav .btn__icon {
    display: inline-flex !important;
  }

  .btn--nav .btn__icon svg {
    width: 30px; /* +20% vs prior 25px */
    height: 30px;
  }
}

/* ——— Display / lead line composition ——— */

.display-line,
.lead-line {
  display: block;
}

/* ——— Hero ——— */
/* Fixed header overlays the page; --nav-height already includes safe-top. */

.hero {
  box-sizing: border-box;
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 100vh;
  min-height: 100svh;
  min-height: 100dvh;
  padding: var(--nav-height) calc(var(--page-pad) + var(--safe-right))
    clamp(2rem, 5vh, 3.5rem) calc(var(--page-pad) + var(--safe-left));
}

.hero__inner {
  /* Match closing content container for centered composition + side whitespace */
  width: var(--prose-max);
  max-width: 1440px;
  margin: 0 auto;
  text-align: center;
  /* +20% vs prior hero spacing */
  padding-block: clamp(1.8rem, 4.8vh, 3.6rem) clamp(2.4rem, 6vh, 4.2rem);
}

.hero__title {
  /* +20% overall hero content scale */
  font-size: clamp(2.4rem, 5.52vw, 4.2rem);
  font-weight: 600;
  line-height: 1.08;
  letter-spacing: -0.022em;
  max-width: min(100%, 56rem);
  margin-inline: auto;
}

.hero__lead {
  margin-top: clamp(1.2rem, 2.76vw, 1.68rem);
  margin-inline: auto;
  max-width: min(100%, 56rem);
  color: var(--text-primary);
  font-size: clamp(1.2rem, 1.104rem + 0.42vw, 1.5rem);
  font-weight: 400;
  line-height: 1.5;
  letter-spacing: -0.011em;
}

.hero__actions,
.closing__actions {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  align-items: stretch;
  gap: 0.65rem;
  margin-top: clamp(1.25rem, 3vw, 2.1rem);
}

.hero__actions {
  margin-top: clamp(1.5rem, 3.6vw, 2.52rem);
  gap: 0.78rem;
}

.hero__actions .btn,
.closing__actions .btn {
  flex: 1 1 auto;
  min-width: min(100%, 11.5rem);
  max-width: 100%;
  min-height: var(--touch-min);
  padding-inline: 1rem;
  white-space: nowrap;
}

/* Hero CTAs ~20% smaller than the prior enlarged size */
.hero__actions .btn {
  min-height: var(--touch-min);
  padding-inline: 0.96rem;
  font-size: 1.02rem;
}

@media (max-width: 767px) {
  .hero__title {
    font-size: clamp(2.1rem, 1.74rem + 1.62vw, 2.4rem);
    line-height: 1.18;
  }

  .hero__lead {
    margin-top: 1.2rem;
    font-size: clamp(1.2rem, 1.152rem + 0.3vw, 1.275rem);
    line-height: 1.55;
  }

  .hero__actions,
  .closing__actions {
    margin-top: 1.35rem;
    gap: 0.55rem;
  }

  .hero__actions {
    margin-top: 1.62rem;
    gap: 0.55rem;
  }

  /* Prefer side-by-side when both full labels fit; stack via wrap otherwise */
  .hero__actions .btn,
  .closing__actions .btn {
    flex: 1 1 calc(50% - 0.35rem);
    min-width: 9.5rem;
    padding-inline: 0.55rem;
    font-size: 0.8125rem;
  }

  .hero__actions .btn {
    padding-inline: 0.55rem;
    font-size: 0.78rem;
  }
}

@media (min-width: 768px) {
  .hero__actions .btn,
  .closing__actions .btn {
    flex: 0 1 auto;
    padding-inline: 1.2rem;
    font-size: 1.0625rem;
  }

  .hero__actions .btn {
    padding-inline: 1.15rem;
    font-size: 1.02rem;
  }
}

/*
 * Desktop / laptop / tablet landscape:
 * Headline line 1 + each supporting sentence on its own single row.
 */
@media (min-width: 900px), (min-width: 768px) and (orientation: landscape) {
  .hero__title {
    max-width: 100%;
    font-size: clamp(1.8rem, 0.78rem + 2.22vw, 3rem);
    line-height: 1.12;
  }

  .hero__title .display-line:first-child {
    white-space: nowrap;
  }

  .hero__lead {
    margin-top: clamp(1.08rem, 2.4vw, 1.5rem);
    /* Sized so both lead sentences fit one line each */
    font-size: clamp(0.9375rem, 0.62rem + 0.7vw, 1.2rem);
    max-width: 100%;
    line-height: 1.45;
  }

  .hero__lead .lead-line {
    white-space: nowrap;
  }

  .hero__actions {
    margin-top: clamp(1.38rem, 3vw, 2.1rem);
  }
}

@media (min-width: 1200px) {
  .hero__title {
    font-size: clamp(2.22rem, 0.9rem + 1.86vw, 3rem);
  }

  .hero__lead {
    font-size: clamp(1.05rem, 0.7rem + 0.55vw, 1.2rem);
  }
}

@media (min-width: 1440px) {
  .hero__title {
    font-size: clamp(2.52rem, 1.08rem + 1.44vw, 3rem);
  }

  .hero__lead {
    font-size: clamp(1.1rem, 0.75rem + 0.45vw, 1.25rem);
  }
}

@media (max-height: 480px) and (orientation: landscape) {
  .hero {
    min-height: 0;
    align-items: flex-start;
    padding-bottom: 1.5rem;
  }

  .hero__inner {
    padding-block: 1.2rem;
  }

  .hero__title {
    font-size: clamp(1.5rem, 4.56vh, 2.1rem);
  }

  .hero__title .display-line:first-child {
    white-space: nowrap;
  }

  .hero__lead {
    margin-top: 0.9rem;
    font-size: clamp(0.85rem, 2.4vh, 1.05rem);
  }

  .hero__lead .lead-line {
    white-space: nowrap;
  }

  .hero__actions {
    margin-top: 1.2rem;
  }
}

/* ——— Services / Carousel ——— */

.services {
  /* Leave room for neighbour glimpses on both sides */
  --card-w: min(78vw, 22rem);
  box-sizing: border-box;
  display: flex;
  flex-direction: column;
  justify-content: center;
  min-height: 100vh;
  min-height: 100svh;
  min-height: 100dvh;
  padding: calc(var(--nav-height) + 1.25rem) 0 clamp(2.5rem, 6vh, 4rem);
  scroll-margin-top: var(--nav-height);
  overflow-x: clip;
  overflow-y: visible;
}

@supports not (overflow: clip) {
  .services {
    overflow-x: hidden;
  }
}

.services__header {
  width: min(100%, var(--content-max));
  margin: 0 auto;
  padding: 0 calc(var(--page-pad) + var(--safe-left)) 0
    calc(var(--page-pad) + var(--safe-right));
  flex-shrink: 0;
  text-align: center;
}

.services__intro {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 0;
  min-width: 0;
}

.services .section-title {
  font-family: var(--font-sans);
  font-size: clamp(1.75rem, 1.35rem + 1.4vw, 2.5rem); /* ~28px → 40px */
  font-weight: 600;
  line-height: 1.15;
  letter-spacing: -0.022em;
  color: #1D1D1F;
  text-align: center;
  max-width: 100%;
  white-space: nowrap;
}

@media (max-width: 359px) {
  .services .section-title {
    /* Allow wrap only on very narrow widths to avoid clipping */
    white-space: normal;
  }
}

.carousel {
  position: relative;
  margin-top: clamp(1.35rem, 3.2vw, 2rem);
  flex: 1 1 auto;
  display: flex;
  flex-direction: column;
  min-height: 0;
}

.carousel__viewport {
  --carousel-side: max(
    calc(var(--page-pad) + var(--safe-left)),
    calc((100% - var(--card-w)) / 2)
  );
  margin-top: clamp(0.85rem, 2vw, 1.25rem);
  overflow-x: auto;
  overflow-y: visible;
  overscroll-behavior-x: contain;
  scroll-snap-type: x mandatory;
  scrollbar-width: none;
  -ms-overflow-style: none;
  -webkit-overflow-scrolling: touch;
  cursor: grab;
  outline: none;
  /* Side padding centres a card and reveals neighbour glimpses */
  padding-inline: var(--carousel-side);
  /* Vertical room for scaled cards, shadows, focus rings */
  padding-block: 1.35rem 1.75rem;
}

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

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

.carousel__viewport:focus-visible {
  outline: 2px solid var(--focus);
  outline-offset: 2px;
}

.carousel__track {
  display: flex;
  align-items: stretch;
  gap: clamp(0.75rem, 1.6vw, 1.15rem);
  width: max-content;
  /* Extra height so scale/blur aren’t clipped by the flex line */
  padding-block: 0.25rem;
}

/* Outer slot: geometry / snap only — never visually transformed */
.service-card {
  --card-min-h: 26rem;
  flex: 0 0 auto;
  width: var(--card-w);
  min-height: var(--card-min-h);
  scroll-snap-align: center;
  scroll-snap-stop: normal;
  list-style: none;
  background: transparent;
  border: none;
  box-shadow: none;
  padding: 0.35rem;
}

/* Inner surface: scale / opacity / blur for center emphasis */
.service-card__surface {
  display: flex;
  flex-direction: column;
  gap: 0.9rem;
  height: 100%;
  min-height: calc(var(--card-min-h) - 0.7rem);
  padding: 1.45rem 1.3rem 1.55rem;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-card);
  box-shadow: var(--shadow-card);
  transform: scale(0.93);
  transform-origin: center center;
  opacity: 0.72;
  filter: blur(1.25px);
  will-change: transform, opacity, filter;
  transition: transform 160ms var(--ease), opacity 160ms var(--ease),
    filter 160ms var(--ease), box-shadow 160ms var(--ease),
    border-color 160ms var(--ease);
}

.service-card.is-center .service-card__surface {
  transform: scale(1);
  opacity: 1;
  filter: none;
  border-color: color-mix(in srgb, var(--text-primary) 28%, var(--border));
  box-shadow: var(--shadow-card-hover);
}

.service-card.is-near .service-card__surface {
  transform: scale(0.95);
  opacity: 0.86;
  filter: none;
}

.service-card.is-far .service-card__surface {
  transform: scale(0.91);
  opacity: 0.62;
  filter: blur(1.5px);
}

.service-card__top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
  flex-shrink: 0;
}

.service-card__index {
  color: var(--text-secondary);
  font-size: 0.8125rem;
  font-weight: 500;
  letter-spacing: 0.06em;
  line-height: 1;
}

.service-card__icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 2.35rem;
  height: 2.35rem;
  color: var(--text-primary);
  border: 1px solid var(--border);
  border-radius: 10px;
  background: var(--background);
  flex-shrink: 0;
}

.service-card__icon svg {
  display: block;
}

.service-card__title {
  font-size: clamp(1.125rem, 2vw, 1.5rem);
  font-weight: 600;
  line-height: 1.2;
  letter-spacing: -0.022em;
  flex-shrink: 0;
}

.service-card__rule {
  width: 2.25rem;
  height: 1px;
  background: var(--border);
  flex-shrink: 0;
}

.service-card__story {
  margin: 0;
  color: var(--text-primary);
  font-size: 0.98rem;
  font-weight: 400;
  line-height: 1.55;
  letter-spacing: -0.011em;
}

.service-card__note {
  margin-top: auto;
  padding-top: 0.85rem;
  border-top: 1px solid var(--border);
  color: var(--text-secondary);
  font-size: 0.8125rem;
  line-height: 1.5;
}

@media (prefers-reduced-motion: reduce) {
  .service-card__surface {
    transition: none;
    filter: none !important;
    transform: scale(0.97);
    opacity: 0.82;
  }

  .service-card.is-center .service-card__surface {
    transform: scale(1);
    opacity: 1;
  }

  .service-card.is-near .service-card__surface,
  .service-card.is-far .service-card__surface {
    transform: scale(0.97);
    opacity: 0.78;
    filter: none;
  }
}

@media (min-width: 768px) {
  .services {
    --card-w: clamp(20rem, 28vw, 22.5rem);
  }

  .service-card {
    --card-min-h: 28.5rem;
  }

  .service-card__surface {
    padding: 1.6rem 1.5rem 1.7rem;
    gap: 1rem;
  }

  .service-card__story {
    font-size: 1.02rem;
  }
}

@media (min-width: 1024px) {
  .services {
    --card-w: clamp(20.5rem, 24vw, 22.5rem); /* ~328–360px */
  }

  .service-card {
    --card-min-h: 32.5rem; /* ~520px portrait */
  }

  .service-card__surface {
    padding: 1.75rem 1.65rem 1.85rem;
  }

  .service-card__story {
    font-size: 1.0625rem;
  }
}

@media (max-height: 480px) and (orientation: landscape) {
  .services {
    min-height: 0;
    padding-top: calc(var(--nav-height) + 0.75rem);
    padding-bottom: 1.5rem;
  }

  .service-card {
    --card-min-h: 18rem;
  }
}

/* ——— Closing + Footer (one combined full-viewport section) ——— */

.closing {
  box-sizing: border-box;
  display: flex;
  flex-direction: column;
  min-height: 100vh;
  min-height: 100svh;
  min-height: 100dvh;
  /* Horizontal padding lives on content/footer inner so footer can go full-bleed */
  padding: calc(var(--nav-height) + 1rem) 0 0;
  border-top: 1px solid var(--border);
  scroll-margin-top: var(--nav-height);
  background: var(--background);
}

.closing__content {
  flex: 1 1 auto;
  display: flex;
  flex-direction: column;
  justify-content: center;
  width: var(--prose-max);
  max-width: 1440px;
  margin: 0 auto;
  text-align: center;
  padding-block: clamp(1.5rem, 4vh, 3rem) clamp(2rem, 5vh, 3.5rem);
  padding-inline: calc(var(--page-pad) + var(--safe-left))
    calc(var(--page-pad) + var(--safe-right));
  color: var(--text-primary);
}

.closing__title {
  font-size: clamp(2rem, 4.6vw, 3.5rem);
  font-weight: 600;
  line-height: 1.08;
  letter-spacing: -0.022em;
}

.closing__lead {
  margin-top: clamp(1rem, 2.3vw, 1.4rem);
  margin-inline: auto;
  max-width: min(100%, 56rem);
  color: var(--text-primary);
  font-size: clamp(1rem, 0.92rem + 0.35vw, 1.25rem);
  font-weight: 400;
  line-height: 1.5;
  letter-spacing: -0.011em;
}

@media (max-width: 767px) {
  .closing__title {
    font-size: clamp(1.75rem, 1.45rem + 1.35vw, 2rem);
    line-height: 1.18;
  }

  .closing__lead {
    margin-top: 1rem;
    font-size: clamp(1rem, 0.96rem + 0.25vw, 1.0625rem);
    line-height: 1.55;
  }
}

@media (min-width: 1200px) {
  .closing__title {
    font-size: clamp(2.5rem, 2vw + 1.25rem, 3rem);
  }

  .closing__lead {
    font-size: 1.125rem;
    max-width: min(100%, 58rem);
  }
}

@media (min-width: 1440px) {
  .closing__title {
    font-size: 3rem;
  }

  .closing__lead {
    font-size: 1.25rem;
  }
}

@media (max-height: 480px) and (orientation: landscape) {
  .closing {
    min-height: 0;
    padding-top: calc(var(--nav-height) + 0.75rem);
  }

  .closing__title {
    font-size: clamp(1.5rem, 4.5vh, 1.875rem);
  }

  .closing__lead {
    margin-top: 0.75rem;
    font-size: 1rem;
  }

  .closing__actions {
    margin-top: 1rem;
  }
}

.site-footer {
  flex: 0 0 auto;
  width: 100%;
  background: #1D1D1F;
  color: #FBFBF8;
  border-top: 1px solid rgba(251, 251, 248, 0.18);
  padding: clamp(1.35rem, 3vh, 1.9rem) 0
    calc(clamp(1.5rem, 3.2vh, 2.1rem) + var(--safe-bottom));
}

.site-footer__inner {
  width: min(100%, var(--content-max));
  margin: 0 auto;
  text-align: center;
  padding-inline: calc(var(--page-pad) + var(--safe-left))
    calc(var(--page-pad) + var(--safe-right));
}

.site-footer__name {
  font-family: var(--font-sans);
  font-size: 1.275rem; /* +20% vs 1.0625rem */
  font-weight: 500;
  letter-spacing: -0.011em;
  color: #FBFBF8;
}

.site-footer__service-area {
  margin: 0.35rem 0 0;
  max-width: 28rem;
  color: #D2D2D7;
  font-size: 0.875rem;
  line-height: 1.45;
  letter-spacing: -0.011em;
}

.site-footer__meta {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  flex-wrap: wrap;
  gap: 0.75rem 2rem;
  margin-top: 1rem;
  color: #D2D2D7;
  font-size: 0.9375rem;
  line-height: 1.5;
}

.site-footer__meta li {
  max-width: 100%;
  list-style: none;
}

.site-footer__contact {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  min-height: var(--touch-min);
  max-width: 100%;
  color: #FBFBF8;
  text-decoration: none;
  overflow-wrap: anywhere;
  word-break: break-word;
}

.site-footer__icon {
  display: inline-flex;
  flex-shrink: 0;
  align-items: center;
  justify-content: center;
  color: #FBFBF8;
}

.site-footer__icon svg {
  display: block;
}

.site-footer a {
  color: #FBFBF8;
}

.site-footer a:hover {
  color: #FBFBF8;
  text-decoration: underline;
  text-decoration-thickness: 1px;
  text-underline-offset: 0.2em;
}

.site-footer a:focus-visible {
  outline: 2px solid #FBFBF8;
  outline-offset: 3px;
}

.site-footer__meta a {
  color: #FBFBF8;
}

@media (min-width: 480px) {
  .site-footer__meta {
    flex-direction: row;
    gap: 0.75rem 2.5rem;
  }
}

.site-footer__social {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 0.75rem 1.25rem;
  margin-top: 0.85rem;
  font-size: 0.9375rem;
  color: #FBFBF8;
}

.site-footer__social[hidden] {
  display: none;
}

.site-footer__copy {
  margin-top: 1.1rem;
  color: #D2D2D7;
  font-size: 0.8125rem;
}

@media (min-width: 900px) {
  /* Desktop visual target ~70/30; height grows with content/zoom */
  .closing {
    min-height: calc(100vh - var(--nav-height) - var(--safe-top));
    min-height: calc(100dvh - var(--nav-height) - var(--safe-top));
  }

  .closing__content {
    flex: 7 1 0;
  }

  .site-footer {
    flex: 3 0 0;
    display: flex;
    align-items: center;
  }

  .site-footer__meta {
    flex-direction: row;
    flex-wrap: wrap;
    justify-content: center;
    gap: 0.85rem 3rem;
  }
}

/* ——— Modals ——— */

body.modal-open {
  position: fixed;
  left: 0;
  right: 0;
  width: 100%;
  overflow: hidden;
}

.modal[hidden] {
  display: none;
}

.modal {
  position: fixed;
  inset: 0;
  z-index: 200;
  display: flex;
  align-items: flex-end;
  justify-content: center;
  padding: var(--safe-top) var(--safe-right) var(--safe-bottom) var(--safe-left);
}

.modal__backdrop {
  position: absolute;
  inset: 0;
  background: rgba(29, 29, 31, 0.35);
}

.modal__panel {
  position: relative;
  z-index: 1;
  display: flex;
  flex-direction: column;
  width: min(100%, 32rem);
  max-height: min(92vh, 92dvh, 44rem);
  margin: auto 0 0;
  background: var(--background);
  color: var(--text-primary);
  font-family: var(--font-sans);
  border: 1px solid var(--border);
  border-radius: var(--radius-panel) var(--radius-panel) 0 0;
  box-shadow: var(--shadow-modal);
  overflow: hidden;
}

.modal__header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 0.75rem;
  flex: 0 0 auto;
  padding: 1.15rem 1.15rem 0.65rem;
}

.modal__title {
  min-width: 0;
  font-size: clamp(1.25rem, 3vw, 1.5rem);
  line-height: 1.15;
}

.modal__close {
  flex: 0 0 auto;
  width: var(--touch-min);
  height: var(--touch-min);
  min-width: var(--touch-min);
  min-height: var(--touch-min);
  padding: 0;
  font-size: 1.4rem;
  line-height: 1;
}

.modal__body {
  flex: 1 1 auto;
  min-height: 0;
  overflow: auto;
  -webkit-overflow-scrolling: touch;
  padding: 0 1.15rem calc(1.35rem + var(--safe-bottom));
}

.modal__support {
  margin-bottom: 0.85rem;
  color: var(--text-primary);
  font-size: 0.9375rem;
  line-height: 1.5;
}

.modal__preview-note {
  margin-bottom: 1rem;
  padding: 0.75rem 0.9rem;
  border: 1px solid var(--border);
  border-radius: var(--radius-btn);
  color: var(--text-secondary);
  font-size: 0.875rem;
  line-height: 1.5;
}

@media (min-width: 640px) {
  .modal {
    align-items: center;
    padding: calc(1.25rem + var(--safe-top)) calc(1.25rem + var(--safe-right))
      calc(1.25rem + var(--safe-bottom)) calc(1.25rem + var(--safe-left));
  }

  .modal__panel {
    margin: 0;
    border-radius: var(--radius-panel);
    max-height: min(88vh, 88dvh, 42rem);
  }

  .modal__header {
    padding: 1.4rem 1.4rem 0.7rem;
  }

  .modal__body {
    padding: 0 1.4rem 1.5rem;
  }
}

/* Short landscape / keyboard: keep panel usable */
@media (max-height: 480px) {
  .modal {
    align-items: stretch;
    padding: 0.5rem;
  }

  .modal__panel {
    margin: 0;
    max-height: none;
    height: 100%;
    border-radius: var(--radius-panel);
  }
}

/* ——— Success confirmation (universal) ——— */

body.success-open {
  overflow: hidden;
}

.success-overlay[hidden] {
  display: none;
}

.success-overlay {
  position: fixed;
  inset: 0;
  z-index: 300;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: calc(1rem + var(--safe-top)) calc(1rem + var(--safe-right))
    calc(1rem + var(--safe-bottom)) calc(1rem + var(--safe-left));
  cursor: pointer;
}

.success-overlay__backdrop {
  position: absolute;
  inset: 0;
  background: rgba(29, 29, 31, 0.42);
}

.success-overlay__panel {
  position: relative;
  z-index: 1;
  box-sizing: border-box;
  width: min(100%, 22.5rem);
  max-height: min(88vh, 88dvh);
  overflow: auto;
  -webkit-overflow-scrolling: touch;
  margin: 0;
  padding: 1.75rem 1.4rem 1.6rem;
  text-align: center;
  background: var(--background);
  color: var(--text-primary);
  font-family: var(--font-sans);
  border: 1px solid var(--border);
  border-radius: var(--radius-panel);
  box-shadow: var(--shadow-modal);
  outline: none;
  cursor: pointer;
  transform: translateY(0.35rem);
  opacity: 0;
  animation: success-panel-in 0.35s var(--ease) forwards;
}

.success-overlay__mark {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 4.5rem;
  height: 4.5rem;
  margin: 0 auto 1.05rem;
}

.success-overlay__svg {
  display: block;
  width: 4.5rem;
  height: 4.5rem;
}

.success-overlay__ring,
.success-overlay__check {
  fill: none;
  stroke: var(--text-primary);
  stroke-linecap: round;
  stroke-linejoin: round;
}

.success-overlay__ring {
  stroke-width: 2.25;
  stroke-dasharray: 176;
  stroke-dashoffset: 176;
}

.success-overlay__check {
  stroke-width: 2.75;
  stroke-dasharray: 48;
  stroke-dashoffset: 48;
}

.success-overlay__mark.is-animating .success-overlay__ring {
  animation: success-ring-draw 0.55s var(--ease) forwards;
}

.success-overlay__mark.is-animating .success-overlay__check {
  animation: success-check-draw 0.4s var(--ease) 0.32s forwards;
}

.success-overlay__title {
  margin: 0 0 0.55rem;
  font-size: clamp(1.2rem, 3.6vw, 1.4rem);
  font-weight: 600;
  letter-spacing: -0.02em;
  line-height: 1.2;
}

.success-overlay__message {
  margin: 0;
  color: var(--text-secondary);
  font-size: 0.9375rem;
  line-height: 1.5;
}

@keyframes success-panel-in {
  from {
    opacity: 0;
    transform: translateY(0.45rem) scale(0.98);
  }
  to {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
}

@keyframes success-ring-draw {
  to {
    stroke-dashoffset: 0;
  }
}

@keyframes success-check-draw {
  to {
    stroke-dashoffset: 0;
  }
}

@media (max-width: 639px) {
  .success-overlay {
    align-items: flex-end;
    padding-left: var(--safe-left);
    padding-right: var(--safe-right);
    padding-bottom: var(--safe-bottom);
    padding-top: calc(0.75rem + var(--safe-top));
  }

  .success-overlay__panel {
    width: 100%;
    max-width: none;
    border-radius: var(--radius-panel) var(--radius-panel) 0 0;
    padding: 1.55rem 1.2rem calc(1.45rem + var(--safe-bottom));
  }
}

@media (max-height: 480px) {
  .success-overlay {
    align-items: center;
  }

  .success-overlay__panel {
    border-radius: var(--radius-panel);
    padding: 1.25rem 1.1rem;
  }

  .success-overlay__mark,
  .success-overlay__svg {
    width: 3.5rem;
    height: 3.5rem;
  }
}

/* ——— Forms ——— */

.form__field {
  margin-bottom: 1rem;
  min-width: 0;
}

.form label {
  display: block;
  margin-bottom: 0.4rem;
  font-size: 0.875rem;
  font-weight: 500;
  letter-spacing: -0.011em;
}

.form__optional {
  color: var(--text-secondary);
  font-weight: 400;
}

.form input,
.form select,
.form textarea {
  display: block;
  width: 100%;
  max-width: 100%;
  min-height: var(--touch-min);
  padding: 0.7rem 0.85rem;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-btn);
  font-family: var(--font-sans);
  font-size: 1rem; /* >=16px avoids iOS focus zoom */
  line-height: 1.4;
  color: var(--text-primary);
  transition: border-color 0.15s var(--ease);
}

.form textarea {
  min-height: 6.25rem;
  resize: vertical;
}

.form input:hover,
.form select:hover,
.form textarea:hover {
  border-color: #b0b0b5;
}

.form input:focus-visible,
.form select:focus-visible,
.form textarea:focus-visible {
  outline: 2px solid var(--focus);
  outline-offset: 2px;
  border-color: var(--text-primary);
}

.form input[aria-invalid="true"],
.form select[aria-invalid="true"],
.form textarea[aria-invalid="true"] {
  border-color: #8a1f1f;
}

.form__error {
  margin-top: 0.4rem;
  color: #8a1f1f;
  font-size: 0.8125rem;
  line-height: 1.4;
}

.form__status {
  margin: 0.25rem 0 1rem;
  padding: 0.75rem 0.9rem;
  border: 1px solid var(--border);
  border-radius: var(--radius-btn);
  background: var(--surface);
  color: var(--text-primary);
  font-size: 0.875rem;
  line-height: 1.5;
}

.form__status[hidden] {
  display: none;
}

.form__actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.65rem;
  margin-top: 0.35rem;
  position: sticky;
  bottom: 0;
  padding-top: 0.35rem;
  background: var(--background);
}

@media (max-width: 360px) {
  .form__actions .btn {
    width: 100%;
  }
}
