/* ==========================================================
   Kalpokotha — Stylesheet
   1. Variables & Reset
   2. Base
   3. Background canvas
   4. Navbar
   5. Hero
   6. Software section
   7. Animations
   8. Responsive (tablet, mobile, small mobile)
   ========================================================== */


/* ---------- 1. Variables & Reset ---------- */
:root {
  --bg: #000;
  --text: #d4d4d8;
  --text-bright: #e4e4e7;
  --text-muted: #a1a1aa;
  --border: #26262c;
  --accent: #6366f1;
  --accent-2: #8b5cf6;
  --pad-x: clamp(20px, 7vw, 100px);
}

* { margin: 0; padding: 0; box-sizing: border-box; }


/* ---------- 2. Base ---------- */
html { scroll-behavior: smooth; }

html, body {
  background: var(--bg);
  color: var(--text);
  font-family: 'Outfit', system-ui, sans-serif;
  min-height: 100%;
  overflow-x: hidden;
}


/* ---------- 3. Background canvas ---------- */
#bg {
  position: fixed;
  inset: 0;
  width: 100%;
  height: 100%;
  z-index: 0;
}


/* ---------- 4. Navbar ---------- */
.nav {
  position: relative;
  z-index: 10;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 20px var(--pad-x);
}

.brand {
  display: flex;
  align-items: center;
  gap: 10px;
  text-decoration: none;
  color: var(--text-bright);
  font-size: 20px;
  font-weight: 400;
}

.brand img {
  width: 30px;
  height: 30px;
  border-radius: 50%;
  object-fit: cover;
  background: linear-gradient(135deg, var(--accent), var(--accent-2));
}

.links { display: flex; gap: clamp(16px, 2vw, 26px); }

.links a {
  color: var(--text);
  text-decoration: none;
  font-size: 15px;
  transition: color .25s;
}
.links a:hover { color: #fff; }

/* Hamburger (visible on mobile only) */
.burger {
  display: none;
  position: relative;
  width: 32px;
  height: 24px;
  background: none;
  border: 0;
  cursor: pointer;
}
.burger span {
  position: absolute;
  left: 4px;
  right: 4px;
  height: 2px;
  background: var(--text-bright);
  transition: .3s;
}
.burger span:nth-child(1) { top: 5px; }
.burger span:nth-child(2) { top: 11px; }
.burger span:nth-child(3) { top: 17px; }
.burger.open span:nth-child(1) { top: 11px; transform: rotate(45deg); }
.burger.open span:nth-child(2) { opacity: 0; }
.burger.open span:nth-child(3) { top: 11px; transform: rotate(-45deg); }


/* ---------- 5. Hero ---------- */
.hero {
  position: relative;
  z-index: 5;
  max-width: 1000px;
  min-height: calc(100vh - 70px);
  padding: 50px var(--pad-x) 70px;
}

.badge {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 5px 14px 5px 6px;
  border: 1.5px solid #2a2a30;
  border-radius: 30px;
  background: rgba(0, 0, 0, .6);
  box-shadow: 0 1.5px 0 -1px #4f46e5;
  color: var(--text-bright);
  font-size: 14px;
  animation: fadeUp .8s both;
}
.badge i {
  display: grid;
  place-items: center;
  width: 22px;
  height: 22px;
  border-radius: 50%;
  background: #f26522;
  color: #fff;
  font-size: 12px;
  font-style: normal;
  font-weight: 600;
}

h1 {
  margin: 22px 0 26px;
  color: var(--text);
  font-size: clamp(34px, 5.4vw, 70px);
  font-weight: 500;
  line-height: 1.05;
  letter-spacing: -.02em;
  animation: fadeUp .9s .1s both;
}

.sub {
  max-width: 480px;
  color: var(--text-muted);
  font-size: clamp(14px, 1.3vw, 17px);
  line-height: 1.4;
  animation: fadeUp 1s .2s both;
}

.stats {
  display: flex;
  flex-wrap: wrap;
  gap: clamp(24px, 4vw, 48px);
  margin-top: clamp(44px, 7vw, 90px);
  animation: fadeUp 1s .35s both;
}
.stats b {
  display: block;
  color: var(--text-bright);
  font-size: clamp(30px, 3.1vw, 40px);
  font-weight: 300;
  line-height: 1;
}
.stats span {
  display: block;
  margin-top: 8px;
  color: var(--text-muted);
  font-size: 14px;
}


/* ---------- 6. Software section ---------- */
.software {
  position: relative;
  z-index: 5;
  padding: clamp(150px, 14vw, 210px) var(--pad-x) clamp(70px, 9vw, 120px);
  /* fades the skyline out, then solid black so the cards sit on a clean background */
  background: linear-gradient(to bottom, transparent 0, #000 140px);
}

.eyebrow {
  margin-bottom: 10px;
  color: var(--accent);
  font-size: 12px;
  letter-spacing: .18em;
  text-transform: uppercase;
}

.software h2 {
  margin-bottom: clamp(26px, 4vw, 44px);
  color: var(--text);
  font-size: clamp(30px, 3.8vw, 48px);
  font-weight: 500;
  letter-spacing: -.02em;
}

.tools {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: clamp(14px, 1.8vw, 24px);
  width: 100%;
}

.tool {
  position: relative;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  min-height: 150px;
  padding: 26px 20px;
  border: 1px solid var(--border);
  border-radius: 16px;
  background: rgba(14, 14, 18, .75);
  backdrop-filter: blur(6px);
  transition: transform .3s, border-color .3s;
}
/* soft glow that follows the mouse (set from script.js) */
.tool::before {
  content: "";
  position: absolute;
  inset: 0;
  background: radial-gradient(200px circle at var(--mx, 50%) var(--my, 0%), rgba(99, 102, 241, .22), transparent 70%);
  opacity: 0;
  transition: opacity .3s;
}
.tool:hover { transform: translateY(-4px); border-color: #3b3b8f; }
.tool:hover::before { opacity: 1; }

.tool .num {
  position: absolute;
  top: 14px;
  right: 16px;
  color: #3f3f46;
  font-size: 12px;
  letter-spacing: .1em;
}
.tool .ico {
  position: relative;
  width: 34px;
  height: 34px;
  margin-bottom: 22px;
  color: #a5b4fc;
}
.tool h3 {
  position: relative;
  color: var(--text-bright);
  font-size: 19px;
  font-weight: 500;
}

/* Divider line under the cards */
.divider {
  width: 100%;
  height: 1px;
  margin: clamp(40px, 6vw, 70px) 0 clamp(26px, 4vw, 40px);
  background: linear-gradient(to right, transparent, #3f3f46 15%, #3f3f46 85%, transparent);
}

/* Animators marquee (one line, right to left) */
.marquee {
  overflow: hidden;
  width: 100%;
  -webkit-mask-image: linear-gradient(to right, transparent, #000 8%, #000 92%, transparent);
          mask-image: linear-gradient(to right, transparent, #000 8%, #000 92%, transparent);
}
.track {
  display: flex;
  width: max-content;
  white-space: nowrap;
  animation: scrollLeft var(--dur, 240s) linear infinite;
}
.marquee:hover .track { animation-play-state: paused; }
.track span {
  display: inline-flex;
  align-items: center;
  color: var(--text-muted);
  font-size: 17px;
  font-weight: 300;
}
.track span::after {
  content: "";
  width: 5px;
  height: 5px;
  margin: 0 22px;
  border-radius: 50%;
  background: var(--accent);
  opacity: .7;
}

/* ---------- Connect (social links) section ---------- */
.connect {
  position: relative;
  z-index: 5;
  padding: 0 var(--pad-x) clamp(80px, 10vw, 130px);
  background: #000;
}
.connect h2 {
  margin-bottom: clamp(26px, 4vw, 44px);
  color: var(--text);
  font-size: clamp(30px, 3.8vw, 48px);
  font-weight: 500;
  letter-spacing: -.02em;
}
.socials {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: clamp(12px, 1.5vw, 20px);
  width: 100%;
}
a.tool { text-decoration: none; }
.socials .tool { min-height: 140px; }

/* ---------- Quotes timeline (center line, alternating sides) ---------- */
.quotes {
  position: relative;
  z-index: 5;
  padding: 0 var(--pad-x) clamp(90px, 11vw, 150px);
  background: #000;
}
.quotes h2 {
  margin-bottom: clamp(40px, 6vw, 80px);
  color: var(--text);
  font-size: clamp(30px, 3.8vw, 48px);
  font-weight: 500;
  letter-spacing: -.02em;
}

.timeline { position: relative; }

/* the line running through the middle */
.timeline::before {
  content: "";
  position: absolute;
  top: 0;
  bottom: 0;
  left: 50%;
  width: 1px;
  transform: translateX(-50%);
  background: linear-gradient(to bottom, transparent, #4b4b9a 8%, #4b4b9a 92%, transparent);
}

.quote {
  position: relative;
  width: 50%;
  padding-bottom: clamp(40px, 7vw, 90px);
}
.quote:last-child { padding-bottom: 0; }

/* dot sitting on the line */
.quote::after {
  content: "";
  position: absolute;
  top: 10px;
  width: 11px;
  height: 11px;
  border-radius: 50%;
  background: var(--accent);
  box-shadow: 0 0 0 5px rgba(99, 102, 241, .18);
}

.quote.left  { padding-right: clamp(22px, 5vw, 70px); text-align: right; }
.quote.left::after  { right: -5px; }
.quote.right { margin-left: 50%; padding-left: clamp(22px, 5vw, 70px); text-align: left; }
.quote.right::after { left: -6px; }

.quote blockquote {
  color: var(--text-bright);
  font-size: clamp(20px, 2.6vw, 34px);
  font-weight: 400;
  line-height: 1.3;
  letter-spacing: -.01em;
}
.quote figcaption { margin-top: 18px; }
.quote figcaption b {
  display: block;
  color: #a5b4fc;
  font-size: 16px;
  font-weight: 500;
}
.quote figcaption span {
  display: block;
  margin-top: 4px;
  color: var(--text-muted);
  font-size: 14px;
}

/* slide in from its own side while scrolling */
.quote.reveal.left  { transform: translateX(-50px); }
.quote.reveal.right { transform: translateX(50px); }
.quote.reveal.show,
.quote.reveal.show:hover { transform: none; }


/* ---------- 7. Animations ---------- */
@keyframes fadeUp {
  from { opacity: 0; transform: translateY(18px); }
  to   { opacity: 1; transform: none; }
}

@keyframes scrollLeft {
  from { transform: translateX(0); }
  to   { transform: translateX(-50%); }
}

@media (prefers-reduced-motion: reduce) {
  .track { animation: none; }
}

/* scroll reveal (class "show" is added from script.js) */
.reveal {
  opacity: 0;
  transform: translateY(32px);
  transition: opacity .7s ease, transform .7s ease, border-color .3s;
  transition-delay: var(--d, 0s);
}
.reveal.show { opacity: 1; transform: none; }
.reveal.show:hover { transform: translateY(-4px); transition-delay: 0s; }


/* ---------- 8. Responsive ---------- */

/* Tablet */
@media (max-width: 1024px) {
  .tools { grid-template-columns: repeat(2, 1fr); }
  .socials { grid-template-columns: repeat(3, 1fr); }
}

/* Mobile */
@media (max-width: 760px) {
  .nav { padding: 16px 20px; }

  .burger { display: block; }
  .links {
    position: absolute;
    top: 62px;
    left: 16px;
    right: 16px;
    z-index: 20;
    flex-direction: column;
    gap: 0;
    max-height: 0;
    overflow: hidden;
    opacity: 0;
    pointer-events: none;
    border: 1px solid var(--border);
    border-radius: 14px;
    background: rgba(12, 12, 16, .98);          /* almost solid so the page behind doesn't show through */
    -webkit-backdrop-filter: blur(14px);
            backdrop-filter: blur(14px);
    transition: .3s;
  }
  .links.open { max-height: 280px; opacity: 1; pointer-events: auto; }

  /* menu text in the center */
  .links a {
    padding: 14px 20px;
    font-size: 15px;
    text-align: center;
    border-bottom: 1px solid #1c1c22;
  }
  .links a:last-child { border-bottom: 0; }

  .hero { min-height: auto; padding-top: 26px; }
  .badge { font-size: 13px; }
  .sub { max-width: 340px; }
  .stats { gap: 26px; }
  .stats span { font-size: 13px; }

  .socials { grid-template-columns: repeat(2, 1fr); }
  .socials .tool:last-child { grid-column: 1 / -1; }

  .quote.left  { padding-right: 16px; }
  .quote.right { padding-left: 16px; }
  .quote blockquote { font-size: 15px; line-height: 1.35; }
  .quote figcaption { margin-top: 12px; }
  .quote figcaption b { font-size: 13px; }
  .quote figcaption span { font-size: 11.5px; }
  .quote::after { top: 6px; width: 9px; height: 9px; box-shadow: 0 0 0 4px rgba(99, 102, 241, .18); }
  .quote.left::after  { right: -4px; }
  .quote.right::after { left: -5px; }

  .track span { font-size: 14px; }
  .track span::after { margin: 0 16px; }
}

/* Small mobile */
@media (max-width: 420px) {
  .tools, .socials { grid-template-columns: 1fr; }
  .socials .tool { min-height: 0; }
  .tool { flex-direction: row; gap: 16px; min-height: 0; padding: 16px 18px; }
  .tool .ico { margin: 0; flex-shrink: 0; width: 30px; height: 30px; }
  .tool .num { top: 10px; right: 14px; }
}