/* ============================================================
   SkyForge — landing styles
   Dark, vibrant-but-tasteful, GPU-friendly animations.
   ============================================================ */

:root {
  --bg: #070a13;
  --bg-2: #0b0f1c;
  --surface: rgba(255, 255, 255, 0.035);
  --surface-2: rgba(255, 255, 255, 0.06);
  --border: rgba(255, 255, 255, 0.09);
  --text: #eef1f8;
  --muted: #9aa3b8;
  --faint: #6b7388;

  --blue: #5b8cff;
  --violet: #a06bff;
  --teal: #36d8c4;
  --pink: #ff6ba6;

  --grad: linear-gradient(120deg, #5b8cff 0%, #a06bff 50%, #36d8c4 100%);
  --grad-soft: linear-gradient(120deg, rgba(91, 140, 255, .15), rgba(160, 107, 255, .15));

  --radius: 18px;
  --radius-lg: 26px;
  --shadow: 0 24px 70px -28px rgba(0, 0, 0, .8);
  --container: 1160px;
  --ease: cubic-bezier(.22, 1, .36, 1);

  --font-display: "Space Grotesk", system-ui, sans-serif;
  --font-body: "Inter", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
}

/* ---------- Reset ---------- */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; overflow-x: hidden; }

body {
  font-family: var(--font-body);
  background: var(--bg);
  color: var(--text);
  line-height: 1.6;
  width: 100%;
  overflow-x: hidden;
  overflow-wrap: break-word;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

img, svg { display: block; max-width: 100%; }
a { color: inherit; text-decoration: none; }
ul { list-style: none; }

.container { width: 100%; max-width: var(--container); margin-inline: auto; padding-inline: 24px; }

/* ============================================================
   iOS-style loader
   ============================================================ */
.loader {
  position: fixed; inset: 0; z-index: 1000;
  display: grid; place-content: center; gap: 26px;
  background: var(--bg);
  transition: opacity .6s var(--ease), visibility .6s;
}
.loader.is-done { opacity: 0; visibility: hidden; }
.loader__mark { display: grid; place-items: center; animation: floaty 2.4s var(--ease) infinite; }
.loader__bolt {
  stroke-dasharray: 120; stroke-dashoffset: 120;
  animation: draw 1.4s var(--ease) infinite alternate;
}
.loader__bar {
  width: 132px; height: 3px; border-radius: 999px;
  background: rgba(255, 255, 255, .08); overflow: hidden;
}
.loader__bar span {
  display: block; height: 100%; width: 40%; border-radius: 999px;
  background: var(--grad);
  animation: load 1.25s var(--ease) infinite;
}
@keyframes draw { to { stroke-dashoffset: 0; } }
@keyframes floaty { 50% { transform: translateY(-6px); } }
@keyframes load {
  0% { transform: translateX(-130%); }
  100% { transform: translateX(360%); }
}

/* ============================================================
   Animated background
   ============================================================ */
.bg { position: fixed; inset: 0; z-index: -1; overflow: hidden; background: var(--bg); }
.bg__orb {
  position: absolute; border-radius: 50%; filter: blur(90px); opacity: .5;
  will-change: transform;
}
.bg__orb--1 { width: 520px; height: 520px; background: #2a47c4; top: -160px; left: -120px; animation: drift1 22s var(--ease) infinite; }
.bg__orb--2 { width: 460px; height: 460px; background: #6a2db0; top: 30%; right: -140px; animation: drift2 26s var(--ease) infinite; }
.bg__orb--3 { width: 420px; height: 420px; background: #128c7e; bottom: -160px; left: 30%; animation: drift3 30s var(--ease) infinite; }
.bg__grid {
  position: absolute; inset: 0;
  background-image:
    linear-gradient(rgba(255,255,255,.025) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255,255,255,.025) 1px, transparent 1px);
  background-size: 64px 64px;
  mask-image: radial-gradient(ellipse 80% 60% at 50% 0%, #000 30%, transparent 75%);
}
@keyframes drift1 { 50% { transform: translate(80px, 60px) scale(1.1); } }
@keyframes drift2 { 50% { transform: translate(-70px, 50px) scale(1.05); } }
@keyframes drift3 { 50% { transform: translate(60px, -50px) scale(1.12); } }

/* ============================================================
   Navigation
   ============================================================ */
.nav {
  position: fixed; top: 0; left: 0; right: 0; z-index: 100;
  transition: background .4s var(--ease), border-color .4s var(--ease), backdrop-filter .4s;
  border-bottom: 1px solid transparent;
}
.nav.is-scrolled {
  background: rgba(7, 10, 19, .72);
  backdrop-filter: saturate(160%) blur(14px);
  -webkit-backdrop-filter: saturate(160%) blur(14px);
  border-bottom-color: var(--border);
}
.nav__inner { display: flex; align-items: center; justify-content: space-between; height: 72px; }

.brand { display: inline-flex; align-items: center; gap: 10px; font-family: var(--font-display); font-weight: 700; letter-spacing: -.02em; }
.brand__name { font-size: 1.18rem; }
.brand__name span { background: var(--grad); -webkit-background-clip: text; background-clip: text; color: transparent; }

.nav__links { display: flex; align-items: center; gap: 32px; }
.nav__links a { color: var(--muted); font-weight: 500; font-size: .95rem; transition: color .25s; }
.nav__links a:hover { color: var(--text); }
.nav__cta {
  padding: 9px 18px; border-radius: 999px; color: var(--text) !important;
  background: var(--surface-2); border: 1px solid var(--border);
  transition: border-color .25s, transform .25s, background .25s;
}
.nav__cta:hover { border-color: rgba(160,107,255,.6); transform: translateY(-1px); }

.nav__toggle { display: none; flex-direction: column; align-items: center; justify-content: center; gap: 5px; background: none; border: 0; cursor: pointer; padding: 8px; min-width: 44px; min-height: 44px; }
.nav__toggle span { width: 24px; height: 2px; background: var(--text); border-radius: 2px; transition: transform .3s var(--ease), opacity .3s; }
.nav.is-open .nav__toggle span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.nav.is-open .nav__toggle span:nth-child(2) { opacity: 0; }
.nav.is-open .nav__toggle span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

/* ============================================================
   Buttons
   ============================================================ */
.btn {
  display: inline-flex; align-items: center; gap: 9px;
  padding: 14px 26px; border-radius: 999px;
  font-weight: 600; font-size: .98rem; cursor: pointer; border: 1px solid transparent;
  transition: transform .3s var(--ease), box-shadow .3s var(--ease), background .3s, border-color .3s;
  will-change: transform;
}
.btn--primary { color: #0a0a12; background: var(--grad); background-size: 160% 160%; box-shadow: 0 12px 34px -12px rgba(91,140,255,.7); }
.btn--primary:hover { transform: translateY(-2px); box-shadow: 0 18px 44px -12px rgba(160,107,255,.8); background-position: 100% 0; }
.btn--ghost { color: var(--text); background: var(--surface); border-color: var(--border); }
.btn--ghost:hover { transform: translateY(-2px); border-color: rgba(255,255,255,.25); background: var(--surface-2); }
.btn--block { width: 100%; justify-content: center; }
.btn__arrow { transition: transform .3s var(--ease); }
.btn:hover .btn__arrow { transform: translateX(4px); }

/* ============================================================
   Hero
   ============================================================ */
.hero { position: relative; padding: 168px 0 96px; }
.hero__inner { max-width: 880px; }
.eyebrow {
  display: inline-block; max-width: 100%; font-family: var(--font-display); font-weight: 600;
  font-size: .82rem; letter-spacing: .14em; text-transform: uppercase;
  color: var(--violet); margin-bottom: 20px;
  padding: 7px 14px; border-radius: 999px; background: var(--grad-soft); border: 1px solid var(--border);
}
.hero__title {
  font-family: var(--font-display); font-weight: 700;
  font-size: clamp(2.05rem, 7vw, 4.6rem); line-height: 1.05; letter-spacing: -.03em;
  overflow-wrap: break-word;
}
.grad { background: var(--grad); -webkit-background-clip: text; background-clip: text; color: transparent; }
.hero__sub { margin-top: 24px; font-size: clamp(1.05rem, 2vw, 1.25rem); color: var(--muted); max-width: 620px; }
.hero__actions { margin-top: 38px; display: flex; flex-wrap: wrap; gap: 14px; }

.hero__scroll {
  position: absolute; bottom: 28px; left: 50%; transform: translateX(-50%);
  font-size: .72rem; letter-spacing: .2em; text-transform: uppercase; color: var(--faint);
  display: flex; flex-direction: column; align-items: center; gap: 10px;
}
.hero__scroll span { width: 1px; height: 36px; background: linear-gradient(var(--violet), transparent); animation: scrolly 2s var(--ease) infinite; transform-origin: top; }
@keyframes scrolly { 0%,100% { transform: scaleY(.4); opacity: .4; } 50% { transform: scaleY(1); opacity: 1; } }

/* ============================================================
   Marquee
   ============================================================ */
.marquee { overflow: hidden; border-block: 1px solid var(--border); padding: 18px 0; background: rgba(255,255,255,.015); }
.marquee__track { display: flex; gap: 38px; white-space: nowrap; width: max-content; animation: marquee 28s linear infinite; }
.marquee__track span { font-family: var(--font-display); font-weight: 500; color: var(--muted); font-size: 1.05rem; letter-spacing: .02em; }
@keyframes marquee { to { transform: translateX(-50%); } }

/* ============================================================
   Sections
   ============================================================ */
.section { padding: 110px 0; position: relative; }
.section--alt { background: linear-gradient(180deg, transparent, rgba(255,255,255,.015), transparent); }
.section__head { max-width: 660px; margin-bottom: 56px; }
.section__title { font-family: var(--font-display); font-weight: 700; font-size: clamp(2rem, 4.5vw, 3.1rem); line-height: 1.08; letter-spacing: -.025em; }
.section__lead { margin-top: 18px; color: var(--muted); font-size: 1.08rem; }

/* ---------- Service cards ---------- */
.cards { display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px; }
.card {
  position: relative; padding: 30px; border-radius: var(--radius);
  background: var(--surface); border: 1px solid var(--border); overflow: hidden;
  transition: transform .4s var(--ease), border-color .4s, background .4s;
}
.card::before {
  content: ""; position: absolute; inset: 0; border-radius: inherit; padding: 1px;
  background: var(--grad); -webkit-mask: linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0);
  -webkit-mask-composite: xor; mask-composite: exclude; opacity: 0; transition: opacity .4s;
}
.card:hover { transform: translateY(-6px); background: var(--surface-2); }
.card:hover::before { opacity: .9; }
.card__icon {
  width: 52px; height: 52px; display: grid; place-items: center; font-size: 1.5rem;
  border-radius: 14px; background: var(--grad-soft); border: 1px solid var(--border); margin-bottom: 20px;
}
.card h3 { font-family: var(--font-display); font-size: 1.25rem; margin-bottom: 10px; letter-spacing: -.01em; }
.card p { color: var(--muted); font-size: .97rem; }

/* ---------- Work ---------- */
.work { display: grid; grid-template-columns: repeat(3, 1fr); gap: 24px; }
.work__item {
  display: block; color: inherit; text-decoration: none;
  border-radius: var(--radius-lg); overflow: hidden; background: var(--surface);
  border: 1px solid var(--border); transition: transform .4s var(--ease), border-color .4s;
}
.work__item:hover { transform: translateY(-6px); border-color: rgba(255,255,255,.2); }
.work__visual {
  aspect-ratio: 16 / 9; background: var(--accent, var(--grad)); position: relative; overflow: hidden;
  display: grid; place-items: center;
}
.work__visual::after {
  content: ""; position: absolute; inset: 0;
  background: radial-gradient(circle at 70% 20%, rgba(255,255,255,.35), transparent 55%);
  mix-blend-mode: overlay;
}
.work__visual span { font-family: var(--font-display); font-weight: 700; font-size: 3.4rem; color: rgba(255,255,255,.85); transition: transform .5s var(--ease); }
.work__item:hover .work__visual span { transform: scale(1.12); }
.work__meta { padding: 26px 28px 30px; }
.work__meta h3 { font-family: var(--font-display); font-size: 1.4rem; margin-bottom: 8px; }
.work__meta p { color: var(--muted); font-size: .98rem; }
.tag { display: inline-block; margin-top: 16px; font-size: .78rem; letter-spacing: .04em; color: var(--faint); padding: 5px 12px; border: 1px solid var(--border); border-radius: 999px; }

/* ---------- About ---------- */
.about { display: grid; grid-template-columns: 1.1fr .9fr; gap: 60px; align-items: center; }
.checklist { margin-top: 28px; display: grid; gap: 14px; }
.checklist li { position: relative; padding-left: 34px; color: var(--text); }
.checklist li::before {
  content: "✓"; position: absolute; left: 0; top: 0; width: 22px; height: 22px;
  display: grid; place-items: center; font-size: .8rem; color: #0a0a12; font-weight: 700;
  background: var(--grad); border-radius: 7px;
}
.about__panel { padding: 34px; border-radius: var(--radius-lg); background: var(--surface); border: 1px solid var(--border); box-shadow: var(--shadow); }
.meter { display: grid; gap: 22px; }
.meter__row { display: grid; gap: 9px; }
.meter__row span { font-size: .9rem; color: var(--muted); display: flex; justify-content: space-between; }
.meter__row i {
  display: block; height: 8px; border-radius: 999px; background: var(--grad);
  width: 0; transition: width 1.2s var(--ease);
}
.is-visible .meter__row i { width: var(--w); }
.meter__caption { margin-top: 22px; font-size: .85rem; color: var(--faint); }

/* ============================================================
   Contact
   ============================================================ */
.section--contact { padding-bottom: 120px; }
.contact__head { max-width: 620px; margin-bottom: 48px; }
.contact__head--center { margin-left: auto; margin-right: auto; text-align: center; }

/* Clean, form-free contact: a prominent email link + phone. */
.contact__cta {
  max-width: 620px; margin: 0 auto; padding: 48px 34px; text-align: center;
  display: flex; flex-direction: column; align-items: center; gap: 18px;
  border-radius: var(--radius-lg); position: relative; overflow: hidden;
  background: linear-gradient(160deg, rgba(91,140,255,.14), rgba(160,107,255,.1));
  border: 1px solid var(--border);
}
.contact__mail {
  display: inline-flex; flex-wrap: wrap; align-items: center; justify-content: center; gap: 12px;
  max-width: 100%; min-width: 0;
  font-family: var(--font-display); font-weight: 700; font-size: clamp(1.05rem, 5vw, 1.9rem);
  letter-spacing: -.02em; color: var(--text); overflow-wrap: anywhere;
  border-bottom: 2px solid transparent; transition: color .25s, border-color .25s;
}
.contact__mail:hover { color: var(--blue); border-bottom-color: var(--blue); }
.contact__mail-icon {
  display: grid; place-items: center; width: 46px; height: 46px; font-size: 1.1rem;
  border-radius: 14px; background: var(--grad); flex: none;
}
.contact__phone {
  display: inline-flex; align-items: center; gap: 12px; margin-top: 16px;
  font-family: var(--font-display); font-weight: 600; font-size: 1.25rem; letter-spacing: -.01em;
  color: var(--muted); transition: color .25s, transform .25s;
}
.contact__phone:hover { color: var(--text); transform: translateX(2px); }
.contact__phone-icon {
  display: grid; place-items: center; width: 40px; height: 40px; font-size: 1rem;
  border-radius: 12px; background: var(--grad); flex: none;
}
.contact__hours { font-size: .85rem; color: var(--faint); }

/* ============================================================
   Footer
   ============================================================ */
.footer { border-top: 1px solid var(--border); padding: 40px 0; }
.footer__inner {
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  text-align: center; gap: 18px;
}
.footer__copy { color: var(--faint); font-size: .9rem; }
.footer__links { display: flex; flex-wrap: wrap; justify-content: center; gap: 8px 24px; }
.footer__links a { color: var(--muted); font-size: .92rem; transition: color .25s; }
.footer__links a:hover { color: var(--text); }

/* ============================================================
   Scroll reveal
   ============================================================ */
.reveal { opacity: 0; transform: translateY(28px); transition: opacity .8s var(--ease), transform .8s var(--ease); }
.reveal.is-visible { opacity: 1; transform: none; }

/* ============================================================
   Responsive
   ============================================================ */
@media (max-width: 940px) {
  .cards { grid-template-columns: repeat(2, 1fr); }
  .work { grid-template-columns: repeat(2, 1fr); }
  .about { grid-template-columns: 1fr; gap: 36px; }
  .section { padding: 88px 0; }
  .section__head { margin-bottom: 44px; }
}
/* Hamburger nav for tablets & phones (large, easy-to-tap menu links). */
@media (max-width: 768px) {
  .nav__links {
    position: fixed; inset: 72px 0 auto 0; flex-direction: column; gap: 4px; align-items: stretch;
    padding: 18px 24px 28px; background: rgba(7,10,19,.96); backdrop-filter: blur(14px);
    -webkit-backdrop-filter: blur(14px);
    border-bottom: 1px solid var(--border);
    transform: translateY(-130%); opacity: 0; pointer-events: none; transition: transform .4s var(--ease), opacity .3s;
  }
  .nav.is-open .nav__links { transform: none; opacity: 1; pointer-events: auto; }
  .nav__links a { padding: 14px 4px; font-size: 1.05rem; }
  .nav__cta { text-align: center; margin-top: 8px; }
  .nav__toggle { display: flex; }
}
@media (max-width: 720px) {
  .cards { grid-template-columns: 1fr; }
  .work { grid-template-columns: 1fr; }
  .section { padding: 72px 0; }
  .section--contact { padding-bottom: 84px; }
  .hero { padding: 120px 0 72px; }
  .hero__scroll { display: none; }
  .contact__cta { padding: 40px 22px; }
  .footer__links a { padding: 8px 6px; } /* larger tap targets on touch */

  /* Mobile performance: keep the ambient gradient, drop the per-frame blur
     repaint from animating three large, heavily-blurred orbs. */
  .bg__orb { animation: none !important; filter: blur(64px); opacity: .42; will-change: auto; }
  .bg__orb--1 { width: 320px; height: 320px; }
  .bg__orb--2 { width: 300px; height: 300px; }
  .bg__orb--3 { width: 280px; height: 280px; }
}
@media (max-width: 480px) {
  .container { padding-inline: 18px; }
  .section { padding: 60px 0; }
  .section__head { margin-bottom: 36px; }
  .hero { padding: 108px 0 64px; }
  .hero__actions { width: 100%; }
  .hero__actions .btn { flex: 1 1 100%; justify-content: center; padding: 15px 22px; }
  .contact__cta { padding: 34px 18px; }
  .marquee__track { gap: 26px; }
  .marquee__track span { font-size: .98rem; }
}

/* ============================================================
   Reduced motion
   ============================================================ */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: .001ms !important; animation-iteration-count: 1 !important; transition-duration: .001ms !important; scroll-behavior: auto !important; }
  .reveal { opacity: 1; transform: none; }
}
