/* ==========================================================================
   KIINDEV APPS — MODERN RESPONSIVE & ADAPTIVE STYLESHEET
   Supports: System Auto, Forced Light, Forced Dark
   ========================================================================== */

/* ---------------- CSS Variables & Theme Tokens ---------------- */
:root {
  /* Font Families */
  --font-sans: 'Plus Jakarta Sans', system-ui, -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  --font-display: 'Outfit', var(--font-sans);

  /* Primary Brand Colors */
  --color-primary: #3b82f6;
  --color-primary-rgb: 59, 130, 246;
  --color-primary-hover: #2563eb;
  
  /* App Specific Accent Colors */
  --color-stokko: #2563eb;
  --color-stokko-gradient: linear-gradient(135deg, #1d4ed8 0%, #3b82f6 100%);
  --color-kiingaku: #a855f7;
  --color-kiingaku-gradient: linear-gradient(135deg, #9333ea 0%, #c084fc 100%);
  --color-noni: #6366f1;
  --color-noni-gradient: linear-gradient(135deg, #4f46e5 0%, #818cf8 100%);

  /* Neutral Spectrum — Light Mode Defaults */
  --bg-body: #f8fafc;
  --bg-surface: #ffffff;
  --bg-surface-elevated: #ffffff;
  --bg-surface-translucent: rgba(255, 255, 255, 0.85);
  --bg-alt: #f1f5f9;
  --bg-card-hover: #f8fafc;
  
  --text-main: #0f172a;
  --text-muted: #64748b;
  --text-subtle: #94a3b8;
  
  --border-subtle: #e2e8f0;
  --border-medium: #cbd5e1;
  --border-focus: #93c5fd;

  --shadow-sm: 0 1px 2px 0 rgba(0, 0, 0, 0.05);
  --shadow-md: 0 4px 6px -1px rgba(0, 0, 0, 0.08), 0 2px 4px -2px rgba(0, 0, 0, 0.05);
  --shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.08), 0 4px 6px -4px rgba(0, 0, 0, 0.04);
  --shadow-xl: 0 20px 25px -5px rgba(0, 0, 0, 0.1), 0 8px 10px -6px rgba(0, 0, 0, 0.04);
  --shadow-glow: 0 0 40px -10px rgba(59, 130, 246, 0.25);

  --phone-bezel: #1e293b;
  --phone-notch: #0f172a;
  
  --radius-sm: 8px;
  --radius-md: 14px;
  --radius-lg: 20px;
  --radius-xl: 28px;
  --radius-full: 9999px;

  --transition-fast: 150ms cubic-bezier(0.4, 0, 0.2, 1);
  --transition-normal: 250ms cubic-bezier(0.4, 0, 0.2, 1);
  --transition-smooth: 400ms cubic-bezier(0.16, 1, 0.3, 1);
}

/* System Dark Preference Token Overrides */
@media (prefers-color-scheme: dark) {
  :root[data-theme="auto"] {
    --bg-body: #090d16;
    --bg-surface: #111827;
    --bg-surface-elevated: #1a2234;
    --bg-surface-translucent: rgba(17, 24, 39, 0.85);
    --bg-alt: #0c1220;
    --bg-card-hover: #1e293b;
    
    --text-main: #f8fafc;
    --text-muted: #94a3b8;
    --text-subtle: #64748b;
    
    --border-subtle: #1e293b;
    --border-medium: #334155;
    --border-focus: #3b82f6;

    --shadow-sm: 0 1px 2px 0 rgba(0, 0, 0, 0.4);
    --shadow-md: 0 4px 6px -1px rgba(0, 0, 0, 0.4);
    --shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.5);
    --shadow-xl: 0 20px 25px -5px rgba(0, 0, 0, 0.6);
    --shadow-glow: 0 0 50px -10px rgba(59, 130, 246, 0.35);

    --phone-bezel: #26334d;
    --phone-notch: #0a0e1a;
  }
}

/* Explicit Dark Theme */
:root[data-theme="dark"] {
  --bg-body: #090d16;
  --bg-surface: #111827;
  --bg-surface-elevated: #1a2234;
  --bg-surface-translucent: rgba(17, 24, 39, 0.85);
  --bg-alt: #0c1220;
  --bg-card-hover: #1e293b;
  
  --text-main: #f8fafc;
  --text-muted: #94a3b8;
  --text-subtle: #64748b;
  
  --border-subtle: #1e293b;
  --border-medium: #334155;
  --border-focus: #3b82f6;

  --shadow-sm: 0 1px 2px 0 rgba(0, 0, 0, 0.4);
  --shadow-md: 0 4px 6px -1px rgba(0, 0, 0, 0.4);
  --shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.5);
  --shadow-xl: 0 20px 25px -5px rgba(0, 0, 0, 0.6);
  --shadow-glow: 0 0 50px -10px rgba(59, 130, 246, 0.35);

  --phone-bezel: #26334d;
  --phone-notch: #0a0e1a;
}

/* Explicit Light Theme */
:root[data-theme="light"] {
  --bg-body: #f8fafc;
  --bg-surface: #ffffff;
  --bg-surface-elevated: #ffffff;
  --bg-surface-translucent: rgba(255, 255, 255, 0.85);
  --bg-alt: #f1f5f9;
  --bg-card-hover: #f8fafc;
  
  --text-main: #0f172a;
  --text-muted: #64748b;
  --text-subtle: #94a3b8;
  
  --border-subtle: #e2e8f0;
  --border-medium: #cbd5e1;
  --border-focus: #93c5fd;

  --shadow-sm: 0 1px 2px 0 rgba(0, 0, 0, 0.05);
  --shadow-md: 0 4px 6px -1px rgba(0, 0, 0, 0.08), 0 2px 4px -2px rgba(0, 0, 0, 0.05);
  --shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.08), 0 4px 6px -4px rgba(0, 0, 0, 0.04);
  --shadow-xl: 0 20px 25px -5px rgba(0, 0, 0, 0.1), 0 8px 10px -6px rgba(0, 0, 0, 0.04);
  --shadow-glow: 0 0 40px -10px rgba(59, 130, 246, 0.25);

  --phone-bezel: #1e293b;
  --phone-notch: #0f172a;
}

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

html {
  scroll-behavior: smooth;
  font-size: 16px;
  -webkit-text-size-adjust: 100%;
}

body {
  font-family: var(--font-sans);
  background-color: var(--bg-body);
  color: var(--text-main);
  line-height: 1.65;
  overflow-x: hidden;
  transition: background-color var(--transition-normal), color var(--transition-normal);
}

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

a {
  color: inherit;
  text-decoration: none;
  transition: color var(--transition-fast);
}

button {
  font-family: inherit;
  cursor: pointer;
  border: none;
  background: none;
  color: inherit;
}

/* ---------------- Layout & Containers ---------------- */
.container {
  width: 100%;
  max-width: 1240px;
  margin: 0 auto;
  padding: 0 1.5rem;
}

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

.gradient-text {
  background: linear-gradient(135deg, #3b82f6 0%, #8b5cf6 50%, #ec4899 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  display: inline-block;
}

.text-amber { color: #f59e0b; }
.text-emerald { color: #10b981; }
.text-indigo { color: #6366f1; }
.text-cyan { color: #06b6d4; }
.text-sparkle { color: #8b5cf6; }

/* ---------------- Buttons & UI Elements ---------------- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.6rem;
  padding: 0.75rem 1.5rem;
  border-radius: var(--radius-md);
  font-weight: 600;
  font-size: 0.95rem;
  transition: all var(--transition-fast);
  text-decoration: none;
  position: relative;
  overflow: hidden;
  white-space: nowrap;
}

.btn-lg {
  padding: 0.9rem 1.85rem;
  font-size: 1.05rem;
  border-radius: var(--radius-lg);
}

.btn-primary-sm {
  background: var(--color-primary);
  color: #ffffff;
  padding: 0.55rem 1.15rem;
  font-size: 0.875rem;
  border-radius: var(--radius-md);
  font-weight: 600;
  box-shadow: 0 2px 8px rgba(59, 130, 246, 0.3);
}

.btn-primary-sm:hover {
  background: var(--color-primary-hover);
  transform: translateY(-1px);
  box-shadow: 0 4px 12px rgba(59, 130, 246, 0.4);
}

.btn-primary {
  background: var(--color-primary);
  color: #ffffff;
  box-shadow: 0 4px 14px rgba(59, 130, 246, 0.35);
}

.btn-primary:hover {
  background: var(--color-primary-hover);
  transform: translateY(-2px);
  box-shadow: 0 8px 20px rgba(59, 130, 246, 0.45);
}

.btn-stokko {
  background: var(--color-stokko-gradient);
  color: #ffffff;
  box-shadow: 0 4px 16px rgba(37, 99, 235, 0.35);
}

.btn-stokko:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 24px rgba(37, 99, 235, 0.5);
}

.btn-kiingaku {
  background: var(--color-kiingaku-gradient);
  color: #ffffff;
  box-shadow: 0 4px 16px rgba(168, 85, 247, 0.35);
}

.btn-kiingaku:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 24px rgba(168, 85, 247, 0.5);
}

.btn-noni {
  background: var(--color-noni-gradient);
  color: #ffffff;
  box-shadow: 0 4px 16px rgba(99, 102, 241, 0.35);
}

.btn-noni:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 24px rgba(99, 102, 241, 0.5);
}

.btn-outline {
  background: var(--bg-surface);
  border: 1px solid var(--border-medium);
  color: var(--text-main);
}

.btn-outline:hover {
  background: var(--bg-alt);
  border-color: var(--border-focus);
  transform: translateY(-2px);
}

.badge-coming-soon {
  background: rgba(234, 179, 8, 0.18);
  color: #ca8a04;
  font-size: 0.72rem;
  font-weight: 700;
  text-transform: uppercase;
  padding: 0.2rem 0.55rem;
  border-radius: var(--radius-full);
  border: 1px solid rgba(234, 179, 8, 0.35);
  margin-left: 0.3rem;
  letter-spacing: 0.03em;
}

:root[data-theme="dark"] .badge-coming-soon,
:root[data-theme="auto"] .badge-coming-soon {
  color: #facc15;
  background: rgba(250, 204, 21, 0.15);
}

/* ---------------- Header & Navbar ---------------- */
.site-header {
  position: sticky;
  top: 0;
  z-index: 1000;
  background: var(--bg-surface-translucent);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  border-bottom: 1px solid var(--border-subtle);
  transition: all var(--transition-normal);
}

.nav-container {
  display: flex;
  align-items: center;
  justify-content: space-between;
  max-width: 1240px;
  margin: 0 auto;
  padding: 0.85rem 1.5rem;
}

.brand-logo {
  display: flex;
  align-items: center;
  gap: 0.65rem;
  font-family: var(--font-display);
  font-weight: 800;
  font-size: 1.4rem;
  color: var(--text-main);
}

.logo-icon {
  width: 38px;
  height: 38px;
  border-radius: 10px;
  background: linear-gradient(135deg, #3b82f6 0%, #8b5cf6 100%);
  display: flex;
  align-items: center;
  justify-content: center;
  color: #ffffff;
  font-size: 1.15rem;
  box-shadow: 0 4px 10px rgba(59, 130, 246, 0.3);
}

.brand-name span {
  color: var(--color-primary);
}

.nav-menu {
  display: flex;
  align-items: center;
  gap: 2rem;
}

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

.nav-link {
  font-size: 0.92rem;
  font-weight: 500;
  color: var(--text-muted);
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  padding: 0.35rem 0.2rem;
  position: relative;
}

.nav-link:hover {
  color: var(--text-main);
}

.nav-link.active {
  color: var(--color-primary);
}

.nav-actions {
  display: flex;
  align-items: center;
  gap: 1rem;
}

/* Theme Switcher Segmented Control */
.theme-switcher {
  display: flex;
  align-items: center;
  background: var(--bg-alt);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-full);
  padding: 3px;
}

.theme-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 30px;
  height: 30px;
  border-radius: var(--radius-full);
  color: var(--text-muted);
  font-size: 0.85rem;
  transition: all var(--transition-fast);
}

.theme-btn:hover {
  color: var(--text-main);
}

.theme-btn.active {
  background: var(--bg-surface);
  color: var(--color-primary);
  box-shadow: var(--shadow-sm);
}

/* Mobile Toggle */
.mobile-toggle {
  display: none;
  flex-direction: column;
  justify-content: space-between;
  width: 28px;
  height: 20px;
}

.mobile-toggle .bar {
  height: 2.5px;
  width: 100%;
  background: var(--text-main);
  border-radius: 2px;
  transition: all var(--transition-fast);
}

/* ---------------- Hero Section ---------------- */
.hero-section {
  position: relative;
  padding: 4.5rem 0 5rem;
  overflow: hidden;
}

.hero-glow {
  position: absolute;
  border-radius: 50%;
  filter: blur(100px);
  opacity: 0.15;
  pointer-events: none;
  z-index: 0;
}

.glow-1 {
  width: 450px;
  height: 450px;
  top: -100px;
  left: -100px;
  background: #3b82f6;
}

.glow-2 {
  width: 500px;
  height: 500px;
  bottom: 0;
  right: -100px;
  background: #a855f7;
}

.hero-content {
  display: grid;
  grid-template-columns: 1.15fr 0.85fr;
  gap: 3.5rem;
  align-items: center;
  position: relative;
  z-index: 1;
}

.hero-badge {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  background: var(--bg-surface);
  border: 1px solid var(--border-medium);
  padding: 0.35rem 0.95rem;
  border-radius: var(--radius-full);
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--text-muted);
  box-shadow: var(--shadow-sm);
  margin-bottom: 1.5rem;
}

.badge-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: #10b981;
  box-shadow: 0 0 10px #10b981;
}

.hero-title {
  font-family: var(--font-display);
  font-size: clamp(2.3rem, 4.2vw, 3.6rem);
  font-weight: 800;
  line-height: 1.15;
  letter-spacing: -0.02em;
  margin-bottom: 1.25rem;
}

.hero-description {
  font-size: clamp(1rem, 1.4vw, 1.2rem);
  color: var(--text-muted);
  line-height: 1.7;
  margin-bottom: 2rem;
  max-width: 580px;
}

.hero-cta-group {
  display: flex;
  flex-wrap: wrap;
  gap: 1rem;
  margin-bottom: 2.5rem;
}

.hero-pills {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem 1.25rem;
}

.pill-item {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--text-muted);
}

/* Hero Phone Stack 3D Visual */
.hero-visual-col {
  display: flex;
  justify-content: center;
  align-items: center;
}

.hero-phones-showcase {
  position: relative;
  width: 320px;
  height: 520px;
}

.phone-card {
  position: absolute;
  top: 0;
  left: 0;
  width: 240px;
  transition: transform var(--transition-smooth), box-shadow var(--transition-smooth);
}

.phone-stokko {
  z-index: 3;
  left: 40px;
  top: 10px;
}

.phone-noni {
  z-index: 2;
  left: -20px;
  top: 50px;
  transform: rotate(-7deg) scale(0.92);
}

.phone-kiingaku {
  z-index: 1;
  left: 110px;
  top: 70px;
  transform: rotate(8deg) scale(0.9);
}

.hero-phones-showcase:hover .phone-stokko {
  transform: scale(1.03) translateY(-8px);
}

.hero-phones-showcase:hover .phone-noni {
  transform: rotate(-12deg) translateX(-15px) scale(0.95);
}

.hero-phones-showcase:hover .phone-kiingaku {
  transform: rotate(14deg) translateX(18px) scale(0.93);
}

.phone-floating-tag {
  position: absolute;
  bottom: 25px;
  left: 50%;
  transform: translateX(-50%);
  background: var(--bg-surface);
  color: var(--text-main);
  padding: 0.35rem 0.85rem;
  border-radius: var(--radius-full);
  font-size: 0.75rem;
  font-weight: 700;
  box-shadow: var(--shadow-lg);
  border: 1px solid var(--border-medium);
  white-space: nowrap;
  display: flex;
  align-items: center;
  gap: 0.4rem;
  z-index: 10;
}

/* ---------------- Phone Frame Component ---------------- */
.phone-frame {
  position: relative;
  width: 100%;
  background: var(--phone-bezel);
  border-radius: 36px;
  padding: 10px;
  box-shadow: var(--shadow-xl), 0 0 0 1px rgba(255, 255, 255, 0.08);
}

.phone-notch {
  position: absolute;
  top: 14px;
  left: 50%;
  transform: translateX(-50%);
  width: 65px;
  height: 14px;
  background: var(--phone-notch);
  border-radius: 10px;
  z-index: 5;
}

.phone-screen {
  position: relative;
  width: 100%;
  border-radius: 28px;
  overflow: hidden;
  background: #000;
  aspect-ratio: 9 / 19.5;
}

.phone-screen img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.lg-frame {
  max-width: 320px;
  margin: 0 auto;
  border-radius: 44px;
  padding: 12px;
}

.lg-frame .phone-screen-container {
  width: 100%;
  border-radius: 34px;
  overflow: hidden;
  background: #000;
  aspect-ratio: 9 / 19.5;
  box-shadow: inset 0 0 10px rgba(0,0,0,0.2);
  cursor: zoom-in;
}

.lg-frame .phone-screen-container img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: opacity var(--transition-normal), transform var(--transition-normal);
}

.lg-frame .phone-notch {
  width: 80px;
  height: 18px;
  top: 18px;
  border-radius: 12px;
}

/* ---------------- Section Headers ---------------- */
.section-header {
  margin-bottom: 3.5rem;
}

.subheading {
  display: inline-block;
  font-size: 0.85rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--color-primary);
  margin-bottom: 0.5rem;
}

.section-title {
  font-family: var(--font-display);
  font-size: clamp(1.8rem, 3.2vw, 2.5rem);
  font-weight: 800;
  letter-spacing: -0.02em;
  margin-bottom: 0.8rem;
}

.section-lead {
  font-size: 1.05rem;
  color: var(--text-muted);
  max-width: 620px;
  margin: 0 auto;
}

/* ---------------- Apps Overview Section ---------------- */
.section-apps-overview {
  padding: 5rem 0;
  background: var(--bg-alt);
}

.overview-cards-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 1.75rem;
}

.app-overview-card {
  background: var(--bg-surface);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-xl);
  padding: 2.2rem;
  display: flex;
  flex-direction: column;
  transition: all var(--transition-normal);
  box-shadow: var(--shadow-sm);
  position: relative;
  overflow: hidden;
}

.app-overview-card:hover {
  transform: translateY(-6px);
  box-shadow: var(--shadow-xl);
  border-color: var(--border-focus);
}

.card-icon {
  width: 56px;
  height: 56px;
  border-radius: var(--radius-md);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.5rem;
  color: #ffffff;
  margin-bottom: 1.25rem;
}

.card-stokko .card-icon { background: var(--color-stokko-gradient); box-shadow: 0 4px 12px rgba(37, 99, 235, 0.35); }
.card-kiingaku .card-icon { background: var(--color-kiingaku-gradient); box-shadow: 0 4px 12px rgba(168, 85, 247, 0.35); }
.card-noni .card-icon { background: var(--color-noni-gradient); box-shadow: 0 4px 12px rgba(99, 102, 241, 0.35); }

.card-badge {
  display: inline-block;
  font-size: 0.75rem;
  font-weight: 700;
  padding: 0.25rem 0.65rem;
  border-radius: var(--radius-full);
  margin-bottom: 0.75rem;
  width: fit-content;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

.badge-blue { background: rgba(59, 130, 246, 0.12); color: #2563eb; }
.badge-purple { background: rgba(168, 85, 247, 0.12); color: #9333ea; }
.badge-indigo { background: rgba(99, 102, 241, 0.12); color: #4f46e5; }

:root[data-theme="dark"] .badge-blue, :root[data-theme="auto"] .badge-blue { color: #60a5fa; }
:root[data-theme="dark"] .badge-purple, :root[data-theme="auto"] .badge-purple { color: #c084fc; }
:root[data-theme="dark"] .badge-indigo, :root[data-theme="auto"] .badge-indigo { color: #818cf8; }

.card-title {
  font-family: var(--font-display);
  font-size: 1.55rem;
  font-weight: 700;
  margin-bottom: 0.65rem;
}

.card-desc {
  font-size: 0.95rem;
  color: var(--text-muted);
  line-height: 1.6;
  margin-bottom: 1.5rem;
  flex-grow: 1;
}

.card-action {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  font-weight: 700;
  font-size: 0.9rem;
  color: var(--color-primary);
  margin-top: auto;
}

.card-action i {
  transition: transform var(--transition-fast);
}

.app-overview-card:hover .card-action i {
  transform: translateX(4px);
}

/* ---------------- Detailed App Showcase Sections ---------------- */
.app-detail-section {
  padding: 6.5rem 0;
  position: relative;
}

.section-alternate {
  background: var(--bg-alt);
}

.app-detail-grid {
  display: grid;
  grid-template-columns: 1.15fr 0.85fr;
  gap: 4.5rem;
  align-items: center;
}

.grid-reversed {
  grid-template-columns: 0.85fr 1.15fr;
}

.app-brand-badge {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  font-size: 0.8rem;
  font-weight: 700;
  letter-spacing: 0.06em;
  color: var(--color-stokko);
  background: rgba(37, 99, 235, 0.1);
  padding: 0.35rem 0.85rem;
  border-radius: var(--radius-full);
  margin-bottom: 1rem;
}

.badge-kiingaku {
  color: var(--color-kiingaku);
  background: rgba(168, 85, 247, 0.1);
}

.badge-noni {
  color: var(--color-noni);
  background: rgba(99, 102, 241, 0.1);
}

.app-main-heading {
  font-family: var(--font-display);
  font-size: clamp(2.2rem, 3.6vw, 3rem);
  font-weight: 800;
  letter-spacing: -0.02em;
  margin-bottom: 0.75rem;
}

.app-tagline {
  font-size: 1.15rem;
  font-weight: 600;
  color: var(--text-main);
  margin-bottom: 1.2rem;
  line-height: 1.5;
}

.app-body-text {
  font-size: 0.98rem;
  color: var(--text-muted);
  margin-bottom: 2rem;
  line-height: 1.7;
}

/* Feature Checklist */
.feature-checklist {
  display: flex;
  flex-direction: column;
  gap: 1.25rem;
  margin-bottom: 2.25rem;
}

.feature-check-item {
  display: flex;
  gap: 1rem;
  align-items: flex-start;
}

.check-icon {
  width: 36px;
  height: 36px;
  border-radius: 10px;
  background: var(--bg-surface);
  border: 1px solid var(--border-medium);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--color-primary);
  font-size: 1rem;
  flex-shrink: 0;
  margin-top: 2px;
  box-shadow: var(--shadow-sm);
}

.app-theme-kiingaku .check-icon { color: var(--color-kiingaku); }
.app-theme-noni .check-icon { color: var(--color-noni); }

.feature-check-item h4 {
  font-size: 1rem;
  font-weight: 700;
  margin-bottom: 0.2rem;
  color: var(--text-main);
}

.feature-check-item p {
  font-size: 0.88rem;
  color: var(--text-muted);
  line-height: 1.5;
}

.app-buttons-group {
  display: flex;
  flex-wrap: wrap;
  gap: 1rem;
  align-items: center;
  margin-bottom: 1.25rem;
}

.app-link-note {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-size: 0.88rem;
  color: var(--text-muted);
}

.app-link-note a {
  color: var(--color-primary);
  font-weight: 600;
  text-decoration: underline;
}

/* Gallery & Thumbnails */
.app-gallery-col {
  display: flex;
  flex-direction: column;
  align-items: center;
}

.gallery-device-wrapper {
  position: relative;
  margin-bottom: 1.5rem;
  filter: drop-shadow(0 20px 30px rgba(0, 0, 0, 0.15));
}

.gallery-thumbs-track {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 0.6rem;
  max-width: 440px;
}

.thumb-btn {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.3rem;
  padding: 4px;
  background: var(--bg-surface);
  border: 2px solid var(--border-subtle);
  border-radius: 12px;
  transition: all var(--transition-fast);
  cursor: pointer;
}

.thumb-btn img {
  width: 48px;
  height: 48px;
  object-fit: cover;
  border-radius: 8px;
}

.thumb-btn span {
  font-size: 0.72rem;
  font-weight: 600;
  color: var(--text-muted);
  max-width: 60px;
  text-align: center;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.thumb-btn:hover {
  border-color: var(--border-focus);
  transform: translateY(-2px);
}

.thumb-btn.active {
  border-color: var(--color-primary);
  box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.2);
}

.app-theme-kiingaku .thumb-btn.active {
  border-color: var(--color-kiingaku);
  box-shadow: 0 0 0 3px rgba(168, 85, 247, 0.2);
}

.app-theme-noni .thumb-btn.active {
  border-color: var(--color-noni);
  box-shadow: 0 0 0 3px rgba(99, 102, 241, 0.2);
}

.gallery-hint {
  font-size: 0.78rem;
  color: var(--text-subtle);
  margin-top: 0.85rem;
  text-align: center;
}

/* ---------------- Advantages Section ---------------- */
.section-advantages {
  padding: 5.5rem 0;
}

.advantages-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  gap: 1.75rem;
}

.adv-card {
  background: var(--bg-surface);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-lg);
  padding: 2rem;
  transition: all var(--transition-fast);
}

.adv-card:hover {
  border-color: var(--border-focus);
  transform: translateY(-4px);
  box-shadow: var(--shadow-lg);
}

.adv-icon {
  width: 48px;
  height: 48px;
  border-radius: 12px;
  background: var(--bg-alt);
  border: 1px solid var(--border-medium);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.3rem;
  color: var(--color-primary);
  margin-bottom: 1.25rem;
}

.adv-card h3 {
  font-family: var(--font-display);
  font-size: 1.2rem;
  font-weight: 700;
  margin-bottom: 0.5rem;
}

.adv-card p {
  font-size: 0.92rem;
  color: var(--text-muted);
  line-height: 1.6;
}

/* ---------------- FAQ Section ---------------- */
.section-faq {
  padding: 5.5rem 0;
  background: var(--bg-alt);
}

.faq-accordion-wrapper {
  max-width: 780px;
  margin: 0 auto;
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.faq-item {
  background: var(--bg-surface);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
  overflow: hidden;
  transition: all var(--transition-fast);
}

.faq-item:hover {
  border-color: var(--border-medium);
}

.faq-question {
  width: 100%;
  padding: 1.25rem 1.5rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  text-align: left;
  font-family: var(--font-display);
  font-size: 1.05rem;
  font-weight: 700;
  color: var(--text-main);
}

.faq-arrow {
  font-size: 0.85rem;
  color: var(--text-muted);
  transition: transform var(--transition-fast);
}

.faq-item.active .faq-arrow {
  transform: rotate(180deg);
  color: var(--color-primary);
}

.faq-answer {
  max-height: 0;
  overflow: hidden;
  transition: max-height var(--transition-smooth), padding var(--transition-fast);
  padding: 0 1.5rem;
  font-size: 0.95rem;
  color: var(--text-muted);
  line-height: 1.7;
}

.faq-item.active .faq-answer {
  max-height: 250px;
  padding-bottom: 1.25rem;
}

.faq-answer a {
  color: var(--color-primary);
  text-decoration: underline;
}

/* ---------------- Footer ---------------- */
.site-footer {
  background: var(--bg-surface);
  border-top: 1px solid var(--border-subtle);
  padding: 4.5rem 0 1.5rem;
}

.footer-content {
  display: grid;
  grid-template-columns: 1.6fr 1fr 1fr;
  gap: 3rem;
  margin-bottom: 3.5rem;
}

.footer-tagline {
  font-size: 0.95rem;
  color: var(--text-muted);
  margin-top: 1rem;
  margin-bottom: 1.25rem;
  max-width: 320px;
}

.footer-links-quick a {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  font-size: 0.9rem;
  font-weight: 600;
  color: var(--color-primary);
}

.footer-nav-col h4 {
  font-family: var(--font-display);
  font-size: 1.05rem;
  font-weight: 700;
  margin-bottom: 1.25rem;
}

.footer-nav-col ul {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}

.footer-nav-col a {
  font-size: 0.92rem;
  color: var(--text-muted);
}

.footer-nav-col a:hover {
  color: var(--color-primary);
}

.footer-bottom {
  border-top: 1px solid var(--border-subtle);
  padding-top: 1.5rem;
}

.bottom-flex {
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-size: 0.85rem;
  color: var(--text-subtle);
  flex-wrap: wrap;
  gap: 1rem;
}

/* ---------------- Lightbox Modal ---------------- */
.lightbox-modal {
  position: fixed;
  inset: 0;
  z-index: 2000;
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  pointer-events: none;
  transition: opacity var(--transition-normal);
  padding: 1.5rem;
}

.lightbox-modal.open {
  opacity: 1;
  pointer-events: auto;
}

.lightbox-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(0, 0, 0, 0.85);
  backdrop-filter: blur(8px);
}

.lightbox-dialog {
  position: relative;
  z-index: 2;
  max-width: 90vw;
  max-height: 90vh;
  display: flex;
  flex-direction: column;
  align-items: center;
  transform: scale(0.94);
  transition: transform var(--transition-smooth);
}

.lightbox-modal.open .lightbox-dialog {
  transform: scale(1);
}

.lightbox-close {
  position: absolute;
  top: -45px;
  right: 0;
  background: rgba(255, 255, 255, 0.2);
  color: #ffffff;
  width: 38px;
  height: 38px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.2rem;
  transition: background var(--transition-fast);
}

.lightbox-close:hover {
  background: rgba(255, 255, 255, 0.4);
}

.lightbox-content {
  display: flex;
  flex-direction: column;
  align-items: center;
  background: var(--bg-surface);
  border-radius: var(--radius-lg);
  overflow: hidden;
  box-shadow: var(--shadow-xl);
  border: 1px solid var(--border-subtle);
  max-height: 85vh;
}

.lightbox-content img {
  max-height: 75vh;
  width: auto;
  object-fit: contain;
}

.lightbox-caption {
  padding: 0.85rem 1.25rem;
  font-size: 0.9rem;
  font-weight: 600;
  color: var(--text-main);
  text-align: center;
  background: var(--bg-surface);
  width: 100%;
}

/* ---------------- Toast Notification ---------------- */
.toast-container {
  position: fixed;
  bottom: 2rem;
  right: 2rem;
  z-index: 1500;
  pointer-events: none;
}

.toast {
  background: var(--bg-surface);
  border: 1px solid var(--border-medium);
  border-left: 4px solid #f59e0b;
  border-radius: var(--radius-md);
  padding: 1rem 1.25rem;
  display: flex;
  align-items: flex-start;
  gap: 0.85rem;
  box-shadow: var(--shadow-xl);
  max-width: 360px;
  transform: translateY(120%);
  opacity: 0;
  transition: all var(--transition-smooth);
  pointer-events: auto;
}

.toast.show {
  transform: translateY(0);
  opacity: 1;
}

.toast-icon {
  color: #f59e0b;
  font-size: 1.25rem;
  margin-top: 2px;
}

.toast-body strong {
  display: block;
  font-size: 0.95rem;
  margin-bottom: 0.2rem;
  color: var(--text-main);
}

.toast-body p {
  font-size: 0.85rem;
  color: var(--text-muted);
  line-height: 1.4;
}

.toast-close {
  color: var(--text-muted);
  font-size: 0.9rem;
  margin-left: auto;
  padding: 2px;
}

.toast-close:hover {
  color: var(--text-main);
}

/* ---------------- Responsive Media Queries ---------------- */
@media (max-width: 1024px) {
  .hero-content {
    grid-template-columns: 1fr;
    gap: 3rem;
    text-align: center;
  }

  .hero-description {
    margin-left: auto;
    margin-right: auto;
  }

  .hero-cta-group {
    justify-content: center;
  }

  .hero-pills {
    justify-content: center;
  }

  .app-detail-grid,
  .grid-reversed {
    grid-template-columns: 1fr;
    gap: 3rem;
  }

  .footer-content {
    grid-template-columns: 1fr 1fr;
  }
}

@media (max-width: 768px) {
  .site-header {
    padding: 0.2rem 0;
  }

  .mobile-toggle {
    display: flex;
  }

  .nav-menu {
    position: fixed;
    top: 61px;
    left: 0;
    width: 100%;
    height: calc(100vh - 61px);
    background: var(--bg-surface);
    flex-direction: column;
    align-items: stretch;
    padding: 2rem 1.5rem;
    gap: 2rem;
    transform: translateX(100%);
    transition: transform var(--transition-smooth);
    overflow-y: auto;
    border-top: 1px solid var(--border-subtle);
  }

  .nav-menu.open {
    transform: translateX(0);
  }

  .nav-links {
    flex-direction: column;
    align-items: stretch;
    gap: 1rem;
  }

  .nav-link {
    font-size: 1.15rem;
    padding: 0.75rem 0;
    border-bottom: 1px solid var(--border-subtle);
  }

  .nav-actions {
    flex-direction: column;
    align-items: stretch;
    gap: 1.25rem;
    margin-top: 1rem;
  }

  .theme-switcher {
    justify-content: space-around;
    padding: 6px;
  }

  .theme-btn {
    width: 33%;
    height: 38px;
  }

  .hero-section {
    padding: 2.5rem 0 3.5rem;
  }

  .hero-phones-showcase {
    transform: scale(0.9);
  }

  .app-buttons-group {
    flex-direction: column;
    align-items: stretch;
  }

  .app-buttons-group .btn {
    width: 100%;
  }

  .footer-content {
    grid-template-columns: 1fr;
    gap: 2.5rem;
  }

  .toast-container {
    left: 1rem;
    right: 1rem;
    bottom: 1rem;
  }

  .toast {
    max-width: 100%;
  }
}
