/* klone — shared design system
   ──────────────────────────── */

:root {
  --black: #000000;
  --white: #ffffff;
  --grey-900: #0a0a0a;
  --grey-800: #111111;
  --grey-700: #1a1a1a;
  --grey-600: #222222;
  --grey-500: #333333;
  --grey-400: #555555;
  --grey-300: #888888;
  --grey-200: #b5b5b5;
  --grey-100: #e5e5e5;

  --display: 'Space Grotesk', 'Helvetica Neue', Helvetica, Arial, sans-serif;
  --body: 'Space Grotesk', 'Helvetica Neue', Helvetica, Arial, sans-serif;
  --mono: 'JetBrains Mono', 'IBM Plex Mono', ui-monospace, 'SF Mono', Menlo, monospace;

  --edge: clamp(20px, 4vw, 48px);
}

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

html, body {
  background: var(--black);
  color: var(--white);
  font-family: var(--body);
  font-size: 16px;
  -webkit-font-smoothing: antialiased;
  line-height: 1.4;
  overflow-x: hidden;
}

body { cursor: none; } /* custom cursor takes over */
@media (hover: none) { body { cursor: auto; } }

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

/* ─ section color states ─────────────────────────────────────
   Each <section data-tone="dark|light|grey"> sets its own palette;
   the fixed nav reads the tone of the section currently under its
   anchor (via JS) and inverts logo/text accordingly. */

section {
  position: relative;
  padding: clamp(80px, 12vh, 160px) var(--edge);
  transition: background-color .6s ease, color .6s ease;
}
section[data-tone="dark"]  { background: var(--black); color: var(--white); }
section[data-tone="grey"]  { background: var(--grey-800); color: var(--white); }
section[data-tone="light"] { background: var(--white); color: var(--black); }

/* ─ type scale ─ */
.display-xxl {
  font-family: var(--display);
  font-weight: 700;
  font-size: clamp(56px, 14vw, 240px);
  line-height: .88;
  letter-spacing: -0.04em;
}
.display-xl {
  font-family: var(--display);
  font-weight: 700;
  font-size: clamp(44px, 9vw, 140px);
  line-height: .9;
  letter-spacing: -0.035em;
}
.display-lg {
  font-family: var(--display);
  font-weight: 700;
  font-size: clamp(36px, 6vw, 84px);
  line-height: 1;
  letter-spacing: -0.03em;
}
.display-md {
  font-family: var(--display);
  font-weight: 600;
  font-size: clamp(28px, 4vw, 56px);
  line-height: 1.05;
  letter-spacing: -0.025em;
}

.eyebrow {
  font-family: var(--mono);
  font-size: 12px;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  font-weight: 400;
  opacity: .7;
}
.mono { font-family: var(--mono); letter-spacing: 0; }

/* ─ custom cursor ─ */
.k-cursor {
  position: fixed;
  top: 0; left: 0;
  width: 10px; height: 10px;
  border-radius: 50%;
  background: currentColor;
  pointer-events: none;
  z-index: 9999;
  transform: translate(-50%, -50%);
  mix-blend-mode: difference;
  transition: width .2s, height .2s, background .2s;
  will-change: transform;
}
.k-cursor.is-hot {
  width: 56px; height: 56px;
  background: var(--white);
}
.k-cursor-ring {
  position: fixed;
  top: 0; left: 0;
  width: 40px; height: 40px;
  border: 1px solid currentColor;
  border-radius: 50%;
  pointer-events: none;
  z-index: 9998;
  transform: translate(-50%, -50%);
  mix-blend-mode: difference;
  transition: opacity .2s, transform .15s ease-out;
  will-change: transform;
  opacity: .4;
}

/* ─ nav ─ */
.k-nav {
  position: fixed; top: 0; left: 0; right: 0;
  z-index: 100;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 20px var(--edge);
  mix-blend-mode: difference;
  color: var(--white);
  font-family: var(--mono);
  font-size: 12px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}
.k-nav .logo {
  font-family: var(--display);
  font-size: 28px;
  font-weight: 700;
  letter-spacing: -0.04em;
  text-transform: lowercase;
  display: flex;
  align-items: baseline;
  gap: 2px;
}
.k-nav .logo::after {
  content: '';
  width: 6px; height: 6px;
  background: currentColor;
  display: inline-block;
  margin-left: 2px;
  margin-bottom: 4px;
}
.k-nav-links { display: flex; gap: 32px; }
.k-nav-links a { position: relative; padding: 4px 0; }
.k-nav-links a::after {
  content: ''; position: absolute; bottom: 0; left: 0; right: 0;
  height: 1px; background: currentColor;
  transform: scaleX(0); transform-origin: left;
  transition: transform .3s cubic-bezier(.2,.7,.3,1);
}
.k-nav-links a:hover::after { transform: scaleX(1); }

/* ─ buttons ─ */
.k-btn {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  padding: 18px 28px;
  border: 1px solid currentColor;
  border-radius: 999px;
  font-family: var(--mono);
  font-size: 13px;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  transition: background .3s, color .3s, padding .3s;
  position: relative;
  overflow: hidden;
}
.k-btn::before {
  content: '';
  position: absolute;
  inset: 0;
  background: currentColor;
  transform: translateY(101%);
  transition: transform .4s cubic-bezier(.6,.1,.3,1);
  z-index: -1;
}
.k-btn:hover::before { transform: translateY(0); }
.k-btn:hover { color: var(--black); }
section[data-tone="light"] .k-btn:hover { color: var(--white); }
.k-btn .arr { transition: transform .3s; }
.k-btn:hover .arr { transform: translateX(4px); }

/* ─ marquee ─ */
.k-marquee {
  display: flex;
  overflow: hidden;
  white-space: nowrap;
  border-top: 1px solid;
  border-bottom: 1px solid;
  padding: 24px 0;
}
.k-marquee-track {
  display: inline-flex;
  gap: 48px;
  animation: k-marquee 40s linear infinite;
  padding-right: 48px;
  flex-shrink: 0;
}
@keyframes k-marquee {
  to { transform: translateX(-100%); }
}

/* ─ reveal on scroll ─ */
.k-reveal {
  opacity: 0;
  transform: translateY(40px);
  transition: opacity .9s cubic-bezier(.2,.7,.3,1), transform .9s cubic-bezier(.2,.7,.3,1);
}
.k-reveal.in { opacity: 1; transform: none; }

/* Split lines for hero */
.k-line { overflow: hidden; display: block; }
.k-line > span {
  display: inline-block;
  transform: translateY(110%);
  transition: transform 1.1s cubic-bezier(.2,.7,.3,1);
  transition-delay: var(--d, 0ms);
}
.k-line.in > span { transform: translateY(0); }

/* ─ laptop frame ─ */
.k-laptop {
  position: relative;
  width: 100%;
  max-width: 1100px;
  margin: 0 auto;
  aspect-ratio: 16/10;
  background: #0a0a0a;
  border-radius: 16px 16px 4px 4px;
  padding: 18px 18px 22px;
  box-shadow:
    inset 0 0 0 1px #2a2a2a,
    0 40px 80px -20px rgba(0,0,0,0.7),
    0 2px 0 rgba(255,255,255,0.05);
}
.k-laptop::after {
  content: '';
  position: absolute;
  left: -4%; right: -4%;
  bottom: -14px; height: 14px;
  background: linear-gradient(180deg, #1a1a1a, #080808);
  border-radius: 0 0 24px 24px;
  box-shadow: 0 6px 20px rgba(0,0,0,0.6);
}
.k-laptop-screen {
  width: 100%; height: 100%;
  background: var(--white);
  border-radius: 2px;
  overflow: hidden;
  position: relative;
}

/* placeholder */
.k-placeholder {
  width: 100%; height: 100%;
  background-image:
    repeating-linear-gradient(
      45deg,
      rgba(0,0,0,0.04) 0 8px,
      transparent 8px 16px
    );
  background-color: #f0f0f0;
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: var(--mono);
  font-size: 11px;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: rgba(0,0,0,0.45);
}
.k-placeholder.dark {
  background-color: #121212;
  background-image:
    repeating-linear-gradient(45deg, rgba(255,255,255,0.03) 0 8px, transparent 8px 16px);
  color: rgba(255,255,255,0.4);
}

/* ─ iphone button ─ toggle with vs without a website */
.k-vs {
  display: grid;
  grid-template-columns: 1fr;
  gap: 40px;
  align-items: center;
}
@media (min-width: 900px) {
  .k-vs { grid-template-columns: 360px 1fr; gap: 80px; }
}
.k-iphone {
  width: 280px;
  aspect-ratio: 9/19.5;
  background: #1a1a1a;
  border-radius: 42px;
  padding: 10px;
  box-shadow: inset 0 0 0 2px #2a2a2a, 0 30px 60px -15px rgba(0,0,0,0.8);
  margin: 0 auto;
  position: relative;
}
.k-iphone::before {
  content: '';
  position: absolute;
  top: 20px; left: 50%;
  transform: translateX(-50%);
  width: 100px; height: 28px;
  background: #000;
  border-radius: 14px;
  z-index: 3;
}
.k-iphone-screen {
  width: 100%; height: 100%;
  background: var(--black);
  border-radius: 32px;
  overflow: hidden;
  position: relative;
  display: flex;
  flex-direction: column;
}
.k-iphone-content {
  flex: 1;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  padding: 40px 24px;
  text-align: center;
  transition: opacity .3s;
}
.k-iphone-button {
  height: 64px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: var(--mono);
  font-size: 11px;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  border-top: 1px solid rgba(255,255,255,0.15);
  background: rgba(255,255,255,0.05);
  cursor: pointer;
  transition: background .2s;
  user-select: none;
}
.k-iphone-button:hover { background: rgba(255,255,255,0.12); }
.k-iphone-button .dot {
  width: 8px; height: 8px; border-radius: 50%;
  background: currentColor; margin-right: 10px;
  transition: transform .3s;
}
.k-iphone[data-state="with"] .k-iphone-button .dot { background: #d1ff3a; }
.k-iphone[data-state="without"] .k-iphone-button .dot { background: #ff4444; }

/* ─ footer ─ */
.k-footer {
  padding: 80px var(--edge) 32px;
  background: var(--black);
  color: var(--white);
  border-top: 1px solid var(--grey-600);
}
.k-footer-top {
  display: grid;
  grid-template-columns: 1fr;
  gap: 48px;
  padding-bottom: 64px;
  border-bottom: 1px solid var(--grey-600);
}
@media (min-width: 800px) {
  .k-footer-top { grid-template-columns: 2fr 1fr 1fr 1fr; }
}
.k-footer-col h5 {
  font-family: var(--mono);
  font-size: 11px;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  opacity: .5;
  margin-bottom: 16px;
  font-weight: 400;
}
.k-footer-col ul { list-style: none; display: flex; flex-direction: column; gap: 8px; }
.k-footer-col a { opacity: .85; transition: opacity .2s; }
.k-footer-col a:hover { opacity: 1; }
.k-footer-big {
  font-family: var(--display);
  font-weight: 700;
  font-size: clamp(80px, 18vw, 280px);
  line-height: .85;
  letter-spacing: -0.05em;
  padding: 80px 0 40px;
  text-transform: lowercase;
}
.k-footer-meta {
  display: flex;
  justify-content: space-between;
  padding-top: 32px;
  font-family: var(--mono);
  font-size: 11px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  opacity: .5;
  flex-wrap: wrap;
  gap: 16px;
}

/* ─ utility ─ */
.grid { display: grid; gap: 24px; }
.grid-2 { grid-template-columns: repeat(2, 1fr); }
.grid-3 { grid-template-columns: repeat(3, 1fr); }
.grid-4 { grid-template-columns: repeat(4, 1fr); }
@media (max-width: 800px) {
  .grid-2, .grid-3, .grid-4 { grid-template-columns: 1fr; }
}

.flex { display: flex; }
.flex-between { display: flex; justify-content: space-between; align-items: center; }
.flex-col { display: flex; flex-direction: column; }

.divider {
  height: 1px;
  background: currentColor;
  opacity: .15;
  width: 100%;
}

/* Hero running marquee tagline */
.hero-marquee {
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  padding: 16px 0;
  border-top: 1px solid rgba(255,255,255,0.15);
  font-family: var(--mono);
  font-size: 12px;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  opacity: .85;
  display: flex;
  justify-content: space-between;
  padding-left: var(--edge);
  padding-right: var(--edge);
  flex-wrap: wrap;
  gap: 16px;
}

/* text ticker circle */
.k-badge {
  width: 140px; height: 140px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
  font-family: var(--mono);
}
.k-badge svg { position: absolute; inset: 0; animation: k-spin 16s linear infinite; }
.k-badge .dot {
  width: 10px; height: 10px; border-radius: 50%;
  background: currentColor;
}
@keyframes k-spin { to { transform: rotate(360deg); } }
