/* =============================================================================
   WipZen design system — PAGE COMPOSITIONS
   Layouts that exist once or twice. Anything reused three times belongs in
   components.css instead.
   ========================================================================== */

/* ============================================================== 1. HERO === */

.hero {
  position: relative;
  padding-block: clamp(64px, 9vw, 120px) 0;
  text-align: center;
  overflow: hidden;
}

/* A faint concentric backdrop, drawn with gradients so there is no image to
   load and nothing to go stale at high DPI. */
.hero::before {
  content: "";
  position: absolute;
  inset: -20% -10% auto;
  height: 720px;
  z-index: 0;
  background:
    radial-gradient(closest-side, rgba(8, 145, 178, .10), transparent 70%) 50% 30% / 900px 620px no-repeat,
    radial-gradient(closest-side, rgba(8, 145, 178, .06), transparent 70%) 18% 55% / 620px 480px no-repeat,
    radial-gradient(closest-side, rgba(13, 148, 136, .06), transparent 70%) 84% 48% / 560px 440px no-repeat;
  pointer-events: none;
}

.hero > .container { position: relative; z-index: 1; }

.hero__title { margin-top: 24px; }

.hero__lead {
  max-width: 62ch;
  margin: 24px auto 0;
}

.hero__actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: center;
  gap: 12px;
  margin-top: 36px;
}

.hero__trust {
  margin-top: 20px;
  font-size: 13px;
  color: var(--body-subtle);
}

/* Compact hero for the interior pages. */
.hero--page {
  padding-block: clamp(56px, 7vw, 88px) clamp(40px, 5vw, 64px);
  text-align: left;
}

.hero--page::before { height: 460px; opacity: .8; }
.hero--page .hero__lead { margin-inline: 0; }
.hero--page .hero__actions { justify-content: flex-start; }

/* The button row reused outside a hero, where it needs no leading gap. */
.hero__actions--start {
  justify-content: flex-start;
  margin-top: 0;
}

/* ==================================================== 2. DASHBOARD MOCK === */
/* A product screenshot built entirely from CSS and inline SVG. */

.mock {
  position: relative;
  z-index: 1;
  margin-top: 64px;
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--r-xl);
  box-shadow: var(--elevation-2);
  overflow: hidden;
  text-align: left;
}

.mock__bar {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 14px 20px;
  border-bottom: 1px solid var(--border);
  background: var(--card-soft);
}

.mock__search {
  flex: 1;
  max-width: 320px;
  padding: 7px 12px;
  border: 1px solid var(--border);
  border-radius: var(--r-md);
  background: var(--card);
  font-size: 12px;
  color: var(--fg-disabled);
}

.mock__bar-right {
  margin-left: auto;
  display: flex;
  align-items: center;
  gap: 12px;
}

.mock__body {
  display: grid;
  grid-template-columns: 200px minmax(0, 1fr);
}

.mock__side {
  border-right: 1px solid var(--border);
  padding: 20px 16px;
  background: var(--card-soft);
}

.mock__side-label {
  font-family: var(--font-mono);
  font-size: 10px;
  letter-spacing: .08em;
  text-transform: uppercase;
  color: var(--body-subtle);
  padding-inline: 8px;
  margin-bottom: 12px;
}

.mock__nav li {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 9px 8px;
  border-radius: var(--r-md);
  font-size: 13px;
  color: var(--body);
}

.mock__nav li svg { width: 14px; height: 14px; color: var(--body-subtle); }

.mock__nav li.is-active {
  background: var(--brand-softer);
  color: var(--fg-brand-strong);
  font-weight: 500;
}

.mock__nav li.is-active svg { color: var(--brand); }

.mock__nav .count {
  margin-left: auto;
  font-family: var(--font-mono);
  font-size: 11px;
  color: var(--body-subtle);
}

.mock__main { padding: 24px; }

.mock__head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 20px;
}

.mock__head h3 { font-size: 17px; }
.mock__head p { font-size: 13px; color: var(--body-subtle); margin-top: 2px; }

.mock__tiles {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px;
  margin-bottom: 16px;
}

.mock__tile {
  padding: 14px 16px;
  border: 1px solid var(--border);
  border-radius: var(--r-lg);
}

.mock__tile-label {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  font-size: 12px;
  color: var(--body-subtle);
}

.mock__tile-value {
  margin-top: 8px;
  font-family: var(--font-mono);
  font-size: 22px;
  letter-spacing: -.02em;
  color: var(--heading);
}

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

.mock__panel {
  padding: 16px;
  border: 1px solid var(--border);
  border-radius: var(--r-lg);
}

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

.mock__panel-head h4 { font-size: 13px; }

.mock__legend {
  display: flex;
  gap: 12px;
  font-size: 11px;
  color: var(--body-subtle);
}

.mock__legend i {
  display: inline-block;
  width: 6px;
  height: 6px;
  margin-right: 5px;
  border-radius: var(--r-full);
  vertical-align: middle;
}

.dot--brand  { background: var(--brand); }
.dot--danger { background: var(--danger); }

/* A second panel stacked under the two-column row. */
.mock__panel--stacked { margin-top: 12px; }

.mock__chart { width: 100%; height: auto; display: block; }

.mock__list li {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 9px 0;
  font-size: 12px;
  border-bottom: 1px solid var(--border-subtle);
}

.mock__list li:last-child { border-bottom: 0; }
.mock__list .who { color: var(--heading); font-weight: 500; }
.mock__list .when { margin-left: auto; font-family: var(--font-mono); font-size: 11px; color: var(--body-subtle); }

.mock__pops {
  display: grid;
  gap: 8px;
}

.mock__pop {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 12px;
  color: var(--body);
}

.mock__pop .dot {
  width: 6px;
  height: 6px;
  border-radius: var(--r-full);
  background: var(--success);
  flex-shrink: 0;
}

.mock__pop .ms {
  margin-left: auto;
  font-family: var(--font-mono);
  font-size: 11px;
  color: var(--body-subtle);
}

@media (max-width: 1080px) {
  .mock__body { grid-template-columns: minmax(0, 1fr); }
  .mock__side { display: none; }
}

@media (max-width: 760px) {
  .mock__tiles { grid-template-columns: minmax(0, 1fr); }
  .mock__cols  { grid-template-columns: minmax(0, 1fr); }
}

@media (max-width: 560px) {
  .mock__search { display: none; }
}

/* =========================================================== 3. PRICING === */

.plans {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 24px;
  align-items: start;
}

@media (max-width: 1080px) {
  .plans { grid-template-columns: minmax(0, 1fr); max-width: 560px; margin-inline: auto; }
}

.plan-note {
  display: flex;
  align-items: center;
  gap: 8px;
  justify-content: center;
  margin-top: 32px;
  font-size: 14px;
  color: var(--body-subtle);
}

.plan-note svg { width: 16px; height: 16px; color: var(--brand); }
.plan-note--tight { margin-top: 20px; }
.plan-note__text { margin-left: 4px; }

/* =============================================================== 4. CTA === */

.cta-band {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--r-xl);
  box-shadow: var(--elevation-1);
  padding: clamp(32px, 5vw, 56px);
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
}

.cta-band h2 { font-size: clamp(26px, 3vw, 32px); }
.cta-band p { margin-top: 10px; color: var(--body); max-width: 52ch; }

.cta-band__actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
}

/* ============================================================= 5. STEPS === */

.steps { counter-reset: step; }

.steps li {
  position: relative;
  display: flex;
  gap: 16px;
  padding-bottom: 32px;
}

.steps li:last-child { padding-bottom: 0; }

/* The connector line between step markers. */
.steps li:not(:last-child)::before {
  content: "";
  position: absolute;
  left: 15px;
  top: 36px;
  bottom: 4px;
  width: 1px;
  background: var(--border-medium);
}

.steps__marker {
  counter-increment: step;
  display: grid;
  place-items: center;
  width: 32px;
  height: 32px;
  flex-shrink: 0;
  border-radius: var(--r-full);
  background: var(--brand-softer);
  border: 1px solid var(--brand-soft);
  color: var(--fg-brand-strong);
  font-family: var(--font-mono);
  font-size: 13px;
  z-index: 1;
}

.steps__marker::before { content: counter(step); }
.steps h3 { margin-bottom: 6px; }
.steps p { font-size: 15px; }

/* ============================================================= 6. LEGAL === */

.legal {
  display: grid;
  grid-template-columns: 240px minmax(0, 1fr);
  gap: clamp(32px, 6vw, 80px);
  padding-bottom: var(--section-y);
}

.legal__meta {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 24px;
  margin-top: 20px;
  font-size: 14px;
  color: var(--body-subtle);
}

.legal__meta span { display: inline-flex; align-items: center; gap: 6px; }
.legal__meta svg { width: 14px; height: 14px; }

/* The mobile "On this page" disclosure replaces the sticky rail. */
.legal__toc-mobile { display: none; }

@media (max-width: 1080px) {
  .legal { grid-template-columns: minmax(0, 1fr); }
  .legal__toc-desktop { display: none; }

  .legal__toc-mobile {
    display: block;
    margin-bottom: 32px;
    border: 1px solid var(--border);
    border-radius: var(--r-lg);
    background: var(--card);
    box-shadow: var(--elevation-1);
    overflow: hidden;
  }

  .legal__toc-mobile summary {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 16px 20px;
    cursor: pointer;
    list-style: none;
    font-size: 14px;
    font-weight: 600;
    color: var(--heading);
  }

  .legal__toc-mobile summary::-webkit-details-marker { display: none; }
  .legal__toc-mobile summary svg { width: 16px; height: 16px; color: var(--body-subtle); margin-left: auto; }
  .legal__toc-mobile[open] summary svg { transform: rotate(180deg); }
  .legal__toc-mobile .toc { position: static; padding: 0 12px 16px; }
  .legal__toc-mobile .toc__title { display: none; }
}

/* ========================================================== 7. CONTACT === */

.contact {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1.15fr);
  gap: clamp(24px, 4vw, 48px);
  align-items: stretch;
}

.contact__details { align-self: center; }

.contact__address {
  font-style: normal;
  font-size: 16px;
  line-height: 1.8;
  color: var(--body);
}

.contact__address strong { display: block; }

.contact__links { margin-top: 28px; }

.contact__links li + li { margin-top: 12px; }

.contact__links a {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: 15px;
}

.contact__links svg {
  width: 16px;
  height: 16px;
  flex-shrink: 0;
  color: var(--brand);
}

/* The Google Maps embed. A fixed ratio rather than a fixed height, so the frame
   keeps its shape from a phone to a wide desktop. */
/* width:100% keeps the width authoritative and lets aspect-ratio derive the
   height. A min-height here would work the other way round and inflate the
   width past its column on a narrow screen. */
.map {
  position: relative;
  width: 100%;
  aspect-ratio: 16 / 11;
  overflow: hidden;
  border: 1px solid var(--border);
  border-radius: var(--r-xl);
  box-shadow: var(--elevation-1);
  background: var(--control-fill);
}

/* An iframe does not always honour an ancestor's overflow clip, so round the
   frame itself as well as the box around it. */
.map iframe {
  display: block;
  width: 100%;
  height: 100%;
  border: 0;
  border-radius: inherit;
}

@media (max-width: 860px) {
  .contact { grid-template-columns: minmax(0, 1fr); }
  .map { aspect-ratio: 4 / 3; }
}

/* ============================================================ 8. ABOUT === */

.timeline { position: relative; }

.timeline li {
  position: relative;
  padding-left: 32px;
  padding-bottom: 32px;
}

.timeline li:last-child { padding-bottom: 0; }

.timeline li::before {
  content: "";
  position: absolute;
  left: 0;
  top: 7px;
  width: 9px;
  height: 9px;
  border-radius: var(--r-full);
  background: var(--brand);
  box-shadow: 0 0 0 4px var(--brand-softer);
}

.timeline li:not(:last-child)::after {
  content: "";
  position: absolute;
  left: 4px;
  top: 22px;
  bottom: 0;
  width: 1px;
  background: var(--border-medium);
}

.timeline__year {
  font-family: var(--font-mono);
  font-size: 12px;
  letter-spacing: .06em;
  color: var(--fg-brand-strong);
  margin-bottom: 6px;
}

.timeline h3 { margin-bottom: 6px; }
.timeline p { font-size: 15px; }

.person {
  display: flex;
  align-items: center;
  gap: 14px;
}

.person__name { font-size: 15px; font-weight: 600; color: var(--heading); }
.person__role { font-size: 13px; color: var(--body-subtle); margin-top: 2px; }

/* The point-of-presence list on the About page. */
.pops {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(190px, 1fr));
  gap: 1px;
  background: var(--border);
  border: 1px solid var(--border);
  border-radius: var(--r-lg);
  overflow: hidden;
}

.pops li {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 14px 16px;
  background: var(--card);
  font-size: 14px;
  color: var(--heading);
}

.pops .dot {
  width: 6px;
  height: 6px;
  flex-shrink: 0;
  border-radius: var(--r-full);
  background: var(--success);
}

.pops .code {
  margin-left: auto;
  font-family: var(--font-mono);
  font-size: 11px;
  color: var(--body-subtle);
}
