/* ==========================================================================
   ATRIK Technologies — v11 "Our own hardware, in warm light"
   Bright and warm. Full-bleed renders of ATRIK's real CAD carry the page;
   type is set big and quiet; blue appears only as light. Every colour is a
   token on :root. Light only, by decision.
   ========================================================================== */

:root {
  color-scheme: light;

  --bg: #ffffff;
  --paper: #fafaf8;
  --sand: #f3f1ec;
  --sand-2: #e7e4de;
  --ink: #0b0d10;
  --ink-2: #16191e;
  --on-ink: #f4f5f7;
  --on-ink-2: #9aa1aa;
  --grey: #eceef1;

  --fg: #0b0d10;
  --fg-2: #4f545b;
  --fg-3: #80858c;
  --fg-dim: #c7cad0;           /* manifesto words not yet read */

  --line: #e5e6e8;
  --line-2: #d3d6db;

  --light: #4ea8ff;
  --light-hot: #eaf5ff;
  --light-glow: rgba(78, 168, 255, 0.55);
  --link: #0b6ad0;

  --btn-bg: #0b0d10;
  --btn-fg: #ffffff;
  --btn-hover: #2c3138;
  --header: rgba(250, 250, 248, 0.8);
  --sel-bg: #4ea8ff;
  --sel-fg: #06192c;
  --scrim: rgba(251, 246, 238, 0.0);

  --display: 'Funnel Display', 'Hanken Grotesk', -apple-system, BlinkMacSystemFont, 'Segoe UI', Helvetica, Arial, sans-serif;
  --text: 'Hanken Grotesk', -apple-system, BlinkMacSystemFont, 'Segoe UI', Helvetica, Arial, sans-serif;

  --gutter: clamp(16px, 5vw, 72px);
  --maxw: 1320px;
  --head-h: 64px;
  --radius: 28px;
  --ease: cubic-bezier(0.22, 1, 0.36, 1);
}

*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; scroll-padding-top: var(--head-h); }
body {
  background: var(--paper); color: var(--fg);
  font-family: var(--text); font-size: 17px; line-height: 1.55;
  -webkit-font-smoothing: antialiased; text-rendering: optimizeLegibility;
  overflow-x: hidden;
}
img { display: block; max-width: 100%; height: auto; }
a { color: inherit; }
::selection { background: var(--sel-bg); color: var(--sel-fg); }
:focus-visible { outline: 2px solid var(--light); outline-offset: 3px; border-radius: 6px; }
.wrap { width: 100%; max-width: var(--maxw); margin: 0 auto; padding: 0 var(--gutter); }
.sr, .hp { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.skip { position: absolute; left: 12px; top: -60px; background: var(--ink); color: #fff; padding: 10px 14px; border-radius: 10px; z-index: 100; }
.skip:focus { top: 12px; }

h1, h2, h3, h4 { font-family: var(--display); font-weight: 600; letter-spacing: -0.025em; line-height: 1.02; }
h2 { font-size: clamp(36px, 5.2vw, 76px); }
p { color: var(--fg-2); }

.kicker {
  display: inline-flex; align-items: center; gap: 10px;
  font-size: 13px; font-weight: 600; letter-spacing: 0.14em; text-transform: uppercase;
  color: var(--fg-3); margin-bottom: 22px;
}
.dot { width: 22px; height: 2px; border-radius: 2px; background: var(--light); box-shadow: 0 0 10px var(--light-glow); }
.dot.live { width: 8px; height: 8px; border-radius: 50%; animation: pulse 2.4s var(--ease) infinite; }
@keyframes pulse { 50% { box-shadow: 0 0 0 6px rgba(78, 168, 255, 0); opacity: 0.55; } }

/* ---------------------------------------------------------------- buttons */
.btn {
  display: inline-flex; align-items: center; gap: 10px; flex: none;
  height: 52px; padding: 0 26px; border-radius: 999px; border: 0;
  background: var(--btn-bg); color: var(--btn-fg);
  font: 600 16px/1 var(--text); text-decoration: none; cursor: pointer;
  transition: background .25s var(--ease), transform .25s var(--ease);
}
.btn:hover { background: var(--btn-hover); }
.btn:active { transform: scale(0.98); }
.btn .arr { transition: transform .3s var(--ease); }
.btn:hover .arr { transform: translateX(3px); }
.btn-sm { height: 38px; padding: 0 18px; font-size: 14px; }
.btn-text { font-weight: 600; text-decoration: none; border-bottom: 1.5px solid currentColor; padding-bottom: 2px; }

/* ---------------------------------------------------------------- header */
.top {
  position: fixed; inset: 0 0 auto 0; z-index: 50;
  padding-top: env(safe-area-inset-top, 0px);
  transition: background .35s var(--ease), box-shadow .35s var(--ease);
}
.top.scrolled { background: var(--header); -webkit-backdrop-filter: saturate(1.4) blur(18px); backdrop-filter: saturate(1.4) blur(18px); box-shadow: 0 1px 0 var(--line); }
.top-in { height: var(--head-h); display: flex; align-items: center; justify-content: space-between; gap: 16px; }
.brand { display: inline-flex; align-items: center; gap: 12px; text-decoration: none; color: var(--fg); }
.brand svg { width: 26px; height: 24px; }
.brand img { height: 19px; width: auto; }
.nav { display: flex; align-items: center; gap: 30px; }
.nav > a:not(.btn) { font-size: 15px; font-weight: 500; text-decoration: none; color: var(--fg-2); transition: color .2s; }
.nav > a:not(.btn):hover { color: var(--fg); }

/* ---------------------------------------------------------------- hero */
.hero { position: relative; min-height: 100svh; display: flex; align-items: flex-end; overflow: hidden; background: var(--sand); }
.hero-media, .hero-media img { position: absolute; inset: 0; width: 100%; height: 100%; }
.hero-media img { object-fit: cover; object-position: 88% 45%; transform: scale(1.06); transition: transform 2.4s var(--ease); }
.hero.ready .hero-media img { transform: scale(1); }
.hero::after {           /* soft warm wash so the type always reads */
  content: ""; position: absolute; inset: 0; pointer-events: none;
  background: linear-gradient(90deg, rgba(246, 245, 241, 0.86) 0%, rgba(246, 245, 241, 0.5) 34%, rgba(246, 245, 241, 0) 58%),
              linear-gradient(0deg, rgba(246, 245, 241, 0.6) 0%, rgba(246, 245, 241, 0) 30%);
}
.hero-copy { position: relative; z-index: 2; padding-top: calc(var(--head-h) + 40px); padding-bottom: clamp(56px, 11vh, 120px); }
.eyebrow { font-size: 14px; font-weight: 600; letter-spacing: 0.16em; text-transform: uppercase; color: var(--fg-2); margin-bottom: 18px; }
.hero h1 { font-size: clamp(44px, 6vw, 100px); letter-spacing: -0.035em; line-height: 0.95; max-width: none; }
@media (max-width: 700px) { .br-lg { display: none; } }
.hero .lead { max-width: 30rem; margin-top: 26px; font-size: clamp(18px, 1.5vw, 21px); color: var(--fg-2); }
.actions { display: flex; flex-wrap: wrap; align-items: center; gap: 26px; margin-top: 34px; }
.cue { position: absolute; z-index: 2; left: 50%; bottom: 26px; width: 26px; height: 42px; margin-left: -13px; border: 1.5px solid rgba(11, 13, 16, 0.35); border-radius: 14px; }
.cue span { position: absolute; left: 50%; top: 9px; width: 3px; height: 8px; margin-left: -1.5px; border-radius: 2px; background: var(--light); box-shadow: 0 0 8px var(--light-glow); animation: cue 2s var(--ease) infinite; }
@keyframes cue { 0% { transform: translateY(0); opacity: 1; } 80% { transform: translateY(14px); opacity: 0; } 100% { opacity: 0; } }

/* hero entrance (only with JS and motion allowed) */
@media (prefers-reduced-motion: no-preference) {
  html.js .hero-copy > * { opacity: 0; transform: translateY(18px); transition: opacity 1s var(--ease), transform 1s var(--ease); }
  html.js .hero.ready .hero-copy > * { opacity: 1; transform: none; }
  html.js .hero.ready .hero-copy > :nth-child(2) { transition-delay: .08s; }
  html.js .hero.ready .hero-copy > :nth-child(3) { transition-delay: .2s; }
  html.js .hero.ready .hero-copy > :nth-child(4) { transition-delay: .3s; }
}

/* ---------------------------------------------------------------- manifesto */
.belief { background: var(--paper); padding: clamp(110px, 18vh, 220px) 0; }
.manifesto { font-size: clamp(32px, 4.6vw, 68px); line-height: 1.1; letter-spacing: -0.03em; font-weight: 500; max-width: 22ch; }
.manifesto .w { color: var(--fg-dim); transition: color .5s var(--ease); }
.manifesto .w.lit { color: var(--fg); }
.no-reveal .manifesto .w { color: var(--fg); }

/* ---------------------------------------------------------------- full-bleed stage */
.stage { position: relative; min-height: 92vh; display: flex; align-items: flex-end; overflow: hidden; background: var(--sand); }
.stage-media { position: absolute; inset: 0; }
.stage-media img { width: 100%; height: 100%; object-fit: cover; }
.stage::after { content: ""; position: absolute; inset: 0; pointer-events: none; background: linear-gradient(0deg, rgba(246, 245, 241, 0.92) 0%, rgba(246, 245, 241, 0.55) 26%, rgba(246, 245, 241, 0) 52%); }
.stage-copy { position: relative; z-index: 2; padding-bottom: clamp(56px, 10vh, 110px); }
.stage-copy h2 { max-width: 12ch; }
.stage-copy p:not(.kicker) { max-width: 30rem; margin-top: 22px; font-size: 19px; color: var(--fg-2); }
.stage-copy .kicker { color: var(--fg-2); }
.work { background: var(--paper); padding-top: clamp(100px, 16vh, 180px); }
.work-head { display: grid; grid-template-columns: 1.2fr 1fr; gap: clamp(28px, 6vw, 96px); align-items: end; margin-bottom: clamp(48px, 8vh, 84px); }
.work-head h2 { max-width: 12ch; }
.work-head > p { font-size: 19px; max-width: 30rem; }
.work-media { overflow: hidden; background: var(--sand); }
.work-media img { width: 100%; aspect-ratio: 2400 / 1300; object-fit: cover; object-position: 50% 60%; transform: scale(1.05); transition: transform 1.8s var(--ease); }
.work-media.in img { transform: scale(1); }
.caption { padding-top: 14px; font-size: 12px; color: var(--fg-3); text-align: right; }

/* ---------------------------------------------------------------- split */
.band-sand { background: var(--sand); }
.split { padding: clamp(90px, 14vh, 160px) 0; }
.split-grid { display: grid; grid-template-columns: 1fr 1.15fr; gap: clamp(36px, 6vw, 96px); align-items: center; }
.split-copy p:not(.kicker) { margin-top: 22px; font-size: 19px; max-width: 28rem; }
.split-media, .next-media { border-radius: var(--radius); overflow: hidden; box-shadow: 0 30px 80px rgba(18, 24, 34, 0.12); }
.split-media img, .next-media img { width: 100%; aspect-ratio: 4 / 3.2; object-fit: cover; transform: scale(1.06); transition: transform 1.6s var(--ease); }
.split-media.in img, .next-media.in img { transform: scale(1); }

/* ---------------------------------------------------------------- principles */
.principles { background: var(--paper); padding: clamp(100px, 16vh, 180px) 0; }
.principles-head { display: flex; flex-direction: column; margin-bottom: clamp(48px, 8vh, 88px); }
.principles-head h2 { max-width: 14ch; }
.rules { list-style: none; display: grid; grid-template-columns: repeat(4, 1fr); border-top: 1px solid var(--line-2); }
.rules li { padding: 30px 28px 10px 0; border-right: 1px solid var(--line); }
.rules li + li { padding-left: 28px; }
.rules li:last-child { border-right: 0; }
.rules .num { display: block; font: 500 14px/1 var(--display); color: var(--light); letter-spacing: 0.06em; margin-bottom: 46px; }
.rules h3 { font-size: clamp(22px, 1.9vw, 28px); line-height: 1.12; margin-bottom: 14px; }
.rules p { font-size: 16px; }

/* ---------------------------------------------------------------- next + follow */
.next { padding: clamp(90px, 14vh, 160px) 0; }
.next-grid { display: grid; grid-template-columns: 1.1fr 1fr; gap: clamp(36px, 6vw, 96px); align-items: center; }
.next-copy h2 { max-width: 12ch; }
.next-copy .lead { margin-top: 22px; font-size: 19px; }
.form { margin-top: 34px; max-width: 30rem; }
.form-row { display: flex; gap: 10px; }
.input {
  flex: 1; min-width: 0; height: 52px; padding: 0 22px; border-radius: 999px;
  border: 1px solid var(--line-2); background: var(--bg); color: var(--fg); font: 400 16px var(--text);
}
.input:focus { outline: none; border-color: var(--light); box-shadow: 0 0 0 4px rgba(78, 168, 255, 0.18); }
.form-note { margin-top: 12px; font-size: 14px; min-height: 1.2em; }
.form-note a { color: var(--link); }

/* ---------------------------------------------------------------- footer */
.foot { background: var(--bg); padding: clamp(70px, 10vh, 110px) 0 28px; border-top: 1px solid var(--line); }
.foot-top { display: flex; justify-content: space-between; gap: 40px; flex-wrap: wrap; }
.foot-brand svg { width: 34px; height: 31px; color: var(--fg); }
.foot-brand p { margin-top: 16px; font: 600 20px var(--display); color: var(--fg); letter-spacing: -0.01em; }
.foot-cols { display: flex; gap: clamp(40px, 8vw, 120px); }
.foot-cols h4 { font: 600 13px var(--text); letter-spacing: 0.14em; text-transform: uppercase; color: var(--fg-3); margin-bottom: 16px; }
.foot-cols a, .copy-btn { display: block; font-size: 15px; color: var(--fg-2); text-decoration: none; margin-bottom: 10px; }
.foot-cols a:hover, .copy-btn:hover { color: var(--fg); }
.copy-btn { background: none; border: 0; padding: 0; font-family: inherit; cursor: pointer; }
.copy-btn.done { color: var(--link); }
.foot-word { margin: clamp(60px, 10vh, 110px) 0 26px; opacity: 0.95; }
.foot-word img { width: 100%; height: auto; }
.foot-base { display: flex; align-items: center; justify-content: space-between; gap: 20px; padding-top: 22px; border-top: 1px solid var(--line); font-size: 13px; color: var(--fg-3); }
.slit { display: block; width: 120px; height: 2px; border-radius: 2px; background: linear-gradient(90deg, transparent, var(--light) 30%, var(--light-hot) 50%, var(--light) 70%, transparent); box-shadow: 0 0 14px var(--light-glow); }

/* ---------------------------------------------------------------- reveal */
@media (prefers-reduced-motion: no-preference) {
  html.js .rise { opacity: 0; transform: translateY(28px); transition: opacity 1s var(--ease), transform 1s var(--ease); }
  html.js .rise.in { opacity: 1; transform: none; }
}
@media (prefers-reduced-motion: reduce) {
  .hero-media img, .split-media img, .next-media img { transform: none !important; transition: none; }
  .stage-media img { transform: none !important; height: 100%; }
  .dot.live, .cue span { animation: none; }
}

/* ---------------------------------------------------------------- small screens */
@media (max-width: 900px) {
  .split-grid, .next-grid, .work-head { grid-template-columns: 1fr; }
  .work-media img { aspect-ratio: 4 / 3; }
  .next-media { order: 2; }
  .rules { grid-template-columns: 1fr 1fr; }
  .rules li:nth-child(2) { border-right: 0; }
  .rules li:nth-child(3) { padding-left: 0; }
  .rules li:nth-child(n+3) { border-top: 1px solid var(--line); }
}
@media (max-width: 700px) {
  .hide-sm { display: none; }
  .hero { min-height: 100svh; }
  .hero-media img { object-position: 30% 20%; }
  .cue { display: none; }
  .hero::after { background: linear-gradient(0deg, rgba(246, 245, 241, 0.97) 0%, rgba(246, 245, 241, 0.9) 48%, rgba(246, 245, 241, 0.55) 64%, rgba(246, 245, 241, 0) 80%); }
  .stage { min-height: 86svh; }
  .stage::after { background: linear-gradient(0deg, rgba(246, 245, 241, 0.97) 0%, rgba(246, 245, 241, 0.8) 40%, rgba(246, 245, 241, 0) 66%); }
  .rules { grid-template-columns: 1fr; }
  .rules li, .rules li + li { padding: 26px 0 8px; border-right: 0; border-top: 1px solid var(--line); }
  .rules li:first-child { border-top: 0; }
  .rules .num { margin-bottom: 18px; }
  .form-row { flex-direction: column; }
  .form-row .input { flex: none; }
  .form-row .btn { justify-content: center; }
  .foot-base { flex-direction: column; align-items: flex-start; }
  .caption { text-align: left; }
}
@media (max-width: 360px) { .brand img { display: none; } }

/* ---------------------------------------------------------------- duo: AI + robotics */
.duo { background: var(--paper); padding: 0 0 clamp(100px, 16vh, 180px); }
.duo-head { margin-bottom: clamp(36px, 6vh, 64px); }
.duo-head h2 { max-width: 14ch; }
.duo-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 20px; }
.tile {
  position: relative; display: flex; flex-direction: column; justify-content: space-between;
  min-height: clamp(520px, 62vh, 680px); padding: clamp(28px, 3vw, 44px); border-radius: var(--radius);
  overflow: hidden; text-decoration: none; isolation: isolate;
  transition: transform .6s var(--ease), box-shadow .6s var(--ease);
}
.tile:hover { transform: translateY(-4px); box-shadow: 0 30px 80px rgba(18, 24, 34, 0.14); }
.tile h3 { font-size: clamp(44px, 4.6vw, 72px); letter-spacing: -0.04em; line-height: 0.95; max-width: 9ch; margin: 10px 0 16px; }
.tile-copy p:not(.tile-tag) { font-size: 18px; max-width: 24rem; }
.tile-tag { font-size: 13px; font-weight: 600; letter-spacing: 0.14em; text-transform: uppercase; }
.tile-foot { display: flex; justify-content: space-between; align-items: center; gap: 16px; font-size: 15px; font-weight: 600; position: relative; z-index: 2; }
.status { display: inline-flex; align-items: center; gap: 10px; font-weight: 500; }
.more span { display: inline-block; transition: transform .3s var(--ease); }
.tile:hover .more span { transform: translateX(4px); }
.tile-ink { background: var(--ink); color: var(--on-ink); }
.tile-ink .tile-tag, .tile-ink .status { color: var(--on-ink-2); }
.tile-ink .tile-copy p:not(.tile-tag) { color: var(--on-ink-2); }
.tile-ink .mind { position: absolute; right: -14%; bottom: -26%; width: 64%; aspect-ratio: 1; z-index: 0; pointer-events: none; }
.tile-ink .tile-copy, .tile-ink .tile-foot { position: relative; z-index: 1; }
.tile-photo { background: var(--grey); color: var(--fg); }
.tile-photo img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; object-position: 50% 52%; z-index: -1; transition: transform 1.2s var(--ease); }
.tile-photo:hover img { transform: scale(1.03); }
.tile-photo::after { content: ""; position: absolute; inset: 0; z-index: -1; background: linear-gradient(180deg, rgba(246, 245, 241, 0.7) 0%, rgba(246, 245, 241, 0) 40%, rgba(246, 245, 241, 0) 80%, rgba(246, 245, 241, 0.75) 100%); }
.tile-photo .tile-tag, .tile-photo .status { color: var(--fg-2); }

/* ---------------------------------------------------------------- AI */
.ai { padding: clamp(90px, 14vh, 160px) 0; }
.ai-grid { display: grid; grid-template-columns: 1fr 1.05fr; gap: clamp(36px, 6vw, 96px); align-items: center; }
.ai-copy h2 { max-width: 12ch; }
.ai-copy > p:not(.kicker) { margin-top: 22px; font-size: 19px; max-width: 30rem; }
.facts { list-style: none; margin-top: 34px; border-top: 1px solid var(--line-2); max-width: 30rem; }
.facts li { padding: 16px 0; border-bottom: 1px solid var(--line); color: var(--fg-2); font-size: 16px; }
.facts strong { color: var(--fg); font-weight: 600; margin-right: 6px; }
.ai-panel {
  position: relative; background: var(--ink); color: var(--on-ink); border-radius: var(--radius);
  padding: 26px 26px 20px; box-shadow: 0 40px 100px rgba(18, 24, 34, 0.22); overflow: hidden;
}
.panel-top { display: flex; justify-content: space-between; align-items: center; font-size: 14px; }
.panel-name svg { width: 22px; height: 20px; display: block; color: var(--on-ink); }
.panel-state { color: var(--on-ink-2); display: inline-flex; align-items: center; gap: 8px; }
.panel-state::before { content: ""; width: 7px; height: 7px; border-radius: 50%; background: var(--light); box-shadow: 0 0 10px var(--light-glow); }
.ai-panel .voice { display: block; width: 100%; height: 120px; margin: 10px 0 6px; }
.chat { display: flex; flex-direction: column; gap: 10px; min-height: 250px; }
.msg { max-width: 82%; padding: 12px 16px; border-radius: 18px; font-size: 15.5px; line-height: 1.45; }
.msg.you { align-self: flex-end; background: var(--ink-2); color: var(--on-ink); border-bottom-right-radius: 6px; }
.msg.ai { align-self: flex-start; background: #f4f5f7; color: var(--fg); border-bottom-left-radius: 6px; }
html.js .chat.play .msg { opacity: 0; transform: translateY(10px); transition: opacity .6s var(--ease), transform .6s var(--ease); }
html.js .chat.play .msg.show { opacity: 1; transform: none; }
.ai-panel figcaption { margin-top: 14px; font-size: 12px; color: var(--on-ink-2); text-align: right; }

@media (max-width: 900px) {
  .duo-grid, .ai-grid { grid-template-columns: 1fr; }
  .tile { min-height: 480px; }
}

/* ---------------------------------------------------------------- pipeline */
.pipeline { background: var(--ink); color: var(--on-ink); padding: clamp(100px, 16vh, 180px) 0; }
.pipeline .kicker { color: var(--on-ink-2); }
.pipeline-head { margin-bottom: clamp(48px, 8vh, 88px); }
.pipeline-head h2 { color: var(--on-ink); max-width: 14ch; }
.areas { list-style: none; display: grid; grid-template-columns: repeat(5, 1fr); border-top: 1px solid rgba(255, 255, 255, 0.14); }
.areas li { padding: 30px 22px 40px; border-left: 1px solid rgba(255, 255, 255, 0.08); }
.areas li:first-child { padding-left: 0; border-left: 0; }
.area-status { display: inline-flex; align-items: center; gap: 10px; font-size: 12px; letter-spacing: 0.08em; text-transform: uppercase; color: var(--on-ink-2); margin-bottom: 44px; }
.area-research .dot { width: 8px; height: 8px; border-radius: 50%; background: transparent; border: 1.5px solid var(--light); box-shadow: none; }
.areas h3 { color: var(--on-ink); font-size: clamp(22px, 1.9vw, 30px); line-height: 1.1; letter-spacing: -0.02em; }
@media (max-width: 1000px) {
  .areas { grid-template-columns: 1fr; }
  .areas li, .areas li:first-child { padding: 24px 0 26px; border-left: 0; border-bottom: 1px solid rgba(255, 255, 255, 0.08); display: flex; justify-content: space-between; align-items: baseline; gap: 16px; }
  .area-status { margin-bottom: 0; order: 2; }
}

/* ---------------------------------------------------------------- motion loops (rendered from our CAD) */
video.motion { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; opacity: 0; transition: opacity .9s var(--ease); pointer-events: none; }
video.motion.on { opacity: 1; }
.hero > video.motion { object-position: 88% 45%; }
.tile-photo video.motion { object-position: 50% 52%; z-index: -1; }
@media (max-width: 700px) { .hero > video.motion { object-position: 30% 20%; } }

/* phones: no scroll-linked slide, only a fade (iOS momentum scroll makes slides look like jumps) */
@media (max-width: 900px), (pointer: coarse) {
  html.js .rise { transform: none; }
  .work-media img, .split-media img, .next-media img { transform: none; }
}
