/* CADLORD — landing page v2, light industrial (working draft). v1 (dark) is in /v1/ */
@font-face { font-family: "Archivo"; src: url(../fonts/archivo-latin.woff2) format("woff2"); font-weight: 100 900; font-stretch: 62% 125%; font-display: swap;
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD; }
@font-face { font-family: "Archivo"; src: url(../fonts/archivo-latin-ext.woff2) format("woff2"); font-weight: 100 900; font-stretch: 62% 125%; font-display: swap;
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C4, U+2113, U+2C60-2C7F, U+A720-A7FF; }
@font-face { font-family: "JetBrains Mono"; src: url(../fonts/jbmono-latin.woff2) format("woff2"); font-weight: 400 600; font-display: swap; }

:root {
  /* v2 (8. 10.): svetlý industriálny — papier, grafit, oceľová modrá, bezpečnostná oranžová ako jemný akcent */
  color-scheme: light;
  --ink: #F4F3EF;      /* pozadie: výkresový papier */
  --ink-2: #FFFFFF;    /* plochy */
  --ink-3: #E9E8E3;
  --paper: #1E2328;    /* text: grafit */
  --muted: #545C64;
  --faint: #7F878F;
  --line: rgba(30, 35, 40, .07);
  --line-2: rgba(30, 35, 40, .16);
  --acc: #C8450E;      /* bezpečnostná oranžová (text-safe odtieň) */
  --acc-2: #EE6A1F;    /* jasnejšia oranžová pre plochy */
  --steel: #24527F;    /* priemyselná modrá */
  --acc-ink: #FFFFFF;
  --display: "Archivo", system-ui, sans-serif;
  --mono: "JetBrains Mono", ui-monospace, "SFMono-Regular", Menlo, monospace;
  --wrap: 1180px;
  --gut: 16px;
}
@media (min-width: 720px) { :root { --gut: 32px; } }

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }
body {
  margin: 0; background: var(--ink); color: var(--paper);
  font-family: var(--display); font-size: 17px; line-height: 1.6; font-stretch: 100%;
  overflow-x: hidden;
}
img, svg { display: block; max-width: 100%; }
a { color: inherit; }
::selection { background: #F6CFB1; color: var(--paper); }
:focus-visible { outline: 2px solid var(--steel); outline-offset: 3px; }

.wrap { width: 100%; max-width: var(--wrap); margin-inline: auto; padding-inline: var(--gut); }
.mono { font-family: var(--mono); }
.sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }

/* ---------- blueprint background ---------- */
.grid-bg {
  position: absolute; inset: 0; pointer-events: none; z-index: 0;
  background-image:
    linear-gradient(var(--line) 1px, transparent 1px),
    linear-gradient(90deg, var(--line) 1px, transparent 1px),
    linear-gradient(rgba(30,35,40,.03) 1px, transparent 1px),
    linear-gradient(90deg, rgba(30,35,40,.03) 1px, transparent 1px);
  background-size: 120px 120px, 120px 120px, 24px 24px, 24px 24px;
  background-position: -1px -1px;
  -webkit-mask-image: radial-gradient(ellipse 90% 75% at 60% 35%, #000 30%, transparent 85%);
          mask-image: radial-gradient(ellipse 90% 75% at 60% 35%, #000 30%, transparent 85%);
}

/* ---------- header ---------- */
.top { position: sticky; top: 0; z-index: 20; background: rgba(244,243,239,.9); backdrop-filter: blur(10px); -webkit-backdrop-filter: blur(10px); border-bottom: 1px solid var(--line); }
.top .wrap { display: flex; align-items: center; justify-content: space-between; gap: 16px; height: 64px; }
.brand { display: flex; align-items: center; text-decoration: none; }
.brand img { height: 36px; width: auto; }
.nav { display: none; gap: 28px; font-family: var(--mono); font-size: 13px; letter-spacing: .04em; }
.nav a { text-decoration: none; color: var(--muted); }
.nav a:hover { color: var(--paper); }
@media (min-width: 900px) { .nav { display: flex; } }

.btn {
  display: inline-flex; align-items: center; gap: 10px; justify-content: center;
  font-family: var(--mono); font-size: 14px; font-weight: 600; letter-spacing: .02em;
  padding: 13px 20px; border-radius: 2px; text-decoration: none; cursor: pointer;
  border: 1px solid var(--paper); background: var(--paper); color: #fff;
  transition: transform .15s ease, background .15s ease;
}
.btn:hover { transform: translateY(-1px); background: var(--steel); border-color: var(--steel); }
.btn.ghost { background: transparent; color: var(--paper); border-color: rgba(30,35,40,.35); }
.btn.ghost:hover { border-color: var(--paper); background: transparent; }
.btn.sm { padding: 9px 14px; font-size: 13px; }

/* ---------- hero ---------- */
.hero { position: relative; overflow: hidden; border-bottom: 1px solid var(--line); }
.hero .wrap { position: relative; z-index: 1; display: grid; gap: 24px; padding-block: 56px 40px; }
@media (min-width: 980px) { .hero .wrap { grid-template-columns: 1.05fr .95fr; align-items: center; padding-block: 88px 72px; } }
.eyebrow { font-family: var(--mono); font-size: 12.5px; letter-spacing: .12em; text-transform: uppercase; color: var(--muted); display: flex; align-items: center; gap: 10px; }
.eyebrow::before { content: ""; width: 22px; height: 1px; background: var(--acc); }
h1, h2, h3 { font-family: var(--display); line-height: 1.04; margin: 0; letter-spacing: -.01em; }
h1 { font-size: clamp(2.1rem, 6vw, 3.6rem); font-weight: 720; font-stretch: 100%; margin-top: 18px; }
h1 em { font-style: normal; color: var(--steel); }
.lead { margin: 22px 0 0; font-size: clamp(1.02rem, 1.6vw, 1.18rem); color: #3A4148; max-width: 34em; }
.cta { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 30px; }
.meta { margin-top: 34px; display: flex; flex-wrap: wrap; gap: 8px 22px; font-family: var(--mono); font-size: 12.5px; color: var(--muted); }
.meta span::before { content: "■ "; color: var(--acc); font-size: 9px; vertical-align: 2px; }

/* drawing */
.sheet { position: relative; border: 1px solid var(--line-2); background: #FFFFFF; padding: 10px; box-shadow: 0 1px 0 rgba(30,35,40,.04), 0 18px 40px -24px rgba(30,35,40,.25); }
.sheet::before, .sheet::after { content: ""; position: absolute; width: 14px; height: 14px; border-color: var(--acc-2); border-style: solid; }
.sheet::before { top: -1px; left: -1px; border-width: 2px 0 0 2px; }
.sheet::after { bottom: -1px; right: -1px; border-width: 0 2px 2px 0; }
.sheet svg { width: 100%; height: auto; }
.titleblock { display: grid; grid-template-columns: 1fr auto auto; border-top: 1px solid var(--line-2); font-family: var(--mono); font-size: 11px; color: var(--muted); }
.titleblock > div { padding: 7px 10px; border-left: 1px solid var(--line-2); white-space: nowrap; }
.titleblock > div:first-child { border-left: 0; overflow: hidden; text-overflow: ellipsis; }
.titleblock b { color: var(--paper); font-weight: 500; }
.readout { position: absolute; top: 18px; left: 20px; font-family: var(--mono); font-size: 11px; color: var(--faint); line-height: 1.5; pointer-events: none; }
.readout i { font-style: normal; color: var(--acc); }

#part .f { opacity: 0; transition: none; }
#part .f-front { fill: #F6CFB1; }
#part .f-top { fill: #EDEFF1; }
#part .f-side { fill: #D5DAE0; }
#part .e { fill: none; stroke: var(--paper); stroke-width: 1.8; stroke-linecap: round; stroke-dasharray: 1; stroke-dashoffset: 1; }
#part .hole { stroke-width: 1.6; }
#part .h { stroke: var(--paper); stroke-width: 1.1; stroke-dasharray: 6 5; opacity: 0; }
#part .cm { stroke: var(--paper); stroke-width: 1; stroke-dasharray: 10 3 2 3; opacity: 0; }
#part .d { opacity: 0; }
#part .ext, #part .dl, #part .ldr { stroke: var(--steel); stroke-width: 1; fill: none; }
#part text { font-family: var(--mono); font-size: 15px; fill: var(--steel); }
#part .cursor { opacity: 0; }
#part .cursor path { stroke: var(--acc); stroke-width: 1.2; fill: none; }

.play #part .e { animation: draw .55s cubic-bezier(.5,0,.3,1) forwards; animation-delay: calc(var(--i) * 70ms + 150ms); }
.play #part .h, .play #part .cm { animation: fade .5s ease forwards 1.25s; }
.play #part .h { animation-name: fadeh; }
.play #part .f { animation: fade .6s ease forwards 1.35s; }
.play #part .d { animation: fade .5s ease forwards; }
.play #part .d:nth-of-type(1) { animation-delay: 1.8s; }
.play #part .d:nth-of-type(2) { animation-delay: 1.95s; }
.play #part .d:nth-of-type(3) { animation-delay: 2.1s; }
.play #part .d:nth-of-type(4) { animation-delay: 2.25s; }
.play #part .cursor { animation: fade .3s ease forwards 2.4s; }
.play #part .cursor g { animation: roam 9s ease-in-out infinite 2.6s; }
.paused #part .cursor g { animation-play-state: paused; }
@keyframes draw { to { stroke-dashoffset: 0; } }
@keyframes fade { to { opacity: 1; } }
@keyframes fadeh { to { opacity: .4; } }
@keyframes roam {
  0%, 100% { transform: translate(0, 0); }
  30% { transform: translate(-150px, 120px); }
  60% { transform: translate(60px, 220px); }
}
/* static (no animation / reduced motion) */
.static #part .e { stroke-dashoffset: 0; }
.static #part .f, .static #part .d, .static #part .cm { opacity: 1; }
.static #part .h { opacity: .4; }
@media (prefers-reduced-motion: reduce) {
  #part .e { stroke-dashoffset: 0 !important; animation: none !important; }
  #part .f, #part .d, #part .cm { opacity: 1 !important; animation: none !important; }
  #part .h { opacity: .4 !important; animation: none !important; }
  #part .cursor { display: none; }
}

/* ---------- sections ---------- */
section { position: relative; }
.sec { padding-block: 80px; border-bottom: 1px solid var(--line); }
@media (min-width: 900px) { .sec { padding-block: 112px; } }
.sec-head { display: grid; gap: 14px; margin-bottom: 44px; max-width: 760px; }
.tag { font-family: var(--mono); font-size: 12px; letter-spacing: .12em; text-transform: uppercase; color: var(--acc); }
.tag span { color: var(--faint); }
h2 { font-size: clamp(1.8rem, 4.2vw, 2.7rem); font-weight: 700; font-stretch: 100%; }
.sec-head p { margin: 0; color: #4A525A; font-size: 1.06rem; }

/* intro */
.intro { display: grid; gap: 1px; background: var(--line); border: 1px solid var(--line); }
@media (min-width: 820px) { .intro { grid-template-columns: repeat(3, 1fr); } }
.intro > div { background: var(--ink-2); padding: 28px 24px; }
.intro h3 { font-size: 1.2rem; font-weight: 650; font-stretch: 100%; margin-top: 12px; }
.intro p { margin: 10px 0 0; color: var(--muted); font-size: .98rem; }
.idx { font-family: var(--mono); font-size: 12px; color: var(--faint); }

/* categories */
.cats { display: grid; gap: 16px; grid-template-columns: 1fr; }
@media (min-width: 640px) { .cats { grid-template-columns: repeat(2, 1fr); } }
@media (min-width: 1000px) { .cats { grid-template-columns: repeat(3, 1fr); } }
.cat { position: relative; padding: 26px 24px 24px; border: 1px solid var(--line-2); background: var(--ink-2); transition: border-color .2s ease, transform .2s ease; }
.cat:hover { border-color: var(--steel); transform: translateY(-2px); }
.cat::after { content: ""; position: absolute; right: 10px; top: 10px; width: 10px; height: 10px; border-top: 1px solid var(--faint); border-right: 1px solid var(--faint); }
.cat .ic { width: 44px; height: 44px; color: var(--steel); }
.cat .ic * { fill: none; stroke: currentColor; stroke-width: 1.6; stroke-linecap: round; stroke-linejoin: round; }
.cat h3 { margin-top: 20px; font-size: 1.22rem; font-weight: 650; font-stretch: 100%; }
.cat p { margin: 10px 0 0; color: var(--muted); font-size: .97rem; }
.cat .code { position: absolute; right: 26px; top: 26px; font-family: var(--mono); font-size: 11px; color: var(--faint); }

/* platforms */
.plat { display: grid; gap: 0; border: 1px solid var(--line-2); }
@media (min-width: 900px) { .plat { grid-template-columns: repeat(3, 1fr); } }
.phase { padding: 28px 24px; border-top: 1px solid var(--line-2); position: relative; }
.phase:first-child { border-top: 0; background: #FFFFFF; box-shadow: inset 0 3px 0 var(--acc-2); }
@media (min-width: 900px) { .phase { border-top: 0; border-left: 1px solid var(--line-2); } .phase:first-child { border-left: 0; } }
.phase .st { font-family: var(--mono); font-size: 12px; letter-spacing: .08em; text-transform: uppercase; color: var(--faint); }
.phase:first-child .st { color: var(--acc); }
.phase h3 { margin-top: 12px; font-size: 1.3rem; font-weight: 650; font-stretch: 100%; }
.phase p { margin: 10px 0 0; color: var(--muted); font-size: .97rem; }
.note { margin-top: 18px; font-size: 13px; color: var(--faint); font-family: var(--mono); }

/* steps: dimension chain */
.steps { display: grid; gap: 28px; counter-reset: s; }
@media (min-width: 900px) { .steps { grid-template-columns: repeat(4, 1fr); gap: 0; } }
.step { position: relative; padding-top: 34px; }
@media (min-width: 900px) { .step { padding-right: 28px; } }
.step::before { content: ""; position: absolute; top: 9px; left: 0; right: 0; height: 1px; background: var(--line-2); }
.step::after { content: ""; position: absolute; top: 2px; left: 0; width: 1px; height: 15px; background: var(--muted); }
.step .n { position: absolute; top: -2px; left: 12px; padding: 0 8px; background: var(--ink); font-family: var(--mono); font-size: 12px; color: var(--acc); }
.step h3 { font-size: 1.45rem; font-weight: 700; font-stretch: 100%; }
.step p { margin: 10px 0 0; color: var(--muted); font-size: .97rem; }

/* trust */
.trust { display: grid; gap: 1px; background: var(--line-2); border: 1px solid var(--line-2); }
@media (min-width: 720px) { .trust { grid-template-columns: repeat(2, 1fr); } }
@media (min-width: 1100px) { .trust { grid-template-columns: repeat(4, 1fr); } }
.trust > div { background: var(--ink-2); padding: 26px 22px; }
.trust .k { font-family: var(--mono); font-size: 12px; color: var(--steel); }
.trust h3 { margin-top: 12px; font-size: 1.15rem; font-weight: 650; font-stretch: 100%; }
.trust p { margin: 8px 0 0; color: var(--muted); font-size: .95rem; }

/* developers + waitlist */
.dev { display: grid; gap: 36px; }
@media (min-width: 960px) { .dev { grid-template-columns: 1.1fr .9fr; align-items: start; } }
.band ul { list-style: none; margin: 24px 0 0; padding: 0; display: grid; gap: 12px; }
.band li { padding-left: 26px; position: relative; color: #3A4148; }
.band li::before { content: ""; position: absolute; left: 0; top: .62em; width: 14px; height: 1px; background: var(--acc); }
.band li::after { content: ""; position: absolute; left: 13px; top: calc(.62em - 3px); width: 1px; height: 7px; background: var(--acc); }

.card { position: relative; border: 1px solid var(--line-2); background: var(--ink-2); box-shadow: 0 18px 40px -28px rgba(30,35,40,.3); padding: 26px 22px; }
.card h3 { font-size: 1.25rem; font-weight: 650; font-stretch: 100%; }
.card p { margin: 8px 0 0; color: var(--muted); font-size: .95rem; }
.form { margin-top: 20px; display: grid; gap: 10px; }
.field label { display: block; font-family: var(--mono); font-size: 11.5px; letter-spacing: .06em; text-transform: uppercase; color: var(--muted); margin-bottom: 6px; }
.field input, .field select {
  width: 100%; font: inherit; font-size: 15px; color: var(--paper); background: #FAFAF8;
  border: 1px solid var(--line-2); border-radius: 2px; padding: 12px 12px;
}
.field input::placeholder { color: var(--faint); }
.field input:focus, .field select:focus { outline: none; border-color: var(--steel); box-shadow: 0 0 0 3px rgba(36,82,127,.15); }
.form .btn { width: 100%; margin-top: 6px; }
.fine { margin-top: 12px; font-family: var(--mono); font-size: 11.5px; color: var(--faint); line-height: 1.5; }
.ack { display: none; margin-top: 14px; padding: 12px 14px; border: 1px dashed var(--steel); font-family: var(--mono); font-size: 12.5px; color: var(--paper); }
.ack.on { display: block; }

.band { position: relative; overflow: hidden; }
.band .wrap { position: relative; z-index: 1; display: grid; gap: 32px; }
@media (min-width: 960px) { .band .wrap { grid-template-columns: 1fr 1fr; align-items: center; } }

/* footer */
footer { padding-block: 48px 40px; font-size: 14px; color: var(--muted); }
footer .wrap { display: grid; gap: 28px; }
@media (min-width: 820px) { footer .wrap { grid-template-columns: 1fr auto; align-items: start; } }
footer img { height: 30px; width: auto; }
footer nav { display: flex; flex-wrap: wrap; gap: 10px 22px; font-family: var(--mono); font-size: 12.5px; }
footer nav a { text-decoration: none; }
footer nav a:hover { color: var(--paper); }
.legal { grid-column: 1 / -1; border-top: 1px solid var(--line); padding-top: 20px; font-size: 12.5px; color: var(--faint); line-height: 1.6; }

/* reveal */
.rv { opacity: 0; transform: translateY(14px); transition: opacity .6s ease, transform .6s ease; }
.rv.in { opacity: 1; transform: none; }
.no-js .rv { opacity: 1; transform: none; }
@media (prefers-reduced-motion: reduce) { .rv { opacity: 1; transform: none; transition: none; } }
