/* ============================================================
   KlickSpark Media — Homepage Stylesheet
   ============================================================ */

/* --- Tokens --- */
:root {
  --accent: #22D3EE;
  --bg: #08090B;
  --bg-alt: #0A0C0F;
  --bg-card: #0B0D11;
  --bg-panel: #0C0E12;
  --text-primary: #ECEEF1;
  --text-body: #969CA6;
  --text-lead: #A8AEB7;
  --text-secondary: #9AA1AB;
  --text-faint: #7A818B;
  --text-meta: #565C66;
  --border: rgba(255,255,255,0.08);
  --border-md: rgba(255,255,255,0.10);
  --border-lg: rgba(255,255,255,0.12);
  --border-btn: rgba(255,255,255,0.18);
  --stripe: rgba(255,255,255,0.022);
  --font-sans: 'Space Grotesk', system-ui, sans-serif;
  --font-mono: 'JetBrains Mono', monospace;
}

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

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

body {
  background: var(--bg);
  color: var(--text-primary);
  font-family: var(--font-sans);
  min-height: 100vh;
  position: relative;
  overflow-x: hidden;
}

::selection { background: var(--accent); color: #fff; }

a { color: inherit; text-decoration: none; }

h1, h2, h3 { font-weight: 600; }

/* --- Background grid --- */
.bg-grid {
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 0;
  background-image:
    linear-gradient(rgba(255,255,255,0.028) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255,255,255,0.028) 1px, transparent 1px);
  background-size: 64px 64px;
  mask-image: radial-gradient(circle at 50% 22%, #000 0%, transparent 78%);
  -webkit-mask-image: radial-gradient(circle at 50% 22%, #000 0%, transparent 78%);
}

/* --- Layout utility --- */
.container {
  max-width: 1320px;
  margin: 0 auto;
  padding-left: 32px;
  padding-right: 32px;
  position: relative;
  z-index: 1;
}

/* --- Accent helper --- */
.accent { color: var(--accent); }

/* --- Kicker (mono label) --- */
.kicker {
  font-family: var(--font-mono);
  font-size: 12.5px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: #868D97;
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 14px;
}

.kicker .accent { white-space: nowrap; }

.hero__kicker.kicker { letter-spacing: 0.14em; }

/* --- Section H2 --- */
.section-h2 {
  font-size: clamp(30px, 4vw, 48px);
  letter-spacing: -0.03em;
  font-weight: 600;
  margin-top: 18px;
}

/* --- Buttons --- */
.btn-primary {
  font-family: var(--font-mono);
  font-size: 13.5px;
  font-weight: 500;
  padding: 15px 26px;
  background: var(--accent);
  color: #fff;
  display: inline-block;
  transition: transform 0.2s, box-shadow 0.2s;
}
.btn-primary:hover {
  transform: translateY(-2px);
  box-shadow: 0 10px 30px -8px var(--accent);
}

.btn-ghost {
  font-family: var(--font-mono);
  font-size: 13.5px;
  padding: 15px 26px;
  border: 1px solid var(--border-btn);
  color: var(--text-primary);
  display: inline-block;
  transition: border-color 0.2s, color 0.2s;
}
.btn-ghost:hover {
  border-color: var(--text-primary);
}

/* ============================================================
   NAV
   ============================================================ */
.nav {
  position: sticky;
  top: 0;
  z-index: 50;
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  background: rgba(8,9,11,0.72);
  border-bottom: 1px solid var(--border);
}

.nav__inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  padding-top: 16px;
  padding-bottom: 16px;
}

.nav__logo {
  display: flex;
  align-items: center;
  gap: 11px;
  flex-shrink: 0;
}

.logo-diamond {
  width: 13px;
  height: 13px;
  background: var(--accent);
  display: inline-block;
  transform: rotate(45deg);
  box-shadow: 0 0 18px var(--accent);
  flex-shrink: 0;
}

.logo-diamond--sm {
  width: 12px;
  height: 12px;
}

.logo-wordmark {
  font-weight: 600;
  font-size: 16px;
  letter-spacing: -0.01em;
}

.logo-muted { color: var(--text-meta); }

.nav__links {
  display: flex;
  align-items: center;
  gap: 30px;
  font-family: var(--font-mono);
  font-size: 12.5px;
  letter-spacing: 0.02em;
  color: var(--text-secondary);
}

.nav__link {
  display: flex;
  gap: 6px;
  transition: color 0.2s;
}
.nav__link:hover { color: var(--text-primary); }

.nav__right {
  display: flex;
  align-items: center;
  gap: 18px;
  flex-shrink: 0;
}

.nav__status {
  font-family: var(--font-mono);
  font-size: 11.5px;
  color: #868D97;
  display: flex;
  align-items: center;
  gap: 7px;
}

.status-dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--accent);
  box-shadow: 0 0 10px var(--accent);
  animation: ks-blink 1.8s ease-in-out infinite;
  flex-shrink: 0;
}

.nav__cta {
  font-size: 12.5px;
  padding: 9px 16px;
}
.nav__cta:hover {
  border-color: var(--accent);
  color: var(--accent);
}

/* ============================================================
   HERO
   ============================================================ */
.hero {
  padding: 96px 32px 56px;
  overflow: hidden;
}

.hero__blob {
  position: absolute;
  top: 60px;
  left: 18%;
  width: 520px;
  height: 340px;
  background: radial-gradient(ellipse at center, var(--accent), transparent 70%);
  opacity: 0.16;
  filter: blur(40px);
  pointer-events: none;
  z-index: 0;
}

.hero__grid {
  display: grid;
  grid-template-columns: 1fr 320px;
  gap: 48px;
  align-items: end;
  position: relative;
  z-index: 1;
}

.hero__kicker { margin-bottom: 30px; }

.kicker-line {
  width: 48px;
  height: 1px;
  background: rgba(255,255,255,0.2);
  display: inline-block;
}

.hero__h1 {
  font-size: clamp(40px, 6.4vw, 86px);
  line-height: 0.98;
  letter-spacing: -0.035em;
}

.hero__lead {
  margin-top: 34px;
  max-width: 560px;
  font-size: 18.5px;
  line-height: 1.55;
  color: var(--text-lead);
}

.hero__cta {
  display: flex;
  gap: 14px;
  margin-top: 40px;
  flex-wrap: wrap;
}

/* meta panel */
.hero__meta {
  border: 1px solid rgba(255,255,255,0.1);
  background: rgba(14,16,20,0.6);
  font-family: var(--font-mono);
  position: relative;
  z-index: 1;
}

.meta-header {
  padding: 14px 18px;
  border-bottom: 1px solid var(--border);
  font-size: 11px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--text-meta);
  display: flex;
  justify-content: space-between;
}

.meta-body {
  padding: 18px;
  display: flex;
  flex-direction: column;
  gap: 15px;
  font-size: 12.5px;
}

.meta-row {
  display: flex;
  justify-content: space-between;
  color: var(--text-secondary);
}

.meta-value { color: var(--text-primary); }

.meta-divider {
  height: 1px;
  background: var(--border);
  margin: 2px 0;
}

.meta-note {
  color: var(--text-meta);
  line-height: 1.7;
}

/* Showreel */
.reel {
  margin-top: 64px;
  position: relative;
  z-index: 1;
  aspect-ratio: 21 / 8;
  border: 1px solid rgba(255,255,255,0.1);
  background-color: var(--bg-panel);
  background-image: repeating-linear-gradient(
    135deg,
    var(--stripe) 0 1px,
    transparent 1px 11px
  );
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
}

.reel__label {
  position: absolute;
  top: 14px;
  font-family: var(--font-mono);
  font-size: 11px;
  color: var(--text-meta);
}
.reel__label--tl { left: 16px; }
.reel__label--tr { right: 16px; }

.reel__center {
  font-family: var(--font-mono);
  font-size: 13px;
  color: #6B727C;
  text-align: center;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 14px;
}

.reel__play {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 42px;
  height: 42px;
  border: 1px solid var(--accent);
  border-radius: 50%;
  color: var(--accent);
  font-size: 14px;
}

/* ============================================================
   MARQUEE
   ============================================================ */
.marquee {
  border-top: 1px solid var(--border);
  border-bottom: 1px solid var(--border);
  padding: 20px 0;
  overflow: hidden;
  margin-top: 24px;
  position: relative;
  z-index: 1;
}

.marquee__track {
  display: flex;
  width: max-content;
  animation: ks-marquee 32s linear infinite;
  font-family: var(--font-mono);
  font-size: 14px;
  letter-spacing: 0.04em;
  color: var(--text-faint);
}

.marquee__row {
  display: flex;
  gap: 40px;
  padding-right: 40px;
  align-items: center;
}

/* ============================================================
   APPROACH
   ============================================================ */
.approach {
  padding: 110px 32px;
}

.approach .kicker { margin-bottom: 46px; }

.approach__grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1px;
  background: rgba(255,255,255,0.08);
  border: 1px solid rgba(255,255,255,0.08);
}

.approach__card {
  background: var(--bg);
  padding: 38px 34px;
}

.approach__index {
  font-family: var(--font-mono);
  font-size: 13px;
  margin-bottom: 24px;
}

.approach__title {
  font-size: 25px;
  letter-spacing: -0.02em;
  font-weight: 600;
  margin-bottom: 14px;
}

.approach__body {
  color: var(--text-body);
  line-height: 1.6;
  font-size: 15.5px;
}

/* ============================================================
   WORK
   ============================================================ */
.work {
  padding: 24px 32px 110px;
}

.work__header {
  display: flex;
  justify-content: space-between;
  align-items: flex-end;
  margin-bottom: 46px;
  gap: 24px;
  flex-wrap: wrap;
}

.work__kicker { margin-bottom: 18px; }

.work__meta {
  font-family: var(--font-mono);
  font-size: 12.5px;
  color: var(--text-meta);
  flex-shrink: 0;
}

.work__grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 22px;
}

.work-card {
  display: block;
  border: 1px solid rgba(255,255,255,0.1);
  background: var(--bg-card);
  transition: border-color 0.25s, transform 0.25s;
}
.work-card:hover {
  border-color: var(--accent);
  transform: translateY(-3px);
}

.work-card__cover {
  position: relative;
  aspect-ratio: 4 / 3;
  background-color: var(--bg-panel);
  background-image: repeating-linear-gradient(
    135deg,
    var(--stripe) 0 1px,
    transparent 1px 11px
  );
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  border-bottom: 1px solid rgba(255,255,255,0.08);
}

.cover-label {
  position: absolute;
  top: 14px;
  font-family: var(--font-mono);
  font-size: 11px;
  color: var(--text-meta);
}
.cover-label--tl { left: 16px; }
.cover-label--tr { right: 16px; }

.cover-caption {
  font-family: var(--font-mono);
  font-size: 12.5px;
  color: #6B727C;
}

.work-card__body {
  padding: 24px 26px;
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.work-card__row {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: 16px;
}

.work-card__title {
  font-size: 23px;
  letter-spacing: -0.02em;
  font-weight: 600;
}

.work-card__year {
  font-family: var(--font-mono);
  font-size: 12px;
  color: var(--text-meta);
  flex-shrink: 0;
}

.work-card__summary {
  color: var(--text-body);
  line-height: 1.55;
  font-size: 15px;
}

.work-card__tags {
  font-family: var(--font-mono);
  font-size: 11.5px;
  letter-spacing: 0.04em;
  color: var(--accent);
  text-transform: uppercase;
  margin-top: 6px;
}

/* ============================================================
   SERVICES
   ============================================================ */
.services {
  border-top: 1px solid var(--border);
  background: var(--bg-alt);
  position: relative;
  z-index: 1;
}

.services__inner {
  padding: 110px 32px;
}

.services__header {
  display: flex;
  justify-content: space-between;
  align-items: flex-end;
  margin-bottom: 54px;
  gap: 24px;
  flex-wrap: wrap;
}

.services__header .kicker { margin-bottom: 18px; }

.services__subhead {
  max-width: 340px;
  color: var(--text-body);
  font-size: 15px;
  line-height: 1.6;
}

.services__list {
  border-top: 1px solid rgba(255,255,255,0.1);
}

.svc-row {
  display: grid;
  grid-template-columns: 120px 1.1fr 1fr;
  gap: 32px;
  padding: 42px 0;
  border-bottom: 1px solid rgba(255,255,255,0.1);
  align-items: start;
}

.svc-row__code {
  font-family: var(--font-mono);
  font-size: 14px;
}

.svc-row__title {
  font-size: clamp(26px, 3vw, 38px);
  letter-spacing: -0.025em;
  font-weight: 600;
  margin-bottom: 12px;
}

.svc-row__desc {
  color: var(--text-body);
  line-height: 1.6;
  font-size: 16px;
  max-width: 420px;
}

.svc-row__deliverables {
  font-family: var(--font-mono);
  font-size: 13px;
  color: var(--text-faint);
  line-height: 2.1;
}

/* ============================================================
   CONTACT
   ============================================================ */
.contact {
  padding: 120px 32px;
}

.contact__panel {
  border: 1px solid var(--border-lg);
  background: linear-gradient(180deg, rgba(14,16,20,0.7), rgba(8,9,11,0.7));
  padding: clamp(40px, 6vw, 84px);
  position: relative;
  overflow: hidden;
}

.contact__blob {
  position: absolute;
  top: -80px;
  right: -40px;
  width: 380px;
  height: 380px;
  background: radial-gradient(circle, var(--accent), transparent 70%);
  opacity: 0.14;
  filter: blur(30px);
  pointer-events: none;
}

.contact__eyebrow {
  font-family: var(--font-mono);
  font-size: 12.5px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--accent);
  margin-bottom: 26px;
  position: relative;
}

.contact__h2 {
  font-size: clamp(34px, 5.4vw, 72px);
  line-height: 1.0;
  letter-spacing: -0.035em;
  max-width: 780px;
  position: relative;
}

.contact__body {
  margin: 26px 0 40px;
  max-width: 520px;
  color: var(--text-lead);
  font-size: 17.5px;
  line-height: 1.55;
  position: relative;
}

.contact__cta {
  display: flex;
  gap: 14px;
  flex-wrap: wrap;
  position: relative;
}

.contact__cta .btn-primary {
  font-size: 14px;
  padding: 16px 30px;
}
.contact__cta .btn-primary:hover {
  box-shadow: 0 12px 32px -8px var(--accent);
}

.contact__cta .btn-ghost {
  font-size: 14px;
  padding: 16px 30px;
  border-color: rgba(255,255,255,0.2);
}
.contact__cta .btn-ghost:hover {
  border-color: var(--text-primary);
}

/* ============================================================
   FOOTER
   ============================================================ */
.footer {
  border-top: 1px solid var(--border);
  position: relative;
  z-index: 1;
}

.footer__inner {
  padding: 48px 32px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 24px;
  flex-wrap: wrap;
}

.footer__logo {
  display: flex;
  align-items: center;
  gap: 11px;
}

.footer__wordmark {
  font-weight: 600;
  font-size: 15px;
}

.footer__right {
  font-family: var(--font-mono);
  font-size: 12px;
  color: var(--text-meta);
  display: flex;
  gap: 26px;
  flex-wrap: wrap;
}

/* ============================================================
   ANIMATIONS
   ============================================================ */
@keyframes ks-marquee {
  from { transform: translateX(0); }
  to   { transform: translateX(-50%); }
}

@keyframes ks-blink {
  0%, 100% { opacity: 1; }
  50%       { opacity: 0.25; }
}

/* Reveal — hidden state only when JS has initialised */
.js [data-reveal] {
  opacity: 0;
  transform: translateY(20px);
  transition:
    opacity 0.7s cubic-bezier(0.2, 0.7, 0.2, 1),
    transform 0.7s cubic-bezier(0.2, 0.7, 0.2, 1);
}
.js [data-reveal].is-visible {
  opacity: 1;
  transform: none;
}

/* No JS / reduced motion: show everything */
@media (prefers-reduced-motion: reduce) {
  [data-reveal] {
    opacity: 1 !important;
    transform: none !important;
    transition: none !important;
  }
  .marquee__track {
    animation: none;
  }
  .status-dot {
    animation: none;
  }
}

/* ============================================================
   RESPONSIVE
   ============================================================ */

/* ≤960px */
@media (max-width: 960px) {
  .hero__grid {
    grid-template-columns: 1fr;
    gap: 36px;
    align-items: start;
  }
  .approach__grid {
    grid-template-columns: 1fr;
  }
  .svc-row {
    grid-template-columns: 64px 1fr;
    gap: 10px 20px;
  }
  .svc-row__deliverables {
    grid-column: 1 / -1;
    padding-top: 6px;
  }
  .nav__links {
    display: none;
  }
}

/* ≤720px */
@media (max-width: 720px) {
  .work__grid {
    grid-template-columns: 1fr;
  }
  .nav__status {
    display: none;
  }
  .reel {
    aspect-ratio: 16 / 10;
  }
  .container,
  .hero,
  .approach,
  .work,
  .services__inner,
  .contact,
  .footer__inner,
  .nav__inner {
    padding-left: 20px;
    padding-right: 20px;
  }
  .approach,
  .work,
  .services__inner,
  .contact {
    padding-top: 68px;
    padding-bottom: 68px;
  }
  .hero {
    padding-top: 60px;
  }
}

/* ≤460px */
@media (max-width: 460px) {
  .svc-row {
    grid-template-columns: 1fr;
  }
  .hero__cta a,
  .contact__cta a {
    width: 100%;
    text-align: center;
  }
  .hero__cta,
  .contact__cta {
    flex-direction: column;
  }
  /* Hide the hairline separator in the hero kicker — too wide at 375px */
  .hero__kicker .kicker-line {
    display: none;
  }
}
