/* ==========================================================================
   Kala-X Technology — site stylesheet
   Built to kala-x-design-guidelines.html v1.0
   Palette, type scale, 8-pt spacing and radii are taken from the guidelines;
   nothing here invents a token that isn't in the brand system.
   ========================================================================== */

/* --------------------------------------------------------------------------
   1. Tokens
   -------------------------------------------------------------------------- */
:root {
  /* Brand palette — exact hex from the guidelines */
  --slate:        #363D48;   /* core dark        */
  --emerald:      #1E9272;   /* accent · action  */
  --sage:         #B7D0CD;   /* support · surface*/
  --sand:         #CEBBAD;   /* support · warm   */
  --red:          #AC2624;   /* functional · alert only */
  --ink:          #323330;   /* core text        */
  --white:        #FFFFFF;

  /* Derived neutrals — the 60% base. Warm, never grey-blue. */
  --paper:        #FAF8F6;
  --paper-deep:   #F1EDE8;
  --sage-wash:    #EAF1F0;
  --sand-wash:    #F6F0EA;

  /* Derived tints of brand colours (opacity only — no new hues) */
  --slate-soft:   #697382;
  --slate-lift:   #414A57;
  --slate-hover:  #4A5462;
  --line:         rgba(54, 61, 72, 0.14);
  --line-soft:    rgba(54, 61, 72, 0.07);
  --line-dark:    rgba(255, 255, 255, 0.14);
  --line-dark-soft: rgba(255, 255, 255, 0.07);
  --emerald-wash: rgba(30, 146, 114, 0.08);

  /* Spacing — 8-pt grid, 4 as the fine step */
  --s-xs:   4px;
  --s-sm:   8px;
  --s-md:  16px;
  --s-lg:  24px;
  --s-xl:  32px;
  --s-2xl: 48px;
  --s-3xl: 64px;
  --s-4xl: 96px;

  /* Radius */
  --r-btn:  6px;
  --r-card: 12px;
  --r-pill: 20px;

  /* Layout */
  --maxw:   1120px;
  --gutter: 24px;

  /* Type */
  --display: "Montserrat", system-ui, sans-serif;
  --body:    "Lato", system-ui, sans-serif;

  /* Motion */
  --ease: cubic-bezier(0.2, 0.7, 0.3, 1);
}

/* --------------------------------------------------------------------------
   2. Reset & base
   -------------------------------------------------------------------------- */
*, *::before, *::after { box-sizing: border-box; }

html {
  -webkit-text-size-adjust: 100%;
  scroll-behavior: smooth;
  scroll-padding-top: 96px;
}

body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: var(--body);
  font-size: 16px;
  line-height: 1.625;          /* 16/26 per the guidelines */
  font-weight: 400;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  overflow-x: hidden;
}

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

h1, h2, h3, h4 {
  font-family: var(--display);
  color: var(--slate);
  margin: 0;
  text-wrap: balance;
}

p { margin: 0; }
ul { margin: 0; padding: 0; list-style: none; }

a { color: inherit; text-decoration: none; }

::selection { background: var(--emerald); color: var(--white); }

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

/* --------------------------------------------------------------------------
   3. Type scale  (Montserrat leads, Lato carries)
   -------------------------------------------------------------------------- */
.t-display {
  font-family: var(--display);
  font-weight: 700;
  font-size: clamp(2.5rem, 1.35rem + 4.6vw, 4.5rem);
  line-height: 1.06;
  letter-spacing: -0.03em;
}

.t-h1 {
  font-family: var(--display);
  font-weight: 700;
  font-size: clamp(1.875rem, 1.35rem + 2.1vw, 2.75rem);
  line-height: 1.16;
  letter-spacing: -0.022em;
}

.t-h2 {
  font-family: var(--display);
  font-weight: 600;
  font-size: clamp(1.375rem, 1.2rem + 0.7vw, 1.625rem);
  line-height: 1.27;
  letter-spacing: -0.014em;
}

.t-h3 {
  font-family: var(--display);
  font-weight: 600;
  font-size: 1.0625rem;
  line-height: 1.4;
  letter-spacing: -0.006em;
}

.t-lead {
  font-size: clamp(1.0625rem, 1rem + 0.32vw, 1.25rem);
  line-height: 1.62;
  color: var(--slate-soft);
  max-width: 62ch;
}

.t-body   { font-size: 1rem;     line-height: 1.625; color: var(--slate-soft); max-width: 68ch; }
.t-cap    { font-size: 0.8125rem; line-height: 1.46; color: var(--slate-soft); }

/* Eyebrow — Montserrat 600 · 12 · +0.2em, with the guidelines' section number */
.eyebrow {
  display: flex;
  align-items: center;
  gap: var(--s-md);
  font-family: var(--display);
  font-weight: 600;
  font-size: 0.75rem;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--slate);
}

.eyebrow__num {
  font-variant-numeric: tabular-nums;
  color: var(--emerald);
}

.eyebrow::after {
  content: "";
  flex: 1;
  height: 1px;
  background: var(--line);
  max-width: 120px;
}

.eyebrow--center { justify-content: center; }
.eyebrow--center::after { display: none; }

/* Reversed variants for slate surfaces */
.on-dark { color: var(--white); }
.on-dark h1, .on-dark h2, .on-dark h3, .on-dark h4 { color: var(--white); }
.on-dark .t-lead, .on-dark .t-body, .on-dark .t-cap { color: rgba(255,255,255,0.72); }
.on-dark .eyebrow { color: var(--white); }
.on-dark .eyebrow__num { color: var(--sage); }
.on-dark .eyebrow::after { background: var(--line-dark); }

/* --------------------------------------------------------------------------
   4. Layout primitives
   -------------------------------------------------------------------------- */
.wrap {
  width: 100%;
  max-width: var(--maxw);
  margin-inline: auto;
  padding-inline: var(--gutter);
}

.section { padding-block: clamp(64px, 8vw, 96px); position: relative; }
.section--tight { padding-block: clamp(48px, 6vw, 64px); }

.section--slate  { background: var(--slate); color: var(--white); }
.section--sand   { background: var(--sand-wash); }
.section--sage   { background: var(--sage-wash); }
.section--paper2 { background: var(--paper-deep); }

.stack   { display: flex; flex-direction: column; }
.stack-sm  > * + * { margin-top: var(--s-sm); }
.stack-md  > * + * { margin-top: var(--s-md); }
.stack-lg  > * + * { margin-top: var(--s-lg); }
.stack-xl  > * + * { margin-top: var(--s-xl); }
.stack-2xl > * + * { margin-top: var(--s-2xl); }

.grid { display: grid; gap: var(--s-lg); }
.grid-2 { grid-template-columns: repeat(2, 1fr); }
.grid-3 { grid-template-columns: repeat(3, 1fr); }
.grid-4 { grid-template-columns: repeat(4, 1fr); }

/* Section head: title left, supporting copy right — the recurring editorial rhythm */
.sec-head {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  gap: var(--s-xl) var(--s-2xl);
  align-items: end;
  margin-bottom: var(--s-2xl);
}

/* Faint 12-column blueprint rule — "the craft is visible in the precision" */
.ruled { position: relative; }
.ruled::before {
  content: "";
  position: absolute;
  inset: 0;
  max-width: var(--maxw);
  margin-inline: auto;
  pointer-events: none;
  background-image: repeating-linear-gradient(
    to right,
    var(--line-soft) 0 1px,
    transparent 1px calc(100% / 6)
  );
  z-index: 0;
}
.section--slate.ruled::before {
  background-image: repeating-linear-gradient(
    to right,
    var(--line-dark-soft) 0 1px,
    transparent 1px calc(100% / 6)
  );
}
.ruled > * { position: relative; z-index: 1; }

/* --------------------------------------------------------------------------
   5. Buttons  (one emerald primary per view; everything else stays quiet)
   -------------------------------------------------------------------------- */
.btn {
  --btn-bg: var(--emerald);
  --btn-fg: var(--white);
  display: inline-flex;
  align-items: center;
  gap: var(--s-sm);
  padding: 13px 24px;
  border: 1px solid transparent;
  border-radius: var(--r-btn);
  background: var(--btn-bg);
  color: var(--btn-fg);
  font-family: var(--display);
  font-weight: 600;
  font-size: 0.9375rem;
  letter-spacing: -0.004em;
  line-height: 1;
  cursor: pointer;
  transition: background .22s var(--ease), border-color .22s var(--ease),
              color .22s var(--ease), transform .22s var(--ease);
}
.btn:hover { transform: translateY(-1px); }
.btn:active { transform: translateY(0); }

.btn--primary:hover { background: #197b60; }

.btn--outline {
  background: transparent;
  color: var(--slate);
  border-color: var(--line);
}
.btn--outline:hover { border-color: var(--slate); background: rgba(54,61,72,0.04); }

.btn--ghost {
  background: transparent;
  color: var(--emerald);
  padding-inline: 0;
}
.btn--ghost .btn__arrow { transition: transform .22s var(--ease); }
.btn--ghost:hover { transform: none; }
.btn--ghost:hover .btn__arrow { transform: translateX(4px); }

/* On slate */
.on-dark .btn--outline { color: var(--white); border-color: var(--line-dark); }
.on-dark .btn--outline:hover { border-color: var(--white); background: rgba(255,255,255,0.06); }
.on-dark .btn--ghost { color: var(--sage); }

.btn-row { display: flex; flex-wrap: wrap; gap: var(--s-md); align-items: center; }

/* Inline links — emerald with an underline, per the guidelines */
.link {
  color: var(--emerald);
  text-decoration: underline;
  text-underline-offset: 3px;
  text-decoration-thickness: 1px;
  font-weight: 700;
}
.link:hover { text-decoration-thickness: 2px; }
.on-dark .link { color: var(--sage); }

/* --------------------------------------------------------------------------
   6. The framed X — the brand's one emphasised element
   -------------------------------------------------------------------------- */
.framed {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border: 1px solid var(--emerald);
  color: var(--emerald);
  font-family: var(--display);
  font-weight: 300;
  line-height: 1;
  aspect-ratio: 1;
}

/* Headline-scale X, set to cap height of the display type */
.framed--display {
  width: clamp(2.6rem, 1.4rem + 4.8vw, 4.7rem);
  font-size: clamp(1.5rem, 0.8rem + 2.8vw, 2.7rem);
  vertical-align: baseline;
  transform: translateY(0.14em);
  margin-inline: 0.08em;
}

.on-dark .framed { border-color: var(--sage); color: var(--sage); }

/* Corner brackets — the frame motif applied to cards */
.bracket { position: relative; }
.bracket::before,
.bracket::after {
  content: "";
  position: absolute;
  width: 13px;
  height: 13px;
  border: 1px solid var(--emerald);
  opacity: 0;
  transition: opacity .28s var(--ease);
}
.bracket::before { top: -1px;    left: -1px;  border-right: 0; border-bottom: 0; }
.bracket::after  { bottom: -1px; right: -1px; border-left: 0;  border-top: 0; }
.bracket:hover::before,
.bracket:hover::after { opacity: 1; }

/* --------------------------------------------------------------------------
   7. Header
   -------------------------------------------------------------------------- */
.site-header {
  position: sticky;
  top: 0;
  z-index: 60;
  background: rgba(250, 248, 246, 0.86);
  backdrop-filter: saturate(1.5) blur(12px);
  -webkit-backdrop-filter: saturate(1.5) blur(12px);
  border-bottom: 1px solid transparent;
  transition: border-color .3s var(--ease), background .3s var(--ease);
}
.site-header.is-stuck {
  border-bottom-color: var(--line);
  background: rgba(250, 248, 246, 0.94);
}

.nav {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--s-xl);
  height: 76px;
}

.nav__logo img { width: 132px; }

.nav__links {
  display: flex;
  align-items: center;
  gap: var(--s-xl);
}

.nav__link {
  font-family: var(--display);
  font-weight: 500;
  font-size: 0.875rem;
  color: var(--slate);
  position: relative;
  padding-block: 6px;
  transition: color .2s var(--ease);
}
.nav__link::after {
  content: "";
  position: absolute;
  left: 0; right: 0; bottom: 0;
  height: 1.5px;
  background: var(--emerald);
  transform: scaleX(0);
  transform-origin: left;
  transition: transform .28s var(--ease);
}
.nav__link:hover { color: var(--emerald); }
.nav__link:hover::after,
.nav__link[aria-current="page"]::after { transform: scaleX(1); }
.nav__link[aria-current="page"] { color: var(--emerald); }

.nav__cta { margin-left: var(--s-sm); }

/* Mobile toggle */
.nav__toggle {
  display: none;
  width: 42px; height: 42px;
  align-items: center;
  justify-content: center;
  background: transparent;
  border: 1px solid var(--line);
  border-radius: var(--r-btn);
  cursor: pointer;
  color: var(--slate);
}
.nav__toggle span,
.nav__toggle span::before,
.nav__toggle span::after {
  content: "";
  display: block;
  width: 17px; height: 1.5px;
  background: currentColor;
  transition: transform .3s var(--ease), opacity .2s var(--ease);
}
.nav__toggle span::before { transform: translateY(-5.5px); }
.nav__toggle span::after  { transform: translateY(4px); }
.nav__toggle[aria-expanded="true"] span { background: transparent; }
.nav__toggle[aria-expanded="true"] span::before { transform: rotate(45deg); }
.nav__toggle[aria-expanded="true"] span::after  { transform: rotate(-45deg) translateY(0); }

/* --------------------------------------------------------------------------
   8. Hero
   -------------------------------------------------------------------------- */
.hero {
  position: relative;
  padding-block: clamp(56px, 8vw, 104px) clamp(56px, 7vw, 88px);
  overflow: hidden;
}

.hero__inner {
  display: grid;
  grid-template-columns: minmax(0, 1.08fr) minmax(0, 0.92fr);
  gap: var(--s-2xl) var(--s-4xl);
  align-items: center;
}

.hero__title { margin-bottom: var(--s-lg); }

.hero__meta {
  display: flex;
  align-items: center;
  gap: var(--s-md);
  font-family: var(--display);
  font-weight: 600;
  font-size: 0.75rem;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--slate-soft);
  margin-bottom: var(--s-lg);
}
.hero__dot {
  width: 6px; height: 6px;
  border-radius: 50%;
  background: var(--emerald);
  flex: none;
}

.hero__actions { margin-top: var(--s-xl); }

/* Technical-drawing plate: the symbol inside a measured frame */
.plate {
  position: relative;
  aspect-ratio: 1;
  width: 100%;
  max-width: 380px;
  margin-inline: auto;
  display: grid;
  place-items: center;
  border: 1px solid var(--line);
  border-radius: var(--r-card);
  background:
    radial-gradient(120% 120% at 30% 20%, rgba(255,255,255,0.9), rgba(255,255,255,0) 60%),
    var(--paper-deep);
}
/* Tick marks on each edge — the "measured" read */
.plate::before {
  content: "";
  position: absolute;
  inset: 22px;
  border: 1px dashed rgba(54,61,72,0.16);
  border-radius: 4px;
}
.plate__mark {
  width: 56%;
  filter: drop-shadow(0 12px 28px rgba(30,146,114,0.14));
}
.plate__tag {
  position: absolute;
  font-family: var(--display);
  font-weight: 600;
  font-size: 0.625rem;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--slate-soft);
  background: var(--paper-deep);
  padding-inline: 6px;
}
.plate__tag--tl { top: -7px;  left: 28px; }
.plate__tag--br { bottom: -7px; right: 28px; color: var(--emerald); }

/* Floating annotation chips around the plate */
.plate-wrap { position: relative; }
.chip {
  position: absolute;
  display: inline-flex;
  align-items: center;
  gap: var(--s-sm);
  padding: 8px 14px;
  border-radius: var(--r-pill);
  background: var(--white);
  border: 1px solid var(--line);
  box-shadow: 0 8px 24px rgba(54,61,72,0.07);
  font-family: var(--display);
  font-weight: 600;
  font-size: 0.75rem;
  letter-spacing: 0.02em;
  color: var(--slate);
  white-space: nowrap;
}
.chip__dot { width: 7px; height: 7px; border-radius: 50%; flex: none; }
.chip--a { top: 12%;  left: -6%; }
.chip--b { top: 46%;  right: -8%; }
.chip--c { bottom: 11%; left: 2%; }

/* Credential strip below the hero */
.strip {
  border-block: 1px solid var(--line);
  background: rgba(255,255,255,0.5);
}
.strip__inner {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: var(--s-md) var(--s-2xl);
  padding-block: var(--s-lg);
  font-family: var(--display);
  font-weight: 500;
  font-size: 0.8125rem;
  letter-spacing: 0.04em;
  color: var(--slate-soft);
}
.strip__item { display: flex; align-items: center; gap: 10px; }
.strip__x {
  width: 14px; height: 14px;
  border: 1px solid var(--emerald);
  display: grid; place-items: center;
  font-size: 8px; color: var(--emerald);
  font-weight: 600; line-height: 1; flex: none;
}

/* --------------------------------------------------------------------------
   9. Cards
   -------------------------------------------------------------------------- */
.card {
  background: var(--white);
  border: 1px solid var(--line);
  border-radius: var(--r-card);
  padding: var(--s-xl);
  transition: border-color .28s var(--ease), box-shadow .28s var(--ease),
              transform .28s var(--ease);
}
.card:hover {
  border-color: rgba(54,61,72,0.24);
  box-shadow: 0 14px 40px rgba(54,61,72,0.08);
  transform: translateY(-3px);
}

.card__num {
  font-family: var(--display);
  font-weight: 600;
  font-size: 0.6875rem;
  letter-spacing: 0.2em;
  color: var(--emerald);
  display: block;
  margin-bottom: var(--s-md);
}

.card__title { margin-bottom: var(--s-sm); }

.on-dark .card {
  background: var(--slate-lift);
  border-color: var(--line-dark);
}
.on-dark .card:hover {
  border-color: rgba(255,255,255,0.28);
  box-shadow: 0 14px 40px rgba(0,0,0,0.22);
}
.on-dark .card__num { color: var(--sage); }

/* Principle card — no chrome, just a rule */
.principle {
  padding-top: var(--s-lg);
  border-top: 1px solid var(--line);
}
.principle__k {
  font-family: var(--display);
  font-weight: 700;
  font-size: 1.125rem;
  color: var(--slate);
  margin-bottom: var(--s-sm);
  display: flex;
  align-items: baseline;
  gap: var(--s-sm);
}
.principle__k::before {
  content: "";
  width: 8px; height: 8px;
  border: 1px solid var(--emerald);
  flex: none;
  transform: translateY(-1px);
}

/* Feature list with the framed-X bullet */
.flist > li {
  display: grid;
  grid-template-columns: 16px 1fr;
  gap: var(--s-md);
  padding-block: 10px;
  font-size: 0.9375rem;
  line-height: 1.55;
  color: var(--slate-soft);
}
.flist > li + li { border-top: 1px solid var(--line); }
.flist > li::before {
  content: "";
  width: 9px; height: 9px;
  border: 1px solid var(--emerald);
  margin-top: 7px;
}
.on-dark .flist > li { color: rgba(255,255,255,0.72); }
.on-dark .flist > li + li { border-top-color: var(--line-dark); }
.on-dark .flist > li::before { border-color: var(--sage); }

.flist b, .flist strong { color: var(--slate); font-weight: 700; }
.on-dark .flist b, .on-dark .flist strong { color: var(--white); }

/* --------------------------------------------------------------------------
   10. Product / app cards
   -------------------------------------------------------------------------- */
.app-card {
  display: flex;
  flex-direction: column;
  background: var(--white);
  border: 1px solid var(--line);
  border-radius: var(--r-card);
  overflow: hidden;
  transition: border-color .28s var(--ease), box-shadow .28s var(--ease),
              transform .28s var(--ease);
}
.app-card:hover {
  border-color: rgba(54,61,72,0.24);
  box-shadow: 0 18px 48px rgba(54,61,72,0.10);
  transform: translateY(-4px);
}

/* Each app carries its own product accent as a thin top rule — identification,
   not decoration. Kala-X emerald stays the only interactive colour. */
.app-card__bar { height: 3px; width: 100%; background: var(--accent, var(--emerald)); }

.app-card__body { padding: var(--s-xl); display: flex; flex-direction: column; flex: 1; }

.app-card__head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--s-md);
  margin-bottom: var(--s-md);
}

.app-card__name { font-family: var(--display); font-weight: 700; font-size: 1.25rem; color: var(--slate); letter-spacing: -0.015em; }
.app-card__kind { font-size: 0.8125rem; color: var(--slate-soft); margin-top: 2px; }

/* App icon tile — each app's real mark, shown the way it appears on a phone */
.app-card__glyph {
  width: 48px; height: 48px;
  border-radius: 11px;
  overflow: hidden;
  flex: none;
  background: var(--accent-wash, var(--emerald-wash));
  box-shadow: 0 2px 8px rgba(54,61,72,0.12), inset 0 0 0 1px rgba(54,61,72,0.06);
}
.app-card__glyph img { width: 100%; height: 100%; display: block; }

.app-card__foot { margin-top: auto; padding-top: var(--s-lg); }

/* Status pill */
.pill {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  padding: 5px 12px;
  border-radius: var(--r-pill);
  border: 1px solid var(--line);
  font-family: var(--display);
  font-weight: 600;
  font-size: 0.6875rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--slate-soft);
  background: var(--paper);
}
.pill__dot { width: 6px; height: 6px; border-radius: 50%; background: var(--emerald); flex: none; }
.pill--live   { color: var(--emerald); border-color: rgba(30,146,114,0.3); background: var(--emerald-wash); }
.pill--soon   { color: var(--slate-soft); }
.pill--soon .pill__dot { background: var(--sand); }
.on-dark .pill { background: var(--slate-lift); border-color: var(--line-dark); color: rgba(255,255,255,0.78); }
.on-dark .pill--live { color: var(--sage); border-color: rgba(183,208,205,0.35); }
.on-dark .pill--live .pill__dot { background: var(--sage); }

/* --------------------------------------------------------------------------
   11. Module grid (KX-Track)
   -------------------------------------------------------------------------- */
.modules {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  border: 1px solid var(--line-dark);
  border-radius: var(--r-card);
  overflow: hidden;
  /* Opaque, so the section's blueprint hairlines stop at the edge of the
     grid instead of running through the cards. */
  background: var(--slate-lift);
}
.module {
  padding: var(--s-xl);
  border-right: 1px solid var(--line-dark);
  border-bottom: 1px solid var(--line-dark);
  transition: background .28s var(--ease);
}
.module:hover { background: var(--slate-hover); }
.module:nth-child(3n) { border-right: 0; }
.module:nth-last-child(-n+3) { border-bottom: 0; }
.module__k {
  font-family: var(--display);
  font-weight: 600;
  font-size: 0.6875rem;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--sage);
  margin-bottom: var(--s-sm);
  display: block;
}
.module__t { color: var(--white); font-size: 1.0625rem; margin-bottom: 6px; }
.module__d { font-size: 0.9063rem; line-height: 1.55; color: rgba(255,255,255,0.68); }

/* Stat block */
.stats { display: grid; grid-template-columns: repeat(4, 1fr); gap: var(--s-lg); }
.stat { border-top: 1px solid var(--line); padding-top: var(--s-md); }
.stat__n {
  font-family: var(--display);
  font-weight: 700;
  font-size: clamp(1.75rem, 1.4rem + 1.4vw, 2.25rem);
  color: var(--slate);
  letter-spacing: -0.03em;
  line-height: 1.1;
}
.stat__l { font-size: 0.8125rem; color: var(--slate-soft); margin-top: 4px; }
.on-dark .stat { border-top-color: var(--line-dark); }
.on-dark .stat__n { color: var(--white); }
.on-dark .stat__l { color: rgba(255,255,255,0.66); }

/* --------------------------------------------------------------------------
   12. Quote
   -------------------------------------------------------------------------- */
.quote {
  border-left: 2px solid var(--sand);
  padding-left: clamp(var(--s-lg), 3vw, var(--s-2xl));
  max-width: 44ch;
}
.quote__t {
  font-family: var(--display);
  font-weight: 500;
  font-size: clamp(1.25rem, 1rem + 1.1vw, 1.75rem);
  line-height: 1.38;
  letter-spacing: -0.018em;
  color: var(--slate);
}
.quote__a {
  margin-top: var(--s-md);
  font-family: var(--display);
  font-weight: 600;
  font-size: 0.75rem;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--slate-soft);
}

/* --------------------------------------------------------------------------
   13. Process / timeline
   -------------------------------------------------------------------------- */
.steps { counter-reset: step; display: grid; gap: 0; }
.step {
  display: grid;
  grid-template-columns: 84px 1fr;
  gap: var(--s-xl);
  padding-block: var(--s-xl);
  border-top: 1px solid var(--line);
  align-items: start;
}
.step:last-child { border-bottom: 1px solid var(--line); }
.step__n {
  font-family: var(--display);
  font-weight: 700;
  font-size: 0.75rem;
  letter-spacing: 0.2em;
  color: var(--emerald);
  padding-top: 5px;
}
.step__t { margin-bottom: 6px; }

/* --------------------------------------------------------------------------
   14. Forms
   -------------------------------------------------------------------------- */
.field { display: block; }
.field__label {
  display: block;
  font-family: var(--display);
  font-weight: 600;
  font-size: 0.8125rem;
  color: var(--slate);
  margin-bottom: var(--s-sm);
}
.field__hint { font-size: 0.8125rem; color: var(--slate-soft); margin-top: 6px; }

.input, .textarea, .select {
  width: 100%;
  font-family: var(--body);
  font-size: 1rem;
  line-height: 1.5;
  color: var(--ink);
  background: var(--white);
  border: 1px solid var(--line);
  border-radius: var(--r-btn);
  padding: 12px 14px;
  transition: border-color .2s var(--ease), box-shadow .2s var(--ease);
}
.input::placeholder, .textarea::placeholder { color: #9AA1A9; }
.input:focus, .textarea:focus, .select:focus {
  outline: none;
  border-color: var(--emerald);
  box-shadow: 0 0 0 3px rgba(30,146,114,0.16);
}
.textarea { min-height: 148px; resize: vertical; }

.form-grid { display: grid; grid-template-columns: 1fr 1fr; gap: var(--s-lg); }
.form-grid .span-2 { grid-column: 1 / -1; }

.form-note {
  font-size: 0.8125rem;
  color: var(--slate-soft);
  border-left: 2px solid var(--sand);
  padding-left: var(--s-md);
}

/* --------------------------------------------------------------------------
   15. Contact panel
   -------------------------------------------------------------------------- */
.contact-line {
  display: flex;
  align-items: flex-start;
  gap: var(--s-md);
  padding-block: var(--s-md);
  border-top: 1px solid var(--line-dark);
}
.contact-line__k {
  font-family: var(--display);
  font-weight: 600;
  font-size: 0.6875rem;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--sage);
  width: 92px;
  flex: none;
  padding-top: 5px;
}
.contact-line__v { color: var(--white); font-size: 1.0625rem; }

/* --------------------------------------------------------------------------
   16. CTA band
   -------------------------------------------------------------------------- */
.cta {
  background: var(--slate);
  color: var(--white);
  border-radius: var(--r-card);
  padding: clamp(var(--s-xl), 5vw, var(--s-4xl));
  position: relative;
  overflow: hidden;
}
.cta::after {
  content: "";
  position: absolute;
  right: -70px; top: 50%;
  width: 260px; height: 260px;
  transform: translateY(-50%) rotate(45deg);
  border: 1px solid rgba(255,255,255,0.10);
  border-radius: 24px;
  pointer-events: none;
}

/* --------------------------------------------------------------------------
   17. Footer
   -------------------------------------------------------------------------- */
.site-footer {
  background: var(--slate);
  color: rgba(255,255,255,0.72);
  padding-block: var(--s-4xl) var(--s-xl);
}
.footer-grid {
  display: grid;
  grid-template-columns: 1.6fr 1fr 1fr 1fr;
  gap: var(--s-2xl) var(--s-xl);
  padding-bottom: var(--s-2xl);
  border-bottom: 1px solid var(--line-dark);
}
.footer__logo img { width: 150px; margin-bottom: var(--s-md); }
.footer__tag { font-size: 0.9375rem; color: rgba(255,255,255,0.66); max-width: 34ch; }
.footer__h {
  font-family: var(--display);
  font-weight: 600;
  font-size: 0.6875rem;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--white);
  margin-bottom: var(--s-md);
}
.footer__list > li + li { margin-top: 10px; }
.footer__list a {
  font-size: 0.9375rem;
  color: rgba(255,255,255,0.72);
  transition: color .2s var(--ease);
}
.footer__list a:hover { color: var(--sage); }

.footer-bottom {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: var(--s-md);
  padding-top: var(--s-lg);
  font-size: 0.8125rem;
  color: rgba(255,255,255,0.54);
}

/* --------------------------------------------------------------------------
   18. Motion
   -------------------------------------------------------------------------- */
[data-reveal] {
  opacity: 0;
  transform: translateY(18px);
}
.js [data-reveal] {
  transition: opacity .8s var(--ease), transform .8s var(--ease);
  transition-delay: var(--d, 0ms);
}
.js [data-reveal].is-in { opacity: 1; transform: none; }
html:not(.js) [data-reveal] { opacity: 1; transform: none; }

/* Hero load choreography */
@keyframes rise {
  from { opacity: 0; transform: translateY(22px); }
  to   { opacity: 1; transform: none; }
}
@keyframes plate-in {
  from { opacity: 0; transform: scale(0.94); }
  to   { opacity: 1; transform: none; }
}
.js .hero [data-lift] {
  opacity: 0;
  animation: rise .9s var(--ease) forwards;
  animation-delay: var(--d, 0ms);
}
.js .hero [data-lift="plate"] { animation-name: plate-in; }

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after {
    animation-duration: 0.001ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.001ms !important;
  }
  .js [data-reveal] { opacity: 1; transform: none; }
  .js .hero [data-lift] { opacity: 1; }
}

/* --------------------------------------------------------------------------
   18b. Interior page components
   -------------------------------------------------------------------------- */

/* Page head — the compact hero used on every interior page */
.page-head {
  padding-block: clamp(48px, 6vw, 84px) clamp(40px, 5vw, 64px);
  border-bottom: 1px solid var(--line);
  position: relative;
}
.page-head--slate { border-bottom-color: var(--line-dark); }
.page-head__inner {
  display: grid;
  grid-template-columns: minmax(0, 1.08fr) minmax(0, 0.92fr);
  gap: var(--s-xl) var(--s-4xl);
  align-items: end;
}

/* Anchor chips — "what's on this page" */
.anchors { display: flex; flex-wrap: wrap; gap: var(--s-sm); }
.anchor-chip {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 8px 15px;
  border: 1px solid var(--line);
  border-radius: var(--r-pill);
  background: var(--white);
  font-family: var(--display);
  font-weight: 600;
  font-size: 0.75rem;
  color: var(--slate);
  transition: border-color .22s var(--ease), color .22s var(--ease);
}
.anchor-chip::before {
  content: "";
  width: 7px; height: 7px;
  border: 1px solid var(--emerald);
  flex: none;
}
.anchor-chip:hover { border-color: var(--emerald); color: var(--emerald); }
.on-dark .anchor-chip {
  background: var(--slate-lift);
  border-color: var(--line-dark);
  color: var(--white);
}
.on-dark .anchor-chip::before { border-color: var(--sage); }
.on-dark .anchor-chip:hover { border-color: var(--sage); color: var(--sage); }

/* Split — narrow sticky label column beside the detail */
.split {
  display: grid;
  grid-template-columns: minmax(0, 0.78fr) minmax(0, 1.22fr);
  gap: var(--s-2xl) var(--s-3xl);
}
.split__aside { position: sticky; top: 108px; align-self: start; }

/* Pricing table */
.price {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  border: 1px solid var(--line);
  border-radius: var(--r-card);
  overflow: hidden;
  background: var(--white);
}
.price__cell { padding: var(--s-xl); border-right: 1px solid var(--line); }
.price__cell:last-child { border-right: 0; }
.price__k {
  font-family: var(--display);
  font-weight: 600;
  font-size: 0.6875rem;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--emerald);
  display: block;
  margin-bottom: var(--s-md);
}
.price__v { display: flex; align-items: baseline; gap: 6px; }
.price__cur { font-family: var(--display); font-weight: 600; font-size: 0.875rem; color: var(--slate-soft); }
.price__n {
  font-family: var(--display);
  font-weight: 700;
  font-size: clamp(1.75rem, 1.4rem + 1.3vw, 2.25rem);
  letter-spacing: -0.03em;
  color: var(--slate);
  line-height: 1.05;
}
.price__u { font-size: 0.8125rem; color: var(--slate-soft); }
.price__d { font-size: 0.875rem; color: var(--slate-soft); margin-top: var(--s-sm); line-height: 1.5; }

/* Architecture layers */
.layers { display: grid; gap: var(--s-sm); }
.layer {
  display: grid;
  grid-template-columns: 132px 1fr;
  gap: var(--s-lg);
  align-items: center;
  padding: var(--s-lg) var(--s-xl);
  border: 1px solid var(--line-dark);
  border-radius: var(--r-card);
  /* Opaque, not a wash — a 3% white tint over slate is invisible on most
     screens, so these read as unstyled text rather than as panels. */
  background: var(--slate-lift);
}
.layer__k {
  font-family: var(--display);
  font-weight: 600;
  font-size: 0.6875rem;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--sage);
}
.layer__v { color: rgba(255,255,255,0.8); font-size: 0.9375rem; line-height: 1.5; }
.layer__v b { color: var(--white); font-weight: 700; }

/* App detail block */
.app-detail {
  display: grid;
  grid-template-columns: minmax(0, 0.9fr) minmax(0, 1.1fr);
  gap: var(--s-2xl) var(--s-3xl);
  align-items: start;
  padding-block: clamp(48px, 6vw, 72px);
  border-top: 1px solid var(--line);
  scroll-margin-top: 96px;
}
.app-detail__mark {
  display: flex;
  align-items: center;
  gap: var(--s-md);
  margin-bottom: var(--s-lg);
}
.app-detail__glyph {
  width: 64px; height: 64px;
  border-radius: 15px;
  overflow: hidden;
  flex: none;
  background: var(--accent-wash, var(--emerald-wash));
  box-shadow: 0 4px 14px rgba(54,61,72,0.14), inset 0 0 0 1px rgba(54,61,72,0.06);
}
.app-detail__glyph img { width: 100%; height: 100%; display: block; }
.app-detail__rule { height: 3px; width: 44px; background: var(--accent, var(--emerald)); margin-bottom: var(--s-lg); }

/* Definition rows */
.deflist > div {
  display: grid;
  grid-template-columns: 152px 1fr;
  gap: var(--s-lg);
  padding-block: var(--s-md);
  border-top: 1px solid var(--line);
  align-items: baseline;
}
.deflist > div:last-child { border-bottom: 1px solid var(--line); }
.deflist dt {
  font-family: var(--display);
  font-weight: 600;
  font-size: 0.6875rem;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--slate-soft);
}
.deflist dd { margin: 0; font-size: 0.9375rem; color: var(--slate); line-height: 1.55; }

/* Status message on the contact form */
.form-status {
  margin-top: var(--s-md);
  padding: var(--s-md);
  border-radius: var(--r-btn);
  background: var(--emerald-wash);
  border: 1px solid rgba(30,146,114,0.28);
  font-size: 0.875rem;
  color: var(--slate);
}

@media (max-width: 960px) {
  .page-head__inner { grid-template-columns: 1fr; align-items: start; }
  .split { grid-template-columns: 1fr; }
  .split__aside { position: static; }
  .app-detail { grid-template-columns: 1fr; }
  .price { grid-template-columns: 1fr; }
  .price__cell { border-right: 0; border-bottom: 1px solid var(--line); }
  .price__cell:last-child { border-bottom: 0; }
}
@media (max-width: 720px) {
  .layer { grid-template-columns: 1fr; gap: var(--s-sm); }
  .deflist > div { grid-template-columns: 1fr; gap: var(--s-xs); }
}

/* --------------------------------------------------------------------------
   19. Utilities
   -------------------------------------------------------------------------- */
.sr-only {
  position: absolute; width: 1px; height: 1px;
  padding: 0; margin: -1px; overflow: hidden;
  clip: rect(0 0 0 0); white-space: nowrap; border: 0;
}
.skip-link {
  position: absolute; left: var(--s-md); top: -60px;
  z-index: 100;
  background: var(--emerald); color: var(--white);
  padding: 10px 16px; border-radius: var(--r-btn);
  font-family: var(--display); font-weight: 600; font-size: 0.875rem;
  transition: top .2s var(--ease);
}
.skip-link:focus { top: var(--s-md); }

.center { text-align: center; }
.mx-auto { margin-inline: auto; }
.measure { max-width: 62ch; }
.mt-lg { margin-top: var(--s-lg); }
.mt-xl { margin-top: var(--s-xl); }
.mt-2xl { margin-top: var(--s-2xl); }
.mt-3xl { margin-top: var(--s-3xl); }

/* --------------------------------------------------------------------------
   20. Responsive
   -------------------------------------------------------------------------- */
@media (max-width: 960px) {
  .hero__inner { grid-template-columns: 1fr; }
  /* Lead with the message, not the mark, once the columns collapse. */
  .plate-wrap { max-width: 340px; margin-inline: auto; }
  .chip--a { left: -2%; }
  .chip--b { right: -2%; }
  .sec-head { grid-template-columns: 1fr; align-items: start; }
  .grid-4 { grid-template-columns: repeat(2, 1fr); }
  .modules { grid-template-columns: repeat(2, 1fr); }
  .module:nth-child(3n) { border-right: 1px solid var(--line-dark); }
  .module:nth-child(2n) { border-right: 0; }
  .module:nth-last-child(-n+3) { border-bottom: 1px solid var(--line-dark); }
  .module:nth-last-child(-n+2) { border-bottom: 0; }
  .footer-grid { grid-template-columns: 1fr 1fr; }
  .stats { grid-template-columns: repeat(2, 1fr); }
}

@media (max-width: 860px) {
  .nav__toggle { display: inline-flex; }
  .nav__links {
    position: fixed;
    inset: 76px 0 auto 0;
    flex-direction: column;
    align-items: stretch;
    gap: 0;
    background: var(--paper);
    border-bottom: 1px solid var(--line);
    padding: var(--s-md) var(--gutter) var(--s-xl);
    transform: translateY(-8px);
    opacity: 0;
    visibility: hidden;
    transition: opacity .26s var(--ease), transform .26s var(--ease), visibility .26s;
    box-shadow: 0 18px 40px rgba(54,61,72,0.10);
  }
  .nav__links.is-open { opacity: 1; visibility: visible; transform: none; }
  .nav__link { padding-block: 14px; border-bottom: 1px solid var(--line-soft); font-size: 1rem; }
  .nav__link::after { display: none; }
  .nav__cta { margin: var(--s-md) 0 0; justify-content: center; }
}

@media (max-width: 720px) {
  :root { --gutter: 20px; }
  .grid-2, .grid-3, .grid-4 { grid-template-columns: 1fr; }
  .modules { grid-template-columns: 1fr; }
  .module { border-right: 0 !important; border-bottom: 1px solid var(--line-dark) !important; }
  .module:last-child { border-bottom: 0 !important; }
  .form-grid { grid-template-columns: 1fr; }
  .step { grid-template-columns: 1fr; gap: var(--s-sm); }
  .footer-grid { grid-template-columns: 1fr; }
  .stats { grid-template-columns: 1fr 1fr; }
  /* The chips sit over the mark at this width, and the strip below the hero
     already carries the same information — so drop them rather than crowd it. */
  .chip { display: none; }
  .cta::after { display: none; }
}

@media print {
  .site-header, .nav__toggle, .cta, .btn { display: none !important; }
  body { background: #fff; }
}
