/* ============================================
   LUZID — MAIN STYLESHEET
   Swiss precision. Modern execution.
   ============================================ */

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

:root {
  --black:   #0D0D0D;
  --white:   #F8F6F2;
  --red:     #E8332A;
  --gray-1:  #1A1A1A;
  --gray-2:  #333333;
  --gray-3:  #666666;
  --gray-4:  #999999;
  --gray-5:  #CCCCCC;
  --gray-6:  #E8E6E2;
  --gray-7:  #F2F0EC;

  --font-head: 'Syne', sans-serif;
  --font-body: 'Inter', sans-serif;

  --nav-h: 72px;
  --section-pad: clamp(72px, 10vw, 140px);
  --container: 1320px;
  --gutter: clamp(20px, 5vw, 80px);

  --ease-out: cubic-bezier(0.16, 1, 0.3, 1);
  --ease-in-out: cubic-bezier(0.65, 0, 0.35, 1);
  --dur: 0.7s;
}

html {
  font-size: 16px;
  scroll-behavior: smooth;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

body {
  background-color: var(--white);
  color: var(--black);
  font-family: var(--font-body);
  font-size: 1rem;
  line-height: 1.6;
  overflow-x: hidden;
}

/* Hide system cursor globally on pointer-capable devices */
@media (pointer: fine) {
  html, body, * {
    cursor: none !important;
  }
}

body.nav-open {
  overflow: hidden;
}

img, video {
  max-width: 100%;
  display: block;
}

a { color: inherit; text-decoration: none; }
ul, ol { list-style: none; }

/* --- TYPOGRAPHY --- */
h1, h2, h3, h4, h5 {
  font-family: var(--font-head);
  font-weight: 700;
  line-height: 1.05;
  letter-spacing: -0.02em;
}

.display {
  font-size: clamp(44px, 8.5vw, 120px);
  line-height: 1;
  letter-spacing: -0.03em;
}

.headline {
  font-size: clamp(30px, 4.5vw, 72px);
  letter-spacing: -0.025em;
  line-height: 1.1;
}

.label {
  font-family: var(--font-body);
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--gray-4);
}

.body-large {
  font-size: clamp(16px, 1.4vw, 19px);
  line-height: 1.7;
  color: var(--gray-3);
}

/* --- LAYOUT --- */
.container {
  max-width: var(--container);
  margin: 0 auto;
  padding: 0 var(--gutter);
}

.section {
  padding: var(--section-pad) 0;
}

.section--dark {
  background-color: var(--black);
  color: var(--white);
}

.section--dark .label  { color: var(--gray-5); }
.section--dark .body-large { color: var(--gray-5); }

.section--gray {
  background-color: var(--gray-7);
}

/* --- NAVIGATION --- */
.nav {
  position: fixed;
  top: 0; left: 0; right: 0;
  z-index: 100;
  height: var(--nav-h);
  display: flex;
  align-items: center;
  transition: background 0.4s var(--ease-out), border-color 0.4s;
  border-bottom: 1px solid transparent;
}

.nav.scrolled {
  background: rgba(248, 246, 242, 0.94);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border-color: var(--gray-6);
}

.nav__inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  width: 100%;
}

.nav__logo {
  font-family: var(--font-head);
  font-size: 22px;
  font-weight: 800;
  letter-spacing: -0.04em;
  color: var(--black);
  z-index: 101;
  flex-shrink: 0;
}

.nav__logo span { color: var(--red); }

.nav__links {
  display: flex;
  align-items: center;
  gap: 36px;
}

.nav__links a {
  font-size: 13.5px;
  font-weight: 500;
  color: var(--gray-3);
  letter-spacing: 0.01em;
  transition: color 0.2s;
  position: relative;
  padding-bottom: 2px;
}

.nav__links a::after {
  content: '';
  position: absolute;
  bottom: 0; left: 0;
  width: 0; height: 1px;
  background: var(--black);
  transition: width 0.3s var(--ease-out);
}

.nav__links a:hover,
.nav__links a.active {
  color: var(--black);
}

.nav__links a:hover::after,
.nav__links a.active::after {
  width: 100%;
}

.nav__cta {
  font-size: 13px;
  font-weight: 600;
  padding: 9px 20px;
  border: 1.5px solid var(--black);
  border-radius: 2px;
  color: var(--black);
  transition: background 0.22s, color 0.22s;
  letter-spacing: 0.02em;
  flex-shrink: 0;
}

.nav__cta:hover {
  background: var(--black);
  color: var(--white);
}

.nav__cta::after { display: none !important; }

/* Hamburger — visible ≤ 1024px */
.nav__burger {
  display: none;
  flex-direction: column;
  gap: 5px;
  z-index: 101;
  padding: 8px;
  background: none;
  border: none;
  margin-right: -8px;
}

.nav__burger span {
  display: block;
  width: 24px;
  height: 1.5px;
  background: var(--black);
  transition: transform 0.3s var(--ease-out), opacity 0.3s;
  transform-origin: center;
}

.nav__burger.open span:nth-child(1) { transform: translateY(6.5px) rotate(45deg); }
.nav__burger.open span:nth-child(2) { opacity: 0; }
.nav__burger.open span:nth-child(3) { transform: translateY(-6.5px) rotate(-45deg); }

/* Mobile full-screen overlay */
.nav__overlay {
  display: none;
  position: fixed;
  inset: 0;
  background: var(--white);
  z-index: 99;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 28px;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.3s var(--ease-out);
}

.nav__overlay.open {
  opacity: 1;
  pointer-events: all;
}

.nav__overlay a {
  font-family: var(--font-head);
  font-size: clamp(28px, 7vw, 52px);
  font-weight: 700;
  letter-spacing: -0.03em;
  color: var(--black);
  transition: color 0.2s;
}

.nav__overlay a:hover { color: var(--red); }

/* --- BUTTONS --- */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-family: var(--font-body);
  font-size: 14px;
  font-weight: 600;
  letter-spacing: 0.02em;
  padding: 15px 28px;
  border-radius: 2px;
  border: none;
  transition: all 0.22s var(--ease-out);
  white-space: nowrap;
}

.btn--primary {
  background: var(--black);
  color: var(--white);
}

.btn--primary:hover {
  background: var(--gray-2);
  transform: translateY(-1px);
}

.btn--outline {
  background: transparent;
  color: var(--black);
  border: 1.5px solid var(--black);
}

.btn--outline:hover {
  background: var(--black);
  color: var(--white);
}

.btn--outline-white {
  background: transparent;
  color: var(--white);
  border: 1.5px solid rgba(255,255,255,0.35);
}

.btn--outline-white:hover {
  background: var(--white);
  color: var(--black);
  border-color: var(--white);
}

.btn--red {
  background: var(--red);
  color: var(--white);
}

.btn--red:hover {
  background: #c42820;
  transform: translateY(-1px);
}

.btn svg {
  width: 15px;
  height: 15px;
  flex-shrink: 0;
  transition: transform 0.22s var(--ease-out);
}

.btn:hover svg { transform: translate(3px, -3px); }

/* --- SECTION HEADER --- */
.section-header {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 24px;
  margin-bottom: clamp(40px, 7vw, 88px);
}

.section-header--centered {
  flex-direction: column;
  align-items: center;
  text-align: center;
}

.section-header .label { margin-bottom: 14px; }

/* --- RULE --- */
.rule {
  border: none;
  border-top: 1px solid var(--gray-6);
  margin: 0;
}

.rule--dark { border-color: var(--gray-2); }

/* --- SCROLL INDICATOR --- */
.scroll-line {
  position: absolute;
  bottom: 40px;
  left: 50%;
  transform: translateX(-50%);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 10px;
  color: var(--gray-4);
  font-size: 10px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.scroll-line__bar {
  width: 1px;
  height: 44px;
  background: var(--gray-6);
  position: relative;
  overflow: hidden;
}

.scroll-line__bar::after {
  content: '';
  position: absolute;
  top: -100%; left: 0;
  width: 100%; height: 100%;
  background: var(--black);
  animation: scrollDown 1.8s var(--ease-out) infinite;
}

@keyframes scrollDown {
  0%   { top: -100%; }
  50%  { top: 100%; }
  100% { top: 100%; }
}

/* --- TAG --- */
.tag {
  display: inline-block;
  font-size: 10px;
  font-weight: 600;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  padding: 4px 11px;
  border: 1px solid var(--gray-5);
  border-radius: 1px;
  color: var(--gray-3);
}

/* --- RED LINE --- */
.section-line {
  width: 36px;
  height: 2px;
  background: var(--red);
  margin-bottom: 22px;
}

/* --- PAGE HERO (inner pages) --- */
.page-hero {
  padding-top: calc(var(--nav-h) + clamp(56px, 8vw, 112px));
  padding-bottom: clamp(56px, 8vw, 112px);
  border-bottom: 1px solid var(--gray-6);
}

.page-hero__label { margin-bottom: 20px; }

/* --- FOOTER --- */
.footer {
  background: var(--black);
  color: var(--white);
  padding: 72px 0 36px;
}

.footer__top {
  display: grid;
  grid-template-columns: 1.6fr 1fr 1fr 1fr;
  gap: 48px;
  padding-bottom: 56px;
  border-bottom: 1px solid var(--gray-2);
}

.footer__logo {
  font-family: var(--font-head);
  font-size: 26px;
  font-weight: 800;
  letter-spacing: -0.04em;
  margin-bottom: 14px;
}

.footer__logo span { color: var(--red); }

.footer__tagline {
  font-size: 13.5px;
  color: var(--gray-4);
  line-height: 1.65;
  max-width: 240px;
}

.footer__col-title {
  font-size: 10px;
  font-weight: 600;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--gray-4);
  margin-bottom: 18px;
}

.footer__col a {
  display: block;
  font-size: 14px;
  color: var(--gray-4);
  margin-bottom: 10px;
  transition: color 0.2s;
}

.footer__col a:hover { color: var(--white); }

.footer__bottom {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding-top: 28px;
}

.footer__copy {
  font-size: 12px;
  color: var(--gray-4);
}

.footer__bottom-links {
  display: flex;
  gap: 20px;
}

.footer__bottom-links a {
  font-size: 12px;
  color: var(--gray-4);
  transition: color 0.2s;
}

.footer__bottom-links a:hover { color: var(--white); }

/* --- SCROLL REVEAL ANIMATIONS --- */
.reveal {
  opacity: 0;
  transform: translateY(32px);
  transition: opacity var(--dur) var(--ease-out), transform var(--dur) var(--ease-out);
}

.reveal.visible {
  opacity: 1;
  transform: none;
}

.reveal-left {
  opacity: 0;
  transform: translateX(-32px);
  transition: opacity var(--dur) var(--ease-out), transform var(--dur) var(--ease-out);
}

.reveal-left.visible {
  opacity: 1;
  transform: none;
}

.reveal-right {
  opacity: 0;
  transform: translateX(32px);
  transition: opacity var(--dur) var(--ease-out), transform var(--dur) var(--ease-out);
}

.reveal-right.visible {
  opacity: 1;
  transform: none;
}

.delay-1 { transition-delay: 0.1s; }
.delay-2 { transition-delay: 0.2s; }
.delay-3 { transition-delay: 0.3s; }
.delay-4 { transition-delay: 0.4s; }
.delay-5 { transition-delay: 0.5s; }
.delay-6 { transition-delay: 0.6s; }

/* --- CUSTOM CURSOR ---
   mix-blend-mode: difference makes it automatically
   invert against any background — white on dark, dark on light.
   ------------------------------------------------------------ */
.cursor {
  position: fixed;
  width: 10px;
  height: 10px;
  background: #ffffff;
  mix-blend-mode: difference;
  border-radius: 50%;
  pointer-events: none;
  z-index: 9999;
  transform: translate(-50%, -50%);
  /* only animate size, not position (JS handles position) */
  transition: width 0.25s var(--ease-out), height 0.25s var(--ease-out);
  will-change: left, top;
}

.cursor-ring {
  position: fixed;
  width: 40px;
  height: 40px;
  border: 1.5px solid #ffffff;
  mix-blend-mode: difference;
  border-radius: 50%;
  pointer-events: none;
  z-index: 9998;
  transform: translate(-50%, -50%);
  transition: width 0.3s var(--ease-out), height 0.3s var(--ease-out);
  will-change: left, top;
}

/* Cursor expands on interactive elements */
.cursor.hovered {
  width: 0;
  height: 0;
}

.cursor-ring.hovered {
  width: 64px;
  height: 64px;
}

/* ============================================
   RESPONSIVE — GLOBAL
   ============================================ */

/* Tablet */
@media (max-width: 1024px) {
  :root {
    --nav-h: 68px;
  }

  /* Switch to burger at tablet */
  .nav__links,
  .nav__cta {
    display: none;
  }

  .nav__burger {
    display: flex;
  }

  .nav__overlay {
    display: flex;
  }

  /* Footer: 2×2 */
  .footer__top {
    grid-template-columns: 1fr 1fr;
    gap: 40px;
  }
}

/* Mobile */
@media (max-width: 768px) {
  :root {
    --nav-h: 60px;
  }

  .section-header {
    flex-direction: column;
    align-items: flex-start;
    gap: 20px;
  }

  .scroll-line {
    display: none;
  }
}

/* Small mobile */
@media (max-width: 480px) {
  :root {
    --nav-h: 56px;
  }

  /* Footer: full stack */
  .footer__top {
    grid-template-columns: 1fr;
    gap: 36px;
  }

  .footer__bottom {
    flex-direction: column;
    gap: 12px;
    text-align: center;
  }

  .footer__tagline {
    max-width: 100%;
  }
}
