:root {
  /* Palette: white + graphite + light blue + dark blue (minimal) */
  --bg: #ffffff;
  --paper: rgba(255, 255, 255, 0.78);
  --ink: #1f2328; /* graphite */
  --muted: rgba(31, 35, 40, 0.68);
  --line: rgba(31, 35, 40, 0.12);
  --shadow: 0 18px 55px rgba(17, 24, 39, 0.1);

  --accent: #0b2d5c; /* dark blue */
  --accent-2: #5aa8ff; /* light blue */
  --accent-3: #0f4aa3; /* dark blue alt */

  --radius: 18px;
  --radius-sm: 12px;
  --container: 1100px;
  /* Gutter between the centered container and viewport edge (>= 20px). */
  --gutter: max(20px, calc((100vw - var(--container)) / 2));
  /* Header height is synced from JS; used for layout + anchor offsets. */
  --header-h: 84px;
}

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

html,
body {
  height: 100%;
}

/* Hide the page scrollbar while keeping scroll behavior. */
html {
  scrollbar-width: none; /* Firefox */
  scroll-behavior: smooth;
  scroll-padding-top: calc(var(--header-h) + 12px);
}

html::-webkit-scrollbar {
  width: 0;
  height: 0;
}

body {
  margin: 0;
  color: var(--ink);
  background: var(--bg);
  font-family: "Fraunces", ui-serif, Georgia, serif;
  line-height: 1.4;
  overflow-x: hidden; /* avoid accidental horizontal overflow */
  padding-top: var(--header-h); /* reserve space for fixed header */
}

a {
  color: inherit;
  text-decoration: none;
}

.mono {
  font-family: "IBM Plex Mono", ui-monospace, SFMono-Regular, Menlo, Monaco,
    Consolas, "Liberation Mono", "Courier New", monospace;
  letter-spacing: -0.01em;
}

.muted {
  color: var(--muted);
}

.container {
  width: min(var(--container), calc(100% - 40px));
  margin-inline: auto;
}

.bg {
  position: fixed;
  inset: -30vmax;
  z-index: -2;
  background:
    radial-gradient(closest-side, rgba(90, 168, 255, 0.22), transparent 62%),
    radial-gradient(closest-side, rgba(11, 45, 92, 0.12), transparent 60%),
    radial-gradient(closest-side, rgba(15, 74, 163, 0.08), transparent 64%),
    linear-gradient(180deg, rgba(255, 255, 255, 0.7), transparent 55%);
  filter: saturate(1.02) contrast(1.01);
  transform: translate3d(0, var(--bg-parallax-y, 0px), 0);
}

.bubbles {
  display: none; /* desktop only; enabled via media queries below */
  position: fixed;
  inset: 0;
  z-index: -1;
  pointer-events: none;
  overflow: hidden;
}

/* Desktop only: require fine pointer + hover capability, and JS enabled. */
@media (hover: hover) and (pointer: fine) and (min-width: 901px) {
  .js .bubbles {
    display: block;
  }
}

.bubble {
  position: absolute;
  top: 0;
  width: var(--size, 42px);
  height: var(--size, 42px);
  border-radius: 999px;
  transform: translate3d(0, var(--y, 0px), 0);
  background: rgba(90, 168, 255, var(--alpha, 0.12));
  border: 1px solid rgba(11, 45, 92, 0.18);
  box-shadow:
    0 22px 60px rgba(15, 74, 163, 0.14),
    inset 0 1px 0 rgba(255, 255, 255, 0.6);
  filter: blur(0.2px);
  opacity: 0.95;
  will-change: transform;
}

.bubble.left {
  left: max(
    6px,
    calc(var(--gutter) - var(--size) - 6px + var(--x, 0px))
  );
}

.bubble.right {
  left: auto;
  right: max(
    6px,
    calc(var(--gutter) - var(--size) - 6px + var(--x, 0px))
  );
}

.bubble.edge-left {
  left: max(6px, calc(12px + var(--x, 0px)));
}

.bubble.edge-right {
  left: auto;
  right: max(6px, calc(12px + var(--x, 0px)));
}

.bubble.mid-left {
  left: max(
    6px,
    calc(12px + (var(--gutter) - var(--size) - 18px) * 0.5 + var(--x, 0px))
  );
}

.bubble.mid-right {
  left: auto;
  right: max(
    6px,
    calc(12px + (var(--gutter) - var(--size) - 18px) * 0.5 + var(--x, 0px))
  );
}

.bubble::after {
  content: "";
  position: absolute;
  inset: 18% 18% auto auto;
  width: 40%;
  height: 40%;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.45);
  transform: translate3d(-10%, 10%, 0);
}

.site-header {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 10;
  backdrop-filter: blur(10px);
  background: rgba(255, 255, 255, 0.8);
  border-bottom: 1px solid var(--line);
}

.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 16px 0;
  gap: 16px;
}

.brand-lockup {
  display: inline-flex;
  align-items: center;
  gap: 10px;
}

.brand {
  display: inline-flex;
  align-items: center;
  padding: 6px 10px;
  border-radius: 999px;
  border: 1px solid rgba(28, 27, 24, 0.08);
  background: rgba(255, 255, 255, 0.5);
}

.brand-mark {
  width: 42px;
  height: 42px;
  display: block;
  border-radius: 10px;
  object-fit: contain;
  background: rgba(255, 255, 255, 0.7);
  box-shadow: 0 8px 18px rgba(15, 74, 163, 0.2);
}

.brand-name {
  font-weight: 700;
  letter-spacing: -0.02em;
}

.nav {
  display: flex;
  align-items: center;
  gap: 14px;
  flex-wrap: wrap;
  justify-content: flex-end;
}

.nav-link {
  padding: 8px 10px;
  border-radius: 999px;
  color: var(--muted);
  font-size: 15px;
}

.nav-link:hover {
  color: var(--ink);
  background: rgba(255, 255, 255, 0.55);
  border: 1px solid rgba(28, 27, 24, 0.08);
  padding: 7px 9px;
}

.hero {
  padding: 58px 0 18px;
}

.hero-inner {
  display: grid;
  gap: 18px;
}

.kicker {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  color: var(--muted);
  margin: 0;
  font-size: 14px;
  font-family: "IBM Plex Mono", ui-monospace, SFMono-Regular, Menlo, Monaco,
    Consolas, "Liberation Mono", "Courier New", monospace;
}

.kicker::before {
  content: "";
  width: 38px;
  height: 1px;
  background: linear-gradient(90deg, transparent, rgba(28, 27, 24, 0.35));
}

.hero-title {
  margin: 0;
  font-size: clamp(38px, 4.6vw, 66px);
  line-height: 1.02;
  letter-spacing: -0.035em;
}

.hero-accent {
  background: linear-gradient(120deg, var(--accent), var(--accent-2));
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

.hero-subtitle {
  margin: 0;
  max-width: 62ch;
  color: var(--muted);
  font-size: 18px;
}

.hero-cta {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
  align-items: center;
}

.button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  height: 44px;
  padding: 0 16px;
  border-radius: 999px;
  font-size: 15px;
  letter-spacing: -0.01em;
  border: 1px solid rgba(28, 27, 24, 0.12);
  background: rgba(255, 255, 255, 0.5);
  box-shadow: 0 8px 22px rgba(0, 0, 0, 0.05);
  transition: transform 160ms ease, background 160ms ease, box-shadow 160ms ease;
}

.button:hover {
  transform: translateY(-1px);
  box-shadow: 0 14px 35px rgba(0, 0, 0, 0.08);
}

.button:active {
  transform: translateY(0);
}

.button.primary {
  color: #fff;
  border-color: rgba(0, 0, 0, 0.12);
  background: linear-gradient(135deg, var(--accent), rgba(15, 74, 163, 0.78));
}

.button.primary:hover {
  background: linear-gradient(135deg, rgba(11, 45, 92, 0.98), var(--accent-3));
}

.button.ghost {
  background: rgba(255, 255, 255, 0.25);
}

.hero-card {
  margin-top: 10px;
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px;
  padding: 14px;
  border-radius: var(--radius);
  border: 1px solid rgba(28, 27, 24, 0.12);
  background: var(--paper);
  box-shadow: var(--shadow);
}

.stat {
  padding: 10px 12px;
  border-radius: var(--radius-sm);
  border: 1px solid rgba(28, 27, 24, 0.08);
  background: rgba(255, 255, 255, 0.55);
}

.stat-label {
  font-size: 12px;
  color: var(--muted);
  font-family: "IBM Plex Mono", ui-monospace, SFMono-Regular, Menlo, Monaco,
    Consolas, "Liberation Mono", "Courier New", monospace;
}

.stat-value {
  margin-top: 6px;
  font-size: 16px;
  letter-spacing: -0.01em;
}

.section {
  padding: 56px 0;
}

.split {
  display: grid;
  grid-template-columns: 1.2fr 0.8fr;
  gap: 22px;
  align-items: start;
}

h2 {
  margin: 0 0 10px;
  font-size: 30px;
  letter-spacing: -0.02em;
}

h3 {
  margin: 0 0 10px;
  font-size: 18px;
  letter-spacing: -0.01em;
}

p {
  margin: 0;
}

.lede {
  color: var(--muted);
  font-size: 18px;
  max-width: 65ch;
}

.panel {
  border-radius: var(--radius);
  border: 1px solid rgba(28, 27, 24, 0.12);
  background: var(--paper);
  box-shadow: var(--shadow);
  padding: 18px;
}

.list {
  margin: 12px 0 0;
  padding-left: 18px;
  color: var(--muted);
}

.list li {
  margin: 8px 0;
}

.section-head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 18px;
  flex-wrap: wrap;
  margin-bottom: 18px;
}

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

.stack {
  display: grid;
  gap: 14px;
}

.gallery {
  border-radius: var(--radius);
  border: 1px solid rgba(28, 27, 24, 0.12);
  background: var(--paper);
  box-shadow: var(--shadow);
  padding: 16px;
}

.gallery-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  flex-wrap: wrap;
  margin-bottom: 12px;
}

.gallery-note {
  color: var(--muted);
  font-size: 12px;
}

.gallery-controls {
  display: inline-flex;
  align-items: center;
  gap: 10px;
}

.icon-button {
  width: 44px;
  height: 44px;
  border-radius: 999px;
  border: 1px solid rgba(28, 27, 24, 0.12);
  background: rgba(255, 255, 255, 0.55);
  box-shadow: 0 10px 28px rgba(0, 0, 0, 0.06);
  color: var(--ink);
  font-size: 16px;
  cursor: pointer;
  transition: transform 160ms ease, box-shadow 160ms ease,
    background 160ms ease;
}

.icon-button:hover {
  transform: translateY(-1px);
  box-shadow: 0 16px 40px rgba(0, 0, 0, 0.09);
}

.icon-button:active {
  transform: translateY(0);
}

.icon-button:focus-visible {
  outline: 3px solid rgba(90, 168, 255, 0.55);
  outline-offset: 2px;
}

.carousel {
  overflow-x: auto;
  scroll-snap-type: x mandatory;
  -webkit-overflow-scrolling: touch;
  border-radius: var(--radius-sm);
  border: 1px solid rgba(28, 27, 24, 0.08);
  background: rgba(255, 255, 255, 0.4);
}

.carousel:focus-visible {
  outline: 3px solid rgba(90, 168, 255, 0.55);
  outline-offset: 3px;
}

.carousel-track {
  display: flex;
  gap: 14px;
  padding: 12px;
}

.carousel-slide {
  flex: 0 0 100%;
  scroll-snap-align: start;
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
}

.ba {
  margin: 0;
  border-radius: var(--radius-sm);
  border: 1px solid rgba(28, 27, 24, 0.12);
  background: rgba(255, 255, 255, 0.65);
  overflow: hidden;
}

.ba-image {
  width: 100%;
  height: auto;
  display: block;
}

.ba-cap {
  padding: 10px 12px;
  border-top: 1px solid rgba(28, 27, 24, 0.08);
  color: var(--muted);
  font-size: 12px;
}

.tile {
  border-radius: var(--radius);
  border: 1px solid rgba(28, 27, 24, 0.12);
  background: rgba(255, 255, 255, 0.5);
  box-shadow: 0 10px 35px rgba(0, 0, 0, 0.06);
  padding: 18px;
  transition: transform 180ms ease, box-shadow 180ms ease;
}

.tile:hover {
  transform: translateY(-2px);
  box-shadow: 0 18px 50px rgba(0, 0, 0, 0.09);
}

.tile p {
  color: var(--muted);
}

.cta {
  border-radius: var(--radius);
  border: 1px solid rgba(28, 27, 24, 0.12);
  background: linear-gradient(
    135deg,
    rgba(90, 168, 255, 0.18),
    rgba(255, 255, 255, 0.6) 52%,
    rgba(11, 45, 92, 0.1)
  );
  box-shadow: var(--shadow);
  padding: 18px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  flex-wrap: wrap;
}

.contact-form {
  margin: 14px 0 12px;
}

.form-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
}

.field {
  display: grid;
  gap: 6px;
}

.field label {
  color: var(--muted);
  font-size: 12px;
  font-family: "IBM Plex Mono", ui-monospace, SFMono-Regular, Menlo, Monaco,
    Consolas, "Liberation Mono", "Courier New", monospace;
}

.field input,
.field textarea {
  width: 100%;
  border-radius: 14px;
  border: 1px solid rgba(31, 35, 40, 0.14);
  background: rgba(255, 255, 255, 0.62);
  color: var(--ink);
  padding: 10px 12px;
  font-size: 15px;
  outline: none;
  transition: border-color 160ms ease, box-shadow 160ms ease,
    background 160ms ease;
}

.field textarea {
  resize: vertical;
  min-height: 120px;
}

.field input::placeholder,
.field textarea::placeholder {
  color: rgba(31, 35, 40, 0.45);
}

.field input:focus,
.field textarea:focus {
  background: rgba(255, 255, 255, 0.78);
  border-color: rgba(90, 168, 255, 0.7);
  box-shadow: 0 0 0 4px rgba(90, 168, 255, 0.22);
}

.field.span-2 {
  grid-column: 1 / -1;
}

.honeypot {
  position: absolute;
  left: -9999px;
  top: auto;
  width: 1px;
  height: 1px;
  overflow: hidden;
}

.form-actions {
  display: flex;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
  margin-top: 12px;
}

.form-help {
  margin: 0;
  font-size: 13px;
  max-width: 60ch;
}

.form-status {
  margin: 10px 0 0;
  font-size: 12px;
  color: var(--muted);
  min-height: 1.2em; /* prevent layout jump */
}

.site-footer {
  padding: 28px 0 46px;
}

.footer-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 16px;
  border-top: 1px solid var(--line);
  padding-top: 18px;
}

.footer-address {
  display: inline-flex;
  align-items: center;
}

.footer-credit-link {
  flex-basis: 100%;
  text-align: center;
  font-size: 12px;
  text-decoration: underline;
  text-decoration-thickness: 1px;
  text-underline-offset: 2px;
}

.footer-credit-link:hover {
  color: var(--ink);
}

.address-popup-trigger {
  margin: 0;
  padding: 0;
  border: 0;
  background: transparent;
  cursor: pointer;
  text-align: left;
  color: inherit;
}

.address-popup-trigger:focus-visible {
  outline: 3px solid rgba(90, 168, 255, 0.55);
  outline-offset: 3px;
  border-radius: 6px;
}

.footer-address-trigger {
  text-decoration: underline;
  text-decoration-thickness: 1px;
  text-underline-offset: 2px;
}

.footer-address-trigger:hover {
  color: var(--ink);
}

.top-address-trigger {
  text-decoration: underline;
  text-decoration-thickness: 1px;
  text-underline-offset: 2px;
}

.footer-maps-popup {
  width: min(360px, calc(100vw - 40px));
  padding: 10px;
  border-radius: 14px;
  border: 1px solid rgba(28, 27, 24, 0.14);
  background: var(--paper);
  box-shadow: var(--shadow);
  display: grid;
  gap: 4px;
}

.footer-maps-modal {
  position: fixed;
  inset: 0;
  z-index: 80;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
  background: rgba(7, 14, 30, 0.5);
  backdrop-filter: blur(2px);
}

.footer-maps-modal[hidden] {
  display: none !important;
}

.footer-maps-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 2px 2px 8px;
}

.footer-maps-title {
  margin: 0;
  font-size: 12px;
  color: var(--muted);
}

.footer-maps-close {
  width: 30px;
  height: 30px;
  border-radius: 999px;
  border: 1px solid rgba(28, 27, 24, 0.12);
  background: rgba(255, 255, 255, 0.6);
  color: var(--ink);
  line-height: 1;
  font-size: 18px;
  cursor: pointer;
}

.footer-maps-close:hover {
  background: rgba(90, 168, 255, 0.18);
}

.footer-maps-close:focus-visible {
  outline: 3px solid rgba(90, 168, 255, 0.55);
  outline-offset: 2px;
}

.footer-maps-popup a {
  display: block;
  padding: 8px 10px;
  border-radius: 10px;
  font-size: 13px;
  color: var(--ink);
}

.footer-maps-popup a:hover {
  background: rgba(90, 168, 255, 0.16);
}

.footer-maps-popup a:focus-visible {
  outline: 3px solid rgba(90, 168, 255, 0.55);
  outline-offset: 2px;
}

/* Reveal is JS-gated so content is never hidden when JS is disabled. */
.reveal {
  opacity: 1;
  transform: none;
}

.js .reveal {
  opacity: 0;
  transform: translateY(12px);
  transition: opacity 520ms cubic-bezier(0.2, 0.8, 0.2, 1),
    transform 520ms cubic-bezier(0.2, 0.8, 0.2, 1);
  will-change: opacity, transform;
}

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

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

  .js .bubbles {
    display: none;
  }

  .js .reveal {
    opacity: 1;
    transform: none;
    transition: none;
  }

  .button,
  .tile,
  .icon-button {
    transition: none;
  }
}

@media (max-width: 900px) {
  .js .bubbles {
    display: none;
  }

  .hero-card {
    grid-template-columns: 1fr;
  }

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

  .split {
    grid-template-columns: 1fr;
  }

  .carousel-slide {
    grid-template-columns: 1fr;
  }

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