/* ==========================================================================
   Astro.nasa - 2bit / Famicom Cosmic Sweets Site
   ========================================================================== */

:root {
  --bg:      #0a0726;
  --bg-2:    #120a36;
  --panel:   #1a1147;
  --panel-2: #251a63;
  --ink:     #fdfcff;
  --ink-mute:#b9b0e8;
  --pink:    #ff5dbb;
  --cyan:    #45e3ff;
  --yellow:  #ffe24a;
  --purple:  #a974ff;
  --green:   #7cff9b;
  --orange:  #ff9d4d;
  --line:    #3a2f86;
  --shadow:  #07040f;

  --pixel:  'DotGothic16', 'Noto Sans JP', sans-serif;
  --pixel-en: 'Press Start 2P', 'DotGothic16', monospace;
}

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

html { scroll-behavior: smooth; }

body {
  font-family: var(--pixel);
  color: var(--ink);
  background: var(--bg);
  line-height: 1.9;
  font-size: 15px;
  overflow-x: hidden;
  position: relative;
  letter-spacing: .02em;
  text-shadow: 0 2px 0 rgba(0,0,0,.35);
}

a { color: inherit; text-decoration: none; }
img { max-width: 100%; display: block; }

::selection { background: var(--pink); color: #fff; }

/* Crisp pixel rendering for decorative bits */
.pixel-render { image-rendering: pixelated; image-rendering: crisp-edges; }

/* ============== Cosmic Background ============== */
.space-bg {
  position: fixed;
  inset: 0;
  z-index: -3;
  background:
    radial-gradient(ellipse at 18% 12%, #2a1a6b 0%, transparent 45%),
    radial-gradient(ellipse at 82% 72%, #4a1a64 0%, transparent 50%),
    radial-gradient(ellipse at 50% 105%, #14245e 0%, transparent 55%),
    linear-gradient(180deg, #070417 0%, #0a0726 100%);
}

/* JS-generated pixel star layers live here */
#starfield {
  position: fixed;
  inset: 0;
  z-index: -2;
  pointer-events: none;
  overflow: hidden;
}
.pix-star {
  position: absolute;
  width: 3px; height: 3px;
  background: #fff;
  image-rendering: pixelated;
  animation: twinkle 3s steps(2) infinite;
}
@keyframes twinkle {
  0%, 100% { opacity: 1; }
  50% { opacity: .15; }
}

/* big pixel "planet" blocks kept subtle */
.nebula {
  position: fixed;
  border-radius: 0;
  filter: blur(70px);
  opacity: .35;
  pointer-events: none;
  z-index: -2;
}
.nebula-1 { width: 480px; height: 480px; top: -120px; right: -100px;
  background: radial-gradient(circle, var(--purple) 0%, transparent 70%); }
.nebula-2 { width: 560px; height: 560px; bottom: -160px; left: -140px;
  background: radial-gradient(circle, var(--cyan) 0%, transparent 70%); }

/* ============== Roaming astronauts (4 fly right / 5 fly left) ============== */
.roamer {
  position: fixed;
  left: 0;
  width: 92px;
  z-index: 40;
  pointer-events: none;
  will-change: transform;
  filter: drop-shadow(0 0 10px rgba(69,227,255,.35));
}
/* astro4 = 右 -> 左（左向き） */
.roamer-1 { top: 64vh; animation: move-rtl 28s linear infinite; }
/* astro5 = 左 -> 右（右向き） */
.roamer-2 { top: 22vh; animation: move-ltr 30s linear infinite; }
/* astro4 は元々「左向き」→右から左へ進むので反転なし */
@keyframes move-rtl {
  0%   { transform: translate(106vw, 0); }
  50%  { transform: translate(46vw, -42px); }
  100% { transform: translate(-160px, 12px); }
}
/* astro5 は元々「右向き」→左から右へ進むので反転なし */
@keyframes move-ltr {
  0%   { transform: translate(-160px, 0); }
  50%  { transform: translate(50vw, -50px); }
  100% { transform: translate(106vw, 12px); }
}

/* ============== Layout ============== */
.container { width: min(1100px, 92%); margin-inline: auto; }
.section { padding: 110px 0; position: relative; z-index: 1; }

.section-label {
  font-family: var(--pixel-en);
  font-size: 10px;
  letter-spacing: .15em;
  color: var(--cyan);
  text-transform: uppercase;
  margin-bottom: 22px;
  text-shadow: 2px 2px 0 var(--shadow);
}

.section-title {
  font-family: var(--pixel);
  font-size: clamp(26px, 4.4vw, 44px);
  font-weight: 400;
  letter-spacing: .04em;
  line-height: 1.45;
  margin-bottom: 50px;
  color: #fff;
  text-shadow: 3px 3px 0 var(--pink), 6px 6px 0 var(--shadow);
}

.center { text-align: center; margin-top: 44px; }
.note { text-align: center; font-size: 12px; color: var(--ink-mute); margin-top: 30px; }

/* ============== Pixel star helper (decorative) ============== */
.star2 {
  display: inline-block;
  width: 18px; height: 18px;
  background:
    linear-gradient(var(--yellow),var(--yellow)) 6px 0/6px 18px no-repeat,
    linear-gradient(var(--yellow),var(--yellow)) 0 6px/18px 6px no-repeat;
  image-rendering: pixelated;
  vertical-align: middle;
  filter: drop-shadow(2px 2px 0 var(--shadow));
}

/* ============== Header ============== */
.header {
  position: fixed; top: 0; left: 0; right: 0; z-index: 100;
  padding: 16px 0;
  transition: all .3s ease;
}
.header.is-scrolled {
  background: rgba(10,7,38,.92);
  padding: 10px 0;
  border-bottom: 3px solid var(--pink);
  box-shadow: 0 4px 0 var(--shadow);
}
.header-inner {
  width: min(1200px, 92%); margin-inline: auto;
  display: flex; align-items: center; justify-content: space-between;
}

.logo { display: inline-flex; align-items: center; gap: 10px; }
.logo-mark {
  width: 22px; height: 22px;
  background:
    linear-gradient(var(--yellow),var(--yellow)) 7px 0/8px 22px no-repeat,
    linear-gradient(var(--yellow),var(--yellow)) 0 7px/22px 8px no-repeat;
  image-rendering: pixelated;
  filter: drop-shadow(2px 2px 0 var(--shadow));
  animation: pulse 1.2s steps(2) infinite;
}
@keyframes pulse { 50% { transform: scale(.8); } }
.logo-text {
  font-family: var(--pixel-en);
  font-size: 15px;
  letter-spacing: .04em;
  color: #fff;
  text-shadow: 2px 2px 0 var(--pink), 3px 3px 0 var(--shadow);
}
.logo-text .dot { color: var(--cyan); }

.nav ul { list-style: none; display: flex; gap: 26px; }
.nav a {
  font-family: var(--pixel);
  font-size: 13px;
  letter-spacing: .18em;
  padding: 4px 2px;
  position: relative;
  color: var(--ink);
  transition: color .15s;
}
.nav a:hover { color: var(--yellow); }
.nav a::after {
  content: ''; position: absolute; left: 0; bottom: -4px;
  width: 0; height: 3px; background: var(--yellow);
  transition: width .2s steps(3);
}
.nav a:hover::after { width: 100%; }

.nav-toggle {
  display: none; width: 34px; height: 28px;
  background: none; border: 0; cursor: pointer; position: relative;
}
.nav-toggle span {
  position: absolute; left: 0; right: 0; height: 3px;
  background: var(--ink); transition: all .25s;
}
.nav-toggle span:nth-child(1) { top: 3px; }
.nav-toggle span:nth-child(2) { top: 50%; transform: translateY(-50%); }
.nav-toggle span:nth-child(3) { bottom: 3px; }
.nav-toggle.is-open span:nth-child(1) { top: 50%; transform: translateY(-50%) rotate(45deg); }
.nav-toggle.is-open span:nth-child(2) { opacity: 0; }
.nav-toggle.is-open span:nth-child(3) { bottom: 50%; transform: translateY(50%) rotate(-45deg); }

/* ============== Hero ============== */
.hero {
  min-height: 100vh;
  display: flex; align-items: center;
  position: relative;
  padding: 150px 0 90px;
  overflow: hidden;
}
.hero-inner {
  width: min(1100px, 92%); margin-inline: auto;
  position: relative; z-index: 2;
  display: grid;
  grid-template-columns: 1.1fr .9fr;
  gap: 40px;
  align-items: center;
}

.hero-sub {
  font-family: var(--pixel-en);
  font-size: 11px; letter-spacing: .12em;
  color: var(--cyan);
  margin-bottom: 24px;
  text-shadow: 2px 2px 0 var(--shadow);
}
.hero-title {
  font-family: var(--pixel);
  font-size: clamp(38px, 7vw, 76px);
  font-weight: 400; line-height: 1.2; letter-spacing: .02em;
  margin-bottom: 28px;
}
.hero-title span {
  display: block;
  color: var(--yellow);
  text-shadow: 4px 4px 0 var(--pink), 8px 8px 0 var(--shadow);
}
.hero-title span:nth-child(2) { color: var(--cyan); text-shadow: 4px 4px 0 var(--purple), 8px 8px 0 var(--shadow); }

.hero-lead {
  font-size: 15px; color: var(--ink-mute);
  margin-bottom: 38px; max-width: 540px; line-height: 2.1;
}
.hero-lead em { color: var(--yellow); font-style: normal; }

.hero-cta { display: flex; gap: 16px; flex-wrap: wrap; }

/* hero astronaut + logo column */
.hero-visual {
  position: relative;
  display: flex; align-items: center; justify-content: center;
  min-height: 360px;
}
.hero-logo {
  width: min(360px, 78%);
  mix-blend-mode: screen;
  -webkit-mask-image: radial-gradient(circle at 50% 50%, #000 46%, transparent 72%);
  mask-image: radial-gradient(circle at 50% 50%, #000 46%, transparent 72%);
  animation: bob 4s ease-in-out infinite;
}
@keyframes bob { 0%,100% { transform: translateY(0); } 50% { transform: translateY(-14px); } }

/* flipbook astronaut (1 <-> 2 alternate) */
.astro-flip {
  position: absolute;
  right: -10px; bottom: 0;
  width: 150px; height: 150px;
  filter: drop-shadow(0 0 12px rgba(255,93,187,.4));
  animation: bob 3.2s ease-in-out infinite;
}
.astro-flip img { position: absolute; inset: 0; width: 100%; image-rendering: auto; }
.astro-flip .frame-a { animation: flip-a .9s steps(1) infinite; }
.astro-flip .frame-b { animation: flip-b .9s steps(1) infinite; }
@keyframes flip-a { 0%,49% { opacity: 1; } 50%,100% { opacity: 0; } }
@keyframes flip-b { 0%,49% { opacity: 0; } 50%,100% { opacity: 1; } }

/* ============== Pixel buttons ============== */
.btn {
  display: inline-block;
  padding: 14px 26px;
  font-family: var(--pixel);
  font-size: 14px; letter-spacing: .1em; font-weight: 400;
  border: 3px solid var(--shadow);
  box-shadow: 5px 5px 0 var(--shadow);
  cursor: pointer;
  transition: transform .08s steps(1), box-shadow .08s steps(1);
  text-shadow: none;
}
.btn:active { transform: translate(5px,5px); box-shadow: 0 0 0 var(--shadow); }
.btn-primary { background: var(--yellow); color: #2a1640; }
.btn-primary:hover { background: var(--pink); color: #fff; }
.btn-ghost { background: var(--panel); color: var(--ink); border-color: var(--cyan); box-shadow: 5px 5px 0 var(--cyan); }
.btn-ghost:hover { background: var(--cyan); color: #08233a; }

.scroll-down {
  position: absolute; bottom: 26px; left: 50%; transform: translateX(-50%);
  width: 20px; height: 32px; border: 3px solid var(--cyan);
}
.scroll-down span {
  position: absolute; top: 5px; left: 50%; width: 4px; height: 6px;
  background: var(--yellow); transform: translateX(-50%);
  animation: scroll-dot 1.4s steps(3) infinite;
}
@keyframes scroll-dot { 0% { opacity: 1; top: 5px; } 100% { opacity: 0; top: 20px; } }

/* ============== Generic pixel panel ============== */
.concept-card, .menu-card, .order-card, .access-info, .access-map {
  border: 3px solid var(--line);
  box-shadow: 6px 6px 0 var(--shadow);
  background: var(--panel);
}

/* ============== Concept ============== */
.concept-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 26px; }
.concept-card {
  padding: 34px 26px;
  transition: transform .1s steps(1), box-shadow .1s steps(1), border-color .1s;
}
.concept-card:hover {
  transform: translate(-3px,-3px);
  box-shadow: 9px 9px 0 var(--pink);
  border-color: var(--pink);
}
.concept-icon {
  width: 30px; height: 30px; margin-bottom: 18px;
  background:
    linear-gradient(var(--cyan),var(--cyan)) 11px 0/8px 30px no-repeat,
    linear-gradient(var(--cyan),var(--cyan)) 0 11px/30px 8px no-repeat;
  image-rendering: pixelated;
  filter: drop-shadow(2px 2px 0 var(--shadow));
}
.concept-card:nth-child(2) .concept-icon { background:
    linear-gradient(var(--pink),var(--pink)) 11px 0/8px 30px no-repeat,
    linear-gradient(var(--pink),var(--pink)) 0 11px/30px 8px no-repeat; }
.concept-card:nth-child(3) .concept-icon { background:
    linear-gradient(var(--yellow),var(--yellow)) 11px 0/8px 30px no-repeat,
    linear-gradient(var(--yellow),var(--yellow)) 0 11px/30px 8px no-repeat; }
.concept-card h3 { font-family: var(--pixel); font-size: 19px; font-weight: 400; margin-bottom: 14px; color: var(--yellow); }
.concept-card p { font-size: 14px; color: var(--ink-mute); line-height: 1.95; }

/* ============== Signature Menu ============== */
.signature .section-title, .signature .section-label,
.order .section-title, .order .section-label { text-align: center; }

.menu-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 24px; }
.menu-card {
  padding: 14px 14px 24px;
  transition: transform .1s steps(1), box-shadow .1s steps(1), border-color .1s;
}
.menu-card:hover {
  transform: translate(-3px,-3px);
  box-shadow: 9px 9px 0 var(--cyan);
  border-color: var(--cyan);
}
.menu-visual {
  aspect-ratio: 1/1;
  margin-bottom: 16px;
  border: 3px solid var(--shadow);
  overflow: hidden;
  position: relative;
  background: #000;
}
.menu-visual img { width: 100%; height: 100%; object-fit: cover; }
.menu-card h3 { font-family: var(--pixel); font-size: 18px; font-weight: 400; margin: 0 10px 10px; color: #fff; }
.menu-desc { font-size: 13px; color: var(--ink-mute); line-height: 1.85; margin: 0 10px 14px; min-height: 7em; }
.menu-price {
  font-family: var(--pixel-en); font-size: 12px; color: var(--yellow);
  letter-spacing: .04em; margin: 0 10px;
  border-top: 3px dotted var(--line); padding-top: 12px;
}

/* ============== Story ============== */
.story-inner { display: grid; grid-template-columns: 1.2fr .8fr; gap: 70px; align-items: center; }
.story-text p { font-size: 14px; color: var(--ink-mute); margin-bottom: 22px; line-height: 2.1; }
.story-visual { position: relative; aspect-ratio: 1/1; display: flex; align-items: center; justify-content: center; }
.story-visual img { width: 78%; image-rendering: auto; filter: drop-shadow(0 0 16px rgba(169,116,255,.5)); animation: bob 4.5s ease-in-out infinite; }

/* ============== Order ============== */
.order-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 22px; }
.order-card {
  display: block; padding: 32px 22px; text-align: center;
  transition: transform .1s steps(1), box-shadow .1s steps(1), border-color .1s;
}
.order-card:hover { transform: translate(-3px,-3px); box-shadow: 9px 9px 0 var(--yellow); border-color: var(--yellow); }
.order-icon { font-size: 34px; margin-bottom: 14px; image-rendering: pixelated; }
.order-card h3 { font-family: var(--pixel); font-size: 16px; font-weight: 400; margin-bottom: 10px; color: var(--cyan); }
.order-card p { font-size: 12px; color: var(--ink-mute); margin-bottom: 16px; line-height: 1.8; }
.order-link { font-family: var(--pixel-en); font-size: 9px; color: var(--yellow); letter-spacing: .06em; }
.order-link .big { font-size: 13px; }

/* ============== Access ============== */
.access-inner { display: grid; grid-template-columns: 1fr 1fr; gap: 40px; align-items: stretch; }
.access-info { padding: 34px 30px; }
.info-list { display: grid; grid-template-columns: 96px 1fr; gap: 14px 18px; font-size: 14px; }
.info-list dt {
  font-family: var(--pixel-en); font-size: 9px; letter-spacing: .06em; color: var(--cyan);
  padding-top: 7px; border-top: 3px dotted var(--line);
}
.info-list dd { border-top: 3px dotted var(--line); padding-top: 6px; color: var(--ink-mute); }
.info-list dd small { font-size: 11px; opacity: .8; }
.info-list a { color: var(--yellow); border-bottom: 2px dotted var(--yellow); }
.sns-list { display: flex; gap: 12px; flex-wrap: wrap; }
.sns-list a {
  border: 3px solid var(--line); padding: 6px 13px;
  font-size: 12px; font-family: var(--pixel); letter-spacing: .06em;
  box-shadow: 3px 3px 0 var(--shadow); transition: all .1s steps(1);
}
.sns-list a:hover { border-color: var(--pink); color: var(--pink); transform: translate(-2px,-2px); box-shadow: 5px 5px 0 var(--pink); }
.access-map { overflow: hidden; min-height: 320px; }
.access-map iframe { width: 100%; height: 100%; min-height: 320px; border: 0; filter: hue-rotate(220deg) saturate(.8) brightness(.9) contrast(1.1); }

/* ============== Footer ============== */
.footer {
  padding: 64px 0 40px; text-align: center; position: relative; z-index: 1;
  border-top: 3px solid var(--pink); box-shadow: 0 -4px 0 var(--shadow);
}
.footer-logo {
  font-family: var(--pixel-en); font-size: 18px; letter-spacing: .04em;
  margin-bottom: 14px; color: #fff; text-shadow: 2px 2px 0 var(--pink), 3px 3px 0 var(--shadow);
  display: inline-flex; gap: 10px; align-items: center; justify-content: center;
}
.footer-logo .dot { color: var(--cyan); }
.footer-tagline { font-family: var(--pixel-en); font-size: 10px; color: var(--yellow); margin-bottom: 28px; letter-spacing: .04em; }
.footer-sns { list-style: none; display: flex; justify-content: center; gap: 24px; margin-bottom: 26px; flex-wrap: wrap; }
.footer-sns a { font-family: var(--pixel); font-size: 12px; letter-spacing: .12em; color: var(--ink-mute); }
.footer-sns a:hover { color: var(--yellow); }
.copy { font-family: var(--pixel-en); font-size: 8px; letter-spacing: .08em; color: var(--ink-mute); }

/* decorative floating astronaut near menu */
.deco-astro {
  position: absolute; z-index: 2; pointer-events: none;
  filter: drop-shadow(0 0 12px rgba(255,226,74,.4));
}
/* astro3 : 看板スイーツ横（静止・新イラスト） */
.deco-astro-3 { top: 6px; right: 4%; width: 150px; animation: bob 3.4s ease-in-out infinite; }
/* astro6 : ご注文方法 横 */
.deco-astro-order { top: 16px; right: 4%; width: 128px; animation: bob 3.8s ease-in-out infinite; }
@media (max-width: 960px) { .deco-astro { display: none; } }

/* walking astronaut along the footer top */
.footer-walker {
  position: absolute; top: -46px; left: 0; width: 60px;
  animation: walk 18s linear infinite;
  filter: drop-shadow(0 0 8px rgba(124,255,155,.4));
}
@keyframes walk { from { left: -80px; } to { left: 110%; } }

/* ============== Utilities ============== */
.pc-only { display: inline; }
.sp-only { display: none; }

/* ============== Shooting star (JS) ============== */
.shooting {
  position: fixed; width: 4px; height: 4px; background: #fff;
  image-rendering: pixelated; pointer-events: none; z-index: -1;
  box-shadow: -4px -2px 0 var(--cyan), -8px -4px 0 rgba(69,227,255,.6), -12px -6px 0 rgba(69,227,255,.3);
}

/* ============== Responsive ============== */
@media (max-width: 960px) {
  .hero-inner { grid-template-columns: 1fr; gap: 30px; }
  .hero-visual { min-height: 280px; order: -1; }
  .hero-logo { width: 240px; }
  .astro-flip { width: 110px; height: 110px; right: 4%; }
  .concept-grid { grid-template-columns: 1fr; }
  .menu-grid { grid-template-columns: repeat(2, 1fr); }
  .order-grid { grid-template-columns: repeat(2, 1fr); }
  .story-inner { grid-template-columns: 1fr; gap: 40px; }
  .story-visual { max-width: 300px; margin: 0 auto; }
  .access-inner { grid-template-columns: 1fr; }
  .section { padding: 80px 0; }
  .roamer { width: 64px; }

  .nav-toggle { display: block; z-index: 110; }
  .nav {
    position: fixed; inset: 0; background: rgba(10,7,38,.97);
    display: flex; align-items: center; justify-content: center;
    opacity: 0; pointer-events: none; transition: opacity .25s;
  }
  .nav.is-open { opacity: 1; pointer-events: auto; }
  .nav ul { flex-direction: column; gap: 30px; text-align: center; }
  .nav a { font-size: 18px; }

  .pc-only { display: none; }
  .sp-only { display: inline; }
  .hero { padding: 130px 0 60px; }
  .hero-cta .btn { min-width: 220px; text-align: center; }
}

@media (max-width: 520px) {
  .menu-grid { grid-template-columns: 1fr; }
  .order-grid { grid-template-columns: 1fr; }
  .info-list { grid-template-columns: 78px 1fr; }
  .menu-desc { min-height: auto; }
  body { font-size: 14px; }
}
