/* ============================================================
   SCY SOFTWARE — styles
   ============================================================ */

:root {
  --bg: #050505;
  --fg: #e8e6e3;
  --muted: #9a948d;
  --dim: #6b6660;
  --faint: #4a4640;
  --accent: #ff4d2e;
  --border: rgba(232, 230, 227, 0.12);
  --border-strong: rgba(232, 230, 227, 0.2);
  --ease: cubic-bezier(0.16, 1, 0.3, 1);
  --wipe: cubic-bezier(0.77, 0, 0.18, 1);
}

* { box-sizing: border-box; }

/* no visible scrollbar anywhere; the page still scrolls */
html {
  scroll-behavior: smooth; scroll-padding-top: 56px;
  scrollbar-width: none; -ms-overflow-style: none;
}
html::-webkit-scrollbar, body::-webkit-scrollbar { display: none; width: 0; height: 0; }
html.locked { overflow: hidden; }

body {
  margin: 0;
  background: var(--bg);
  color: var(--fg);
  font-family: 'Roboto Mono', monospace;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

a { color: var(--fg); text-decoration: none; }
a:hover { color: var(--accent); }
::selection { background: var(--accent); color: var(--bg); }

.accent { color: var(--accent); }

/* ---------- keyframes ---------- */
@keyframes scanline { from { top: -10%; } to { top: 110%; } }
@keyframes blink    { 0%, 100% { opacity: 1; } 50% { opacity: 0; } }
@keyframes tickerMove { from { transform: translateX(0); } to { transform: translateX(-50%); } }
@keyframes cue      { 0% { transform: scaleY(0); transform-origin: top; } 45% { transform: scaleY(1); transform-origin: top; }
                      55% { transform: scaleY(1); transform-origin: bottom; } 100% { transform: scaleY(0); transform-origin: bottom; } }
@keyframes loading  { from { transform: translateX(-100%); } to { transform: translateX(250%); } }
@keyframes pulse    { 0%, 100% { opacity: 1; } 50% { opacity: 0.25; } }

.cursor { animation: blink 1s step-end infinite; }

/* ---------- reveals (only hidden when JS runs) ---------- */
.js .reveal {
  opacity: 0; transform: translateY(40px);
  transition: opacity 0.9s var(--ease), transform 1.1s var(--ease);
  transition-delay: var(--d, 0s);
}
.js .reveal.in { opacity: 1; transform: none; }

/* ---------- background layers ---------- */
.bg-webgl { position: fixed; inset: 0; z-index: 0; }

.overlay-grid {
  position: fixed; inset: 0; z-index: 1; pointer-events: none;
  background: repeating-linear-gradient(0deg,
    rgba(255,255,255,0.015) 0px, rgba(255,255,255,0.015) 1px,
    transparent 1px, transparent 3px);
}
.overlay-scan {
  position: fixed; left: 0; right: 0; height: 120px; z-index: 1; pointer-events: none;
  background: linear-gradient(rgba(255,77,46,0.03), transparent);
  animation: scanline 9s linear infinite;
}

/* ---------- nav ---------- */
.nav {
  position: fixed; top: 0; left: 0; right: 0; z-index: 50;
  display: flex; align-items: center; justify-content: space-between;
  padding: 0 32px; height: 56px;
  border-bottom: 1px solid var(--border);
  background: rgba(5,5,5,0.7); backdrop-filter: blur(8px);
}
.nav__logo { font-family: 'Unbounded', sans-serif; font-weight: 800; font-size: 15px; letter-spacing: 0.2em; }
.nav__links { display: flex; gap: 2px; font-size: 11px; letter-spacing: 0.1em; }
.nav__link { padding: 8px 16px; border: 1px solid transparent; white-space: nowrap; transition: color .25s, border-color .25s; }
.nav__link:hover { border-color: var(--border-strong); }
.nav__link.is-active:not(.nav__link--cta) { color: var(--accent); border-color: rgba(255,77,46,0.4); }
.nav__link--cta { background: var(--accent); color: var(--bg); font-weight: 700; }
.nav__link--cta:hover { background: var(--fg); color: var(--bg); }
.progress { position: absolute; left: 0; right: 0; bottom: -1px; height: 1px; pointer-events: none; }
.progress span { display: block; height: 100%; background: var(--accent); transform: scaleX(0); transform-origin: left; }

/* ---------- hero ---------- */
.hero {
  position: relative; z-index: 2; min-height: 100vh; min-height: 100svh;
  display: flex; flex-direction: column; justify-content: center;
  padding: 120px 32px 96px; overflow: hidden;
}
.hero__meta {
  position: absolute; top: 76px; left: 32px; right: 32px;
  display: flex; justify-content: space-between;
  font-size: 10px; letter-spacing: 0.14em; color: var(--dim);
}
.hero__inner {
  --t: clamp(38px, 9.2vw, 176px);
  position: relative; max-width: 1400px; margin: 0 auto; width: 100%;
  will-change: transform, opacity;
}
.hero__status { font-size: 12px; line-height: 1; letter-spacing: 0.2em; color: var(--accent); margin-bottom: 28px; }
.hero__title {
  margin: 0; font-family: 'Unbounded', sans-serif; font-weight: 800;
  text-transform: uppercase; letter-spacing: -0.01em;
}
.hero__title .ln { display: block; overflow: hidden; will-change: transform; }
.hero__title .ln > span { display: inline-block; }
.ln--sm {
  font-size: clamp(14px, 1.5vw, 22px); font-weight: 500; line-height: 1.2;
  letter-spacing: 0.35em; color: var(--muted); margin-bottom: 14px;
}
.ln--xl { font-size: var(--t); line-height: 0.98; padding-bottom: 0.02em; }

/* description + button sit in the empty space to the right of "SCY" */
.hero__aside {
  position: absolute; right: 0; bottom: calc(var(--t) * 1.12);
  width: min(420px, 38%);
  display: flex; flex-direction: column; align-items: flex-start; gap: 28px;
}
.hero__desc { margin: 0; font-size: 14px; line-height: 1.8; color: var(--muted); }
.hero__foot {
  position: absolute; bottom: 24px; left: 32px; right: 32px;
  display: flex; justify-content: space-between; align-items: flex-end;
  font-size: 10px; letter-spacing: 0.14em; color: var(--dim);
}
.scroll-cue { display: inline-flex; flex-direction: column; align-items: center; gap: 10px; }
.scroll-cue i { display: block; width: 1px; height: 40px; background: var(--accent); animation: cue 2.2s var(--ease) infinite; }

/* hero intro, played when the gate opens */
.js .hero__title .ln > span { transform: translateY(110%); transition: transform 1.3s var(--ease); }
.js .hero__title .ln:nth-child(1) > span { transition-delay: 0.15s; }
.js .hero__title .ln:nth-child(2) > span { transition-delay: 0.28s; }
.js .hero__title .ln:nth-child(3) > span { transition-delay: 0.41s; }
.js.go .hero__title .ln > span { transform: none; }
.js .hero__status, .js .hero__aside, .js .hero__meta, .js .hero__foot {
  opacity: 0; transition: opacity 1s ease 0.75s, transform 1.2s var(--ease) 0.75s;
}
.js .hero__aside { transform: translateY(24px); }
.js.go .hero__status, .js.go .hero__aside, .js.go .hero__meta, .js.go .hero__foot { opacity: 1; transform: none; }

.btn-cta {
  display: inline-flex; align-items: center; gap: 12px;
  font-size: 12px; letter-spacing: 0.16em; font-weight: 700;
  color: var(--bg); background: var(--accent); padding: 18px 32px;
  clip-path: polygon(0 0, calc(100% - 14px) 0, 100% 14px, 100% 100%, 14px 100%, 0 calc(100% - 14px));
  transition: background .25s, padding .35s var(--ease);
}
.btn-cta:hover { background: var(--fg); color: var(--bg); padding-right: 40px; }

/* ---------- ticker ---------- */
.ticker {
  position: relative; z-index: 2;
  border-top: 1px solid var(--border); border-bottom: 1px solid var(--border);
  overflow: hidden; padding: 12px 0; background: var(--bg);
}
.ticker__track {
  display: flex; width: max-content; animation: tickerMove 20s linear infinite;
  font-size: 11px; letter-spacing: 0.24em; color: var(--muted); white-space: nowrap;
  will-change: transform;
}
.js .ticker__track { animation: none; }
.ticker__track > span { padding-right: 40px; }

/* ---------- sections ---------- */
.section { position: relative; z-index: 2; padding: clamp(96px, 11vw, 160px) 32px; }
.section--bordered { border-top: 1px solid var(--border); }
.container { max-width: 1400px; margin: 0 auto; }

.sec-head { display: flex; align-items: center; gap: 16px; margin-bottom: clamp(48px, 6vw, 88px); }
.sec-num { font-size: 11px; color: var(--accent); letter-spacing: 0.2em; }
.sec-title {
  margin: 0; font-family: 'Unbounded', sans-serif; font-weight: 500;
  font-size: clamp(28px, 4.5vw, 64px); text-transform: uppercase; letter-spacing: 0.02em;
  overflow: hidden; line-height: 1.1;
}
.sec-title > span { display: inline-block; }
.sec-rule { flex: 1; height: 1px; background: var(--border); transform-origin: left; }
.js .sec-title > span { transform: translateY(110%); transition: transform 1.1s var(--ease) 0.1s; }
.js .sec-num { opacity: 0; transition: opacity .6s ease; }
.js .sec-rule { transform: scaleX(0); transition: transform 1.5s var(--wipe) 0.25s; }
.js .sec-head.in .sec-title > span, .js .sec-head.in .sec-rule { transform: none; }
.js .sec-head.in .sec-num { opacity: 1; }

/* ---------- work ---------- */
.work-list { display: flex; flex-direction: column; gap: clamp(96px, 11vw, 170px); }

.proj {
  position: relative; display: grid; grid-template-columns: 7fr 5fr;
  gap: clamp(32px, 5vw, 88px); align-items: center;
}
.proj--flip { grid-template-columns: 5fr 7fr; }
.proj--flip .proj__frame { order: 2; }

.proj__num {
  position: absolute; z-index: 0; top: -0.42em; right: 0;
  font-family: 'Unbounded', sans-serif; font-weight: 800; line-height: 1;
  font-size: clamp(80px, 11vw, 190px); color: transparent;
  -webkit-text-stroke: 1px rgba(232,230,227,0.14); pointer-events: none; user-select: none;
}
.proj--flip .proj__num { right: auto; left: 0; }

.proj__frame {
  position: relative; z-index: 1;
  border: 1px solid var(--border-strong); background: rgba(232,230,227,0.02);
  transition: clip-path 1.3s var(--wipe), transform .6s var(--ease), border-color .3s;
}
.proj__frame:hover { border-color: var(--accent); }
.proj__bar {
  display: flex; justify-content: space-between; align-items: center; gap: 12px;
  padding: 12px 16px; border-bottom: 1px solid var(--border);
  font-size: 10px; letter-spacing: 0.16em; color: var(--dim);
}
.proj__media {
  position: relative; display: block; aspect-ratio: 16 / 9; overflow: hidden; background: #0b0a09;
}
.proj__img {
  position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover;
  transition: scale 1.8s var(--ease), filter .4s;
  will-change: transform;
}
a.proj__media:hover .proj__img { filter: brightness(1.08); }

.proj__info { position: relative; z-index: 1; }
.proj__kind { font-size: 10px; letter-spacing: 0.22em; color: var(--accent); margin-bottom: 14px; }
.proj__title {
  margin: 0; font-family: 'Unbounded', sans-serif; font-weight: 500;
  font-size: clamp(24px, 2.6vw, 40px); line-height: 1.1; text-transform: uppercase;
}
.proj__desc { margin: 18px 0 0; font-size: 13px; line-height: 1.8; color: var(--muted); max-width: 46ch; }

.card__meta { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 20px; }
.card__meta span { font-size: 10px; letter-spacing: 0.14em; color: var(--dim); border: 1px solid var(--border); padding: 4px 8px; }
.card__link { display: inline-block; margin-top: 24px; font-size: 11px; letter-spacing: 0.16em; font-weight: 700; color: var(--accent); border-bottom: 1px solid currentColor; padding-bottom: 2px; }
.card__link:hover { color: var(--fg); }
.card__corner { position: absolute; width: 12px; height: 12px; }
.card__corner--tr { top: -1px; right: -1px; border-top: 2px solid var(--accent); border-right: 2px solid var(--accent); }
.card__corner--bl { bottom: -1px; left: -1px; border-bottom: 2px solid var(--accent); border-left: 2px solid var(--accent); }

/* project reveal: picture wipes open, text follows */
.js .proj__frame { clip-path: inset(0 100% 0 0); }
.js .proj--flip .proj__frame { clip-path: inset(0 0 0 100%); }
.js .proj.in .proj__frame { clip-path: inset(-3px); }
.js .proj__img { scale: 1.3; }
.js .proj.in .proj__img { scale: 1; }
.js .proj__num { opacity: 0; transition: opacity 1.2s ease .3s; }
.js .proj.in .proj__num { opacity: 1; }
.js .proj__info > * { opacity: 0; transform: translateY(26px); transition: opacity .8s ease, transform 1s var(--ease); }
.js .proj.in .proj__info > * { opacity: 1; transform: none; }
.js .proj.in .proj__info > :nth-child(1) { transition-delay: .45s; }
.js .proj.in .proj__info > :nth-child(2) { transition-delay: .53s; }
.js .proj.in .proj__info > :nth-child(3) { transition-delay: .61s; }
.js .proj.in .proj__info > :nth-child(4) { transition-delay: .69s; }
.js .proj.in .proj__info > :nth-child(5) { transition-delay: .77s; }

.proj-next {
  display: flex; align-items: center; justify-content: center; gap: 16px;
  border: 1px dashed var(--border-strong); padding: 34px 24px;
  font-size: 11px; letter-spacing: 0.2em; color: var(--dim);
}
.proj-next .accent { font-size: 20px; }
.proj-next__bar { position: relative; width: 120px; height: 1px; background: var(--border); overflow: hidden; }
.proj-next__bar i { position: absolute; inset: 0; width: 40%; background: var(--accent); animation: loading 1.8s ease-in-out infinite; }

/* ---------- services ---------- */
.svc-grid {
  display: grid; grid-template-columns: repeat(4, 1fr); gap: 1px;
  background: var(--border); border: 1px solid var(--border);
}
.svc { background: var(--bg); padding: 32px 24px 48px; position: relative; min-height: 240px; overflow: hidden; }
.svc::before {
  content: ""; position: absolute; inset: 0; pointer-events: none; opacity: 0; transition: opacity .35s;
  background: radial-gradient(320px circle at var(--mx, 50%) var(--my, 50%), rgba(255,77,46,0.14), transparent 65%);
}
.svc:hover::before { opacity: 1; }
.svc > :not(.svc__status) { position: relative; }
.svc__num { font-size: 10px; letter-spacing: 0.2em; color: var(--accent); margin-bottom: 20px; }
.svc h3 {
  margin: 0; font-family: 'Unbounded', sans-serif; font-weight: 500;
  font-size: 18px; text-transform: uppercase; line-height: 1.3;
}
.svc p { margin: 16px 0 0; font-size: 12px; line-height: 1.7; color: var(--muted); }
.svc__status { position: absolute; bottom: 16px; right: 16px; font-size: 10px; color: var(--dim); display: flex; align-items: center; gap: 8px; }
.svc__status::before { content: ""; width: 6px; height: 6px; border-radius: 50%; background: #00e5a0; animation: pulse 2s ease-in-out infinite; }
.svc__status--dev::before { background: var(--accent); }

/* ---------- about ---------- */
.about-lead {
  margin: 0; font-family: 'Unbounded', sans-serif; font-weight: 300;
  font-size: clamp(26px, 3.6vw, 54px); line-height: 1.3; max-width: 24ch;
}
.js .about-lead .w { opacity: 0.13; transition: opacity .5s ease, color .5s ease; }
.js .about-lead .w.lit { opacity: 1; }
.about-stats { display: grid; grid-template-columns: repeat(3, 1fr); gap: 40px; margin-top: clamp(56px, 7vw, 96px); }
.stat { border-top: 1px solid var(--border-strong); padding-top: 18px; }
.stat__k { font-size: 10px; letter-spacing: 0.2em; color: var(--accent); margin-bottom: 10px; }
.stat__v { font-size: 13px; line-height: 1.7; color: var(--muted); }

/* ---------- stack ---------- */
.stack-grid {
  display: grid; grid-template-columns: repeat(6, 1fr); gap: 1px;
  background: var(--border); border: 1px solid var(--border);
}
.stack-item {
  background: var(--bg); padding: 22px 16px;
  display: flex; justify-content: space-between; align-items: center; font-size: 13px;
  transition: background .2s, color .2s;
}
.stack-item:hover { background: var(--accent); color: var(--bg); }
.stack-item__code { font-size: 10px; opacity: 0.5; }
.js .stack-item { opacity: 0; transform: translateY(18px); transition: opacity .6s ease, transform .8s var(--ease), background .2s, color .2s; }
.js .stack-grid.in .stack-item { opacity: 1; transform: none; transition-delay: calc(var(--i, 0) * 45ms), calc(var(--i, 0) * 45ms), 0s, 0s; }

/* ---------- contact ---------- */
.contact { border-top: 1px solid var(--border); text-align: center; padding: 180px 32px 140px; overflow: hidden; }
.contact__kicker { font-size: 11px; letter-spacing: 0.2em; color: var(--dim); margin-bottom: 32px; }
.contact__big {
  display: inline-block; font-family: 'Unbounded', sans-serif; font-weight: 800;
  font-size: clamp(36px, 7.5vw, 120px); text-transform: uppercase; line-height: 1.05;
  will-change: transform;
}
.contact__mail {
  margin-top: 40px; display: inline-flex; align-items: center; gap: 12px;
  border: 1px solid var(--border-strong); padding: 14px 24px; font-size: 13px;
}

/* ---------- footer ---------- */
.footer {
  position: relative; z-index: 2;
  display: flex; justify-content: space-between; align-items: center;
  padding: 20px 32px; border-top: 1px solid var(--border);
  font-size: 10px; letter-spacing: 0.16em; color: var(--dim); background: var(--bg);
}

/* ---------- entry gate ---------- */
.gate {
  position: fixed; inset: 0; z-index: 200; background: var(--bg);
  display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 40px;
  transition: opacity 0.9s ease, visibility 0.9s;
}
.gate__meta { position: absolute; top: 32px; font-size: 10px; letter-spacing: 0.2em; color: var(--dim); }
.gate__meta--left { left: 32px; }
.gate__meta--right { right: 32px; }
.gate__logo { font-family: 'Unbounded', sans-serif; font-weight: 800; font-size: clamp(28px, 5vw, 56px); letter-spacing: 0.2em; color: var(--fg); }
.gate__line { font-size: 12px; letter-spacing: 0.24em; color: var(--dim); max-width: 90vw; text-align: center; height: 16px; }
.gate__hint { font-size: 10px; letter-spacing: 0.16em; color: var(--faint); }

.btn-decrypt {
  font-family: 'Roboto Mono', monospace; font-size: 14px; font-weight: 700;
  letter-spacing: 0.2em; color: var(--bg); background: var(--accent);
  border: none; cursor: pointer; padding: 20px 56px;
  clip-path: polygon(0 0, calc(100% - 14px) 0, 100% 14px, 100% 100%, 14px 100%, 0 calc(100% - 14px));
  transition: background 0.2s ease;
}
.btn-decrypt:hover { background: var(--fg); }

/* ---------- responsive ---------- */
@media (max-width: 1100px) {
  .stack-grid { grid-template-columns: repeat(4, 1fr); }
}
@media (max-width: 900px) {
  .nav { padding: 0 16px; }
  .nav__links { gap: 0; font-size: 9px; }
  .nav__link { padding: 8px 8px; }
  .hero__aside { position: static; width: auto; margin-top: 40px; }
  .proj, .proj--flip { grid-template-columns: 1fr; gap: 28px; }
  .proj--flip .proj__frame { order: 0; }
  .proj__num, .proj--flip .proj__num { top: auto; bottom: -0.2em; right: 0; left: auto; }
  .js .proj--flip .proj__frame { clip-path: inset(0 100% 0 0); }
  .js .proj.proj--flip.in .proj__frame { clip-path: inset(-3px); }
  .svc-grid { grid-template-columns: repeat(2, 1fr); }
  .about-stats { grid-template-columns: 1fr; gap: 28px; }
  .stack-grid { grid-template-columns: repeat(3, 1fr); }
}
@media (max-width: 560px) {
  .svc-grid { grid-template-columns: 1fr; }
  .stack-grid { grid-template-columns: repeat(2, 1fr); }
  .hero__meta, .hero__foot { font-size: 9px; }
  .nav__logo { font-size: 13px; letter-spacing: 0.12em; }
  .nav__links { font-size: 8px; letter-spacing: 0.02em; }
  .nav__link { padding: 6px 4px; }
  .proj__bar { font-size: 9px; letter-spacing: 0.1em; }
  .proj-next { flex-wrap: wrap; }
}

/* ---------- reduced motion: show everything, no movement ---------- */
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .js .reveal, .js .sec-title > span, .js .sec-rule, .js .sec-num, .js .proj__frame, .js .proj__img,
  .js .proj__num, .js .proj__info > *, .js .stack-item, .js .hero__title .ln > span,
  .js .hero__status, .js .hero__aside, .js .hero__meta, .js .hero__foot, .js .about-lead .w {
    opacity: 1 !important; transform: none !important; clip-path: none !important; scale: 1 !important; transition: none !important;
  }
  .overlay-scan, .scroll-cue i, .proj-next__bar i, .ticker__track { animation: none; }
}
