/* ============================================================
   빼보자GO — Shared Styles
   Design: dark navy/black, orange-coral accent, Korean copy
   ============================================================ */

/* ---------- Reset & Base ---------- */
*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

:root {
  /* Palette */
  --bg-deep:      #0f1218;
  --bg-mid:       #1a1f2a;
  --bg-card:      #1f2535;
  --bg-card-alt:  #252c3d;
  --accent-orange: #FF6B35;
  --accent-red:    #FF3D52;
  --accent-glow:   rgba(255, 107, 53, 0.18);
  --accent-glow-strong: rgba(255, 107, 53, 0.32);

  /* Text */
  --text-primary:   #ffffff;
  --text-secondary: rgba(255, 255, 255, 0.70);
  --text-muted:     rgba(255, 255, 255, 0.40);
  --text-code:      #FFD166;

  /* Typography */
  --font-base: -apple-system, "Pretendard Variable", "Pretendard",
               "Noto Sans KR", "Apple SD Gothic Neo", sans-serif;
  --font-mono: "SF Mono", "Fira Code", "Consolas", monospace;

  /* Spacing */
  --radius-sm:  8px;
  --radius-md:  14px;
  --radius-lg:  22px;
  --radius-xl:  32px;

  /* Transitions */
  --ease-out: cubic-bezier(0.22, 1, 0.36, 1);
}

html {
  font-size: 16px;
  -webkit-text-size-adjust: 100%;
  scroll-behavior: smooth;
}

body {
  font-family: var(--font-base);
  background: var(--bg-deep);
  color: var(--text-primary);
  line-height: 1.6;
  min-height: 100vh;
  overflow-x: hidden;
  /* Subtle radial glow from top-center */
  background-image:
    radial-gradient(ellipse 80% 50% at 50% -10%,
      rgba(255, 107, 53, 0.12) 0%,
      transparent 70%),
    linear-gradient(180deg, var(--bg-deep) 0%, var(--bg-mid) 100%);
}

/* Grain overlay */
body::before {
  content: "";
  position: fixed;
  inset: 0;
  background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 256 256' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='noise'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='4' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23noise)' opacity='0.04'/%3E%3C/svg%3E");
  background-repeat: repeat;
  background-size: 256px 256px;
  pointer-events: none;
  z-index: 0;
  opacity: 0.6;
}

/* ---------- Layout ---------- */
.page-wrapper {
  position: relative;
  z-index: 1;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

main {
  flex: 1;
}

.container {
  width: 100%;
  max-width: 480px;
  margin: 0 auto;
  padding: 0 20px;
}

/* ---------- Typography ---------- */
h1, h2, h3 {
  line-height: 1.2;
  letter-spacing: -0.02em;
  font-weight: 800;
}

/* ---------- Logo / Wordmark ---------- */
.logo-wrap {
  display: flex;
  align-items: center;
  gap: 10px;
  text-decoration: none;
}

.logo-wrap img,
.logo-wrap svg {
  width: 36px;
  height: 36px;
  flex-shrink: 0;
}

.logo-wordmark {
  font-size: 1.25rem;
  font-weight: 900;
  letter-spacing: -0.03em;
  background: linear-gradient(135deg, var(--accent-orange) 0%, var(--accent-red) 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 14px 28px;
  border-radius: var(--radius-md);
  font-family: var(--font-base);
  font-size: 1rem;
  font-weight: 700;
  text-decoration: none;
  cursor: pointer;
  border: none;
  transition: transform 0.15s var(--ease-out),
              box-shadow 0.15s var(--ease-out),
              opacity 0.15s ease;
  -webkit-tap-highlight-color: transparent;
  white-space: nowrap;
}

.btn:focus-visible {
  outline: 2px solid var(--accent-orange);
  outline-offset: 3px;
}

.btn-primary {
  background: linear-gradient(135deg, var(--accent-orange) 0%, var(--accent-red) 100%);
  color: #fff;
  box-shadow: 0 4px 20px rgba(255, 107, 53, 0.40);
}

.btn-primary:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 28px rgba(255, 107, 53, 0.55);
}

.btn-primary:active {
  transform: translateY(0);
  box-shadow: 0 2px 12px rgba(255, 107, 53, 0.35);
}

.btn-ghost {
  background: rgba(255, 255, 255, 0.06);
  color: var(--text-secondary);
  border: 1.5px solid rgba(255, 255, 255, 0.12);
}

.btn-ghost:hover {
  background: rgba(255, 255, 255, 0.10);
  border-color: rgba(255, 255, 255, 0.20);
  color: var(--text-primary);
}

.btn-full {
  width: 100%;
}

/* ---------- Cards ---------- */
.card {
  background: var(--bg-card);
  border: 1px solid rgba(255, 255, 255, 0.07);
  border-radius: var(--radius-lg);
  padding: 24px;
}

.card-glow {
  box-shadow: 0 0 0 1px rgba(255, 107, 53, 0.15),
              0 16px 48px rgba(0, 0, 0, 0.40),
              0 0 80px rgba(255, 107, 53, 0.06);
}

/* ---------- Footer ---------- */
.site-footer {
  border-top: 1px solid rgba(255, 255, 255, 0.06);
  padding: 32px 20px;
  text-align: center;
  color: var(--text-muted);
  font-size: 0.8125rem;
}

.site-footer a {
  color: var(--text-muted);
  text-decoration: none;
}

.site-footer a:hover {
  color: var(--accent-orange);
}

/* ---------- Animations ---------- */
@keyframes fadeUp {
  from { opacity: 0; transform: translateY(20px); }
  to   { opacity: 1; transform: translateY(0); }
}

@keyframes pulse-ring {
  0%   { transform: scale(1);    opacity: 0.6; }
  100% { transform: scale(1.8);  opacity: 0; }
}

@keyframes spin {
  to { transform: rotate(360deg); }
}

.animate-fade-up {
  animation: fadeUp 0.6s var(--ease-out) both;
}
.delay-1 { animation-delay: 0.08s; }
.delay-2 { animation-delay: 0.16s; }
.delay-3 { animation-delay: 0.24s; }
.delay-4 { animation-delay: 0.32s; }
.delay-5 { animation-delay: 0.40s; }

/* ---------- Code / Badge ---------- */
.code-badge {
  font-family: var(--font-mono);
  font-size: 2rem;
  font-weight: 700;
  letter-spacing: 0.15em;
  color: var(--text-code);
  background: rgba(255, 209, 102, 0.08);
  border: 1.5px solid rgba(255, 209, 102, 0.20);
  border-radius: var(--radius-sm);
  padding: 10px 20px;
  display: inline-block;
}

/* ---------- Utilities ---------- */
.visually-hidden {
  position: absolute;
  width: 1px; height: 1px;
  padding: 0; margin: -1px;
  overflow: hidden;
  clip: rect(0,0,0,0);
  white-space: nowrap;
  border: 0;
}

.text-accent {
  background: linear-gradient(135deg, var(--accent-orange) 0%, var(--accent-red) 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.divider {
  border: none;
  border-top: 1px solid rgba(255, 255, 255, 0.07);
  margin: 20px 0;
}

/* ---------- Responsive ---------- */
@media (max-width: 375px) {
  .code-badge { font-size: 1.5rem; letter-spacing: 0.1em; }
  .btn { padding: 13px 20px; font-size: 0.9375rem; }
}
