@import url("https://fonts.googleapis.com/css2?family=Outfit:wght@300;400;600;800&display=swap");
@import url("https://fonts.googleapis.com/css2?family=Inter:wght@400;700;900&display=swap");

:root {
  --c-cream: #fff6e0;
  --c-light-gray: #d8d9da;
  --c-muted-blue: #61677a;
  --c-dark-gray: #272829;
  --c-teal: #5f9598;
  --c-teal-bright: #7ab8bc;
  --c-steel: #1d546d;
  --c-obsidian: #000000;
  --primary: #5f9598;
  --primary-glow: rgba(95, 149, 152, 0.25);
  --primary-bright: #7ab8bc;
  --bg-deep: #000000;
  --bg-surface: #080808;
  --bg-card: #0c0c0c;
  --text-primary: #fff6e0;
  --text-dim: #a0a4ad;
  --text-muted: #4a4e57;
  --border-subtle: rgba(255,255,255,0.05);
  --border-primary: rgba(95,149,152,0.3);
  --space-xs: clamp(0.5rem, 1vw, 0.75rem);
  --space-xl: clamp(5rem, 10vw, 8rem);
  --font-inter: "Inter", sans-serif;
  --ease-out-expo: cubic-bezier(0.16, 1, 0.3, 1);
  --ease-in-out: cubic-bezier(0.4, 0, 0.2, 1);
}

/* ── Reset ── */
*, *::before, *::after { margin:0; padding:0; box-sizing:border-box; -webkit-font-smoothing:antialiased; }
html { scroll-behavior:smooth; font-size:16px; background:var(--bg-deep); }
body { color:var(--text-primary); font-family:var(--font-inter); line-height:1.5; overflow-x:hidden; background:var(--bg-deep); letter-spacing:-0.02em; cursor:none; }

/* ── Custom Cursor ── */
#cursor-dot, #cursor-ring {
  position:fixed; border-radius:50%; pointer-events:none; z-index:99999; transform:translate(-50%,-50%);
  transition:opacity 0.3s ease;
}
#cursor-dot { width:6px; height:6px; background:var(--primary); top:0; left:0; }
#cursor-ring {
  width:36px; height:36px; border:1.5px solid rgba(95,149,152,0.6);
  top:0; left:0; transition:width 0.25s var(--ease-out-expo), height 0.25s var(--ease-out-expo), border-color 0.25s ease, background 0.25s ease;
}
#cursor-ring.hovered { width:52px; height:52px; border-color:var(--primary); background:rgba(95,149,152,0.08); }
#cursor-ring.clicking { width:24px; height:24px; background:rgba(95,149,152,0.2); }
body * { cursor:none !important; }

/* ── Scroll Progress Bar ── */
#scroll-progress {
  position:fixed; top:0; left:0; height:2px; width:0%; z-index:10000;
  background:linear-gradient(90deg, var(--c-steel), var(--primary), var(--primary-bright));
  transition:width 0.05s linear;
  box-shadow:0 0 8px var(--primary);
}

/* ── Background Mesh ── */
.mesh-bg { position:fixed; inset:0; z-index:-2; overflow:hidden; pointer-events:none; }
.blob { position:absolute; width:60vw; height:60vw; filter:blur(120px); border-radius:50%; opacity:0.08; will-change:transform; }
.blob-1 { top:-10%; left:-10%; background:var(--c-steel); animation:drift 30s linear infinite; }
.blob-2 { bottom:-10%; right:-10%; background:var(--primary); animation:drift 35s linear infinite reverse; }
@keyframes drift {
  0%   { transform:translate(0,0) scale(1); }
  33%  { transform:translate(5%,10%) scale(1.1); }
  100% { transform:translate(0,0) scale(1); }
}

/* ── Container ── */
.container { width:min(100% - 3rem, 1280px); margin-inline:auto; }

/* ── Loader ── */
.loader-container {
  position:fixed; inset:0; background:#000; z-index:9999;
  display:flex; flex-direction:column; align-items:center; justify-content:center;
  transition:opacity 0.8s ease;
}
.loader-logo { font-size:1.2rem; font-weight:900; letter-spacing:0.3em; color:var(--text-primary); margin-bottom:2.5rem; opacity:0.4; }
.spinner {
  width:44px; height:44px; border:2px solid rgba(255,255,255,0.06);
  border-top-color:var(--primary); border-radius:50%; animation:spin 0.9s linear infinite; margin-bottom:1.5rem;
}
@keyframes spin { to { transform:rotate(360deg); } }
.loader-text { font-size:0.65rem; letter-spacing:0.25em; color:var(--text-muted); text-transform:uppercase; }

/* ── Navigation ── */
nav {
  position:fixed; top:1.5rem; left:50%; transform:translateX(-50%);
  width:min(calc(100% - 2rem), 1100px); z-index:1000;
  padding:0.875rem 2rem; border-radius:100px;
  background:rgba(0,0,0,0.6); backdrop-filter:blur(24px) saturate(180%);
  border:1px solid var(--border-subtle);
  display:flex; justify-content:space-between; align-items:center;
  transition:all 0.4s var(--ease-in-out);
}
nav.scrolled { background:rgba(0,0,0,0.85); border-color:rgba(95,149,152,0.12); box-shadow:0 8px 40px rgba(0,0,0,0.5); }

.logo {
  font-family:var(--font-inter); font-size:1.5rem; font-weight:900;
  letter-spacing:-0.05em; text-transform:uppercase; color:var(--text-primary);
  z-index:1001; display:flex; align-items:center; user-select:none;
}

.nav-links { display:flex; gap:2rem; align-items:center; }
.nav-links a {
  color:var(--text-dim); text-decoration:none; font-size:0.7rem; font-weight:700;
  letter-spacing:0.12em; text-transform:uppercase; position:relative; padding-bottom:2px;
  transition:color 0.3s ease;
}
.nav-links a::after {
  content:''; position:absolute; bottom:0; left:0; width:0; height:1px;
  background:var(--primary); transition:width 0.35s var(--ease-out-expo);
}
.nav-links a:hover { color:var(--text-primary); }
.nav-links a:hover::after { width:100%; }

/* Nav CTA */
.nav-cta {
  padding:0.5rem 1.25rem; border-radius:100px;
  border:1px solid var(--border-primary); color:var(--primary) !important;
  font-size:0.65rem !important; letter-spacing:0.15em !important;
  transition:background 0.3s ease, color 0.3s ease !important;
}
.nav-cta::after { display:none !important; }
.nav-cta:hover { background:var(--primary) !important; color:#000 !important; }

/* ── Hamburger ── */
.menu-toggle { display:none; flex-direction:column; gap:5px; cursor:none; z-index:1001; background:none; border:none; padding:10px; }
.menu-toggle span { display:block; width:25px; height:2px; background:var(--text-primary); transition:0.3s; border-radius:2px; }

/* ── Scroll Sequence ── */
.scroll-sequence-container { height:800vh; position:relative; background:#000; }
#sequence-canvas { position:sticky; top:0; width:100vw; height:100vh; z-index:1; }
.story-overlay {
  position:sticky; top:0; height:100vh; width:100%; display:flex; align-items:center;
  padding:0 10vw; z-index:2; pointer-events:none; opacity:0;
  transition:opacity 0.5s var(--ease-out-expo);
}
.story-title { font-size:clamp(2.5rem,12vw,8rem); font-weight:900; letter-spacing:-0.06em; width:100%; text-align:center; line-height:0.9; }
.story-sub { font-size:clamp(1.8rem,8vw,5rem); font-weight:900; letter-spacing:-0.04em; max-width:15ch; line-height:1; }
[data-frame="start"]        { justify-content:center; }
[data-frame="middle-left"]  { justify-content:flex-start; text-align:left; }
[data-frame="middle-right"] { justify-content:flex-end; text-align:right; }
[data-frame="end"]          { justify-content:center; }
.story-overlay.visible { opacity:1; }

/* ── Sections ── */
.section {
  padding-block:var(--space-xl); position:relative; z-index:10;
  background:var(--bg-deep); box-shadow:0 -100px 100px 50px rgba(0,0,0,0.8);
}

/* ── Section Titles ── */
.section-title { margin-bottom:4rem; }
.section-title .label {
  font-size:0.65rem; font-weight:700; letter-spacing:0.25em; text-transform:uppercase;
  color:var(--primary); margin-bottom:0.75rem; display:block;
}
.section-title h2 {
  font-size:clamp(2rem,5vw,3.5rem); font-weight:800; letter-spacing:-0.04em;
  line-height:1.05; position:relative; display:inline-block;
}
.section-title h2::after {
  content:''; position:absolute; bottom:-12px; left:0; height:2px; width:0;
  background:linear-gradient(90deg, var(--primary), transparent);
  transition:width 1.2s var(--ease-out-expo);
}
.section-title.active h2::after { width:100%; }

/* ── Directives Grid ── */
.grid-base {
  display:grid; gap:1.5rem;
  grid-template-columns:repeat(auto-fit, minmax(min(100%, 300px), 1fr));
}

.card {
  background:var(--bg-card); padding:2.5rem; border-radius:8px;
  border:1px solid var(--border-subtle); position:relative; overflow:hidden;
  transition:transform 0.4s var(--ease-in-out), border-color 0.4s ease, box-shadow 0.4s ease;
}
.card::before {
  content:''; position:absolute; inset:0; opacity:0;
  background:radial-gradient(circle at top left, var(--primary-glow), transparent 60%);
  transition:opacity 0.4s ease;
}
.card:hover { transform:translateY(-6px); border-color:var(--border-primary); box-shadow:0 20px 60px rgba(0,0,0,0.4); }
.card:hover::before { opacity:1; }

.feature-icon {
  width:48px; height:48px; border-radius:10px; display:flex; align-items:center; justify-content:center;
  background:rgba(95,149,152,0.1); border:1px solid var(--border-primary);
  color:var(--primary); font-size:1.2rem; margin-bottom:1.5rem;
  transition:background 0.3s ease, transform 0.3s ease;
}
.card:hover .feature-icon { background:rgba(95,149,152,0.2); transform:scale(1.1) rotate(5deg); }

.card h3 { font-size:0.75rem; font-weight:800; letter-spacing:0.15em; text-transform:uppercase; margin-bottom:1rem; color:var(--text-primary); }

/* ── Projects ── */
.projects-grid {
  display:grid; gap:1.5rem;
  grid-template-columns:repeat(auto-fit, minmax(min(100%, 480px), 1fr));
}

.project-card {
  background:var(--bg-card); border:1px solid var(--border-subtle); border-radius:8px;
  overflow:hidden; position:relative;
  transition:transform 0.4s var(--ease-in-out), border-color 0.4s ease, box-shadow 0.4s ease;
}
.project-card:hover { transform:translateY(-4px); border-color:var(--border-primary); box-shadow:0 20px 50px rgba(0,0,0,0.5); }

.project-media { width:100%; aspect-ratio:16/9; background:var(--bg-deep); overflow:hidden; position:relative; }
.project-media img, .project-media video { width:100%; height:100%; object-fit:cover; will-change:transform; transition:transform 0.7s var(--ease-in-out); }
.project-card:hover .project-media img { transform:scale(1.07); }

/* Image overlay on hover */
.project-media::after {
  content:''; position:absolute; inset:0;
  background:linear-gradient(135deg, rgba(95,149,152,0.15) 0%, rgba(0,0,0,0.5) 100%);
  opacity:0; transition:opacity 0.4s ease;
}
.project-card:hover .project-media::after { opacity:1; }

/* View project icon overlay */
.project-view-icon {
  position:absolute; top:50%; left:50%; transform:translate(-50%,-50%) scale(0.7);
  width:52px; height:52px; border-radius:50%; background:rgba(0,0,0,0.7);
  border:1px solid rgba(95,149,152,0.5); color:var(--primary);
  display:flex; align-items:center; justify-content:center; font-size:1rem;
  opacity:0; transition:opacity 0.4s ease, transform 0.4s var(--ease-out-expo);
  z-index:2;
}
.project-card:hover .project-view-icon { opacity:1; transform:translate(-50%,-50%) scale(1); }

.project-info { padding:1.75rem 2rem 2rem; }
.project-info h3 { font-size:0.8rem; font-weight:800; letter-spacing:0.12em; text-transform:uppercase; margin-bottom:0.6rem; }
.project-info p { font-size:0.875rem; color:var(--text-dim); line-height:1.6; margin-bottom:1.25rem; }

.project-link {
  color:var(--primary); text-decoration:none; font-weight:700; font-size:0.7rem;
  text-transform:uppercase; letter-spacing:0.12em;
  display:inline-flex; align-items:center; gap:0.5rem;
  transition:gap 0.3s ease, color 0.3s ease;
}
.project-link:hover { gap:0.9rem; color:var(--primary-bright); }

/* ── Audit / Testimonials ── */
.audit-grid {
  display:grid; gap:1.5rem;
  grid-template-columns:repeat(auto-fit, minmax(min(100%, 380px), 1fr));
}

.audit-card {
  padding:2.5rem; background:var(--bg-card); border-radius:8px;
  border:1px solid var(--border-subtle);
  display:flex; flex-direction:column; justify-content:space-between;
  position:relative; overflow:hidden;
  transition:transform 0.4s var(--ease-in-out), border-color 0.4s ease, box-shadow 0.4s ease;
}
.audit-card::before {
  content:'\201C'; position:absolute; top:-0.25rem; left:1.5rem;
  font-size:6rem; font-weight:900; color:var(--primary); opacity:0.07;
  line-height:1; pointer-events:none; font-family:Georgia, serif;
}
.audit-card:hover { transform:translateY(-4px); border-color:var(--border-primary); box-shadow:0 0 40px rgba(95,149,152,0.1); }

.audit-stars { display:flex; gap:3px; margin-bottom:1rem; }
.audit-stars i { color:var(--primary); font-size:0.7rem; }

.audit-text { font-size:clamp(0.95rem,1.3vw,1.1rem); margin-bottom:2rem; color:var(--text-primary); line-height:1.7; font-style:italic; }

.audit-user { display:flex; align-items:center; gap:1rem; }
.char-container {
  width:3.25rem; height:3.25rem; border-radius:50%; overflow:hidden;
  background:var(--bg-deep); border:1.5px solid var(--primary); flex-shrink:0;
  transition:transform 0.4s var(--ease-out-expo), box-shadow 0.4s ease;
}
.audit-card:hover .char-container { transform:scale(1.12) rotate(4deg); box-shadow:0 0 16px var(--primary-glow); }
.char-anim { width:100%; height:100%; object-fit:cover; }

/* ── Reveal Animations ── */
.reveal { opacity:0; transform:translateY(24px); will-change:transform,opacity; transition:transform 0.9s var(--ease-out-expo), opacity 0.9s ease; }
.reveal.active { opacity:1; transform:translateY(0); }
.reveal.delay-1 { transition-delay:0.1s; }
.reveal.delay-2 { transition-delay:0.2s; }
.reveal.delay-3 { transition-delay:0.3s; }

/* ── Footer ── */
footer {
  padding-block:5rem 3rem; border-top:1px solid var(--border-subtle);
  background:#000; position:relative; overflow:hidden;
}
footer::before {
  content:''; position:absolute; top:-200px; left:50%; transform:translateX(-50%);
  width:600px; height:400px; background:radial-gradient(circle, rgba(95,149,152,0.05), transparent 70%);
  pointer-events:none;
}
.footer-inner { display:flex; flex-direction:column; align-items:center; gap:2.5rem; position:relative; }
.footer-cta {
  display:inline-flex; align-items:center; gap:0.75rem;
  padding:1rem 2.5rem; border-radius:100px;
  border:1px solid var(--border-primary); color:var(--primary);
  text-decoration:none; font-size:0.75rem; font-weight:700; letter-spacing:0.15em; text-transform:uppercase;
  transition:background 0.35s ease, color 0.35s ease, box-shadow 0.35s ease, transform 0.35s ease;
}
.footer-cta:hover { background:var(--primary); color:#000; box-shadow:0 0 30px var(--primary-glow); transform:translateY(-2px); }
.footer-social { display:flex; gap:1rem; }
.footer-social a {
  width:40px; height:40px; border-radius:50%; border:1px solid var(--border-subtle);
  display:flex; align-items:center; justify-content:center;
  color:var(--text-dim); font-size:0.9rem; text-decoration:none;
  transition:border-color 0.3s ease, color 0.3s ease, transform 0.3s ease, background 0.3s ease;
}
.footer-social a:hover { border-color:var(--primary); color:var(--primary); background:rgba(95,149,152,0.08); transform:translateY(-3px); }
.footer-divider { width:100%; height:1px; background:var(--border-subtle); }
.footer-bottom { display:flex; justify-content:space-between; align-items:center; width:100%; flex-wrap:wrap; gap:1rem; }
.footer-bottom p { color:var(--text-muted); font-size:0.65rem; letter-spacing:0.2em; text-transform:uppercase; }
.footer-bottom-links { display:flex; gap:2rem; }
.footer-bottom-links a { color:var(--text-muted); font-size:0.65rem; letter-spacing:0.12em; text-transform:uppercase; text-decoration:none; transition:color 0.3s ease; }
.footer-bottom-links a:hover { color:var(--primary); }

/* ── Responsive ── */
@media (max-width:768px) {
  .menu-toggle { display:flex; }
  .nav-links {
    position:fixed; top:0; right:-100%; width:100%; height:100vh; background:#000;
    flex-direction:column; justify-content:center; align-items:center;
    transition:0.5s var(--ease-in-out); gap:3rem;
  }
  .nav-links.active { right:0; }
  .nav-links a { font-size:1.2rem; }
  nav { top:0; width:100%; border-radius:0; border-inline:0; }
  .menu-toggle.active span:nth-child(1) { transform:translateY(7px) rotate(45deg); }
  .menu-toggle.active span:nth-child(2) { opacity:0; }
  .menu-toggle.active span:nth-child(3) { transform:translateY(-7px) rotate(-45deg); }
  .story-overlay { padding:0 5vw; justify-content:center !important; text-align:center !important; }
  .story-sub { max-width:100%; }
  #sequence-canvas { object-fit:cover; }
  .footer-bottom { flex-direction:column; align-items:center; text-align:center; }
  #cursor-dot, #cursor-ring { display:none; }
  body * { cursor:auto !important; }
  body { cursor:auto; }
}