/* =========================================================
   SKYFORGING AI SYSTEMS
   ========================================================= */

:root {
  --bg:          #0B1020;
  --bg-soft:     #0f1528;
  --bg-card:     #141b33;
  --ink:         #F5F7FA;
  --muted:       #9aa3bd;
  --line:        #222b47;
  --blue:        #2563EB;
  --indigo:      #6C5CE7;
  --violet:      #A855F7;
  --violet-soft: #c4a3fb;
  --glow:        rgba(108, 92, 231, 0.5);

  --grad: linear-gradient(120deg, var(--blue), var(--indigo) 55%, var(--violet));

  --display: 'Bricolage Grotesque', -apple-system, sans-serif;
  --body: 'DM Sans', -apple-system, sans-serif;

  --wrap: 1160px;
  --gap: clamp(1rem, 3vw, 2rem);
}

* { margin: 0; padding: 0; box-sizing: border-box; }
html { scroll-behavior: smooth; }

body {
  font-family: var(--body);
  background: var(--bg);
  color: var(--ink);
  line-height: 1.7;
  font-size: 17px;
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
}

img, video { max-width: 100%; display: block; }
a { color: inherit; text-decoration: none; }

.wrap { width: 100%; max-width: var(--wrap); margin: 0 auto; padding: 0 var(--gap); }

h1, h2, h3 { font-family: var(--display); font-weight: 700; line-height: 1.05; letter-spacing: -0.02em; }

.grad-text {
  background: var(--grad);
  -webkit-background-clip: text; background-clip: text;
  -webkit-text-fill-color: transparent;
}

.eyebrow {
  font-family: var(--body);
  font-size: 0.76rem; font-weight: 600;
  letter-spacing: 0.2em; text-transform: uppercase;
  color: var(--violet-soft); margin-bottom: 1.1rem;
}

#stars { position: fixed; inset: 0; z-index: 0; pointer-events: none; }
.page { position: relative; z-index: 1; }

/* NAV */
.nav { position: sticky; top: 0; z-index: 50; backdrop-filter: blur(14px); background: rgba(11, 16, 32, 0.72); border-bottom: 1px solid var(--line); }
.nav__inner { display: flex; align-items: center; justify-content: space-between; height: 74px; gap: 1rem; }
.logo { font-family: var(--display); font-size: 1.5rem; font-weight: 800; letter-spacing: -0.02em; color: var(--ink); flex-shrink: 0; }
.logo b { font-weight: 800; background: var(--grad); -webkit-background-clip: text; background-clip: text; -webkit-text-fill-color: transparent; }
.nav__links { display: flex; gap: 1.8rem; align-items: center; list-style: none; }
.nav__links a { font-size: 0.92rem; font-weight: 500; color: var(--muted); transition: color 0.2s; }
.nav__links a:hover { color: var(--ink); }
.nav__right { display: flex; align-items: center; gap: 1.1rem; flex-shrink: 0; }
.lang { display: flex; border: 1px solid var(--line); border-radius: 999px; overflow: hidden; }
.lang button { background: none; border: none; cursor: pointer; color: var(--muted); font-family: var(--body); font-size: 0.78rem; font-weight: 700; padding: 0.35rem 0.8rem; transition: all 0.2s; letter-spacing: 0.04em; }
.lang button.active { background: var(--grad); color: #fff; }

.btn { display: inline-block; font-family: var(--body); font-weight: 600; font-size: 0.92rem; padding: 0.78rem 1.6rem; border-radius: 999px; cursor: pointer; border: 1px solid transparent; transition: transform 0.2s, box-shadow 0.2s, background 0.2s; white-space: nowrap; }
.btn--primary { background: var(--grad); color: #fff; }
.btn--primary:hover { transform: translateY(-2px); box-shadow: 0 10px 30px var(--glow); }
.btn--ghost { border-color: var(--line); color: var(--ink); background: rgba(255,255,255,0.02); }
.btn--ghost:hover { border-color: var(--indigo); color: var(--violet-soft); }
.nav__burger { display: none; flex-direction: column; gap: 5px; background: none; border: none; cursor: pointer; padding: 6px; }
.nav__burger span { width: 24px; height: 2px; background: var(--ink); transition: 0.3s; }

/* HERO */
.hero { padding: clamp(3.5rem, 8vw, 6.5rem) 0 clamp(3rem, 6vw, 5rem); position: relative; }
.hero__grid { display: grid; grid-template-columns: 1.1fr 0.9fr; gap: clamp(2rem, 5vw, 4rem); align-items: center; }
.hero h1 { font-size: clamp(2.6rem, 6.2vw, 4.7rem); margin-bottom: 1.6rem; font-weight: 800; }
.hero__lead { font-size: 1.16rem; color: var(--muted); max-width: 44ch; margin-bottom: 2.2rem; line-height: 1.65; }
.hero__actions { display: flex; gap: 1rem; flex-wrap: wrap; }

/* HEXAGON signature */
.hexwrap { position: relative; width: min(100%, 380px); aspect-ratio: 1; margin: 0 auto; display: grid; place-items: center; }
.hexwrap svg { width: 100%; height: 100%; overflow: visible; }
.hex-line { stroke: var(--line); stroke-width: 1.2; fill: none; }
.hex-line--glow { stroke: url(#hexgrad); stroke-width: 1.8; fill: none; }
.hex-node { fill: url(#nodegrad); filter: drop-shadow(0 0 8px var(--glow)); }
.hex-core { fill: url(#nodegrad); filter: drop-shadow(0 0 24px var(--glow)); }
.hex-core-glow { fill: url(#coreglow); }
.hex-label { font-family: var(--display); font-weight: 800; font-size: 30px; fill: #fff; text-anchor: middle; dominant-baseline: central; }

/* STATS */
.stats { border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); background: var(--bg-soft); }
.stats__inner { display: flex; justify-content: space-between; gap: 2rem; padding: 2.4rem 0; flex-wrap: wrap; }
.stat { flex: 1; min-width: 160px; }
.stat b { font-family: var(--display); font-weight: 800; font-size: 2.7rem; display: block; line-height: 1; margin-bottom: 0.5rem; }
.stat span { font-size: 0.94rem; color: var(--muted); }

/* SECTIONS */
.section { padding: clamp(4rem, 8vw, 7rem) 0; position: relative; }
.section--soft { background: var(--bg-soft); }
.section__head { max-width: 64ch; margin-bottom: 3.5rem; }
.section__head h2 { font-size: clamp(2.1rem, 4.6vw, 3.3rem); margin-bottom: 1.1rem; font-weight: 700; }
.section__head p { color: var(--muted); font-size: 1.1rem; }

.steps { display: grid; grid-template-columns: repeat(3, 1fr); gap: 1.5rem; }
.step { background: var(--bg-card); border: 1px solid var(--line); border-radius: 18px; padding: 2.1rem 1.9rem; transition: transform 0.3s, border-color 0.3s; }
.step:hover { transform: translateY(-5px); border-color: var(--indigo); }
.step__num { font-family: var(--display); font-weight: 700; font-size: 0.86rem; letter-spacing: 0.06em; color: var(--violet-soft); margin-bottom: 1.2rem; }
.step h3 { font-size: 1.45rem; margin-bottom: 0.6rem; }
.step p { color: var(--muted); font-size: 0.98rem; }

.systems { display: grid; grid-template-columns: repeat(2, 1fr); gap: 1.3rem; }
.sys { background: var(--bg-card); border: 1px solid var(--line); border-radius: 18px; padding: 2rem; position: relative; overflow: hidden; transition: transform 0.3s, border-color 0.3s; }
.sys::before { content: ''; position: absolute; inset: 0; background: var(--grad); opacity: 0; transition: opacity 0.3s; z-index: 0; }
.sys:hover { transform: translateY(-4px); border-color: transparent; }
.sys:hover::before { opacity: 0.08; }
.sys > * { position: relative; z-index: 1; }
.sys__tag { font-family: var(--body); font-weight: 600; font-size: 0.72rem; letter-spacing: 0.1em; text-transform: uppercase; color: var(--violet-soft); margin-bottom: 0.9rem; }
.sys h3 { font-size: 1.35rem; margin-bottom: 0.7rem; }
.sys p { color: var(--muted); font-size: 0.96rem; }

/* EXAMPLES — horizontal carousel */
.carousel { position: relative; }
.carousel__track { display: flex; gap: 1.5rem; overflow-x: auto; scroll-snap-type: x mandatory; scroll-behavior: smooth; padding: 0.5rem 0.25rem 1.5rem; -ms-overflow-style: none; scrollbar-width: none; }
.carousel__track::-webkit-scrollbar { display: none; }
.vcard { flex: 0 0 auto; width: min(72vw, 460px); scroll-snap-align: center; background: var(--bg-card); border: 1px solid var(--line); border-radius: 18px; overflow: hidden; cursor: pointer; transition: transform 0.3s, border-color 0.3s, box-shadow 0.3s; }
.vcard:hover { transform: translateY(-4px); border-color: var(--indigo); box-shadow: 0 16px 40px rgba(0,0,0,0.35); }
.vcard__thumb { aspect-ratio: 16 / 9; position: relative; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 0.9rem; background: radial-gradient(circle at 30% 30%, rgba(108,92,231,0.16), transparent 60%), radial-gradient(circle at 70% 70%, rgba(168,85,247,0.16), transparent 60%); }
.vcard__thumb video { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.vcard__play { width: 60px; height: 60px; border-radius: 50%; background: var(--grad); display: grid; place-items: center; box-shadow: 0 0 34px var(--glow); position: relative; z-index: 2; }
.vcard__play::after { content: '▶'; color: #fff; font-size: 1.15rem; margin-left: 4px; }
.vcard__soon { font-size: 0.8rem; color: var(--muted); position: relative; z-index: 2; }
.vcard__meta { padding: 1.2rem 1.4rem; }
.vcard__num { font-family: var(--display); font-weight: 700; font-size: 0.78rem; color: var(--violet-soft); margin-bottom: 0.3rem; }
.vcard__title { font-family: var(--display); font-weight: 700; font-size: 1.15rem; }
.carousel__controls { display: flex; align-items: center; justify-content: center; gap: 1.2rem; margin-top: 1rem; }
.carousel__arrow { width: 48px; height: 48px; border-radius: 50%; background: var(--bg-card); border: 1px solid var(--line); color: var(--ink); cursor: pointer; font-size: 1.15rem; transition: all 0.2s; display: grid; place-items: center; }
.carousel__arrow:hover { border-color: var(--indigo); color: var(--violet-soft); }
.carousel__hint { font-size: 0.85rem; color: var(--muted); text-align: center; margin-top: 0.6rem; }

/* Lightbox */
.lightbox { position: fixed; inset: 0; z-index: 100; background: rgba(5, 8, 18, 0.9); backdrop-filter: blur(8px); display: none; align-items: center; justify-content: center; padding: var(--gap); }
.lightbox.open { display: flex; }
.lightbox__inner { width: min(90vw, 960px); position: relative; }
.lightbox__frame { aspect-ratio: 16/9; background: var(--bg-card); border: 1px solid var(--line); border-radius: 16px; overflow: hidden; display: grid; place-items: center; }
.lightbox__frame video { width: 100%; height: 100%; object-fit: contain; background: #000; }
.lightbox__placeholder { text-align: center; color: var(--muted); }
.lightbox__placeholder .vcard__play { margin: 0 auto 1rem; }
.lightbox__close { position: absolute; top: -3rem; right: 0; background: none; border: none; color: var(--ink); font-size: 2rem; cursor: pointer; line-height: 1; }
.lightbox__title { text-align: center; font-family: var(--display); font-weight: 700; margin-top: 1.2rem; color: var(--ink); font-size: 1.15rem; }

/* TRIAL */
.trial { text-align: center; }
.trial__box { background: var(--bg-card); border: 1px solid var(--line); border-radius: 24px; padding: clamp(2.5rem, 5vw, 4rem); position: relative; overflow: hidden; }
.trial__box::before { content: ''; position: absolute; top: -50%; left: 50%; transform: translateX(-50%); width: 600px; height: 600px; background: radial-gradient(circle, var(--glow), transparent 60%); opacity: 0.3; pointer-events: none; }
.trial__box > * { position: relative; }
.trial h2 { font-size: clamp(2rem, 4.5vw, 3rem); margin-bottom: 1rem; }
.trial p { color: var(--muted); max-width: 48ch; margin: 0 auto 2rem; }
.trial__badge { display: inline-block; font-family: var(--body); font-weight: 600; font-size: 0.78rem; letter-spacing: 0.13em; text-transform: uppercase; color: var(--violet-soft); border: 1px solid var(--line); border-radius: 999px; padding: 0.4rem 1rem; margin-bottom: 1.5rem; }

/* CONTACT */
.contact__grid { display: grid; grid-template-columns: 1fr 1fr; gap: clamp(2rem, 5vw, 4rem); }
.contact__info { display: grid; gap: 1.6rem; align-content: start; }
.contact__item .eyebrow { margin-bottom: 0.3rem; }
.contact__item a, .contact__item p { font-size: 1.12rem; color: var(--ink); }
.contact__item a:hover { color: var(--violet-soft); }
.form { background: var(--bg-card); border: 1px solid var(--line); border-radius: 18px; padding: 2.2rem; display: grid; gap: 1.1rem; }
.form label { font-size: 0.82rem; font-weight: 600; color: var(--muted); display: block; margin-bottom: 0.4rem; font-family: var(--body); letter-spacing: 0.02em; }
.form input, .form textarea { width: 100%; padding: 0.85rem 1rem; background: var(--bg); border: 1px solid var(--line); border-radius: 10px; color: var(--ink); font-family: var(--body); font-size: 0.96rem; transition: border-color 0.2s; }
.form input:focus, .form textarea:focus { outline: none; border-color: var(--indigo); }
.form textarea { resize: vertical; min-height: 120px; }

/* FOOTER */
.footer { border-top: 1px solid var(--line); background: var(--bg-soft); padding: 3rem 0 2rem; }
.footer__grid { display: flex; justify-content: space-between; gap: 2rem; flex-wrap: wrap; padding-bottom: 2rem; border-bottom: 1px solid var(--line); }
.footer p { color: var(--muted); font-size: 0.94rem; max-width: 32ch; margin-top: 0.8rem; }
.footer__links { display: flex; gap: 2.5rem; flex-wrap: wrap; }
.footer__col h4 { font-family: var(--display); font-weight: 700; font-size: 0.78rem; letter-spacing: 0.08em; text-transform: uppercase; color: var(--muted); margin-bottom: 1rem; }
.footer__col a { display: block; font-size: 0.92rem; color: var(--ink); margin-bottom: 0.5rem; transition: color 0.2s; }
.footer__col a:hover { color: var(--violet-soft); }
.footer__bottom { padding-top: 1.5rem; font-size: 0.84rem; color: var(--muted); text-align: center; }

.reveal { opacity: 0; transform: translateY(24px); transition: opacity 0.7s ease, transform 0.7s ease; }
.reveal.in { opacity: 1; transform: none; }

@media (prefers-reduced-motion: reduce) {
  .reveal { opacity: 1; transform: none; transition: none; }
  .hexwrap svg animateTransform, .hexwrap svg animate { display: none; }
  html { scroll-behavior: auto; }
}

@media (max-width: 900px) {
  .hero__grid { grid-template-columns: 1fr; }
  .hexwrap { max-width: 300px; order: -1; }
  .steps { grid-template-columns: 1fr; }
  .systems { grid-template-columns: 1fr; }
  .contact__grid { grid-template-columns: 1fr; }
  .nav__links { position: fixed; top: 74px; left: 0; right: 0; background: var(--bg-soft); flex-direction: column; gap: 0; padding: 1rem var(--gap); border-bottom: 1px solid var(--line); transform: translateY(-130%); transition: transform 0.35s; }
  .nav__links.open { transform: translateY(0); }
  .nav__links li { width: 100%; padding: 0.7rem 0; border-bottom: 1px solid var(--line); }
  .nav__burger { display: flex; }
}
@media (max-width: 520px) {
  .stats__inner { gap: 1.5rem; }
  .stat { min-width: 120px; }
  .stat b { font-size: 2.1rem; }
  .footer__grid { flex-direction: column; }
  .vcard { width: 82vw; }
}
