/* ═══════════════════════════════════════════════════════
   SPOOKY'S DESIGN WAREHOUSE — main.css
   Mobile-first · Dark theme · No dependencies
   ═══════════════════════════════════════════════════════ */

/* ── Variables ───────────────────────────────────────── */
:root {
  --bg:         #080808;
  --surface:    #0f0f0f;
  --surface-2:  #161616;
  --border:     #1e1e1e;
  --border-hi:  #2c2c2c;

  --text:       #dedede;
  --text-dim:   #777;
  --text-muted: #333;

  --accent:     #f04e00;
  --accent-hi:  #ff6b35;
  --accent-glow: rgba(240, 78, 0, 0.16);

  --mono: 'SF Mono', 'Fira Code', 'Cascadia Code', Consolas, monospace;
  --sans: -apple-system, BlinkMacSystemFont, 'Segoe UI', system-ui, Helvetica, Arial, sans-serif;

  --r:    4px;
  --r-md: 8px;
  --r-lg: 14px;

  --ease:      150ms ease;
  --ease-slow: 320ms ease;

  --max-w:    1200px;
  --max-w-sm: 580px;
  --nav-h:    60px;
}

/* ── Reset ───────────────────────────────────────────── */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html                   { scroll-behavior: smooth; }
body {
  font-family: var(--sans);
  background: var(--bg);
  color: var(--text);
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  overflow-x: hidden;
}
img    { display: block; max-width: 100%; height: auto; }
a      { color: inherit; text-decoration: none; }
button { font-family: inherit; cursor: pointer; border: none; background: none; }
input  { font-family: inherit; }

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

/* ── Layout ──────────────────────────────────────────── */
.container    { width: 100%; max-width: var(--max-w);    margin: 0 auto; padding: 0 20px; }
.container-sm { width: 100%; max-width: var(--max-w-sm); margin: 0 auto; padding: 0 20px; }
.section      { padding: 72px 0; }
.section-alt  { background: var(--surface); }
.section-newsletter { text-align: center; background: var(--surface); border-top: 1px solid var(--border); }

/* ── Typography helpers ──────────────────────────────── */
.eyebrow {
  display: block;
  font-family: var(--mono);
  font-size: 11px;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--accent);
  margin-bottom: 10px;
}

.section-title {
  font-size: clamp(1.5rem, 3.5vw, 2.2rem);
  font-weight: 700;
  letter-spacing: -0.02em;
  line-height: 1.2;
  color: var(--text);
}

.text-link {
  color: var(--accent-hi);
  text-decoration: underline;
  text-underline-offset: 3px;
}
.text-link:hover { color: var(--text); }

.section-hd {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 36px;
  flex-wrap: wrap;
}
.section-hd-center { justify-content: center; text-align: center; }

/* ── Buttons ─────────────────────────────────────────── */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  justify-content: center;
  padding: 11px 22px;
  font-size: 0.875rem;
  font-weight: 600;
  letter-spacing: 0.01em;
  border-radius: var(--r-md);
  border: 1px solid transparent;
  transition: background var(--ease), border-color var(--ease),
              transform var(--ease), box-shadow var(--ease), color var(--ease);
  white-space: nowrap;
  cursor: pointer;
  text-decoration: none;
}
.btn-sm { padding: 8px 14px; font-size: 0.8rem; }

.btn-primary {
  background: var(--accent);
  color: #fff;
  border-color: var(--accent);
}
.btn-primary:hover {
  background: var(--accent-hi);
  border-color: var(--accent-hi);
  transform: translateY(-1px);
  box-shadow: 0 4px 20px var(--accent-glow);
}
.btn-primary:active { transform: none; box-shadow: none; }

/* TikTok button: dark, clean */
.btn-tiktok {
  background: #fff;
  color: #000;
  border-color: #fff;
  font-weight: 700;
}
.btn-tiktok:hover {
  background: #e0e0e0;
  border-color: #e0e0e0;
  transform: translateY(-1px);
}

.btn-ghost {
  background: transparent;
  color: var(--text-dim);
  border-color: transparent;
}
.btn-ghost:hover { color: var(--text); background: var(--surface-2); }

.btn-outline {
  background: transparent;
  color: var(--text);
  border-color: var(--border-hi);
}
.btn-outline:hover { border-color: var(--text-dim); }

/* ── Nav ─────────────────────────────────────────────── */
.nav {
  position: fixed;
  inset: 0 0 auto 0;
  height: var(--nav-h);
  z-index: 100;
  background: rgba(8, 8, 8, 0.9);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border-bottom: 1px solid var(--border);
}
.nav-inner {
  height: 100%;
  max-width: var(--max-w);
  margin: 0 auto;
  padding: 0 20px;
  display: flex;
  align-items: center;
  justify-content: space-between;
}
.nav-logo  { font-size: 1.05rem; font-weight: 700; letter-spacing: -0.01em; }
.nav-links { display: flex; align-items: center; gap: 20px; }
.nav-link  { font-size: 0.875rem; color: var(--text-dim); transition: color var(--ease); }
.nav-link:hover { color: var(--text); }
.nav-hide-sm { display: none; }

/* ── Live badge ──────────────────────────────────────── */
.live-badge {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  margin-top: 36px;
  font-family: var(--mono);
  font-size: 10px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--text-dim);
}
.live-dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--accent);
  flex-shrink: 0;
  animation: pulse 2.2s ease-in-out infinite;
}
.live-dot-sm { width: 5px; height: 5px; }
@keyframes pulse {
  0%, 100% { opacity: 1;   transform: scale(1); }
  50%       { opacity: 0.3; transform: scale(0.75); }
}

/* ── Hero ────────────────────────────────────────────── */
.hero {
  min-height: 100vh;
  display: grid;
  place-items: center;
  text-align: center;
  padding: calc(var(--nav-h) + 60px) 20px 80px;
  position: relative;
  overflow: hidden;
}

/* Subtle grid + orange radial glow */
.hero-bg {
  position: absolute;
  inset: 0;
  background:
    radial-gradient(ellipse 60% 50% at 50% 40%, rgba(240,78,0,0.07) 0%, transparent 100%),
    repeating-linear-gradient(0deg,  transparent, transparent 39px, rgba(255,255,255,0.016) 39px, rgba(255,255,255,0.016) 40px),
    repeating-linear-gradient(90deg, transparent, transparent 39px, rgba(255,255,255,0.016) 39px, rgba(255,255,255,0.016) 40px);
  pointer-events: none;
}

.hero-content { position: relative; z-index: 1; max-width: 820px; }

.hero-eyebrow {
  font-family: var(--mono);
  font-size: 11px;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--text-dim);
  margin-bottom: 20px;
}

/* The main headline */
.hero-title {
  font-size: clamp(2.6rem, 10vw, 7.5rem);
  font-weight: 800;
  line-height: 1.0;
  letter-spacing: -0.04em;
  color: var(--text);
  margin-bottom: 28px;
}
/* Orange period at end of each line */
.hero-title .dot { color: var(--accent); }

.hero-sub {
  font-size: clamp(0.95rem, 2vw, 1.1rem);
  color: var(--text-dim);
  max-width: 440px;
  margin: 0 auto 36px;
  line-height: 1.8;
}

.hero-ctas { display: flex; gap: 10px; justify-content: center; flex-wrap: wrap; }

.hero-scroll {
  position: absolute;
  bottom: 28px;
  left: 50%;
  transform: translateX(-50%);
  color: var(--text-muted);
  animation: bob 2.8s ease-in-out infinite;
}
@keyframes bob {
  0%, 100% { transform: translateX(-50%) translateY(0);   opacity: 0.4; }
  50%       { transform: translateX(-50%) translateY(7px); opacity: 0.9; }
}

/* ── Stats bar ───────────────────────────────────────── */
.stats-bar {
  background: var(--surface);
  border-top: 1px solid var(--border);
  border-bottom: 1px solid var(--border);
  padding: 22px 0;
}
.stats-grid {
  display: flex;
  align-items: center;
  justify-content: center;
  flex-wrap: wrap;
}
.stat {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 3px;
  padding: 6px 24px;
}
.stat-value {
  font-family: var(--mono);
  font-size: 1.45rem;
  font-weight: 700;
  letter-spacing: -0.02em;
  color: var(--text);
}
.stat-label {
  font-size: 0.7rem;
  color: var(--text-dim);
  text-transform: uppercase;
  letter-spacing: 0.09em;
}
.stat-sep { width: 1px; height: 34px; background: var(--border); flex-shrink: 0; }

/* ── Gallery ─────────────────────────────────────────── */
.design-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 16px;
  transition: opacity var(--ease-slow);
}

/* Each card links to store */
.design-card {
  display: block;
  text-decoration: none;
  background: var(--surface-2);
  border: 1px solid var(--border);
  border-radius: var(--r-lg);
  overflow: hidden;
  transition: border-color var(--ease), transform var(--ease);
}
.design-card:hover {
  border-color: var(--border-hi);
  transform: translateY(-2px);
}
.design-card:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
}

.card-img {
  aspect-ratio: 1;
  overflow: hidden;
  background: #111;
}
.card-img img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform var(--ease-slow);
}
.design-card:hover .card-img img { transform: scale(1.05); }

.card-body {
  padding: 14px 16px;
  border-top: 1px solid var(--border);
}
.card-meta {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 8px;
  margin-bottom: 5px;
}
.card-name {
  font-size: 0.875rem;
  font-weight: 600;
  color: var(--text);
  line-height: 1.3;
}
.card-tag {
  font-family: var(--mono);
  font-size: 0.68rem;
  color: var(--accent);
  white-space: nowrap;
  flex-shrink: 0;
}
.card-caption {
  font-size: 0.78rem;
  color: var(--text-dim);
  line-height: 1.5;
  font-style: italic;
}

.gallery-state {
  grid-column: 1 / -1;
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 200px;
  color: var(--text-dim);
  font-family: var(--mono);
  font-size: 0.82rem;
}
.gallery-ft {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-top: 22px;
  flex-wrap: wrap;
  gap: 12px;
}
.refresh-note {
  font-family: var(--mono);
  font-size: 0.68rem;
  color: var(--text-muted);
}

/* ── How it works ────────────────────────────────────── */
.steps {
  display: grid;
  grid-template-columns: 1fr;
  gap: 14px;
  margin-top: 40px;
}
.step-arrow { display: none; }

.step {
  padding: 28px 28px 32px;
  background: var(--surface-2);
  border: 1px solid var(--border);
  border-radius: var(--r-lg);
}
.step-num {
  font-family: var(--mono);
  font-size: 0.68rem;
  font-weight: 700;
  color: var(--accent);
  letter-spacing: 0.14em;
  margin-bottom: 14px;
}
.step-title {
  font-size: 1.1rem;
  font-weight: 700;
  letter-spacing: -0.01em;
  color: var(--text);
  margin-bottom: 10px;
}
.step-body { font-size: 0.875rem; color: var(--text-dim); line-height: 1.8; }

/* ── Newsletter ──────────────────────────────────────── */
.newsletter-sub {
  font-size: 0.9rem;
  color: var(--text-dim);
  margin: 10px auto 28px;
  max-width: 380px;
  line-height: 1.7;
}
.signup-form { max-width: 440px; margin: 0 auto; }
.signup-row  { display: flex; gap: 8px; }

.signup-input {
  flex: 1;
  min-width: 0;
  padding: 11px 14px;
  background: var(--surface-2);
  border: 1px solid var(--border-hi);
  border-radius: var(--r-md);
  color: var(--text);
  font-size: 0.875rem;
  outline: none;
  transition: border-color var(--ease);
}
.signup-input::placeholder { color: var(--text-dim); }
.signup-input:focus        { border-color: var(--accent); }

.form-msg {
  margin-top: 12px;
  font-family: var(--mono);
  font-size: 0.78rem;
  min-height: 18px;
}
.form-msg.ok  { color: #4ade80; }
.form-msg.err { color: #f87171; }

/* ── Footer ──────────────────────────────────────────── */
.footer {
  background: var(--surface);
  border-top: 1px solid var(--border);
  padding: 56px 0 28px;
}
.footer-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 48px;
  margin-bottom: 48px;
}
.footer-logo {
  font-size: 1.15rem;
  font-weight: 700;
  letter-spacing: -0.01em;
  margin-bottom: 14px;
}
.footer-about p {
  font-size: 0.855rem;
  color: var(--text-dim);
  line-height: 1.75;
  max-width: 380px;
}
.footer-social {
  display: flex;
  gap: 18px;
  margin-top: 18px;
}
.footer-social a {
  font-size: 0.82rem;
  color: var(--text-dim);
  transition: color var(--ease);
}
.footer-social a:hover { color: var(--text); }

.footer-heading {
  font-size: 0.8rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  color: var(--text-dim);
  margin-bottom: 18px;
}

/* FAQ using native <details> */
.faq { display: flex; flex-direction: column; gap: 1px; }

.faq-item {
  border-bottom: 1px solid var(--border);
}
.faq-item:first-child { border-top: 1px solid var(--border); }

.faq-q {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
  padding: 14px 0;
  font-size: 0.875rem;
  font-weight: 500;
  color: var(--text);
  cursor: pointer;
  list-style: none;
  user-select: none;
}
.faq-q::-webkit-details-marker { display: none; }
.faq-q::after {
  content: '+';
  font-size: 1.1rem;
  color: var(--text-dim);
  flex-shrink: 0;
  transition: transform var(--ease);
}
details[open] > .faq-q::after { transform: rotate(45deg); }
.faq-q:hover { color: var(--text); }

.faq-a {
  font-size: 0.855rem;
  color: var(--text-dim);
  line-height: 1.75;
  padding-bottom: 16px;
}

/* Footer bottom row */
.footer-bottom {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding-top: 24px;
  border-top: 1px solid var(--border);
  gap: 16px;
  flex-wrap: wrap;
}
.footer-bottom p { font-size: 0.78rem; color: var(--text-muted); }

.footer-meta {
  display: flex;
  gap: 18px;
  flex-wrap: wrap;
}
.footer-meta a {
  font-size: 0.78rem;
  color: var(--text-muted);
  transition: color var(--ease);
}
.footer-meta a:hover { color: var(--text-dim); }

.footer-sys {
  display: flex;
  align-items: center;
  gap: 7px;
  margin-top: 16px;
  font-family: var(--mono);
  font-size: 0.7rem;
  color: var(--text-muted);
}

/* ── Responsive ──────────────────────────────────────── */
@media (min-width: 600px) {
  .nav-hide-sm { display: inline-flex; }

  .design-grid {
    grid-template-columns: repeat(2, 1fr);
    gap: 20px;
  }

  .steps {
    grid-template-columns: 1fr auto 1fr auto 1fr;
    align-items: stretch;
    gap: 0;
  }
  .step-arrow {
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--text-muted);
    font-size: 1.1rem;
    padding: 0 14px;
    flex-shrink: 0;
  }

  .footer-grid { grid-template-columns: 1fr 1fr; }
}

@media (min-width: 1024px) {
  .section       { padding: 96px 0; }
  .design-grid   { grid-template-columns: repeat(4, 1fr); }
  .footer-grid   { grid-template-columns: 5fr 7fr; gap: 80px; }
}
