/* SaniXperts — staging build.
   A food-plant sanitation company: stainless, water, cold light, and a procedure that runs
   at night. The palette is built from that, not from a template: deep tank-teal grounds, a
   sanitiser-mint accent used sparingly, and steel neutrals with a green bias so nothing
   reads as generic grey. */

:root {
  color-scheme: light dark;

  --ink: #0a1f24;
  --muted: #52686d;
  --ground: #f2f5f4;
  --surface: #ffffff;
  --surface-2: #e9efee;
  --line: #d3dedb;
  --accent: #0d7f74;
  --accent-soft: #d9f0ec;
  --glow: #3fd6c0;
  --deep: #06161a;
  --on-deep: #e8f2f0;

  --radius: 16px;
  --wrap: 1140px;
  --step: clamp(3rem, 2rem + 5vw, 6rem);
  --shadow: 0 1px 2px rgba(6, 22, 26, .05), 0 12px 32px rgba(6, 22, 26, .08);
  --ease: cubic-bezier(.22, .61, .36, 1);
}

@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --ink: #e8f2f0;
    --muted: #8fa8ac;
    --ground: #06161a;
    --surface: #0e2328;
    --surface-2: #122c32;
    --line: #1e3b41;
    --accent: #4fd8c4;
    --accent-soft: #0f3239;
    --glow: #4fd8c4;
    --deep: #040f12;
    --on-deep: #e8f2f0;
    --shadow: 0 1px 2px rgba(0, 0, 0, .5), 0 14px 36px rgba(0, 0, 0, .45);
  }
}

:root[data-theme="dark"] {
  --ink: #e8f2f0;
  --muted: #8fa8ac;
  --ground: #06161a;
  --surface: #0e2328;
  --surface-2: #122c32;
  --line: #1e3b41;
  --accent: #4fd8c4;
  --accent-soft: #0f3239;
  --glow: #4fd8c4;
  --deep: #040f12;
  --on-deep: #e8f2f0;
  --shadow: 0 1px 2px rgba(0, 0, 0, .5), 0 14px 36px rgba(0, 0, 0, .45);
}

* { box-sizing: border-box; }

body {
  margin: 0;
  background: var(--ground);
  color: var(--ink);
  font: 400 17px/1.62 "Public Sans", system-ui, -apple-system, "Segoe UI", Arial, sans-serif;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

img { max-width: 100%; height: auto; }

h1, h2, h3 {
  font-family: Sora, "Segoe UI", system-ui, sans-serif;
  font-weight: 700;
  line-height: 1.08;
  letter-spacing: -.02em;
  text-wrap: balance;
  margin: 0 0 .55em;
}

h1 { font-size: clamp(2.4rem, 1.3rem + 4.6vw, 4.6rem); }
h2 { font-size: clamp(1.75rem, 1.2rem + 2.2vw, 2.75rem); }
h3 { font-size: 1.15rem; letter-spacing: -.01em; }

p { margin: 0 0 1em; max-width: 66ch; }

a { color: var(--accent); text-underline-offset: 3px; }

:focus-visible {
  outline: 3px solid var(--accent);
  outline-offset: 3px;
  border-radius: 4px;
}

.wrap { width: min(var(--wrap), calc(100% - 2.5rem)); margin-inline: auto; }

.eyebrow {
  text-transform: uppercase;
  letter-spacing: .16em;
  font-size: .74rem;
  font-weight: 600;
  color: var(--accent);
  margin-bottom: .9rem;
}

.skip {
  position: absolute; left: -9999px; top: 0; z-index: 30;
  background: var(--surface); padding: .75rem 1rem;
}
.skip:focus { left: 0; }

/* ─────────────────────────────────────────────────────────────── header */

.site {
  position: sticky; top: 0; z-index: 20;
  background: color-mix(in srgb, var(--ground) 88%, transparent);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--line);
}

.bar { display: flex; align-items: center; gap: 1rem; min-height: 64px; }

.brand {
  display: flex; align-items: center; gap: .55rem;
  font-family: Sora, system-ui, sans-serif; font-size: 1.08rem; font-weight: 500;
  color: var(--ink); text-decoration: none;
}
.brand strong { font-weight: 700; }
.brand img { border-radius: 6px; }

nav { margin-left: auto; }
nav ul { display: flex; align-items: center; gap: 1.5rem; list-style: none; margin: 0; padding: 0; }
nav a { color: var(--ink); text-decoration: none; font-size: .93rem; font-weight: 500; }
nav a:hover { color: var(--accent); }

nav a.cta {
  background: var(--accent); color: var(--surface);
  padding: .48rem .95rem; border-radius: 999px;
}
:root:not([data-theme="light"]) nav a.cta { color: var(--deep); }
@media (prefers-color-scheme: light) { :root:not([data-theme="dark"]) nav a.cta { color: #fff; } }

.menu {
  display: none; font: inherit; font-size: .92rem;
  background: none; border: 1px solid var(--line); color: var(--ink);
  padding: .42rem .8rem; border-radius: 8px; cursor: pointer;
}

/* ─────────────────────────────────────────────────────────────── hero */

.hero {
  position: relative;
  background: var(--deep);
  color: var(--on-deep);
  padding: clamp(5rem, 3rem + 12vw, 11rem) 0 clamp(4rem, 2rem + 7vw, 7rem);
  overflow: hidden;
  isolation: isolate;
}

/* the layered stage: four planes at different depths, moved by scroll. This is the
   "3D" of the page and it is built from transforms, not from a library or a photograph. */
.stage {
  position: absolute; inset: 0; z-index: -1;
  perspective: 1000px;
  perspective-origin: 50% 40%;
}

.plane {
  position: absolute; left: 50%; top: 50%;
  width: min(1500px, 165vw); aspect-ratio: 2 / 1;
  translate: -50% -50%;
  border-radius: 50%;
  will-change: transform;
}

.p1 {
  background: radial-gradient(ellipse at 50% 50%,
              color-mix(in srgb, var(--glow) 26%, transparent), transparent 62%);
  transform: translateZ(-620px) scale(1.7);
}
.p2 {
  background:
    repeating-linear-gradient(115deg,
      color-mix(in srgb, var(--glow) 9%, transparent) 0 2px,
      transparent 2px 92px);
  transform: translateZ(-320px) scale(1.32);
  opacity: .85;
}
.p3 {
  background: radial-gradient(ellipse at 42% 58%,
              color-mix(in srgb, #0b5f7a 46%, transparent), transparent 58%);
  transform: translateZ(-120px) scale(1.12);
}

/* a slow cold-light pass, like a wash-down bay coming on */
.sweep {
  position: absolute; inset: -20% -40%;
  background: linear-gradient(100deg, transparent 38%,
              color-mix(in srgb, var(--glow) 12%, transparent) 50%, transparent 62%);
  animation: sweep 13s var(--ease) infinite;
}
@keyframes sweep { 0% { translate: -38% 0; } 55%, 100% { translate: 38% 0; } }

.grain {
  position: absolute; inset: 0;
  background-image: radial-gradient(circle at 1px 1px,
                    rgba(255, 255, 255, .05) 1px, transparent 0);
  background-size: 4px 4px;
  mix-blend-mode: overlay;
}

.hero-body { position: relative; }
.hero .eyebrow { color: var(--glow); }
.hero h1 { color: #fff; max-width: 17ch; }
.hero h1 span { color: color-mix(in srgb, var(--glow) 88%, #fff); display: block; }

.lede {
  font-size: clamp(1.02rem, .95rem + .4vw, 1.22rem);
  color: color-mix(in srgb, var(--on-deep) 82%, transparent);
  max-width: 56ch;
}

.actions { display: flex; flex-wrap: wrap; gap: .75rem; margin-top: 2rem; }

.button {
  display: inline-block; cursor: pointer;
  font: 500 1rem/1 "Public Sans", system-ui, sans-serif;
  padding: .9rem 1.5rem; border-radius: 999px;
  border: 1px solid transparent; text-decoration: none;
  transition: transform .25s var(--ease), background-color .25s var(--ease);
}
.button:hover { transform: translateY(-2px); }
.button.primary { background: var(--glow); color: #052024; }
.button.primary:hover { background: #fff; }
.button.ghost {
  background: transparent; color: var(--on-deep);
  border-color: color-mix(in srgb, var(--on-deep) 32%, transparent);
}
.button.ghost:hover { border-color: var(--glow); color: var(--glow); }

.scroll-hint {
  position: absolute; left: 50%; bottom: 1.6rem; translate: -50% 0;
  margin: 0; font-size: .72rem; letter-spacing: .18em; text-transform: uppercase;
  color: color-mix(in srgb, var(--on-deep) 55%, transparent);
  display: flex; align-items: center; gap: .6rem;
}
.scroll-hint span {
  width: 1px; height: 34px;
  background: linear-gradient(var(--glow), transparent);
  animation: drop 2.4s var(--ease) infinite;
}
@keyframes drop { 0% { opacity: 0; scale: 1 .2; } 40% { opacity: 1; scale: 1 1; } 100% { opacity: 0; scale: 1 1; } }

/* ─────────────────────────────────────────────────────────────── bands */

.band { padding: var(--step) 0; }
.standard { border-bottom: 1px solid var(--line); }
.section-lede { color: var(--muted); font-size: 1.06rem; max-width: 60ch; margin-bottom: 2.5rem; }

.grid { display: grid; gap: 1.1rem; }
.grid.three { grid-template-columns: repeat(auto-fit, minmax(min(100%, 280px), 1fr)); }

.card {
  background: var(--surface); border: 1px solid var(--line);
  border-radius: var(--radius); padding: 1.6rem; box-shadow: var(--shadow);
}
.card p:last-child { margin-bottom: 0; }

.tag {
  display: inline-block; font-size: .68rem; font-weight: 600;
  text-transform: uppercase; letter-spacing: .13em; color: var(--accent);
  background: var(--accent-soft); padding: .28rem .6rem; border-radius: 999px;
  margin-bottom: 1rem;
}

/* ─────────────────────────────────────────── the nine steps (the centrepiece) */

.steps { background: var(--deep); color: var(--on-deep); padding: var(--step) 0; }
.steps .eyebrow { color: var(--glow); }
.steps h2 { color: #fff; }

.steps-grid { display: grid; gap: 2.5rem; }
@media (min-width: 900px) {
  .steps-grid { grid-template-columns: 0.85fr 1.15fr; gap: 4rem; align-items: start; }
  .steps-sticky { position: sticky; top: 110px; }
}

.steps-note { color: color-mix(in srgb, var(--on-deep) 70%, transparent); max-width: 40ch; }

.progress { margin-top: 2rem; }
.progress-bar {
  height: 3px; background: color-mix(in srgb, var(--on-deep) 16%, transparent);
  border-radius: 2px; overflow: hidden;
}
.progress-bar span {
  display: block; height: 100%; width: 11%;
  background: var(--glow);
  transition: width .45s var(--ease);
}
.progress-count {
  margin: .7rem 0 0; font-family: Sora, sans-serif; font-size: .85rem;
  font-variant-numeric: tabular-nums;
  color: color-mix(in srgb, var(--on-deep) 60%, transparent);
}
.progress-count strong { color: var(--glow); font-size: 1.1rem; }

.steps-list { list-style: none; margin: 0; padding: 0; counter-reset: step; }

.step {
  position: relative;
  padding: 1.7rem 1.7rem 1.7rem 2rem;
  margin-bottom: 1rem;
  border: 1px solid color-mix(in srgb, var(--on-deep) 13%, transparent);
  border-radius: var(--radius);
  background: color-mix(in srgb, #0d2a31 72%, transparent);
  /* the depth: each card sits slightly back until it is the active one */
  transform: perspective(900px) rotateX(5deg) translateZ(-26px) scale(.975);
  opacity: .46;
  transition: transform .6s var(--ease), opacity .6s var(--ease),
              border-color .6s var(--ease), background-color .6s var(--ease);
  will-change: transform, opacity;
}
.step.active {
  transform: perspective(900px) rotateX(0) translateZ(0) scale(1);
  opacity: 1;
  border-color: color-mix(in srgb, var(--glow) 42%, transparent);
  background: color-mix(in srgb, #103740 86%, transparent);
}
.step.active::before {
  content: ""; position: absolute; left: 0; top: 14%; bottom: 14%;
  width: 2px; border-radius: 2px; background: var(--glow);
}
.step h3 { color: #fff; }
.step p { color: color-mix(in srgb, var(--on-deep) 76%, transparent); margin-bottom: 0; }

.num {
  font-family: Sora, sans-serif; font-weight: 700; font-size: .82rem;
  letter-spacing: .1em; font-variant-numeric: tabular-nums;
  color: var(--glow); margin-bottom: .5rem;
}

/* ─────────────────────────────────────────────────────────────── splits */

.split { padding: var(--step) 0; border-top: 1px solid var(--line); }
.split.alt { background: var(--surface-2); }

.cols { display: grid; gap: 2.5rem; align-items: center; }
@media (min-width: 880px) { .cols { grid-template-columns: 1fr 1fr; gap: 4rem; } }

.checks { list-style: none; margin: 1.4rem 0 0; padding: 0; }
.checks li { position: relative; padding-left: 1.7rem; margin-bottom: .65rem; }
.checks li::before {
  content: ""; position: absolute; left: 0; top: .58em;
  width: .5rem; height: .5rem; border-radius: 50%; background: var(--accent);
}

.panel {
  margin: 0; background: var(--surface); border: 1px solid var(--line);
  border-radius: var(--radius); padding: 1.8rem; box-shadow: var(--shadow);
}
.panel figcaption {
  font-family: Sora, sans-serif; font-weight: 500; font-size: 1rem;
  margin-bottom: 1.2rem; color: var(--ink);
}
.panel.tilt { transform: perspective(1200px) rotateY(-3deg) rotateX(1.5deg); }
.panel.glow { position: relative; overflow: hidden; }
.panel.glow::after {
  content: ""; position: absolute; inset: auto -30% -60% -30%; height: 70%;
  background: radial-gradient(ellipse at 50% 100%,
              color-mix(in srgb, var(--glow) 20%, transparent), transparent 70%);
  pointer-events: none;
}

.record { margin: 0; display: grid; gap: 1px; background: var(--line);
          border: 1px solid var(--line); border-radius: 10px; overflow: hidden; }
.record > div { background: var(--surface); padding: .85rem 1rem;
                display: flex; justify-content: space-between; gap: 1rem; }
.record dt { font-size: .8rem; text-transform: uppercase; letter-spacing: .1em;
             color: var(--muted); font-weight: 600; }
.record dd { margin: 0; font-size: .95rem; text-align: right; }
.record .ph { color: var(--accent); font-weight: 600; }

.tech { list-style: none; margin: 0; padding: 0; }
.tech li { padding: .9rem 0; border-bottom: 1px dashed var(--line); position: relative;
           padding-left: 1.6rem; }
.tech li:last-child { border-bottom: 0; }
.tech strong { display: block; font-weight: 600; }
.tech em { font-style: normal; color: var(--muted); font-size: .93rem; }
.dot { position: absolute; left: 0; top: 1.35em; width: .6rem; height: .6rem;
       border-radius: 50%; }
.dot.e { background: var(--accent); }
.dot.u { background: #7b6ef0; }
.dot.o { background: #3fa9d6; }

.note { font-size: .87rem; color: var(--muted); max-width: 58ch; }
.note em { font-style: normal; font-weight: 600; color: var(--accent);
           border-bottom: 1px dotted currentColor; }

/* ─────────────────────────────────────────────────────────────── contact */

.contact { padding: var(--step) 0; border-top: 1px solid var(--line); }

.form { display: grid; gap: 1rem; margin: 1.8rem 0 1.2rem;
        grid-template-columns: repeat(auto-fit, minmax(min(100%, 250px), 1fr)); }
.field.full, .submit-row { grid-column: 1 / -1; }
.field label { display: block; font-size: .84rem; font-weight: 600; color: var(--muted);
               margin-bottom: .35rem; }
.field input, .field textarea {
  width: 100%; font: inherit; font-size: .97rem; padding: .75rem .9rem;
  color: var(--ink); background: var(--surface);
  border: 1px solid var(--line); border-radius: 10px;
}
.field textarea { resize: vertical; }
.submit-row { display: flex; align-items: center; gap: 1rem; flex-wrap: wrap; }
.status { margin: 0; font-size: .9rem; color: var(--accent); font-weight: 500; }
.contact .button.primary { background: var(--accent); color: #fff; }
:root:not([data-theme="light"]) .contact .button.primary { color: var(--deep); }

/* ─────────────────────────────────────────────────────────────── footer */

.site-footer { background: var(--deep); color: var(--on-deep); padding: 2.5rem 0; }
.foot p { margin: 0 0 .6rem; }
.foot-brand { font-size: 1rem; }
.foot .small { font-size: .85rem; color: color-mix(in srgb, var(--on-deep) 66%, transparent); }
.foot em { font-style: normal; font-weight: 600; color: var(--glow); }
.stage-note { letter-spacing: .1em; text-transform: uppercase; font-size: .72rem; }

/* ─────────────────────────────────────────────── scroll reveal, done safely */

/* The resting state is VISIBLE. JS adds .will-reveal only when it can also observe the
   element, so a page with JS disabled or an observer that never fires still shows
   everything. Nothing here is parked at opacity:0 waiting for an event. */
.will-reveal { opacity: 0; transform: translateY(18px); }
.will-reveal.shown {
  opacity: 1; transform: none;
  transition: opacity .7s var(--ease), transform .7s var(--ease);
}

/* ─────────────────────────────────────────────────────────────── small screens */

@media (max-width: 820px) {
  .menu { display: block; margin-left: auto; }
  nav ul {
    display: none; position: absolute; left: 0; right: 0; top: 100%;
    flex-direction: column; align-items: stretch; gap: 0;
    background: var(--ground); border-bottom: 1px solid var(--line);
    padding: .5rem 1.25rem 1rem;
  }
  nav ul.open { display: flex; }
  nav ul li { padding: .6rem 0; border-bottom: 1px solid var(--line); }
  nav ul li:last-child { border-bottom: 0; padding-top: .9rem; }
  nav a.cta { display: inline-block; }
  .panel.tilt { transform: none; }
  .step { transform: none; opacity: 1; }
  .step:not(.active) { opacity: .72; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: .001ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: .001ms !important;
    scroll-behavior: auto !important;
  }
  .plane, .step, .panel.tilt { transform: none !important; }
  .will-reveal { opacity: 1 !important; transform: none !important; }
}

html { scroll-behavior: smooth; }
