/* ═══ VYTHO — homepage (Oct 2026 redesign) ═════════════════════
   The page is transparent: the 3D world (js/world.js) lives behind it
   on one fixed canvas. Text sits in the left column on wide screens,
   the 3D stage on the right. On phones the stage is the top half and
   text panels scroll over it on a soft black backdrop.
   ══════════════════════════════════════════════════════════════ */

.home main { position: relative; z-index: var(--z-page); }

/* ─── loading screen ────────────────────────────────────────────
   The mountain draws itself line by line, fills, VYTHO rises under it,
   a real progress line runs (fonts, 3D world), then the curtain lifts
   and the drawn mountain hands over to the 3D one. js/site.js runs it. */
.pre { display: none; }
html.is-loading, html.is-loading body { overflow: hidden; }
html.is-loading .pre, .pre.is-out { display: grid; }
.pre {
  position: fixed; inset: 0; z-index: 140;
  place-items: center;
  background: var(--ink-0);
  clip-path: inset(0 0 0 0);
  transition: clip-path 1.05s var(--ease-io);
}
.pre.is-out { clip-path: inset(0 0 100% 0); pointer-events: none; }
.pre-stage {
  width: min(540px, 74vw);
  display: grid; gap: clamp(18px, 3.2vh, 30px);
  transition: transform 1.05s var(--ease-io), opacity 0.7s var(--ease);
}
.pre.is-out .pre-stage { transform: translateY(-7vh) scale(0.97); opacity: 0; }
.pre-mark { width: 100%; height: auto; overflow: visible; }
.pre-path {
  stroke: var(--white); stroke-width: 3; stroke-linejoin: round;
  stroke-dasharray: 1 1; stroke-dashoffset: 1;
  fill: rgba(236, 236, 236, 0);
  animation: preDraw 1.6s var(--ease-io) 0.15s forwards, preFill 1s var(--ease) 1.4s forwards;
}
.pre-path--2 { animation-delay: 0.4s, 1.55s; }
.pre-path--3 { animation-delay: 0.6s, 1.65s; }
@keyframes preDraw { to { stroke-dashoffset: 0; } }
@keyframes preFill { to { fill: rgba(236, 236, 236, 1); } }
.pre-word {
  display: flex; justify-content: space-between;
  font-weight: 800; font-size: clamp(2.1rem, 6.6vw, 3.9rem); line-height: 0.92;
  color: var(--mark); overflow: hidden;
}
.pre-word span { display: inline-block; transform: translateY(112%); animation: preRise 0.95s var(--ease) forwards; }
.pre-word span:nth-child(1) { animation-delay: 0.75s; }
.pre-word span:nth-child(2) { animation-delay: 0.83s; }
.pre-word span:nth-child(3) { animation-delay: 0.91s; }
.pre-word span:nth-child(4) { animation-delay: 0.99s; }
.pre-word span:nth-child(5) { animation-delay: 1.07s; }
@keyframes preRise { to { transform: none; } }
.pre-meta { display: grid; grid-template-columns: minmax(0, 1fr) auto; align-items: center; gap: 16px; }
.pre-bar { position: relative; height: 1px; background: rgba(255, 255, 255, 0.14); overflow: hidden; }
.pre-bar i { position: absolute; inset: 0; background: var(--white); transform-origin: left; transform: scaleX(0); }
.pre-num { font-size: 12px; color: var(--fog); min-width: 3ch; text-align: right; letter-spacing: 0.04em; }
/* coming back from another page: the same moment, faster */
.pre.is-quick .pre-path { animation-duration: 0.8s, 0.5s; animation-delay: 0s, 0.55s; }
.pre.is-quick .pre-word span { animation-duration: 0.6s; animation-delay: 0.25s; }

/* ─── hero ──────────────────────────────────────────────────── */
.hero {
  position: relative;
  min-height: 100vh; min-height: 100svh;
  display: flex; align-items: flex-end;
  padding: calc(var(--head-h) + 24px) 0 clamp(48px, 9vh, 100px);
}
.hero-inner { display: grid; gap: clamp(26px, 4vh, 44px); }
.hero-h { font-size: clamp(2.9rem, 7.4vw, 7.8rem); }
.hero-foot {
  display: grid; grid-template-columns: minmax(0, 1fr) auto;
  align-items: end; gap: 24px 48px;
}
.hero-foot .t-lead { max-width: 52ch; }
.hero-scroll {
  position: absolute; left: 50%; bottom: 18px; z-index: 2;
  width: 1px; height: 46px; background: var(--line); overflow: hidden;
  transform: translateX(-50%);
}
.hero-scroll span {
  position: absolute; left: 0; top: 0; width: 1px; height: 18px; background: var(--white);
  animation: scrollCue 2.2s var(--ease-io) infinite;
}
@keyframes scrollCue { 0% { transform: translateY(-20px); } 70%, 100% { transform: translateY(48px); } }
.hero-fallback, .contact .hero-fallback {
  position: absolute; left: 50%; top: 18%; width: min(760px, 84vw); height: auto;
  transform: translateX(-50%); opacity: 0.14; pointer-events: none;
}


/* ─── clients, right under the hero ────────────────────────── */
.trust {
  position: relative;
  padding: clamp(34px, 6vh, 60px) 0;
  border-top: 1px solid var(--line); border-bottom: 1px solid var(--line);
  background: rgba(10, 10, 10, 0.6);
  -webkit-backdrop-filter: blur(5px); backdrop-filter: blur(5px);
}
.trust-inner { display: grid; grid-template-columns: auto minmax(0, 1fr); align-items: center; gap: clamp(24px, 5vw, 80px); }
.trust-title { font-weight: 650; font-size: 15.5px; color: var(--white); white-space: nowrap; }
.trust-logos { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); align-items: center; gap: clamp(16px, 3vw, 48px); }
.trust-logos a {
  display: flex; align-items: center; justify-content: center; height: 76px;
  opacity: 0.8; transition: opacity 0.4s var(--ease), transform 0.5s var(--ease);
}
.trust-logos a:hover { opacity: 1; transform: translateY(-3px); }
.trust-logos img { max-height: 66px; max-width: 160px; width: auto; height: auto; object-fit: contain; }

/* ─── 02 chaos ──────────────────────────────────────────────── */
.chaos { position: relative; height: 175vh; }
.chaos-sticky {
  position: sticky; top: 0;
  height: 100vh; height: 100svh;
  display: flex; align-items: center;
  overflow: hidden;
}
.chaos-inner { position: relative; z-index: 2; }
.chaos-inner .t-lead { margin-top: 28px; max-width: 42ch; }
.chaos-tags { position: absolute; inset: 0; z-index: 1; pointer-events: none; }
.chaos-tags li {
  position: absolute; left: var(--x); top: var(--y);
  font-size: 12.5px; color: var(--fog); white-space: nowrap;
  padding: 7px 11px; border: 1px solid var(--line-strong); border-radius: 8px;
  background: rgba(10, 10, 10, 0.62);
  -webkit-backdrop-filter: blur(4px); backdrop-filter: blur(4px);
  rotate: var(--r);
  animation: tagDrift 9s ease-in-out infinite;
  animation-delay: var(--t);
}
@keyframes tagDrift {
  0%, 100% { translate: 0 0; }
  50% { translate: 10px -14px; }
}
.chaos-tags li:nth-child(5) { font-weight: 500; color: var(--white); }

/* ─── 03 one ────────────────────────────────────────────────── */
.one {
  position: relative;
  min-height: 105vh;
  display: flex; align-items: center;
  padding: 16vh 0;
}
.one-inner > * { max-width: 700px; }
.one-inner .t-lead { margin-top: 22px; }
.one-list { margin-top: 44px; border-top: 1px solid var(--line-strong); }
.one-list a {
  display: grid; grid-template-columns: minmax(0, 1fr); gap: 4px;
  padding: 20px 0; border-bottom: 1px solid var(--line);
  transition: padding 0.5s var(--ease);
}
.one-name {
  font-size: clamp(1.45rem, 2.4vw, 2.2rem); font-weight: 720; letter-spacing: -0.025em; line-height: 1.15;
  transition: transform 0.6s var(--ease);
}
.one-for { color: var(--grey); font-size: 15px; transition: color 0.4s var(--ease); }
.one-list a:hover .one-name { transform: translateX(10px); }
.one-list a:hover .one-for { color: var(--fog); }
/* systems and apps come first; websites second, never sold as a package */
.one-main a { padding: 26px 0; }
.one-main .one-name { font-size: clamp(1.95rem, 3.5vw, 3.3rem); font-weight: 780; letter-spacing: -0.032em; line-height: 1.04; }
.one-main .one-for { font-size: 16.5px; color: var(--fog); max-width: 46ch; margin-top: 4px; }
.one-side .one-name { font-size: clamp(1.25rem, 1.8vw, 1.6rem); font-weight: 680; }
.one-choice { margin-top: 26px; font-weight: 650; font-size: 16.5px; color: var(--white); }

/* ─── 04 offers ─────────────────────────────────────────────── */
.offer {
  position: relative;
  min-height: 112vh;
  display: flex; align-items: center;
  padding: 14vh 0;
}
.offer-inner { width: 100%; }
.offer-text { max-width: 500px; }
.offer-tag {
  display: inline-flex; align-items: center; gap: 12px;
  font-weight: 650; font-size: 15px; color: var(--white);
  margin-bottom: 20px;
}
.offer-tag::before { content: ''; width: 26px; height: 1px; background: var(--white); }
.offer-text .t-h2 { font-size: clamp(2.1rem, 4.1vw, 4rem); }
.offer-text .t-lead { margin-top: 22px; }
.offer-points { margin-top: 30px; border-top: 1px solid var(--line); }
.offer-points li {
  position: relative; padding: 14px 0 14px 28px;
  border-bottom: 1px solid var(--line);
  color: #D4D4D4; font-size: 16px; line-height: 1.5;
}
.offer-points li::before {
  content: ''; position: absolute; left: 2px; top: 25px; width: 12px; height: 1px; background: var(--white);
}
.offer-note { margin-top: 18px; font-size: 13.5px; color: var(--grey); }
.offer .link-arrow { margin-top: 28px; }
.offer-fallback { display: none; }
.no-gl .offer-fallback {
  display: block;
  position: absolute; right: var(--pad); top: 50%; transform: translateY(-50%);
  width: min(46vw, 640px); margin: 0;
}
.no-gl .offer-fallback img { width: 100%; height: auto; border-radius: 12px; border: 1px solid var(--line-strong); }

/* ─── 05 mapping ────────────────────────────────────────────── */
.mapping {
  position: relative;
  min-height: 130vh;
  display: flex; align-items: center;
  padding: 16vh 0;
}
.mapping-inner > * { max-width: 540px; }
.mapping-inner .t-lead { margin-top: 24px; }
.mapping-inner .t-small { margin-top: 22px; max-width: 46ch; }
.map-legend { display: none; }

/* labels of the 3D world, homepage specifics */
.wl--net { font-size: 12.5px; }
.wl--net::before { display: none; }
.wl--net.is-left { flex-direction: row-reverse; }
.wl--pin { gap: 9px; }
.wl--pin b { font-weight: 700; font-family: var(--font-mono); }
.wl--pin .wl-t { font-family: var(--font); font-size: 13px; letter-spacing: 0; }
.wl--pin.wl--alarm .wl-t { font-weight: 700; }
.wl--pin::before { display: none; }
.no-gl .world-labels { display: none; }

/* ─── 06 process ────────────────────────────────────────────── */
.process { position: relative; padding: clamp(120px, 20vh, 220px) 0 clamp(90px, 14vh, 160px); }
.process-head { max-width: 760px; }
.steps {
  position: relative;
  display: grid; grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: clamp(24px, 3.5vw, 56px);
  margin-top: clamp(56px, 9vh, 90px);
  padding-top: 46px;
}
.steps::before {
  content: ''; position: absolute; top: 5px; left: 0; right: 0; height: 1px;
  background: linear-gradient(90deg, var(--white), rgba(255, 255, 255, 0.25));
  transform-origin: left; transform: scaleX(0);
  transition: transform 1.8s var(--ease);
}
.js .steps.is-in::before, .steps:not(.reveal)::before { transform: scaleX(1); }
html:not(.js) .steps::before { transform: none; }
.step { position: relative; }
.step::before {
  content: ''; position: absolute; top: -46px; left: 0;
  width: 11px; height: 11px; border-radius: 50%;
  background: var(--ink-0); border: 1px solid var(--white);
}
.step:first-child::before { background: var(--white); }
.step-n { font-size: 13px; color: var(--grey); }
.step .t-h3 { margin: 12px 0 14px; }
.step p { color: var(--fog); max-width: 34ch; }
.js .steps.reveal .step { opacity: 0; transform: translateY(16px); transition: opacity 0.9s var(--ease), transform 1s var(--ease); }
.js .steps.reveal .step:nth-child(2) { transition-delay: 0.25s; }
.js .steps.reveal .step:nth-child(3) { transition-delay: 0.5s; }
.js .steps.reveal.is-in .step { opacity: 1; transform: none; }
.process-ai { margin-top: clamp(56px, 9vh, 90px); color: var(--grey); font-size: 15.5px; }

/* ─── 07 clients ────────────────────────────────────────────── */
.clients { position: relative; padding: clamp(100px, 16vh, 180px) 0; }
.clients-head {
  display: grid; grid-template-columns: minmax(0, 1fr) auto;
  align-items: end; gap: 40px;
  margin-bottom: clamp(40px, 7vh, 64px);
}
.proof { display: grid; gap: 8px; justify-items: end; text-align: right; }
.proof-num {
  font-size: clamp(4.2rem, 9vw, 8.6rem); font-weight: 800;
  letter-spacing: -0.045em; line-height: 0.9;
  font-variant-numeric: tabular-nums;
}
.proof-num small { font-size: 0.26em; font-weight: 650; letter-spacing: -0.01em; margin-left: 12px; color: var(--fog); }
.proof-text { color: var(--fog); max-width: 32ch; font-size: 15.5px; }
.client-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px; }
.client-card {
  position: relative; overflow: hidden;
  display: grid; grid-template-rows: auto 1fr auto; gap: 26px;
  min-height: 380px; padding: clamp(26px, 3vw, 42px);
  border: 1px solid var(--line-strong); border-radius: var(--r-card);
  background: linear-gradient(160deg, rgba(255, 255, 255, 0.05), rgba(255, 255, 255, 0.008) 48%), rgba(12, 12, 12, 0.88);
  -webkit-backdrop-filter: blur(6px); backdrop-filter: blur(6px);
  will-change: transform;
}
.js .client-card.rise.is-in { transition: transform 0.35s var(--ease), border-color 0.4s var(--ease), opacity 0.9s var(--ease); }
.client-card:hover { border-color: rgba(255, 255, 255, 0.34); }
.client-logo { height: 108px; display: flex; align-items: center; }
.client-logo img { max-height: 100px; max-width: 230px; width: auto; height: auto; object-fit: contain; }
.client-logo img.is-wide { max-height: 80px; }
.client-info h3 { font-size: clamp(1.5rem, 2.3vw, 2.1rem); font-weight: 760; letter-spacing: -0.022em; line-height: 1.1; }
.client-meta { color: var(--grey); font-size: 14px; margin-top: 6px; }
.client-what { color: #D2D2D2; font-size: 16px; line-height: 1.55; margin-top: 16px; max-width: 46ch; }
.client-link { display: inline-block; margin-top: 14px; font-weight: 650; border-bottom: 1px solid var(--line-strong); transition: border-color 0.3s; }
.client-link:hover { border-color: var(--white); }
.client-tags { display: flex; flex-wrap: wrap; gap: 8px; }
.client-tag {
  font-size: 13px; font-weight: 650; padding: 7px 12px; white-space: nowrap;
  border: 1px solid var(--line-strong); border-radius: 999px;
}

/* ─── 08 contact ────────────────────────────────────────────── */
.contact {
  position: relative;
  min-height: 118vh;
  display: flex; align-items: flex-end;
  padding: 34vh 0 clamp(80px, 13vh, 140px);
}
.contact-inner { display: grid; justify-items: start; }
.contact-h { font-size: clamp(2.6rem, 5.8vw, 6.2rem); }
.contact-inner > .t-lead { max-width: 46ch; }
.contact-inner .t-lead { margin-top: 26px; }
.contact-phone {
  display: inline-block;
  margin: clamp(30px, 6vh, 56px) 0 clamp(26px, 5vh, 44px);
  font-size: clamp(2.5rem, 10.5vw, 9.6rem); font-weight: 800;
  letter-spacing: -0.04em; line-height: 0.9;
  font-variant-numeric: tabular-nums; white-space: nowrap;
  background-image: linear-gradient(currentColor, currentColor);
  background-size: 0% 2px; background-position: 0 100%; background-repeat: no-repeat;
  padding-bottom: 0.08em;
  transition: background-size 0.7s var(--ease);
}
.contact-phone:hover { background-size: 100% 2px; }
.contact-who { margin-top: 26px; color: var(--grey); font-size: 15.5px; }

/* ─── wide screens: keep text in the left column ────────────── */
@media (min-width: 1081px) {
  .chaos-inner, .mapping-inner { padding-right: 0; }
}

/* ─── tablets ───────────────────────────────────────────────── */
@media (max-width: 1080px) {
  .hero-foot { grid-template-columns: 1fr; }
  .trust-inner { grid-template-columns: 1fr; gap: 22px; }
}

/* ─── phones and portrait tablets: the stage is the top half ── */
@media (max-width: 760px), (max-aspect-ratio: 21/20) {
  .hero { padding-bottom: 40px; }
  .hero .t-hero { font-size: clamp(2.5rem, 11.4vw, 4.6rem); }
  .hero-scroll { display: none; }

  .chaos { height: 160vh; }
  .chaos-sticky { align-items: flex-end; padding-bottom: 7svh; }
  .chaos-inner { background: linear-gradient(to bottom, rgba(10, 10, 10, 0), rgba(10, 10, 10, 0.88) 64px); padding-top: 64px; }
  .chaos-tags li {
    left: min(calc((var(--x) - 50%) * 1.7 + 4%), calc(100% - 178px));
    top: calc(var(--y) * 0.42 + 9%);
    font-size: 11px; padding: 5px 8px;
  }

  .one { align-items: flex-end; min-height: 120svh; padding: 52svh 0 10svh; }
  .one-inner { background: linear-gradient(to bottom, rgba(10, 10, 10, 0), rgba(10, 10, 10, 0.9) 70px); padding-top: 70px; }

  .offer { align-items: flex-start; min-height: 0; padding: 56svh 0 12svh; }
  .offer-text {
    max-width: none;
    background: linear-gradient(to bottom, rgba(10, 10, 10, 0), rgba(10, 10, 10, 0.92) 80px);
    padding-top: 80px;
  }

  .mapping { align-items: flex-start; min-height: 0; padding: 54svh 0 12svh; }
  .mapping-inner {
    background: linear-gradient(to bottom, rgba(10, 10, 10, 0), rgba(10, 10, 10, 0.92) 80px);
    padding-top: 80px;
  }
  .map-legend {
    display: grid; gap: 0; margin-top: 26px; border-top: 1px solid var(--line);
  }
  .map-legend li {
    display: grid; grid-template-columns: 44px 1fr; align-items: baseline;
    padding: 11px 0; border-bottom: 1px solid var(--line); font-size: 15.5px; color: #D4D4D4;
  }
  .map-legend b { font-weight: 700; color: var(--white); font-size: 13px; }
  .map-legend .is-alarm { font-weight: 700; color: var(--white); }
  .wl--pin .wl-t { display: none; }
  .wl--net { display: none; }
  .wl--chip { font-size: 10.5px; }

  .no-gl .offer { flex-direction: column; align-items: stretch; padding-top: 12vh; }
  .no-gl .offer-fallback { order: -1; position: static; transform: none; width: auto; margin: 0 var(--pad) 26px; }
  .no-gl .offer-text { background: none; padding-top: 0; }
}

@media (max-width: 760px) {
  .clients-head { grid-template-columns: 1fr; gap: 28px; }
  .proof { justify-items: start; text-align: left; }
  .client-grid { grid-template-columns: 1fr; }
  .client-card { min-height: 0; gap: 20px; }
  .client-logo { height: 84px; }
  .client-logo img { max-height: 78px; max-width: 190px; }
  .trust-logos { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 20px 18px; }
  .trust-logos a { height: 62px; }
  .trust-logos img { max-height: 54px; max-width: 130px; }

  .steps { grid-template-columns: 1fr; padding-top: 0; padding-left: 38px; gap: 40px; }
  .steps::before {
    top: 4px; bottom: 4px; left: 5px; right: auto; width: 1px; height: auto;
    background: linear-gradient(180deg, var(--white), rgba(255, 255, 255, 0.25));
    transform-origin: top; transform: scaleY(0);
  }
  .js .steps.is-in::before { transform: scaleY(1); }
  .step::before { top: 6px; left: -38px; }

  .contact { padding-top: 46svh; min-height: 0; }
  .contact-phone { font-size: clamp(2.4rem, 12.4vw, 4rem); }
}
