/* ==========================================================================
   MyPool Services — bridge page
   Tokens, type ramp and component shapes mirror the main site's globals.css
   so this page reads as the same brand, not a lookalike.
   ========================================================================== */

/* --- self-hosted fonts (same families as the main site) ------------------- */

@font-face {
  font-family: 'Outfit';
  font-style: normal;
  font-weight: 100 900;
  font-display: swap;
  src: url('../fonts/outfit-latin.woff2') format('woff2');
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA,
                 U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122,
                 U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}
@font-face {
  font-family: 'Outfit';
  font-style: normal;
  font-weight: 100 900;
  font-display: swap;
  src: url('../fonts/outfit-latin-ext.woff2') format('woff2');
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF,
                 U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF,
                 U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF;
}
@font-face {
  font-family: 'Space Grotesk';
  font-style: normal;
  font-weight: 300 700;
  font-display: swap;
  src: url('../fonts/grotesk-latin.woff2') format('woff2');
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA,
                 U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122,
                 U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}
@font-face {
  font-family: 'Space Grotesk';
  font-style: normal;
  font-weight: 300 700;
  font-display: swap;
  src: url('../fonts/grotesk-latin-ext.woff2') format('woff2');
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF,
                 U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF,
                 U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF;
}

/* --- tokens (lifted from the main site's globals.css) --------------------- */

:root {
  --deep-blue: #061c47;
  --pool-blue: #2452f1;
  --glow-blue: #2563eb;
  --soft-blue: #f0f6ff;
  --text-dark: #0f172a;
  --text-muted: #64748b;
  --white: #ffffff;

  --border-subtle: rgba(6, 28, 71, .12);
  --border-strong: rgba(6, 28, 71, .2);

  --font-sans: 'Outfit', ui-sans-serif, system-ui, -apple-system, sans-serif;
  --font-display: 'Space Grotesk', 'Outfit', ui-sans-serif, system-ui, sans-serif;

  --ease: cubic-bezier(.16, 1, .3, 1);
}

/* --- reset ---------------------------------------------------------------- */

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

html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }

body {
  margin: 0;
  background: var(--soft-blue);
  color: var(--text-dark);
  font-family: var(--font-sans);
  font-size: 16px;
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
}

img { max-width: 100%; display: block; }
button { font: inherit; }

svg {
  width: 100%; height: 100%;
  fill: none; stroke: currentColor;
  stroke-width: 1.9; stroke-linecap: round; stroke-linejoin: round;
}

.skip {
  position: absolute; left: -9999px; top: 0; z-index: 50;
  background: var(--pool-blue); color: #fff;
  padding: .75rem 1.15rem; border-radius: 0 0 12px 0;
  text-decoration: none; font-weight: 700;
}
.skip:focus { left: 0; }

:focus-visible { outline: 2px solid var(--pool-blue); outline-offset: 3px; border-radius: 6px; }

/* The main site's display face: Space Grotesk with tight tracking. */
.display { font-family: var(--font-display); letter-spacing: -.045em; }

/* ==========================================================================
   Page + the one main card
   ========================================================================== */

.page {
  width: 100%;
  max-width: 84rem;
  margin-inline: auto;
  padding: clamp(1rem, 3vw, 2.75rem) clamp(1rem, 3vw, 2.5rem) 2rem;
}

.card {
  background: var(--white);
  border: 1px solid var(--border-subtle);
  border-radius: clamp(20px, 3vw, 32px);
  box-shadow: 0 24px 60px rgba(6, 28, 71, .09), 0 2px 6px rgba(6, 28, 71, .04);
  padding: clamp(1.5rem, 4vw, 3.5rem);
  overflow: hidden;
}

/* ==========================================================================
   Head — centred logo, headline, lead
   ========================================================================== */

/* Status chip sits on its own row, hard right against the card's inner edge.
   Its row is pulled up so it does not add height above the centred logo. */
.card__top {
  display: flex;
  justify-content: flex-end;
  margin-bottom: .25rem;
}

.head { text-align: center; max-width: 760px; margin-inline: auto; }

.head__logo { display: inline-block; }
.head__logo img {
  height: clamp(64px, 11vw, 104px);
  width: auto;
  margin-inline: auto;
}

.badge {
  display: inline-flex; align-items: center; gap: .5rem;
  padding: .4rem .9rem;
  border: 1px solid var(--border-subtle);
  border-radius: 999px;
  background: var(--soft-blue);
  color: var(--deep-blue);
  font-size: .72rem; font-weight: 700;
  letter-spacing: .14em; text-transform: uppercase;
}
.badge i {
  width: 7px; height: 7px; border-radius: 50%;
  background: var(--pool-blue);
  animation: pulse 2.4s ease-out infinite;
}
@keyframes pulse {
  0%   { box-shadow: 0 0 0 0 rgba(36, 82, 241, .55); }
  70%  { box-shadow: 0 0 0 8px rgba(36, 82, 241, 0); }
  100% { box-shadow: 0 0 0 0 rgba(36, 82, 241, 0); }
}

.head__h1 {
  margin: 1.4rem 0 0;
  font-size: clamp(2.1rem, 5.6vw, 3.9rem);
  line-height: 1.05;
  font-weight: 700;
  color: var(--deep-blue);
}
.head__h1 .accent { color: var(--pool-blue); }

.head__lead {
  margin: 1.1rem auto 0;
  max-width: 62ch;
  font-size: clamp(1rem, 1.5vw, 1.12rem);
  line-height: 1.75;
  color: var(--text-muted);
}

.head__cta {
  display: flex; flex-wrap: wrap; justify-content: center; gap: .7rem;
  margin-top: 1.8rem;
}

/* ==========================================================================
   Buttons
   ========================================================================== */

.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: .5rem;
  padding: .85rem 1.6rem;
  border: 1.5px solid transparent;
  border-radius: 12px;
  font-size: .93rem; font-weight: 700; letter-spacing: .01em;
  text-decoration: none; cursor: pointer;
  transition: transform .3s var(--ease), box-shadow .3s var(--ease),
              background .3s var(--ease), border-color .3s var(--ease), color .3s var(--ease);
}
.btn:hover { transform: translateY(-2px); }
.btn:active { transform: translateY(0); }

.btn--primary {
  background: linear-gradient(135deg, #2452f1 0%, #163db9 54%, #022474 100%);
  color: #fff;
  box-shadow: inset 0 1px 0 rgba(255,255,255,.18), 0 12px 28px rgba(0, 79, 229, .22);
}
.btn--primary:hover { box-shadow: inset 0 1px 0 rgba(255,255,255,.22), 0 18px 38px rgba(0, 79, 229, .3); }

.btn--outline {
  background: var(--white);
  border-color: var(--border-strong);
  color: var(--deep-blue);
}
.btn--outline:hover { border-color: var(--pool-blue); color: var(--pool-blue); }

.btn--full { width: 100%; margin-top: .35rem; }

.rnd {
  width: 40px; height: 40px; flex: none;
  display: grid; place-items: center;
  border-radius: 50%;
  border: 1.5px solid var(--border-subtle);
  background: var(--white);
  color: var(--deep-blue);
  cursor: pointer;
  transition: border-color .25s var(--ease), color .25s var(--ease),
              background .25s var(--ease);
}
.rnd svg { width: 18px; height: 18px; }
.rnd:hover:not([disabled]) { border-color: var(--pool-blue); color: var(--pool-blue); background: var(--soft-blue); }
.rnd[disabled] { opacity: .32; cursor: default; }

/* ==========================================================================
   Shared type
   ========================================================================== */

.eyebrow {
  margin: 0 0 .4rem;
  font-size: .7rem; font-weight: 800;
  letter-spacing: .18em; text-transform: uppercase;
  color: var(--pool-blue);
}

.h3 {
  margin: 0;
  font-size: clamp(1.3rem, 2.4vw, 1.7rem);
  line-height: 1.2; font-weight: 700;
  color: var(--deep-blue);
}

/* ==========================================================================
   City slider (seamless marquee)
   ========================================================================== */

/* Every section below the hero is a full-width stacked block, separated by a
   hairline rule rather than extra chrome. */
.block {
  margin-top: clamp(2.25rem, 5vw, 3.25rem);
  padding-top: clamp(1.75rem, 4vw, 2.5rem);
  border-top: 1px solid var(--border-subtle);
}

.block__head {
  display: flex; align-items: flex-end; justify-content: space-between;
  gap: 1rem; margin-bottom: 1.25rem;
}
.block__head--center { justify-content: center; text-align: center; }

.arrows { display: flex; gap: .5rem; flex: none; }

.marquee {
  position: relative;
  overflow: hidden;
  /* Fade the ends so chips enter and leave instead of being cut off. */
  -webkit-mask-image: linear-gradient(90deg, transparent, #000 8%, #000 92%, transparent);
  mask-image: linear-gradient(90deg, transparent, #000 8%, #000 92%, transparent);
}

.marquee__track {
  display: flex; width: max-content;
  animation: slide 34s linear infinite;
}
.marquee:hover .marquee__track,
.marquee:focus-within .marquee__track { animation-play-state: paused; }

/* JS clones the list once; -50% therefore lands exactly on the seam. */
@keyframes slide {
  from { transform: translate3d(0, 0, 0); }
  to   { transform: translate3d(-50%, 0, 0); }
}

.marquee__set {
  display: flex; gap: .6rem;
  list-style: none; margin: 0; padding: 0 .3rem;
}

.marquee__set li {
  flex: none;
  padding: .6rem 1.25rem;
  border: 1px solid var(--border-subtle);
  border-radius: 999px;
  background: var(--soft-blue);
  color: var(--deep-blue);
  font-size: .92rem; font-weight: 600;
  white-space: nowrap;
}

/* ==========================================================================
   Two columns: services | contact
   ========================================================================== */

/* The contact block is the ONLY two-column layout on the page:
   details on the left, form on the right. */
.cols { display: grid; gap: clamp(1.75rem, 4vw, 3rem); }

@media (min-width: 900px) {
  .cols { grid-template-columns: .82fr 1.18fr; align-items: start; }
}

.col { min-width: 0; }

/* --- services rail: 3 per view on desktop, 1 on phones ------------------- */

.srail {
  overflow-x: auto;
  scroll-snap-type: x mandatory;
  scrollbar-width: none;
  -webkit-overflow-scrolling: touch;
  margin-inline: -.35rem;
  padding: .35rem;
}
.srail::-webkit-scrollbar { display: none; }

.srail__in { display: flex; gap: .85rem; }

.svc {
  --per-view: 1;
  flex: none;
  scroll-snap-align: start;
  width: calc((100% - (var(--per-view) - 1) * .85rem) / var(--per-view));
  border: 1px solid var(--border-subtle);
  border-radius: 16px;
  background: var(--white);
  overflow: hidden;
  transition: border-color .3s var(--ease), box-shadow .3s var(--ease),
              transform .3s var(--ease);
}
.svc:hover {
  border-color: rgba(36, 82, 241, .38);
  box-shadow: 0 14px 30px rgba(6, 28, 71, .1);
  transform: translateY(-3px);
}

@media (min-width: 560px) { .svc { --per-view: 2; } }
@media (min-width: 1000px) { .svc { --per-view: 3; } }

.svc__img { aspect-ratio: 4 / 3; overflow: hidden; background: var(--soft-blue); }
.svc__img img { width: 100%; height: 100%; object-fit: cover; transition: transform .6s var(--ease); }
.svc:hover .svc__img img { transform: scale(1.06); }

.svc h3 {
  margin: .85rem .9rem .3rem;
  font-family: var(--font-display); letter-spacing: -.03em;
  font-size: 1.02rem; font-weight: 700; color: var(--deep-blue);
}
.svc p {
  margin: 0 .9rem 1rem;
  font-size: .84rem; line-height: 1.6; color: var(--text-muted);
}

.dots { display: flex; justify-content: center; gap: .4rem; margin-top: 1rem; }
.dots button {
  width: 22px; height: 4px; padding: 0;
  border: 0; border-radius: 999px;
  background: var(--border-strong);
  cursor: pointer;
  transition: background .3s var(--ease), width .3s var(--ease);
}
.dots button[aria-selected="true"] { background: var(--pool-blue); width: 34px; }

/* ==========================================================================
   Contact column — details sit above the form
   ========================================================================== */

.details {
  list-style: none; margin: 1.35rem 0 0; padding: 1.25rem;
  display: grid; gap: 1rem;
  border: 1px solid var(--border-subtle);
  border-radius: 16px;
  background: var(--soft-blue);
}
.details li { display: flex; gap: .85rem; align-items: flex-start; }

.details__txt { min-width: 0; font-size: .95rem; }
.details__txt b {
  display: block;
  font-size: .68rem; font-weight: 800;
  letter-spacing: .13em; text-transform: uppercase;
  color: var(--text-muted);
}
.details__txt a { color: var(--deep-blue); font-weight: 600; text-decoration: none; }
.details__txt a:hover { color: var(--pool-blue); text-decoration: underline; }
.details__txt .plain { color: var(--deep-blue); font-weight: 600; }

.ic {
  flex: none; width: 38px; height: 38px;
  display: grid; place-items: center;
  border-radius: 11px;
  background: var(--white);
  border: 1px solid var(--border-subtle);
  color: var(--pool-blue);
}
.ic svg { width: 17px; height: 17px; }

/* --- form ---------------------------------------------------------------- */

.g2 { display: grid; gap: 0 .85rem; }
@media (min-width: 520px) { .g2 { grid-template-columns: 1fr 1fr; } }

.field { margin-bottom: .9rem; }

.field label {
  display: block; margin-bottom: .38rem;
  font-size: .875rem; font-weight: 500;
  color: var(--deep-blue);
}

/* Matches the main site's input recipe: rounded-xl, deep-blue/15 border,
   white fill, px-4 py-3, pool-blue focus ring. */
.field input,
.field select,
.field textarea {
  width: 100%;
  padding: .75rem 1rem;
  border: 1px solid var(--border-subtle);
  border-radius: 12px;
  background: var(--white);
  color: var(--deep-blue);
  font: inherit; font-size: .9rem;
  outline: none;
  transition: border-color .2s var(--ease), box-shadow .2s var(--ease);
}
.field textarea { resize: vertical; min-height: 104px; line-height: 1.6; }

.field input::placeholder,
.field textarea::placeholder { color: rgba(100, 116, 139, .6); }

.field input:focus,
.field select:focus,
.field textarea:focus {
  border-color: var(--pool-blue);
  box-shadow: 0 0 0 3px rgba(36, 82, 241, .18);
}

.field select {
  appearance: none; -webkit-appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%232452f1' stroke-width='2.2' stroke-linecap='round'%3E%3Cpath d='M6 9l6 6 6-6'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 1rem center;
  background-size: 16px;
  padding-right: 2.7rem;
}

/* ==========================================================================
   Icon listbox (progressive enhancement over the native <select>)
   ========================================================================== */

/* The native control stays in the DOM for FormData and the no-JS path, but
   is removed from view. Not display:none — some browsers skip validation and
   value reads on fully hidden controls. */
.lb__native {
  position: absolute !important;
  width: 1px; height: 1px; margin: -1px; padding: 0; border: 0;
  overflow: hidden; clip: rect(0 0 0 0); clip-path: inset(50%); white-space: nowrap;
}

.lb { position: relative; }

.lb__trigger {
  width: 100%;
  display: flex; align-items: center; justify-content: space-between; gap: .6rem;
  padding: .75rem 1rem;
  border: 1px solid var(--border-subtle);
  border-radius: 12px;
  background: var(--white);
  color: var(--deep-blue);
  font: inherit; font-size: .9rem;
  text-align: left; cursor: pointer;
  transition: border-color .2s var(--ease), box-shadow .2s var(--ease);
}
.lb__trigger:hover { border-color: rgba(36, 82, 241, .4); }
.lb__trigger:focus-visible,
.lb.is-open .lb__trigger {
  outline: none;
  border-color: var(--pool-blue);
  box-shadow: 0 0 0 3px rgba(36, 82, 241, .18);
}

.lb__value { display: flex; align-items: center; gap: .6rem; min-width: 0; }
.lb__value > span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.lb__placeholder { color: rgba(100, 116, 139, .75); }

.lb__icon { width: 18px; height: 18px; flex: none; color: var(--pool-blue); }

.lb__chev {
  width: 17px; height: 17px; flex: none;
  color: var(--pool-blue);
  transition: transform .25s var(--ease);
}
.lb.is-open .lb__chev { transform: rotate(180deg); }

.lb__popup {
  position: absolute; z-index: 20;
  top: calc(100% + .4rem); left: 0; right: 0;
  margin: 0; padding: .35rem;
  list-style: none;
  max-height: 17rem; overflow-y: auto;
  border: 1px solid var(--border-subtle);
  border-radius: 14px;
  background: var(--white);
  box-shadow: 0 18px 40px rgba(6, 28, 71, .16), 0 2px 6px rgba(6, 28, 71, .06);
  animation: lbIn .18s var(--ease);
}
@keyframes lbIn {
  from { opacity: 0; transform: translateY(-6px); }
  to   { opacity: 1; transform: none; }
}

.lb__option {
  display: flex; align-items: center; gap: .65rem;
  padding: .62rem .7rem;
  border-radius: 10px;
  font-size: .9rem; color: var(--deep-blue);
  cursor: pointer;
}
.lb__option > span { flex: 1 1 auto; min-width: 0; }
.lb__option.is-active { background: var(--soft-blue); }
.lb__option.is-selected { font-weight: 600; }

.lb__check {
  width: 16px; height: 16px; flex: none;
  color: var(--pool-blue);
  opacity: 0;
  transition: opacity .18s var(--ease);
}
.lb__option.is-selected .lb__check { opacity: 1; }

.field.is-bad .lb__trigger { border-color: #dc2626; }

.field.is-bad input,
.field.is-bad select,
.field.is-bad textarea { border-color: #dc2626; }

.err { display: block; margin-top: .3rem; font-size: .78rem; color: #dc2626; }

.hp {
  position: absolute !important;
  width: 1px; height: 1px; margin: -1px; padding: 0; border: 0;
  overflow: hidden; clip: rect(0 0 0 0); clip-path: inset(50%); white-space: nowrap;
}

.legal { margin: .85rem 0 0; font-size: .78rem; line-height: 1.6; color: var(--text-muted); }

.spin {
  display: none;
  width: 15px; height: 15px;
  border: 2px solid rgba(255,255,255,.4);
  border-top-color: #fff; border-radius: 50%;
  animation: spin .7s linear infinite;
}
@keyframes spin { to { transform: rotate(360deg); } }

.btn.is-busy { pointer-events: none; opacity: .85; }
.btn.is-busy .spin { display: block; }

.status {
  margin-top: .9rem;
  max-height: 0; padding: 0; overflow: hidden;
  border-radius: 12px;
  font-size: .88rem; line-height: 1.6;
  transition: max-height .4s var(--ease), padding .4s var(--ease);
}
.status.is-on { max-height: 320px; padding: .85rem 1.05rem; }
.status.is-ok  { background: #ecfdf5; border: 1px solid #a7f3d0; color: #065f46; }
.status.is-bad { background: #fef2f2; border: 1px solid #fecaca; color: #991b1b; }

/* ==========================================================================
   Footer
   ========================================================================== */

.foot {
  display: flex; flex-wrap: wrap; justify-content: space-between;
  align-items: center; gap: .5rem 1.5rem;
  padding: 1.5rem clamp(.25rem, 2vw, 1rem) 0;
  font-size: .82rem; color: var(--text-muted);
}
.foot p { margin: 0; }
.foot .credit a { color: var(--pool-blue); font-weight: 700; text-decoration: none; }
.foot .credit a:hover { text-decoration: underline; }

@media (max-width: 560px) { .foot { justify-content: center; text-align: center; } }

/* ==========================================================================
   Motion preferences
   ========================================================================== */

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after {
    animation-duration: .001ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: .001ms !important;
  }
  /* A paused marquee would hide most of the cities, so let it scroll manually. */
  .marquee { overflow-x: auto; }
  .marquee__track { animation: none; }
}
