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

:root {
  --bg:            #212121;
  --panel-bg:      #1a1a1a;
  --panel-bg-2:    #1e1e1e;
  --accent:        #007aff;
  --accent-dim:    rgba(0,122,255,0.10);
  --text:          #ffffff;
  --text-2:        rgba(255,255,255,0.55);
  --text-3:        rgba(255,255,255,0.22);
  --border:        rgba(255,255,255,0.08);
  --border-strong: rgba(255,255,255,0.15);
  --max-w:         900px;
  --nav-h:         52px;
  --side-pad:      40px;
  --radius:        6px;
}

html {
  overflow-y: scroll;
  background: var(--bg);
  color: var(--text);
  font-family: -apple-system, BlinkMacSystemFont, "SF Pro Text", "Segoe UI",
               Helvetica, Arial, sans-serif;
  -webkit-font-smoothing: antialiased;
  font-size: 16px;
}

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

/* ─── Navigation ─────────────────────────────────────────────────────────────── */
#main-nav {
  position: fixed;
  top: 0; left: 0; right: 0;
  height: var(--nav-h);
  z-index: 100;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 32px;
  background: rgba(33,33,33,0.82);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--border);
}

#nav-logo {
  display: flex;
  align-items: center;
  gap: 10px;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.3s ease;
  user-select: none;
}

#nav-logo img  { width: 22px; height: 22px; }
#nav-logo span { font-size: 0.8rem; font-weight: 400; letter-spacing: 0.04em; }

.nav-links {
  position: absolute;
  left: 50%;
  transform: translateX(-50%);
  display: flex;
  align-items: center;
  gap: 4px;
  list-style: none;
}

.nav-link {
  font-size: 0.72rem;
  font-weight: 500;
  letter-spacing: 0.09em;
  color: var(--text-2);
  padding: 6px 14px;
  border-radius: var(--radius);
  cursor: pointer;
  transition: color 0.2s, background 0.2s;
  user-select: none;
}

.nav-link:hover  { color: var(--text); background: rgba(255,255,255,0.05); }
.nav-link.active { color: var(--text); }

/* ─── Sections (base) ────────────────────────────────────────────────────────── */
section {
  scroll-margin-top: var(--nav-h);
  position: relative;
}

section:not(#welcome) {
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: calc(var(--nav-h) + 64px) var(--side-pad) 120px;
}

.section-inner {
  width: 100%;
  max-width: var(--max-w);
}

.section-label {
  font-size: 0.62rem;
  font-weight: 600;
  letter-spacing: 0.16em;
  color: var(--accent);
  text-transform: uppercase;
  margin-bottom: 48px;
}

/* ─── Scroll animation: initial state ───────────────────────────────────────── */
[data-scroll] {
  opacity: 0;
  will-change: opacity, transform;
}

/* ─── Section: WELCOME ───────────────────────────────────────────────────────── */
#welcome {
  height: 100dvh;
  min-height: 100dvh;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  background: var(--bg);
}

#hero-canvas {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
}

/* Ambient radial glow behind hero content */
.welcome-hero::before {
  content: '';
  position: absolute;
  top: 50%; left: 50%;
  transform: translate(-50%, -60%);
  width: 480px;
  height: 320px;
  background: radial-gradient(ellipse at center,
    rgba(0,122,255,0.07) 0%,
    transparent 70%);
  pointer-events: none;
  z-index: 0;
}

.welcome-hero {
  position: relative;
  z-index: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  gap: 16px;
  padding: 0 var(--side-pad);
  max-width: 720px;
}

#hero-logo {
  width: 150px;
  height: 150px;
  display: block;
  object-fit: contain;
  margin-bottom: 6px;
  filter:
    drop-shadow(0 0 18px rgba(0,122,255,0.75))
    drop-shadow(0 0 48px rgba(0,122,255,0.35))
    drop-shadow(0 6px 24px rgba(0,0,0,0.85));
}

.hero-brand {
  font-size: 3rem;
  font-weight: 600;
  letter-spacing: -0.025em;
  color: var(--text);
  text-shadow:
    0 0 20px rgba(0,122,255,0.55),
    0 0 60px rgba(0,122,255,0.25),
    0 3px 22px rgba(0,0,0,0.9);
}

.hero-sep {
  width: 52px;
  height: 1px;
  background: var(--border-strong);
  margin: 4px 0;
}

.welcome-tag {
  font-size: 1.85rem;
  font-weight: 600;
  letter-spacing: -0.015em;
  line-height: 1.2;
  background-image: linear-gradient(92deg, #6ec6ff, #007aff, #0050cc, #6ec6ff);
  background-size: 300% auto;
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  animation: tag-gradient 9s linear infinite;
}

@keyframes tag-gradient {
  0%   { background-position: 0% center; }
  100% { background-position: 300% center; }
}

.welcome-sub {
  font-size: 1.1rem;
  font-weight: 400;
  color: var(--text-2);
  letter-spacing: 0.01em;
  line-height: 1.5;
}

.hero-cta {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
  flex-wrap: wrap;
  margin-top: 8px;
}

.cta-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  height: 48px;
  padding: 0 28px;
  border-radius: var(--radius);
  font-size: 0.95rem;
  font-weight: 600;
  letter-spacing: 0.02em;
  border: none;
  cursor: pointer;
  transition: opacity 0.2s;
}

.cta-btn:hover { opacity: 0.82; }

.cta-btn-primary   { background: var(--accent); color: #fff; }
.cta-btn-secondary {
  background: var(--panel-bg-2);
  border: 1px solid var(--border-strong);
  color: var(--text);
}

.cta-soon {
  font-size: 0.8rem;
  color: var(--text-3);
  letter-spacing: 0.04em;
}

/* ── Hero entry animations ── */
.hero-line {
  opacity: 0;
  transform: translateY(12px);
  transition: opacity 0.55s ease-out, transform 0.55s ease-out;
}

.hero-line.visible {
  opacity: 1;
  transform: translateY(0);
}

.hero-fade {
  opacity: 0;
  transition: opacity 0.65s ease-out;
}

.hero-fade.visible { opacity: 1; }

/* ─── Section: CONCEPT ───────────────────────────────────────────────────────── */
.concept-layout {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 48px;
  align-items: center;
}

.concept-card {
  background: var(--panel-bg);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 28px 28px;
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.concept-card p {
  font-size: 0.84rem;
  color: var(--text-2);
  line-height: 1.75;
}

.concept-diagram-wrap {
  display: flex;
  align-items: center;
  justify-content: center;
}

#concept-diagram { width: 100%; }

#concept-diagram .cd-svg {
  width: 100%;
  height: auto;
  overflow: visible;
}

/* ─── Section: SOFTWARE ──────────────────────────────────────────────────────── */
#software .section-inner {
  display: flex;
  flex-direction: column;
}

.sw-rows {
  display: flex;
  flex-direction: column;
  gap: 80px;
}

.sw-row {
  display: grid;
  gap: 56px;
  align-items: center;
}

/* Row A: image left (smaller), text right (more space) */
.sw-row--a {
  grid-template-columns: 5fr 7fr;
}

/* Row B (flip): copy left (less), image right (more) */
.sw-row--b {
  grid-template-columns: 2fr 3fr;
}

.sw-row--flip .sw-visual { order: 2; }
.sw-row--flip .sw-copy   { order: 1; }

.sw-visual img {
  width: 100%;
  border-radius: 8px;
  border: 1px solid var(--border);
  display: block;
  box-shadow: 0 12px 48px rgba(0,0,0,0.55), 0 3px 14px rgba(0,0,0,0.35);
}

.sw-copy {
  display: flex;
  flex-direction: column;
  gap: 10px;
  text-align: left;
}

.sw-row--a > .sw-copy {
  justify-self: center;
}

.sw-title {
  font-size: 1.45rem;
  font-weight: 700;
  letter-spacing: -0.02em;
  line-height: 1.2;
  color: var(--text);
}

.sw-desc {
  font-size: 0.9rem;
  color: var(--text-2);
  line-height: 1.6;
}

/* ─── Section: FEATURES ──────────────────────────────────────────────────────── */
.features-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 14px;
}

.feature-card {
  background: var(--panel-bg);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 22px 14px 20px;
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  gap: 10px;
  transition: border-color 0.25s, background 0.25s;
}

.feature-card:hover {
  border-color: rgba(0,122,255,0.35);
  background: rgba(0,122,255,0.05);
}

.feature-icon         { width: 48px; height: 48px; flex-shrink: 0; }
.feature-icon svg     { width: 100%; height: 100%; }

.feature-label {
  font-size: 0.78rem;
  font-weight: 600;
  letter-spacing: 0.05em;
  color: var(--text);
}

.feature-desc {
  font-size: 0.78rem;
  color: var(--text-2);
  line-height: 1.6;
}

/* ─── Section: INFO / ABOUT ──────────────────────────────────────────────────── */
#info {
  min-height: 60vh;
}

#info .section-inner {
  display: flex;
  flex-direction: column;
}

.info-layout {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 24px;
  align-items: stretch;
}

.info-card {
  background: var(--panel-bg);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 36px 36px;
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: 18px;
}

.info-line {
  font-size: 0.9rem;
  color: var(--text-2);
  line-height: 1.65;
}

.info-line a {
  color: var(--accent);
  transition: opacity 0.2s;
}

.info-line a:hover { opacity: 0.75; }

.info-visual {
  border-radius: var(--radius);
  overflow: hidden;
  min-height: 200px;
}

.info-visual img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  border-radius: var(--radius);
}

/* ─── Footer ─────────────────────────────────────────────────────────────────── */
#site-footer {
  display: flex;
  justify-content: center;
  align-items: center;
  padding: 28px;
  border-top: 1px solid var(--border);
}

.social-bar {
  display: flex;
  align-items: center;
  gap: 22px;
}

.social-link {
  display: flex;
  width: 18px;
  height: 18px;
  color: var(--text-3);
  transition: color 0.2s;
}

.social-link:hover { color: var(--text-2); }
.social-link svg   { width: 100%; height: 100%; }

/* ─── Responsive: ≤ 768px ────────────────────────────────────────────────────── */
@media (max-width: 768px) {

  :root { --side-pad: 20px; }

  .nav-links { display: none; }

  /* Concept: stack */
  .concept-layout { grid-template-columns: 1fr; gap: 32px; }

  /* Software: stack */
  .sw-row--a,
  .sw-row--b {
    grid-template-columns: 1fr;
    gap: 28px;
  }

  .sw-row--flip .sw-visual { order: 0; }
  .sw-row--flip .sw-copy   { order: 0; }

  /* Features: 2 columns */
  .features-grid { grid-template-columns: repeat(2, 1fr); }

  /* Info: stack on mobile */
  .info-layout {
    grid-template-columns: 1fr;
  }

  .info-visual { min-height: 220px; }

  .info-card { padding: 24px 20px; }

  section:not(#welcome) {
    padding-left: var(--side-pad);
    padding-right: var(--side-pad);
  }
}

/* ─── Responsive: < 480px ────────────────────────────────────────────────────── */
@media (max-width: 480px) {
  .welcome-tag    { font-size: 1.3rem; }
  .hero-brand     { font-size: 2.1rem; }
  .sw-title       { font-size: 1.2rem; }
  .features-grid  { grid-template-columns: 1fr; }
}

/* ─── Utility ─────────────────────────────────────────────────────────────────── */
.hidden { display: none !important; }
