/* ============================================================
   IMPERIAL GAS — Mitchells Plain, Cape Town
   Editorial / gallery layout. Architectural grotesk at scale,
   a hairline index grid, kinetic type, and colour-blocked fire.
   ============================================================ */

:root {
  /* colour ------------------------------------------------- */
  --black: oklch(13% 0.008 55);
  --black-2: oklch(17% 0.010 52);
  --ink: oklch(97% 0.004 80);
  --ink-dim: oklch(72% 0.02 60);
  --ink-faint: oklch(63% 0.02 55);
  --line: oklch(100% 0 0 / 0.14);
  --line-soft: oklch(100% 0 0 / 0.08);
  --flame: oklch(72% 0.185 47);       /* the orange */
  --flame-hot: oklch(82% 0.155 68);
  --flame-deep: oklch(55% 0.205 30);
  --on-flame: oklch(15% 0.03 45);     /* near-black on orange */
  --on-flame-dim: oklch(30% 0.05 45);
  --wa: #25d366;

  --bg: var(--black);
  --fg: var(--ink);

  /* type --------------------------------------------------- */
  --font: "Archivo", "Helvetica Neue", Arial, system-ui, sans-serif;
  --wide: 118;   /* font-stretch % for display */
  --t-mega: clamp(3rem, 12vw, 6rem);
  --t-h2: clamp(2.1rem, 6.2vw, 3.6rem);
  --t-h3: clamp(1.5rem, 3.2vw, 2.1rem);
  --t-index: clamp(1.7rem, 5vw, 3rem);
  --t-lead: clamp(1.15rem, 1.7vw, 1.4rem);
  --t-marquee: clamp(2.2rem, 7vw, 4.5rem);

  /* space -------------------------------------------------- */
  --s-1: 0.25rem; --s-2: 0.5rem; --s-3: 0.75rem; --s-4: 1rem;
  --s-5: 1.25rem; --s-6: 1.5rem; --s-8: 2rem; --s-10: 2.5rem;
  --s-12: 3rem; --s-16: 4rem; --s-20: 5rem; --s-24: 6rem;
  --section: clamp(4.5rem, 10vw, 9rem);
  --gutter: clamp(1.25rem, 4vw, 3rem);

  --radius: 0.25rem;
  --pill: 100vmax;
  --wrap: 84rem;

  --z-menu: 80;
  --z-nav: 70;
  --z-fab: 60;

  --ease: cubic-bezier(0.22, 1, 0.36, 1);
  --ease-io: cubic-bezier(0.16, 1, 0.3, 1);
}

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

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

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

body {
  margin: 0;
  background: var(--bg);
  color: var(--fg);
  font-family: var(--font);
  font-size: 1.0625rem;
  font-weight: 400;
  line-height: 1.6;
  font-stretch: 100%;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  overflow-x: hidden;
}

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

h1, h2, h3, h4 { margin: 0; font-weight: 700; line-height: 1; }

p { margin: 0; text-wrap: pretty; }
a { color: inherit; text-decoration: none; }
ul, ol { margin: 0; padding: 0; list-style: none; }

::selection { background: var(--flame); color: var(--on-flame); }

:focus-visible {
  outline: 2px solid var(--flame);
  outline-offset: 3px;
}

/* display type helper */
.display {
  font-weight: 800;
  font-stretch: 118%;
  letter-spacing: -0.02em;
  line-height: 0.92;
  text-transform: uppercase;
  text-wrap: balance;
}

.wrap {
  width: 100%;
  max-width: var(--wrap);
  margin-inline: auto;
  padding-inline: var(--gutter);
}

.skip-link {
  position: absolute; left: -200vw; top: 0; z-index: 200;
  background: var(--flame); color: var(--on-flame);
  padding: var(--s-3) var(--s-6); font-weight: 700;
}
.skip-link:focus-visible { left: 0; }

/* ---------- meta bar ---------- */

.metabar {
  display: flex;
  justify-content: space-between;
  gap: var(--s-4);
  padding: 0.5rem var(--gutter);
  font-size: 0.72rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--ink-faint);
  border-bottom: 1px solid var(--line-soft);
}
.metabar a:hover { color: var(--flame); }
@media (max-width: 40rem) { .metabar span.hide-s { display: none; } }

/* ---------- nav ---------- */

.nav {
  position: sticky; top: 0; z-index: var(--z-nav);
  background: color-mix(in oklab, var(--black) 82%, transparent);
  backdrop-filter: blur(16px) saturate(1.3);
  border-bottom: 1px solid transparent;
  transition: border-color 240ms ease, background 240ms ease;
}
.nav.is-stuck { border-bottom-color: var(--line); }

.nav-inner {
  display: flex; align-items: center; justify-content: space-between;
  gap: var(--s-6);
  padding: var(--s-4) var(--gutter);
}

.brand {
  display: inline-flex; align-items: center; gap: 0.6rem;
  font-weight: 800; font-stretch: 118%;
  font-size: 1.15rem; letter-spacing: 0.02em; text-transform: uppercase;
  white-space: nowrap;
}
.brand .flamemark { width: 22px; height: auto; flex: none; }
.brand em { font-style: normal; color: var(--flame); }

.nav-links { display: flex; align-items: center; gap: clamp(1rem, 2.5vw, 2.25rem); }
.nav-links a {
  font-size: 0.9rem; font-weight: 600; letter-spacing: 0.02em;
  color: var(--ink-dim); position: relative; padding-block: 0.3rem;
  transition: color 180ms ease;
}
.nav-links a::after {
  content: ""; position: absolute; left: 0; bottom: 0; width: 100%;
  height: 1px; background: var(--flame); transform: scaleX(0);
  transform-origin: left; transition: transform 260ms var(--ease);
}
.nav-links a:hover { color: var(--ink); }
.nav-links a:hover::after,
.nav-links a[aria-current="page"]::after { transform: scaleX(1); }
.nav-links a[aria-current="page"] { color: var(--ink); }

.nav-order {
  display: inline-flex; align-items: center; gap: 0.5rem;
  padding: 0.6rem 1.15rem; border-radius: var(--pill);
  background: var(--flame); color: var(--on-flame);
  font-size: 0.9rem; font-weight: 700; letter-spacing: 0.01em;
  transition: background 180ms ease, transform 180ms var(--ease);
}
.nav-order:hover { background: var(--flame-hot); }
.nav-order:active { transform: scale(0.97); }
.nav-order svg { width: 16px; height: 16px; }

.menu-btn {
  display: none;
  flex-direction: column; gap: 5px; justify-content: center;
  width: 44px; height: 44px; padding: 0; border: 0; background: none;
  cursor: pointer;
}
.menu-btn span {
  display: block; width: 26px; height: 2px; background: var(--ink);
  transition: transform 300ms var(--ease), opacity 200ms ease;
  margin-left: auto;
}

@media (max-width: 52rem) {
  .nav-links, .nav-inner > .nav-order { display: none; }
  .menu-btn { display: flex; }
}

/* ---------- full-screen overlay menu ---------- */

.overlay {
  position: fixed; inset: 0; z-index: var(--z-menu);
  background: var(--black);
  display: flex; flex-direction: column;
  padding: var(--s-6) var(--gutter) var(--s-12);
  transform: translateY(-100%);
  transition: transform 520ms var(--ease);
  visibility: hidden;
}
.overlay.open { transform: translateY(0); visibility: visible; }
body.menu-open { overflow: hidden; }

.overlay-top {
  display: flex; align-items: center; justify-content: space-between;
  margin-bottom: auto;
}
.overlay-close {
  width: 44px; height: 44px; border: 0; background: none; cursor: pointer;
  position: relative;
}
.overlay-close::before, .overlay-close::after {
  content: ""; position: absolute; inset: 21px 8px auto; height: 2px;
  background: var(--ink);
}
.overlay-close::before { transform: rotate(45deg); }
.overlay-close::after { transform: rotate(-45deg); }

.overlay-links { display: grid; gap: 0.2rem; }
.overlay-links a {
  font-weight: 800; font-stretch: 118%; text-transform: uppercase;
  letter-spacing: -0.01em; line-height: 1.05;
  font-size: clamp(2.5rem, 13vw, 4.5rem);
  color: var(--ink);
  transition: color 200ms ease, transform 300ms var(--ease);
}
.overlay-links a:hover, .overlay-links a[aria-current="page"] {
  color: var(--flame); transform: translateX(0.5rem);
}
.overlay-foot {
  margin-top: var(--s-12); display: flex; flex-wrap: wrap; gap: var(--s-2) var(--s-6);
  font-size: 0.85rem; letter-spacing: 0.1em; text-transform: uppercase; color: var(--ink-faint);
}
.overlay-foot a:hover { color: var(--flame); }

/* ---------- buttons ---------- */

.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 0.6rem;
  padding: 1rem 1.9rem; border-radius: var(--pill);
  font-weight: 700; font-size: 1.02rem; letter-spacing: 0.01em;
  border: 1px solid transparent;
  transition: background 180ms ease, color 180ms ease, border-color 180ms ease,
              transform 180ms var(--ease);
}
.btn svg { width: 19px; height: 19px; flex: none; }
.btn:active { transform: scale(0.98); }
.btn-flame { background: var(--flame); color: var(--on-flame); }
.btn-flame:hover { background: var(--flame-hot); transform: translateY(-2px); }
.btn-outline { border-color: var(--line); color: var(--ink); }
.btn-outline:hover { border-color: var(--flame); color: var(--flame); }
.btn-black { background: var(--on-flame); color: var(--ink); }
.btn-black:hover { background: var(--black); transform: translateY(-2px); }
.btn-lg { padding: 1.15rem 2.3rem; font-size: 1.1rem; }

/* ---------- hero ---------- */

.hero {
  position: relative;
  min-height: calc(100svh - 8rem);
  display: grid;
  align-content: center;
  padding-block: var(--s-16) var(--s-12);
  overflow: clip;
}
.hero::before {
  content: ""; position: absolute; inset: 0; z-index: 0;
  background:
    radial-gradient(60% 55% at 82% 30%, oklch(60% 0.19 45 / 0.28), transparent 62%),
    radial-gradient(50% 40% at 8% 90%, oklch(58% 0.2 32 / 0.16), transparent 60%);
  pointer-events: none;
}
.hero .wrap { position: relative; z-index: 1; }

.hero-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
  gap: clamp(1rem, 4vw, 3rem);
}
.hero h1 {
  font-size: var(--t-mega);
  font-weight: 800; font-stretch: 118%;
  text-transform: uppercase; letter-spacing: -0.025em; line-height: 0.9;
  text-wrap: balance;
}
.hero h1 em { font-style: normal; color: var(--flame); }
.hero-lead {
  margin-top: var(--s-6);
  max-width: 40ch; font-size: var(--t-lead); color: var(--ink-dim);
}
.hero-lead strong { color: var(--ink); font-weight: 600; }
.hero-actions { display: flex; flex-wrap: wrap; gap: var(--s-4); margin-top: var(--s-8); }

.hero-meta {
  display: flex; flex-wrap: wrap; gap: var(--s-4) var(--s-8);
  margin-top: var(--s-16);
  padding-top: var(--s-5); border-top: 1px solid var(--line);
  font-size: 0.78rem; letter-spacing: 0.14em; text-transform: uppercase; color: var(--ink-faint);
}
.hero-meta b { color: var(--ink); font-weight: 600; }

/* the flame centrepiece */
.hero-flame { width: clamp(150px, 24vw, 300px); height: auto; justify-self: end; filter: drop-shadow(0 0 60px oklch(62% 0.2 45 / 0.4)); }
.flame-t { transform-origin: 50% 90%; }
.flame-o { animation: sway 4s ease-in-out infinite; }
.flame-m { animation: sway 3.2s ease-in-out infinite reverse; }
.flame-i { animation: sway 2.4s ease-in-out infinite; }
@keyframes sway {
  0%, 100% { transform: scaleY(1) skewX(0deg); }
  35% { transform: scaleY(1.05) skewX(-2deg); }
  65% { transform: scaleY(0.97) skewX(1.6deg); }
}

@media (max-width: 60rem) {
  .hero-grid { grid-template-columns: 1fr; }
  .hero-flame { grid-row: 1; justify-self: start; width: clamp(120px, 34vw, 190px); margin-bottom: var(--s-4); }
}

/* ---------- marquee ---------- */

.marquee {
  overflow: hidden;
  background: var(--flame);
  color: var(--on-flame);
  border-block: 1px solid var(--on-flame);
  padding-block: 0.7rem;
}
.marquee-track {
  display: flex; width: max-content;
  animation: marquee 34s linear infinite;
}
.marquee-track span {
  font-size: var(--t-marquee); font-weight: 800; font-stretch: 118%;
  text-transform: uppercase; letter-spacing: -0.01em; line-height: 1.1;
  padding-inline: 1.5rem; white-space: nowrap;
}
.marquee-track span .star { color: var(--on-flame-dim); }
@keyframes marquee { to { transform: translateX(-50%); } }

/* ---------- section scaffolding ---------- */

.section { padding-block: var(--section); }

.section-head {
  display: flex; flex-wrap: wrap; align-items: flex-end; justify-content: space-between;
  gap: var(--s-4) var(--s-8);
  padding-bottom: var(--s-6);
  border-bottom: 1px solid var(--line);
}
.section-head h2 {
  font-size: var(--t-h2); font-weight: 800; font-stretch: 118%;
  text-transform: uppercase; letter-spacing: -0.02em; line-height: 0.95;
  text-wrap: balance; max-width: 16ch;
}
.section-head .count {
  font-size: 0.8rem; letter-spacing: 0.16em; text-transform: uppercase;
  color: var(--flame); font-weight: 600; white-space: nowrap;
}
.section-note { margin-top: var(--s-6); max-width: 52ch; color: var(--ink-dim); font-size: var(--t-lead); }

/* ---------- the index (services) ---------- */

.index { margin-top: var(--s-4); }
.index-row {
  position: relative;
  display: grid;
  grid-template-columns: minmax(0, 1.1fr) minmax(0, 0.9fr) 2.5rem;
  align-items: center; gap: var(--s-4) var(--s-6);
  padding-block: clamp(1.4rem, 3vw, 2.4rem);
  border-bottom: 1px solid var(--line);
  transition: color 240ms ease;
  overflow: clip;
}
.index-row::before {
  content: ""; position: absolute; inset: 0; z-index: -1;
  background: var(--flame);
  transform: translateY(101%);
  transition: transform 420ms var(--ease-io);
}
.index-name {
  font-size: var(--t-index); font-weight: 800; font-stretch: 118%;
  text-transform: uppercase; letter-spacing: -0.02em; line-height: 0.98;
  transition: transform 340ms var(--ease);
}
.index-desc { color: var(--ink-dim); font-size: 0.98rem; transition: color 240ms ease; }
.index-arrow {
  justify-self: end; width: 26px; height: 26px; color: var(--ink-faint);
  transition: transform 360ms var(--ease), color 240ms ease;
}
.index-row:hover, .index-row:focus-visible { color: var(--on-flame); }
.index-row:hover::before, .index-row:focus-visible::before { transform: translateY(0); }
.index-row:hover .index-name, .index-row:focus-visible .index-name { transform: translateX(0.6rem); }
.index-row:hover .index-desc,
.index-row:hover .index-arrow { color: var(--on-flame); }
.index-row:hover .index-arrow { transform: translate(6px, -6px); }

@media (max-width: 48rem) {
  .index-row {
    grid-template-columns: 1fr 1.75rem;
    grid-template-areas: "name arrow" "desc arrow";
    row-gap: var(--s-3);
  }
  .index-name { grid-area: name; }
  .index-desc { grid-area: desc; }
  .index-arrow { grid-area: arrow; align-self: start; }
}

/* ---------- steps (how it works) ---------- */

.steps {
  display: grid; grid-template-columns: repeat(3, 1fr);
  gap: var(--s-8); margin-top: var(--s-12);
}
.step { padding-top: var(--s-6); border-top: 2px solid var(--flame); }
.step h3 {
  font-size: var(--t-h3); font-weight: 800; font-stretch: 112%;
  text-transform: uppercase; letter-spacing: -0.015em; line-height: 1; margin-bottom: var(--s-3);
}
.step p { color: var(--ink-dim); }
@media (max-width: 46rem) { .steps { grid-template-columns: 1fr; gap: var(--s-10); } }

/* ---------- quotes ---------- */

.quotes { display: grid; grid-template-columns: repeat(3, 1fr); gap: 0; margin-top: var(--s-8); border-top: 1px solid var(--line); }
.quote {
  padding: var(--s-10) var(--s-6) var(--s-8);
  border-bottom: 1px solid var(--line);
}
.quote:not(:last-child) { border-right: 1px solid var(--line); }
.quote p { font-size: 1.22rem; line-height: 1.4; font-weight: 500; }
.quote p::before { content: "\201C"; color: var(--flame); }
.quote p::after { content: "\201D"; color: var(--flame); }
.quote cite {
  display: block; margin-top: var(--s-6); font-style: normal;
  font-size: 0.78rem; letter-spacing: 0.14em; text-transform: uppercase; color: var(--ink-faint);
}
.quote cite b { color: var(--flame); font-weight: 600; }
@media (max-width: 52rem) {
  .quotes { grid-template-columns: 1fr; }
  .quote:not(:last-child) { border-right: 0; }
}

/* ---------- editorial info rows (contact / visit) ---------- */

.info { border-top: 1px solid var(--line); }
.info-row {
  display: grid; grid-template-columns: minmax(0, 0.4fr) minmax(0, 1fr);
  gap: var(--s-4) var(--s-8);
  padding-block: var(--s-8);
  border-bottom: 1px solid var(--line);
  align-items: baseline;
}
.info-row dt {
  font-size: 0.8rem; letter-spacing: 0.14em; text-transform: uppercase; color: var(--ink-faint);
  font-weight: 600;
}
.info-row dd { margin: 0; }
.info-row .big {
  font-size: clamp(1.6rem, 4vw, 2.6rem); font-weight: 800; font-stretch: 112%;
  text-transform: uppercase; letter-spacing: -0.02em; line-height: 1;
}
.info-row .big a { transition: color 200ms ease; }
.info-row .big a:hover { color: var(--flame); }
.info-row small { display: block; margin-top: var(--s-3); color: var(--ink-dim); font-size: 0.98rem; letter-spacing: 0; text-transform: none; }
@media (max-width: 44rem) {
  .info-row { grid-template-columns: 1fr; gap: var(--s-2); }
}

/* prose */
.prose { max-width: 42rem; display: grid; gap: var(--s-6); font-size: var(--t-lead); color: var(--ink-dim); }
.prose strong { color: var(--ink); font-weight: 600; }
.lead-xl {
  font-size: clamp(1.5rem, 3.6vw, 2.4rem); line-height: 1.15; font-weight: 500;
  color: var(--ink); max-width: 24ch; text-wrap: balance;
}
.lead-xl em { font-style: normal; color: var(--flame); }

/* ---------- statement / drenched CTA ---------- */

.drench {
  background: var(--flame);
  color: var(--on-flame);
  position: relative; overflow: hidden;
}
.drench::before {
  content: ""; position: absolute; inset: 0;
  background: radial-gradient(70% 100% at 15% 0%, oklch(84% 0.15 68 / 0.6), transparent 60%);
  pointer-events: none;
}
.drench .wrap { position: relative; }
.drench h2 {
  font-size: var(--t-mega); font-weight: 800; font-stretch: 118%;
  text-transform: uppercase; letter-spacing: -0.025em; line-height: 0.9; text-wrap: balance;
}
.drench p { margin-top: var(--s-6); max-width: 40ch; font-size: var(--t-lead); font-weight: 500; color: var(--on-flame-dim); }
.drench .btn-black { margin-top: var(--s-8); }
.drench-actions { display: flex; flex-wrap: wrap; align-items: center; gap: var(--s-6); margin-top: var(--s-8); }
.drench-actions .plain { font-weight: 700; text-decoration: underline; text-underline-offset: 5px; text-decoration-color: color-mix(in oklab, var(--on-flame) 40%, transparent); }
.drench-actions .plain:hover { text-decoration-color: currentColor; }

/* ---------- footer ---------- */

.footer { border-top: 1px solid var(--line); padding-block: var(--s-16) var(--s-8); background: var(--black); }
.footer-top {
  display: grid; grid-template-columns: minmax(0, 1.5fr) repeat(2, minmax(0, 1fr));
  gap: var(--s-10);
}
.footer-word {
  font-size: clamp(2.2rem, 7vw, 4rem); font-weight: 800; font-stretch: 118%;
  text-transform: uppercase; letter-spacing: -0.02em; line-height: 0.9;
}
.footer-word em { font-style: normal; color: var(--flame); }
.footer-tag { margin-top: var(--s-4); color: var(--ink-dim); max-width: 26ch; }
.footer h4 { font-size: 0.75rem; letter-spacing: 0.14em; text-transform: uppercase; color: var(--ink-faint); margin-bottom: var(--s-4); font-weight: 600; }
.footer ul { display: grid; gap: var(--s-3); }
.footer ul a { color: var(--ink-dim); transition: color 180ms ease; }
.footer ul a:hover { color: var(--flame); }
.footer-legal {
  margin-top: var(--s-16); padding-top: var(--s-5); border-top: 1px solid var(--line-soft);
  display: flex; flex-wrap: wrap; justify-content: space-between; gap: var(--s-3);
  font-size: 0.75rem; letter-spacing: 0.1em; text-transform: uppercase; color: var(--ink-faint);
}
@media (max-width: 46rem) { .footer-top { grid-template-columns: 1fr; gap: var(--s-8); } }

/* ---------- WhatsApp FAB ---------- */

.wa-fab {
  position: fixed; right: clamp(1rem, 3vw, 1.75rem); bottom: clamp(1rem, 3vw, 1.75rem);
  z-index: var(--z-fab); display: grid; place-items: center;
  width: 3.5rem; height: 3.5rem; border-radius: 50%;
  background: var(--wa); color: #fff; box-shadow: 0 8px 26px oklch(0% 0 0 / 0.5);
  transition: transform 200ms var(--ease);
}
.wa-fab:hover { transform: scale(1.08); }
.wa-fab svg { width: 1.9rem; height: 1.9rem; }
.wa-fab::before {
  content: ""; position: absolute; inset: -5px; border-radius: 50%;
  border: 2px solid var(--wa); opacity: 0; animation: ping 3.4s ease-out infinite;
}
@keyframes ping { 0% { opacity: 0.5; transform: scale(1); } 70%, 100% { opacity: 0; transform: scale(1.35); } }

/* ---------- reveal / entrance (progressive enhancement) ---------- */

html.reveal-on [data-reveal] {
  opacity: 0; translate: 0 28px;
  transition: opacity 800ms var(--ease-io), translate 800ms var(--ease-io);
}
html.reveal-on [data-reveal].is-in { opacity: 1; translate: 0 0; }
html.reveal-on [data-reveal][data-delay="1"] { transition-delay: 90ms; }
html.reveal-on [data-reveal][data-delay="2"] { transition-delay: 180ms; }
html.reveal-on [data-reveal][data-delay="3"] { transition-delay: 270ms; }

html.reveal-on .hero [data-enter] {
  opacity: 0; translate: 0 24px;
  animation: enter 900ms var(--ease-io) forwards;
}
html.reveal-on .hero [data-enter="2"] { animation-delay: 120ms; }
html.reveal-on .hero [data-enter="3"] { animation-delay: 240ms; }
html.reveal-on .hero [data-enter="4"] { animation-delay: 360ms; }
@keyframes enter { to { opacity: 1; translate: 0 0; } }

/* hard failsafe — always wins, no frame dependency */
html.reveal-done [data-reveal],
html.reveal-done .hero [data-enter] {
  opacity: 1 !important; translate: none !important;
  transition: none !important; animation: none !important;
}

/* ---------- reduced motion ---------- */
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .flame-o, .flame-m, .flame-i, .wa-fab::before, .marquee-track { animation: none; }
  .marquee-track { transform: none; }
  html.reveal-on [data-reveal], html.reveal-on .hero [data-enter] {
    opacity: 1; translate: none; transition: none; animation: none;
  }
  .btn, .nav-links a, .nav-order, .index-row, .index-arrow { transition: none; }
}
