/* ======================================================
   Softmap GroupWeb — DeepMind-inspired Stylesheet
   ====================================================== */

/* ── Custom Properties ─────────────────────────────── */

:root {
  --font-sans: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, 'Noto Sans SC', sans-serif;
  --nav-height: 60px;
  --max-width: 1320px;
  --section-gap: 72px;
  --radius: 12px;
  --radius-lg: 20px;
}

/* ── Dark Theme ────────────────────────────────────── */

[data-theme="dark"] {
  --bg-0: #000000;
  --bg-1: #0a0a0a;
  --bg-2: #141414;
  --bg-3: #1a1a1a;
  --bg-card: #141414;
  --border: rgba(255, 255, 255, 0.08);
  --border-hover: rgba(255, 255, 255, 0.18);
  --text-0: #ffffff;
  --text-1: #e5e5e5;
  --text-2: #a3a3a3;
  --text-3: #737373;
  --nav-bg: rgba(0, 0, 0, 0.7);
  --hero-bg: #000000;
  --footer-bg: #0a0a0a;
  color-scheme: dark;
}

/* ── Light Theme ───────────────────────────────────── */

[data-theme="light"] {
  --bg-0: #ffffff;
  --bg-1: #fafafa;
  --bg-2: #f5f5f5;
  --bg-3: #ebebeb;
  --bg-card: #f5f5f5;
  --border: rgba(0, 0, 0, 0.08);
  --border-hover: rgba(0, 0, 0, 0.18);
  --text-0: #0a0a0a;
  --text-1: #1a1a1a;
  --text-2: #6b6b6b;
  --text-3: #999999;
  --nav-bg: rgba(255, 255, 255, 0.7);
  --hero-bg: #ffffff;
  --footer-bg: #f5f5f5;
  color-scheme: light;
}

/* ── Reset ─────────────────────────────────────────── */

*, *::before, *::after {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

html { scroll-behavior: smooth; }

body {
  font-family: var(--font-sans);
  background: var(--bg-0);
  color: var(--text-1);
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  transition: background 0.4s, color 0.4s;
}

a { color: inherit; text-decoration: none; }
button { font: inherit; border: none; cursor: pointer; background: none; color: inherit; }
img { display: block; max-width: 100%; }

/* ── Navigation ────────────────────────────────────── */

.navbar {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  height: var(--nav-height);
  z-index: 1000;
  display: flex;
  align-items: center;
  padding: 0 40px;
  transition: background 0.3s, backdrop-filter 0.3s;
}

.navbar.scrolled {
  background: var(--nav-bg);
  backdrop-filter: blur(24px);
  -webkit-backdrop-filter: blur(24px);
  border-bottom: 1px solid var(--border);
}

.nav-brand {
  display: flex;
  align-items: center;
  gap: 10px;
  font-weight: 700;
  font-size: 1.15rem;
  letter-spacing: -0.01em;
  margin-right: 48px;
  color: var(--text-0);
  flex-shrink: 0;
}

.nav-logo {
  width: 28px;
  height: 28px;
  border-radius: 6px;
  background: linear-gradient(135deg, #6366f1, #8b5cf6);
  display: flex;
  align-items: center;
  justify-content: center;
  color: #fff;
  font-weight: 800;
  font-size: 0.8rem;
}

.nav-links {
  display: flex;
  align-items: center;
  gap: 4px;
  flex: 1;
  overflow-x: auto;
  scrollbar-width: none;
}

.nav-links::-webkit-scrollbar { display: none; }

.nav-links a {
  padding: 6px 14px;
  border-radius: 999px;
  color: var(--text-2);
  font-size: 0.87rem;
  font-weight: 500;
  white-space: nowrap;
  transition: color 0.2s, background 0.2s;
}

.nav-links a:hover, .nav-links a.active {
  color: var(--text-0);
}

.nav-controls {
  display: flex;
  align-items: center;
  gap: 4px;
  margin-left: auto;
  flex-shrink: 0;
}

.nav-btn {
  width: 36px;
  height: 36px;
  border-radius: 999px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--text-2);
  font-size: 0.82rem;
  font-weight: 600;
  transition: background 0.2s, color 0.2s;
}

.nav-btn:hover {
  background: var(--bg-3);
  color: var(--text-0);
}

/* ── Hero ──────────────────────────────────────────── */

.hero {
  display: flex;
  align-items: center;
  padding: calc(var(--nav-height) + 48px) 40px 48px;
  gap: 60px;
  background: var(--hero-bg);
  overflow: hidden;
}

.hero-text {
  flex: 0 0 420px;
  max-width: 480px;
}

.hero-company {
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--text-3);
  letter-spacing: 0.12em;
  text-transform: uppercase;
  margin-bottom: 20px;
}

.hero-slogan {
  font-size: clamp(3rem, 5.5vw, 4.5rem);
  font-weight: 800;
  line-height: 1.05;
  letter-spacing: -0.03em;
  color: var(--text-0);
  margin-bottom: 20px;
}

.hero-slogan-en {
  display: block;
  margin-top: 10px;
  font-size: 0.4em;
  font-weight: 600;
  letter-spacing: -0.01em;
  color: var(--text-2);
}

.hero-subtitle {
  font-size: 1.1rem;
  color: var(--text-2);
  line-height: 1.6;
  margin-bottom: 36px;
}

.hero-cta {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: 0.95rem;
  font-weight: 600;
  color: var(--text-0);
  padding: 12px 0;
  transition: gap 0.2s;
}

.hero-cta:hover { gap: 12px; }

.hero-cta svg {
  transition: transform 0.2s;
}

.hero-cta:hover svg { transform: translateX(3px); }

/* ── Hero Carousel ─────────────────────────────────── */

.hero-carousel {
  flex: 1;
  display: flex;
  gap: 16px;
  overflow-x: auto;
  scroll-snap-type: x mandatory;
  scrollbar-width: none;
  padding: 20px 0;
}

.hero-carousel::-webkit-scrollbar { display: none; }

.hero-card {
  flex: 0 0 280px;
  height: 400px;
  border-radius: var(--radius-lg);
  overflow: hidden;
  position: relative;
  scroll-snap-align: start;
  cursor: pointer;
  transition: transform 0.3s;
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  padding: 28px;
}

.hero-card:hover { transform: scale(1.02); }

.hero-card-bg {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  border-radius: var(--radius-lg);
}

.hero-card-overlay {
  position: relative;
  z-index: 1;
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  height: 100%;
  background: linear-gradient(to top, rgba(0,0,0,0.7) 0%, rgba(0,0,0,0.1) 50%, transparent 100%);
  border-radius: var(--radius-lg);
  padding: 28px;
  margin: -28px;
}

.hero-card-icon {
  width: 40px;
  height: 40px;
  border-radius: 10px;
  object-fit: contain;
  margin-bottom: 12px;
  filter: drop-shadow(0 2px 6px rgba(0,0,0,0.4));
}

.hero-card-name {
  font-size: 1.3rem;
  font-weight: 700;
  color: #fff;
  margin-bottom: 4px;
  text-shadow: 0 1px 4px rgba(0,0,0,0.5);
}

.hero-card-desc {
  font-size: 0.8rem;
  color: rgba(255, 255, 255, 0.85);
  line-height: 1.5;
  text-shadow: 0 1px 3px rgba(0,0,0,0.5);
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

/* ── Section ───────────────────────────────────────── */

.category-section {
  padding: 0 40px;
  margin-bottom: var(--section-gap);
}

.category-section:first-child {
  padding-top: 40px;
}

.section-header {
  max-width: var(--max-width);
  margin: 0 auto 36px;
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 20px;
}

.section-header-text h2 {
  font-size: clamp(1.8rem, 3vw, 2.5rem);
  font-weight: 700;
  letter-spacing: -0.02em;
  color: var(--text-0);
  margin-bottom: 6px;
}

.section-header-text p {
  font-size: 1rem;
  color: var(--text-3);
}

/* ── Product Row ───────────────────────────────────── */

.product-row {
  max-width: var(--max-width);
  margin: 0 auto;
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
  gap: 16px;
}

/* ── Product Card (DeepMind style) ─────────────────── */

.product-card {
  display: flex;
  flex-direction: column;
  border-radius: var(--radius);
  background: var(--bg-card);
  border: 1px solid var(--border);
  transition: border-color 0.25s, background 0.25s, transform 0.25s;
  cursor: pointer;
  text-decoration: none;
  overflow: hidden;
}

.product-card:hover {
  border-color: var(--border-hover);
  transform: translateY(-2px);
}

.card-image-wrap {
  width: 100%;
  height: 160px;
  overflow: hidden;
  border-bottom: 1px solid var(--border);
}

.card-image {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.4s ease;
}

.product-card:hover .card-image {
  transform: scale(1.05);
}

.card-body {
  padding: 20px;
  display: flex;
  flex-direction: column;
  flex: 1;
}

.card-icon {
  width: 32px;
  height: 32px;
  margin-bottom: 12px;
  border-radius: 8px;
  object-fit: contain;
}

.card-title {
  font-size: 1.05rem;
  font-weight: 700;
  color: var(--text-0);
  margin-bottom: 6px;
  letter-spacing: -0.01em;
}

.card-desc {
  font-size: 0.84rem;
  color: var(--text-2);
  line-height: 1.6;
  flex: 1;
}

.card-arrow {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  margin-top: 14px;
  color: var(--text-3);
  transition: color 0.2s, transform 0.2s;
}

.product-card:hover .card-arrow {
  color: var(--text-0);
  transform: translateX(3px);
}

/* ── Stats Banner ──────────────────────────────────── */

.stats-banner {
  display: flex;
  gap: 60px;
  padding: 40px 40px;
  justify-content: center;
  flex-wrap: wrap;
  border-top: 1px solid var(--border);
  border-bottom: 1px solid var(--border);
  margin-bottom: var(--section-gap);
}

.stat-item {
  text-align: center;
}

.stat-value {
  font-size: clamp(2rem, 4vw, 3rem);
  font-weight: 800;
  letter-spacing: -0.03em;
  color: var(--text-0);
}

.stat-label {
  font-size: 0.85rem;
  color: var(--text-3);
  margin-top: 4px;
}

/* ── Footer ────────────────────────────────────────── */

.footer {
  background: var(--footer-bg);
  border-top: 1px solid var(--border);
  padding: 60px 40px;
  transition: background 0.4s;
}

.footer-inner {
  max-width: var(--max-width);
  margin: 0 auto;
  display: grid;
  grid-template-columns: 2fr 1fr 1fr 1fr;
  gap: 40px;
}

.footer-brand-block h3 {
  font-size: 1.4rem;
  font-weight: 700;
  color: var(--text-0);
  margin-bottom: 12px;
  letter-spacing: -0.01em;
}

.footer-brand-block p {
  font-size: 0.9rem;
  color: var(--text-3);
  line-height: 1.6;
  max-width: 340px;
}

.footer-col h4 {
  font-size: 0.82rem;
  font-weight: 600;
  color: var(--text-3);
  letter-spacing: 0.06em;
  text-transform: uppercase;
  margin-bottom: 16px;
}

.footer-col ul {
  list-style: none;
}

.footer-col li {
  margin-bottom: 10px;
}

.footer-col a {
  font-size: 0.88rem;
  color: var(--text-2);
  transition: color 0.2s;
}

.footer-col a:hover {
  color: var(--text-0);
}

.footer-bottom {
  max-width: var(--max-width);
  margin: 40px auto 0;
  padding-top: 24px;
  border-top: 1px solid var(--border);
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-size: 0.82rem;
  color: var(--text-3);
}

.footer-logo {
  display: flex;
  align-items: center;
  gap: 8px;
  font-weight: 700;
  font-size: 0.95rem;
  color: var(--text-2);
}

.footer-logo .nav-logo {
  width: 22px;
  height: 22px;
  font-size: 0.65rem;
  border-radius: 5px;
}

/* ── Animations ────────────────────────────────────── */

@keyframes fadeInUp {
  from { opacity: 0; transform: translateY(16px); }
  to   { opacity: 1; transform: translateY(0); }
}

.product-card {
  animation: fadeInUp 0.45s ease both;
}

/* ── Responsive ────────────────────────────────────── */

@media (max-width: 1024px) {
  .hero {
    flex-direction: column;
    align-items: flex-start;
    min-height: auto;
    padding-bottom: 60px;
  }

  .hero-text {
    flex: none;
    max-width: 100%;
  }

  .hero-carousel {
    width: 100%;
  }

  .hero-card {
    flex: 0 0 240px;
    height: 340px;
  }
}

@media (max-width: 768px) {
  .navbar { padding: 0 20px; }
  .nav-brand { margin-right: 20px; }
  .nav-links { display: none; }

  .hero { padding: calc(var(--nav-height) + 24px) 20px 40px; gap: 32px; }
  .hero-slogan { font-size: 2.4rem; }

  .category-section { padding: 0 20px; margin-bottom: 64px; }

  .product-row {
    grid-template-columns: 1fr;
  }

  .stats-banner {
    gap: 32px;
    padding: 40px 20px;
  }

  .footer { padding: 40px 20px; }
  .footer-inner {
    grid-template-columns: 1fr 1fr;
    gap: 32px;
  }

  .footer-bottom {
    flex-direction: column;
    gap: 12px;
    text-align: center;
  }

  .hero-card {
    flex: 0 0 220px;
    height: 300px;
    padding: 20px;
  }
}

@media (max-width: 480px) {
  .footer-inner { grid-template-columns: 1fr; }
  .hero-card { flex: 0 0 200px; height: 280px; }
}

/* ── Accessibility ─────────────────────────────────── */

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    transition-duration: 0.01ms !important;
  }
}

:focus-visible {
  outline: 2px solid #6366f1;
  outline-offset: 2px;
}
