/* ==========================================================================
   Spartech — landing page
   --------------------------------------------------------------------------
   BRAND SWAP: when the logo and colours arrive, change only the values in the
   ":root" block below. Nothing else in this file hardcodes a colour.
   ========================================================================== */

:root {
  /* --- Brand colours (change these) ------------------------------------- */
  --panel:        #131b22;   /* dark ground: header, hero, contact          */
  --panel-deep:   #0d1319;   /* footer, one step darker than --panel        */
  --panel-raise:  #1c2731;   /* raised surfaces on the dark ground          */
  --brand:        #0f7a8c;   /* primary accent — the "IT" half              */
  --brand-lift:   #17a0b5;   /* brand, lightened, for use on dark           */
  --signal:       #e8933a;   /* secondary accent — the "smart systems" half */
  --paper:        #f2f5f7;   /* light page ground                           */

  /* Soft wash of --signal. Keep in step with --signal when you swap it. */
  --signal-soft:  rgba(232, 147, 58, .2);

  /* --- Derived neutrals (rarely need changing) --------------------------- */
  --ink:          #14181c;
  --ink-soft:     #4a555f;
  --line:         #dbe2e7;
  --line-strong:  #b9c5cd;
  --on-panel:     #eef3f6;
  --on-panel-dim: #9aa9b4;
  --panel-line:   rgba(238, 243, 246, .14);

  /* --- Type -------------------------------------------------------------- */
  --display: "Familjen Grotesk", "Trebuchet MS", system-ui, sans-serif;
  --body:    "Public Sans", -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  --mono:    "IBM Plex Mono", ui-monospace, "SF Mono", Menlo, monospace;

  /* --- Metrics ------------------------------------------------------------ */
  --maxw:     1120px;
  --gutter:   clamp(1.25rem, 5vw, 3.5rem);
  --rail:     clamp(2.25rem, 6vw, 4.5rem);
  --flow-pad: clamp(4rem, 8vw, 6.5rem);
  --radius:   3px;
}

/* --------------------------------------------------------------------------
   Reset & base
   -------------------------------------------------------------------------- */

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

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

body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: var(--body);
  font-size: clamp(1rem, .96rem + .2vw, 1.0625rem);
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
}

h1, h2, h3 { font-family: var(--display); font-weight: 600; line-height: 1.08; margin: 0; }
p  { margin: 0; }
ul, ol { margin: 0; padding: 0; list-style: none; }
img, svg { display: block; max-width: 100%; }
a { color: inherit; }

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

.skip {
  position: absolute;
  left: -9999px;
  top: 0;
  z-index: 100;
  padding: .75rem 1.25rem;
  background: var(--signal);
  color: var(--panel);
  font-family: var(--mono);
  font-size: .8125rem;
  text-decoration: none;
}
.skip:focus { left: 0; }

/* Shared eyebrow: mono, spaced, uppercase — the panel-label voice */
.eyebrow {
  margin: 0 0 1.25rem;
  font-family: var(--mono);
  font-size: .75rem;
  font-weight: 500;
  letter-spacing: .16em;
  text-transform: uppercase;
  color: var(--brand-lift);
}
.eyebrow__slash { color: var(--signal); padding: 0 .15em; }
.eyebrow--dark { color: var(--brand); }

.h2 {
  font-size: clamp(1.75rem, 1.2rem + 2.1vw, 2.75rem);
  letter-spacing: -.02em;
  max-width: 20ch;
  margin-bottom: 1.25rem;
}

/* --------------------------------------------------------------------------
   Masthead
   -------------------------------------------------------------------------- */

.masthead {
  position: sticky;
  top: 0;
  z-index: 50;
  background: var(--panel);
  border-bottom: 1px solid var(--panel-line);
}

.masthead__inner {
  max-width: var(--maxw);
  margin-inline: auto;
  padding: .875rem var(--gutter);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1.5rem;
}

.brand {
  display: flex;
  align-items: center;
  gap: .75rem;
  text-decoration: none;
  color: var(--on-panel);
}
.brand__mark { width: 30px; height: 30px; flex: none; }
.brand__mark-a { fill: var(--brand-lift); }
.brand__mark-b { fill: var(--signal); }
.brand__text { display: flex; flex-direction: column; }
.brand__name {
  font-family: var(--display);
  font-weight: 700;
  font-size: 1.0625rem;
  letter-spacing: .12em;
  line-height: 1.1;
}
.brand__sub {
  font-family: var(--mono);
  font-size: .625rem;
  letter-spacing: .13em;
  text-transform: uppercase;
  color: var(--on-panel-dim);
  line-height: 1.4;
}

.nav { display: flex; align-items: center; gap: clamp(1rem, 2.5vw, 2rem); }

.nav__link {
  font-size: .9375rem;
  text-decoration: none;
  color: var(--on-panel-dim);
  padding-block: .25rem;
  border-bottom: 1px solid transparent;
  transition: color .18s ease, border-color .18s ease;
}
.nav__link:hover { color: var(--on-panel); border-bottom-color: var(--signal); }

.nav__cta {
  font-family: var(--mono);
  font-size: .8125rem;
  letter-spacing: .06em;
  text-decoration: none;
  color: var(--panel);
  background: var(--signal);
  padding: .55rem 1rem;
  border-radius: var(--radius);
  transition: filter .18s ease;
}
.nav__cta:hover { filter: brightness(1.1); }

@media (max-width: 46rem) {
  .nav__link { display: none; }
  .brand__sub { display: none; }
}

/* --------------------------------------------------------------------------
   Hero
   -------------------------------------------------------------------------- */

.hero {
  background: var(--panel);
  color: var(--on-panel);
  /* faint instrument-panel grid, drawn from the brand tokens */
  background-image:
    linear-gradient(var(--panel-line) 1px, transparent 1px),
    linear-gradient(90deg, var(--panel-line) 1px, transparent 1px);
  background-size: 88px 88px, 88px 88px;
  background-position: center top;
}

.hero__inner {
  max-width: var(--maxw);
  margin-inline: auto;
  padding: clamp(3.5rem, 9vw, 7rem) var(--gutter) 0;
}

.hero__title {
  font-size: clamp(2.35rem, 1.1rem + 5.2vw, 4.75rem);
  font-weight: 700;
  letter-spacing: -.03em;
  margin-bottom: 1.5rem;
}

.hero__lede {
  max-width: 56ch;
  color: var(--on-panel-dim);
  font-size: clamp(1.0625rem, 1rem + .35vw, 1.25rem);
  line-height: 1.6;
}

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

.btn {
  display: inline-block;
  font-family: var(--mono);
  font-size: .875rem;
  letter-spacing: .05em;
  text-decoration: none;
  padding: .8rem 1.5rem;
  border-radius: var(--radius);
  border: 1px solid transparent;
  transition: filter .18s ease, background-color .18s ease, border-color .18s ease;
}
.btn--primary { background: var(--signal); color: var(--panel); }
.btn--primary:hover { filter: brightness(1.1); }
.btn--ghost { border-color: var(--panel-line); color: var(--on-panel); }
.btn--ghost:hover { border-color: var(--brand-lift); background: var(--panel-raise); }

/* --- Signature: the signal path ------------------------------------------ */

.path {
  margin: clamp(3rem, 7vw, 5.5rem) 0 0;
  padding: 1.75rem 0 clamp(3.5rem, 7vw, 5rem);
}

.path__caption {
  font-family: var(--mono);
  font-size: .6875rem;
  letter-spacing: .16em;
  text-transform: uppercase;
  color: var(--on-panel-dim);
  margin-bottom: 2.25rem;
}

.path__track { position: relative; }

.path__stages {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 1.5rem;
}
/* the wire the stages sit on */
.path__track::before {
  content: "";
  position: absolute;
  top: 5px;
  left: 0;
  right: 0;
  height: 1px;
  background: var(--panel-line);
}

.path__stage { position: relative; padding-top: 2rem; padding-right: 1rem; }

.path__node {
  position: absolute;
  top: 0;
  left: 0;
  width: 11px;
  height: 11px;
  border-radius: 50%;
  background: var(--panel);
  border: 2px solid var(--brand-lift);
}
.path__stage:last-child .path__node { border-color: var(--signal); }

.path__label {
  display: block;
  font-family: var(--display);
  font-size: 1.125rem;
  font-weight: 600;
  letter-spacing: .01em;
  margin-bottom: .25rem;
}
.path__note {
  display: block;
  font-size: .9375rem;
  line-height: 1.5;
  color: var(--on-panel-dim);
}

.path__pulse {
  position: absolute;
  top: 1px;
  left: 0;
  width: 9px;
  height: 9px;
  border-radius: 50%;
  background: var(--signal);
  box-shadow: 0 0 0 4px var(--signal-soft);
  opacity: 0;
}

@media (max-width: 40rem) {
  .path__stages { grid-template-columns: 1fr; gap: 1.75rem; }
  .path__track::before {
    top: 0; bottom: 0; left: 5px; right: auto;
    width: 1px; height: auto;
  }
  .path__stage { padding-top: 0; padding-left: 1.75rem; }
  .path__node { top: 6px; }
  .path__pulse { display: none; }
}

/* --------------------------------------------------------------------------
   Flow — light ground, one continuous line down the page
   -------------------------------------------------------------------------- */

.flow {
  position: relative;
  max-width: var(--maxw);
  margin-inline: auto;
  padding: var(--flow-pad) var(--gutter);
}

/* Starts at the centre of the first node and stops at the end of the last
   block, so the line never hangs into empty space at either end. */
.flow__spine {
  position: absolute;
  top: calc(var(--flow-pad) + .45rem + 6px);
  bottom: var(--flow-pad);
  left: calc(var(--gutter) + var(--rail) / 2 - 1px);
  width: 2px;
  background: var(--line);
}
.flow__fill {
  display: block;
  width: 100%;
  height: 0;
  background: linear-gradient(180deg, var(--brand), var(--signal));
}

/* clear the sticky masthead when an anchor link lands */
.block, .contact { scroll-margin-top: 6rem; }

.block {
  display: grid;
  grid-template-columns: var(--rail) minmax(0, 1fr);
  padding-bottom: clamp(3.5rem, 8vw, 6rem);
}
.block:last-child { padding-bottom: 0; }

.block__rail { position: relative; }

.dot {
  position: absolute;
  top: .45rem;
  left: 50%;
  transform: translateX(-50%);
  width: 13px;
  height: 13px;
  border-radius: 50%;
  background: var(--paper);
  border: 2px solid var(--line-strong);
  transition: background-color .35s ease, border-color .35s ease, box-shadow .35s ease;
}
.block.is-active .dot {
  background: var(--signal);
  border-color: var(--signal);
  box-shadow: 0 0 0 5px var(--signal-soft);
}

.block__lede {
  max-width: 58ch;
  color: var(--ink-soft);
  font-size: 1.0625rem;
}

/* --- Services ------------------------------------------------------------- */

.services {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(15rem, 1fr));
  gap: 1px;
  margin-top: 2.75rem;
  background: var(--line);
  border: 1px solid var(--line);
}

.service {
  background: var(--paper);
  padding: 1.75rem 1.5rem;
  transition: background-color .2s ease;
}
.service:hover { background: #fff; }

.service__title {
  font-size: 1.1875rem;
  letter-spacing: -.005em;
  margin-bottom: .625rem;
  padding-bottom: .75rem;
  border-bottom: 2px solid var(--brand);
  /* reserve two lines so the rules stay level across cards */
  min-height: calc(2.16em + .75rem);
}
.service__desc { color: var(--ink-soft); font-size: .9375rem; margin-bottom: 1rem; }

.service__list { font-size: .9375rem; }
.service__list li { position: relative; padding-left: 1.1rem; padding-block: .25rem; }
.service__list li::before {
  content: "";
  position: absolute;
  left: 0;
  top: .85em;
  width: 6px;
  height: 1px;
  background: var(--signal);
}

/* --- Process -------------------------------------------------------------- */

/* Explicit counts, not auto-fit: four stages must not break 3 + 1. */
.steps {
  display: grid;
  grid-template-columns: 1fr;
  gap: 2rem 2.25rem;
  margin-top: 2.5rem;
}
@media (min-width: 34rem) { .steps { grid-template-columns: repeat(2, 1fr); } }
@media (min-width: 64rem) { .steps { grid-template-columns: repeat(4, 1fr); } }

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

.step__num {
  display: block;
  font-family: var(--mono);
  font-size: .75rem;
  letter-spacing: .16em;
  color: var(--signal);
  margin-bottom: .625rem;
}
.step__title { font-size: 1.125rem; margin-bottom: .5rem; }
.step__desc { font-size: .9375rem; color: var(--ink-soft); }

/* --- Why ------------------------------------------------------------------ */

.points {
  display: grid;
  grid-template-columns: 1fr;
  gap: 1.75rem 2.5rem;
  margin-top: 2.5rem;
}
@media (min-width: 40rem) { .points { grid-template-columns: repeat(2, 1fr); } }

.point__title {
  font-size: 1.0625rem;
  margin-bottom: .5rem;
  padding-left: .875rem;
  border-left: 3px solid var(--brand);
}
.point__desc { font-size: .9375rem; color: var(--ink-soft); padding-left: .875rem; }

/* --------------------------------------------------------------------------
   Contact
   -------------------------------------------------------------------------- */

.contact {
  background: var(--panel);
  color: var(--on-panel);
}

.contact__inner {
  max-width: var(--maxw);
  margin-inline: auto;
  padding: clamp(3.5rem, 8vw, 6rem) var(--gutter);
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(19rem, 1fr));
  gap: clamp(2.5rem, 5vw, 4.5rem);
}

.contact__title {
  font-size: clamp(1.75rem, 1.2rem + 2.1vw, 2.75rem);
  letter-spacing: -.02em;
  margin-bottom: 1rem;
  max-width: 16ch;
}
.contact__lede { color: var(--on-panel-dim); max-width: 46ch; }

.channels {
  margin: 0;
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(11rem, 1fr));
  gap: 1.75rem 2rem;
  align-content: start;
}

.channel { min-width: 0; }

.channel__label {
  font-family: var(--mono);
  font-size: .6875rem;
  letter-spacing: .16em;
  text-transform: uppercase;
  color: var(--on-panel-dim);
  margin-bottom: .5rem;
}

.channel__value {
  margin: 0;
  font-family: var(--display);
  font-size: 1.0625rem;
  font-weight: 500;
  overflow-wrap: anywhere;
}
.channel__value a {
  text-decoration: none;
  border-bottom: 1px solid var(--brand-lift);
  padding-bottom: 1px;
  transition: color .18s ease, border-color .18s ease;
}
.channel__value a:hover { color: var(--signal); border-bottom-color: var(--signal); }
.channel__value--plain { color: var(--on-panel-dim); font-weight: 400; line-height: 1.5; }

/* --------------------------------------------------------------------------
   Footer
   -------------------------------------------------------------------------- */

.footer {
  background: var(--panel-deep);
  color: var(--on-panel-dim);
  border-top: 1px solid var(--panel-line);
}

.footer__inner {
  max-width: var(--maxw);
  margin-inline: auto;
  padding: 2rem var(--gutter);
  display: flex;
  flex-wrap: wrap;
  gap: .75rem 2rem;
  justify-content: space-between;
  align-items: baseline;
  font-size: .875rem;
}

.footer__legal { font-family: var(--mono); font-size: .75rem; letter-spacing: .04em; }
.footer__meta { display: flex; gap: 1.5rem; }
.footer__meta a { text-decoration: none; border-bottom: 1px solid var(--panel-line); }
.footer__meta a:hover { color: var(--on-panel); border-bottom-color: var(--signal); }

/* --------------------------------------------------------------------------
   Motion — one orchestrated entrance, then quiet
   -------------------------------------------------------------------------- */

@media (prefers-reduced-motion: no-preference) {

  .has-js .reveal {
    opacity: 0;
    transform: translateY(14px);
  }
  .has-js .reveal.is-in {
    opacity: 1;
    transform: none;
    transition: opacity .6s ease, transform .6s cubic-bezier(.2, .7, .3, 1);
    transition-delay: calc((var(--i, 0) - 1) * 90ms);
  }

  .has-js .path__pulse { animation: travel 5s cubic-bezier(.5, 0, .5, 1) 1.4s infinite; }

  @keyframes travel {
    0%        { left: 0;    opacity: 0; }
    8%        { opacity: 1; }
    62%, 100% { left: 100%; opacity: 0; }
  }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
}
