/* =========================================================
   GLITCH WORLD — 1990~2000년대 GIF 웹사이트 × 우주 배경
   색은 :root 에서 한 번에 바꿀 수 있어요
   ========================================================= */
:root {
  --space: #03021a;
  --space-2: #0b0640;
  --ink: #ffffff;
  --muted: #b9b6e8;
  --lime: #c8ff2e;
  --cyan: #3ef2ff;
  --pink: #ff4fd8;
  --yellow: #ffe94a;
  --win: #c0c0c0;
  --win-dark: #808080;
  --win-title: linear-gradient(90deg, #000a7a, #1a6fd8);
  --rainbow: linear-gradient(90deg, #ff3b3b, #ff9a3b, #ffe94a, #6bff4f, #3ef2ff, #6b6bff, #ff4fd8, #ff3b3b);
  --pixel: 'Galmuri11', 'Galmuri9', 'DungGeunMo', 'Gulim', monospace;
  --wordart: 'Bungee', 'Galmuri11', Impact, sans-serif;
  --wrap: 1100px;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; overflow-x: hidden; }
body {
  margin: 0;
  min-height: 100vh;
  background: var(--space);
  color: var(--ink);
  font-family: var(--pixel);
  font-size: 15px;
  line-height: 1.7;
  word-break: keep-all;
  overflow-x: hidden;
}
a { color: var(--cyan); }
a:visited { color: #c58bff; }
img, video { display: block; max-width: 100%; }
h1, h2, h3 { margin: 0; font-weight: 400; line-height: 1.2; }

/* ---------- 우주 배경 ---------- */
.space-bg, .space-bg::before, .space-bg::after {
  position: fixed; inset: 0; pointer-events: none; z-index: -2;
}
.space-bg {
  background:
    radial-gradient(ellipse 60% 40% at 20% 15%, rgba(120, 40, 255, .35), transparent 70%),
    radial-gradient(ellipse 50% 35% at 85% 60%, rgba(255, 40, 180, .22), transparent 70%),
    radial-gradient(ellipse 70% 50% at 50% 110%, rgba(30, 120, 255, .35), transparent 70%),
    var(--space);
}
.space-bg::before, .space-bg::after { content: ''; background-repeat: repeat; }
.space-bg::before {
  background-image:
    radial-gradient(1px 1px at 10px 20px, #fff 99%, transparent),
    radial-gradient(1px 1px at 80px 140px, #cdf 99%, transparent),
    radial-gradient(1.5px 1.5px at 150px 60px, #fff 99%, transparent),
    radial-gradient(1px 1px at 200px 190px, #fde 99%, transparent),
    radial-gradient(1px 1px at 40px 220px, #fff 99%, transparent);
  background-size: 240px 240px;
  animation: twinkle 3.5s steps(2) infinite;
}
.space-bg::after {
  background-image:
    radial-gradient(2px 2px at 60px 90px, #fff 99%, transparent),
    radial-gradient(1.5px 1.5px at 300px 30px, #9ff 99%, transparent),
    radial-gradient(2px 2px at 240px 260px, #ffc 99%, transparent),
    radial-gradient(1px 1px at 350px 330px, #fff 99%, transparent);
  background-size: 400px 400px;
  animation: twinkle 5s steps(2) infinite reverse, drift 120s linear infinite;
}
@keyframes twinkle { 50% { opacity: .35; } }
@keyframes drift { to { background-position: -400px 400px; } }

/* 반짝이 별 (JS가 뿌림) */
.sparkle {
  position: absolute; pointer-events: none; color: #fff; z-index: -1;
  text-shadow: 0 0 6px #fff, 0 0 12px var(--cyan);
  animation: sparkle var(--d, 2.4s) ease-in-out infinite;
  animation-delay: var(--delay, 0s);
}
@keyframes sparkle { 0%, 100% { opacity: 0; transform: scale(.3) rotate(0); } 50% { opacity: 1; transform: scale(1) rotate(90deg); } }
.trail { position: fixed; pointer-events: none; z-index: 999; font-size: 14px; animation: trail .8s ease-out forwards; text-shadow: 0 0 6px currentColor; }
@keyframes trail { to { opacity: 0; transform: translateY(18px) scale(.4) rotate(180deg); } }

/* ---------- 상단 ---------- */
.site-head { text-align: center; padding: 22px 12px 0; }
.logo { display: inline-block; position: relative; }
.logo img {
  width: min(360px, 78vw);
  filter: drop-shadow(0 0 6px #fff) drop-shadow(3px 3px 0 var(--pink)) drop-shadow(-3px -2px 0 var(--cyan));
  animation: logo-glitch 4s steps(1) infinite;
}
@keyframes logo-glitch {
  0%, 92%, 100% { transform: none; }
  93% { transform: translate(-4px, 1px) skewX(-6deg); }
  95% { transform: translate(4px, -1px) skewX(4deg); }
  97% { transform: translate(-2px, 0); }
}
.logo::before, .logo::after { content: '✦'; position: absolute; color: var(--yellow); font-size: 26px; animation: sparkle 1.8s infinite; text-shadow: 0 0 10px var(--yellow); }
.logo::before { top: -6px; left: -18px; }
.logo::after { bottom: 4px; right: -22px; animation-delay: .9s; color: var(--cyan); }
.tagline { margin: 4px 0 14px; color: var(--muted); font-size: 13px; letter-spacing: .1em; }

/* 흐르는 글자 */
.marquee { overflow: hidden; white-space: nowrap; border-block: 2px ridge #7a7aff; background: rgba(0, 0, 60, .6); padding: 6px 0; }
.marquee__track { display: inline-block; padding-left: 100%; animation: marquee 30s linear infinite; }
.marquee b { font-weight: 400; }
@keyframes marquee { to { transform: translateX(-100%); } }

/* ---------- 메뉴 (윈도우 98 버튼) ---------- */
.nav { display: flex; flex-wrap: wrap; justify-content: center; gap: 8px; padding: 14px 10px; }
.nav a {
  display: inline-flex; align-items: center; gap: 6px; text-decoration: none;
  color: #000; background: var(--win); padding: 7px 14px; font-size: 15px;
  border: 3px outset #eee; box-shadow: 2px 2px 0 #000; position: relative;
}
.nav a:visited { color: #000; }
.nav a .ico { display: inline-block; animation: bob 1.6s ease-in-out infinite; }
.nav a:nth-child(2) .ico { animation-delay: .2s; } .nav a:nth-child(3) .ico { animation-delay: .4s; }
.nav a:nth-child(4) .ico { animation-delay: .6s; } .nav a:nth-child(5) .ico { animation-delay: .8s; }
@keyframes bob { 50% { transform: translateY(-3px) rotate(-8deg); } }
.nav a:hover, .nav a[aria-current="page"] {
  border-style: inset; background: #000a7a; color: #fff; box-shadow: none;
}
.nav a:hover .label, .nav a[aria-current="page"] .label { color: transparent; background: var(--rainbow); background-size: 200% 100%; -webkit-background-clip: text; background-clip: text; animation: rainbow 1.5s linear infinite; }
.nav a.nav__book { background: var(--lime); }
.nav a.nav__book::after {
  content: 'NEW!'; position: absolute; top: -10px; right: -12px; background: #f00; color: #ff0;
  font-size: 10px; padding: 1px 4px; transform: rotate(12deg); animation: blink 1s steps(1) infinite;
  border: 1px solid #ff0;
}
@keyframes blink { 50% { opacity: 0; } }

/* ---------- 워드아트 (브랜드 이름 공통 효과) ---------- */
.wordart {
  font-family: var(--wordart); display: inline-block; position: relative;
  color: transparent; background: var(--rainbow); background-size: 300% 100%;
  -webkit-background-clip: text; background-clip: text;
  -webkit-text-stroke: 1.5px #fff;
  filter: drop-shadow(2px 2px 0 #3a00a8) drop-shadow(0 0 6px rgba(255, 255, 255, .5));
  animation: rainbow 3s linear infinite, wave 2.4s ease-in-out infinite;
  animation-delay: 0s, var(--wd, 0s);
}
@keyframes rainbow { to { background-position: 300% 0; } }
@keyframes wave { 0%, 100% { transform: translateY(0) rotate(-1.5deg); } 50% { transform: translateY(-4px) rotate(1.5deg); } }
.wordart::after {
  content: '✦'; position: absolute; top: -.35em; right: -.55em; font-size: .55em;
  color: #fff; -webkit-text-stroke: 0; text-shadow: 0 0 8px #fff;
  animation: sparkle 1.6s ease-in-out infinite; animation-delay: var(--wd, 0s);
}

/* ---------- 레이아웃 공통 ---------- */
.wrap { max-width: var(--wrap); margin: 0 auto; padding: 0 12px; }
.section-title { text-align: center; margin: 46px 0 18px; font-size: clamp(26px, 5vw, 44px); }
.section-sub { text-align: center; color: var(--muted); margin: -8px 0 22px; }
hr.rainbow { border: 0; height: 6px; background: var(--rainbow); background-size: 200% 100%; animation: rainbow 4s linear infinite; margin: 40px auto; max-width: 700px; box-shadow: 0 0 12px rgba(255, 255, 255, .4); }

/* 윈도우 98 창 */
.win { background: var(--win); color: #000; border: 3px outset #eee; box-shadow: 4px 4px 0 rgba(0, 0, 0, .6); margin-bottom: 18px; }
.win__title {
  background: var(--win-title); color: #fff; padding: 4px 6px 4px 10px;
  display: flex; align-items: center; justify-content: space-between; gap: 8px; font-size: 14px;
}
.win__btns { display: flex; gap: 3px; }
.win__btns i { width: 18px; height: 16px; background: var(--win); border: 2px outset #eee; color: #000; font-style: normal; font-size: 11px; line-height: 12px; text-align: center; }
.win__body { padding: 16px 18px; }
.win__body a { color: #0000ee; }
.win__body a:visited { color: #551a8b; }

/* 버튼 */
.btn {
  display: inline-block; text-decoration: none; font-family: var(--pixel); font-size: 16px; cursor: pointer;
  color: #000 !important; background: var(--lime); padding: 10px 18px; border: 3px outset #f4ffd0; box-shadow: 3px 3px 0 #000;
}
.btn:hover { border-style: inset; box-shadow: none; transform: translate(2px, 2px); }
.btn--pink { background: var(--pink); border-color: #ffc6f2; }
.btn--win { background: var(--win); border-color: #eee; }
.blink { animation: blink 1s steps(1) infinite; }

/* ---------- 홈: 인사 ---------- */
.welcome { text-align: center; margin: 18px auto 0; max-width: 760px; }
.welcome h1 { font-size: clamp(22px, 4.6vw, 34px); margin-bottom: 8px; }
.welcome p { margin: 0 0 14px; color: var(--muted); }
.welcome .cta { display: flex; gap: 10px; justify-content: center; flex-wrap: wrap; }

/* 브랜드 이름들 */
.brands { display: flex; flex-wrap: wrap; justify-content: center; align-items: center; gap: 14px 26px; padding: 6px 10px 10px; }
.brands a { text-decoration: none; font-size: clamp(18px, 3vw, 28px); }
.brands a:hover .wordart { animation-duration: .6s, .4s; filter: drop-shadow(2px 2px 0 #3a00a8) drop-shadow(0 0 14px #fff); }
.brands--compact { gap: 8px 20px; }
.brands--compact a { font-size: clamp(15px, 2vw, 19px); }
.brands.brands--compact a small { display: none; }
.brands a small { display: block; text-align: center; font-family: var(--pixel); font-size: 11px; color: var(--muted); -webkit-text-stroke: 0; }

/* ---------- 콜라주 (GifCities 느낌) ---------- */
.collage {
  display: flex; flex-wrap: wrap; justify-content: center; align-items: center;
  gap: 10px 8px; padding: 10px 6px 30px;
}
.tile {
  position: relative; display: block; flex: none; height: var(--h, 140px); aspect-ratio: var(--ar, 1);
  background: rgba(255, 255, 255, .06); transform: rotate(var(--r, 0deg));
  transition: transform .15s;
}
.tile video, .tile img { width: 100%; height: 100%; object-fit: cover; }
.tile:hover { transform: scale(1.06) rotate(0); z-index: 2; outline: 3px solid; outline-color: var(--yellow); box-shadow: 0 0 18px var(--pink); }
.tile__name {
  position: absolute; left: 50%; bottom: -12px; transform: translateX(-50%); white-space: nowrap;
  background: #000a7a; border: 2px outset #8af; color: #fff; font-size: 11px; padding: 0 6px;
  opacity: 0; transition: opacity .15s; pointer-events: none;
}
.tile:hover .tile__name, .tile:focus-visible .tile__name { opacity: 1; }
.tile--frame-a { border: 4px ridge var(--yellow); }
.tile--frame-b { border: 3px double var(--cyan); }
.tile--frame-c { border: 4px groove #ff8af0; }
.collage__more { text-align: center; padding: 10px 0 40px; color: var(--muted); }
.loading-star { display: inline-block; animation: spin 1s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }

/* ---------- 프로젝트 상세 ---------- */
.project-head { text-align: center; padding: 28px 12px 10px; }
.project-head .wordart { font-size: clamp(34px, 8vw, 76px); }
.project-head p { color: var(--muted); margin: 10px 0 0; }
.crumbs { display: flex; gap: 10px; justify-content: center; flex-wrap: wrap; margin: 16px 0 6px; }
.grid { columns: 4 220px; column-gap: 12px; padding: 16px 12px 40px; max-width: 1280px; margin: 0 auto; }
.grid .tile { height: auto; aspect-ratio: var(--ar, 1); width: 100%; margin: 0 0 12px; break-inside: avoid; transform: none; border: 3px ridge #8a8aff; }
.grid .tile.is-target { outline: 4px solid var(--yellow); animation: target 0.6s steps(1) 6; }
@keyframes target { 50% { outline-color: var(--pink); } }
.other { text-align: center; margin: 10px 0 30px; }

/* 라이트박스 */
.lightbox { position: fixed; inset: 0; z-index: 200; background: rgba(0, 0, 20, .92); display: grid; place-items: center; padding: 18px; }
.lightbox[hidden] { display: none; }
.lightbox .win { max-width: min(94vw, 900px); margin: 0; }
.lightbox video { max-height: 74vh; width: auto; margin: 0 auto; background: #000; }
.lightbox__nav { display: flex; justify-content: space-between; gap: 8px; padding: 8px; background: var(--win); }
.lightbox__nav button { font-family: var(--pixel); font-size: 14px; background: var(--win); border: 3px outset #eee; padding: 4px 12px; cursor: pointer; }
.lightbox__nav button:active { border-style: inset; }
.win__title button { all: unset; cursor: pointer; }

/* ---------- 가격 ---------- */
.price-hero { display: grid; grid-template-columns: 1.3fr 1fr; gap: 18px; align-items: start; }
.price-big { font-family: var(--wordart); font-size: 34px; color: #c00000; text-shadow: 2px 2px 0 #ffd84a; }
.price-big small { font-family: var(--pixel); font-size: 15px; color: #000; text-shadow: none; }
.list { margin: 6px 0 0; padding-left: 20px; }
.list li::marker { content: '★ '; color: #c00000; }
.kv { width: 100%; border-collapse: collapse; margin-top: 8px; }
.kv td { border: 2px inset #ddd; padding: 6px 8px; background: #fff; }
.kv td:last-child { text-align: right; white-space: nowrap; color: #c00000; }
.cards { display: grid; grid-template-columns: repeat(4, 1fr); gap: 14px; }
.cards .win { margin: 0; }
.cards h3 { font-size: 18px; }
.cards .note { font-size: 12px; color: #444; margin: 2px 0 6px; min-height: 2.6em; }
.cards .price-big { font-size: 24px; }
.calc .stepper { display: flex; align-items: center; gap: 8px; margin: 6px 0 10px; }
.calc .stepper button { width: 38px; height: 34px; font-size: 20px; font-family: var(--pixel); background: var(--win); border: 3px outset #eee; cursor: pointer; }
.calc .stepper button:active { border-style: inset; }
.calc .stepper button:disabled { color: #999; cursor: not-allowed; }
.calc output { font-size: 28px; min-width: 40px; text-align: center; background: #000; color: #0f0; border: 2px inset #ddd; padding: 0 8px; font-family: var(--pixel); }
.calc label { display: flex; gap: 8px; align-items: center; padding: 4px 0; cursor: pointer; }
.calc .total { margin: 10px 0; padding: 8px; background: #000; color: #0f0; border: 3px inset #ddd; font-size: 15px; }
.calc .total b { font-size: 26px; font-weight: 400; color: #ff0; }

/* ---------- 촬영 안내 ---------- */
.flow { display: grid; grid-template-columns: repeat(5, 1fr); gap: 10px; counter-reset: s; padding: 0; margin: 0; list-style: none; }
.flow li { counter-increment: s; background: #fff; border: 2px inset #ddd; padding: 10px; }
.flow li::before { content: 'STEP ' counter(s); display: block; color: #fff; background: #000a7a; font-size: 11px; padding: 0 6px; width: max-content; margin-bottom: 4px; }
.flow h3 { font-size: 16px; }
.flow p { margin: 4px 0 0; font-size: 13px; }
.stripe-warn { display: grid; grid-template-columns: 120px 1fr; gap: 16px; align-items: center; }
.stripe-demo { width: 120px; height: 120px; border: 3px inset #ddd; position: relative; overflow: hidden; }
.stripe-demo::before, .stripe-demo span { content: ''; position: absolute; inset: -30%; background: repeating-linear-gradient(0deg, #000 0 3px, #fff 3px 6px); }
.stripe-demo span { opacity: .7; animation: moire 3s ease-in-out infinite alternate; }
@keyframes moire { from { transform: rotate(2deg) scale(1.02); } to { transform: rotate(-3deg) scale(1.06); } }
.warn-title { font-size: 20px; color: #c00000; }
.warn-title .blink { color: #f00; }
.dos { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; margin-top: 12px; }
.dos > div { background: #fff; border: 2px inset #ddd; padding: 8px 12px; }
.dos ul { margin: 4px 0 0; padding-left: 18px; }
.dos .bad li { text-decoration: line-through; text-decoration-color: #f00; text-decoration-thickness: 2px; }
.notices { display: grid; grid-template-columns: repeat(3, 1fr); gap: 12px; }
.notices .win { margin: 0; }
.notices p { margin: 0; font-size: 14px; }

/* ---------- FAQ ---------- */
.chips { display: flex; flex-wrap: wrap; gap: 6px; justify-content: center; margin-bottom: 16px; }
.chip { font-family: var(--pixel); font-size: 14px; background: var(--win); border: 3px outset #eee; padding: 4px 12px; cursor: pointer; color: #000; }
.chip[aria-selected="true"] { border-style: inset; background: #000a7a; color: #fff; }
.faq details { margin-bottom: 10px; }
.faq summary { list-style: none; cursor: pointer; display: flex; gap: 10px; align-items: center; }
.faq summary::-webkit-details-marker { display: none; }
.faq summary::before { content: '▶'; font-size: 11px; transition: transform .15s; }
.faq details[open] summary::before { transform: rotate(90deg); }
.faq .q { flex: 1; }
.faq .a { padding: 12px 16px; background: #fff; border-top: 2px groove #ddd; }
.faq .a p { margin: 0 0 6px; }
.faq .a b { background: #ffff66; font-weight: 400; }

/* ---------- 바닥 ---------- */
.site-foot { text-align: center; padding: 30px 12px 110px; color: var(--muted); font-size: 13px; }
.badges { display: flex; flex-wrap: wrap; justify-content: center; gap: 6px; margin-bottom: 14px; }
.badge88 {
  width: 88px; height: 31px; display: grid; place-items: center; font-size: 9px; line-height: 1.1; text-align: center;
  border: 2px outset #ccc; text-decoration: none; color: #fff !important; overflow: hidden;
}
.badge88--a { background: linear-gradient(#000a7a, #3a3aff); }
.badge88--b { background: #000; color: #0f0 !important; }
.badge88--c { background: linear-gradient(90deg, #ff4fd8, #ffe94a); color: #000 !important; }
.badge88--d { background: var(--lime); color: #000 !important; }
.site-foot a { color: var(--cyan); }

/* 모바일 예약 바 */
.mbar {
  display: none; position: fixed; left: 8px; right: 8px; bottom: 8px; z-index: 100;
  background: var(--win); color: #000; border: 3px outset #eee; box-shadow: 3px 3px 0 #000;
  padding: 6px 6px 6px 12px; align-items: center; justify-content: space-between; font-size: 13px;
}
.mbar .btn { padding: 6px 12px; font-size: 14px; }

/* ---------- 반응형 ---------- */
@media (max-width: 900px) {
  .cards { grid-template-columns: repeat(2, 1fr); }
  .flow { grid-template-columns: repeat(2, 1fr); }
  .notices { grid-template-columns: 1fr 1fr; }
  .price-hero { grid-template-columns: 1fr; }
}
@media (max-width: 600px) {
  body { font-size: 14px; }
  .nav a { padding: 5px 9px; font-size: 13px; }
  .cards, .flow, .notices, .dos { grid-template-columns: 1fr; }
  .stripe-warn { grid-template-columns: 1fr; }
  .stripe-demo { width: 100%; height: 70px; }
  .collage { gap: 6px 5px; }
  .grid { columns: 2 140px; column-gap: 8px; padding-inline: 8px; }
  .mbar { display: flex; }
  .win__body { padding: 12px; }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; }
}
