/* ========================================
   ガチャログ Developer Site — style.css
   Design: MUJI × Gashapon aesthetic
   ======================================== */

@import url('https://fonts.googleapis.com/css2?family=Outfit:wght@300;400;500;600;700;800&family=Noto+Sans+JP:wght@300;400;500;700&display=swap');

/* ── Reset & Base ── */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

:root {
  --cream:        #F5F5F0;
  --cream-dark:   #EAEAE3;
  --charcoal:     #1A1A1A;
  --charcoal-lt:  #4A4A4A;
  --gold:         #E8B84B;
  --gold-light:   #F0CC7A;
  --gold-dark:    #C49A2E;
  --muted:        #9A9A94;
  --border:       #E0E0D8;
  --surface:      #FFFFFF;
  --rare-blue:    #6B9FD4;
  --rare-purple:  #C87DB8;
  --font-en:      'Outfit', sans-serif;
  --font-jp:      'Noto Sans JP', sans-serif;
  --radius-sm:    8px;
  --radius-md:    16px;
  --radius-lg:    24px;
  --radius-xl:    32px;
  --shadow-sm:    0 2px 12px rgba(26,26,26,0.07);
  --shadow-md:    0 6px 24px rgba(26,26,26,0.10);
  --shadow-lg:    0 16px 48px rgba(26,26,26,0.14);
}

html { scroll-behavior: smooth; }

body {
  font-family: var(--font-en);
  background: var(--cream);
  color: var(--charcoal);
  line-height: 1.6;
  overflow-x: hidden;
}

/* ── Typography ── */
h1, h2, h3, h4 { line-height: 1.2; }
.jp { font-family: var(--font-jp); }

/* ── Utility ── */
.container { max-width: 1120px; margin: 0 auto; padding: 0 24px; }
.badge {
  display: inline-flex; align-items: center; gap: 6px;
  padding: 4px 12px; border-radius: 99px;
  font-size: 12px; font-weight: 600; letter-spacing: 0.05em;
}
.badge-gold   { background: var(--gold-light); color: var(--gold-dark); }
.badge-blue   { background: #D6E8F7; color: #3A6FA0; }
.badge-purple { background: #F0D8EB; color: #8B4F7E; }
.badge-muted  { background: var(--cream-dark); color: var(--muted); }

/* ── Nav ── */
#nav {
  position: fixed; top: 0; left: 0; right: 0; z-index: 100;
  background: rgba(245,245,240,0.85);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--border);
  transition: box-shadow 0.3s;
}
#nav.scrolled { box-shadow: var(--shadow-sm); }
.nav-inner {
  display: flex; align-items: center; justify-content: space-between;
  height: 64px;
}
.nav-logo {
  display: flex; align-items: center; gap: 10px;
  text-decoration: none;
}
.nav-logo-icon {
  width: 36px; height: 36px; border-radius: 10px;
  background: var(--charcoal);
  display: flex; align-items: center; justify-content: center;
  font-size: 18px;
}
.nav-logo-text {
  font-size: 18px; font-weight: 700; color: var(--charcoal);
  letter-spacing: -0.3px;
}
.nav-links {
  display: flex; align-items: center; gap: 32px; list-style: none;
}
.nav-links a {
  font-size: 14px; font-weight: 500; color: var(--charcoal-lt);
  text-decoration: none; transition: color 0.2s;
}
.nav-links a:hover { color: var(--charcoal); }
.nav-cta {
  display: inline-block;
  padding: 9px 20px; border-radius: var(--radius-sm);
  background: var(--charcoal); color: #ffffff !important;
  font-size: 13px; font-weight: 600;
  transition: opacity 0.2s !important;
}
.nav-cta:hover { opacity: 0.8; }
.nav-hamburger {
  display: none; flex-direction: column; gap: 5px;
  cursor: pointer; padding: 4px;
}
.nav-hamburger span {
  display: block; width: 24px; height: 2px;
  background: var(--charcoal); border-radius: 2px;
  transition: all 0.3s;
}

/* ── Hero ── */
#hero {
  min-height: 100vh;
  display: flex; align-items: center;
  padding: 100px 0 60px;
  position: relative; overflow: hidden;
}
.hero-bg {
  position: absolute; inset: 0;
  background: linear-gradient(135deg, var(--cream) 0%, #EDEDEA 60%, #E8E8E0 100%);
  z-index: 0;
}
.hero-orb {
  position: absolute; border-radius: 50%;
  opacity: 0.35; filter: blur(60px);
  pointer-events: none;
}
.hero-orb-1 {
  width: 480px; height: 480px;
  background: radial-gradient(circle, var(--gold-light), transparent);
  top: -120px; right: -80px;
  animation: orbFloat 8s ease-in-out infinite;
}
.hero-orb-2 {
  width: 320px; height: 320px;
  background: radial-gradient(circle, var(--rare-blue), transparent);
  bottom: -60px; left: -60px;
  animation: orbFloat 10s ease-in-out infinite reverse;
}
@keyframes orbFloat {
  0%, 100% { transform: translateY(0px) scale(1); }
  50% { transform: translateY(-30px) scale(1.05); }
}
.hero-inner {
  position: relative; z-index: 1;
  display: grid; grid-template-columns: 1fr 1fr;
  gap: 60px; align-items: center;
}
.hero-label {
  font-size: 11px; font-weight: 700; letter-spacing: 0.2em;
  color: var(--muted); text-transform: uppercase;
  margin-bottom: 20px;
}
.hero-title {
  font-size: clamp(40px, 5vw, 68px);
  font-weight: 800; letter-spacing: -2px;
  color: var(--charcoal); margin-bottom: 8px;
}
.hero-title-jp {
  font-family: var(--font-jp);
  font-size: clamp(18px, 2.5vw, 26px);
  font-weight: 300; color: var(--muted);
  letter-spacing: 0.05em; margin-bottom: 28px;
}
.hero-desc {
  font-size: 17px; color: var(--charcoal-lt);
  line-height: 1.7; margin-bottom: 40px;
  max-width: 480px;
}
.hero-actions {
  display: flex; align-items: center; gap: 16px; flex-wrap: wrap;
}
.btn {
  display: inline-flex; align-items: center; gap: 8px;
  padding: 14px 28px; border-radius: var(--radius-sm);
  font-size: 15px; font-weight: 600;
  text-decoration: none; cursor: pointer;
  transition: all 0.2s; border: none;
}
.btn-primary {
  background: var(--charcoal); color: var(--surface);
}
.btn-primary:hover { background: var(--charcoal-lt); transform: translateY(-1px); box-shadow: var(--shadow-md); }
.btn-outline {
  background: transparent; color: var(--charcoal);
  border: 1.5px solid var(--border);
}
.btn-outline:hover { border-color: var(--charcoal); transform: translateY(-1px); }
.btn-gold {
  background: var(--gold); color: var(--charcoal);
}
.btn-gold:hover { background: var(--gold-light); transform: translateY(-1px); box-shadow: var(--shadow-md); }
.hero-stats {
  display: flex; gap: 32px; margin-top: 48px;
}
.hero-stat-val {
  font-size: 28px; font-weight: 800; color: var(--charcoal);
  letter-spacing: -1px;
}
.hero-stat-label {
  font-size: 12px; color: var(--muted); margin-top: 2px;
}
.hero-visual {
  position: relative;
  display: flex; align-items: center; justify-content: center;
}
.hero-phone-wrap {
  position: relative;
  width: 100%;
  max-width: 320px;
  margin: 0 auto;
}
.hero-mockup-img {
  width: 100%;
  height: auto;
  display: block;
}
.hero-float-badge {
  position: absolute;
  background: var(--surface); border-radius: var(--radius-md);
  padding: 12px 16px; box-shadow: var(--shadow-md);
  display: flex; align-items: center; gap: 10px;
  animation: floatBadge 4s ease-in-out infinite;
}
.hero-float-badge.badge-1 { top: 40px; right: -40px; animation-delay: 0s; }
.hero-float-badge.badge-2 { bottom: 60px; left: -50px; animation-delay: 2s; }
@keyframes floatBadge {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-8px); }
}
.float-icon { font-size: 24px; }
.float-text-main { font-size: 13px; font-weight: 700; color: var(--charcoal); }
.float-text-sub { font-size: 11px; color: var(--muted); }

/* ── Section shared ── */
section { padding: 100px 0; }
.section-label {
  font-size: 11px; font-weight: 700; letter-spacing: 0.2em;
  color: var(--gold-dark); text-transform: uppercase;
  margin-bottom: 12px;
}
.section-title {
  font-size: clamp(28px, 3.5vw, 44px);
  font-weight: 800; letter-spacing: -1px;
  color: var(--charcoal); margin-bottom: 16px;
}
.section-desc {
  font-size: 16px; color: var(--charcoal-lt);
  line-height: 1.75; max-width: 560px;
}

/* ── Features ── */
#features { background: var(--surface); }
.features-grid {
  display: grid; grid-template-columns: repeat(3, 1fr);
  gap: 24px; margin-top: 60px;
}
.feature-card {
  background: var(--cream); border-radius: var(--radius-lg);
  padding: 32px;
  border: 1px solid var(--border);
  transition: transform 0.3s, box-shadow 0.3s;
  position: relative; overflow: hidden;
}
.feature-card::before {
  content: ''; position: absolute;
  top: 0; left: 0; right: 0; height: 3px;
  background: linear-gradient(90deg, var(--gold), var(--gold-light));
  transform: scaleX(0); transform-origin: left;
  transition: transform 0.3s;
}
.feature-card:hover { transform: translateY(-4px); box-shadow: var(--shadow-md); }
.feature-card:hover::before { transform: scaleX(1); }
.feature-icon {
  width: 56px; height: 56px; border-radius: var(--radius-md);
  background: var(--charcoal);
  display: flex; align-items: center; justify-content: center;
  font-size: 26px; margin-bottom: 20px;
}
.feature-title {
  font-size: 18px; font-weight: 700; color: var(--charcoal);
  margin-bottom: 10px;
}
.feature-desc {
  font-size: 14px; color: var(--charcoal-lt); line-height: 1.7;
}
.feature-tech {
  margin-top: 16px; display: flex; flex-wrap: wrap; gap: 6px;
}

/* ── Architecture ── */
#architecture { background: var(--cream); }
.arch-inner {
  display: grid; grid-template-columns: 1fr 1fr;
  gap: 80px; align-items: start; margin-top: 60px;
}
.arch-diagram {
  background: var(--charcoal); border-radius: var(--radius-lg);
  padding: 32px; color: var(--surface);
}
.arch-layer {
  border: 1px solid rgba(255,255,255,0.1);
  border-radius: var(--radius-md); padding: 16px 20px;
  margin-bottom: 12px; position: relative;
}
.arch-layer:last-child { margin-bottom: 0; }
.arch-layer-name {
  font-size: 11px; font-weight: 700; letter-spacing: 0.15em;
  color: var(--gold); text-transform: uppercase; margin-bottom: 8px;
}
.arch-layer-items {
  display: flex; flex-wrap: wrap; gap: 8px;
}
.arch-chip {
  font-size: 12px; font-weight: 500;
  padding: 3px 10px; border-radius: 6px;
  background: rgba(255,255,255,0.08); color: rgba(255,255,255,0.75);
}
.arch-arrow {
  text-align: center; color: rgba(255,255,255,0.25);
  font-size: 18px; margin: -4px 0 4px;
}
.tech-stack { display: flex; flex-direction: column; gap: 20px; }
.tech-item {
  display: flex; align-items: flex-start; gap: 16px;
  padding: 20px; background: var(--surface);
  border-radius: var(--radius-md); border: 1px solid var(--border);
  transition: box-shadow 0.2s;
}
.tech-item:hover { box-shadow: var(--shadow-sm); }
.tech-item-icon {
  width: 44px; height: 44px; border-radius: var(--radius-sm);
  background: var(--cream-dark);
  display: flex; align-items: center; justify-content: center;
  font-size: 22px; flex-shrink: 0;
}
.tech-item-name {
  font-size: 15px; font-weight: 700; color: var(--charcoal);
  margin-bottom: 4px;
}
.tech-item-desc {
  font-size: 13px; color: var(--muted); line-height: 1.5;
}

/* ── Screens ── */
#screens { background: var(--surface); }
.screens-tabs {
  display: flex; gap: 8px; margin-bottom: 40px; flex-wrap: wrap;
}
.screen-tab {
  padding: 9px 20px; border-radius: 99px;
  border: 1.5px solid var(--border);
  font-size: 13px; font-weight: 600; color: var(--muted);
  cursor: pointer; background: transparent;
  transition: all 0.2s;
}
.screen-tab.active {
  background: var(--charcoal); color: var(--surface);
  border-color: var(--charcoal);
}
.screen-tab:hover:not(.active) { border-color: var(--charcoal-lt); color: var(--charcoal); }
.screens-content { display: none; }
.screens-content.active { display: grid; grid-template-columns: 1fr 1.4fr; gap: 60px; align-items: center; }
.screen-mockup-wrap {
  width: 100%;
  max-width: 280px;
  margin: 0 auto;
}
.screen-mockup-img {
  width: 100%;
  height: auto;
  display: block;
}
.screen-info-title {
  font-size: 26px; font-weight: 800; color: var(--charcoal);
  margin-bottom: 12px; letter-spacing: -0.5px;
}
.screen-info-desc {
  font-size: 15px; color: var(--charcoal-lt);
  line-height: 1.75; margin-bottom: 24px;
}
.screen-features { list-style: none; display: flex; flex-direction: column; gap: 10px; }
.screen-features li {
  display: flex; align-items: flex-start; gap: 10px;
  font-size: 14px; color: var(--charcoal-lt);
}
.screen-features li::before {
  content: '✦'; color: var(--gold); font-size: 12px;
  margin-top: 2px; flex-shrink: 0;
}

/* ── DB Schema ── */
#schema { background: var(--cream); }
.schema-grid {
  display: grid; grid-template-columns: repeat(2, 1fr);
  gap: 20px; margin-top: 60px;
}
.schema-table {
  background: var(--charcoal); border-radius: var(--radius-md);
  overflow: hidden; box-shadow: var(--shadow-md);
}
.schema-table-header {
  padding: 14px 20px;
  background: rgba(255,255,255,0.05);
  display: flex; align-items: center; gap: 10px;
}
.schema-table-name {
  font-size: 14px; font-weight: 700; color: var(--surface);
  font-family: 'Courier New', monospace;
}
.schema-table-badge {
  font-size: 10px; padding: 2px 8px; border-radius: 4px;
  background: var(--gold); color: var(--charcoal); font-weight: 700;
}
.schema-cols { padding: 12px 0; }
.schema-col {
  display: flex; align-items: center;
  padding: 7px 20px; gap: 10px;
  transition: background 0.15s;
}
.schema-col:hover { background: rgba(255,255,255,0.04); }
.schema-col-name {
  font-family: 'Courier New', monospace;
  font-size: 13px; color: rgba(255,255,255,0.85);
  flex: 1;
}
.schema-col-type {
  font-size: 11px; color: var(--gold-light);
  font-family: 'Courier New', monospace;
}
.schema-col-pk {
  font-size: 10px; padding: 1px 6px; border-radius: 3px;
  background: rgba(232,184,75,0.2); color: var(--gold);
  font-weight: 700;
}
.schema-col-fk {
  font-size: 10px; padding: 1px 6px; border-radius: 3px;
  background: rgba(107,159,212,0.2); color: var(--rare-blue);
  font-weight: 700;
}

/* ── Getting Started ── */
#getting-started { background: var(--surface); }
.steps { display: flex; flex-direction: column; gap: 0; margin-top: 60px; }
.step {
  display: grid; grid-template-columns: 80px 1fr;
  gap: 32px; position: relative;
}
.step:not(:last-child)::after {
  content: ''; position: absolute;
  left: 39px; top: 64px; bottom: 0;
  width: 2px; background: var(--border);
}
.step-num-wrap { display: flex; flex-direction: column; align-items: center; padding-top: 4px; }
.step-num {
  width: 44px; height: 44px; border-radius: 50%;
  background: var(--charcoal); color: var(--surface);
  display: flex; align-items: center; justify-content: center;
  font-size: 16px; font-weight: 800; flex-shrink: 0;
  position: relative; z-index: 1;
}
.step-body { padding-bottom: 48px; }
.step-title {
  font-size: 18px; font-weight: 700; color: var(--charcoal);
  margin-bottom: 8px;
}
.step-desc { font-size: 14px; color: var(--charcoal-lt); margin-bottom: 16px; line-height: 1.65; }
.code-block {
  background: var(--charcoal); border-radius: var(--radius-md);
  padding: 20px 24px; overflow-x: auto;
  position: relative;
}
.code-block pre {
  font-family: 'Courier New', monospace;
  font-size: 13px; color: rgba(255,255,255,0.85);
  line-height: 1.7; white-space: pre;
}
.code-block .code-comment { color: var(--muted); }
.code-block .code-cmd { color: var(--gold-light); }
.code-block .code-string { color: #9ECBFF; }
.copy-btn {
  position: absolute; top: 12px; right: 12px;
  background: rgba(255,255,255,0.08); border: none;
  color: rgba(255,255,255,0.6); padding: 5px 10px;
  border-radius: 6px; font-size: 11px; cursor: pointer;
  transition: background 0.2s;
}
.copy-btn:hover { background: rgba(255,255,255,0.15); }
.copy-btn.copied { color: var(--gold); }

/* ── Footer ── */
#footer {
  background: var(--charcoal); color: rgba(255,255,255,0.7);
  padding: 60px 0 40px;
}
.footer-inner {
  display: grid; grid-template-columns: 1.5fr 1fr 1fr;
  gap: 40px; margin-bottom: 48px;
}
.footer-brand-name {
  font-size: 22px; font-weight: 800; color: var(--surface);
  letter-spacing: -0.5px; margin-bottom: 10px;
}
.footer-brand-desc {
  font-size: 13px; line-height: 1.65; max-width: 260px;
}
.footer-col-title {
  font-size: 11px; font-weight: 700; letter-spacing: 0.15em;
  color: var(--gold); text-transform: uppercase;
  margin-bottom: 16px;
}
.footer-links { list-style: none; display: flex; flex-direction: column; gap: 10px; }
.footer-links a {
  font-size: 14px; color: rgba(255,255,255,0.6);
  text-decoration: none; transition: color 0.2s;
}
.footer-links a:hover { color: var(--surface); }
.footer-divider { border: none; border-top: 1px solid rgba(255,255,255,0.08); margin-bottom: 24px; }
.footer-bottom {
  display: flex; align-items: center; justify-content: space-between;
  font-size: 13px;
}
.footer-copy { color: rgba(255,255,255,0.35); }
.footer-made { color: rgba(255,255,255,0.35); }
.footer-made span { color: var(--gold); }

/* ── Scroll animations ── */
.fade-up {
  opacity: 0; transform: translateY(24px);
  transition: opacity 0.6s ease, transform 0.6s ease;
}
.fade-up.visible { opacity: 1; transform: translateY(0); }
.fade-up-delay-1 { transition-delay: 0.1s; }
.fade-up-delay-2 { transition-delay: 0.2s; }
.fade-up-delay-3 { transition-delay: 0.3s; }
.fade-up-delay-4 { transition-delay: 0.4s; }

/* ── Physics Canvas Demo ── */
#physics-demo {
  background: var(--cream-dark);
  text-align: center; padding: 80px 0;
  border-top: 1px solid var(--border);
  border-bottom: 1px solid var(--border);
}
.physics-canvas-wrap {
  width: 100%; max-width: 800px; height: 320px;
  margin: 40px auto 0;
  position: relative; overflow: hidden;
  border-radius: var(--radius-lg);
  background: var(--cream);
  border: 1px solid var(--border);
  box-shadow: var(--shadow-md);
}
#physics-canvas { width: 100%; height: 100%; }
.physics-drop-btn {
  margin-top: 24px;
}

/* ── Responsive ── */
@media (max-width: 900px) {
  .hero-inner { grid-template-columns: 1fr; text-align: center; }
  .hero-visual { order: -1; }
  .hero-desc { max-width: 100%; margin: 0 auto 40px; }
  .hero-actions { justify-content: center; }
  .hero-stats { justify-content: center; }
  .hero-float-badge.badge-2 { left: -20px; }
  .features-grid { grid-template-columns: 1fr 1fr; }
  .arch-inner { grid-template-columns: 1fr; }
  .schema-grid { grid-template-columns: 1fr; }
  .footer-inner { grid-template-columns: 1fr 1fr; }
}

@media (max-width: 640px) {
  .nav-links { display: none; }
  .nav-hamburger { display: flex; }
  #nav.menu-open { background: var(--cream); backdrop-filter: none; -webkit-backdrop-filter: none; }
  .nav-links.open {
    display: flex; flex-direction: column; gap: 0;
    position: fixed; top: 64px; left: 0; right: 0; bottom: 0;
    background: var(--cream); padding: 24px;
    border-top: 1px solid var(--border);
  }
  .nav-links.open li a {
    display: block; padding: 14px 0;
    font-size: 18px; border-bottom: 1px solid var(--border);
  }
  .features-grid { grid-template-columns: 1fr; }
  .screens-content.active { grid-template-columns: 1fr; }
  .step { grid-template-columns: 56px 1fr; gap: 16px; }
  .footer-inner { grid-template-columns: 1fr; }
  .footer-bottom { flex-direction: column; gap: 8px; text-align: center; }
}

/* ── Legal Pages (Privacy, Support, Terms) ── */
.legal-page {
  padding-top: 140px; padding-bottom: 80px;
  background: var(--cream);
  min-height: 100vh;
}
.legal-container { max-width: 780px; }
.legal-date {
  font-size: 13px; color: var(--muted);
  margin-top: 8px;
}
.legal-content {
  margin-top: 48px;
}
.legal-content h2 {
  font-size: 20px; font-weight: 700;
  color: var(--charcoal);
  margin: 36px 0 12px; padding-top: 16px;
  border-top: 1px solid var(--border);
}
.legal-content h2:first-child { border-top: none; margin-top: 0; }
.legal-content h3 {
  font-size: 16px; font-weight: 700;
  color: var(--charcoal); margin-bottom: 6px;
}
.legal-content p {
  font-size: 15px; line-height: 1.8;
  color: var(--charcoal-lt); margin-bottom: 12px;
}
.legal-content ul {
  padding-left: 24px; margin-bottom: 16px;
}
.legal-content li {
  font-size: 14px; color: var(--charcoal-lt);
  line-height: 1.75; margin-bottom: 4px;
}
.legal-content a {
  color: var(--gold-dark); text-decoration: underline;
}
.legal-content a:hover { color: var(--gold); }

/* Support page specifics */
.support-email-box {
  display: inline-flex; align-items: center; gap: 12px;
  background: var(--surface); border: 1px solid var(--border);
  border-radius: var(--radius-md); padding: 16px 24px;
  margin: 8px 0 24px; box-shadow: var(--shadow-sm);
}
.support-email-box span { font-size: 24px; }
.support-email-box a {
  font-size: 18px; font-weight: 600;
  color: var(--gold-dark); text-decoration: none;
}
.support-email-box a:hover { color: var(--gold); text-decoration: underline; }
.faq-item {
  background: var(--surface); border: 1px solid var(--border);
  border-radius: var(--radius-md); padding: 20px 24px;
  margin-bottom: 12px; transition: box-shadow 0.2s;
}
.faq-item:hover { box-shadow: var(--shadow-sm); }
.faq-item h3 { color: var(--charcoal); margin-bottom: 8px; }
.faq-item p { margin-bottom: 0; }
.nav-active:not(.nav-cta) { color: var(--charcoal) !important; font-weight: 700 !important; }
