/* ================================================================
   LYTRIX AI — Style System
   Inspired by: Carbon Direct (dark hero, bold type)
                Puro.earth (clean white, stats, Nordic spacing)
                OpenAI (extreme minimal, smooth animations, future feel)
   ================================================================ */

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

:root {
  /* Palette */
  --white: #ffffff;
  --off-white: #fafafa;
  --light: #f2f2f2;
  --gray-100: #e8e8e8;
  --gray-200: #d1d1d1;
  --gray-400: #8a8a8a;
  --gray-600: #555555;
  --dark: #1a1a1a;
  --black: #0a0a0a;

  --green: #0a0a0a;
  --green-light: #f2f2f2;
  --green-glow: #0a0a0a;
  --accent: #0a0a0a;

  /* Typography */
  --font: 'Inter', 'Noto Sans JP', -apple-system, BlinkMacSystemFont, sans-serif;
  --font-mono: 'SF Mono', 'Fira Code', monospace;

  /* Spacing */
  --section-pad: clamp(80px, 12vw, 160px);
  --container: 1400px;

  /* Transitions */
  --ease: cubic-bezier(0.25, 0.46, 0.45, 0.94);
  --ease-out: cubic-bezier(0.16, 1, 0.3, 1);
}

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

body {
  font-family: var(--font);
  font-size: 16px;
  line-height: 1.7;
  color: var(--dark);
  background: var(--white);
  overflow-x: hidden;
}

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

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

/* ── Container ── */
.container {
  max-width: var(--container);
  margin: 0 auto;
  padding: 0 clamp(24px, 5vw, 64px);
}

/* ── Typography ── */
.h2 {
  font-size: clamp(36px, 5.5vw, 64px);
  font-weight: 600;
  line-height: 1.15;
  letter-spacing: -0.02em;
  color: var(--black);
}

.body-large {
  font-size: clamp(18px, 2vw, 22px);
  line-height: 1.8;
  color: var(--gray-600);
  margin-top: 20px;
}

.body-center {
  font-size: clamp(18px, 2vw, 22px);
  line-height: 1.8;
  color: var(--gray-600);
  text-align: center;
  max-width: 640px;
  margin: 16px auto 0;
}

.text-center { text-align: center; }
.color-white { color: var(--white); }
.color-white-muted { color: rgba(255,255,255,0.7); }

/* ── Section ── */
.section {
  padding: var(--section-pad) 0;
}

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

.section-light {
  background: var(--off-white);
}

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

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

.section-label {
  font-size: 13px;
  font-weight: 500;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--gray-400);
  margin-bottom: 32px;
}

.section-label-light {
  color: var(--gray-400);
}

/* ── Navigation (OpenAI-style minimal) ── */
.nav {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 1000;
  padding: 0 clamp(24px, 5vw, 64px);
  transition: background 0.4s var(--ease), box-shadow 0.4s var(--ease);
}

.nav.scrolled {
  background: rgba(255, 255, 255, 0.92);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  box-shadow: 0 1px 0 rgba(0,0,0,0.06);
}

.nav-inner {
  max-width: var(--container);
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 72px;
}

.nav-logo {
  display: flex;
  align-items: center;
  gap: 10px;
  font-weight: 600;
  font-size: 18px;
  z-index: 10;
}

.logo-mark {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 32px;
  height: 32px;
  color: var(--black);
}

.logo-mark svg {
  width: 100%;
  height: 100%;
  overflow: visible;
}

.logo-text {
  letter-spacing: -0.02em;
}

.nav .logo-text {
  color: var(--black);
  transition: color 0.4s var(--ease);
}

.nav.scrolled .logo-text {
  color: var(--black);
}

.nav .logo-mark {
  transition: background 0.4s var(--ease);
}

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

.nav-links a {
  font-size: 14px;
  font-weight: 450;
  color: var(--gray-600);
  transition: color 0.3s var(--ease);
}

.nav.scrolled .nav-links a {
  color: var(--gray-600);
}

.nav-links a:hover {
  color: var(--black);
}

.nav.scrolled .nav-links a:hover {
  color: var(--black);
}

.nav-cta {
  padding: 8px 20px !important;
  border: 1px solid var(--gray-200);
  border-radius: 100px;
  transition: all 0.3s var(--ease) !important;
}

.nav.scrolled .nav-cta {
  border-color: var(--gray-200);
}

.nav-cta:hover {
  background: var(--black);
  color: var(--white) !important;
  border-color: var(--black);
}

.nav.scrolled .nav-cta:hover {
  background: var(--black);
  color: var(--white) !important;
  border-color: var(--black);
}

.nav-toggle {
  display: none;
  background: none;
  border: none;
  cursor: pointer;
  width: 32px;
  height: 32px;
  position: relative;
  z-index: 10;
}

.nav-toggle span {
  display: block;
  width: 20px;
  height: 1.5px;
  background: var(--black);
  margin: 0 auto;
  transition: all 0.3s var(--ease);
}

.nav.scrolled .nav-toggle span {
  background: var(--black);
}

.nav-toggle span:first-child {
  margin-bottom: 6px;
}

/* ── Hero (Carbon Direct-inspired dark hero + Globe) ── */
.hero {
  position: relative;
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  background: var(--white);
}

.hero-bg {
  position: absolute;
  inset: 0;
  z-index: 1;
}

#globeCanvas {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: 100%;
  height: 100%;
  opacity: 0.35;
}

.hero-gradient {
  position: absolute;
  inset: 0;
  background:
    radial-gradient(ellipse at 50% 50%, transparent 30%, var(--white) 75%),
    linear-gradient(180deg, transparent 60%, var(--white) 100%);
  z-index: 2;
}

.hero-content {
  position: relative;
  z-index: 3;
  text-align: center;
  padding: 120px 24px 80px;
  max-width: 800px;
}

.hero-label {
  font-size: 13px;
  font-weight: 500;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  color: var(--gray-400);
  margin-bottom: 24px;
  opacity: 0;
  transform: translateY(20px);
  animation: fadeUp 0.8s var(--ease-out) 0.2s forwards;
}

.hero-title {
  font-size: clamp(56px, 11vw, 112px);
  font-weight: 700;
  line-height: 1.05;
  letter-spacing: -0.03em;
  color: var(--black);
  margin-bottom: 28px;
  opacity: 0;
  transform: translateY(30px);
  animation: fadeUp 0.8s var(--ease-out) 0.4s forwards;
}

.hero-title sub {
  font-size: 0.6em;
  vertical-align: baseline;
  position: relative;
  bottom: -0.05em;
}

.hero-title .arrow {
  display: inline-block;
  color: var(--black);
  font-weight: 300;
  margin: 0 4px;
}

.hero-accent {
  background: linear-gradient(135deg, #1e40af, #3b82f6, #60a5fa);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.hero-sub {
  font-size: clamp(20px, 2.5vw, 28px);
  line-height: 1.6;
  color: var(--black);
  letter-spacing: 0.04em;
  font-weight: 400;
  margin-bottom: 12px;
  opacity: 0;
  transform: translateY(20px);
  animation: fadeUp 0.8s var(--ease-out) 0.6s forwards;
}

.hero-sub2 {
  font-size: clamp(16px, 1.8vw, 20px);
  line-height: 1.8;
  color: var(--gray-600);
  margin-bottom: 40px;
  opacity: 0;
  transform: translateY(16px);
  animation: fadeUp 0.8s var(--ease-out) 0.75s forwards;
}

.hero-actions {
  display: flex;
  gap: 16px;
  justify-content: center;
  flex-wrap: wrap;
  opacity: 0;
  transform: translateY(20px);
  animation: fadeUp 0.8s var(--ease-out) 0.8s forwards;
}

.hero-scroll {
  position: absolute;
  bottom: 32px;
  left: 50%;
  transform: translateX(-50%);
  z-index: 3;
}

.scroll-line {
  width: 1px;
  height: 48px;
  background: linear-gradient(180deg, var(--gray-400), transparent);
  animation: scrollPulse 2s ease-in-out infinite;
}

/* ── Buttons ── */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 14px 32px;
  font-size: 15px;
  font-weight: 500;
  border-radius: 100px;
  border: 1px solid transparent;
  cursor: pointer;
  transition: all 0.3s var(--ease);
}

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

.btn-primary:hover {
  background: #333;
}

.btn-ghost {
  background: transparent;
  color: var(--dark);
  border-color: var(--gray-200);
}

.btn-ghost:hover {
  border-color: var(--black);
  background: rgba(0,0,0,0.03);
}

.btn-white {
  background: var(--white);
  color: var(--black);
  font-weight: 600;
}

.btn-white:hover {
  background: var(--light);
  transform: translateY(-1px);
}

/* ── Split Layout ── */
.split {
  display: grid;
  grid-template-columns: 1fr 1.3fr;
  gap: clamp(40px, 5vw, 64px);
  align-items: start;
}

/* ── Stats (Puro-style counters) ── */
.stats-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 40px;
  text-align: center;
}

.stat-number {
  font-size: clamp(48px, 7vw, 72px);
  font-weight: 700;
  letter-spacing: -0.03em;
  color: var(--white);
  line-height: 1;
}

.stat-unit {
  font-size: clamp(20px, 3vw, 28px);
  font-weight: 600;
  color: rgba(255,255,255,0.5);
}

.stat-label {
  font-size: 14px;
  color: rgba(255,255,255,0.5);
  margin-top: 12px;
  font-weight: 400;
}

/* ── Cards (Solution) ── */
.cards {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 24px;
  margin-top: 64px;
}

.card {
  background: var(--off-white);
  border: 1px solid var(--gray-100);
  border-radius: 16px;
  padding: 40px 32px;
  transition: all 0.4s var(--ease);
  position: relative;
}

.card:hover {
  transform: translateY(-4px);
  box-shadow: 0 20px 60px rgba(0,0,0,0.06);
  border-color: var(--gray-200);
}

.card-highlight {
  background: var(--black);
  color: var(--white);
  border-color: transparent;
}

.card-highlight:hover {
  box-shadow: 0 20px 60px rgba(0,0,0,0.2);
}

.card-highlight .card-body {
  color: rgba(255,255,255,0.65);
}

.card-highlight .card-list li {
  color: rgba(255,255,255,0.55);
}

.card-highlight .card-list li::before {
  color: rgba(255,255,255,0.4);
}

.card-icon {
  width: 48px;
  height: 48px;
  margin-bottom: 24px;
  color: var(--black);
}

.card-highlight .card-icon {
  color: var(--white);
}

.card-badge {
  display: inline-block;
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--white);
  background: rgba(255,255,255,0.12);
  padding: 4px 12px;
  border-radius: 100px;
  margin-bottom: 16px;
}

.card-title {
  font-size: 22px;
  font-weight: 600;
  margin-bottom: 12px;
  letter-spacing: -0.01em;
}

.card-body {
  font-size: 15px;
  line-height: 1.7;
  color: var(--gray-600);
  margin-bottom: 20px;
}

.card-list {
  list-style: none;
}

.card-list li {
  font-size: 14px;
  color: var(--gray-400);
  padding: 6px 0;
  padding-left: 20px;
  position: relative;
}

.card-list li::before {
  content: '→';
  position: absolute;
  left: 0;
  color: var(--gray-400);
  font-size: 13px;
}

/* ── Process Steps ── */
.process-steps {
  display: flex;
  align-items: flex-start;
  gap: 16px;
  margin-top: 64px;
}

.step {
  flex: 1;
  text-align: center;
  padding: 32px 20px;
}

.step-num {
  font-size: 48px;
  font-weight: 700;
  color: var(--gray-200);
  line-height: 1;
  margin-bottom: 16px;
  letter-spacing: -0.03em;
  opacity: 0.3;
}

.step-title {
  font-size: 20px;
  font-weight: 600;
  margin-bottom: 8px;
}

.step-body {
  font-size: 14px;
  line-height: 1.7;
  color: var(--gray-600);
}

.step-arrow {
  font-size: 24px;
  color: var(--gray-200);
  padding-top: 40px;
  flex-shrink: 0;
}

/* ── Features ── */
.feature-list {
  display: flex;
  flex-direction: column;
  gap: 32px;
  margin-top: 8px;
}

.feature {
  padding-bottom: 32px;
  border-bottom: 1px solid var(--gray-100);
}

.feature:last-child {
  border-bottom: none;
  padding-bottom: 0;
}

.feature-title {
  font-size: 20px;
  font-weight: 600;
  margin-bottom: 6px;
  color: var(--black);
}

.feature p {
  font-size: 17px;
  line-height: 1.7;
  color: var(--gray-600);
}

/* ── Impact Grid ── */
.impact-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 40px;
  margin-top: 64px;
}

.impact-item {
  text-align: center;
  padding: 40px 20px;
  border: 1px solid rgba(255,255,255,0.08);
  border-radius: 16px;
  transition: border-color 0.3s var(--ease);
}

.impact-item:hover {
  border-color: rgba(255,255,255,0.15);
}

.impact-number {
  font-size: clamp(32px, 5vw, 48px);
  font-weight: 700;
  color: var(--white);
  letter-spacing: -0.02em;
  line-height: 1.2;
}

.impact-small {
  font-size: 0.6em;
  font-weight: 400;
  opacity: 0.5;
}

.impact-label {
  font-size: 14px;
  color: rgba(255,255,255,0.45);
  margin-top: 8px;
}

/* ── Partner Cards ── */
.partner-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 24px;
  margin-top: 48px;
}

.partner-card {
  padding: 40px 32px;
  border: 1px solid var(--gray-100);
  border-radius: 16px;
  transition: all 0.3s var(--ease);
}

.partner-card:hover {
  border-color: var(--black);
}

.partner-card h3 {
  font-size: 18px;
  font-weight: 600;
  margin-bottom: 12px;
}

.partner-card p {
  font-size: 15px;
  line-height: 1.7;
  color: var(--gray-600);
  margin-bottom: 20px;
}

.link-arrow {
  font-size: 14px;
  font-weight: 500;
  color: var(--black);
  transition: gap 0.3s var(--ease);
  display: inline-flex;
  align-items: center;
  gap: 4px;
}

.link-arrow:hover {
  gap: 8px;
}

/* ── CTA ── */
.section-cta {
  background: var(--black);
  padding: var(--section-pad) 0;
}

.section-cta .h2 {
  color: var(--white);
}

.cta-actions {
  margin-top: 40px;
}

/* ── Footer (OpenAI-style minimal) ── */
.footer {
  background: var(--black);
  padding: 48px 0;
  border-top: 1px solid rgba(255,255,255,0.06);
}

.footer-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.footer .logo-text {
  color: var(--white);
}

.footer-copy {
  font-size: 12px;
  color: rgba(255,255,255,0.3);
  margin-top: 4px;
}

.footer-links {
  display: flex;
  gap: 32px;
}

.footer-links a {
  font-size: 13px;
  color: rgba(255,255,255,0.4);
  transition: color 0.3s var(--ease);
}

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

/* ── Animations ── */
@keyframes fadeUp {
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes scrollPulse {
  0%, 100% { opacity: 0.3; }
  50% { opacity: 1; }
}

/* Scroll reveal */
.reveal {
  opacity: 0;
  transform: translateY(32px);
  transition: opacity 0.7s var(--ease-out), transform 0.7s var(--ease-out);
}

.reveal.visible {
  opacity: 1;
  transform: translateY(0);
}

/* ── Live Counter ── */
.live-grid {
  display: flex;
  justify-content: center;
  gap: 80px;
  margin-top: 32px;
}

.live-item {
  text-align: center;
}

.live-num {
  font-size: clamp(48px, 8vw, 72px);
  font-weight: 700;
  color: var(--black);
  letter-spacing: -0.03em;
  line-height: 1;
}

.live-unit {
  font-size: clamp(18px, 3vw, 24px);
  font-weight: 600;
  color: var(--gray-400);
  margin-left: 4px;
}

.live-desc {
  font-size: 14px;
  color: var(--gray-400);
  margin-top: 8px;
}

/* ── Company ── */
.company-grid {
  max-width: 600px;
}

.company-row {
  display: flex;
  padding: 16px 0;
  border-bottom: 1px solid var(--gray-100);
  font-size: 16px;
  line-height: 1.6;
}

.company-row:last-child {
  border-bottom: none;
}

.company-label {
  width: 120px;
  flex-shrink: 0;
  color: var(--gray-400);
  font-size: 14px;
}

/* ── Policy Page ── */
.policy h3 {
  font-size: 18px;
  font-weight: 600;
  color: var(--black);
  margin-top: 40px;
  margin-bottom: 8px;
}

.policy p {
  font-size: 16px;
  line-height: 1.8;
  color: var(--gray-600);
  margin-bottom: 8px;
}

.policy ul {
  list-style: none;
  margin-bottom: 8px;
}

.policy li {
  font-size: 16px;
  line-height: 1.8;
  color: var(--gray-600);
  padding-left: 16px;
  position: relative;
}

.policy li::before {
  content: '·';
  position: absolute;
  left: 0;
  color: var(--gray-400);
}

/* ── Contact Form ── */
.form {
  max-width: 560px;
  margin: 48px auto 0;
}

.form-group {
  margin-bottom: 24px;
}

.form-label {
  display: block;
  font-size: 14px;
  font-weight: 500;
  color: var(--black);
  margin-bottom: 6px;
}

.form-input,
.form-textarea {
  width: 100%;
  padding: 12px 16px;
  font-family: var(--font);
  font-size: 16px;
  color: var(--black);
  background: var(--white);
  border: 1px solid var(--gray-200);
  border-radius: 8px;
  outline: none;
  transition: border-color 0.25s;
}

.form-input:focus,
.form-textarea:focus {
  border-color: var(--black);
}

.form-textarea {
  min-height: 140px;
  resize: vertical;
}

.form-submit {
  width: 100%;
  padding: 14px;
  font-family: var(--font);
  font-size: 16px;
  font-weight: 500;
  color: var(--white);
  background: var(--black);
  border: none;
  border-radius: 8px;
  cursor: pointer;
  transition: background 0.25s;
}

.form-submit:hover {
  background: #333;
}

/* ── Approach Grid ── */
.approach-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 40px 64px;
}

.approach-item h4 {
  font-size: 20px;
  font-weight: 600;
  color: var(--black);
  margin-bottom: 8px;
}

.approach-item p {
  font-size: 17px;
  line-height: 1.7;
  color: var(--gray-600);
}

/* ── Responsive ── */
@media (max-width: 900px) {
  .split {
    grid-template-columns: 1fr;
    gap: 32px;
  }

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

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

  .live-grid {
    flex-direction: column;
    gap: 40px;
  }

  .stats-grid {
    grid-template-columns: 1fr;
    gap: 48px;
  }

  .process-steps {
    flex-direction: column;
    gap: 0;
  }

  .step-arrow {
    transform: rotate(90deg);
    padding: 0;
    text-align: center;
    width: 100%;
  }

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

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

  .nav-links {
    display: none;
    position: fixed;
    inset: 0;
    background: var(--white);
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 32px;
  }

  .nav-links.open {
    display: flex;
  }

  .nav-links.open a {
    color: var(--black) !important;
    font-size: 24px;
    font-weight: 500;
  }

  .nav-toggle {
    display: block;
  }

  .footer-inner {
    flex-direction: column;
    gap: 24px;
    text-align: center;
  }

  .footer-links {
    flex-wrap: wrap;
    justify-content: center;
  }
}

@media (max-width: 600px) {
  .section { padding: clamp(48px, 8vw, 80px) 0; }
  .container { padding: 0 20px; }

  .hero-title { font-size: clamp(24px, 8vw, 36px); }
  .hero-sub { font-size: 12px; }
  .hero-sub2 { font-size: 10px; padding: 0 10px; }
  .hero-content { padding: 80px 20px 50px; max-width: 100%; box-sizing: border-box; }
  .hero-actions { justify-content: center; flex-wrap: wrap; padding: 0 20px; }
  .btn { max-width: 100%; box-sizing: border-box; font-size: 13px; padding: 11px 24px; }

  .h2 { font-size: clamp(22px, 6vw, 32px); }
  .body-large { font-size: 12px; margin-top: 10px; }
  .body-center { font-size: 12px; }
  .section-label { font-size: 9px; margin-bottom: 14px; }

  .feature-title { font-size: 13px; }
  .feature p { font-size: 11px; }
  .feature { padding-bottom: 20px; gap: 20px; }

  .step-title { font-size: 13px; }
  .step-body { font-size: 10px; }
  .step-num { font-size: 28px; }
  .step-arrow { font-size: 16px; }

  .card-title { font-size: 14px; }
  .card-body { font-size: 11px; }
  .card { padding: 28px 24px; }

  .stats-grid { gap: 20px; }
  .stat-number { font-size: clamp(28px, 8vw, 40px); }
  .stat-unit { font-size: 14px; }
  .stat-label { font-size: 9px; }

  .company-label { width: 60px; font-size: 9px; }
  .company-row { font-size: 11px; padding: 10px 0; }

  .live-grid { gap: 40px; }
  .live-num { font-size: clamp(28px, 8vw, 40px); }
  .live-unit { font-size: 14px; }
  .live-desc { font-size: 9px; }

  .footer-copy { font-size: 10px; }
  .footer-links a { font-size: 11px; }
}
