/* ============================================================
   KaiLase Holding GmbH — design system
   Palette: #0A0C10 / #12161E / #1A1F29 / #232935 /
            #F1F2F4 / #9AA0AB / #6B6B80 / #C9CDD4
   ============================================================ */

:root {
  --bg: #0A0C10;
  --surface: #12161E;
  --surface-2: #1A1F29;
  --line: #232935;
  --text: #F1F2F4;
  --text-2: #9AA0AB;
  --text-3: #6B6B80;
  --accent: #C9CDD4;

  --nav-h: 80px;

  --font-serif: "Fraunces", Georgia, "Times New Roman", serif;
  --font-sans: "Inter", system-ui, -apple-system, "Segoe UI", Helvetica, Arial, sans-serif;
  --font-mono: "JetBrains Mono", ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;

  --ease-out: cubic-bezier(0.22, 1, 0.36, 1);
}

/* ---------- reset & base ---------- */

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

html {
  scroll-behavior: smooth;
  background: var(--bg);
}

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: var(--font-sans);
  font-size: 17px;
  font-weight: 400;
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  text-rendering: optimizeLegibility;
  overflow-x: hidden;
}

main { display: block; }

h1, h2, h3, h4, p, figure { margin: 0; }

h1, h2, h3 { font-weight: 400; }

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

button {
  font-family: inherit;
  color: inherit;
  background: none;
  border: none;
  cursor: pointer;
}

::selection {
  background: var(--line);
  color: var(--text);
}

/* refined scrollbar */
::-webkit-scrollbar { width: 10px; }
::-webkit-scrollbar-track { background: var(--bg); }
::-webkit-scrollbar-thumb { background: var(--line); border: 2px solid var(--bg); }
* { scrollbar-width: thin; scrollbar-color: var(--line) var(--bg); }

/* focus visibility */
:focus-visible {
  outline: 1px solid var(--accent);
  outline-offset: 3px;
}

.skip-link {
  position: fixed;
  top: -48px;
  left: 16px;
  z-index: 100;
  padding: 10px 16px;
  background: var(--surface-2);
  border: 1px solid var(--line);
  color: var(--text);
  font-size: 13px;
  transition: top 300ms ease-out;
}
.skip-link:focus { top: 12px; }

/* ---------- layout primitives ---------- */

.container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 24px;
}

.section {
  padding: clamp(88px, 10vw, 150px) 0;
}

.section-continue {
  border-top: 1px solid var(--line);
}

.section-head {
  max-width: 760px;
}

.label {
  display: block;
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  color: var(--text-3);
}

.section-title {
  font-family: var(--font-serif);
  font-size: clamp(34px, 4.4vw, 48px);
  line-height: 1.1;
  letter-spacing: -0.02em;
  margin-top: 22px;
  text-wrap: balance;
}

.section-lead {
  color: var(--text-2);
  max-width: 60ch;
  margin-top: 22px;
}

/* refined text-action link: text + arrow + drawing underline */
.text-action {
  position: relative;
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding-bottom: 5px;
  font-family: var(--font-sans);
  font-size: 14px;
  letter-spacing: 0.02em;
  color: var(--text-2);
  background: none;
  border: none;
  cursor: pointer;
  transition: color 300ms ease-out;
}
.text-action::after {
  content: "";
  position: absolute;
  left: 0;
  bottom: 0;
  height: 1px;
  width: 100%;
  background: var(--accent);
  transform: scaleX(0);
  transform-origin: left;
  transition: transform 300ms ease-out;
}
.text-action:hover, .text-action:focus-visible { color: var(--text); }
.text-action:hover::after, .text-action:focus-visible::after { transform: scaleX(1); }
.ta-arrow {
  display: inline-block;
  transition: transform 300ms ease-out;
}
.text-action:hover .ta-arrow, .text-action:focus-visible .ta-arrow { transform: translateX(4px); }

/* ============================================================
   Top navigation — fixed, frosted
   ============================================================ */

.nav {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 50;
  background: rgba(10, 12, 16, 0.72);
  -webkit-backdrop-filter: blur(14px) saturate(120%);
  backdrop-filter: blur(14px) saturate(120%);
  border-bottom: 1px solid var(--line);
}

.nav-inner {
  max-width: 1440px;
  margin: 0 auto;
  height: var(--nav-h);
  padding: 0 28px;
  display: flex;
  align-items: center;
  gap: 32px;
}

.brand {
  display: flex;
  align-items: center;
  gap: 12px;
  white-space: nowrap;
}
.brand-name {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  font-family: var(--font-serif);
  font-size: 19px;
  font-weight: 400;
  letter-spacing: 0;
  line-height: 1.15;
  color: var(--text);
  white-space: nowrap;
  transition: transform 1100ms var(--ease-out);
  will-change: transform;
}
.nav.is-scrolled .brand-name { transform: translateX(-16px); }

.brand-word {
  position: relative;
  display: inline-block;
  overflow: hidden;
  white-space: nowrap;
  width: var(--w-full, 150px);
  transition: width 1100ms var(--ease-out);
}
.nav.is-scrolled .brand-word { width: var(--w-short, 34px); }

.brand-full {
  display: inline-block;
  transition: opacity 650ms ease-out, filter 650ms ease-out, transform 650ms ease-out;
}
.brand-short {
  position: absolute;
  left: 0;
  top: 0;
  opacity: 0;
  filter: blur(4px);
  transform: translateY(3px);
  transition: opacity 650ms ease-out, filter 650ms ease-out, transform 650ms ease-out;
}
.nav.is-scrolled .brand-full {
  opacity: 0;
  filter: blur(4px);
  transform: translateY(-3px);
}
.nav.is-scrolled .brand-short {
  opacity: 1;
  filter: blur(0);
  transform: none;
}

.nav-links {
  flex: 1;
  display: flex;
  justify-content: center;
  gap: 40px;
}

.nav-link {
  position: relative;
  display: inline-block;
  padding: 6px 0;
  font-size: 14px;
  letter-spacing: 0.02em;
  color: var(--text-2);
  transition: color 300ms ease-out;
}
.nav-link::after {
  content: "";
  position: absolute;
  left: 0;
  bottom: 0;
  height: 1px;
  width: 100%;
  background: var(--accent);
  transform: scaleX(0);
  transform-origin: left;
  transition: transform 300ms ease-out;
}
.nav-link:hover, .nav-link:focus-visible { color: var(--text); }
.nav-link:hover::after, .nav-link:focus-visible::after { transform: scaleX(1); }
.nav-link.is-active { color: var(--text); }
.nav-link.is-active::after { transform: scaleX(1); }

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

.lang-toggle {
  display: inline-flex;
  align-items: baseline;
  gap: 8px;
  font-family: var(--font-mono);
  font-size: 12px;
  letter-spacing: 0.12em;
  padding: 6px 2px;
  color: var(--text-3);
  transition: color 300ms ease-out;
}
.lang-toggle .lang-en { color: var(--text-2); }
.lang-toggle .lang-sep { color: var(--text-3); }
.lang-toggle.is-de .lang-en { color: var(--text-3); }
.lang-toggle.is-de .lang-de { color: var(--text-2); }
.lang-toggle:hover { color: var(--text-2); }

.nav-menu-btn {
  display: none;
  font-family: var(--font-mono);
  font-size: 12px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--text-2);
  border: 1px solid var(--line);
  padding: 6px 12px;
  transition: color 300ms ease-out, border-color 300ms ease-out;
}
.nav-menu-btn:hover { color: var(--text); border-color: var(--accent); }

/* mobile dropdown menu */
.nav-menu {
  display: none;
  border-top: 1px solid var(--line);
  background: rgba(10, 12, 16, 0.96);
  -webkit-backdrop-filter: blur(14px);
  backdrop-filter: blur(14px);
}
.nav-menu.open {
  display: block;
  animation: menu-in 300ms ease-out;
}
@keyframes menu-in {
  from { opacity: 0; transform: translateY(-6px); }
  to   { opacity: 1; transform: none; }
}
.nav-menu a {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 18px 28px;
  font-size: 15px;
  color: var(--text-2);
  border-bottom: 1px solid var(--line);
  transition: color 300ms ease-out;
}
.nav-menu a:last-child { border-bottom: none; }
.nav-menu a:hover { color: var(--text); }
.nav-menu-arrow { color: var(--text-3); font-size: 13px; }

/* ============================================================
   Landing portal — centered logo + two choice cards
   ============================================================ */

.portal {
  min-height: calc(100vh - var(--nav-h));
  min-height: calc(100dvh - var(--nav-h));
  display: flex;
  align-items: center;
  justify-content: center;
  padding: clamp(48px, 7vw, 96px) 24px;
}

.portal-inner {
  width: 100%;
  max-width: 1080px;
  text-align: center;
}

.portal-logo {
  display: inline-block;
  width: min(320px, 64vw);
  line-height: 0;
  will-change: transform;
}
/* the JS 3D tilt drives transform every frame — keep reveal
   transitions to opacity/filter only so the lerp is undamped */
html.js-anim [data-reveal].portal-logo {
  transition: opacity 900ms ease-out var(--rd), filter 900ms ease-out var(--rd);
}
.portal-logo img {
  display: block;
  width: 100%;
  height: auto;
}

.portal-cards {
  display: flex;
  justify-content: center;
  gap: 10%;
  margin-top: clamp(40px, 5vw, 64px);
  text-align: left;
}

.portal-card {
  position: relative;
  flex: 0 1 40%;
  max-width: 40%;
  display: flex;
  flex-direction: column;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 4px;
  padding: 26px 24px 22px;
  perspective: 800px;
  will-change: transform;
  outline: none;
  -webkit-tap-highlight-color: transparent;
}
.portal-card:hover,
.portal-card:focus-visible {
  border-color: var(--accent);
  background-color: var(--surface-2);
}

/* inner wrapper carries all card content — the 3D tilt moves the
   whole card (text included) together, never lagging behind */
.portal-card-inner {
  display: flex;
  flex-direction: column;
  flex: 1;
  will-change: transform;
  transform-style: preserve-3d;
}

.portal-card.is-dimmed { opacity: 0.55; }
/* beats the reveal system's opacity rule (which would otherwise win) */
html.js-anim [data-reveal].portal-card.is-dimmed {
  opacity: 0.55;
  transition: opacity 500ms ease-out;
}

.portal-card-tag {
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  color: var(--text-3);
}

.portal-card-title {
  font-family: var(--font-serif);
  font-size: clamp(18px, 1.6vw, 21px);
  line-height: 1.18;
  letter-spacing: -0.01em;
  margin-top: 12px;
}

.portal-card-sub {
  color: var(--text-2);
  font-size: 13px;
  max-width: 44ch;
  margin-top: 10px;
}

.portal-card .text-action {
  margin-top: auto;
  padding-top: 20px;
}

/* focused card: underline draws, arrow shifts */
.portal-card.is-focused .text-action,
.portal-card:hover .text-action { color: var(--text); }
.portal-card.is-focused .text-action::after,
.portal-card:hover .text-action::after { transform: scaleX(1); }
.portal-card.is-focused .ta-arrow,
.portal-card:hover .ta-arrow { transform: translateX(4px); }

/* ============================================================
   Hero — internal pages
   ============================================================ */

.hero {
  min-height: calc(100vh - var(--nav-h));
  min-height: calc(100dvh - var(--nav-h));
  display: flex;
  align-items: center;
  padding: clamp(88px, 10vw, 140px) 0;
}
.hero .container { padding: 0 clamp(24px, 5vw, 64px); }

.hero-inner {
  max-width: 920px;
}

.hero-title {
  font-family: var(--font-serif);
  font-size: clamp(40px, 6.4vw, 70px);
  line-height: 1.08;
  letter-spacing: -0.02em;
  margin-top: 24px;
  text-wrap: balance;
}

.hero-lead {
  color: var(--text-2);
  max-width: 65ch;
  margin-top: 30px;
}

.hero--compact {
  min-height: 0;
  padding: clamp(120px, 12vw, 170px) 0 clamp(48px, 6vw, 80px);
}

/* hero with background imagery */
.hero--media {
  position: relative;
  overflow: hidden;
  min-height: 100vh;
  min-height: 100dvh;
  padding: clamp(96px, 11vw, 160px) 0;
}
.hero--media .hero-title {
  font-size: clamp(36px, 5.6vw, 62px);
}

.hero-bg {
  position: absolute;
  inset: 0;
  z-index: 0;
  overflow: hidden;
}
.hero-media-img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center;
}

/* subtle infinite cinematic scale-up, 100% -> 105% over 26s */
@media (prefers-reduced-motion: no-preference) {
  html.js-anim .hero--media .hero-media-img {
    animation: hero-zoom 26s ease-in-out infinite alternate;
  }
}
@keyframes hero-zoom {
  from { transform: scale(1); }
  to   { transform: scale(1.05); }
}

/* heavy overlay: darker on the left and bottom,
   slightly more transparent in the center/top */
.hero-scrim {
  position: absolute;
  inset: 0;
  z-index: 1;
  pointer-events: none;
  background:
    linear-gradient(90deg, rgba(10, 12, 16, 0.82) 0%, rgba(10, 12, 16, 0.55) 50%, rgba(10, 12, 16, 0.34) 100%),
    linear-gradient(180deg, rgba(10, 12, 16, 0.2) 0%, rgba(10, 12, 16, 0.38) 52%, rgba(10, 12, 16, 0.88) 100%);
}

.hero--media .hero-inner { position: relative; z-index: 2; }

/* ---------- header box background imagery ---------- */

.section-caps-head {
  position: relative;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 4px;
  padding: clamp(40px, 5.5vw, 68px) clamp(28px, 4vw, 56px);
  max-width: 920px;
}
.section-caps-head::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: 0;
  background-image: url('../assets/img/infra-capabilities.jpg');
  background-size: cover;
  background-position: center;
  filter: brightness(1.22) saturate(0.95);
}

/* Ken Burns on the header background */
@media (prefers-reduced-motion: no-preference) {
  html.js-anim .section--caps .section-caps-head {
    animation: media-zoom 28s linear infinite alternate;
  }
}
@keyframes media-zoom {
  from { transform: scale(1); }
  to   { transform: scale(1.05); }
}

/* shadowing overlay so the white title stays sharp */
.section-caps-head::after {
  content: "";
  position: absolute;
  inset: 0;
  z-index: 1;
  background: rgba(10, 12, 16, 0.72);
}
.section-caps-head .section-head {
  position: relative;
  z-index: 2;
  margin: 0;
}

/* ---------- why sodium-ion: vertical stack + scrubbed image ---------- */

.why-grid {
  display: grid;
  grid-template-columns: 55% 1fr;   /* left ~55%, right ~40-45% */
  gap: clamp(28px, 4vw, 56px);
  align-items: stretch;
  margin-top: clamp(48px, 6vw, 72px);
}

.why-left { display: flex; flex-direction: column; }

.why-items {
  border-top: 1px solid var(--line);
  margin-top: clamp(36px, 5vw, 56px);
}
.why-item {
  padding: 30px 0;
  border-bottom: 1px solid var(--line);
}
.why-item .col-title { font-size: 20px; }
.why-item p { max-width: 52ch; }

/* right panel: contained vertical zone for the scrubbed image */
.why-panel {
  position: relative;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 4px;
  background: var(--surface);
  perspective: 900px;
}

/* tilt layer: receives the 3D rotation; the img inside keeps its
   scroll-scrub translate, so the two effects compose cleanly and the
   panel's overflow clips everything within the column. */
.why-tilt {
  position: absolute;
  inset: 0;
  will-change: transform;
  transform-style: preserve-3d;
}
.why-panel-img {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 140%;              /* 40% travel room for the scrub */
  object-fit: cover;
  object-position: center;
  will-change: transform;
  filter: brightness(0.85) saturate(0.9);
}
.why-panel::after {
  content: "";
  position: absolute;
  inset: 0;
  z-index: 1;
  pointer-events: none;
  background: linear-gradient(180deg, rgba(10, 12, 16, 0.22) 0%, rgba(10, 12, 16, 0.42) 100%);
}

@media (max-width: 880px) {
  .why-grid { grid-template-columns: 1fr; gap: 28px; }
  .why-panel { height: 46vh; min-height: 280px; }
}

/* capabilities section: standard dark background, header box on top */
.section--caps .container { position: relative; z-index: 2; }
.section--caps .cols3 { margin-top: clamp(40px, 5vw, 60px); }


/* ============================================================
   Capability columns — hairline dividers, no cards
   ============================================================ */

.cols3 {
  display: grid;
  grid-template-columns: 1fr 1fr 1fr;
  border-top: 1px solid var(--line);
  margin-top: clamp(48px, 6vw, 72px);
}
.col {
  padding: 40px 36px 8px;
  border-left: 1px solid var(--line);
}
.col:first-child { border-left: none; padding-left: 0; }
.col:last-child { padding-right: 0; }

.col-title {
  font-family: var(--font-serif);
  font-size: 21px;
  line-height: 1.25;
  letter-spacing: -0.01em;
}
.col p {
  color: var(--text-2);
  font-size: 16px;
  max-width: 48ch;
  margin-top: 14px;
}

/* ============================================================
   Specification / application rows
   ============================================================ */

.spec-list {
  margin-top: clamp(48px, 6vw, 72px);
  display: flex;
  flex-direction: column;
  gap: 14px;
}

/* glassmorphic technical panel */
.spec-row {
  position: relative;
  overflow: hidden;
  display: grid;
  grid-template-columns: minmax(200px, 280px) 1fr;
  gap: 48px;
  padding: 26px 30px;
  align-items: baseline;
  border: 1px solid rgba(201, 205, 212, 0.18);
  border-radius: 4px;
  background: rgba(18, 22, 30, 0.55);
  -webkit-backdrop-filter: blur(12px);
  backdrop-filter: blur(12px);
  box-shadow: inset 0 1px 0 rgba(201, 205, 212, 0.08);
  transition:
    opacity 900ms ease-out var(--rd),
    filter 900ms ease-out var(--rd),
    transform 500ms var(--ease-out),
    border-color 400ms ease-out,
    background-color 400ms ease-out,
    box-shadow 400ms ease-out;
}
html.js-anim [data-reveal].spec-row:hover,
html.js-anim [data-reveal].spec-row:focus-within {
  transform: translateY(-2px);
  border-color: rgba(201, 205, 212, 0.45);
  background-color: rgba(18, 22, 30, 0.72);
  box-shadow: inset 0 1px 0 rgba(201, 205, 212, 0.16);
}

/* slow glass sheen sweeping across each panel */
.spec-row::after {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: 4px;
  pointer-events: none;
  background: linear-gradient(115deg, transparent 42%, rgba(201, 205, 212, 0.07) 50%, transparent 58%);
  transform: translateX(-130%);
}
@media (prefers-reduced-motion: no-preference) {
  html.js-anim .spec-row.is-visible::after {
    animation: spec-sheen 9s ease-in-out infinite;
  }
  html.js-anim .spec-row.is-visible:nth-child(2)::after { animation-delay: 1.5s; }
  html.js-anim .spec-row.is-visible:nth-child(3)::after { animation-delay: 3s; }
  html.js-anim .spec-row.is-visible:nth-child(4)::after { animation-delay: 4.5s; }
  html.js-anim .spec-row.is-visible:nth-child(5)::after { animation-delay: 6s; }
  html.js-anim .spec-row.is-visible:nth-child(6)::after { animation-delay: 7.5s; }
}
@keyframes spec-sheen {
  0% { transform: translateX(-130%); }
  55%, 100% { transform: translateX(130%); }
}

.spec-label {
  font-family: var(--font-mono);
  font-size: 12px;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  color: var(--text-2);
  white-space: nowrap;
}

.spec-desc {
  color: var(--text-2);
  font-size: 16px;
  max-width: 62ch;
}

.app-title {
  font-family: var(--font-serif);
  font-size: 21px;
  line-height: 1.25;
  letter-spacing: -0.01em;
}

.app-note {
  display: block;
  margin-top: 10px;
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--text-3);
}

/* ============================================================
   Timeline — drawing line + steps
   ============================================================ */

.timeline {
  position: relative;
  margin-top: clamp(48px, 6vw, 72px);
  padding-left: 48px;
}

.tl-svg {
  position: absolute;
  left: 0;
  top: 4px;
  bottom: 4px;
  width: 11px;
  height: calc(100% - 8px);
  overflow: visible;
}

.tl-line {
  fill: none;
  stroke: var(--line);
  stroke-width: 1;
  stroke-dasharray: 1;
  stroke-dashoffset: 1;
  transition: stroke-dashoffset 800ms ease-out;
}
.timeline.is-visible .tl-line { stroke-dashoffset: 0; }

.tl-step {
  position: relative;
  padding: 0 0 64px;
}
.tl-step:last-child { padding-bottom: 0; }

.tl-dot {
  position: absolute;
  left: -48px;
  top: 8px;
  width: 11px;
  height: 11px;
  border: 1px solid var(--line);
  border-radius: 50%;
  background: var(--bg);
  display: flex;
  align-items: center;
  justify-content: center;
  transition: border-color 300ms ease-out;
}
.tl-dot::after {
  content: "";
  width: 3px;
  height: 3px;
  border-radius: 50%;
  background: var(--text-3);
  transition: background 300ms ease-out;
}
.tl-step.is-visible .tl-dot { border-color: var(--accent); }
.tl-step.is-visible .tl-dot::after { background: var(--accent); }

.tl-num {
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.18em;
  color: var(--text-3);
}

/* title row: neumorphic icon sits directly beside the title */
.tl-title-row {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-top: 10px;
}
.tl-title-row .tl-title { margin-top: 0; }

.tl-title {
  font-family: var(--font-serif);
  font-size: 22px;
  line-height: 1.25;
  letter-spacing: -0.01em;
}

/* dark neumorphic icon tile — soft extruded, no neon, no gloss */
.tl-icon {
  flex: none;
  width: 26px;
  height: 26px;
  border-radius: 4px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--text-2);
  background: var(--surface);
  box-shadow:
    1px 1px 2px rgba(10, 12, 16, 0.55),
    -1px -1px 2px rgba(201, 205, 212, 0.05),
    inset 1px 1px 1px rgba(201, 205, 212, 0.08),
    inset -1px -1px 1px rgba(10, 12, 16, 0.55);
  transition:
    opacity 600ms ease-out,
    transform 600ms var(--ease-out),
    box-shadow 400ms ease-out;
}
.tl-icon svg {
  width: 16px;
  height: 16px;
  display: block;
}

/* scroll-in: staggered fade + slight pop */
html.js-anim .tl-step .tl-icon {
  opacity: 0;
  transform: scale(0.9);
}
html.js-anim .tl-step.is-visible .tl-icon {
  opacity: 1;
  transform: scale(1);
}
html.js-anim .tl-step:nth-of-type(2) .tl-icon { transition-delay: 140ms; }
html.js-anim .tl-step:nth-of-type(3) .tl-icon { transition-delay: 280ms; }
html.js-anim .tl-step:nth-of-type(4) .tl-icon { transition-delay: 420ms; }

/* per-icon continuous motion — slow, heavy, institutional */
@media (prefers-reduced-motion: no-preference) {
  html.js-anim .tl-step.is-visible .tl-icon svg {
    animation-duration: var(--icon-dur, 5s);
    animation-timing-function: ease-in-out;
    animation-iteration-count: infinite;
    animation-direction: alternate;
  }
  html.js-anim .tl-step:nth-of-type(1).is-visible .tl-icon svg {
    animation-name: icon-breathe;      /* site pin: soft breathing */
  }
  html.js-anim .tl-step:nth-of-type(2).is-visible .tl-icon svg {
    animation-name: icon-sway;         /* compass: gentle rotation */
    animation-duration: 6.5s;
  }
  html.js-anim .tl-step:nth-of-type(3).is-visible .tl-icon svg {
    animation-name: icon-lift;         /* crane: slow rise */
    animation-duration: 4.5s;
  }
  html.js-anim .tl-step:nth-of-type(4).is-visible .tl-icon svg {
    animation-name: icon-breathe;      /* shield: validation pulse */
    animation-duration: 4s;
  }
}
@keyframes icon-breathe {
  from { transform: scale(1); }
  to   { transform: scale(1.07); }
}
@keyframes icon-sway {
  from { transform: rotate(-5deg); }
  to   { transform: rotate(5deg); }
}
@keyframes icon-lift {
  from { transform: translateY(0); }
  to   { transform: translateY(-1.6px); }
}

/* hover: deeper neumorphic depth + stronger motion */
html.js-anim .tl-step.is-visible:hover .tl-icon {
  transform: scale(1.07);
  box-shadow:
    1.5px 1.5px 3px rgba(10, 12, 16, 0.65),
    -1.5px -1.5px 3px rgba(201, 205, 212, 0.08),
    inset 1.5px 1.5px 1.5px rgba(201, 205, 212, 0.14),
    inset -1.5px -1.5px 1.5px rgba(10, 12, 16, 0.65);
}
html.js-anim .tl-step.is-visible:hover .tl-icon svg {
  animation-duration: 2.2s; /* motion strengthens on hover */
}

.tl-step p {
  color: var(--text-2);
  font-size: 16px;
  max-width: 60ch;
  margin-top: 12px;
}

/* ============================================================
   Holding structure diagram — HTML + inline SVG
   ============================================================ */

.structure {
  max-width: 760px;
  margin: clamp(56px, 7vw, 88px) auto 0;
  text-align: center;
}

.struct-box {
  border: 1px solid var(--line);
  padding: 30px 24px;
}
.struct-top { background: var(--surface-2); }
.struct-bottom { background: var(--surface); }

.struct-name {
  font-size: 16px;
  letter-spacing: 0.01em;
  color: var(--text);
}

.struct-sub {
  display: block;
  margin-top: 8px;
  font-family: var(--font-mono);
  font-size: 10px;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--text-3);
}

.struct-svg {
  display: block;
  width: 100%;
  height: 120px;
  overflow: visible;
}

.struct-line {
  fill: none;
  stroke: var(--line);
  stroke-width: 1;
  stroke-dasharray: 1;
  stroke-dashoffset: 1;
  transition: stroke-dashoffset 800ms ease-out;
}
.struct-line.sl-2, .struct-line.sl-3 { transition-delay: 250ms; }
.structure.is-visible .struct-line { stroke-dashoffset: 0; }

.struct-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0 48px;
  max-width: 640px;
  margin: 0 auto;
}

/* ============================================================
   Principles — 2x2 hairline grid
   ============================================================ */

.principles {
  display: grid;
  grid-template-columns: 1fr 1fr;
  border-top: 1px solid var(--line);
  margin-top: clamp(48px, 6vw, 72px);
}

.principle {
  padding: 44px 0;
  border-bottom: 1px solid var(--line);
}
.principle:nth-child(odd) {
  border-right: 1px solid var(--line);
  padding-right: 48px;
}
.principle:nth-child(even) { padding-left: 48px; }

.principle-title {
  font-family: var(--font-serif);
  font-size: 20px;
  line-height: 1.25;
  letter-spacing: -0.01em;
}

.principle p {
  color: var(--text-2);
  font-size: 16px;
  max-width: 40ch;
  margin-top: 14px;
}

/* ============================================================
   Company statement — editorial lead + refined body
   ============================================================ */

.statement {
  margin-top: clamp(32px, 4vw, 56px);
}

.statement-meta {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: 24px;
  padding-bottom: 18px;
  border-bottom: 1px solid var(--line);
}

.statement-body {
  position: relative;
  padding-left: 44px;
}

/* thin vertical accent line, softly breathing */
.statement-line {
  position: absolute;
  left: 0;
  top: 34px;
  bottom: 6px;
  width: 1px;
  background: rgba(201, 205, 212, 0.32);
}
html.js-anim [data-reveal].statement-line {
  opacity: 1;
  filter: none;
  transform: scaleY(0);
  transform-origin: top;
  transition: transform 1100ms ease-out;
}
html.js-anim [data-reveal].statement-line.is-visible { transform: scaleY(1); }
@media (prefers-reduced-motion: no-preference) {
  html.js-anim .statement-line.is-visible {
    animation: statement-breathe 9s ease-in-out infinite alternate;
  }
}
@keyframes statement-breathe {
  from { opacity: 0.18; }
  to   { opacity: 0.4; }
}

/* large editorial pull-quote */
.statement-lead {
  font-family: var(--font-serif);
  font-size: clamp(28px, 3.4vw, 42px);
  line-height: 1.18;
  letter-spacing: -0.02em;
  max-width: 640px;
  margin: 34px 0 44px;
}

/* refined body paragraphs */
.statement-p {
  color: var(--text-2);
  font-size: 17px;
  line-height: 1.7;
  max-width: 62ch;
  margin-bottom: 26px;
}
.statement-p:last-child { margin-bottom: 0; }

@media (max-width: 600px) {
  .statement-body { padding-left: 30px; }
}

/* ============================================================
   Contact form
   ============================================================ */

.form {
  max-width: 640px;
  margin: clamp(48px, 6vw, 72px) auto 0;
}

.field {
  position: relative;
  margin-top: 40px;
}
.field:first-child { margin-top: 0; }

.field label {
  display: block;
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  color: var(--text-3);
  margin-bottom: 8px;
}

.field input,
.field textarea {
  display: block;
  width: 100%;
  background: transparent;
  border: none;
  border-bottom: 1px solid var(--line);
  border-radius: 0;
  -webkit-appearance: none;
  appearance: none;
  color: var(--text);
  font-family: var(--font-sans);
  font-size: 16px;
  line-height: 1.5;
  padding: 12px 0;
}
.field input:focus-visible, .field textarea:focus-visible { outline: none; }
.field textarea { resize: vertical; min-height: 110px; }

.field::after {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  height: 1px;
  background: var(--accent);
  transform: scaleX(0);
  transform-origin: left;
  transition: transform 400ms ease-out;
}
.field:focus-within::after { transform: scaleX(1); }

.submit-link { margin-top: 52px; }

.form-error {
  margin-top: 28px;
  padding-left: 16px;
  border-left: 1px solid var(--line);
  font-size: 14px;
  color: var(--text-2);
  max-width: 46ch;
}

.form-note {
  margin-top: 44px;
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.12em;
  color: var(--text-3);
}

/* success state */
.form-leaving {
  opacity: 0;
  filter: blur(8px);
  transform: translateY(-16px);
  transition: opacity 600ms ease-in, filter 600ms ease-in, transform 600ms ease-in;
}

.form-success {
  text-align: center;
  padding: 96px 0 48px;
}
.success-check { display: block; margin: 0 auto; }
.check-path {
  fill: none;
  stroke: var(--accent);
  stroke-width: 1;
  stroke-dasharray: 1;
  stroke-dashoffset: 1;
  transition: stroke-dashoffset 800ms ease-out;
}
.form-success.is-visible .check-path { stroke-dashoffset: 0; }

.success-title {
  font-family: var(--font-serif);
  font-size: 36px;
  line-height: 1.15;
  letter-spacing: -0.02em;
  margin-top: 26px;
  opacity: 0;
  transform: translateY(10px);
  transition: opacity 500ms ease-out 300ms, transform 500ms ease-out 300ms;
}
.success-sub {
  margin-top: 12px;
  color: var(--text-2);
  font-size: 16px;
  opacity: 0;
  transition: opacity 500ms ease-out 500ms;
}
.form-success.is-visible .success-title { opacity: 1; transform: none; }
.form-success.is-visible .success-sub { opacity: 1; }

/* ============================================================
   Footer
   ============================================================ */

.footer {
  position: relative;
  overflow: hidden;
  border-top: 1px solid var(--line);
  background: var(--bg);
}

/* full background image with strong dark overlay */
.footer-bg {
  position: absolute;
  inset: 0;
  z-index: 0;
  overflow: hidden;
}
.footer-bg-img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center;
  filter: brightness(0.88) saturate(0.9);
}
.footer-bg-overlay {
  position: absolute;
  inset: 0;
  z-index: 1;
  background: rgba(10, 12, 16, 0.8);
  pointer-events: none;
}

.footer-inner {
  position: relative;
  z-index: 2;
  max-width: 1200px;
  margin: 0 auto;
  padding: 80px 24px 48px;
  display: grid;
  grid-template-columns: 1.5fr 1fr 1.4fr;
  gap: 56px;
}

.footer-company-name {
  font-size: 15px;
  letter-spacing: 0.02em;
  color: var(--text);
}

.footer-company-line {
  font-size: 14px;
  color: var(--text-2);
  display: inline-flex;
  align-items: baseline;
  gap: 4px;
  flex-wrap: wrap;
}

.f-label {
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.1em;
  color: var(--text-3);
}

.footer-wordmark {
  font-family: var(--font-serif);
  font-size: 30px;
  line-height: 1.15;
  letter-spacing: -0.01em;
  color: var(--text);
}

.footer-tag {
  margin-top: 10px;
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  color: var(--text-3);
}

.footer-col h3 {
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  color: var(--text-3);
  margin-bottom: 18px;
  font-weight: 400;
}

.footer-col {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 14px;
}

.footer-link {
  position: relative;
  font-size: 14px;
  color: var(--text-2);
  padding-bottom: 3px;
  transition: color 300ms ease-out;
}
.footer-link::after {
  content: "";
  position: absolute;
  left: 0;
  bottom: 0;
  height: 1px;
  width: 100%;
  background: var(--accent);
  transform: scaleX(0);
  transform-origin: left;
  transition: transform 300ms ease-out;
}
.footer-link:hover, .footer-link:focus-visible { color: var(--text); }
.footer-link:hover::after, .footer-link:focus-visible::after { transform: scaleX(1); }

.footer-copy {
  font-size: 13px;
  color: var(--text-3);
}

.footer-bottom {
  position: relative;
  z-index: 2;
  background: var(--bg);
  border-top: 1px solid var(--line);
  padding: 20px 24px;
  text-align: center;
}

/* address as a clickable map link, stacked like the other company lines */
.footer-address {
  display: inline-flex;
  flex-direction: column;
  gap: 6px;
}


/* ============================================================
   Reveal & word animation system
   ------------------------------------------------------------
   Fail-safe: every hidden state below is gated behind
   html.js-anim, which is only added by the inline bootstrap
   script. If JavaScript is disabled or fails, no element is
   ever hidden — content stays fully visible by default.
   ============================================================ */

html.js-anim [data-reveal] {
  --rb: 8px;
  --ry: 20px;
  --rd: 0ms;
  opacity: 0;
  filter: blur(var(--rb));
  transform: translateY(var(--ry));
  transition:
    opacity 900ms ease-out var(--rd),
    filter 900ms ease-out var(--rd),
    transform 900ms ease-out var(--rd);
}

html.js-anim [data-reveal].is-visible {
  opacity: 1;
  filter: blur(0);
  transform: none;
}

/* word-by-word headlines */
html.js-anim [data-split] .word { display: inline-block; }
html.js-anim [data-split] .word-inner {
  display: inline-block;
  opacity: 0;
  transform: translateY(25px);
  filter: blur(6px);
}
html.js-anim [data-split].is-visible .word-inner {
  animation: word-rise 1000ms ease-out both;
  animation-delay: calc(var(--ws, 0ms) + var(--wd, 0ms));
}
@keyframes word-rise {
  from { opacity: 0; transform: translateY(25px); filter: blur(6px); }
  to   { opacity: 1; transform: translateY(0);    filter: blur(0); }
}

/* nav fade-in on page load */
html.js-anim .nav {
  opacity: 0;
  transition: opacity 400ms ease-out;
}
html.js-anim.ready .nav { opacity: 1; }

/* ============================================================
   Responsive
   ============================================================ */

@media (max-width: 880px) {
  .nav-links { display: none; }
  .nav-menu-btn { display: inline-block; }
  .nav-inner { padding: 0 20px; gap: 16px; }

  /* portal cards stack vertically */
  .portal-cards { flex-direction: column; gap: 18px; }
  .portal-card { max-width: none; flex: none; width: 100%; padding: 24px 20px 20px; }
  .portal-logo { width: min(260px, 58vw); }

  .cols3 { grid-template-columns: 1fr; }
  .cols3 .col { border-left: none; padding: 36px 0 8px; }
  .cols3 .col + .col { border-top: 1px solid var(--line); }

  .spec-row {
    grid-template-columns: 1fr;
    gap: 10px;
    padding: 20px 22px;
  }

  .principle:nth-child(odd) {
    border-right: none;
    padding-right: 0;
  }
  .principle:nth-child(even) { padding-left: 0; }
  .principle { padding: 32px 0; }

  .principles { grid-template-columns: 1fr; }

  .footer-inner {
    grid-template-columns: 1fr 1fr;
    gap: 40px;
    padding: 64px 24px 40px;
  }
  .footer-brand { grid-column: 1 / -1; }

  .tl-step { padding-bottom: 48px; }
  .timeline { padding-left: 44px; }
  .tl-dot { left: -44px; }
}

@media (max-width: 600px) {
  body { font-size: 16px; }

  .brand-name { font-size: 14px; }
  .brand { gap: 8px; }

  /* very narrow screens: tighten the nav so nothing overflows */
  @media (max-width: 360px) {
    .nav-inner { padding: 0 14px; gap: 10px; }
    .brand-name { font-size: 13px; gap: 5px; }
    .lang-toggle { font-size: 11px; gap: 5px; }
    .nav-menu-btn { padding: 5px 9px; font-size: 11px; }
  }

  .footer-inner { grid-template-columns: 1fr; }
  .footer-brand { grid-column: auto; }
  .footer-wordmark { font-size: 26px; }

  /* structure diagram collapses to a single column */
  .struct-row { grid-template-columns: 1fr; gap: 16px; max-width: 320px; }
  .struct-line.sl-2, .struct-line.sl-3 { display: none; }
  .struct-svg { height: 80px; }

  .hero { padding-top: 72px; }
  .portal-card { padding: 30px 24px 24px; }
}


/* ============================================================
   Reduced motion — everything visible, no animation
   ============================================================ */

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.001s !important;
    animation-delay: 0s !important;
    transition-duration: 0.001s !important;
    transition-delay: 0s !important;
    scroll-behavior: auto !important;
  }
  html.js-anim [data-reveal],
  html.js-anim [data-split] .word-inner {
    opacity: 1 !important;
    transform: none !important;
    filter: none !important;
  }
  html.js-anim .nav { opacity: 1 !important; }
}

/* portal card motion — slow, institutional (overrides reveal timing) */
html.js-anim [data-reveal].portal-card {
  transition:
    opacity 500ms ease-out,
    filter 500ms ease-out,
    transform 650ms var(--ease-out),
    border-color 300ms ease-out,
    background-color 300ms ease-out;
}

/* ============================================================
   Floating white CTA button (continue sections)
   ============================================================ */

.cta-float {
  display: inline-block;
  will-change: transform;
}
.cta-btn {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  padding: 14px 28px;
  background: var(--text);
  color: var(--bg);
  font-family: var(--font-sans);
  font-size: 13px;
  font-weight: 500;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  border-radius: 4px;
  transition: transform 300ms ease-out;
}
.cta-btn:hover,
.cta-btn:focus-visible {
  transform: scale(1.05);
}
.cta-btn .ta-arrow {
  transition: transform 300ms ease-out;
}
.cta-btn:hover .ta-arrow,
.cta-btn:focus-visible .ta-arrow {
  transform: translateX(4px);
}

/* wide, weightless sine float (X + Y), infinite ease-in-out */
@media (prefers-reduced-motion: no-preference) {
  html.js-anim .cta-float {
    animation: cta-float 9s ease-in-out infinite alternate;
  }
}
@keyframes cta-float {
  0%   { transform: translate(0, 0); }
  50%  { transform: translate(64px, -10px); }
  100% { transform: translate(28px, 12px); }
}
/* keep the button inside the viewport on small screens */
@media (max-width: 880px) {
  html.js-anim .cta-float {
    animation-name: cta-float-mobile;
  }
}
@keyframes cta-float-mobile {
  0%   { transform: translate(0, 0); }
  50%  { transform: translate(18px, -8px); }
  100% { transform: translate(6px, 8px); }
}
