/* ==========================================================
   Kinetorq Dynamics LLP — site styles
   No build step. Edit tokens in :root to retheme.
   ========================================================== */

:root {
  --orange: #FF5C1F;
  --ink: #0E1014;
  --ink-2: #111419;
  --ink-3: #13161C;
  --ink-4: #1C2028;
  --line: #1E222A;
  --line-2: #2A2F38;
  --cyan: #19D9CF;
  --cyan-hi: #7FF0E8;
  --white: #F2F3F5;
  --grey: #9AA0A6;
  --grey-hi: #B4B9BF;
  --muted: #6B7178;

  --f-display: 'Archivo Black', 'Arial Black', system-ui, sans-serif;
  --f-body: 'Archivo', system-ui, -apple-system, 'Segoe UI', sans-serif;
  --f-mono: 'Space Mono', ui-monospace, Menlo, Consolas, monospace;

  --wrap: 1240px;
  --gutter: 24px;
  --section-y: clamp(72px, 10vw, 112px);
  --radius: 4px;
  --header-h: 69px;
}

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

html {
  -webkit-text-size-adjust: 100%;
  scroll-behavior: smooth;
  scroll-padding-top: calc(var(--header-h) + 8px);
}

body {
  margin: 0;
  background: var(--ink);
  color: var(--grey);
  font: 400 17px/1.6 var(--f-body);
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
}

img, svg { max-width: 100%; display: block; }
h1, h2, h3, p, ul, ol, dl, dd, figure { margin: 0; }

a { color: var(--cyan); text-decoration-thickness: 1px; text-underline-offset: 3px; }
a:hover { color: var(--cyan-hi); }

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

.visually-hidden {
  position: absolute !important; 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: 16px; top: -100px; z-index: 100;
  background: var(--orange); color: var(--ink); padding: 12px 16px;
  font-weight: 600; border-radius: var(--radius); text-decoration: none;
}
.skip-link:focus { top: 12px; color: var(--ink); }

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

.mono {
  font-family: var(--f-mono);
  text-transform: uppercase;
  letter-spacing: 0.22em;
}

.eyebrow { font-size: 12px; color: var(--cyan); }

.display {
  font-family: var(--f-display);
  font-weight: 400;
  color: var(--white);
  letter-spacing: -0.005em;
}

.h2 { font-size: clamp(30px, 4vw, 52px); line-height: 1.06; }

.placeholder-note {
  font-family: var(--f-mono);
  font-size: 10px;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--grey);
}

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 10px;
  min-height: 52px; padding: 14px 26px;
  border-radius: var(--radius); border: 1px solid transparent;
  font: 600 16px/1.2 var(--f-body); text-decoration: none; cursor: pointer;
  transition: background-color .2s, border-color .2s, color .2s, transform .2s;
}
.btn--primary { background: var(--orange); color: var(--ink); }
.btn--primary:hover { background: #FF7A45; color: var(--ink); }
.btn--ghost { border-color: #3A404B; color: var(--white); background: transparent; }
.btn--ghost:hover { border-color: var(--cyan); color: var(--white); }
.btn--sm { min-height: 44px; padding: 10px 18px; font-size: 15px; }

/* ---------- Brand lockup ---------- */
.brand { display: inline-flex; align-items: center; gap: 12px; text-decoration: none; }
.brand__mark { width: 40px; height: 40px; flex: none; }
.brand__text { display: flex; flex-direction: column; line-height: 1; }
.brand__name { font-family: var(--f-display); font-size: 22px; letter-spacing: 0.04em; color: var(--white); }
.brand__name .t { color: var(--orange); }
.brand__sub { font-family: var(--f-mono); font-size: 9px; letter-spacing: 0.42em; color: var(--grey); margin-top: 5px; }

/* ---------- Edge bar motif ---------- */
.edge-bar { position: relative; }
.edge-bar::after {
  content: ""; position: absolute; right: 0; top: clamp(72px, 9vw, 120px);
  width: 6px; height: 120px; background: var(--orange);
}

/* ---------- Header ---------- */
.site-header {
  position: sticky; top: 0; z-index: 50;
  background: rgba(14, 16, 20, 0.92);
  -webkit-backdrop-filter: blur(10px); backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--line);
}
.site-header__inner {
  display: flex; align-items: center; justify-content: space-between; gap: 16px;
  min-height: var(--header-h); padding-block: 12px;
}
.nav { display: flex; align-items: center; gap: 32px; }
.nav__list { display: flex; gap: 32px; list-style: none; padding: 0; margin: 0; }
.nav__list a { color: var(--white); text-decoration: none; font-weight: 500; font-size: 15px; padding: 10px 0; }
.nav__list a:hover, .nav__list a[aria-current="true"] { color: var(--cyan); }

/* ---------- Sections ---------- */
.section { padding-block: var(--section-y); border-bottom: 1px solid var(--line); }
.section--alt { background: var(--ink-2); }
.section__head { display: flex; flex-direction: column; gap: 14px; max-width: 720px; margin-bottom: clamp(36px, 5vw, 56px); }
.section__head--split {
  max-width: none; flex-direction: row; flex-wrap: wrap; justify-content: space-between; align-items: flex-end; gap: 24px;
}
.section__head--split > div { display: flex; flex-direction: column; gap: 14px; max-width: 660px; }
.section__head--split > p { max-width: 380px; }

/* ---------- Hero ---------- */
.hero { border-bottom: 1px solid var(--line); }
.hero__grid {
  display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 440px), 1fr));
  gap: clamp(40px, 5vw, 56px); align-items: center;
  padding-block: clamp(56px, 9vw, 96px) clamp(56px, 8vw, 88px);
}
.hero__copy { display: flex; flex-direction: column; gap: 28px; }
.hero__title { font-size: clamp(42px, 6.4vw, 84px); line-height: 0.98; }
.hero__title .dot { color: var(--orange); }
.hero__sub { font-size: clamp(18px, 2vw, 20px); line-height: 1.5; color: var(--grey-hi); max-width: 520px; }
.hero__ctas { display: flex; flex-wrap: wrap; gap: 14px; }
.hero__specs {
  display: grid; grid-template-columns: repeat(auto-fit, minmax(120px, 1fr));
  border-top: 1px solid #262B33; margin-top: 8px;
}
.hero__specs div { padding: 16px 16px 0 0; }
.hero__specs dt { font-size: 10px; color: var(--grey); }
.hero__specs dd { margin-top: 4px; color: var(--white); font-weight: 600; }

.hero__visual {
  position: relative; width: 100%; max-width: 560px; aspect-ratio: 1 / 1; justify-self: center;
  border: 1px solid var(--line); background: var(--ink-2);
}
.hero__visual::before, .hero__visual::after {
  content: ""; position: absolute; width: 14px; height: 14px; border-color: var(--orange); border-style: solid;
}
.hero__visual::before { top: -1px; left: -1px; border-width: 2px 0 0 2px; }
.hero__visual::after { bottom: -1px; right: -1px; border-width: 0 2px 2px 0; }
.hero__label { position: absolute; font-size: 10px; color: var(--muted); }
.hero__label--tl { top: 14px; left: 16px; }
.hero__label--br { bottom: 14px; right: 16px; }
.hero__visual svg { width: 100%; height: 100%; }

.mesh-flow { stroke-dasharray: 4 10; animation: meshflow 6s linear infinite; }
.bolt-spin { transform-box: fill-box; transform-origin: center; animation: spin 24s linear infinite; }
@keyframes meshflow { to { stroke-dashoffset: -140; } }
@keyframes spin { to { transform: rotate(360deg); } }

/* Data packets: a 40px dim tail with an 8px bright head at its front, travelling the
   edge in the first half of each cycle (--d), then resting. Gap of 1000 > any edge,
   so only one pulse is ever on an edge. Resting offsets keep the pulse off the edge. */
.packets path { fill: none; stroke-linecap: round; }
.pk-tail {
  stroke: var(--cyan); stroke-width: 3; stroke-opacity: 0.45;
  stroke-dasharray: 40 1000; stroke-dashoffset: 40px;
  animation: pk-tail var(--d) linear var(--delay) infinite;
}
.pk-head {
  stroke: #D9FFFC; stroke-width: 2.4;
  stroke-dasharray: 8 1000; stroke-dashoffset: 8px;
  animation: pk-head var(--d) linear var(--delay) infinite;
}
@keyframes pk-tail { 0% { stroke-dashoffset: 40px; } 50%, 100% { stroke-dashoffset: var(--to); } }
@keyframes pk-head { 0% { stroke-dashoffset: 8px; } 50%, 100% { stroke-dashoffset: calc(var(--to) - 32px); } }

.pings circle {
  fill: none; stroke: var(--cyan); stroke-width: 1.5; vector-effect: non-scaling-stroke;
  opacity: 0; transform-box: fill-box; transform-origin: center;
  animation: ping var(--d) ease-out var(--delay) infinite;
}
@keyframes ping {
  0% { opacity: 0.9; transform: scale(1); }
  28%, 100% { opacity: 0; transform: scale(3.2); }
}

/* Paused by js/main.js while the hero is off-screen */
.hero__visual.is-paused * { animation-play-state: paused; }

/* ---------- Product cards ---------- */
.cards { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 320px), 1fr)); gap: 24px; }
.card {
  display: flex; flex-direction: column; overflow: hidden;
  background: var(--ink-3); border: 1px solid #222731; border-radius: 6px;
  transition: border-color .2s, transform .2s;
}
.card:hover { border-color: #3A404B; }
.card__media { position: relative; aspect-ratio: 4 / 3; border-bottom: 1px solid #222731; background: #171B22; }
.card__media img { width: 100%; height: 100%; object-fit: cover; }
.card__body { padding: 28px; display: flex; flex-direction: column; gap: 16px; flex-grow: 1; }
.card__title { font-size: 26px; line-height: 1.15; }
.tag {
  align-self: flex-start; font-size: 10px; color: var(--orange);
  border: 1px solid var(--orange); padding: 4px 10px; border-radius: 2px;
}
.chips { display: flex; flex-wrap: wrap; gap: 8px; list-style: none; padding: 0; }
.chip {
  font-family: var(--f-mono); font-size: 10px; letter-spacing: 0.14em; text-transform: uppercase;
  color: var(--white); background: var(--ink-4); border: 1px solid var(--line-2);
  padding: 6px 10px; border-radius: 2px;
}
.chip--tbc { color: var(--grey); background: transparent; border-style: dashed; border-color: #3A404B; }
.card__link {
  margin-top: auto; padding-top: 8px; min-height: 44px; display: inline-flex; align-items: center; gap: 6px;
  font-weight: 600; text-decoration: none;
}

.media-badge {
  position: absolute; top: 16px; left: 16px; z-index: 1;
  font-size: 11px; color: var(--ink); background: var(--orange);
  padding: 6px 12px; border-radius: 2px; font-weight: 700;
}

/* ---------- Feature tiles ---------- */
.tiles {
  display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 250px), 1fr));
  gap: 1px; background: #222731; border: 1px solid #222731;
}
.tile { background: var(--ink-3); padding: 32px 28px; display: flex; flex-direction: column; gap: 14px; }
.tile svg { width: 32px; height: 32px; color: var(--cyan); }
.tile h3 { font-size: 19px; font-weight: 600; color: var(--white); line-height: 1.3; }
.tile p { font-size: 15px; }

/* ---------- Technology diagram ---------- */
.diagram { border: 1px solid var(--line); background: var(--ink-2); padding: clamp(20px, 4vw, 40px); }
.diagram svg { width: 100%; height: auto; margin-inline: auto; }
.diagram__wide { display: block; max-width: 1080px; }
.diagram__tall { display: none; max-width: 340px; }
.diagram figcaption { margin-top: 20px; font-size: 14px; text-align: center; }
@media (max-width: 760px) {
  .diagram__wide { display: none; }
  .diagram__tall { display: block; }
}
.diagram text { font-family: var(--f-body); }
.diagram .d-mono { font-family: var(--f-mono); letter-spacing: 0.18em; text-transform: uppercase; }

.steps {
  list-style: none; padding: 0; margin-top: clamp(36px, 5vw, 56px);
  display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 280px), 1fr)); gap: 24px;
}
.steps li { border-top: 2px solid var(--orange); padding-top: 18px; display: flex; flex-direction: column; gap: 8px; }
.steps .mono { font-size: 11px; color: var(--orange); }
.steps strong { color: var(--white); font-weight: 600; font-size: 19px; }
.steps span:last-child { font-size: 15px; }

/* ---------- About ---------- */
.split { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 420px), 1fr)); gap: clamp(40px, 5vw, 56px); align-items: start; }
.split__copy { display: flex; flex-direction: column; gap: 18px; }
.panel { position: relative; border: 1px solid #222731; background: var(--ink-3); padding: clamp(24px, 3vw, 32px); }
.panel--bar::after { content: ""; position: absolute; right: 0; top: 32px; width: 4px; height: 64px; background: var(--orange); }
.facts { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 18px; border-top: 1px solid #262B33; padding-top: 20px; }
.facts--plain { border-top: 0; padding-top: 0; row-gap: 24px; }
.facts dt, .contact-list dt { font-size: 10px; color: var(--grey); }
.facts dd { margin-top: 4px; color: var(--white); }

/* ---------- Contact ---------- */
.contact-list { display: flex; flex-direction: column; gap: 18px; margin-top: 12px; }
.contact-list dd { margin-top: 4px; font-size: 20px; font-weight: 600; }
.contact-list a { text-decoration: none; overflow-wrap: anywhere; }

.form { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 220px), 1fr)); gap: 18px; }
.field { display: flex; flex-direction: column; gap: 8px; }
.field--full, .form__actions, .form__status { grid-column: 1 / -1; }
.field label { font-size: 10px; color: var(--grey-hi); }
.field .req { color: var(--orange); }
.input {
  width: 100%; min-height: 48px; padding: 13px 14px;
  background: #0F1217; color: var(--white);
  border: 1px solid #3A404B; border-radius: var(--radius);
  font: 16px/1.4 var(--f-body);
}
.input:focus { border-color: var(--cyan); outline: 2px solid var(--cyan); outline-offset: 1px; }
.input:user-invalid { border-color: var(--orange); }
textarea.input { resize: vertical; min-height: 132px; }
select.input {
  appearance: none; -webkit-appearance: none; padding-right: 40px;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8' viewBox='0 0 12 8'%3E%3Cpath d='M1 1l5 5 5-5' fill='none' stroke='%2319D9CF' stroke-width='1.6'/%3E%3C/svg%3E");
  background-repeat: no-repeat; background-position: right 14px center;
}
.hp { position: absolute; left: -9999px; width: 1px; height: 1px; overflow: hidden; }
.form__actions { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 14px; }
.form__actions small { font-size: 13px; }
.form__status { font-size: 15px; min-height: 1.6em; }
.form__status.is-ok { color: var(--cyan); }
.form__status.is-err { color: #FF8A5C; }

/* ---------- Footer ---------- */
.site-footer { background: #0B0D10; padding-block: 64px 32px; }
.footer__grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 220px), 1fr)); gap: 40px; }
.footer__brand { display: flex; flex-direction: column; gap: 16px; }
.footer__brand .brand__mark { width: 44px; height: 44px; }
.footer__tag { color: var(--white); font-weight: 600; }
.footer__tag2 { font-size: 10px; letter-spacing: 0.2em; }
.footer__col { display: flex; flex-direction: column; gap: 10px; }
.footer__col h2 { font-size: 10px; color: var(--white); font-weight: 400; margin-bottom: 6px; }
.footer__col ul { list-style: none; padding: 0; display: flex; flex-direction: column; gap: 10px; }
.footer__col a { text-decoration: none; overflow-wrap: anywhere; }
.footer__col a:hover { text-decoration: underline; }
.footer__bottom {
  display: flex; flex-wrap: wrap; justify-content: space-between; gap: 12px;
  margin-top: 48px; padding-top: 24px; border-top: 1px solid var(--line); font-size: 13px;
}

/* ---------- Legal page ---------- */
.legal { padding-block: clamp(56px, 8vw, 96px); }
.legal__inner { max-width: 760px; }
.legal h1 { font-size: clamp(36px, 5vw, 56px); line-height: 1.05; margin: 14px 0 12px; }
.legal h2 { font-family: var(--f-display); font-weight: 400; color: var(--white); font-size: 22px; margin: 44px 0 12px; }
.legal p, .legal ul { margin-bottom: 14px; }
.legal ul { padding-left: 20px; }
.legal li { margin-bottom: 6px; }
.legal strong { color: var(--white); }
.notice {
  border: 1px dashed var(--orange); padding: 16px 18px; margin: 24px 0 8px;
  color: var(--white); font-size: 15px; background: rgba(255, 92, 31, 0.06);
}

/* ---------- Reveal ---------- */
.js .reveal { opacity: 0; transform: translateY(16px); transition: opacity .6s ease, transform .6s ease; }
.js .reveal.is-visible { opacity: 1; transform: none; }

/* ---------- Reduced motion ---------- */
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { animation: none !important; transition: none !important; }
  .js .reveal { opacity: 1; transform: none; }
  .packets, .pings { display: none; }
}

@media (max-width: 420px) {
  :root { --gutter: 16px; }
  .btn { width: 100%; }
  .site-header .btn { width: auto; }
  .hero__ctas { flex-direction: column; }
}
