/* ==========================================================================
   Supimpons Theme Engine — Mascot Orange Edition
   Palette inspired by the Supimpons Cat & Cap logo:
   - Primary Accent: Electric Warm Orange (#ff6f00, #ff8800)
   - Secondary Accent: Royal Academic Blue (#2563eb, #3b82f6)
   - Dark Warm Canvas: #0f1115 / #171a22 with subtle amber/orange undertones
   ========================================================================== */
/* Enable smooth scrolling across the entire document */
html {
  scroll-behavior: smooth;
}

/* Offset anchor landing spots so the fixed header doesn't cover section titles */
#modules,
#architecture {
  scroll-margin-top: 85px;
}
:root {
  /* Canvas & Card Surfaces */
  --bg-canvas: #0d0f14;
  --bg-surface: #151922;
  --bg-surface-elevated: #1d222e;
  --bg-inset: #090b0f;

  /* Borders */
  --border-subtle: #272e3d;
  --border-accent: #3a455a;
  --border-orange: rgba(255, 111, 0, 0.35);

  /* Typography */
  --text-main: #f8fafc;
  --text-muted: #94a3b8;
  --text-dim: #64748b;

  /* Mascot Brand Palette */
  --brand-orange: #ff6f00;
  --brand-orange-light: #ff8f26;
  --brand-orange-dark: #cc5800;
  --brand-orange-glow: rgba(255, 111, 0, 0.28);

  /* Academic Cap Royal Blue Accent */
  --brand-cap-blue: #2563eb;
  --brand-cap-blue-light: #3b82f6;

  /* Functional Status Accents */
  --accent-teal: #10b981;
  --accent-amber: #fbbf24;
  --accent-rose: #f43f5e;

  /* System Fonts */
  --font-display: "Plus Jakarta Sans", system-ui, -apple-system, sans-serif;
  --font-mono: "JetBrains Mono", monospace;

  /* Border Radii */
  --radius-sm: 8px;
  --radius-md: 14px;
  --radius-lg: 20px;
  --radius-xl: 26px;
}

* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

body {
  background-color: var(--bg-canvas);
  color: var(--text-main);
  font-family: var(--font-display);
  font-size: 16px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

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

.site-container {
  max-width: 1040px;
  margin: 0 auto;
  padding: 0 24px;
}

/* --------------------------------------------------------------------------
   Top Navigation
   -------------------------------------------------------------------------- */
.top-nav {
  position: sticky;
  top: 0;
  z-index: 100;
  background: rgba(13, 15, 20, 0.92);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--border-subtle);
}

.nav-wrapper {
  height: 75px;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.brand-pill {
  display: flex;
  align-items: center;
  gap: 12px;
}

/* Logo Image Container */
.brand-glyph {
  width: 4rem;
  height: 4rem;
  border-radius: var(--radius-md);
  background-color: white;
  border: 1px solid var(--border-orange);
  display: grid;
  place-items: center;
  box-shadow: 0 4px 14px var(--brand-orange-glow);
  overflow: hidden;
}

.brand-logo-img {
  width: 4rem;
  height: 4rem;
  object-fit: contain;
}

.brand-text-block {
  display: flex;
  flex-direction: column;
}

.brand-name {
  font-weight: 800;
  font-size: 1.15rem;
  letter-spacing: -0.02em;
}

.brand-subtext {
  font-family: var(--font-mono);
  font-size: 0.68rem;
  font-weight: 700;
  color: var(--brand-orange-light);
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

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

.nav-link {
  font-size: 0.9rem;
  font-weight: 600;
  color: var(--text-muted);
  transition: color 0.15s ease;
}

.nav-link:hover {
  color: var(--brand-orange-light);
}

.app-chip {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 6px 14px;
  border-radius: 999px;
  background: var(--bg-surface);
  border: 1px solid var(--border-subtle);
  font-family: var(--font-mono);
  font-size: 0.75rem;
  font-weight: 600;
}

.chip-dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background-color: var(--accent-teal);
  box-shadow: 0 0 8px var(--accent-teal);
}

/* --------------------------------------------------------------------------
   Hero Section
   -------------------------------------------------------------------------- */
.hero-section {
  padding: 64px 0 48px 0;
  display: grid;
  grid-template-columns: 1.15fr 0.85fr;
  gap: 48px;
  align-items: center;
}

.badge-headline {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 5px 12px;
  border-radius: var(--radius-sm);
  background: rgba(255, 111, 0, 0.1);
  border: 1px solid rgba(255, 111, 0, 0.28);
  color: var(--brand-orange-light);
  font-family: var(--font-mono);
  font-size: 0.72rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  margin-bottom: 20px;
}

.badge-headline span {
  color: var(--brand-orange);
}

.hero-title {
  font-size: 2.85rem;
  font-weight: 800;
  line-height: 1.12;
  letter-spacing: -0.03em;
  margin-bottom: 20px;
}

/* Orange gradient with blue cap complement */
.hero-title .gradient-text {
  background: linear-gradient(135deg, #ff8f26, #ff6f00 45%, #60a5fa 95%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}

.hero-desc {
  font-size: 1.08rem;
  color: var(--text-muted);
  line-height: 1.65;
  margin-bottom: 32px;
}

.cta-row {
  display: flex;
  align-items: center;
  gap: 14px;
}

/* Primary Button in Mascot Orange */
.btn-primary {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 14px 28px;
  border-radius: var(--radius-md);
  background: linear-gradient(
    180deg,
    var(--brand-orange-light),
    var(--brand-orange)
  );
  border: 1px solid #ff9933;
  border-bottom: 4px solid var(--brand-orange-dark);
  color: #ffffff;
  font-weight: 700;
  font-size: 0.95rem;
  box-shadow: 0 4px 18px var(--brand-orange-glow);
  transition: all 0.12s ease;
  cursor: pointer;
}

.btn-primary:active {
  transform: translateY(2px);
  border-bottom-width: 2px;
}

.btn-secondary {
  display: inline-flex;
  align-items: center;
  padding: 14px 22px;
  border-radius: var(--radius-md);
  background: var(--bg-surface);
  border: 1px solid var(--border-subtle);
  border-bottom: 4px solid var(--border-subtle);
  color: var(--text-main);
  font-weight: 700;
  font-size: 0.95rem;
  transition: all 0.12s ease;
}

.btn-secondary:hover {
  background: var(--bg-surface-elevated);
  border-color: var(--border-accent);
}

.btn-secondary:active {
  transform: translateY(2px);
  border-bottom-width: 2px;
}

/* --------------------------------------------------------------------------
   App Preview Card
   -------------------------------------------------------------------------- */
.app-frame {
  background: var(--bg-surface);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-xl);
  padding: 24px;
  box-shadow:
    0 20px 45px rgba(0, 0, 0, 0.6),
    0 0 30px rgba(255, 111, 0, 0.08);
}

.app-frame-bar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding-bottom: 16px;
  border-bottom: 1px solid var(--border-subtle);
  margin-bottom: 18px;
}

.app-frame-title {
  font-family: var(--font-mono);
  font-size: 0.78rem;
  font-weight: 700;
  color: var(--text-main);
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.app-frame-coins {
  font-family: var(--font-mono);
  font-size: 0.8rem;
  font-weight: 700;
  color: var(--accent-amber);
}

.app-canvas-inset {
  background: var(--bg-inset);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-lg);
  padding: 20px;
  margin-bottom: 18px;
}

.canvas-meta-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-family: var(--font-mono);
  font-size: 0.72rem;
  color: var(--text-dim);
  margin-bottom: 12px;
}

.prompt-box {
  margin-bottom: 18px;
}

.prompt-category {
  font-family: var(--font-mono);
  font-size: 0.68rem;
  font-weight: 700;
  text-transform: uppercase;
  color: var(--brand-orange-light);
  letter-spacing: 0.1em;
  display: block;
  margin-bottom: 4px;
}

.prompt-japanese {
  font-size: 1.4rem;
  font-weight: 700;
  color: #ffffff;
  line-height: 1.4;
  margin-bottom: 4px;
}

.prompt-reading {
  font-size: 0.82rem;
  color: var(--text-muted);
  font-family: var(--font-mono);
}

/* Assembly Blocks & Interactive Tiles */
.blocks-label {
  font-family: var(--font-mono);
  font-size: 0.65rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--text-dim);
  margin-bottom: 8px;
}

.block-tiles-tray {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.puzzle-block {
  display: inline-flex;
  align-items: center;
  padding: 8px 14px;
  background: var(--bg-surface-elevated);
  border: 1px solid var(--border-accent);
  border-bottom: 3px solid #141822;
  border-radius: var(--radius-sm);
  font-family: var(--font-mono);
  font-size: 0.82rem;
  font-weight: 600;
  color: #e2e8f0;
}

.puzzle-block.selected {
  background: rgba(255, 111, 0, 0.18);
  border-color: var(--brand-orange);
  color: #ffb066;
}

.puzzle-block.dotdash {
  background: rgba(37, 99, 235, 0.18);
  border-color: var(--brand-cap-blue-light);
  color: #93c5fd;
}

.app-frame-footer {
  display: flex;
  flex-direction: column;
  gap: 0.6rem;
  justify-content: space-between;
  align-items: center;
}

/* Flag Selector Group */
.flag-group {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  align-items: center;
}

.flag-chip {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 4px 10px;
  border-radius: var(--radius-sm);
  background: var(--bg-surface-elevated);
  border: 1px solid var(--border-subtle);
  font-family: var(--font-mono);
  font-size: 0.72rem;
  font-weight: 700;
  color: var(--text-muted);
  line-height: 1;
}

.flag-chip.active {
  background: var(--brand-orange);
  border-color: var(--brand-orange-light);
  color: #ffffff;
}

.flag-icon {
  width: 14px;
  height: 14px;
  flex-shrink: 0;
  display: block;
}

/* --------------------------------------------------------------------------
   Three Pillars Section
   -------------------------------------------------------------------------- */
.section-wrapper {
  padding: 64px 0;
  border-top: 1px solid var(--border-subtle);
}

.section-lead {
  text-align: center;
  max-width: 620px;
  margin: 0 auto 48px auto;
}

.section-pretitle {
  font-family: var(--font-mono);
  font-size: 0.75rem;
  font-weight: 700;
  color: var(--brand-orange);
  text-transform: uppercase;
  letter-spacing: 0.12em;
  margin-bottom: 8px;
}

.section-heading {
  font-size: 2rem;
  font-weight: 800;
  letter-spacing: -0.02em;
  margin-bottom: 12px;
}

.section-subtext {
  color: var(--text-muted);
  font-size: 0.98rem;
}

.modules-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 20px;
}

.module-card {
  background: var(--bg-surface);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-lg);
  padding: 28px 22px;
  display: flex;
  flex-direction: column;
  transition:
    transform 0.15s ease,
    border-color 0.15s ease;
}

.module-card:hover {
  transform: translateY(-3px);
  border-color: var(--brand-orange-light);
}

.card-top {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 16px;
}

.module-icon-box {
  width: 44px;
  height: 44px;
  border-radius: var(--radius-md);
  display: grid;
  place-items: center;
  font-size: 1.35rem;
}

.icon-orange {
  background: rgba(255, 111, 0, 0.15);
  color: var(--brand-orange-light);
}
.icon-blue {
  background: rgba(37, 99, 235, 0.15);
  color: #60a5fa;
}
.icon-teal {
  background: rgba(16, 185, 129, 0.15);
  color: #34d399;
}

.module-tag {
  font-family: var(--font-mono);
  font-size: 0.65rem;
  font-weight: 700;
  padding: 3px 8px;
  border-radius: 999px;
  border: 1px solid var(--border-subtle);
  color: var(--text-muted);
}

.module-title {
  font-size: 1.25rem;
  font-weight: 700;
  margin-bottom: 8px;
}

.module-summary {
  font-size: 0.88rem;
  color: var(--text-muted);
  line-height: 1.55;
  margin-bottom: 18px;
  flex-grow: 1;
}

.module-features-list {
  list-style: none;
  border-top: 1px dashed var(--border-subtle);
  padding-top: 14px;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.module-features-list li {
  font-family: var(--font-mono);
  font-size: 0.72rem;
  color: var(--text-dim);
  display: flex;
  align-items: center;
  gap: 6px;
}

.module-features-list li strong {
  color: var(--text-main);
}

/* --------------------------------------------------------------------------
   Hardware / Offline Architecture Card
   -------------------------------------------------------------------------- */
.arch-card {
  background: linear-gradient(135deg, #131720, #191f2c);
  border: 1px solid var(--border-accent);
  border-radius: var(--radius-xl);
  padding: 36px 40px;
  display: grid;
  grid-template-columns: 1.2fr 0.8fr;
  gap: 32px;
  align-items: center;
  margin-top: 40px;
}

.arch-title {
  font-size: 1.5rem;
  font-weight: 800;
  margin-bottom: 10px;
}

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

.arch-badges {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.arch-badge-item {
  font-family: var(--font-mono);
  font-size: 0.72rem;
  font-weight: 600;
  padding: 6px 12px;
  background: var(--bg-inset);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-sm);
  color: var(--brand-orange-light);
}

/* --------------------------------------------------------------------------
   Pre-Footer Signature / Handwritten Logo Badge
   -------------------------------------------------------------------------- */
.brand-showcase-section {
  display: flex;
  justify-content: center;
  align-items: center;
  padding: 20px 0 16px 0;
}

.brand-handwriting-card {
  background-color: #ffffff;
  border-radius: var(--radius-md); /* 14px gentle rounded corner */
  display: inline-flex;
  align-items: center;
  justify-content: center;
  box-shadow:
    0 8px 24px rgba(0, 0, 0, 0.35),
    0 0 1px rgba(255, 255, 255, 0.8);
  border: 1px solid rgba(255, 255, 255, 0.9);
  transition:
    transform 0.2s ease,
    box-shadow 0.2s ease;
}

.brand-handwriting-card:hover {
  transform: translateY(-2px);
  box-shadow:
    0 12px 28px rgba(0, 0, 0, 0.45),
    0 0 20px var(--brand-orange-glow);
}

.brand-handwriting-img {
  max-width: 260px;
  max-height: 85px;
  width: auto;
  height: auto;
  object-fit: contain;
  display: block;
}

/* --------------------------------------------------------------------------
   Global Footer
   -------------------------------------------------------------------------- */
.site-footer {
  border-top: 1px solid var(--border-subtle);
  background: var(--bg-inset);
  padding: 40px 0;
  margin-top: 60px;
}

.footer-content {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 20px;
}

.footer-copy {
  font-size: 0.82rem;
  color: var(--text-dim);
}

.footer-nav {
  display: flex;
  align-items: center;
  gap: 24px;
}

.footer-nav a {
  font-family: var(--font-mono);
  font-size: 0.75rem;
  color: var(--text-muted);
  transition: color 0.15s ease;
}

.footer-nav a:hover {
  color: var(--brand-orange-light);
}

/* --------------------------------------------------------------------------
   Responsive Rules
   -------------------------------------------------------------------------- */
@media (max-width: 900px) {
  .hero-section {
    grid-template-columns: 1fr;
    gap: 36px;
  }
  .modules-grid {
    grid-template-columns: 1fr;
  }
  .arch-card {
    grid-template-columns: 1fr;
    padding: 28px 24px;
  }
}

@media (max-width: 600px) {
  .hero-title {
    font-size: 2.15rem;
  }
  .cta-row {
    flex-direction: column;
    align-items: stretch;
  }
  .nav-links {
    display: none;
  }
  .footer-content {
    flex-direction: column;
    align-items: flex-start;
  }
}
