/* ══════════════════════════════════════════════════════════
   DESIGN TOKENS
══════════════════════════════════════════════════════════ */
:root {
  /* Background & ink */
  --bg:            #000000;
  --on-bg:         #ffffff;
  --muted:         #888888;

  /* Surface */
  --surface-bg:    rgba(255, 255, 255, 0.04);
  --surface-hover: rgba(255, 255, 255, 0.07);
  --surface-border:rgba(255, 255, 255, 0.09);

  /* Accent colours — dark mode */
  --green-accent:       #66bb6a;
  --green-section-bg:   rgba(27, 94, 32, 0.22);
  --yellow-accent:      #fdd835;
  --yellow-section-bg:  rgba(245, 127, 23, 0.14);
  --red-accent:         #ef9a9a;
  --red-section-bg:     rgba(183, 28, 28, 0.22);
  --blue-accent:        #4fc3f7;
  --blue-section-bg:    rgba(1, 87, 155, 0.22);

  /* Layout */
  --max-w:      1240px;
  --nav-h:      68px;
  --pad-h:      44px;
  --section-min: 760px;

  /* Radii */
  --r-pill: 9999px;
  --r-xl:   32px;
  --r-lg:   22px;
  --r-md:   14px;
  --r-sm:    8px;

  /* Font */
  --font: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
}

/* Light mode overrides */
[data-theme="light"] {
  --bg:            #ffffff;
  --on-bg:         #000000;
  --muted:         #555555;
  --surface-bg:    rgba(0, 0, 0, 0.03);
  --surface-hover: rgba(0, 0, 0, 0.05);
  --surface-border:rgba(0, 0, 0, 0.08);

  --green-accent:      #2e7d32;
  --green-section-bg:  rgba(165, 214, 167, 0.22);
  --yellow-accent:     #e65100;
  --yellow-section-bg: rgba(255, 241, 118, 0.28);
  --red-accent:        #b71c1c;
  --red-section-bg:    rgba(239, 154, 154, 0.22);
  --blue-accent:       #0277bd;
  --blue-section-bg:   rgba(129, 212, 250, 0.22);
}

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

html {
  scroll-behavior: smooth;
  scroll-padding-top: calc(var(--nav-h) + 16px);
}

body {
  font-family: var(--font);
  background-color: var(--bg);
  color: var(--on-bg);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  transition: background-color 0.3s ease, color 0.3s ease;
  overflow-x: hidden;
}

img   { max-width: 100%; height: auto; display: block; }
a     { color: inherit; text-decoration: none; }
ul    { list-style: none; }
button{ cursor: pointer; border: none; background: none; font-family: inherit; color: inherit; }

/* ══════════════════════════════════════════════════════════
   NAV
══════════════════════════════════════════════════════════ */
.nav {
  position: fixed;
  inset: 0 0 auto 0;
  z-index: 200;
  height: var(--nav-h);
  backdrop-filter: blur(24px);
  -webkit-backdrop-filter: blur(24px);
  background: color-mix(in srgb, var(--bg) 82%, transparent);
  border-bottom: 1px solid var(--surface-border);
  transition: background 0.3s, border-color 0.3s;
}

.nav-inner {
  display: flex;
  align-items: center;
  height: 100%;
  max-width: var(--max-w);
  margin: 0 auto;
  padding: 0 var(--pad-h);
  gap: 24px;
}

/* Logo */
.nav-logo {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-shrink: 0;
  font-weight: 600;
  font-size: 15px;
  letter-spacing: 0.02em;
}
.nav-logo-img {
  width: 28px;
  height: 28px;
  border-radius: var(--r-sm);
  object-fit: contain;
}
[data-theme="light"] .nav-logo-img {
  content: url("assets/logo-black.png");
}

/* Nav links */
.nav-links {
  display: flex;
  align-items: center;
  gap: 2px;
  flex: 1;
}

.nav-link {
  display: inline-block;
  font-size: 13.5px;
  font-weight: 500;
  color: var(--muted);
  padding: 6px 12px;
  border-radius: var(--r-pill);
  transition: color 0.18s, background 0.18s;
  white-space: nowrap;
}
.nav-link:hover           { color: var(--on-bg); background: var(--surface-bg); }
.nav-link.is-active       { color: var(--on-bg); background: color-mix(in srgb, var(--on-bg) 10%, transparent); }

/* Nav actions */
.nav-actions {
  display: flex;
  align-items: center;
  gap: 6px;
  flex-shrink: 0;
}

.icon-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 36px;
  height: 36px;
  border-radius: var(--r-pill);
  color: var(--muted);
  transition: color 0.18s, background 0.18s;
  flex-shrink: 0;
}
.icon-btn:hover { color: var(--on-bg); background: var(--surface-bg); }

/* Theme toggle — show/hide sun & moon */
.theme-toggle .icon-sun  { display: block; }
.theme-toggle .icon-moon { display: none; }
[data-theme="light"] .theme-toggle .icon-sun  { display: none; }
[data-theme="light"] .theme-toggle .icon-moon { display: block; }

/* Menu toggle — desktop hidden */
.menu-toggle { display: none; }

/* ══════════════════════════════════════════════════════════
   MOBILE MENU
══════════════════════════════════════════════════════════ */
.mobile-menu {
  position: fixed;
  top: var(--nav-h);
  left: 0;
  right: 0;
  z-index: 199;
  background: var(--bg);
  border-bottom: 1px solid var(--surface-border);
  padding: 10px 0 18px;
  display: none;
  pointer-events: none;
}
.mobile-menu.is-open { display: block; pointer-events: auto; }

.mobile-nav-link {
  display: block;
  padding: 12px 24px;
  font-size: 17px;
  font-weight: 500;
  color: var(--muted);
  transition: color 0.18s;
}
.mobile-nav-link:hover,
.mobile-nav-link.is-active { color: var(--on-bg); }

/* ══════════════════════════════════════════════════════════
   SHARED SECTION
══════════════════════════════════════════════════════════ */
.section {
  background-color: var(--bg);
  transition: background-color 0.3s ease;
}

.section-container {
  max-width: var(--max-w);
  margin: 0 auto;
  padding-left: var(--pad-h);
  padding-right: var(--pad-h);
}

/* Section mark (number + line) */
.section-mark {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 20px;
}
.section-number {
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--muted);
}
.section-line {
  display: block;
  width: 28px;
  height: 1.5px;
  background: var(--muted);
  opacity: 0.5;
  border-radius: 4px;
}

/* Status pill */
.status-pill {
  display: inline-block;
  padding: 5px 13px;
  border-radius: var(--r-pill);
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  margin-bottom: 18px;
}
.status-pill-muted {
  color: var(--muted);
  background: color-mix(in srgb, var(--on-bg) 8%, transparent);
}

/* Headings */
.section-title {
  font-size: 52px;
  font-weight: 800;
  letter-spacing: -0.025em;
  line-height: 1.08;
  margin-bottom: 18px;
}

/* Body text */
.body-lg  { font-size: 17px; line-height: 1.65; margin-bottom: 16px; }
.body-md  { font-size: 15px; line-height: 1.72; }
.muted    { color: var(--muted); }

/* ══════════════════════════════════════════════════════════
   BUTTONS
══════════════════════════════════════════════════════════ */
.action-row {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 10px;
  margin-top: 28px;
}

.btn {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  padding: 11px 20px;
  border-radius: var(--r-pill);
  font-family: var(--font);
  font-size: 14px;
  font-weight: 600;
  line-height: 1;
  white-space: nowrap;
  cursor: pointer;
  transition: opacity 0.18s, transform 0.12s;
  text-decoration: none;
  user-select: none;
}
.btn:hover  { opacity: 0.82; transform: translateY(-1px); }
.btn:active { transform: translateY(0); }

.btn-filled  { background: var(--on-bg); color: var(--bg); }
.btn-outline {
  background: var(--surface-bg);
  color: var(--on-bg);
  border: 1px solid var(--surface-border);
}
.btn-outline:hover { background: var(--surface-hover); }

.btn-sm { padding: 9px 16px; font-size: 13px; }

.btn.disabled {
  opacity: 0.32;
  cursor: not-allowed;
  pointer-events: none;
}

/* ══════════════════════════════════════════════════════════
   INTRO SECTION
══════════════════════════════════════════════════════════ */
.intro-section {
  min-height: calc(100svh - 0px);
  display: flex;
  align-items: center;
}
.intro-section .section-container {
  width: 100%;
  padding-top: 140px;
  padding-bottom: 64px;
}

.intro-content {
  display: flex;
  align-items: center;
  gap: 48px;
}

.intro-text   { flex: 1; max-width: 720px; }
.intro-visual { flex: 1; display: flex; justify-content: flex-end; align-items: center; }

.name-badge {
  display: inline-flex;
  align-items: center;
  padding: 8px 18px;
  border-radius: var(--r-pill);
  background: color-mix(in srgb, var(--on-bg) 8%, transparent);
  font-size: 11.5px;
  font-weight: 700;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  margin-bottom: 24px;
}

.display-xl {
  font-size: 72px;
  font-weight: 800;
  line-height: 1.04;
  letter-spacing: -0.035em;
  margin-bottom: 20px;
}

.lead {
  font-size: 21px;
  font-weight: 500;
  line-height: 1.5;
  color: var(--muted);
  max-width: 600px;
}

.branding-visual {
  width: 480px;
  max-width: 100%;
  opacity: 0.07;
  filter: invert(0);
  pointer-events: none;
}
[data-theme="light"] .branding-visual {
  content: url("assets/logo-black.png");
  opacity: 0.06;
  filter: none;
}

/* ══════════════════════════════════════════════════════════
   PRODUCT SECTIONS
══════════════════════════════════════════════════════════ */
.product-section {
  min-height: var(--section-min);
  display: flex;
  align-items: center;
}
.product-section .section-container { width: 100%; }

.product-layout {
  display: flex;
  align-items: center;
  gap: 48px;
  padding: 80px 0;
  width: 100%;
}
.product-layout-reversed { flex-direction: row-reverse; }

.product-copy   { flex: 10 1 0; min-width: 0; }
.product-visual { flex: 11 1 0; display: flex; justify-content: center; align-items: center; min-width: 0; }

/* ── Upcoming icon visual (Deenly / Tomatly / Learnly) ── */
.upcoming-outer {
  width: 420px;
  height: 420px;
  border-radius: var(--r-xl);
  background: color-mix(in srgb, var(--upcoming-accent, var(--on-bg)) 9%, transparent);
  display: flex;
  align-items: center;
  justify-content: center;
}
.upcoming-inner {
  width: 220px;
  height: 220px;
  border-radius: var(--r-xl);
  background: color-mix(in srgb, var(--upcoming-accent, var(--on-bg)) 10%, transparent);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 34px;
}
.upcoming-icon {
  width: 100%;
  height: 100%;
  object-fit: contain;
  border-radius: 24px;
}

/* ── Clean Future media visual ── */
.clean-future-visual { align-items: flex-start; }
.clean-future-images {
  display: flex;
  flex-direction: column;
  gap: 14px;
  width: 100%;
  max-width: 580px;
}
.cf-banner {
  width: 100%;
  border-radius: var(--r-lg);
  object-fit: cover;
  aspect-ratio: 1024/500;
}
.cf-row {
  display: flex;
  gap: 14px;
}
.cf-shot {
  flex: 1;
  border-radius: var(--r-lg);
  aspect-ratio: 16/9;
  object-fit: cover;
}
.yt-embed {
  flex: 1;
  border-radius: var(--r-lg);
  overflow: hidden;
  aspect-ratio: 16/9;
}
.yt-embed iframe {
  width: 100%;
  height: 100%;
  border: 0;
  display: block;
}

/* ══════════════════════════════════════════════════════════
   ARCHIVE SECTION
══════════════════════════════════════════════════════════ */
.archive-section { min-height: var(--section-min); }
.archive-section .section-container {
  padding-top: 80px;
  padding-bottom: 80px;
}

.archive-grid {
  display: flex;
  flex-wrap: wrap;
  gap: 18px;
  margin-top: 32px;
}

.archive-card {
  width: 252px;
  padding: 24px;
  border-radius: var(--r-xl);
  background: var(--surface-bg);
  border: 1px solid var(--surface-border);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  transition: background 0.2s, border-color 0.2s;
}
.archive-card:hover { background: var(--surface-hover); }

.archive-icon-wrap {
  width: 76px;
  height: 76px;
  border-radius: var(--r-md);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 14px;
  margin-bottom: 18px;
}
.archive-icon-wrap img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  border-radius: 12px;
}

.archive-card-title {
  font-size: 21px;
  font-weight: 700;
  letter-spacing: -0.01em;
  line-height: 1.2;
}

.archive-card .action-row { margin-top: 14px; }

/* ══════════════════════════════════════════════════════════
   FOOTER
══════════════════════════════════════════════════════════ */
.footer {
  border-top: 1px solid var(--surface-border);
  padding: 48px 0;
  transition: border-color 0.3s;
}

.footer-links {
  display: flex;
  flex-wrap: wrap;
  gap: 4px;
}
.footer-link {
  display: inline-block;
  padding: 8px 16px;
  border-radius: var(--r-pill);
  font-size: 14px;
  font-weight: 500;
  color: var(--muted);
  transition: color 0.18s, background 0.18s;
}
.footer-link:hover { color: var(--on-bg); background: var(--surface-bg); }

.footer-notice {
  font-size: 13px;
  color: var(--muted);
  margin-top: 16px;
  padding-left: 16px;
}

/* ══════════════════════════════════════════════════════════
   RESPONSIVE — tablet (760–1119px)
══════════════════════════════════════════════════════════ */
@media (max-width: 1119px) {
  :root { --pad-h: 30px; }

  .display-xl    { font-size: 58px; }
  .section-title { font-size: 44px; }
  .lead          { font-size: 19px; }

  .upcoming-outer { width: 340px; height: 340px; }
  .upcoming-inner { width: 180px; height: 180px; padding: 28px; }

  .branding-visual { width: 380px; }
}

/* ══════════════════════════════════════════════════════════
   RESPONSIVE — mobile (< 760px)
══════════════════════════════════════════════════════════ */
@media (max-width: 759px) {
  :root {
    --nav-h:  60px;
    --pad-h:  20px;
    --section-min: auto;
  }

  /* Nav */
  .nav-links    { display: none; }
  .menu-toggle  { display: flex; }

  /* Intro */
  .intro-section { min-height: 100svh; align-items: flex-start; }
  .intro-section .section-container { padding-top: 110px; padding-bottom: 56px; }
  .intro-content {
    flex-direction: column;
    gap: 36px;
  }
  .intro-text   { max-width: 100%; }
  .intro-visual { justify-content: center; width: 100%; flex: none; }
  .branding-visual { width: 200px; }
  .display-xl    { font-size: 42px; }
  .lead          { font-size: 17px; }

  /* Products */
  .product-layout,
  .product-layout-reversed {
    flex-direction: column !important;
    gap: 36px;
    padding: 48px 0;
  }
  .product-copy, .product-visual { flex: none; width: 100%; max-width: 100%; }
  .section-title   { font-size: 34px; }
  .body-lg         { font-size: 16px; }

  /* Upcoming visual */
  .upcoming-outer { width: 300px; height: 300px; }
  .upcoming-inner { width: 162px; height: 162px; padding: 24px; }

  /* Clean Future */
  .cf-row { flex-direction: column; }

  /* Archive */
  .archive-card { width: 100%; }

  /* Footer */
  .footer-notice { padding-left: 0; }
}

/* ── Countdown card (Deenly section) ── */
.countdown-card {
  display: inline-flex;
  flex-direction: column;
  gap: 4px;
  padding: 12px 18px;
  border-radius: var(--r-lg);
  background: var(--surface-bg);
  border: 1px solid var(--surface-border);
  margin-bottom: 18px;
}
.countdown-label {
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--muted);
}
.countdown-value {
  font-size: 26px;
  font-weight: 800;
  letter-spacing: -0.02em;
  color: var(--green-accent);
}

/* ══════════════════════════════════════════════════════════
   SELECTION
══════════════════════════════════════════════════════════ */
::selection {
  background: color-mix(in srgb, var(--on-bg) 15%, transparent);
}
