/* Atlas Swimming Pool — Direction C (dark room) design system */
:root {
  --bg: #050F18;
  --bg-alt: #081627;
  --bg-deep: #030A12;
  --surface: #0D1F30;
  --surface-2: #11283B;
  --ink: #F2F7F8;
  --muted: #8CA3AE;
  --muted-2: #6B818C;
  --accent: #00D3DE;
  --accent-ink: #06202E;
  --navy: #0B3D62;
  --line: rgba(242,247,248,0.09);
  --radius: 0px;
  --maxw: 1240px;
}
* { box-sizing: border-box; margin: 0; padding: 0; }
body {
  background: var(--bg);
  color: var(--ink);
  font-family: 'IBM Plex Sans Arabic', sans-serif;
  line-height: 1.6;
  overflow-x: hidden;
}
.lat, .mono { font-family: 'Archivo', sans-serif; }
img, svg { display: block; max-width: 100%; }
a { color: inherit; }
ul { list-style: none; }
button { font: inherit; color: inherit; background: none; border: 0; cursor: pointer; }
input, select, textarea { font: inherit; color: inherit; }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
.wrap { max-width: var(--maxw); margin-inline: auto; padding-inline: 24px; }
@media (max-width: 760px) { .wrap { padding-inline: 18px; } }

.visually-hidden {
  position: absolute; width: 1px; height: 1px; overflow: hidden;
  clip: rect(0,0,0,0); white-space: nowrap; border: 0; padding: 0; margin: -1px;
}
.skip-link {
  position: absolute; z-index: 100; top: -60px; inset-inline-start: 12px;
  background: var(--accent); color: var(--accent-ink); padding: 10px 18px;
  font-weight: 600; font-size: 14px; transition: top .15s ease;
}
.skip-link:focus { top: 12px; }

/* ---------- type scale ---------- */
h1, h2, h3 { font-weight: 300; line-height: 1.2; }
.eyebrow-free { } /* no eyebrows per house rules — headings carry the meaning */
.section-head { max-width: 760px; margin-bottom: 56px; }
.section-head.center { margin-inline: auto; text-align: center; }
.section-head h1, .section-head h2 { font-size: clamp(28px, 3.4vw, 44px); margin-bottom: 14px; }
.section-head p { color: var(--muted); font-size: 17px; max-width: 60ch; }
section { padding: 100px 0; }
@media (max-width: 760px) { section { padding: 64px 0; } }

/* ---------- buttons ---------- */
.btn-primary, .btn-secondary, .btn-ghost {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  font-weight: 600; font-size: 16px; padding: 15px 28px; text-decoration: none;
  min-height: 48px; border: 0; cursor: pointer;
}
.btn-primary { background: var(--accent); color: var(--accent-ink); }
.btn-primary:hover { background: #22DDE6; }
.btn-secondary {
  color: var(--ink); background: transparent; border-bottom: 1px solid var(--muted);
  padding-inline: 0; border-radius: 0;
}
.btn-ghost {
  color: var(--ink); border: 1px solid rgba(242,247,248,0.3); background: transparent;
}
.btn-ghost:hover { border-color: var(--accent); }

/* ---------- top nav ---------- */
.site-nav {
  position: fixed; inset-inline: 0; top: 0; z-index: 60;
  display: flex; align-items: center; justify-content: space-between;
  padding: 18px 24px;
  background: linear-gradient(to bottom, rgba(3,10,18,0.78), transparent);
  pointer-events: none;
}
.site-nav.is-scrolled { background: rgba(3,10,18,0.92); backdrop-filter: none; pointer-events: auto; }
.site-nav > * { pointer-events: auto; }
.nav-brand { display: flex; align-items: center; }
.nav-brand img { height: 48px; width: auto; }
@media (max-width: 560px) {
  .nav-brand img { height: 40px; }
}
.nav-links { display: flex; align-items: center; gap: 30px; }
.nav-links a { text-decoration: none; font-size: 15px; font-weight: 500; }
.nav-links a:hover { color: var(--accent); }
.nav-right { display: flex; align-items: center; gap: 14px; }
.lang-link {
  font-family: 'Archivo'; font-size: 13px; font-weight: 700; letter-spacing: .04em;
  border: 1px solid rgba(242,247,248,0.35); padding: 8px 14px; text-decoration: none;
}
.nav-cta {
  font-size: 14px; font-weight: 600; background: var(--accent); color: var(--accent-ink);
  padding: 10px 18px; text-decoration: none;
}
.nav-burger { display: none; flex-direction: column; width: 44px; height: 44px; align-items: center; justify-content: center; border: 1px solid rgba(242,247,248,0.3); }
.nav-burger span, .nav-burger::before, .nav-burger::after { content:''; display:block; width:18px; height:1.5px; background:var(--ink); }
.nav-burger span { margin: 4px 0; }
@media (max-width: 900px) {
  .nav-links { display: none; }
  .nav-burger { display: flex; }
}
@media (max-width: 560px) {
  .nav-cta { display: none; }
}
.mobile-menu {
  position: fixed; inset: 0; z-index: 70; background: var(--bg-deep);
  display: none; flex-direction: column; padding: 90px 28px 40px;
}
.mobile-menu.is-open { display: flex; }
.mobile-menu a { display: block; font-size: 24px; font-weight: 300; padding: 14px 0; text-decoration: none; border-bottom: 1px solid var(--line); }
.mobile-menu-close { position: absolute; top: 18px; inset-inline-end: 18px; width: 44px; height: 44px; border: 1px solid rgba(242,247,248,0.3); display:flex; align-items:center; justify-content:center; }

/* ---------- stats ---------- */
#stats { background: var(--bg-alt); padding: 80px 0; }
.stats-grid { display: grid; grid-template-columns: repeat(4, minmax(0,1fr)); gap: 32px; }
@media (max-width: 760px) { .stats-grid { grid-template-columns: 1fr 1fr; gap: 28px 20px; } }
.stat { text-align: center; }
.stat b { display: block; font-family: 'Archivo'; font-weight: 700; font-size: clamp(32px, 4.2vw, 52px); color: var(--ink); }
.stat span { display: block; margin-top: 6px; color: var(--muted); font-size: 14px; }

/* ---------- underwater layers (from journey.css, shared tokens) + real photo ---------- */
.uw-grid { display: grid; grid-template-columns: minmax(0,1fr) minmax(0,1.1fr); gap: 56px; align-items: center; max-width: 1060px; margin-inline: auto; }
@media (max-width: 900px) { .uw-grid { grid-template-columns: 1fr; } }
.uw-photo { position: relative; }
.uw-photo img { width: 100%; height: auto; object-fit: cover; aspect-ratio: 4/5; }
.uw-photo figcaption { margin-top: 14px; color: var(--muted); font-size: 14px; line-height: 1.6; }
.cross-section { max-width: none; margin: 0; }
.uw-closing { max-width: 1060px; margin: 40px auto 0; text-align: center; color: var(--ink); font-size: 16px; border-top: 1px solid var(--line); padding-top: 32px; }

/* ---------- client-type paths ---------- */
#paths { background: var(--bg); }
.paths-grid { display: grid; grid-template-columns: repeat(4, minmax(0,1fr)); gap: 2px; background: var(--line); }
@media (max-width: 900px) { .paths-grid { grid-template-columns: 1fr 1fr; } }
@media (max-width: 560px) { .paths-grid { grid-template-columns: 1fr; } }
.path-card {
  background: var(--bg); padding: 40px 28px; min-height: 260px;
  display: flex; flex-direction: column; justify-content: space-between;
  text-decoration: none; color: var(--ink);
  transition: background .25s ease;
}
.path-card:hover { background: var(--surface); }
.path-card h3 { font-size: 22px; font-weight: 400; margin-bottom: 12px; }
.path-card p { color: var(--muted); font-size: 15px; line-height: 1.6; }
.path-card .arrow { margin-top: 20px; font-family:'Archivo'; font-size: 14px; color: var(--accent); }

/* ---------- services ---------- */
#services { background: var(--bg-alt); }
.services-list { display: grid; grid-template-columns: repeat(3, minmax(0,1fr)); gap: 2px; background: var(--line); }
@media (max-width: 900px) { .services-list { grid-template-columns: 1fr 1fr; } }
@media (max-width: 560px) { .services-list { grid-template-columns: 1fr; } }
.service-item { background: var(--bg-alt); padding: 34px 26px; }
.service-item h3 { font-size: 19px; font-weight: 500; margin-bottom: 10px; }
.service-item p { color: var(--muted); font-size: 14.5px; line-height: 1.65; }

/* ---------- process timeline ---------- */
#process { background: var(--bg); }
.timeline { max-width: 760px; margin-inline: auto; position: relative; }
.timeline::before {
  content: ''; position: absolute; top: 0; bottom: 0; inset-inline-start: 19px; width: 1px;
  background: var(--line);
}
.tl-step { position: relative; padding-inline-start: 56px; padding-block: 22px; opacity: 0; transform: translateY(16px); transition: opacity .5s ease, transform .5s ease; }
html[dir="rtl"] .tl-step { padding-inline-start: 56px; padding-inline-end: 0; }
.tl-step.is-visible { opacity: 1; transform: translateY(0); }
.tl-step::before {
  content: ''; position: absolute; inset-inline-start: 12px; top: 28px; width: 15px; height: 15px;
  background: var(--bg); border: 2px solid var(--muted-2);
}
.tl-step.is-visible::before { border-color: var(--accent); }
.tl-step h3 { font-size: 20px; font-weight: 500; margin-bottom: 6px; }
.tl-step p { color: var(--muted); font-size: 15px; max-width: 56ch; }

/* ---------- projects (our work) ---------- */
#projects { background: var(--bg-alt); }
.filter-chips { display: flex; flex-wrap: wrap; gap: 10px; margin-bottom: 40px; }
.filter-chip {
  font-size: 14px; font-weight: 500; padding: 9px 18px;
  border: 1px solid rgba(242,247,248,0.25); background: transparent; color: var(--ink);
}
.filter-chip[aria-pressed="true"] { background: var(--accent); color: var(--accent-ink); border-color: var(--accent); }
.project-grid { display: grid; grid-template-columns: repeat(2, minmax(0,1fr)); gap: 2px; background: var(--line); }
@media (max-width: 760px) { .project-grid { grid-template-columns: 1fr; } }
.project-card {
  background: var(--bg-alt); text-decoration: none; color: var(--ink); display: block;
}
.project-card .thumb { aspect-ratio: 4/3; overflow: hidden; }
.project-card .thumb img { width: 100%; height: 100%; object-fit: cover; transition: transform .5s ease; }
.project-card:hover .thumb img { transform: scale(1.04); }
.project-card .pc-body { padding: 22px 24px 28px; }
.project-card h3 { font-size: 19px; font-weight: 500; margin-bottom: 8px; }
.project-card .tags { display: flex; gap: 8px; flex-wrap: wrap; margin-bottom: 10px; }
.project-card .tag { font-size: 12.5px; color: var(--accent); font-family: 'Archivo'; }
.project-card p { color: var(--muted); font-size: 14.5px; line-height: 1.6; }
.project-card[hidden] { display: none; }

/* ---------- before/after slider ----------
   Not currently used on the page (the two photos in a pair were shot from different
   positions, so they never read as a real comparison — see #stages below for the
   replacement). Kept here, working, for when matched same-angle photo pairs exist. */
.ba-tabs, .stages-tabs { display: flex; gap: 10px; margin-bottom: 28px; justify-content: center; }
.ba-tab, .stage-tab { font-size: 14px; padding: 8px 16px; border: 1px solid rgba(242,247,248,0.25); background: transparent; color: var(--ink); }
.ba-tab[aria-pressed="true"], .stage-tab[aria-pressed="true"] { background: var(--accent); color: var(--accent-ink); border-color: var(--accent); }
.ba-slider {
  position: relative; max-width: 920px; margin-inline: auto; aspect-ratio: 4/3; overflow: hidden;
  touch-action: none; user-select: none;
}
.ba-slider img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.ba-slider .ba-after-wrap { position: absolute; inset: 0; width: 50%; overflow: hidden; }
.ba-slider .ba-after-wrap img { width: var(--ba-img-w, 920px); max-width: none; }
.ba-handle {
  position: absolute; top: 0; bottom: 0; inset-inline-start: 50%; width: 2px; background: var(--accent);
  transform: translateX(-1px); cursor: ew-resize;
}
.ba-handle button {
  position: absolute; top: 50%; inset-inline-start: 50%; transform: translate(-50%,-50%);
  width: 48px; height: 48px; border: 2px solid var(--accent); background: var(--bg-deep);
  display: flex; align-items: center; justify-content: center; color: var(--accent);
  cursor: ew-resize;
}
.ba-label { position: absolute; top: 14px; font-family:'Archivo'; font-size: 12px; letter-spacing: .06em; background: rgba(3,10,18,0.6); padding: 5px 10px; }
.ba-label.before { inset-inline-end: 14px; }
.ba-label.after { inset-inline-start: 14px; }

/* ---------- stages: "from steel to water" ---------- */
#stages { background: var(--bg); }
.stages-row { display: flex; gap: 16px; }
.stages-row[hidden] { display: none; }
.stage-item { flex: 1; min-width: 0; display: flex; flex-direction: column; align-items: center; }
.stage-photo {
  position: relative; width: 100%; aspect-ratio: 4/3; overflow: hidden;
  padding: 0; margin: 0; border: 0; background: none; display: block; cursor: zoom-in;
}
.stage-photo img { width: 100%; height: 100%; object-fit: cover; transition: transform .4s ease; }
.stage-photo:hover img { transform: scale(1.03); }
.stage-photo:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; }
.stage-node { position: relative; width: 100%; height: 22px; margin-top: 14px; }
.stage-node::before {
  content: ''; position: absolute; top: 50%; inset-inline-start: 50%; transform: translate(-50%,-50%);
  width: 8px; height: 8px; border-radius: 50%; background: var(--accent);
}
.stage-item:not(:last-child) .stage-node::after {
  content: ''; position: absolute; top: 50%; inset-inline-start: 50%; width: 100%; height: 1px;
  background: var(--line); transform: translateY(-50%);
}
.stage-label { margin-top: 12px; font-size: 15.5px; font-weight: 500; color: var(--ink); text-align: center; }
.stages-counter { display: none; text-align: center; margin-top: 18px; color: var(--muted); font-family: 'Archivo'; font-size: 13px; letter-spacing: .04em; }
@media (max-width: 760px) {
  .stages-row { overflow-x: auto; scroll-snap-type: x mandatory; gap: 0; scrollbar-width: none; -webkit-overflow-scrolling: touch; }
  .stages-row::-webkit-scrollbar { display: none; }
  .stage-item { flex: 0 0 100%; scroll-snap-align: center; padding-inline: 4px; }
  .stage-label { font-size: 14px; }
  .stages-counter { display: block; }
}

/* ---------- stage photo lightbox ---------- */
.lightbox { position: fixed; inset: 0; z-index: 95; display: flex; align-items: center; justify-content: center; padding: 24px; }
.lightbox[hidden] { display: none; }
.lightbox-backdrop { position: absolute; inset: 0; background: rgba(3,10,18,.92); border: 0; cursor: default; }
.lightbox-content { position: relative; max-width: min(1100px, 92vw); max-height: 88vh; display: flex; flex-direction: column; align-items: center; }
.lightbox-img { max-width: 100%; max-height: 78vh; width: auto; height: auto; object-fit: contain; }
.lightbox-caption { margin-top: 14px; color: var(--ink); font-size: 15px; text-align: center; }
.lightbox-close {
  position: absolute; top: 12px; inset-inline-end: 12px; width: 40px; height: 40px; border-radius: 50%;
  border: 0; background: rgba(3,10,18,.7); color: var(--ink); display: flex; align-items: center;
  justify-content: center; cursor: pointer; font-size: 20px; line-height: 1;
}
.lightbox-close:hover, .lightbox-close:focus-visible { background: var(--accent); color: var(--accent-ink); }

/* ---------- calculator section wrapper ---------- */
#calculator { background: var(--bg-alt); }
.calc-frame { background: var(--surface); }

/* ---------- team ---------- */
#team { background: var(--bg); }
.team-media { position: relative; max-width: 1100px; margin-inline: auto; aspect-ratio: 16/9; overflow: hidden; }
.team-media img, .team-media video { width: 100%; height: 100%; object-fit: cover; }

/* ---------- FAQ ---------- */
#faq { background: var(--bg-alt); }
.faq-list { max-width: 820px; margin-inline: auto; }
.faq-item { border-bottom: 1px solid var(--line); }
.faq-item summary {
  display: flex; align-items: center; justify-content: space-between; gap: 16px;
  padding: 22px 0; font-size: 18px; font-weight: 500; cursor: pointer; list-style: none;
}
.faq-item summary::-webkit-details-marker { display: none; }
.faq-item .chev { width: 11px; height: 11px; border-inline-end: 2px solid var(--muted); border-block-end: 2px solid var(--muted); transform: rotate(45deg); transition: transform .2s ease; flex-shrink: 0; }
.faq-item[open] .chev { transform: rotate(-135deg); }
.faq-item p { padding-bottom: 22px; color: var(--muted); font-size: 15px; line-height: 1.7; max-width: 68ch; }

/* ---------- quote CTA band ---------- */
#quote-band {
  background: var(--navy); text-align: center; padding: 90px 24px;
}
#quote-band h2 { font-size: clamp(26px, 3.4vw, 40px); margin-bottom: 16px; }
#quote-band p { color: #C9DCE6; margin-bottom: 28px; max-width: 56ch; margin-inline: auto; }

/* ---------- footer ---------- */
footer.site-footer { background: var(--bg-deep); padding: 70px 0 110px; }
.footer-grid { display: grid; grid-template-columns: 1.4fr 1fr 1fr 1fr; gap: 40px; margin-bottom: 60px; }
@media (max-width: 760px) { .footer-grid { grid-template-columns: 1fr 1fr; gap: 32px 20px; } }
.footer-brand img { height: 28px; margin-bottom: 16px; }
.footer-brand p { color: var(--muted); font-size: 14px; max-width: 32ch; line-height: 1.7; }
.footer-social { display: flex; gap: 12px; margin-top: 18px; }
.footer-social a {
  width: 36px; height: 36px; display: flex; align-items: center; justify-content: center;
  border: 1px solid rgba(242,247,248,0.2); color: var(--muted);
}
.footer-social a:hover { color: var(--accent); border-color: var(--accent); }
.footer-social svg { width: 17px; height: 17px; }
.footer-col h4 { font-size: 14px; font-weight: 600; margin-bottom: 16px; color: var(--muted); }
.footer-col a, .footer-col p { display: block; font-size: 14.5px; color: var(--ink); text-decoration: none; margin-bottom: 10px; line-height: 1.5; }
.footer-col a:hover { color: var(--accent); }
.phone-num { white-space: nowrap; }
.footer-bottom { border-top: 1px solid var(--line); padding-top: 24px; display: flex; justify-content: space-between; flex-wrap: wrap; gap: 12px; color: var(--muted-2); font-size: 13px; }

/* ---------- floating WhatsApp + quote panel ---------- */
/* Brand-styled WhatsApp button (owner's choice over the stock green square): a 52px navy circle
   with a thin aqua ring and the white glyph. */
.wa-fab {
  position: fixed; bottom: 24px; inset-inline-end: 24px; z-index: 55;
  width: 52px; height: 52px; border-radius: 50%;
  background: var(--navy); color: #fff;
  border: 1.5px solid var(--accent);
  display: flex; align-items: center; justify-content: center;
  text-decoration: none; box-shadow: 0 6px 18px rgba(0,0,0,0.35);
  transition: opacity .2s ease, background-color .2s ease;
}
.wa-fab svg { width: 26px; height: 26px; display: block; }
.wa-fab:hover, .wa-fab:focus-visible { background: #155480; }
.wa-fab:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; }
@media (max-width: 760px) { .wa-fab { bottom: 18px; inset-inline-end: 18px; } }
/* The wizard's own Back/Next row shares this same screen-bottom corner at mobile widths —
   hidden (not removed) while #calculator is in view so it never sits on top of those
   buttons; site.js toggles this via IntersectionObserver. */
.wa-fab.wa-fab-hidden { opacity: 0; pointer-events: none; }

.quote-trigger {
  position: fixed; bottom: 24px; inset-inline-start: 24px; z-index: 55;
  background: var(--accent); color: var(--accent-ink); font-weight: 600; font-size: 14px;
  padding: 14px 22px; text-decoration: none; display: none;
}
@media (min-width: 761px) { .quote-trigger { display: inline-flex; align-items: center; } }

@media (prefers-reduced-motion: reduce) {
  .tl-step, .uw-layer, .project-card .thumb img { transition: none !important; }
}
