/* eZephyr v2 — /services/ visual prototype (Milestone 3A).
 * "The city in blocks": Mumbai rebuilt from flat geometric shapes in colours
 * sampled from the original artwork, with editorial Francois One typography
 * and the logo's yellow highlighter as the signature accent.
 * Uses css/prototype/tokens.css. Scoped to .svc so nothing leaks into other pages.
 */

.page-services { background: var(--ez-sky-light); }
.svc { display: flow-root; background: var(--ez-paper); color: var(--ez-ink); }

/* ---------- SVG fills and strokes from the tokens ---------- */
.f-yellow { fill: var(--ez-yellow); }
.f-ink { fill: var(--ez-ink); }
.f-ink-soft { fill: var(--ez-ink-soft); }
.f-paper { fill: var(--ez-paper); }
.f-sky { fill: var(--ez-sky); }
.f-sky-mid { fill: var(--ez-sky-mid); }
.f-sky-light { fill: var(--ez-sky-light); }
.f-red { fill: var(--ez-red); }
.f-bus-green { fill: var(--ez-bus-green); }
.f-sea { fill: var(--ez-sea); }
.f-sea-light { fill: var(--ez-sea-light); }
.f-lilac { fill: var(--ez-lilac); }
.f-green { fill: var(--ez-green); }
.f-stone { fill: var(--ez-stone); }
.f-stone-grey { fill: var(--ez-stone-grey); }
.f-road { fill: var(--ez-road); }
.f-road-light { fill: var(--ez-road-light); }
.f-taxi { fill: var(--ez-taxi); }
.s-ink { stroke: var(--ez-ink); }
.s-ink-soft { stroke: var(--ez-ink-soft); }
.s-red { stroke: var(--ez-red); }
.s-yellow { stroke: var(--ez-yellow); }

/* ---------- Buttons and links ---------- */
.ez-btn {
  display: inline-flex;
  align-items: center;
  gap: 0.5em;
  min-height: 50px;
  padding: 0.55em 1.25em;
  border: 2px solid var(--ez-ink);
  border-radius: 4px;
  font-family: var(--ez-font-display);
  font-size: 1.125rem;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  text-decoration: none;
  transition: transform 0.2s var(--ez-ease-out), box-shadow 0.2s var(--ez-ease-out);
}
.ez-btn--ink { background: var(--ez-ink); color: var(--ez-yellow); box-shadow: 0 4px 0 var(--ez-yellow), 0 4px 0 2px var(--ez-ink); }
.ez-btn:hover { transform: translateY(-3px); box-shadow: 0 7px 0 var(--ez-yellow), 0 7px 0 2px var(--ez-ink); }
.ez-btn:active { transform: translateY(1px); box-shadow: 0 2px 0 var(--ez-yellow), 0 2px 0 2px var(--ez-ink); }

.ez-link {
  display: inline-flex;
  align-items: center;
  gap: 0.4em;
  min-height: 44px;
  font-family: var(--ez-font-display);
  font-size: 1.0625rem;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  color: var(--ez-ink);
  text-decoration: underline;
  text-decoration-color: var(--ez-yellow);
  text-decoration-thickness: 4px;
  text-underline-offset: 6px;
}
.ez-link:hover { text-decoration-color: var(--ez-ink); }

/* ================= Hero ================= */
.svc-hero {
  position: relative;
  overflow: hidden;
  background: var(--ez-sky-light);
}
.svc-hero__inner {
  position: relative;
  z-index: 2;
  width: min(100% - 2 * var(--ez-gutter), var(--ez-max));
  margin-inline: auto;
  padding-top: clamp(20px, 3.5vw, 44px);
}
.svc-hero__title {
  margin-top: clamp(20px, 3vw, 36px);
  font-family: var(--ez-font-display);
  font-weight: 400;
  color: var(--ez-ink);
}
.svc-hero__eyebrow {
  display: block;
  width: fit-content;
  margin-bottom: clamp(12px, 1.6vw, 20px);
  padding: 5px 12px 4px;
  background: var(--ez-ink);
  color: var(--ez-yellow);
  font-size: 0.9375rem;
  letter-spacing: 0.16em;
  text-transform: uppercase;
}
.svc-hero__line {
  display: block;
  font-size: var(--ez-text-hero);
  line-height: 0.92;
  letter-spacing: 0.005em;
  text-transform: uppercase;
}
.svc-hero__word { display: inline-block; }

/* The logo's yellow highlighter, drawn behind a key word. */
.hl { position: relative; z-index: 0; white-space: nowrap; }
.hl::before {
  content: '';
  position: absolute;
  left: -0.05em;
  right: -0.07em;
  bottom: 0.24em;
  height: 0.34em;
  background: var(--ez-yellow);
  z-index: -1;
  transform-origin: left center;
}

.svc-hero__lead {
  max-width: 30rem;
  margin-top: clamp(16px, 2vw, 26px);
  font-size: var(--ez-text-lead);
  line-height: 1.45;
}
.svc-hero__actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 14px 28px;
  margin-top: clamp(20px, 2.6vw, 30px);
}

.svc-skyline { position: relative; z-index: 1; margin-top: clamp(28px, 5vw, 48px); }
.svc-skyline svg {
  display: block;
  width: 100%;
  height: clamp(220px, 56vw, 360px); /* narrow screens: crop the sides, keep the landmarks */
}
@media (min-width: 1024px) {
  /* The lead and actions sit beside the low-rise end of the city; landmarks rise to their right. */
  .svc-hero__lead { max-width: min(30rem, 36vw); }
  .svc-skyline { margin-top: max(-11vw, -190px); }
  .svc-skyline svg { height: auto; aspect-ratio: 1440 / 440; }
}

/* ================= Local-train ticker ================= */
.svc-train {
  overflow: hidden;
  background: var(--ez-lilac);
  border-block: 6px solid var(--ez-ink);
}
.svc-train__track { display: flex; width: max-content; }
.svc-train__cars { display: flex; }
.svc-train__cars li {
  display: flex;
  align-items: center;
  padding: 14px 0 14px 28px;
  font-family: var(--ez-font-display);
  font-size: clamp(1.0625rem, 1.6vw, 1.375rem);
  letter-spacing: 0.06em;
  text-transform: uppercase;
  white-space: nowrap;
  color: var(--ez-ink);
}
/* Each name ends in a carriage window. */
.svc-train__cars li::after {
  content: '';
  width: 14px;
  height: 14px;
  margin-left: 28px;
  border: 3px solid var(--ez-ink);
  border-radius: 2px;
  background: var(--ez-yellow);
}

/* ================= Six services ================= */
.svc-list {
  width: min(100% - 2 * var(--ez-gutter), var(--ez-max));
  margin: clamp(56px, 8vw, 112px) auto clamp(56px, 8vw, 104px);
  scroll-margin-top: calc(var(--header-h) + 16px);
}
.svc-list__head {
  display: grid;
  gap: 16px 48px;
  margin-bottom: clamp(28px, 4vw, 52px);
}
.svc-list__title {
  font-family: var(--ez-font-display);
  font-weight: 400;
  font-size: var(--ez-text-h2);
  line-height: 0.95;
  text-transform: uppercase;
}
.svc-list__title-alt { display: block; color: var(--ez-ink); }
@supports (-webkit-text-stroke: 2px black) {
  .svc-list__title-alt { color: transparent; -webkit-text-stroke: 2px var(--ez-ink); }
}
.svc-list__intro { max-width: 26ch; font-size: var(--ez-text-lead); line-height: 1.4; }
@media (min-width: 1024px) {
  .svc-list__head { grid-template-columns: 1.5fr 1fr; align-items: end; }
  .svc-list__intro { justify-self: end; }
}

.svc-grid { display: grid; gap: var(--ez-gap); }

.svc-block {
  --fg: var(--ez-ink);
  position: relative;
  display: flex;
  flex-direction: column;
  min-height: 270px;
  --icon-top: clamp(18px, 2.4vw, 32px);
  --icon: clamp(80px, 8.5vw, 116px);
  padding: clamp(22px, 2.8vw, 38px);
  /* The illustration sits in the top corner; the words always start below it. */
  padding-top: calc(var(--icon-top) + var(--icon) + 14px);
  border-radius: var(--ez-radius);
  overflow: hidden;
  color: var(--fg);
}
.svc-block--branding { background: var(--ez-yellow); }
.svc-block--social { background: var(--ez-sky); }
.svc-block--performance { --fg: #fff; background: var(--ez-red); }
.svc-block--web { --fg: #fff; background: var(--ez-sea); }
.svc-block--commerce { background: var(--ez-lilac); }
.svc-block--seo { --fg: #fff; background: var(--ez-road); }

.svc-block__title {
  max-width: 13ch;
  margin: auto 0 0;
  padding-top: 0;
  font-family: var(--ez-font-display);
  font-weight: 400;
  font-size: var(--ez-text-h3);
  line-height: 1;
  text-transform: uppercase;
}
.svc-block__text { max-width: 34ch; margin-top: 12px; font-size: 1.0625rem; line-height: 1.45; }
/* Each block opens its service page. The title is the link (its accessible name); its ::after
   stretches over the whole block so the block is the click target. Looks unchanged; keyboard
   focus rings the whole block (outside it, as the block clips its own overflow). */
.svc-block__link { color: inherit; text-decoration: none; }
.svc-block__link::after { content: ''; position: absolute; inset: 0; z-index: 1; }
.svc-block__link:focus-visible { outline-color: currentColor; }
.svc-block:has(.svc-block__link:focus-visible) { outline: 3px solid var(--ez-ink); outline-offset: 3px; }
.svc-block:has(.svc-block__link:focus-visible) .svc-block__link:focus-visible { outline: none; }
@media (hover: hover) {
  .svc-block__link:hover { text-decoration: underline; text-decoration-thickness: 3px; text-underline-offset: 5px; }
  .svc-block:hover .svc-block__link { text-decoration: underline; text-decoration-thickness: 3px; text-underline-offset: 5px; }
}

.svc-icon {
  position: absolute;
  top: var(--icon-top);
  right: var(--icon-top);
  width: var(--icon);
  height: auto;
  overflow: visible;
}

/* SEO & maintenance runs along the bottom like a road, lane markings and all. */
.svc-block--seo { padding-bottom: clamp(56px, 6vw, 76px); }
.svc-block--seo::after {
  content: '';
  position: absolute;
  left: 0;
  right: 0;
  bottom: clamp(20px, 2.4vw, 28px);
  border-top: 4px dashed var(--ez-yellow);
}

/* Groups: CREATE and GROW, three services each, then the smaller SUPPORT band. Phones: one column.
   Tablet: the group's first service across the top, two beneath. Desktop: three in a row. */
@media (min-width: 640px) {
  .svc-grid { grid-template-columns: repeat(2, 1fr); }
  .svc-grid > :first-child { grid-column: 1 / -1; }
}
@media (min-width: 1024px) {
  .svc-grid { grid-template-columns: repeat(3, 1fr); }
  .svc-grid > :first-child { grid-column: auto; }
  .svc-block { --icon: clamp(72px, 7vw, 96px); min-height: 0; }
}

.svc-group { margin-top: clamp(28px, 3.4vw, 44px); }
.svc-group__head { display: flex; flex-wrap: wrap; align-items: baseline; gap: 4px 18px; margin-bottom: clamp(12px, 1.4vw, 16px); }
.svc-group__title {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  gap: 4px 14px;
  font-family: var(--ez-font-display);
  font-weight: 400;
  font-size: clamp(1.5rem, 2.2vw, 2rem);
  line-height: 1;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}
/* A small yellow kerb-stone ahead of each group name. */
.svc-group__title::before {
  content: '';
  align-self: center;
  width: 26px;
  height: 12px;
  border: 2px solid var(--ez-ink);
  border-radius: 2px;
  background: var(--ez-yellow);
}
.svc-group__text { font-size: 1.0625rem; line-height: 1.4; color: var(--ez-ink-soft); }
.svc-group__sub { font-size: 0.6em; letter-spacing: 0.08em; color: var(--ez-ink-soft); }

/* SUPPORT: two quieter cards, outlined rather than filled; each opens its section of /support/. */
.svc-support__list { display: grid; gap: var(--ez-gap); }
@media (min-width: 760px) { .svc-support__list { grid-template-columns: repeat(2, 1fr); } }
.svc-mini {
  display: flex;
  align-items: flex-start;
  gap: 16px;
  padding: clamp(16px, 2vw, 24px);
  border: 2px solid var(--ez-ink);
  border-radius: var(--ez-radius);
  background: #fff;
}
.svc-mini__icon { flex: none; width: 52px; height: 52px; }
.svc-mini__title { margin: 0; font-family: var(--ez-font-display); font-weight: 400; font-size: 1.25rem; line-height: 1.1; text-transform: uppercase; }
.svc-mini__text { max-width: 52ch; margin-top: 6px; font-size: 1rem; line-height: 1.45; }
/* As on the primary cards: the title is the link and its ::after makes the whole card the target. */
.svc-mini { position: relative; transition: transform 0.25s var(--ez-ease-out), box-shadow 0.25s var(--ez-ease-out); }
.svc-mini__link { color: inherit; text-decoration: none; }
.svc-mini__link::after { content: ""; position: absolute; inset: 0; z-index: 1; }
.svc-mini:has(.svc-mini__link:focus-visible) { outline: 3px solid var(--ez-ink); outline-offset: 3px; }
.svc-mini__link:focus-visible { outline: none; }
@media (hover: hover) {
  .svc-mini:hover .svc-mini__link { text-decoration: underline; text-decoration-thickness: 3px; text-underline-offset: 5px; }
}
@media (hover: hover) and (prefers-reduced-motion: no-preference) {
  .svc-mini:hover { transform: translateY(-3px); box-shadow: 0 5px 0 var(--ez-ink); }
}

/* ================= Enquiry ================= */
.svc-cta {
  width: min(100% - 2 * var(--ez-gutter), var(--ez-max));
  margin: 0 auto clamp(64px, 9vw, 120px);
}
.svc-cta__card {
  position: relative;
  display: grid;
  gap: 28px;
  align-items: center;
  padding: clamp(28px, 5vw, 64px);
  border-radius: var(--ez-radius);
  overflow: hidden;
  background: var(--ez-yellow);
}
.svc-cta__title {
  max-width: 12ch;
  font-family: var(--ez-font-display);
  font-weight: 400;
  font-size: var(--ez-text-h2);
  line-height: 0.95;
  text-transform: uppercase;
}
.svc-cta__text { margin: 14px 0 26px; font-size: var(--ez-text-lead); }
.svc-cta__taxi { width: min(70%, 360px); height: auto; overflow: visible; justify-self: end; }
@media (min-width: 900px) {
  .svc-cta__card { grid-template-columns: 1.3fr 1fr; }
  .svc-cta__taxi { width: min(100%, 360px); }
}
.nowrap { white-space: nowrap; }

/* ================= Motion ================= */
.svc-motion-toggle {
  position: absolute;
  right: var(--ez-gutter);
  bottom: clamp(8px, 1.2vw, 14px);
  z-index: 3;
  min-height: 32px;
  padding: 4px 12px;
  border: 2px solid var(--ez-ink);
  border-radius: 999px;
  background: var(--ez-paper);
  color: var(--ez-ink);
  font: 600 0.875rem/1 var(--ez-font-body);
  cursor: pointer;
}
.svc-motion-toggle[hidden] { display: none; }

@media (prefers-reduced-motion: no-preference) {
  html { scroll-behavior: smooth; }

  /* Hero entrance (load) */
  .svc-hero__eyebrow { animation: ez-rise 0.6s var(--ez-ease-out) both; }
  .svc-hero__word { animation: ez-rise 0.8s var(--ez-ease-out) both 0.08s; }
  .svc-hero__word + .svc-hero__word { animation-delay: 0.18s; }
  .hl::before { animation: ez-wipe 0.55s var(--ez-ease-out) both 0.75s; }
  .svc-hero__lead { animation: ez-rise 0.8s var(--ez-ease-out) both 0.32s; }
  .svc-hero__actions { animation: ez-rise 0.8s var(--ez-ease-out) both 0.42s; }
  .sk-layer { animation: ez-rise-sm 1s var(--ez-ease-out) both; }
  .sk-layer--far { animation-delay: 0.15s; }
  .sk-layer--mid { animation-delay: 0.3s; }
  .sk-layer--front { animation-delay: 0.45s; }

  /* City life (loops; paused off-screen or by the visitor) */
  .sk-taxi { animation: ez-drive-right 17s linear infinite; }
  .sk-bus { animation: ez-drive-left 29s linear infinite -11s; }
  .sk-waves { animation: ez-waves 3.2s linear infinite; }
  .sk-lit { animation: ez-twinkle 3.6s ease-in-out infinite alternate var(--d, 0s); }
  .svc-train__track { animation: ez-train 78s linear infinite; } /* same speed as before: 55s × 1.42 (longer list, 8 services) */

  /* Reveal on scroll: js/prototype/services.js marks below-the-fold items as pending. */
  [data-reveal].is-pending { opacity: 0; transform: translateY(36px); }
  [data-reveal].is-revealed {
    transition: opacity var(--ez-dur) var(--ez-ease-out), transform var(--ez-dur) var(--ez-ease-out);
    transition-delay: calc(var(--i, 0) * 70ms);
  }
  .svc-cta__card.is-revealed .svc-cta__car { animation: ez-drive-in 1.1s var(--ez-ease-out) both 0.25s; }

  /* Hover: each block's motif comes alive. */
  .svc-icon__spark, .svc-icon__bubble, .svc-icon__arrow, .svc-icon__bag, .svc-icon__awning, .svc-cta__car {
    transform-box: fill-box;
    transition: transform 0.45s var(--ez-ease-out);
  }
  .svc-icon__spark { transform-origin: center; }
  .svc-icon__bubble { transform-origin: 20% 100%; }
  .svc-icon__awning { transform-origin: center top; }
  .svc-icon__windows rect { transition: fill 0.25s ease; }
  .svc-icon__windows rect:nth-child(2) { transition-delay: 0.05s; }
  .svc-icon__windows rect:nth-child(3) { transition-delay: 0.1s; }
  .svc-icon__windows rect:nth-child(4) { transition-delay: 0.15s; }
  .svc-icon__windows rect:nth-child(5) { transition-delay: 0.2s; }
  .svc-icon__windows rect:nth-child(6) { transition-delay: 0.25s; }
  .svc-icon__beam { transform-box: view-box; transform-origin: 66px 36px; }
}

.svc-icon__windows rect { fill: var(--ez-sea-light); }
.svc-icon__beam { opacity: 0.9; }

@media (hover: hover) and (prefers-reduced-motion: no-preference) {
  .svc-block:hover .svc-icon__spark { transform: rotate(90deg) scale(1.2); }
  .svc-block:hover .svc-icon__bubble { transform: translateY(-6px) scale(1.08); }
  .svc-block:hover .svc-icon__arrow { transform: translate(6px, -6px); }
  .svc-block:hover .svc-icon__windows rect { fill: var(--ez-yellow); }
  .svc-block:hover .svc-icon__awning { animation: ez-flap 0.7s var(--ez-ease-out); }
  .svc-block:hover .svc-icon__bag { transform: translateY(-6px); }
  .svc-block:hover .svc-icon__beam { animation: ez-sweep 1.4s ease-in-out infinite alternate; }
  .svc-cta__card:hover .svc-cta__car { transform: translateX(10px); }
}

/* Paused: off-screen (saves work) or the visitor pressed "Pause animation". */
[data-loop].is-paused,
[data-loop].is-paused *,
.svc.is-motion-paused [data-loop],
.svc.is-motion-paused [data-loop] * { animation-play-state: paused !important; }

@media (prefers-reduced-motion: reduce) {
  .svc *, .svc *::before, .svc *::after { animation: none !important; transition: none !important; }
  .ez-btn:hover, .ez-btn:active { transform: none; }
  /* Static ticker: every name visible, wrapped. */
  .svc-train__track { width: auto; flex-wrap: wrap; justify-content: center; }
  .svc-train__cars { flex-wrap: wrap; justify-content: center; }
  .svc-train__cars + .svc-train__cars { display: none; }
}

/* Vehicles' resting places when nothing moves. */
.sk-taxi { transform: translateX(380px); }
.sk-bus { transform: translateX(1010px); }

@keyframes ez-rise { from { opacity: 0; transform: translateY(28px); } }
@keyframes ez-rise-sm { from { opacity: 0; transform: translateY(24px); } }
@keyframes ez-wipe { from { transform: scaleX(0); } }
@keyframes ez-drive-right { from { transform: translateX(-120px); } to { transform: translateX(1540px); } }
@keyframes ez-drive-left { from { transform: translateX(1560px); } to { transform: translateX(-160px); } }
@keyframes ez-waves { from { transform: translateX(-40px); } to { transform: translateX(0); } }
@keyframes ez-twinkle { from { opacity: 1; } to { opacity: 0.2; } }
@keyframes ez-train { to { transform: translateX(-50%); } }
@keyframes ez-drive-in { from { transform: translateX(-300px); } }
@keyframes ez-flap { 0% { transform: scaleY(1); } 35% { transform: scaleY(0.82); } 70% { transform: scaleY(1.06); } 100% { transform: scaleY(1); } }
@keyframes ez-sweep { from { transform: rotate(-14deg); } to { transform: rotate(10deg); } }
