/* ==========================================================================
   Frixon Systems — styles.css
   Single stylesheet, no build step. Palette and type scale live in :root,
   so colours can be changed in one place.

   Palette follows the Frixon brand identity:
     Deep Blue   #0b66ff   primary — hero, CTAs, bands
     Light Green #c5ff7d   accent — marks, highlights, dark-surface buttons
     Off-white   #fff5f5   light section background
     Dark navy   #04192e   footer, deepest surfaces
   ========================================================================== */

:root {
  /* Brand palette */
  --blue:        #0b66ff;  /* primary */
  --blue-dark:   #0a58db;  /* hover only */
  --green:       #c5ff7d;  /* accent */
  --green-dark:  #b4f562;  /* hover only */
  --navy:        #04192e;  /* deepest / footer */

  /* Surfaces */
  --bg:          #fff5f5;  /* page background — warm off-white */
  --surface:     #ffffff;  /* cards + alternate sections */
  --ink:         #04192e;  /* headings on light */
  --body:        #46586a;  /* body text on light — desaturated navy-gray */

  --placeholder: #FFE79A;  /* unmissable highlight for unfilled figures */

  /* Hairlines */
  --line:        rgba(4, 25, 46, 0.10);
  --line-onDark: rgba(255, 255, 255, 0.16);

  /* Type */
  --font-head: 'Poppins', system-ui, sans-serif;      /* display headings */
  --font-body: 'Open Sans', system-ui, sans-serif;    /* body — brand primary */
  --font-mono: 'IBM Plex Mono', ui-monospace, monospace;

  /* Layout */
  --wrap: 1200px;
  --gutter: 24px;
  --radius: 12px;
  --radius-sm: 6px;

  --section-y: clamp(72px, 9vw, 130px);
}

/* --------------------------------------------------------------------------
   Base
   -------------------------------------------------------------------------- */

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

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

body {
  margin: 0;
  background: var(--bg);
  color: var(--body);
  font-family: var(--font-body);
  font-size: 17px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

@media (min-width: 900px) {
  body { font-size: 18px; }
}

h1, h2, h3 {
  font-family: var(--font-head);
  color: var(--ink);
  line-height: 1.15;
  letter-spacing: -0.02em;
  margin: 0;
  text-wrap: balance;
}

p { margin: 0; }

ul, ol, dl, dd { margin: 0; padding: 0; }
ul, ol { list-style: none; }

a { color: inherit; }

/* Focus — always visible. Blue on light surfaces; light-surface sections
   override to green/white where blue would disappear (see per-section rules). */
:focus-visible {
  outline: 2px solid var(--blue);
  outline-offset: 3px;
  border-radius: 2px;
}

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

/* --------------------------------------------------------------------------
   Shared pieces: wordmark, buttons, tags, placeholders
   -------------------------------------------------------------------------- */

.wordmark {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  text-decoration: none;
  font-family: var(--font-head);
  line-height: 1;
}
.wordmark__mark { display: block; width: 28px; height: auto; }
.wordmark__core {
  font-weight: 700;
  font-size: 23px;
  letter-spacing: -0.01em;
  color: #fff;               /* wordmark sits on blue (header) or navy (footer) */
}
.wordmark__descriptor {
  align-self: flex-end;
  font-weight: 500;
  font-size: 13px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: rgba(255, 255, 255, 0.7);
  padding-bottom: 2px;
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-family: var(--font-head);
  font-weight: 500;
  font-size: 16px;
  line-height: 1;
  padding: 16px 28px;
  border-radius: var(--radius-sm);
  text-decoration: none;
  border: 1px solid transparent;
  transition: background-color 0.18s ease, border-color 0.18s ease, color 0.18s ease;
}
.btn--sm { padding: 12px 20px; font-size: 15px; }

/* Green fill — for use on blue / navy surfaces (header, hero, dark bands) */
.btn--green {
  background: var(--green);
  color: var(--navy);
  font-weight: 600;
}
.btn--green:hover { background: var(--green-dark); }

/* Blue fill — for use on light surfaces (final CTA) */
.btn--blue {
  background: var(--blue);
  color: #fff;
}
.btn--blue:hover { background: var(--blue-dark); }

/* Ghost — outlined, for the light-on-blue secondary action in the hero */
.btn--ghost {
  background: transparent;
  color: #fff;
  border-color: rgba(255, 255, 255, 0.45);
}
.btn--ghost:hover { border-color: #fff; background: rgba(255, 255, 255, 0.08); }

/* Small accent label. Blue by default (light surfaces); overridden to green
   on dark surfaces further down. */
.eyebrow,
.tag {
  font-family: var(--font-head);
  font-weight: 600;
  font-size: 12.5px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--blue);
  margin: 0;
}

/* Unfilled figures — impossible to publish by accident */
.placeholder {
  background: var(--placeholder);
  color: #5A4300;
  padding: 0.1em 0.4em;
  border-radius: 4px;
  font-family: var(--font-mono);
  font-size: 0.85em;
  box-decoration-break: clone;
  -webkit-box-decoration-break: clone;
}

/* --------------------------------------------------------------------------
   Nav — solid blue, sticky, continuous with the hero
   -------------------------------------------------------------------------- */

.site-header {
  position: sticky;
  top: 0;
  z-index: 20;
  background: var(--blue);
}

.nav-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  padding-block: 18px;
}

.nav {
  display: flex;
  align-items: center;
  gap: 36px;
}

.nav__links {
  display: flex;
  align-items: center;
  gap: 32px;
  font-size: 16px;
}
.nav__links a {
  text-decoration: none;
  color: rgba(255, 255, 255, 0.85);
  transition: color 0.18s ease;
}
.nav__links a:hover { color: #fff; }

/* Focus on the blue header should be green, not invisible blue */
.site-header :focus-visible { outline-color: var(--green); }

/* Mobile: links collapse away, the CTA stays */
@media (max-width: 767px) {
  .nav__links { display: none; }
  .wordmark__core { font-size: 20px; }
  .wordmark__descriptor { font-size: 11px; }
}

/* --------------------------------------------------------------------------
   Sections
   -------------------------------------------------------------------------- */

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

/* Alternate light surface (white against the off-white page) */
.section--tint { background: var(--surface); }

.section__head { max-width: 820px; margin-bottom: clamp(40px, 5vw, 64px); }

.section__title { font-size: clamp(28px, 3.4vw, 42px); font-weight: 600; }

.section__lede {
  margin-top: 20px;
  font-size: clamp(17px, 1.5vw, 19px);
  max-width: 62ch;
}

.section__head--onDark .section__title { color: #fff; }
.section__head--onDark .section__lede { color: rgba(255, 255, 255, 0.82); }

/* --------------------------------------------------------------------------
   Hero — deep blue, white type, green + ghost actions
   -------------------------------------------------------------------------- */

.hero {
  background: var(--blue);
  color: #fff;
  padding-block: clamp(48px, 7vw, 96px) clamp(64px, 8vw, 112px);
}

.hero :focus-visible { outline-color: var(--green); }

.hero__inner {
  display: grid;
  grid-template-columns: 1fr;
  gap: clamp(48px, 6vw, 72px);
  align-items: center;
}

@media (min-width: 900px) {
  .hero__inner {
    grid-template-columns: minmax(0, 1.05fr) minmax(0, 1fr);
    gap: 64px;
  }
}

.hero .eyebrow { color: var(--green); }

.hero__title {
  margin-top: 18px;
  color: #fff;
  font-size: clamp(34px, 5.2vw, 64px);
  font-weight: 700;
  letter-spacing: -0.03em;
  max-width: 15ch;
}
.hero__title-soft {
  display: block;
  color: rgba(255, 255, 255, 0.55); /* lighter, per brief's second sentence */
  font-weight: 600;
}

.hero__sub {
  margin-top: 26px;
  max-width: 56ch;
  color: rgba(255, 255, 255, 0.88);
  font-size: clamp(17px, 1.6vw, 19px);
}

.hero__actions {
  margin-top: 36px;
  display: flex;
  flex-wrap: wrap;
  gap: 14px;
}

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

.hero__visual { min-width: 0; }

.friction {
  width: 100%;
  height: auto;
  display: block;
  overflow: visible;
}

.friction__line {
  stroke: #fff;
  stroke-width: 2.5;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.friction__dot { fill: var(--green); }

.friction__endlabel {
  font-family: var(--font-mono);
  font-size: 12px;
  fill: rgba(255, 255, 255, 0.7);
}
.friction__endlabel--right { text-anchor: end; }

.friction__steps text {
  font-family: var(--font-mono);
  font-size: 13px;
  fill: rgba(255, 255, 255, 0.85);
}

/* --------------------------------------------------------------------------
   Card grid — what we automate
   -------------------------------------------------------------------------- */

.cards {
  display: grid;
  grid-template-columns: 1fr;
  gap: 20px;
}

@media (min-width: 640px) {
  .cards { grid-template-columns: repeat(2, 1fr); }
}
@media (min-width: 1000px) {
  .cards { grid-template-columns: repeat(3, 1fr); gap: 24px; }
}

.card {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 30px 28px 32px;
}

.card__title {
  margin-top: 14px;
  font-size: 20px;
  font-weight: 600;
}

.card__body { margin-top: 12px; font-size: 16.5px; }

/* --------------------------------------------------------------------------
   Case studies
   -------------------------------------------------------------------------- */

.cases {
  display: grid;
  grid-template-columns: 1fr;
  gap: 24px;
}
@media (min-width: 860px) {
  .cases { grid-template-columns: repeat(2, 1fr); gap: 28px; }
}

.case {
  background: var(--bg);           /* sits on the white --tint section */
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 34px 32px 36px;
}

.case__title {
  margin-top: 14px;
  font-size: clamp(22px, 2.2vw, 26px);
  font-weight: 600;
}

.case__list { margin-top: 26px; }

.case__list dt {
  font-family: var(--font-head);
  font-weight: 600;
  font-size: 13px;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--blue);
}

.case__list dd {
  margin: 8px 0 22px;
  font-size: 16.5px;
}
.case__list dd:last-child { margin-bottom: 0; }

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

.steps {
  display: grid;
  grid-template-columns: 1fr;
  gap: 40px;
}
@media (min-width: 860px) {
  .steps { grid-template-columns: repeat(3, 1fr); gap: 48px; }
}

.step { padding-top: 22px; border-top: 2px solid var(--blue); }

.step__num {
  font-family: var(--font-mono);
  font-size: 14px;
  color: var(--blue);
}

.step__title {
  margin-top: 12px;
  font-size: 22px;
  font-weight: 600;
}

.step__body { margin-top: 12px; font-size: 16.5px; }

/* --------------------------------------------------------------------------
   Track record band — deep blue, light text, green numbers
   -------------------------------------------------------------------------- */

.band {
  background: var(--blue);
  color: rgba(255, 255, 255, 0.82);
  padding-block: var(--section-y);
}
.band :focus-visible { outline-color: var(--green); }

.stats {
  display: grid;
  grid-template-columns: 1fr;
  gap: 40px;
}
@media (min-width: 700px) {
  .stats { grid-template-columns: repeat(3, 1fr); gap: 32px; }
}

.stat { padding-top: 24px; border-top: 1px solid var(--line-onDark); }

.stat__num {
  font-family: var(--font-head);
  font-weight: 700;
  font-size: clamp(38px, 4.5vw, 54px);
  line-height: 1.1;
  color: var(--green);
}

.stat__cap {
  margin-top: 10px;
  font-size: 16px;
  color: rgba(255, 255, 255, 0.78);
}

/* --------------------------------------------------------------------------
   Final CTA — light surface, blue button
   -------------------------------------------------------------------------- */

.cta__inner { max-width: 720px; }
.cta__inner .section__title { font-size: clamp(30px, 3.8vw, 46px); }

.cta__actions {
  margin-top: 36px;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 14px 28px;
}

.cta__email {
  font-family: var(--font-head);
  font-weight: 500;
  color: var(--ink);
  text-decoration: none;
  border-bottom: 1px solid rgba(4, 25, 46, 0.3);
  padding-bottom: 2px;
}
.cta__email:hover { border-bottom-color: var(--blue); color: var(--blue); }

/* --------------------------------------------------------------------------
   Footer — dark navy
   -------------------------------------------------------------------------- */

.site-footer {
  background: var(--navy);
  color: rgba(255, 255, 255, 0.7);
  padding-block: 48px;
}
.site-footer :focus-visible { outline-color: var(--green); }

.footer-inner {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
}

.footer-social {
  display: flex;
  gap: 26px;
  font-size: 16px;
}
.footer-social a {
  text-decoration: none;
  color: rgba(255, 255, 255, 0.7);
  transition: color 0.18s ease;
}
.footer-social a:hover { color: var(--green); }

.footer-copy { font-size: 15px; color: rgba(255, 255, 255, 0.5); }

/* --------------------------------------------------------------------------
   Scroll reveal — understated fade-up, applied by script.js
   -------------------------------------------------------------------------- */

.js .reveal {
  opacity: 0;
  transform: translateY(14px);
  transition: opacity 0.6s ease, transform 0.6s ease;
}
.js .reveal.is-visible {
  opacity: 1;
  transform: none;
}

/* --------------------------------------------------------------------------
   Reduced motion
   -------------------------------------------------------------------------- */

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

  .js .reveal { opacity: 1; transform: none; transition: none; }

  *, *::before, *::after {
    animation-duration: 0.001ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.001ms !important;
  }
}

/* --------------------------------------------------------------------------
   Narrow phones (360px and down stays comfortable)
   -------------------------------------------------------------------------- */

@media (max-width: 400px) {
  :root { --gutter: 18px; }
  .card { padding: 26px 22px 28px; }
  .case { padding: 28px 22px 30px; }
  .btn { padding: 15px 22px; }
  .hero__actions .btn { flex: 1 1 auto; }
}
