/* ======================================================
   LOCAL FONTS
====================================================== */
@font-face {
  font-family: 'Raleway';
  font-style: normal;
  font-weight: 100 700;
  font-display: swap;
  src: url('../fonts/raleway.woff2') format('woff2');
}

@font-face {
  font-family: 'DM Sans';
  font-style: normal;
  font-weight: 300 500;
  font-display: swap;
  src: url('../fonts/dm-sans.woff2') format('woff2');
}

@font-face {
  font-family: 'Space Mono';
  font-style: normal;
  font-weight: 400;
  font-display: swap;
  src: url('../fonts/space-mono.woff2') format('woff2');
}

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

html {
  scroll-behavior: smooth;
}

:root {
  --bg-light:    #F4F3EE;
  --bg-dark:     #0D0D0D;
  --bg-card:     #141414;
  --text-dark:   #111111;
  --text-light:  #F4F3EE;
  --red:         #E63328;
  --border-l:    rgba(0, 0, 0, 0.09);
  --border-d:    rgba(255, 255, 255, 0.09);
  --muted-l:     rgba(17, 17, 17, 0.40);
  --muted-d:     rgba(244, 243, 238, 0.35);
  --font-display: 'Raleway', sans-serif;
  --font-body:    'DM Sans', sans-serif;
  --font-mono:    'Space Mono', monospace;
}

body {
  font-family: var(--font-body);
  background: var(--bg-light);
  color: var(--text-dark);
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
}

/* ======================================================
   NAVIGATION
====================================================== */
nav {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 200;
  height: 60px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 40px;
  background: rgba(244, 243, 238, 0.88);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  border-bottom: 1px solid var(--border-l);
  transition: border-color 0.3s;
}

.nav-logo {
  font-family: var(--font-display);
  font-weight: 600;
  font-size: 14px;
  letter-spacing: -0.01em;
  display: flex;
  align-items: center;
  gap: 5px;
  text-decoration: none;
  color: inherit;
}

.nav-logo .slash {
  color: var(--red);
  font-weight: 400;
  font-size: 13px;
}

.nav-links {
  display: flex;
  align-items: center;
  gap: 28px;
  list-style: none;
}

.nav-links a {
  font-family: var(--font-body);
  font-size: 11px;
  font-weight: 400;
  letter-spacing: 0.07em;
  text-transform: uppercase;
  text-decoration: none;
  color: var(--text-dark);
  opacity: 0.5;
  transition: opacity 0.2s;
}

.nav-links a:hover { opacity: 1; }

.nav-right {
  display: flex;
  align-items: center;
  gap: 18px;
}

.nav-lang {
  font-family: var(--font-mono);
  font-size: 10px;
  opacity: 0.4;
}

.btn-nav {
  background: var(--text-dark);
  color: var(--bg-light);
  font-family: var(--font-body);
  font-size: 10px;
  font-weight: 500;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  padding: 8px 16px;
  border: none;
  cursor: pointer;
  transition: background 0.25s;
}

.btn-nav:hover { background: var(--red); }

/* ======================================================
   HERO
====================================================== */
.hero {
  padding-top: 60px;
  background: var(--bg-light);
}

.hero-upper {
  max-width: 1160px;
  margin: 0 auto;
  padding: 72px 40px 0;
  display: flex;
  flex-direction: column;
  align-items: center;
}

.hero-headline {
  font-family: var(--font-display);
  font-weight: 200;
  font-size: clamp(36px, 5.5vw, 68px);
  line-height: 1.08;
  letter-spacing: -0.035em;
  text-align: center;
  color: var(--text-dark);
  margin-bottom: 56px;
  max-width: 660px;
}

/* Wireframe grid mosaic */
.hero-mosaic {
  width: 100%;
  max-width: 1160px;
  margin: 0 auto;
  display: grid;
  grid-template-columns: 2fr 1fr 1fr;
  grid-template-rows: 210px 150px;
  gap: 0;
  outline: 1px solid var(--border-l);
}

.mosaic-cell {
  border: 1px solid var(--border-l);
  position: relative;
  overflow: hidden;
  background: var(--bg-light);
}

.mosaic-cell--main {
  grid-row: span 2;
}

.mosaic-cell svg {
  width: 100%;
  height: 100%;
  display: block;
}

/* Hero bottom bar */
.hero-bar {
  max-width: 1160px;
  margin: 0 auto;
  padding: 28px 40px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  border-top: 1px solid var(--border-l);
}

.hero-bar-left {
  display: flex;
  align-items: center;
  gap: 28px;
}

.btn-primary {
  background: var(--text-dark);
  color: var(--bg-light);
  font-family: var(--font-body);
  font-size: 10px;
  font-weight: 500;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  padding: 12px 22px;
  border: none;
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 10px;
  transition: background 0.25s;
  white-space: nowrap;
}

.btn-primary:hover { background: var(--red); }

.btn-primary .accent-dot {
  width: 5px;
  height: 5px;
  background: var(--red);
  flex-shrink: 0;
  transition: background 0.25s;
}

.btn-primary:hover .accent-dot { background: var(--bg-light); }

.hero-tagline {
  font-size: 11.5px;
  line-height: 1.7;
  color: var(--muted-l);
  max-width: 280px;
}

.hero-bar-right {
  font-family: var(--font-mono);
  font-size: 9px;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  opacity: 0.25;
}

/* ======================================================
   SERVICES SECTION (DARK)
====================================================== */
.platform {
  background: var(--bg-dark);
  color: var(--text-light);
}

.section-topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 40px;
  height: 50px;
  border-bottom: 1px solid var(--border-d);
}

.topbar-label {
  font-family: var(--font-display);
  font-weight: 600;
  font-size: 13px;
  letter-spacing: -0.01em;
  display: flex;
  align-items: center;
  gap: 8px;
}

.topbar-label .num {
  font-family: var(--font-mono);
  font-size: 10px;
  color: var(--red);
  font-weight: 400;
}

.topbar-action {
  display: flex;
  align-items: center;
  gap: 8px;
  font-family: var(--font-mono);
  font-size: 9px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--muted-d);
  cursor: pointer;
  transition: color 0.2s;
}

.topbar-action:hover { color: var(--text-light); }

.topbar-close {
  width: 18px;
  height: 18px;
  background: var(--red);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 11px;
  color: white;
  font-family: var(--font-body);
  line-height: 1;
}

.platform-body {
  max-width: 1160px;
  margin: 0 auto;
  padding: 72px 40px 80px;
}

.platform-intro {
  display: grid;
  grid-template-columns: 220px 1fr;
  gap: 48px;
  align-items: start;
  margin-bottom: 60px;
}

.platform-desc-text {
  font-size: 11.5px;
  line-height: 1.75;
  color: var(--muted-d);
  padding-top: 6px;
}

.section-headline {
  font-family: var(--font-display);
  font-weight: 200;
  font-size: clamp(32px, 4.5vw, 58px);
  line-height: 1.07;
  letter-spacing: -0.035em;
}

.section-headline .ghost {
  display: block;
  opacity: 0.15;
}

/* Feature cards */
.feat-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  outline: 1px solid var(--border-d);
}

.feat-card {
  background: var(--bg-card);
  border: 1px solid var(--border-d);
  padding: 28px;
  display: flex;
  flex-direction: column;
  gap: 20px;
  cursor: pointer;
  transition: background 0.3s;
  min-height: 320px;
}

.feat-card:hover { background: #191919; }

.feat-visual {
  flex: 1;
  border: 1px solid var(--border-d);
  position: relative;
  overflow: hidden;
  min-height: 110px;
}

.feat-visual svg {
  width: 100%;
  height: 100%;
  display: block;
}

.feat-info {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.feat-title {
  font-family: var(--font-display);
  font-weight: 300;
  font-size: 20px;
  letter-spacing: -0.025em;
}

.feat-desc {
  font-size: 11.5px;
  line-height: 1.7;
  color: var(--muted-d);
}

.feat-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding-top: 16px;
  border-top: 1px solid var(--border-d);
}

.feat-tag {
  font-family: var(--font-mono);
  font-size: 9px;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: rgba(244, 243, 238, 0.3);
}

.feat-index {
  display: flex;
  align-items: center;
  gap: 6px;
  font-family: var(--font-mono);
  font-size: 9px;
}

.feat-index-num {
  opacity: 0.25;
}

.feat-index-arrow {
  width: 18px;
  height: 18px;
  background: var(--red);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 10px;
  color: white;
}

/* ======================================================
   DETAIL SECTION (LIGHT)
====================================================== */
.detail {
  background: var(--bg-light);
  color: var(--text-dark);
}

.detail-topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 40px;
  height: 50px;
  border-bottom: 1px solid var(--border-l);
}

.detail-topbar .topbar-action {
  color: var(--muted-l);
}

.detail-topbar .topbar-action:hover { color: var(--text-dark); }

.detail-body {
  max-width: 1160px;
  margin: 0 auto;
  padding: 72px 40px 100px;
  display: grid;
  grid-template-columns: 240px 1fr;
  gap: 60px;
  align-items: start;
}

.detail-sidebar {
  display: flex;
  flex-direction: column;
  gap: 32px;
}

.detail-sub {
  font-family: var(--font-mono);
  font-size: 9px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--muted-l);
  line-height: 1.8;
}

.detail-visual-box {
  width: 100%;
  height: 180px;
  border: 1px solid var(--border-l);
  position: relative;
  overflow: hidden;
}

.detail-visual-box svg {
  width: 100%;
  height: 100%;
  display: block;
}

.detail-headline {
  font-family: var(--font-display);
  font-weight: 200;
  font-size: clamp(32px, 4.5vw, 58px);
  line-height: 1.07;
  letter-spacing: -0.035em;
  color: var(--text-dark);
}

.detail-headline .ghost {
  display: block;
  opacity: 0.1;
}

/* ======================================================
   FOOTER
====================================================== */
footer {
  background: var(--bg-dark);
  color: var(--text-light);
  padding: 48px 40px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  border-top: 1px solid var(--border-d);
}

.footer-logo {
  font-family: var(--font-display);
  font-weight: 600;
  font-size: 13px;
  display: flex;
  align-items: center;
  gap: 5px;
  text-decoration: none;
  color: inherit;
}

.footer-logo .slash { color: var(--red); font-weight: 400; }

.footer-nav {
  display: flex;
  gap: 28px;
  list-style: none;
}

.footer-nav a {
  font-size: 10px;
  letter-spacing: 0.07em;
  text-transform: uppercase;
  text-decoration: none;
  color: rgba(244, 243, 238, 0.35);
  transition: color 0.2s;
}

.footer-nav a:hover { color: var(--text-light); }

.footer-copy {
  font-family: var(--font-mono);
  font-size: 9px;
  opacity: 0.25;
}

/* ======================================================
   SCROLL REVEAL
====================================================== */
.sr {
  opacity: 0;
  transform: translateY(20px);
  transition: opacity 0.75s cubic-bezier(0.22, 1, 0.36, 1),
              transform 0.75s cubic-bezier(0.22, 1, 0.36, 1);
}

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

.sr-d1 { transition-delay: 0.08s; }
.sr-d2 { transition-delay: 0.16s; }
.sr-d3 { transition-delay: 0.24s; }

/* ======================================================
   CURSOR
====================================================== */
.cursor {
  width: 8px;
  height: 8px;
  background: var(--red);
  border-radius: 50%;
  position: fixed;
  pointer-events: none;
  z-index: 9999;
  transform: translate(-50%, -50%);
  transition: width 0.2s, height 0.2s, background 0.2s;
  mix-blend-mode: multiply;
}

body:has(a:hover) .cursor,
body:has(button:hover) .cursor {
  width: 20px;
  height: 20px;
  background: var(--red);
  opacity: 0.5;
}

/* ======================================================
   LANG SWITCHER
====================================================== */
.lang-switcher {
  display: flex;
  align-items: center;
  gap: 2px;
  font-family: var(--font-mono);
  font-size: 10px;
}

.lang-btn {
  background: none;
  border: none;
  font-family: var(--font-mono);
  font-size: 10px;
  letter-spacing: 0.06em;
  cursor: pointer;
  color: var(--text-dark);
  opacity: 0.35;
  padding: 2px 4px;
  transition: opacity 0.2s;
}

.lang-btn:hover { opacity: 0.7; }

.lang-btn.active {
  opacity: 1;
  font-weight: 700;
}

.lang-sep {
  opacity: 0.2;
  font-size: 10px;
  font-family: var(--font-mono);
}

/* ======================================================
   HAMBURGER TOGGLE
====================================================== */
.nav-toggle {
  display: none;
  flex-direction: column;
  justify-content: center;
  gap: 5px;
  width: 36px;
  height: 36px;
  background: none;
  border: 1px solid var(--border-l);
  cursor: pointer;
  padding: 8px;
  flex-shrink: 0;
}

.nav-toggle span {
  display: block;
  width: 100%;
  height: 1px;
  background: var(--text-dark);
  transition: transform 0.3s cubic-bezier(0.22, 1, 0.36, 1),
              opacity 0.3s;
  transform-origin: center;
}

.nav-toggle.open span:nth-child(1) {
  transform: translateY(6px) rotate(45deg);
}
.nav-toggle.open span:nth-child(2) {
  opacity: 0;
  transform: scaleX(0);
}
.nav-toggle.open span:nth-child(3) {
  transform: translateY(-6px) rotate(-45deg);
}

/* ======================================================
   MOBILE MENU
====================================================== */
.nav-mobile {
  display: none;
  position: fixed;
  top: 60px;
  left: 0;
  right: 0;
  z-index: 199;
  background: var(--bg-dark);
  border-bottom: 1px solid var(--border-d);
  padding: 0 24px 32px;
  transform: translateY(-8px);
  opacity: 0;
  pointer-events: none;
  transition: transform 0.35s cubic-bezier(0.22, 1, 0.36, 1),
              opacity 0.35s ease;
}

.nav-mobile.open {
  opacity: 1;
  transform: translateY(0);
  pointer-events: auto;
}

.nav-mobile ul {
  list-style: none;
  border-top: 1px solid var(--border-d);
  padding-top: 8px;
  margin-bottom: 24px;
}

.nav-mobile ul li a {
  display: block;
  font-family: var(--font-display);
  font-weight: 200;
  font-size: 28px;
  letter-spacing: -0.03em;
  color: var(--text-light);
  text-decoration: none;
  padding: 12px 0;
  border-bottom: 1px solid var(--border-d);
  transition: color 0.2s;
}

.nav-mobile ul li a:hover { color: rgba(244,243,238,0.5); }

.nav-mobile .mobile-cta {
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.nav-mobile .btn-primary {
  width: 100%;
  justify-content: space-between;
}

/* ======================================================
   RESPONSIVE
====================================================== */
@media (max-width: 768px) {

  nav { padding: 0 20px; }
  .nav-links,
  .nav-right { display: none; }
  .nav-toggle { display: flex; }
  .nav-mobile { display: block; }

  .hero-upper { padding: 48px 20px 0; }

  .hero-headline {
    font-size: clamp(28px, 8vw, 44px);
    margin-bottom: 32px;
  }

  .hero-mosaic {
    grid-template-columns: 1fr 1fr;
    grid-template-rows: 180px 120px;
  }

  .mosaic-cell--main {
    grid-column: span 2;
    grid-row: span 1;
  }

  .hero-bar {
    padding: 20px 20px;
    flex-direction: column;
    align-items: flex-start;
    gap: 16px;
  }

  .hero-bar-left {
    flex-direction: column;
    align-items: flex-start;
    gap: 16px;
    width: 100%;
  }

  .btn-primary { width: 100%; justify-content: space-between; }
  .hero-tagline { max-width: 100%; }
  .hero-bar-right { display: none; }

  .platform-body { padding: 48px 20px 60px; }

  .platform-intro {
    grid-template-columns: 1fr;
    gap: 20px;
    margin-bottom: 40px;
  }

  .section-topbar { padding: 0 20px; }

  .feat-grid { grid-template-columns: 1fr; }

  .detail-body {
    grid-template-columns: 1fr;
    padding: 48px 20px 72px;
    gap: 32px;
  }

  .detail-sidebar { flex-direction: row; gap: 20px; align-items: flex-start; }
  .detail-visual-box { flex: 1; height: 140px; }
  .detail-sub { white-space: nowrap; }

  footer {
    flex-direction: column;
    align-items: flex-start;
    gap: 24px;
    padding: 40px 20px;
  }

  .footer-nav { flex-wrap: wrap; gap: 16px; }
}

@media (max-width: 480px) {
  .hero-mosaic {
    grid-template-columns: 1fr;
    grid-template-rows: 200px 120px 120px;
  }

  .mosaic-cell--main { grid-column: span 1; }

  .mosaic-cell:nth-child(4),
  .mosaic-cell:nth-child(5) { display: none; }

  .detail-sidebar { flex-direction: column; }
}
