/*
 * SEISIN — strona „wkrótce”
 * Style strony. Sekcje: zmienne i podstawy, układ, scena 3D (budynek, żuraw, skan),
 * karta piętra, stopka, animacje wejścia, intro, widoki tablet/telefon, ograniczony ruch.
 */

:root {
  --bg: #F1F1EE;
  --ink: #20211E;
  --muted: #696A65;
  --graphite: #161616;
  --lime: #D4F34A;
  --lime-dark: #B9D82F;
  --paper: #FFFFFF;
  --rule: #E3E1DB;
  color-scheme: light;
}
* { box-sizing: border-box; }
html, body { margin: 0; }
body {
  min-height: 100vh;
  min-height: 100svh;
  background: var(--bg);
  color: var(--ink);
  font-family: "Sora", system-ui, sans-serif;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}
a { color: inherit; }
:focus-visible { outline: 3px solid var(--graphite); outline-offset: 4px; border-radius: 8px; }
.sr { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0; }

/* ---------- Układ strony ---------- */
.page {
  position: relative;
  min-height: 100vh;
  min-height: 100svh;
  display: flex;
  flex-direction: column;
  gap: clamp(8px, 2vh, 20px);
  padding: clamp(14px, 3.5vh, 30px) clamp(16px, 4.5vw, 84px);
  padding-bottom: calc(clamp(14px, 3.5vh, 30px) + env(safe-area-inset-bottom, 0px));
  isolation: isolate;
}
.page::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: -1;
  pointer-events: none;
  background:
    radial-gradient(ellipse at 9% 83%, #ffffff70, transparent 50%),
    radial-gradient(ellipse at 74% 42%, #ffffff9c, transparent 46%);
}
.top, .main, .foot { width: 100%; max-width: 1440px; margin-inline: auto; }

.top { display: flex; align-items: center; justify-content: space-between; gap: 16px; flex: none; }
.brand { display: inline-flex; align-items: center; gap: 12px; text-decoration: none; color: var(--ink); }
.brand-mark { display: block; width: 44px; height: 44px; flex: 0 0 44px; }
.brand-word { display: block; height: 20px; width: auto; }
.status {
  display: inline-flex; align-items: center; gap: 9px;
  padding: 9px 15px 9px 13px; border-radius: 999px;
  background: var(--paper); box-shadow: 0 8px 30px #37342c0d;
  font-size: 12px; font-weight: 600; line-height: 1; white-space: nowrap;
}
.status i { width: 8px; height: 8px; border-radius: 50%; background: var(--lime-dark); animation: pulse 2.4s ease-out infinite; }
@keyframes pulse { 0% { box-shadow: 0 0 0 0 #b9d82fb0; } 70%, 100% { box-shadow: 0 0 0 9px #b9d82f00; } }

.main {
  flex: 1;
  display: grid;
  grid-template-columns: minmax(0, .95fr) minmax(0, 1.25fr);
  align-items: center;
  gap: clamp(24px, 3.5vw, 64px);
  min-height: 0;
}
.copy { max-width: 660px; padding-bottom: clamp(0px, 4vh, 40px); }
.headline {
  margin: 0;
  font-family: "Bricolage Grotesque", "Sora", system-ui, sans-serif;
  font-weight: 600;
  font-size: clamp(40px, min(4.6vw, 9vh), 76px);
  line-height: 1.01;
  letter-spacing: -.055em;
}
.headline .ln { display: block; overflow: hidden; overflow: visible clip; padding: 0 .14em .12em 0; margin-right: -.14em; margin-bottom: -.12em; }
.headline .ln > span { display: block; }
@media (min-width: 640px) { .headline .ln { white-space: nowrap; } }
.lead { margin: 28px 0 0; max-width: 460px; text-wrap: pretty; font-size: 15px; line-height: 1.75; color: var(--muted); }
.cta-row { display: flex; flex-wrap: wrap; align-items: center; gap: 14px 20px; margin-top: 34px; }
.cta {
  display: inline-flex; align-items: center; gap: 16px;
  min-height: 54px; padding: 6px 6px 6px 26px; border-radius: 999px;
  background: var(--graphite); color: #fff; text-decoration: none;
  font-size: 13px; font-weight: 650; letter-spacing: .005em;
  transition: background .2s, transform .2s;
}
.cta:hover { background: #000; transform: translateY(-1px); }
.cta-ic { display: grid; place-items: center; width: 42px; height: 42px; border-radius: 50%; background: var(--lime); color: var(--graphite); transition: transform .35s cubic-bezier(.2, .8, .2, 1); }
.cta-ic svg { width: 17px; height: 17px; }
.cta:hover .cta-ic { transform: translateX(3px); }
.cta-note { max-width: 210px; font-size: 12px; line-height: 1.55; color: var(--muted); }

/* ---------- Scena 3D ---------- */
.showcase { position: relative; height: clamp(460px, 72vh, 720px); min-width: 0; }
.stage { position: absolute; inset: 0; overflow: hidden; cursor: default; }
.fit {
  position: absolute;
  left: var(--ox, 60%);
  top: var(--oy, 75%);
  width: 0; height: 0;
  transform: scale(var(--k, 1));
  transform-style: preserve-3d;
}
.world { position: absolute; left: 0; top: 0; transform-style: preserve-3d; transform: rotateX(var(--rx, -30deg)) rotateY(var(--ry, -38deg)); }
.o { position: absolute; left: 0; top: 0; transform-style: preserve-3d; }
.f { position: absolute; backface-visibility: hidden; -webkit-backface-visibility: hidden; }
.ds { backface-visibility: visible; -webkit-backface-visibility: visible; }

.ground {
  pointer-events: none;
  background-image:
    linear-gradient(#dcd7cf 1px, transparent 1px),
    linear-gradient(90deg, #dcd7cf 1px, transparent 1px);
  background-size: 40px 40px;
  background-position: center;
  -webkit-mask-image: radial-gradient(closest-side, #000 34%, transparent 96%);
  mask-image: radial-gradient(closest-side, #000 34%, transparent 96%);
}
.g-shadow { position: absolute; border-radius: 50%; background: radial-gradient(closest-side, #2a272224, #2a272200); }
.g-plot { position: absolute; border: 1.5px dashed #c4beb4; border-radius: 4px; }
.g-corner { position: absolute; width: 26px; height: 26px; border: 0 solid var(--lime-dark); }
.g-corner.c1 { border-width: 3px 0 0 3px; }
.g-corner.c2 { border-width: 3px 3px 0 0; }
.g-corner.c3 { border-width: 0 3px 3px 0; }
.g-corner.c4 { border-width: 0 0 3px 3px; }

.plinth .f-front { background: linear-gradient(180deg, #efebe5, #e4dfd8); }
.plinth .f-right { background: #d6d0c7; }
.plinth .f-top {
  background-color: #f7f5f1;
  background-image: linear-gradient(#e7e3dc 1px, transparent 1px), linear-gradient(90deg, #e7e3dc 1px, transparent 1px);
  background-size: 30px 30px;
  box-shadow: inset 0 0 0 1px #ddd8d0;
}

.slab .f-front { background: linear-gradient(180deg, #ffffff, #f0ede8); box-shadow: inset 0 2px 0 #ffffff, inset 0 -1px 0 #00000012; }
.slab .f-right { background: linear-gradient(180deg, #d8d3cb, #c6c0b7); box-shadow: inset 0 2px 0 #e2ded7, inset 0 -1px 0 #00000016; }
.slab .f-top {
  background-color: #faf9f7;
  background-image:
    linear-gradient(#e3ded6, #e3ded6), linear-gradient(#e3ded6, #e3ded6),
    linear-gradient(#e3ded6, #e3ded6), linear-gradient(#e3ded6, #e3ded6);
  background-repeat: no-repeat;
  background-size: 1px 100%, 100% 1px, 1px 46%, 1px 54%;
  background-position: 36% 0, 0 52%, 70% 100%, 84% 0;
  box-shadow: inset 0 0 0 1px #d6d0c8;
}
.band { position: absolute; top: 10px; height: 20px; }
.band::before, .band::after { content: ""; position: absolute; inset: 0; }
.f-front > .band { left: 16px; right: 16px; }
.f-right > .band { left: 62px; right: 14px; }
.f-front > .band::before { background: repeating-linear-gradient(90deg, #343431 0 30px, #e8e5df 30px 32px); }
.f-right > .band::before { background: repeating-linear-gradient(90deg, #514f4a 0 26px, #ccc6bd 26px 28px); }
.band::after {
  opacity: 0;
  background: repeating-linear-gradient(90deg, var(--lime) 0 30px, var(--lime-dark) 30px 32px);
  box-shadow: 0 0 26px 2px #d4f34ab0;
  transition: opacity .55s ease;
}
.fl.on .band::after { opacity: 1; }
.door { position: absolute; right: 64px; bottom: 0; width: 30px; height: 31px; background: #d1cbc2; box-shadow: inset 0 0 0 1px #c2bbb1; }
.door::after { content: ""; position: absolute; left: 50%; top: 3px; bottom: 0; width: 1px; background: #a49d92; }
.pent .f-front > .band { height: 8px; left: 18px; right: 18px; }
.pent .f-front > .band.b2 { top: 26px; }
.pent .f-right > .band { left: 16px; right: 16px; top: 10px; height: 8px; }
.pent .win { position: absolute; left: 30px; top: 22px; width: 46px; height: 24px; background: var(--lime); box-shadow: inset 0 0 0 1px #b9d82f; }
.unit .f-front { background: #ebe8e3; }
.unit .f-right { background: #cdc7be; }
.unit .f-top { background: #f4f2ee; box-shadow: inset 0 0 0 1px #d4cec5; }

.fin .f-front { background: var(--lime); }
.fin .f-right { background: var(--lime-dark); }
.fin .f-top { background: #e6f88f; }

.fl { cursor: pointer; }
.drawer { transition: transform .85s cubic-bezier(.2, .8, .2, 1); }
.fl.on .drawer { transform: translate3d(0, 0, 38px); }
.anc { position: absolute; left: 20%; top: 50%; width: 0; height: 0; }

/* Żuraw */
.lat-v .f {
  background:
    linear-gradient(90deg, #2a2b27 0 1.6px, transparent 1.6px calc(100% - 1.6px), #2a2b27 calc(100% - 1.6px)),
    repeating-linear-gradient(45deg, transparent 0 8px, #2a2b27c0 8px 9.3px);
}
.lat-h .f {
  background:
    linear-gradient(180deg, #2a2b27 0 1.6px, transparent 1.6px calc(100% - 1.6px), #2a2b27 calc(100% - 1.6px)),
    repeating-linear-gradient(45deg, transparent 0 7px, #2a2b27c0 7px 8.3px);
}
.lat-h .f-top, .lat-h .f-bottom { background: repeating-linear-gradient(90deg, #2a2b27 0 1.4px, transparent 1.4px 9px); }
.c-dark .f { background: #2a2b27; }
.c-base .f-front { background: #e7e3dd; }
.c-base .f-right { background: #cfc9c0; }
.c-base .f-top { background: #f2f0ec; }
.c-lime .f { background: var(--lime-dark); }
.c-lime .f-front, .c-lime .f-back { background: var(--lime); }
.c-lime .f-top { background: #e2f781; }
.c-cab .f { background: #2a2b27; }
.c-cab .f-front, .c-cab .f-back { background: linear-gradient(180deg, #2a2b27 0 3px, var(--lime) 3px 9px, #2a2b27 9px); }
.ties svg { display: block; width: 100%; height: 100%; overflow: visible; }
.wire { background: #2a2b27; }
.load .f-front { background: linear-gradient(180deg, #ffffff, #f0ede8); }
.load .f-back { background: #f0ede8; }
.load .f-left, .load .f-right { background: #cfc9c0; }
.load .f-top { background: #faf9f7; box-shadow: inset 0 0 0 1px #d6d0c8; }
.load .f-bottom { background: #bdb7ae; }
.load .f-front::after, .load .f-back::after { content: ""; position: absolute; left: 6px; right: 6px; top: 4px; height: 6px; background: repeating-linear-gradient(90deg, #343431 0 10px, #e8e5df 10px 11px); }
.jib { animation: jib 15s ease-in-out infinite alternate; }
.trolley { animation: trolley 9s ease-in-out infinite alternate; }
.cable { transform-origin: 0 0; animation: cable 6.5s ease-in-out infinite alternate; }
.hook { animation: hook 6.5s ease-in-out infinite alternate; }
@keyframes jib { from { transform: rotateY(-22deg); } to { transform: rotateY(44deg); } }
@keyframes trolley { from { transform: translateX(96px); } to { transform: translateX(196px); } }
@keyframes cable { from { transform: scaleY(.55); } to { transform: scaleY(1); } }
@keyframes hook { from { transform: translateY(55px); } to { transform: translateY(100px); } }

/* Skan budynku */
.scan-s { background: var(--lime); box-shadow: 0 0 14px 2px #d4f34aa8; opacity: 0; }
.go .scan { animation: scan 9s 3s cubic-bezier(.45, 0, .4, 1) infinite; }
.go .scan-s { animation: scan-fade 9s 3s linear infinite; }
@keyframes scan { 0% { transform: translateY(-8px); } 46%, 100% { transform: translateY(-250px); } }
@keyframes scan-fade { 0% { opacity: 0; } 5% { opacity: 1; } 36% { opacity: .9; } 46%, 100% { opacity: 0; } }

/* Dekoracje w tle sceny */
.marks { position: absolute; inset: 0; pointer-events: none; }
.plus { position: absolute; width: 22px; height: 22px; }
.plus::before, .plus::after { content: ""; position: absolute; background: #c3bcb1; }
.plus::before { left: 10px; top: 0; width: 1.3px; height: 22px; }
.plus::after { top: 10px; left: 0; height: 1.3px; width: 22px; }

/* Wejście sceny */
.js .fl { transform: translate3d(0, -620px, 0); }
.js .fl .f { opacity: 0; transition: opacity .3s ease; }
.fl.in { animation: drop .95s forwards; }
.fl.in .f { opacity: 1; }
@keyframes drop {
  0% { transform: translate3d(0, -620px, 0); animation-timing-function: cubic-bezier(.5, 0, .85, .45); }
  68% { transform: translate3d(0, 0, 0); animation-timing-function: cubic-bezier(.2, .7, .35, 1); }
  82% { transform: translate3d(0, -10px, 0); animation-timing-function: cubic-bezier(.55, 0, .85, .5); }
  100% { transform: translate3d(0, 0, 0); }
}
.js .grow { transform: scaleY(.001); transition: transform 1.1s cubic-bezier(.3, .8, .25, 1); }
.grow.in { transform: none; }
.js .appear .f { opacity: 0; transition: opacity .6s ease; }
.appear.in .f { opacity: 1; }
.js .ground, .js .marks { opacity: 0; transition: opacity 1.2s ease; }
.go .ground, .go .marks { opacity: 1; }

/* ---------- Karta piętra ---------- */
.card {
  position: absolute;
  left: 0;
  top: var(--cy, 50%);
  translate: 0 -50%;
  width: 252px;
  padding: 20px 22px 18px;
  border-radius: 26px;
  background: var(--paper);
  border: 1px solid #ffffffd0;
  box-shadow: 0 22px 60px #37342c12;
  z-index: 2;
}
.card-top { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.card-floor { margin: 0; display: inline-flex; align-items: center; gap: 8px; font-size: 12px; font-weight: 600; color: var(--muted); }
.card-floor b { display: inline-grid; place-items: center; min-width: 26px; height: 26px; padding: 0 6px; border-radius: 9px; background: var(--graphite); color: var(--lime); font-size: 11px; font-weight: 700; }
.card-pause { display: grid; place-items: center; width: 32px; height: 32px; padding: 0; border: 0; border-radius: 50%; background: #f4f2f0; color: var(--graphite); cursor: pointer; transition: background .2s; }
.card-pause:hover { background: #e9e7e2; }
.card-pause svg { width: 13px; height: 13px; }
.card-pause .i-play, .card.user-paused .card-pause .i-pause { display: none; }
.card.user-paused .card-pause .i-play { display: block; }
.card-title { margin: 14px 0 0; font-family: "Bricolage Grotesque", "Sora", sans-serif; font-weight: 600; font-size: 23px; line-height: 1.15; letter-spacing: -.04em; }
.card-desc { margin: 8px 0 0; min-height: 3.4em; font-size: 12.5px; line-height: 1.7; color: var(--muted); }
.steps { display: flex; gap: 6px; margin-top: 16px; }
.step { position: relative; flex: 1; height: 22px; padding: 0; border: 0; background: none; cursor: pointer; }
.step::before { content: ""; position: absolute; left: 0; right: 0; top: 9px; height: 4px; border-radius: 99px; background: #e9e8e3; }
.step i { position: absolute; left: 0; right: 0; top: 9px; height: 4px; border-radius: 99px; background: var(--graphite); transform: scaleX(0); transform-origin: left center; }
.step.done i { transform: scaleX(1); }
.step.on i { animation: fill var(--dur, 5s) linear forwards; }
.card.paused .step.on i { animation-play-state: paused; }
.step:focus-visible { outline-offset: 2px; }
@keyframes fill { from { transform: scaleX(0); } to { transform: scaleX(1); } }
.js .card { opacity: 0; transform: translateY(14px); transition: opacity .6s ease, transform .7s cubic-bezier(.2, .8, .2, 1); }
.js .card.in { opacity: 1; transform: none; }

.leader { position: absolute; left: 0; top: 0; overflow: visible; pointer-events: none; z-index: 1; opacity: 0; transition: opacity .5s ease; }
.leader.in { opacity: 1; }
.leader path { fill: none; stroke: #a69f95; stroke-width: 1.2; }
.leader .dot-floor { fill: var(--graphite); stroke: #fff; stroke-width: 2; }
.leader .ring { fill: none; stroke: var(--lime-dark); stroke-width: 1.5; transform-box: fill-box; transform-origin: center; animation: ring 2.2s ease-out infinite; }
.leader .dot-card { fill: var(--lime-dark); }
@keyframes ring { from { transform: scale(.5); opacity: .9; } to { transform: scale(2.2); opacity: 0; } }

/* ---------- Stopka ---------- */
.foot { display: flex; justify-content: space-between; align-items: flex-end; flex-wrap: wrap; gap: 10px 24px; flex: none; font-size: 11px; line-height: 1.6; color: var(--muted); }
.foot p { margin: 0; }
.foot strong { font-weight: 700; color: var(--ink); letter-spacing: .04em; }

/* ---------- Wejście treści ---------- */
.js .headline .ln > span { transform: translateY(-108%); }
.go .headline .ln > span { animation: land .95s var(--d, 0s) forwards; }
@keyframes land {
  0% { transform: translateY(-108%); animation-timing-function: cubic-bezier(.5, 0, .85, .45); }
  66% { transform: translateY(0); animation-timing-function: cubic-bezier(.2, .7, .35, 1); }
  80% { transform: translateY(-5%); animation-timing-function: cubic-bezier(.55, 0, .85, .5); }
  100% { transform: translateY(0); }
}
.js .rise { opacity: 0; transform: translateY(12px); }
.go .rise { opacity: 1; transform: none; transition: opacity .8s ease var(--d, 0s), transform .9s cubic-bezier(.2, .8, .2, 1) var(--d, 0s); }
.js .fade { opacity: 0; }
.go .fade { opacity: 1; transition: opacity .8s ease var(--d, 0s); }

/* ---------- Intro: znak SEISIN ---------- */
.intro-layer { display: none; }
.intro .intro-layer { display: block; position: fixed; inset: 0; z-index: 40; }
.intro .brand-mark { visibility: hidden; }
.intro-bg { position: absolute; inset: 0; background: var(--bg); }
.intro-mark { position: absolute; left: 50%; top: 50%; width: 96px; height: 96px; margin: -48px 0 0 -48px; transform-origin: 0 0; }
.intro-mark svg { display: block; width: 100%; height: 100%; animation: mark-in .6s cubic-bezier(.2, .9, .3, 1.25) both; }
.intro-s path { fill: #111111; fill-opacity: 0; stroke: #111111; stroke-width: 170; stroke-dasharray: 1; stroke-dashoffset: 1; animation: draw .85s .25s cubic-bezier(.6, 0, .3, 1) forwards, fill-in .4s .95s ease forwards; }
@keyframes mark-in { from { transform: scale(.35) rotate(-8deg); opacity: 0; } to { transform: none; opacity: 1; } }
@keyframes draw { to { stroke-dashoffset: 0; } }
@keyframes fill-in { to { fill-opacity: 1; } }

.card.compact { width: 228px; }
.card.compact .card-title { font-size: 21px; }

/* ---------- Tablet i małe laptopy (< 1100 px): treść nad sceną ---------- */
@media (max-width: 1099px) {
  .main { grid-template-columns: minmax(0, 1fr); align-items: start; gap: 8px; }
  .copy { padding: clamp(16px, 4vh, 40px) 0 0; max-width: 640px; }
  .showcase { height: clamp(460px, 70vw, 640px); }
}
/* ---------- Telefon (< 640 px) ---------- */
@media (max-width: 639px) {
  .page { gap: 6px; }
  .brand-mark { width: 40px; height: 40px; flex-basis: 40px; }
  .brand-word { height: 17px; }
  .status { padding: 8px 12px 8px 11px; font-size: 11px; }
  .headline { font-size: clamp(34px, 10.6vw, 52px); }
  .lead { margin-top: 18px; font-size: 14px; }
  .cta-row { margin-top: 24px; }
  .showcase { height: auto; display: flex; flex-direction: column; margin-top: 4px; }
  .stage { position: relative; inset: auto; height: clamp(340px, 108vw, 460px); }
  .card { position: relative; left: auto; top: auto; translate: none; width: 100%; margin-top: 4px; }
  .foot { flex-direction: column; align-items: center; text-align: center; gap: 4px; margin-top: 18px; }
}

@media (prefers-reduced-motion: reduce) {
  .status i, .jib, .trolley, .cable, .hook, .leader .ring { animation: none !important; }
  .go .scan, .go .scan-s { animation: none !important; }
  .drawer, .band::after, .card, .leader { transition: none !important; }
  .fl, .fl.in { animation: none !important; transform: none !important; }
  .fl .f, .js .appear .f, .js .ground, .js .marks { opacity: 1 !important; transition: none !important; }
  .js .grow { transform: none !important; transition: none !important; }
  .js .headline .ln > span, .js .rise, .js .fade, .js .card { opacity: 1 !important; transform: none !important; animation: none !important; }
}
