/* ==========================================================================
   EUNJO.AI Official Brand Website - Responsive Media Queries
   Breakpoints: 1440px+, 1024px, 768px, 430px, 390px, 360px
   ========================================================================== */

/* 1440px+ (Large Screens) */
@media (min-width: 1440px) {
  :root {
    --container-max: 1360px;
  }
  .hero-title {
    font-size: 5rem;
  }
}

/* Header: keep the desktop nav on a single line */
@media (max-width: 1599px) {
  .theme-btn {
    padding: 5px 7px;
  }
  .theme-btn .theme-name {
    display: none;
  }
  .nav-menu {
    gap: 22px;
  }
}

@media (max-width: 1180px) {
  .nav-menu {
    gap: 18px;
  }
  .btn-audio-toggle {
    padding: 6px 9px;
    gap: 0;
  }
  .btn-audio-toggle .audio-label {
    display: none;
  }
}

/* 1024px (Tablets Landscape / Small Laptops) */
@media (max-width: 1024px) {
  /* Navigation Drawer (nav no longer fits inline) */
  .nav-toggle-btn {
    display: flex;
    padding: 4px;
    margin-left: 2px;
  }
  .nav-menu {
    position: fixed;
    top: var(--header-height);
    right: -100%;
    width: 260px;
    height: calc(100vh - var(--header-height));
    background: var(--bg-surface);
    backdrop-filter: blur(24px);
    -webkit-backdrop-filter: blur(24px);
    border-left: 1px solid var(--border-subtle);
    flex-direction: column;
    align-items: flex-start;
    padding: 32px 24px;
    gap: 20px;
    transition: right 0.3s cubic-bezier(0.16, 1, 0.3, 1);
    z-index: 99;
  }
  .nav-menu.open {
    right: 0;
  }
  .nav-link {
    font-size: 1.05rem;
    width: 100%;
    padding: 8px 0;
  }

  .hero-title {
    font-size: 3.4rem;
  }
  .about-grid {
    grid-template-columns: 1fr;
    gap: 36px;
  }
  .lab-flow-wrap {
    grid-template-columns: repeat(3, 1fr);
  }
  .lab-node-card .node-connector {
    display: none;
  }
  .footer-top {
    grid-template-columns: 1fr 1fr;
  }
}

/* 768px (Tablets Portrait / Mobile Devices) */
@media (max-width: 768px) {
  :root {
    --header-height: 62px;
  }
  .section {
    padding: 70px 0;
  }
  .section-title {
    font-size: 1.85rem;
  }
  .section-subtitle {
    font-size: 0.92rem;
  }

  /* Hero constellation: taller frame, lighter HUD */
  .hero-constellation {
    aspect-ratio: 4 / 3.4;
    margin-bottom: 20px;
  }
  .hud-label {
    font-size: 0.6rem;
    letter-spacing: 0.06em;
  }
  .hud-label-tl { left: 18px; }
  .hud-label-tr { right: 18px; }
  .hud-caption {
    font-size: 0.86rem;
    bottom: 42px;
  }
  .scene-step {
    font-size: 0.6rem;
    padding: 4px 8px;
  }

  /* Origin Story: compact timeline */
  .story-timeline {
    gap: 24px;
  }
  .story-timeline::before,
  .story-timeline::after {
    top: 20px;
    left: 19px;
  }
  .story-timeline::before {
    bottom: 20px;
  }
  .story-timeline::after {
    height: calc((100% - 40px) * var(--thread, 0));
  }
  .story-chapter.is-lit .story-marker {
    box-shadow: 0 0 0 4px var(--story-band), 0 0 18px var(--primary-orange-glow);
  }
  .story-chapter {
    grid-template-columns: 40px 1fr;
    gap: 14px;
  }
  .story-marker {
    width: 40px;
    height: 40px;
    box-shadow: 0 0 0 4px var(--story-band);
  }
  .story-marker-num {
    font-size: 0.8rem;
  }
  .story-card {
    padding: 22px 20px;
  }
  .story-title {
    font-size: 1.2rem;
  }
  .story-body {
    font-size: 0.93rem;
  }
  .story-shift-list {
    grid-template-columns: 1fr;
    gap: 8px;
  }
  .story-shift-list li {
    flex-direction: row;
    align-items: center;
    flex-wrap: wrap;
    gap: 8px;
    padding: 10px 14px;
  }
  .story-epilogue {
    margin-top: 44px;
  }
  .story-epilogue-text {
    font-size: 1.02rem;
  }

  /* Header Clean Layout Optimization */
  .header {
    height: var(--header-height);
  }
  .domain-banner {
    padding: 6px 0;
    font-size: 0.78rem;
  }
  .domain-banner-content {
    gap: 6px;
    padding: 0 10px;
    line-height: 1.45;
  }
  .banner-badge {
    font-size: 0.65rem;
    padding: 1px 6px;
  }
  .header-container {
    padding: 0 16px;
    flex-wrap: nowrap;
    justify-content: space-between;
    gap: 8px;
  }

  .brand-link {
    gap: 8px;
    flex-shrink: 0;
    white-space: nowrap;
  }
  .brand-symbol {
    width: 32px;
    height: 32px;
    border-radius: 8px;
  }
  .brand-symbol img {
    width: 24px;
    height: 24px;
  }
  .brand-name {
    font-size: 1.15rem;
    white-space: nowrap;
  }
  /* Hide badge on mobile to prevent line-wrapping */
  .brand-tag {
    display: none !important;
  }

  .header-actions {
    display: flex;
    align-items: center;
    gap: 6px;
    flex-shrink: 0;
  }

  /* Compact Theme Switcher for Tablets & Phones */
  .theme-switcher {
    padding: 2px;
    gap: 1px;
    border-radius: 20px;
  }
  .theme-btn {
    padding: 5px 6px;
    border-radius: 14px;
  }
  .theme-btn .theme-name {
    display: none !important;
  }
  .theme-icon {
    width: 14px;
    height: 14px;
  }

  /* Compact Audio Toggle */
  .btn-audio-toggle {
    padding: 5px 8px;
    gap: 0;
    border-radius: 16px;
  }
  .btn-audio-toggle .audio-label {
    display: none !important;
  }

  /* Hero Section */
  .hero-section {
    padding: 40px 0 60px 0;
  }
  .hero-title {
    font-size: 2.8rem;
  }
  .hero-desc {
    font-size: 1.15rem;
  }
  .hero-sub {
    font-size: 0.95rem;
  }
  .hero-brandline {
    font-size: 0.95rem;
  }
  .hero-visual-card {
    gap: 16px;
  }
  .stat-divider {
    display: none;
  }

  /* Projects */
  .projects-grid {
    grid-template-columns: 1fr;
  }

  /* Lab */
  .lab-flow-wrap {
    grid-template-columns: 1fr;
  }

  /* Fox Hero Showcase */
  .fox-hero-showcase {
    flex-direction: column;
    text-align: center;
    gap: 20px;
    padding: 28px 20px;
  }
  .fox-hero-img-wrap {
    width: 130px;
    height: 130px;
    margin: 0 auto;
    border-radius: 20px;
  }
  .fox-hero-text {
    align-items: center;
  }

  /* Philosophy Section Responsive */
  .philosophy-section {
    padding: 100px 0;
  }
  .philosophy-quote-card {
    padding: 48px 24px;
    border-radius: 28px;
  }
  .philosophy-main-quote {
    font-size: 1.95rem;
  }
  .philosophy-en-quote {
    font-size: 1rem;
  }

  /* Footer */
  .footer-top {
    grid-template-columns: 1fr;
    gap: 32px;
  }
  .footer-bottom {
    flex-direction: column;
    gap: 14px;
    text-align: center;
  }
}

/* 430px (Large Phones like iPhone 14/15/16 Pro Max) */
@media (max-width: 430px) {
  .header-container {
    padding: 0 12px;
  }
  .brand-symbol {
    width: 30px;
    height: 30px;
  }
  .brand-symbol img {
    width: 22px;
    height: 22px;
  }
  .brand-name {
    font-size: 1.08rem;
  }
  .header-actions {
    gap: 5px;
  }
  .hero-title {
    font-size: 2.3rem;
  }
  .hero-desc {
    font-size: 1.05rem;
    margin-bottom: 12px;
  }
  .hero-break {
    display: inline;
  }
  .hero-sub {
    font-size: 0.9rem;
    margin-bottom: 24px;
  }
  .hero-sub br {
    display: none;
  }
  .hero-actions {
    flex-direction: column;
    width: 100%;
  }
  .hero-actions .btn {
    width: 100%;
  }
  .about-card-mesh {
    grid-template-columns: 1fr;
  }
  .hud-long {
    display: none;
  }
  .story-shift-list,
  .story-steps {
    grid-template-columns: 1fr;
  }
  .philosophy-main-quote {
    font-size: 1.55rem;
    line-height: 1.4;
  }
  .philosophy-en-quote {
    font-size: 0.92rem;
  }
  .philosophy-quote-card {
    padding: 38px 18px;
    border-radius: 24px;
  }
  .modal-dialog {
    border-radius: 18px;
  }
  .modal-header-visual {
    height: 180px;
  }
  .modal-title-overlay h2 {
    font-size: 1.4rem;
  }
}

/* 390px (Standard Phones like iPhone 12/13/14) */
@media (max-width: 390px) {
  .container {
    padding: 0 14px;
  }
  .header-container {
    padding: 0 10px;
  }
  .brand-symbol {
    width: 28px;
    height: 28px;
  }
  .brand-name {
    font-size: 1.02rem;
  }
  .theme-btn {
    padding: 4px 5px;
  }
  .btn-audio-toggle {
    padding: 4px 6px;
  }
  .hero-title {
    font-size: 2.1rem;
  }
  .hero-badge-pill {
    font-size: 0.74rem;
    padding: 4px 10px;
  }
  .section-title {
    font-size: 1.65rem;
  }
}

/* 360px (Compact Phones like Galaxy S Series / SE) */
@media (max-width: 360px) {
  .header-container {
    padding: 0 8px;
    gap: 4px;
  }
  .brand-link {
    gap: 6px;
  }
  .brand-name {
    font-size: 0.96rem;
  }
  .header-actions {
    gap: 4px;
  }
  .theme-btn {
    padding: 3px 4px;
  }
  .hero-title {
    font-size: 1.9rem;
  }
  .hero-brandline {
    font-size: 0.8rem;
    letter-spacing: 0.04em;
  }
  .hero-desc {
    font-size: 0.92rem;
  }
  .btn {
    padding: 10px 18px;
    font-size: 0.88rem;
  }
  .universe-card {
    padding: 20px 16px;
  }
  .philosophy-main-quote {
    font-size: 1.35rem;
    line-height: 1.4;
  }
  .philosophy-quote-card {
    padding: 32px 14px;
    border-radius: 20px;
  }
}
