/* Nuwy Tech — black and red. Mobile-first, no external requests. */

@font-face {
  font-family: "Anton";
  src: url("../fonts/anton-latin.woff2") format("woff2");
  font-weight: 400;
  font-display: swap;
}
@font-face {
  font-family: "Figtree";
  src: url("../fonts/figtree-latin-wght.woff2") format("woff2");
  font-weight: 300 900;
  font-display: swap;
}

:root {
  --bg: #090606;
  --bg-2: #120b0c;
  --bg-3: #1b1011;
  --line: rgba(255, 235, 235, 0.11);
  --text: #f5f1f0;
  --muted: #a99f9d;
  --red: #d4151c;
  --red-text: #ff5656;
  --red-deep: #4a0709;
  --gutter: clamp(20px, 5vw, 56px);
  --maxw: 1200px;
  --silver: #c9c9d3; --hair: rgba(201, 201, 211, 0.18);
  --display: "Anton", "Impact", "Arial Narrow", sans-serif;
  --body: "Figtree", "Segoe UI", system-ui, sans-serif;
  color-scheme: dark;
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
body {
  margin: 0; background: var(--bg); color: var(--text);
  font-family: var(--body); font-size: 1.0625rem; line-height: 1.65;
  -webkit-font-smoothing: antialiased;
}
img, svg { display: block; max-width: 100%; }
a { color: inherit; }
p { margin: 0 0 1.1em; }

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

.skip {
  position: absolute; left: 12px; top: -60px; z-index: 100;
  background: var(--red); color: #fff; padding: 10px 16px; border-radius: 8px;
  font-weight: 600; text-decoration: none;
}
.skip:focus { top: 12px; }
:focus-visible { outline: 2px solid var(--red-text); outline-offset: 3px; border-radius: 4px; }

h1, h2, h3 { margin: 0 0 0.5em; text-wrap: balance; }
h1, h2 {
  font-family: var(--display); font-weight: 400; text-transform: uppercase;
  letter-spacing: 0.012em; line-height: 0.98;
}
h1 { font-size: clamp(2.7rem, 7.4vw, 5.6rem); }
h2 { font-size: clamp(2rem, 4.6vw, 3.4rem); }
h3 { font-family: var(--body); font-weight: 700; font-size: clamp(1.15rem, 2vw, 1.4rem); line-height: 1.2; letter-spacing: -0.005em; }

.lead { font-size: clamp(1.05rem, 1.9vw, 1.22rem); color: var(--muted); max-width: 38em; }
.muted { color: var(--muted); }
.red { color: var(--red-text); }

/* ---------- Header ---------- */
.site-header {
  position: sticky; top: 0; z-index: 50;
  background: rgba(9, 6, 6, 0.88);
  -webkit-backdrop-filter: blur(14px); backdrop-filter: blur(14px);
  border-bottom: 1px solid var(--line);
}
.bar { display: flex; align-items: center; justify-content: space-between; min-height: 68px; }
.brand {
  display: inline-flex; align-items: center; gap: 12px; text-decoration: none;
  font-family: var(--display); font-size: 1.45rem; letter-spacing: 0.03em; text-transform: uppercase;
}
.mark { width: 30px; height: 30px; }
.mark .back { fill: none; stroke: var(--muted); stroke-width: 2; }
.mark .front { fill: var(--red); }

.nav { display: none; }
.nav a {
  text-decoration: none; padding: 8px 16px; border-radius: 999px; color: var(--muted);
  font-weight: 600; font-size: 0.95rem; transition: color 0.2s, background 0.2s;
}
.nav a:hover { color: var(--text); background: rgba(212, 21, 28, 0.14); }
.nav a[aria-current="page"] { color: #fff; background: var(--red); }

.menu {
  width: 46px; height: 46px; border: 1px solid var(--line); border-radius: 12px;
  background: transparent; color: var(--text); cursor: pointer; position: relative;
}
.menu i, .menu i::before {
  position: absolute; left: 13px; width: 18px; height: 2px; background: currentColor;
  border-radius: 2px; transition: transform 0.25s;
}
.menu i { top: 22px; }
.menu i::before { content: ""; left: 0; top: -6px; box-shadow: 0 12px 0 currentColor; }
.site-header.open .menu i { transform: rotate(45deg); }
.site-header.open .menu i::before { top: 0; box-shadow: none; transform: rotate(90deg); }
.site-header.open .nav {
  display: flex; flex-direction: column; gap: 4px;
  position: absolute; left: 0; right: 0; top: 100%;
  padding: 12px var(--gutter) 20px; background: var(--bg); border-bottom: 1px solid var(--line);
}
.site-header.open .nav a { padding: 14px 16px; font-size: 1.1rem; }
@media (min-width: 760px) { .menu { display: none; } .nav { display: flex; gap: 4px; } }

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 10px;
  padding: 0.95em 1.7em; border-radius: 999px; font-weight: 700; font-size: 0.98rem;
  text-decoration: none; border: 1px solid transparent; cursor: pointer;
  transition: transform 0.2s, background 0.2s, border-color 0.2s;
}
.btn-primary { background: var(--red); color: #fff; }
.btn-primary:hover { background: #ec2229; transform: translateY(-2px); }
.btn-ghost { border-color: rgba(255, 235, 235, 0.28); color: var(--text); }
.btn-ghost:hover { border-color: var(--red-text); background: rgba(212, 21, 28, 0.12); }
.btn-light { background: #fff; color: #1a0305; }
.btn-light:hover { background: #ffe9e9; transform: translateY(-2px); }
.actions { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 30px; }

/* ---------- Hero ---------- */
.hero { --p: 0; position: relative; overflow: hidden; padding-block: clamp(28px, 5vw, 64px) 0; border-bottom: 1px solid var(--line); }
.bigword {
  position: absolute; left: 50%; top: clamp(24px, 4vw, 64px); z-index: 0;
  transform: translateX(-50%) translateY(calc(var(--p) * -36px));
  font-family: var(--display); font-size: clamp(5rem, 25vw, 17.5rem); line-height: 0.82;
  text-transform: uppercase; white-space: nowrap; letter-spacing: 0.005em; user-select: none;
  background: linear-gradient(180deg, #c3131a 0%, #6c0a0e 62%, rgba(40, 5, 7, 0.4) 100%);
  -webkit-background-clip: text; background-clip: text; color: transparent; -webkit-text-fill-color: transparent;
  opacity: 0.85; pointer-events: none;
}
.hero-grid { position: relative; z-index: 1; display: grid; gap: 0; align-items: end; padding-top: clamp(8px, 3vw, 40px); }
.hero-copy { position: relative; z-index: 3; padding-top: clamp(44px, 12vw, 130px); padding-bottom: 8px; }
.hero h1 { max-width: 9em; text-shadow: 0 2px 30px rgba(0, 0, 0, 0.6); }
.role { color: var(--red-text); font-weight: 700; letter-spacing: 0.04em; text-transform: uppercase; font-size: 0.9rem; line-height: 1.6; margin: 20px 0 14px; }
.hero-copy .lead { color: var(--silver); }
@media (min-width: 1000px) {
  .hero-grid { grid-template-columns: minmax(0, 0.95fr) minmax(0, 1.05fr); gap: 8px; min-height: 660px; align-items: stretch; }
  .hero-copy { align-self: start; padding-top: clamp(150px, 15vw, 210px); }
  .hero h1 { font-size: clamp(2.8rem, 4.2vw, 4rem); max-width: 10em; }
  .stage { align-self: start; margin-top: 18px; }
  .dev { width: min(640px, 50vw); }
}

/* Hero visual: the illustration; only the eyes move (see main.js) */
.stage { position: relative; z-index: 2; display: grid; place-items: end center; margin-top: -8px; }
.stage::before {
  content: ""; position: absolute; inset: 14% 0 0; border-radius: 50%;
  background: radial-gradient(closest-side, rgba(212, 21, 28, 0.34), transparent); filter: blur(12px);
}
.dev {
  position: relative; margin: 0; width: min(100%, 520px); aspect-ratio: 688 / 725;
  -webkit-mask-image: linear-gradient(to right, transparent, #000 12%, #000 88%, transparent), linear-gradient(to bottom, #000 74%, transparent 97%);
  -webkit-mask-composite: source-in;
  mask-image: linear-gradient(to right, transparent, #000 12%, #000 88%, transparent), linear-gradient(to bottom, #000 74%, transparent 97%);
  mask-composite: intersect;
}
.dev-img { position: absolute; inset: 0; width: 100%; height: 100%; display: block; }
.eye { position: absolute; -webkit-mask-size: 100% 100%; mask-size: 100% 100%; -webkit-mask-repeat: no-repeat; mask-repeat: no-repeat; pointer-events: none; }
.eye img { position: absolute; display: block; will-change: transform; }
.eye-l { left: 36.92%; top: 36.28%; width: 11.63%; height: 9.66%; -webkit-mask-image: url(../img/eyemask-l.png); mask-image: url(../img/eyemask-l.png); }
.eye-r { left: 53.2%; top: 36.14%; width: 11.63%; height: 9.66%; -webkit-mask-image: url(../img/eyemask-r.png); mask-image: url(../img/eyemask-r.png); }
.lid { position: absolute; left: -6%; right: -6%; top: -4%; height: 112%; display: block; transform: scaleY(0); transform-origin: 50% 0; background: linear-gradient(180deg, #b87a7e, #d08a8d 70%, #c9807f); border-bottom: 2px solid rgba(40, 14, 20, 0.85); border-radius: 0 0 50% 50% / 0 0 22% 22%; }
.dev.blink .lid { animation: blink 0.3s ease-in-out; }
@keyframes blink { 0%, 100% { transform: scaleY(0); } 42%, 58% { transform: scaleY(1); } }
.eye-l img { left: 26.25%; top: 15.71%; width: 62.5%; height: 71.43%; }
.eye-r img { left: 10%; top: 14.29%; width: 62.5%; height: 71.43%; }

/* Opening animation: the big word rises, the illustration drops in from the top, the text follows */
@keyframes word-in { from { opacity: 0; transform: translateX(-50%) translateY(46px); } }
@keyframes drop-in {
  0% { opacity: 0; transform: translateY(var(--drop, -72%)) scale(1.05); }
  45% { opacity: 1; }
  74% { transform: translateY(2.5%) scale(1); }
  88% { transform: translateY(-0.8%); }
  100% { opacity: 1; transform: none; }
}
@keyframes glow-in { from { opacity: 0; } }
@keyframes fade-up { from { opacity: 0; transform: translateY(26px); } }
.bigword { animation: word-in 0.9s cubic-bezier(0.2, 0.8, 0.2, 1) both; }
.dev { animation: drop-in 1.45s cubic-bezier(0.22, 0.85, 0.25, 1) 0.35s both; }
.stage::before { animation: glow-in 1.4s ease-out 1.1s both; }
.hero-copy > * { animation: fade-up 0.8s cubic-bezier(0.2, 0.8, 0.2, 1) both; }
.hero-copy > :nth-child(1) { animation-delay: 0.25s; }
.hero-copy > :nth-child(2) { animation-delay: 0.45s; }
.hero-copy > :nth-child(3) { animation-delay: 0.6s; }
.hero-copy > :nth-child(4) { animation-delay: 0.75s; }

/* Scroll reveal (added by main.js, so the page is fully visible without JavaScript) */
.js .reveal { opacity: 0; transform: translateY(28px); transition: opacity 0.7s ease, transform 0.8s cubic-bezier(0.2, 0.8, 0.2, 1); transition-delay: var(--rd, 0s); }
.js .reveal.in { opacity: 1; transform: none; }

@media (prefers-reduced-motion: reduce) {
  .bigword, .dev, .stage::before, .hero-copy > * { animation: none; }
  .bigword { transform: translateX(-50%); }
  .js .reveal { opacity: 1; transform: none; transition: none; }
  html { scroll-behavior: auto; }
}

/* ---------- Sections ---------- */
.section { padding-block: clamp(56px, 8vw, 104px); }
.title-row { display: flex; align-items: center; gap: 24px; margin-bottom: clamp(24px, 4vw, 44px); }
.title-row h2 { margin: 0; white-space: nowrap; }
.title-row .rule { flex: 1; height: 1px; background: var(--line); }

.services { display: grid; gap: 16px; }
@media (min-width: 860px) { .services { grid-template-columns: repeat(3, 1fr); } }
.svc {
  border: 1px solid var(--line); background: var(--bg-2); border-radius: 20px;
  padding: clamp(22px, 3vw, 32px); display: grid; align-content: start; gap: 14px;
  transition: border-color 0.25s;
}
.svc:hover { border-color: rgba(255, 86, 86, 0.55); }
.svc .ico { width: 52px; height: 52px; border: 1px solid rgba(255, 86, 86, 0.55); border-radius: 50%; display: grid; place-items: center; color: var(--red-text); }
.svc .ico svg { width: 24px; height: 24px; stroke: currentColor; fill: none; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.svc h3 { margin: 6px 0 0; }
.svc p { margin: 0; color: var(--muted); }

.product {
  background: linear-gradient(150deg, #a01017 0%, #5a080c 55%, #2a0406 100%);
  border-radius: 28px; padding: clamp(26px, 5vw, 60px); display: grid; gap: 32px;
  border: 1px solid rgba(255, 150, 150, 0.25);
}
.product p { color: #ffe4e4; max-width: 36em; }
@media (min-width: 900px) { .product { grid-template-columns: 1.1fr 0.9fr; align-items: start; } }
.facts { margin: 0; display: grid; }
.facts div { padding-block: 16px; border-top: 1px solid rgba(255, 255, 255, 0.22); }
.facts div:last-child { border-bottom: 1px solid rgba(255, 255, 255, 0.22); }
.facts dt { font-weight: 700; font-size: 1.1rem; margin-bottom: 2px; }
.facts dd { margin: 0; color: #ffd9d9; }

.process-grid { display: grid; gap: 28px; }
@media (min-width: 900px) { .process-grid { grid-template-columns: 0.8fr 1.2fr; gap: 72px; } }
.steps { list-style: none; margin: 0; padding: 0; display: grid; }
.step { display: grid; grid-template-columns: 56px 1fr; gap: 20px; padding-bottom: 28px; position: relative; }
.step:last-child { padding-bottom: 0; }
.step::before { content: ""; position: absolute; left: 27px; top: 56px; bottom: 0; width: 1px; background: var(--line); }
.step:last-child::before { display: none; }
.step .n {
  width: 56px; height: 56px; border-radius: 50%; border: 1px solid var(--red-text);
  display: grid; place-items: center; font-family: var(--display); font-size: 1.3rem; color: var(--red-text); background: var(--bg);
}
.step h3 { margin: 4px 0 4px; color: var(--red-text); font-size: 1.05rem; text-transform: uppercase; letter-spacing: 0.04em; }
.step p { margin: 0; color: var(--muted); max-width: 32em; }

.cta-band { border-top: 1px solid var(--line); }
.cta-grid { display: grid; gap: 36px; }
@media (min-width: 900px) { .cta-grid { grid-template-columns: 0.9fr 1.1fr; gap: 72px; align-items: center; } }
.cta-grid h2 { font-size: clamp(2.6rem, 6.4vw, 5rem); }

.reach { list-style: none; margin: 0; padding: 0; display: grid; }
.reach li { border-top: 1px solid var(--line); }
.reach li:last-child { border-bottom: 1px solid var(--line); }
.reach a, .reach .item { display: flex; align-items: center; gap: 18px; padding-block: 18px; text-decoration: none; }
.reach .ring { width: 46px; height: 46px; flex: none; border: 1px solid rgba(255, 86, 86, 0.6); border-radius: 50%; display: grid; place-items: center; color: var(--red-text); }
.reach .ring svg { width: 20px; height: 20px; stroke: currentColor; fill: none; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.reach .val { font-weight: 600; font-size: clamp(1rem, 2.4vw, 1.2rem); word-break: break-word; }
.reach a:hover .val { color: var(--red-text); }

/* ---------- Inner page headers ---------- */
.page-head { padding-block: clamp(44px, 8vw, 96px) clamp(16px, 3vw, 32px); border-bottom: 1px solid var(--line); margin-bottom: clamp(24px, 4vw, 48px); }
.page-head h1 { font-size: clamp(2.6rem, 7vw, 5.2rem); max-width: 14em; }
.page-head .lead { margin-bottom: 1.2em; }

.two-col { display: grid; gap: 28px; }
@media (min-width: 900px) { .two-col { grid-template-columns: 0.8fr 1.2fr; gap: 64px; } }
.two-col h2 { font-size: clamp(1.8rem, 3.4vw, 2.6rem); }

.details { margin: 0; }
.details div { display: grid; gap: 2px; padding-block: 16px; border-top: 1px solid var(--line); }
.details div:last-child { border-bottom: 1px solid var(--line); }
.details dt { color: var(--muted); font-size: 0.95rem; }
.details dd { margin: 0; font-weight: 600; }
.details a { text-decoration-color: var(--red-text); text-underline-offset: 4px; }
@media (min-width: 640px) { .details div { grid-template-columns: 11rem 1fr; gap: 24px; } }

.contact-list { display: grid; gap: 14px; margin-top: 12px; }
.contact-item {
  display: grid; gap: 4px; padding: 26px; border: 1px solid var(--line); border-radius: 20px;
  background: var(--bg-2); text-decoration: none; transition: border-color 0.2s, background 0.2s;
}
a.contact-item:hover { border-color: var(--red-text); background: var(--bg-3); }
.contact-item .label { color: var(--red-text); font-size: 0.85rem; font-weight: 700; letter-spacing: 0.06em; text-transform: uppercase; }
.contact-item .value { font-family: var(--display); font-weight: 400; font-size: clamp(1.5rem, 4vw, 2.4rem); letter-spacing: 0.015em; line-height: 1.15; word-break: break-word; text-transform: none; }
.contact-item address { font-style: normal; }
@media (min-width: 900px) { .contact-list { grid-template-columns: 1fr 1fr; } .contact-item.wide { grid-column: 1 / -1; } }

/* ---------- Legal pages ---------- */
.legal { display: grid; gap: 32px; padding-bottom: 96px; }
@media (min-width: 960px) { .legal { grid-template-columns: 250px minmax(0, 1fr); gap: 72px; } }
.toc { font-size: 0.95rem; }
.toc p { font-weight: 700; margin-bottom: 8px; color: var(--red-text); letter-spacing: 0.04em; text-transform: uppercase; font-size: 0.82rem; }
.toc ol { margin: 0; padding: 0; list-style: none; display: grid; gap: 2px; }
.toc a { display: block; padding: 6px 0; color: var(--muted); text-decoration: none; }
.toc a:hover { color: var(--text); }
@media (min-width: 960px) { .toc { position: sticky; top: 96px; align-self: start; } }
@media (max-width: 959px) { .toc { border: 1px solid var(--line); border-radius: 16px; padding: 18px 20px; } }
.prose { max-width: 46rem; }
.prose h2 { font-family: var(--body); font-weight: 800; text-transform: none; letter-spacing: -0.01em; line-height: 1.2; font-size: clamp(1.3rem, 2.4vw, 1.7rem); margin-top: 2.2em; scroll-margin-top: 92px; }
.prose h2:first-child { margin-top: 0; }
.prose h3 { font-size: 1.1rem; margin: 1.6em 0 0.4em; }
.prose p, .prose li { color: #dcd3d1; }
.prose ul { padding-left: 1.2em; margin: 0 0 1.2em; }
.prose li { margin-bottom: 0.45em; }
.prose a { text-decoration-color: var(--red-text); text-underline-offset: 4px; }
.meta-line { color: var(--muted); }
.callout { background: var(--bg-2); border: 1px solid var(--red-text); border-radius: 20px; padding: clamp(20px, 4vw, 32px); margin-block: 8px 24px; }
.callout h2 { margin-top: 0; }
.callout :last-child { margin-bottom: 0; }

/* ---------- Footer ---------- */
.site-footer { border-top: 1px solid var(--line); padding-block: 56px 36px; }
.foot-grid { display: grid; gap: 36px; }
@media (min-width: 800px) { .foot-grid { grid-template-columns: 1.4fr 1fr 1fr; gap: 56px; } }
.site-footer h2 { font-family: var(--body); text-transform: none; font-size: 1rem; font-weight: 800; letter-spacing: 0; margin-bottom: 12px; }
.site-footer address { font-style: normal; color: var(--muted); margin-top: 12px; }
.site-footer ul { margin: 0; padding: 0; list-style: none; display: grid; gap: 8px; }
.site-footer a { color: var(--muted); text-decoration: none; }
.site-footer .brand { color: var(--text); }
.site-footer a:hover { color: var(--text); text-decoration: underline; text-underline-offset: 4px; }
.legal-note { margin-top: 40px; padding-top: 24px; border-top: 1px solid var(--line); color: var(--muted); font-size: 0.9rem; max-width: 60rem; }
.legal-note p { margin-bottom: 0.6em; }

.notfound { padding-block: clamp(80px, 16vw, 180px); }

/* ---------- Single page: sections, product badge, about, contact ---------- */
html { scroll-padding-top: 76px; }
.hero, .section { scroll-margin-top: 72px; }
.p-name { font-family: var(--display); font-weight: 400; text-transform: uppercase; font-size: clamp(2.3rem, 6vw, 4.6rem); line-height: 1; letter-spacing: 0; margin: 0.4em 0 0.35em; }
.badge { display: inline-flex; align-items: center; gap: 10px; margin: 0; padding: 7px 14px; border: 1px solid rgba(255, 255, 255, 0.4); border-radius: 999px; background: rgba(0, 0, 0, 0.3); font-size: 0.78rem; font-weight: 800; letter-spacing: 0.08em; text-transform: uppercase; color: #fff !important; }
.badge .dot { width: 8px; height: 8px; border-radius: 50%; background: #fff; animation: pulse 1.9s ease-out infinite; }
@keyframes pulse { 0% { box-shadow: 0 0 0 0 rgba(255, 255, 255, 0.75); } 100% { box-shadow: 0 0 0 11px rgba(255, 255, 255, 0); } }
.product { position: relative; overflow: hidden; }
.product::before { content: ""; position: absolute; inset: -40% -20%; pointer-events: none; background: linear-gradient(105deg, transparent 42%, rgba(255, 255, 255, 0.1) 50%, transparent 58%); transform: translateX(-70%); animation: sheen 8s ease-in-out infinite; }
@keyframes sheen { 0%, 50% { transform: translateX(-70%); } 100% { transform: translateX(70%); } }
.product > * { position: relative; }

.about-grid { display: grid; gap: 32px; }
@media (min-width: 900px) { .about-grid { grid-template-columns: 1.05fr 0.95fr; gap: 64px; align-items: start; } }
.trust { display: grid; gap: 16px; margin-top: clamp(28px, 4vw, 48px); }
@media (min-width: 860px) { .trust { grid-template-columns: repeat(3, 1fr); } }
.tcard { position: relative; overflow: hidden; border: 1px solid var(--line); background: var(--bg-2); border-radius: 20px; padding: clamp(20px, 3vw, 28px); }
.tcard h3 { font-size: 1.05rem; color: var(--red-text); text-transform: uppercase; letter-spacing: 0.04em; margin: 0 0 8px; }
.tcard p { margin: 0; color: var(--muted); }
.tcard a { text-decoration-color: var(--red-text); text-underline-offset: 4px; }
.legal-links { margin: 28px 0 0; }
.legal-links a { text-decoration-color: var(--red-text); text-underline-offset: 4px; }
.cta-grid .muted a { text-decoration-color: var(--red-text); text-underline-offset: 4px; }
.reach a:hover .ring { background: var(--red); color: #fff; transform: scale(1.1); }
.reach .ring { transition: background 0.25s, color 0.25s, transform 0.3s cubic-bezier(0.3, 1.6, 0.5, 1); }

/* ---------- Advanced motion (only when JavaScript is on) ---------- */
/* Headings: words slide up out of a mask */
.w { display: inline-block; overflow: hidden; vertical-align: bottom; padding-bottom: 0.08em; }
.w > span { display: inline-block; }
.js .split .w > span { transform: translateY(115%); transition: transform 0.85s cubic-bezier(0.2, 0.8, 0.2, 1); transition-delay: calc(var(--wi, 0) * 0.08s); }
.js .split.in .w > span { transform: none; }
/* Section rule draws itself */
.js .title-row .rule { transform: scaleX(0); transform-origin: left; transition: transform 1.1s 0.25s cubic-bezier(0.2, 0.8, 0.2, 1); }
.js .title-row.in .rule { transform: none; }
/* Cards: cursor spotlight (tilt is added by JS) */
.svc, .tcard { position: relative; overflow: hidden; }
.svc::after, .tcard::after { content: ""; position: absolute; inset: 0; pointer-events: none; opacity: 0; transition: opacity 0.3s; background: radial-gradient(280px circle at var(--mx, 50%) var(--my, 50%), rgba(255, 86, 86, 0.17), transparent 70%); }
.svc:hover::after, .tcard:hover::after { opacity: 1; }
.svc .ico { transition: transform 0.5s cubic-bezier(0.3, 1.6, 0.5, 1), background 0.3s, color 0.3s; }
.svc:hover .ico { transform: rotate(-8deg) scale(1.1); background: var(--red); color: #fff; }
/* Product facts slide in one by one */
.js .facts > div { opacity: 0; transform: translateX(34px); transition: opacity 0.7s, transform 0.8s cubic-bezier(0.2, 0.8, 0.2, 1); transition-delay: calc(0.35s + var(--i, 0) * 0.14s); }
.js .product.in .facts > div { opacity: 1; transform: none; }
.js .p-main > * { opacity: 0; transform: translateY(18px); transition: opacity 0.7s, transform 0.8s cubic-bezier(0.2, 0.8, 0.2, 1); transition-delay: calc(0.1s + var(--i, 0) * 0.1s); }
.js .product.in .p-main > * { opacity: 1; transform: none; }
/* Steps: line draws down, number pops */
.js .step::before { transform: scaleY(0); transform-origin: top; transition: transform 0.9s 0.3s ease; }
.js .step.in::before { transform: none; }
.js .step .n { transform: scale(0.4); opacity: 0; transition: transform 0.7s cubic-bezier(0.3, 1.6, 0.5, 1) 0.1s, opacity 0.4s 0.1s; }
.js .step.in .n { transform: none; opacity: 1; }
/* Contact rows slide in from the left */
.js .reach li.reveal { transform: translateX(-30px); }
.js .reach li.reveal.in { transform: none; }
/* Active nav link while scrolling */
.nav a[aria-current="true"] { color: #fff; background: rgba(212, 21, 28, 0.32); }
@media (prefers-reduced-motion: reduce) {
  .js .split .w > span, .js .facts > div, .js .p-main > *, .js .step .n { transform: none; opacity: 1; transition: none; }
  .js .title-row .rule, .js .step::before { transform: none; transition: none; }
  .product::before, .badge .dot { animation: none; }
}

/* ---------- Phone fixes: roomier hero text, longer drop ---------- */
@media (max-width: 999px) {
  .hero { --drop: -150%; }
  .stage { order: -1; margin-top: calc(9vw + 6px); }
  .dev { width: min(100%, 440px); }
  .hero-copy { padding-top: 0; margin-top: -26px; }
  .hero h1 { font-size: clamp(1.9rem, 8.4vw, 2.7rem); line-height: 1.1; letter-spacing: 0.005em; max-width: 11em; }
  .role { margin: 18px 0 10px; }
  .hero-copy .lead { margin: 0 0 22px; line-height: 1.6; }
  .hero-copy .actions { margin-bottom: 8px; }
}
/* Paragraphs light up word by word while scrolling */
.tw { transition: opacity 0.35s ease; }
.js .scrub .tw { opacity: 0.2; }
.js .scrub .tw.on { opacity: 1; }
@media (prefers-reduced-motion: reduce) { .js .scrub .tw { opacity: 1; transition: none; } }

/* Tall, bold background word (stretched downwards, like a poster headline) */
.bigword { scale: 1 var(--sy, 1.9); transform-origin: 50% 0; font-size: clamp(5rem, 25vw, 16rem); }
@media (min-width: 1000px) { .bigword { --sy: 1.75; } }
@media (max-width: 999px) {
  .bigword { --sy: 2.5; top: 16px; }
  .hero { padding-top: 0; }
  .stage { margin-top: 16vw; }
  .hero-copy { margin-top: -30px; }
}

/* Slower, softer opening: the illustration floats down, then the text follows */
.dev { animation-duration: 2.7s; animation-delay: 0.5s; animation-timing-function: cubic-bezier(0.25, 0.7, 0.3, 1); }
.stage::before { animation-delay: 2.2s; animation-duration: 1.6s; }
.hero-copy > :nth-child(1) { animation-delay: 1.5s; }
.hero-copy > :nth-child(2) { animation-delay: 1.8s; }
.hero-copy > :nth-child(3) { animation-delay: 2.0s; }
.hero-copy > :nth-child(4) { animation-delay: 2.2s; }
