/* ============================================================
   Aqeni Studio — Editorial Redesign
   Light theme · Aqeni blue #0166af · Space Grotesk + DM Sans
   ============================================================ */

:root {
  --primary: #0166af;
  --primary-light: #0284c7;
  --primary-dark: #014d80;
  --grad: linear-gradient(135deg, #0166af, #0ea5e9);
  --grad-deep: linear-gradient(135deg, #014d80, #0166af);

  --bg: #fbfbfd;
  --bg-soft: #f4f7fa;
  --surface: #ffffff;
  --ink: #0a1622;
  --ink-2: #3d4f61;
  --muted: #5b7086;
  --muted-2: #8ca0b3;
  --line: #e3eaf1;
  --line-strong: #c9d8e4;
  --tint: rgba(1, 102, 175, 0.07);
  --tint-strong: rgba(1, 102, 175, 0.13);

  --shadow-card: 0 24px 60px -28px rgba(10, 22, 34, 0.12);
  --shadow-mock: 0 40px 90px -30px rgba(10, 22, 34, 0.28);
  --shadow-btn: 0 12px 28px -8px rgba(1, 102, 175, 0.35);

  --radius-lg: 26px;
  --radius-md: 16px;
  --radius-sm: 10px;
  --head-h: 76px;

  --ease-out: cubic-bezier(0.22, 1, 0.36, 1);
  --spring: cubic-bezier(0.34, 1.56, 0.64, 1);
  --font-display: 'Space Grotesk', 'DM Sans', sans-serif;
  --font-body: 'DM Sans', sans-serif;
}

* { margin: 0; padding: 0; box-sizing: border-box; }
html { scroll-behavior: smooth; }
[id] { scroll-margin-top: 88px; }

body {
  font-family: var(--font-body);
  background: var(--bg);
  color: var(--muted);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

::selection { background: rgba(1, 102, 175, 0.16); color: var(--ink); }
::-webkit-scrollbar { width: 9px; }
::-webkit-scrollbar-track { background: var(--bg-soft); }
::-webkit-scrollbar-thumb { background: var(--line-strong); border-radius: 6px; }
::-webkit-scrollbar-thumb:hover { background: var(--muted-2); }

img { max-width: 100%; display: block; }
a { color: inherit; text-decoration: none; }
button { font-family: inherit; cursor: pointer; border: none; background: none; color: inherit; }

:focus-visible { outline: 2px solid var(--primary); outline-offset: 4px; border-radius: 6px; }

/* ============================= grain + orbs ============================= */

.grain {
  position: fixed; inset: 0; z-index: 800; pointer-events: none; opacity: 0.022;
  background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 256 256' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.85' numOctaves='4' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
  background-repeat: repeat; background-size: 180px;
}

.orb {
  position: fixed; border-radius: 50%; filter: blur(110px);
  pointer-events: none; z-index: 0; opacity: 0.35;
  animation: orbDrift 30s ease-in-out infinite alternate;
}
.orb-1 {
  width: 620px; height: 620px; left: -220px; top: -200px;
  background: radial-gradient(circle, rgba(1, 102, 175, 0.12), transparent 70%);
}
.orb-2 {
  width: 520px; height: 520px; right: -200px; top: 30%;
  background: radial-gradient(circle, rgba(14, 165, 233, 0.1), transparent 70%);
}
@keyframes orbDrift {
  from { transform: translate3d(-20px, -12px, 0) scale(1); }
  to { transform: translate3d(24px, 18px, 0) scale(1.08); }
}

/* ============================= preloader ============================= */

#preloader {
  position: fixed; inset: 0; z-index: 1000; background: var(--bg);
  display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 20px;
  transition: opacity 0.6s var(--ease-out), visibility 0.6s;
}
#preloader.done { opacity: 0; visibility: hidden; pointer-events: none; }
.pre-mark {
  width: 52px; height: 52px; border-radius: 14px; object-fit: cover;
  filter: drop-shadow(0 0 24px rgba(1, 102, 175, 0.35));
  animation: prePulse 1.4s var(--ease-out) infinite;
}
@keyframes prePulse {
  0%, 100% { transform: scale(1); filter: drop-shadow(0 0 24px rgba(1, 102, 175, 0.35)); }
  50% { transform: scale(1.08); filter: drop-shadow(0 0 40px rgba(1, 102, 175, 0.5)); }
}
.pre-word {
  font-family: var(--font-display); font-weight: 600; letter-spacing: 0.4em;
  text-transform: uppercase; font-size: 0.8rem; color: var(--muted-2); padding-left: 0.4em;
}
.pre-bar { width: 168px; height: 3px; border-radius: 4px; background: var(--line); overflow: hidden; }
.pre-bar i { display: block; height: 100%; width: 0; background: var(--grad); border-radius: 4px; animation: preLoad 1.05s var(--ease-out) forwards; }
@keyframes preLoad { to { width: 100%; } }

/* ============================= scroll progress ============================= */

#progress {
  position: fixed; top: 0; left: 0; height: 3px; width: 0;
  background: var(--grad); z-index: 900; border-radius: 0 3px 3px 0;
  box-shadow: 0 0 12px rgba(1, 102, 175, 0.5);
}

/* ============================= nav ============================= */

.nav {
  position: fixed; top: 0; left: 0; right: 0; z-index: 500;
  height: var(--head-h);
  display: flex; align-items: center; justify-content: space-between;
  padding: 0 clamp(20px, 4.5vw, 56px);
  transition: background 0.4s var(--ease-out), border-color 0.4s, box-shadow 0.4s, backdrop-filter 0.4s;
  border-bottom: 1px solid transparent;
}
.nav.scrolled {
  background: rgba(251, 251, 253, 0.82);
  backdrop-filter: blur(20px) saturate(1.4);
  -webkit-backdrop-filter: blur(20px) saturate(1.4);
  border-bottom-color: var(--line);
  box-shadow: 0 12px 40px -20px rgba(10, 22, 34, 0.08);
}
.nav-brand {
  display: flex; align-items: center; gap: 12px;
  font-family: var(--font-display); font-weight: 600; font-size: 1.1rem;
  letter-spacing: 0.01em; color: var(--ink);
}
.nav-brand em { font-style: normal; color: var(--muted-2); font-weight: 500; }
.nav-brand .mark {
  width: 36px; height: 36px; border-radius: 10px; object-fit: cover;
  transition: transform 0.35s var(--spring);
}
.nav-brand:hover .mark { animation: logoPulse 1.1s var(--ease-out) infinite; }
@keyframes logoPulse {
  0%, 100% { transform: scale(1); }
  50% { transform: scale(1.12); }
}
.nav-links { display: flex; align-items: center; gap: 32px; }
.nav-links a:not(.btn) {
  font-size: 0.92rem; font-weight: 500; color: var(--ink-2);
  position: relative; transition: color 0.25s;
}
.nav-links a:not(.btn)::after {
  content: ''; position: absolute; left: 0; bottom: -6px;
  height: 2px; width: 0; background: var(--grad); border-radius: 2px;
  transition: width 0.3s var(--ease-out);
}
.nav-links a:not(.btn):hover { color: var(--ink); }
.nav-links a:not(.btn):hover::after { width: 100%; }

/* ============================= buttons ============================= */

.btn {
  display: inline-flex; align-items: center; gap: 9px;
  font-family: var(--font-body); font-weight: 600; font-size: 0.95rem;
  padding: 14px 27px; border-radius: 13px;
  transition: transform 0.35s var(--spring), box-shadow 0.35s, background 0.35s, color 0.35s, border-color 0.35s;
  cursor: pointer; white-space: nowrap; position: relative; overflow: hidden;
}
.btn svg { width: 17px; height: 17px; transition: transform 0.3s var(--ease-out); }
.btn:hover svg { transform: translate(2px, -2px); }
.btn-primary { background: var(--grad-deep); color: #fff; box-shadow: var(--shadow-btn); }
.btn-primary:hover { transform: translateY(-3px); box-shadow: 0 20px 42px -10px rgba(1, 102, 175, 0.5); }
.btn-primary::before {
  content: ''; position: absolute; inset: 0;
  background: linear-gradient(135deg, rgba(255,255,255,0.16), transparent 50%);
  opacity: 0; transition: opacity 0.35s;
}
.btn-primary:hover::before { opacity: 1; }
.btn-ghost { background: transparent; border: 1.5px solid var(--line-strong); color: var(--ink-2); }
.btn-ghost:hover { transform: translateY(-3px); border-color: var(--primary); color: var(--ink); background: var(--tint); }
.btn-sm { padding: 9px 18px; font-size: 0.88rem; border-radius: 10px; }

/* ============================= hero ============================= */

.hero {
  position: relative; z-index: 2;
  min-height: 100svh;
  display: flex; flex-direction: column; justify-content: center;
  padding: calc(var(--head-h) + 48px) clamp(20px, 5vw, 64px) 110px;
}
.hero-inner {
  max-width: 1240px; margin: 0 auto; width: 100%;
  display: flex; flex-direction: column; align-items: center;
  text-align: center;
}

.hero-title {
  font-family: var(--font-display);
  font-weight: 600;
  font-size: clamp(3rem, 9.5vw, 7.4rem);
  line-height: 0.98;
  letter-spacing: -0.035em;
  color: var(--ink);
  text-align: center;
}
.ht-line { display: block; overflow: hidden; }
.ht-word { display: inline-block; will-change: transform; opacity: 0; transform: translateY(110%); }
.ht-serif {
  font-style: italic; font-weight: 500;
  font-family: Georgia, 'Times New Roman', serif;
  letter-spacing: -0.02em;
  padding-right: 0.08em;
  opacity: 0; transform: translateY(110%);
}
.hero-title .grad {
  background: var(--grad);
  -webkit-background-clip: text; background-clip: text; color: transparent;
}

.hero-foot {
  margin-top: clamp(36px, 5vw, 56px);
  display: flex; flex-direction: column; align-items: center;
  gap: 30px; text-align: center;
  opacity: 0; transform: translateY(20px);
}
.hero-sub { max-width: 52ch; font-size: 1.1rem; color: var(--ink-2); }
.hero-actions { display: flex; gap: 14px; flex-wrap: wrap; justify-content: center; }

/* ============================= sections generic ============================= */

.section { position: relative; z-index: 2; padding: clamp(90px, 11vw, 150px) clamp(20px, 5vw, 64px); }
.section-inner { max-width: 1240px; margin: 0 auto; }

.section-head { margin-bottom: clamp(48px, 6vw, 80px); }
.section-head h2 {
  font-family: var(--font-display); font-weight: 600;
  font-size: clamp(2.1rem, 4.6vw, 3.6rem);
  letter-spacing: -0.026em; line-height: 1.05;
  color: var(--ink); margin-top: 16px;
}
.section-head h2 .grad {
  background: var(--grad);
  -webkit-background-clip: text; background-clip: text; color: transparent;
}
.section-sub { margin-top: 16px; color: var(--ink-2); font-size: 1.05rem; max-width: 52ch; }

.eyebrow {
  display: inline-flex; align-items: center; gap: 10px;
  font-size: 0.76rem; font-weight: 700; letter-spacing: 0.26em; text-transform: uppercase;
  color: var(--primary-light);
}
.eyebrow::before { content: ''; width: 34px; height: 2px; background: var(--grad); border-radius: 2px; }

/* ============================= reveal ============================= */

.reveal {
  opacity: 0; transform: translateY(34px);
  transition: opacity 0.9s var(--ease-out), transform 0.9s var(--ease-out);
  transition-delay: var(--d, 0s);
}
.reveal.in { opacity: 1; transform: translateY(0); }

/* ============================= services (pillars) ============================= */

.services { background: linear-gradient(180deg, var(--bg) 0%, var(--bg-soft) 16%, var(--bg-soft) 84%, var(--bg) 100%); }

.pillars {
  display: flex; flex-direction: column;
}

/* — single pillar row — */
.pillar {
  display: grid;
  grid-template-columns: 220px 1fr;
  gap: clamp(32px, 5vw, 72px);
  align-items: start;
  padding: clamp(36px, 5vw, 56px) 0;
  border-bottom: 1px solid var(--line);
  transition: border-color 0.4s;
}
.pillar:first-child { padding-top: 0; }
.pillar:last-child { border-bottom: none; }
.pillar:hover { border-color: var(--line-strong); }

/* — left: label + big title — */
.pillar-head {
  position: sticky; top: 120px;
  display: flex; flex-direction: column; gap: 8px;
}
.pillar-label {
  font-family: var(--font-display);
  font-size: 0.72rem; font-weight: 700;
  letter-spacing: 0.2em; text-transform: uppercase;
  color: var(--muted-2);
}
.pillar-title {
  font-family: var(--font-display);
  font-size: clamp(2.4rem, 5vw, 4rem);
  font-weight: 700; letter-spacing: -0.04em; line-height: 1;
  color: var(--ink);
  transition: color 0.4s;
}
.pillar:hover .pillar-title { color: var(--primary); }

/* — right: description + tags — */
.pillar-body { padding-top: 4px; }
.pillar-desc {
  font-size: 1.1rem; line-height: 1.65; color: var(--ink-2);
  max-width: 52ch; margin-bottom: clamp(24px, 3vw, 36px);
}

/* — service tags — */
.pillar-tags {
  display: flex; flex-wrap: wrap; gap: 10px;
}
.pillar-tags span {
  display: inline-flex; align-items: center;
  font-size: 0.85rem; font-weight: 500;
  color: var(--ink-2);
  background: var(--bg-soft);
  border: 1px solid var(--line);
  border-radius: 999px;
  padding: 8px 18px;
  transition: background 0.3s, border-color 0.3s, color 0.3s, transform 0.3s var(--spring);
}
.pillar-tags span:hover {
  background: var(--tint);
  border-color: rgba(1, 102, 175, 0.25);
  color: var(--primary);
  transform: translateY(-2px);
}

/* ============================= 3D burst ============================= */

.burst-section {
  position: relative;
  height: 80vh;
  min-height: 500px;
  max-height: 800px;
  overflow: hidden;
  display: flex;
  align-items: flex-end;
  justify-content: center;
  background: linear-gradient(180deg, var(--bg-soft) 0%, #e8f0f8 30%, #dce8f4 70%, var(--bg) 100%);
  padding-bottom: 0;
}

.burst-label {
  position: relative;
  z-index: 10;
  text-align: center;
  padding: 0 20px clamp(40px, 6vw, 80px);
}
.burst-label h2 {
  font-family: var(--font-display);
  font-weight: 600;
  font-size: clamp(1.8rem, 4vw, 3rem);
  letter-spacing: -0.026em;
  line-height: 1.08;
  color: var(--ink);
  margin-top: 12px;
}
.burst-label .eyebrow {
  justify-content: center;
}

#burstCanvas {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  z-index: 1;
}

/* ============================= process ============================= */

.steps {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: clamp(16px, 2.4vw, 26px);
  counter-reset: step;
}
.step {
  position: relative;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius-md);
  padding: clamp(24px, 2.6vw, 34px);
  transition: transform 0.45s var(--spring), border-color 0.4s, box-shadow 0.45s;
}
.step:hover {
  transform: translateY(-8px);
  border-color: rgba(1, 102, 175, 0.32);
  box-shadow: var(--shadow-card);
}
.step-num {
  font-family: var(--font-display); font-weight: 700;
  font-size: clamp(2rem, 3.4vw, 2.8rem); letter-spacing: -0.03em; line-height: 1;
  color: rgba(1, 102, 175, 0.16);
  margin-bottom: clamp(28px, 4vw, 48px);
  transition: color 0.4s;
}
.step:hover .step-num { color: var(--primary); }
.step-body h3 {
  font-family: var(--font-display); font-size: 1.15rem; font-weight: 600;
  color: var(--ink); margin-bottom: 10px;
}
.step-body p { color: var(--ink-2); font-size: 0.92rem; line-height: 1.55; }

/* ============================= CTA ============================= */

.cta-section { padding-bottom: clamp(100px, 12vw, 160px); }

.cta-card {
  position: relative; border-radius: 30px;
  padding: clamp(56px, 8vw, 100px) clamp(24px, 6vw, 80px);
  text-align: center; overflow: hidden;
  background: var(--surface);
  border: 1px solid var(--line);
  box-shadow: var(--shadow-card);
}
.cta-glow {
  position: absolute; inset: 0;
  background:
    radial-gradient(55% 75% at 50% 115%, rgba(1, 102, 175, 0.07), transparent 60%);
  pointer-events: none;
}
.cta-eyebrow {
  position: relative;
  display: inline-flex; align-items: center; gap: 10px;
  font-size: 0.76rem; font-weight: 700; letter-spacing: 0.24em; text-transform: uppercase;
  color: var(--primary-light);
  background: var(--tint); border: 1px solid rgba(1, 102, 175, 0.16);
  padding: 8px 16px; border-radius: 999px; margin-bottom: 24px;
}
.cta-card h2 {
  position: relative;
  font-family: var(--font-display); font-weight: 600;
  font-size: clamp(2rem, 4.6vw, 3.6rem);
  letter-spacing: -0.026em; line-height: 1.08;
  color: var(--ink);
}
.cta-card h2 .grad {
  background: var(--grad);
  -webkit-background-clip: text; background-clip: text; color: transparent;
}
.cta-sub { position: relative; margin: 18px auto 0; max-width: 44ch; color: var(--ink-2); font-size: 1.05rem; }
.cta-actions { position: relative; margin-top: 38px; display: flex; justify-content: center; gap: 14px; flex-wrap: wrap; align-items: center; }
.cta-note { position: relative; margin-top: 22px; font-size: 0.88rem; color: var(--muted-2); }
.cta-note a { color: var(--primary-light); border-bottom: 1px solid rgba(1, 102, 175, 0.3); transition: color 0.25s, border-color 0.25s; }
.cta-note a:hover { color: var(--primary-dark); border-color: var(--primary); }

/* ============================= footer ============================= */

.footer {
  position: relative; z-index: 2;
  border-top: 1px solid var(--line);
  padding: clamp(40px, 5vw, 64px) clamp(20px, 5vw, 64px) 40px;
  background: var(--surface);
}
.footer-inner { max-width: 1240px; margin: 0 auto; }
.footer-top {
  display: flex; align-items: center; justify-content: space-between;
  gap: 24px; flex-wrap: wrap;
  padding-bottom: clamp(28px, 4vw, 44px);
}
.footer-brand {
  display: flex; align-items: center; gap: 12px;
  font-family: var(--font-display); font-weight: 600; font-size: 1.05rem; color: var(--ink);
}
.footer-brand .mark { width: 34px; height: 34px; border-radius: 9px; object-fit: cover; }
.footer-mail {
  display: inline-flex; align-items: center; gap: 10px;
  font-family: var(--font-display); font-weight: 600;
  font-size: clamp(1.3rem, 3vw, 2rem); letter-spacing: -0.02em; color: var(--ink);
  transition: color 0.3s;
}
.footer-mail svg { width: 0.85em; height: 0.85em; color: var(--primary); transition: transform 0.3s var(--ease-out); }
.footer-mail:hover { color: var(--primary); }
.footer-mail:hover svg { transform: translate(3px, -3px); }
.footer-bottom {
  display: flex; align-items: center; justify-content: space-between;
  gap: 20px; flex-wrap: wrap;
  padding-top: 24px; border-top: 1px solid var(--line);
}
.footer-links { display: flex; gap: 26px; flex-wrap: wrap; align-items: center; }
.footer-links a { font-size: 0.9rem; color: var(--muted-2); transition: color 0.25s; }
.footer-links a:hover { color: var(--primary-light); }
.footer-copy { font-size: 0.82rem; color: var(--muted-2); }

/* ============================= responsive ============================= */

@media (max-width: 1060px) {
  .steps { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 768px) {
  .pillar { grid-template-columns: 1fr; gap: 16px; }
  .pillar-head { position: static; }
}
@media (max-width: 640px) {
  .nav-links a:not(.btn) { display: none; }
  .hero { padding-bottom: 120px; }
  .hero-title { font-size: clamp(2.6rem, 13vw, 3.4rem); }
  .steps { grid-template-columns: 1fr; }
  .step-num { margin-bottom: 16px; }
  .footer-top, .footer-bottom { justify-content: center; text-align: center; }
}

/* ============================= reduced motion ============================= */

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