/* =========================================================================
   Kuduza AI Lab — main stylesheet
   Dark, cinematic, AI-lab aesthetic.
   ========================================================================= */

/* ---------- Reset & base ---------- */
*, *::before, *::after { box-sizing: border-box; }
html, body { margin: 0; padding: 0; }
img { display: block; max-width: 100%; height: auto; }
a { color: inherit; text-decoration: none; }
button { font: inherit; color: inherit; background: none; border: none; cursor: pointer; }

:root {
  --bg:          #0a0a10;
  --bg-2:        #12121a;
  --bg-3:        #1a1a26;
  --border:      rgba(255, 255, 255, 0.08);
  --border-2:    rgba(255, 255, 255, 0.14);
  --text:        #f0f0f5;
  --text-muted:  #9ca3af;
  --text-dim:    #6b7280;
  --accent:      #8e7ad3;        /* Kuduza purple  (K left bar)    */
  --accent-2:    #3ec5c8;        /* Kuduza cyan    (K triangle)   */
  --accent-3:    #b6a4e8;        /* Kuduza purple 300 (lighter)   */
  --gradient:    linear-gradient(135deg, #8e7ad3 0%, #3ec5c8 100%);
  --gradient-soft: linear-gradient(135deg, rgba(142,122,211,0.20) 0%, rgba(62,197,200,0.20) 100%);
  --font:        'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, system-ui, sans-serif;
  --font-display: 'Space Grotesk', 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', system-ui, sans-serif;
  --maxw:        1200px;
  --radius:      14px;
  --shadow-lg:   0 24px 60px rgba(0, 0, 0, 0.45);
  --ease:        cubic-bezier(0.22, 1, 0.36, 1);
}

html { scroll-behavior: smooth; }

body {
  font-family: var(--font);
  font-size: 16px;
  line-height: 1.6;
  color: var(--text);
  background: var(--bg);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  overflow-x: hidden;
}

/* Subtle grain layer for premium feel */
body::before {
  content: "";
  position: fixed; inset: 0;
  pointer-events: none;
  z-index: 1;
  opacity: 0.04;
  background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='180' height='180'><filter id='n'><feTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='2' stitchTiles='stitch'/><feColorMatrix values='0 0 0 0 1  0 0 0 0 1  0 0 0 0 1  0 0 0 0.6 0'/></filter><rect width='100%' height='100%' filter='url(%23n)'/></svg>");
}

/* Starfield in deep background */
body::after {
  content: "";
  position: fixed; inset: 0;
  pointer-events: none;
  z-index: 0;
  background:
    radial-gradient(1px 1px at 12% 18%,  rgba(255,255,255,0.7), transparent 60%),
    radial-gradient(1px 1px at 28% 72%,  rgba(255,255,255,0.5), transparent 60%),
    radial-gradient(1px 1px at 47% 33%,  rgba(255,255,255,0.6), transparent 60%),
    radial-gradient(1px 1px at 63% 88%,  rgba(255,255,255,0.4), transparent 60%),
    radial-gradient(1px 1px at 78% 12%,  rgba(255,255,255,0.7), transparent 60%),
    radial-gradient(1px 1px at 91% 51%,  rgba(255,255,255,0.5), transparent 60%),
    radial-gradient(2px 2px at 35% 47%,  rgba(142,122,211,0.5), transparent 60%),
    radial-gradient(2px 2px at 82% 67%,  rgba(62,197,200,0.5), transparent 60%);
}

main, header, footer { position: relative; z-index: 2; }

/* ---------- Typography ---------- */
h1, h2, h3, h4 {
  font-family: var(--font-display);
  font-weight: 700;
  line-height: 1.1;
  letter-spacing: -0.02em;
  margin: 0 0 0.5em 0;
  color: var(--text);
}
h1 { font-size: clamp(2.4rem, 6vw, 4.5rem); font-weight: 800; letter-spacing: -0.03em; }
h2 { font-size: clamp(1.8rem, 4vw, 2.8rem); }
h3 { font-size: 1.25rem; letter-spacing: 0; }
p  { margin: 0 0 1em 0; color: var(--text-muted); }
.lead { font-size: 1.15rem; color: var(--text); line-height: 1.55; }
.text-muted { color: var(--text-muted); }
.eyebrow {
  display: inline-block;
  font-family: var(--font);
  font-size: 0.75rem;
  font-weight: 600;
  letter-spacing: 0.28em;
  text-transform: uppercase;
  color: var(--accent);
  margin-bottom: 1.25rem;
}
.gradient-text {
  background: var(--gradient);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
  color: transparent;
}

/* ---------- Layout helpers ---------- */
.container {
  max-width: var(--maxw);
  margin: 0 auto;
  padding: 0 24px;
}
@media (min-width: 768px) {
  .container { padding: 0 48px; }
}
.section {
  padding: 96px 0;
  position: relative;
}
@media (max-width: 768px) {
  .section { padding: 64px 0; }
}

/* ---------- Header / nav ---------- */
.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  backdrop-filter: blur(14px) saturate(140%);
  -webkit-backdrop-filter: blur(14px) saturate(140%);
  background: rgba(10, 10, 16, 0.6);
  border-bottom: 1px solid var(--border);
}
.site-header__inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 72px;
}
.logo {
  display: flex;
  align-items: center;
  gap: 10px;
  font-family: var(--font-display);
  font-weight: 700;
  letter-spacing: 0.18em;
  font-size: 0.9rem;
  color: var(--text);
  transition: opacity 0.2s var(--ease);
}
.logo:hover { opacity: 0.85; }
.logo img { height: 50px; width: auto; }

.nav {
  display: flex;
  align-items: center;
  gap: 36px;
}
.nav__link {
  font-size: 0.9rem;
  font-weight: 500;
  color: var(--text-muted);
  position: relative;
  padding: 6px 0;
  transition: color 0.2s var(--ease);
}
.nav__link:hover { color: var(--text); }
.nav__link.active { color: var(--text); }
.nav__link.active::after {
  content: "";
  position: absolute;
  left: 0; right: 0; bottom: -2px;
  height: 2px;
  background: var(--gradient);
  border-radius: 2px;
}

.lang-switch {
  display: flex;
  align-items: center;
  gap: 6px;
  margin-left: 8px;
  padding: 4px 10px;
  border: 1px solid var(--border-2);
  border-radius: 999px;
  font-size: 0.78rem;
  font-weight: 600;
  letter-spacing: 0.1em;
}
.lang-switch a {
  color: var(--text-muted);
  padding: 2px 6px;
  border-radius: 6px;
  transition: color 0.2s var(--ease), background 0.2s var(--ease);
}
.lang-switch a:hover { color: var(--text); }
.lang-switch a.active {
  color: var(--text);
  background: rgba(255, 255, 255, 0.06);
}
.lang-switch .sep { color: var(--text-dim); }

@media (max-width: 640px) {
  .nav { gap: 18px; }
  .nav__link { font-size: 0.85rem; }
  .lang-switch { margin-left: 0; }
  .logo img { height: 40px; }
}

/* ---------- Hero ---------- */
.hero {
  position: relative;
  min-height: 88vh;
  display: flex;
  align-items: center;
  overflow: hidden;
  isolation: isolate;
}
.hero__bg {
  position: absolute; inset: 0;
  background-image: url("../img/hero.jpg");
  background-size: cover;
  background-position: center;
  z-index: -2;
  transform: scale(1.04);
}
.hero__overlay {
  position: absolute; inset: 0;
  z-index: -1;
  background:
    linear-gradient(180deg,
      rgba(10, 10, 16, 0.55) 0%,
      rgba(10, 10, 16, 0.85) 50%,
      rgba(10, 10, 16, 0.95) 100%),
    linear-gradient(90deg,
      rgba(10, 10, 16, 0.85) 0%,
      rgba(10, 10, 16, 0.35) 60%,
      rgba(10, 10, 16, 0.15) 100%);
}
.hero__inner {
  width: 100%;
  padding: 80px 0;
}
.hero h1 {
  max-width: 18ch;
  margin-bottom: 28px;
}
.hero p.lead {
  max-width: 56ch;
  margin-bottom: 40px;
  color: rgba(240, 240, 245, 0.85);
}
.hero__actions {
  display: flex;
  flex-wrap: wrap;
  gap: 14px;
}

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 14px 26px;
  border-radius: 999px;
  font-weight: 600;
  font-size: 0.95rem;
  letter-spacing: 0.01em;
  transition: transform 0.2s var(--ease), box-shadow 0.2s var(--ease), background 0.2s var(--ease), border-color 0.2s var(--ease);
  cursor: pointer;
  border: 1px solid transparent;
}
.btn:hover { transform: translateY(-1px); }
.btn--primary {
  background: var(--gradient);
  color: #0a0a10;
  box-shadow: 0 10px 30px rgba(167, 139, 250, 0.35);
}
.btn--primary:hover { box-shadow: 0 16px 40px rgba(167, 139, 250, 0.5); }
.btn--ghost {
  background: rgba(255, 255, 255, 0.04);
  color: var(--text);
  border-color: var(--border-2);
}
.btn--ghost:hover { background: rgba(255, 255, 255, 0.08); border-color: rgba(255,255,255,0.24); }
.btn .arrow { transition: transform 0.2s var(--ease); }
.btn:hover .arrow { transform: translateX(3px); }

/* ---------- Section: What we do ---------- */
.work {
  background:
    radial-gradient(60% 80% at 80% 0%, rgba(34, 211, 238, 0.06) 0%, transparent 60%),
    radial-gradient(50% 70% at 0% 100%, rgba(167, 139, 250, 0.08) 0%, transparent 60%),
    var(--bg);
}
.work__head {
  max-width: 720px;
  margin-bottom: 56px;
}
.work__grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 20px;
}
@media (max-width: 900px) {
  .work__grid { grid-template-columns: 1fr; }
}
.work__card {
  position: relative;
  padding: 32px 28px;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: linear-gradient(180deg, rgba(255,255,255,0.02) 0%, rgba(255,255,255,0.005) 100%);
  transition: border-color 0.3s var(--ease), transform 0.3s var(--ease), background 0.3s var(--ease);
  overflow: hidden;
}
.work__card::before {
  content: "";
  position: absolute;
  inset: -1px;
  background: var(--gradient);
  opacity: 0;
  z-index: -1;
  border-radius: var(--radius);
  transition: opacity 0.3s var(--ease);
  filter: blur(20px);
}
.work__card:hover {
  border-color: rgba(167, 139, 250, 0.4);
  transform: translateY(-3px);
}
.work__card:hover::before { opacity: 0.25; }
.work__card h3 {
  font-size: 1.15rem;
  margin-bottom: 12px;
  color: var(--text);
}
.work__card p {
  font-size: 0.95rem;
  margin: 0;
  color: var(--text-muted);
}
.work__card .icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 44px;
  height: 44px;
  border-radius: 10px;
  background: var(--gradient-soft);
  border: 1px solid var(--border-2);
  margin-bottom: 18px;
  color: var(--accent);
}
.work__card .icon svg { width: 22px; height: 22px; }

/* ---------- Section: Current project (teaser) ---------- */
.project-tease {
  position: relative;
  padding: 120px 0;
  overflow: hidden;
  isolation: isolate;
}
.project-tease__bg {
  position: absolute; inset: 0;
  background-image: url("../img/section-bg.jpg");
  background-size: cover;
  background-position: center;
  z-index: -2;
  opacity: 0.45;
}
.project-tease__overlay {
  position: absolute; inset: 0;
  z-index: -1;
  background:
    linear-gradient(180deg, rgba(10,10,16,0.7) 0%, rgba(10,10,16,0.92) 50%, rgba(10,10,16,1) 100%);
}
.project-tease__inner {
  max-width: 760px;
  text-align: center;
  margin: 0 auto;
}
.project-tease h2 {
  font-size: clamp(2rem, 5vw, 3.4rem);
  margin-bottom: 20px;
}
.project-tease p {
  font-size: 1.1rem;
  color: var(--text);
  margin-bottom: 36px;
}
.project-tease .badge {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 6px 14px;
  border-radius: 999px;
  background: rgba(167, 139, 250, 0.12);
  border: 1px solid rgba(167, 139, 250, 0.3);
  color: var(--accent-3);
  font-size: 0.75rem;
  font-weight: 600;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  margin-bottom: 24px;
}
.project-tease .badge .pulse {
  width: 7px; height: 7px;
  border-radius: 50%;
  background: var(--accent);
  box-shadow: 0 0 0 0 rgba(167, 139, 250, 0.6);
  animation: pulse 2s infinite;
}
@keyframes pulse {
  0%   { box-shadow: 0 0 0 0   rgba(167, 139, 250, 0.6); }
  70%  { box-shadow: 0 0 0 10px rgba(167, 139, 250, 0); }
  100% { box-shadow: 0 0 0 0   rgba(167, 139, 250, 0); }
}

/* ---------- Section: Manifesto / pull quote ---------- */
.manifesto {
  background: var(--bg-2);
  border-top: 1px solid var(--border);
  border-bottom: 1px solid var(--border);
}
.manifesto__quote {
  max-width: 880px;
  margin: 0 auto;
  text-align: center;
  font-family: var(--font-display);
  font-weight: 500;
  font-size: clamp(1.4rem, 3vw, 2.1rem);
  line-height: 1.4;
  color: var(--text);
  letter-spacing: -0.01em;
}
.manifesto__quote .accent {
  background: var(--gradient);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
  color: transparent;
}

/* ---------- Footer ---------- */
.site-footer {
  padding: 64px 0 40px;
  border-top: 1px solid var(--border);
  background: linear-gradient(180deg, var(--bg) 0%, #050509 100%);
}
.site-footer__inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 32px;
  flex-wrap: wrap;
}
.site-footer__brand {
  display: flex;
  align-items: center;
  gap: 12px;
  color: var(--text-muted);
  font-size: 0.9rem;
}
.site-footer__brand img { height: 39px; width: auto; opacity: 0.85; }
.site-footer__email {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 0.9rem;
  color: var(--text-muted);
}
.site-footer__email .email-img {
  height: 24px;
  width: auto;
  image-rendering: -webkit-optimize-contrast;
  filter: brightness(0.95);
  transition: filter 0.2s var(--ease);
}
.site-footer__email:hover .email-img { filter: brightness(1.15); }
.site-footer__copy {
  width: 100%;
  text-align: center;
  font-size: 0.78rem;
  color: var(--text-dim);
  margin-top: 40px;
  padding-top: 28px;
  border-top: 1px solid var(--border);
}

/* ---------- Project (under development) page ---------- */
.underdev {
  min-height: 80vh;
  display: flex;
  align-items: center;
  position: relative;
  isolation: isolate;
  overflow: hidden;
}
.underdev__bg {
  position: absolute; inset: 0;
  background-image: url("../img/section-bg.jpg");
  background-size: cover;
  background-position: center;
  z-index: -2;
  opacity: 0.35;
}
.underdev__overlay {
  position: absolute; inset: 0;
  z-index: -1;
  background: linear-gradient(180deg,
    rgba(10,10,16,0.6) 0%,
    rgba(10,10,16,0.85) 60%,
    rgba(10,10,16,1) 100%);
}
.underdev__inner {
  text-align: center;
  width: 100%;
  padding: 80px 0;
}
.underdev h1 {
  font-size: clamp(2.6rem, 7vw, 5rem);
  margin-bottom: 28px;
  background: var(--gradient);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
  color: transparent;
  letter-spacing: -0.04em;
}
.underdev p {
  max-width: 56ch;
  margin: 0 auto 14px;
  font-size: 1.1rem;
  color: var(--text);
}
.underdev p.muted { color: var(--text-muted); font-size: 1rem; }
.underdev__pulse {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  padding: 8px 20px;
  border-radius: 999px;
  background: rgba(167, 139, 250, 0.08);
  border: 1px solid rgba(167, 139, 250, 0.3);
  font-size: 0.75rem;
  font-weight: 600;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--accent-3);
  margin-top: 32px;
}
.underdev__pulse .dot {
  width: 8px; height: 8px; border-radius: 50%;
  background: var(--accent);
  box-shadow: 0 0 0 0 rgba(167, 139, 250, 0.7);
  animation: pulse 2.2s infinite;
}

/* ---------- Reveal animation (CSS only) ---------- */
@media (prefers-reduced-motion: no-preference) {
  .reveal { opacity: 0; transform: translateY(20px); transition: opacity 0.8s var(--ease), transform 0.8s var(--ease); }
  .reveal.is-visible { opacity: 1; transform: none; }
}

/* ---------- Selection ---------- */
::selection { background: rgba(167, 139, 250, 0.35); color: #fff; }

/* ---------- Scrollbar (subtle) ---------- */
::-webkit-scrollbar { width: 10px; height: 10px; }
::-webkit-scrollbar-track { background: var(--bg); }
::-webkit-scrollbar-thumb { background: var(--bg-3); border-radius: 6px; }
::-webkit-scrollbar-thumb:hover { background: #252533; }
