﻿/* ==========================================================================
   Deadmojo — base theme
   ========================================================================== */

:root {
  --bg: #0a0a0d;
  --bg-alt: #121218;
  --bg-card: #16161d;
  --border: #24242e;
  --text: #f2f2f5;
  --text-dim: #a3a3af;
  --text-dimmer: #6f6f7c;
  --accent: #2f7fe0;
  --accent-bright: #5aa8f5;
  --accent-2: #f5a623;
  --accent-2-bright: #ffc14d;
  --accent-text: #ffffff;

  --container-width: 1160px;
  --radius: 10px;
  --radius-lg: 16px;
  --font: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;

  --header-h: 72px;
}

* { box-sizing: border-box; margin: 0; padding: 0; }

html { scroll-behavior: smooth; }

body {
  background: var(--bg);
  color: var(--text);
  font-family: var(--font);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

img { max-width: 100%; display: block; }

a { color: inherit; text-decoration: none; }

ul { list-style: none; }

h1, h2, h3, h4 { line-height: 1.2; font-weight: 700; letter-spacing: -0.02em; }

.container {
  width: 100%;
  max-width: var(--container-width);
  margin: 0 auto;
  padding: 0 24px;
}

.section {
  min-height: 100vh;
  padding: 96px 0;
  display: flex;
  align-items: center;
  overflow-x: hidden;
}

.section-head {
  text-align: center;
  max-width: 640px;
  margin: 0 auto 56px;
}

.section-head .eyebrow {
  display: inline-block;
  color: var(--accent-bright);
  font-size: 13px;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  margin-bottom: 12px;
}

.section-head h2 {
  font-size: clamp(28px, 4vw, 40px);
  margin-bottom: 14px;
}

.section-head p {
  color: var(--text-dim);
  font-size: 17px;
}

/* Buttons
   ========================================================================== */

.btn {
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 9px 20px;
  border-radius: 999px;
  font-weight: 600;
  font-size: 13px;
  border: 1px solid transparent;
  cursor: pointer;
  overflow: hidden;
  transition: transform 0.15s ease, background 0.15s ease, border-color 0.15s ease, box-shadow 0.15s ease;
  white-space: nowrap;
}

/* The button box (border/pill/glow) only ever lifts on hover — it never
   changes size. The "grow" read comes from .btn-label scaling up inside it,
   which is a paint-only transform and never triggers the box to reflow. */
.btn-label {
  display: inline-block;
  transition: transform 0.2s ease;
}

.btn:hover .btn-label {
  transform: scale(1.12);
}

/* Shine sweep, shared by every button — a skewed light band that travels
   across on hover. Sits above the background/glow layers, below the label.
   Also reused by .step-number (see "How It Works") and the store page's
   .category-tab filters, neither of which are buttons but both borrow the
   chrome-ring treatment wholesale. */
.btn::after,
.step-number::after,
.category-tabs-store .category-tab::after {
  content: '';
  position: absolute;
  top: 0;
  left: -75%;
  width: 45%;
  height: 100%;
  background: linear-gradient(120deg, transparent, rgba(255, 255, 255, 0.55), transparent);
  transform: skewX(-25deg);
  pointer-events: none;
}

.btn:hover::after,
.step:hover .step-number::after,
.category-tabs-store .category-tab:hover::after {
  animation: btn-shine 0.85s ease forwards;
}

@keyframes btn-shine {
  from { left: -75%; }
  to { left: 125%; }
}

/* Primary and secondary buttons share the exact same glossy/metallic
   treatment — the only difference is which color sits on which side of the
   gradient ring (blue-left/gold-right for primary, mirrored for secondary).
   The store page's category filters borrow it too: the active tab gets the
   primary (blue-led) ring, the rest get the ghost (gold-led) ring, so the
   selected filter still reads clearly at a glance. */
.btn-primary,
.btn-ghost,
.step-number,
.category-tabs-store .category-tab {
  border: 3px solid transparent;
  background:
    linear-gradient(180deg, #212b40 0%, #0a0d13 50%, #212b40 100%) padding-box,
    var(--btn-ring) border-box;
  color: var(--accent-bright);
  text-shadow: 0 1px 2px rgba(0, 0, 0, 0.9), 0 0 5px rgba(0, 0, 0, 0.7);
  -webkit-text-stroke: 0.6px rgba(0, 0, 0, 0.55);
  box-shadow:
    inset 0 1px 1px rgba(255, 255, 255, 0.35),
    inset 0 -2px 3px rgba(0, 0, 0, 0.55),
    0 0 0 1px rgba(0, 0, 0, 0.5),
    0 0 16px -2px rgba(47, 127, 224, 0.55),
    0 0 16px -2px rgba(245, 166, 35, 0.5);
  transition: transform 0.15s ease, box-shadow 0.15s ease;
}

.btn-primary,
.step-number,
.category-tabs-store .category-tab.is-active {
  --btn-ring: linear-gradient(90deg,
    #0d3a6e 0%, #2f7fe0 9%, #9bd6ff 16%, #2f7fe0 23%, #133b6e 34%,
    #0a0d13 48%, #0a0d13 52%,
    #6e4008 66%, #f5a623 77%, #ffe9bd 84%, #f5a623 91%, #7a4a0a 100%
  );
}

.btn-ghost,
.category-tabs-store .category-tab {
  --btn-ring: linear-gradient(90deg,
    #6e4008 0%, #f5a623 9%, #ffe9bd 16%, #f5a623 23%, #7a4a0a 34%,
    #0a0d13 48%, #0a0d13 52%,
    #0d3a6e 66%, #2f7fe0 77%, #9bd6ff 84%, #2f7fe0 91%, #133b6e 100%
  );
}

.btn-primary::before,
.btn-ghost::before,
.step-number::before,
.category-tabs-store .category-tab::before {
  content: '';
  position: absolute;
  inset: 0;
  background:
    radial-gradient(50% 60% at 28% 65%, rgba(255, 255, 255, 0.16), transparent 75%),
    radial-gradient(45% 50% at 68% 35%, rgba(255, 255, 255, 0.12), transparent 78%),
    radial-gradient(70% 55% at 50% 55%, rgba(255, 255, 255, 0.08), transparent 80%);
  filter: blur(5px);
  mix-blend-mode: screen;
  pointer-events: none;
}

.btn-primary:hover,
.btn-ghost:hover,
.step:hover .step-number,
.category-tabs-store .category-tab:hover,
.category-tabs-store .category-tab.is-active {
  box-shadow:
    inset 0 1px 1px rgba(255, 255, 255, 0.45),
    inset 0 -2px 3px rgba(0, 0, 0, 0.55),
    0 0 0 1px rgba(0, 0, 0, 0.5),
    0 0 24px -2px rgba(47, 127, 224, 0.75),
    0 0 24px -2px rgba(245, 166, 35, 0.7);
  transform: translateY(-2px);
}

.category-tabs-store .category-tab {
  position: relative;
  overflow: hidden;
}

.btn-lg {
  padding: 12px 24px;
  font-size: 14px;
}

/* Flash messages
   ========================================================================== */

.flash {
  margin: 16px auto 0;
  padding: 14px 20px;
  border-radius: var(--radius);
  font-size: 14px;
  font-weight: 500;
}

.flash-success {
  background: rgba(46, 204, 113, 0.12);
  border: 1px solid rgba(46, 204, 113, 0.35);
  color: #6fe0a0;
}

.flash-error {
  background: rgba(231, 76, 60, 0.12);
  border: 1px solid rgba(231, 76, 60, 0.35);
  color: #ff8a80;
}

/* Header / Nav
   ========================================================================== */

.site-header {
  position: sticky;
  top: 0;
  z-index: 100;
  height: var(--header-h);
  display: flex;
  align-items: center;
  background: rgba(10, 10, 13, 0.8);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--border);
}

.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
}

.logo {
  font-size: 20px;
  font-weight: 800;
  letter-spacing: -0.01em;
  color: var(--text);
  flex-shrink: 0;
}

.logo span { color: var(--accent-bright); }

.logo-img {
  display: block;
  height: 40px;
  width: auto;
}

.footer-brand .logo-img {
  height: 36px;
  margin-bottom: 14px;
}

.main-nav ul {
  display: flex;
  gap: 32px;
}

.main-nav a {
  font-size: 15px;
  font-weight: 500;
  color: var(--text-dim);
  transition: color 0.15s ease;
}

.main-nav a:hover { color: var(--text); }

.main-nav ul.nav-auth-links { display: none; }

.header-actions {
  display: flex;
  align-items: center;
  gap: 12px;
}

.nav-toggle {
  display: none;
  flex-direction: column;
  justify-content: center;
  gap: 5px;
  width: 36px;
  height: 36px;
  background: transparent;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  cursor: pointer;
}

.nav-toggle span {
  display: block;
  width: 16px;
  height: 2px;
  margin: 0 auto;
  background: var(--text);
  transition: transform 0.2s ease, opacity 0.2s ease;
}

.nav-toggle.is-open span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.nav-toggle.is-open span:nth-child(2) { opacity: 0; }
.nav-toggle.is-open span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

/* Hero
   ========================================================================== */

.hero {
  position: relative;
  min-height: 100vh;
  display: flex;
  align-items: center;
  padding: 120px 0 100px;
  overflow: hidden;
  text-align: center;
}

.hero::before {
  content: "";
  position: absolute;
  top: -200px;
  left: 50%;
  transform: translateX(-50%);
  width: 900px;
  height: 500px;
  background: radial-gradient(ellipse at center, rgba(47, 127, 224, 0.35), transparent 70%);
  filter: blur(40px);
  pointer-events: none;
}

.hero-inner {
  position: relative;
  z-index: 1;
  max-width: 780px;
  margin: 0 auto;
  will-change: transform;
}

/* As the hero scrolls out, its content lags behind the page at ~75% speed
   (see initHeroScrollLag in main.js) instead of leaving at a flat 1:1 rate —
   a soft "held back" read without pinning the section in place. The section
   right after it gets a dust-colored wash across its top edge so the seam
   dissolves rather than cutting on a hard line. */
.hero + .section {
  position: relative;
}

.hero + .section::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 240px;
  background: linear-gradient(to bottom, rgba(12, 8, 5, 0.5), transparent);
  pointer-events: none;
}

.hero + .section > .container {
  position: relative;
  z-index: 1;
}

/* Nebula — a single WebGL2 canvas rendering a fragment-shader fractal-noise
   smoke field (fbm with domain warping, see initNebulaCanvas in main.js),
   colorized as teal + gold gas with a dark dust layer. Genuinely fluid,
   continuous motion instead of a handful of CSS blobs easing back and
   forth. A couple of faint static stars sit on top for scale. */
.hero-nebula {
  position: absolute;
  inset: 0;
  z-index: 0;
  overflow: hidden;
  pointer-events: none;
}

.hero-nebula-canvas {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  display: block;
}

.hero-stars {
  position: absolute;
  inset: 0;
  background-repeat: no-repeat;
}

.hero-stars-far {
  opacity: 0.4;
  background-image:
    radial-gradient(1.1px 1.1px at 12% 22%, #fff, transparent),
    radial-gradient(1px 1px at 34% 68%, #fff, transparent),
    radial-gradient(1.2px 1.2px at 62% 30%, #fff, transparent),
    radial-gradient(1px 1px at 81% 58%, #fff, transparent);
}

.hero-stars-near {
  opacity: 0.6;
  animation: hero-twinkle 6s ease-in-out infinite;
  background-image:
    radial-gradient(1.6px 1.6px at 22% 42%, #fff, transparent),
    radial-gradient(1.8px 1.8px at 70% 20%, #fff, transparent),
    radial-gradient(1.6px 1.6px at 88% 66%, #fff, transparent);
}

@keyframes hero-twinkle {
  0%, 100% { opacity: 0.6; }
  50% { opacity: 0.25; }
}

/* A handful of individually-timed bright stars — each gets its own
   animation-duration/delay inline so they flare up and fade out on their
   own schedule instead of pulsing in unison. The keyframe itself is
   asymmetric: a quick flash to full brightness, then a slow drift back
   down, which reads as "alive" rather than a mechanical blink. */
.hero-star {
  position: absolute;
  border-radius: 50%;
  background: #fff;
  box-shadow: 0 0 6px 1px rgba(255, 255, 255, 0.85);
  opacity: 0.12;
  animation-name: star-pulse;
  animation-timing-function: ease-out;
  animation-iteration-count: infinite;
  will-change: opacity, transform;
}

.hero-star-teal {
  background: var(--accent-bright);
  box-shadow: 0 0 8px 2px rgba(90, 168, 245, 0.85);
}

.hero-star-gold {
  background: var(--accent-2-bright);
  box-shadow: 0 0 8px 2px rgba(255, 193, 77, 0.85);
}

@keyframes star-pulse {
  0% { opacity: 0.12; transform: scale(0.7); }
  6% { opacity: 1; transform: scale(1.7); }
  100% { opacity: 0.12; transform: scale(0.7); }
}

@media (prefers-reduced-motion: reduce) {
  .hero-star { animation: none; opacity: 0.5; }
  .hero-stars-near { animation: none; }
}

.hero-tagline {
  font-size: 15px;
  font-style: italic;
  letter-spacing: 0.04em;
  margin: 0 0 14px;
  background: linear-gradient(90deg, var(--accent-2-bright), var(--accent-bright));
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  text-shadow: 0 0 18px rgba(90, 168, 245, 0.3);
}

.hero .eyebrow {
  display: inline-block;
  color: var(--accent-2-bright);
  font-size: 13px;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  background: rgba(245, 166, 35, 0.12);
  border: 1px solid rgba(245, 166, 35, 0.3);
  padding: 6px 14px;
  border-radius: 999px;
  margin-bottom: 24px;
}

.hero h1 {
  font-size: clamp(36px, 6vw, 58px);
  margin-bottom: 20px;
  text-shadow: 0 2px 20px rgba(0, 0, 0, 0.55);
}

.hero h1 .accent { color: var(--accent-bright); }

.hero p.lead {
  font-size: 19px;
  color: var(--text-dim);
  max-width: 600px;
  margin: 0 auto 40px;
}

.hero-actions {
  display: flex;
  gap: 16px;
  justify-content: center;
  flex-wrap: wrap;
}

/* Value props grid
   ========================================================================== */

.grid-4 {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 24px;
}

.card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 32px 24px;
  transition: border-color 0.15s ease, transform 0.15s ease, box-shadow 0.15s ease;
  transform-style: preserve-3d;
  will-change: transform;
}

.card:hover {
  border-color: rgba(245, 166, 35, 0.5);
  box-shadow: 0 0 28px -6px rgba(245, 166, 35, 0.45);
  transform: translateY(-2px);
}

.card-icon { transform: translateZ(40px); }
.card h3 { transform: translateZ(28px); }
.card p { transform: translateZ(18px); }

.card-icon {
  width: 44px;
  height: 44px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: var(--radius);
  background: rgba(47, 127, 224, 0.15);
  color: var(--accent-bright);
  font-size: 20px;
  margin-bottom: 20px;
}

.card h3 {
  font-size: 18px;
  margin-bottom: 10px;
}

.card p {
  color: var(--text-dim);
  font-size: 15px;
}

/* Featured templates
   ========================================================================== */

.grid-3 {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 24px;
}

.template-card {
  display: block;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  overflow: hidden;
  transition: border-color 0.15s ease, transform 0.15s ease, box-shadow 0.15s ease;
  transform-style: preserve-3d;
  will-change: transform;
}

.template-card:hover {
  border-color: rgba(245, 166, 35, 0.5);
  box-shadow: 0 0 28px -6px rgba(245, 166, 35, 0.45);
  transform: translateY(-2px);
}

/* Wrapping div so the wishlist button can sit outside the .template-card
   anchor (a <button>/<form> nested inside an <a> is invalid HTML and
   browsers handle the click bubbling inconsistently). */
.template-card-wrap {
  position: relative;
}

.wishlist-toggle-form {
  position: absolute;
  top: 12px;
  right: 12px;
  z-index: 2;
  margin: 0;
}

.wishlist-toggle {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 34px;
  height: 34px;
  border-radius: 50%;
  border: 1px solid var(--border);
  background: rgba(10, 13, 19, 0.75);
  backdrop-filter: blur(4px);
  color: var(--text-dim);
  font-size: 16px;
  cursor: pointer;
  transition: color 0.15s ease, border-color 0.15s ease, transform 0.15s ease;
}

.wishlist-toggle:hover {
  color: var(--accent-2-bright);
  border-color: rgba(245, 166, 35, 0.5);
  transform: scale(1.08);
}

.wishlist-toggle.is-active {
  color: var(--accent-2-bright);
  border-color: rgba(245, 166, 35, 0.5);
}

.template-thumb { transform: translateZ(12px); }
.template-body { transform: translateZ(28px); }

.template-thumb {
  position: relative;
  height: 160px;
  background:
    linear-gradient(135deg, rgba(47, 127, 224, 0.25), rgba(47, 127, 224, 0.05)),
    repeating-linear-gradient(45deg, rgba(255,255,255,0.03) 0 2px, transparent 2px 12px);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--text-dimmer);
  font-size: 13px;
  font-weight: 600;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  border-bottom: 1px solid var(--border);
  overflow: hidden;
}

/* Sized taller than the visible frame (with a matching negative top offset)
   so main.js has room to drift it vertically on scroll without ever
   revealing empty space at the top/bottom edge. */
.template-thumb img {
  position: absolute;
  top: -18%;
  left: 0;
  width: 100%;
  height: 136%;
  object-fit: cover;
  object-position: top center;
  will-change: transform;
}

.template-body {
  padding: 22px 24px 26px;
}

.template-tag {
  display: inline-block;
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--accent-bright);
  margin-bottom: 10px;
}

.template-body h3 {
  font-size: 18px;
  margin-bottom: 8px;
}

.template-meta {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-top: 18px;
}

.template-price {
  font-weight: 700;
  font-size: 17px;
}

.template-soon {
  font-size: 13px;
  color: var(--text-dimmer);
}

/* How it works
   ========================================================================== */

.steps {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 32px;
}

.step {
  text-align: center;
  padding: 0 12px;
}

.step-number {
  position: relative;
  width: 48px;
  height: 48px;
  margin: 0 auto 20px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  overflow: hidden;
  font-weight: 700;
  font-size: 18px;
}

.step h3 {
  font-size: 19px;
  margin-bottom: 10px;
}

.step p {
  color: var(--text-dim);
  font-size: 15px;
}

/* CTA banner
   ========================================================================== */

/* Homepage contact form — a multi-step reveal (name / email / message) that
   opens from a single button, styled with the site's own dark theme, form
   language, and button system rather than a bespoke look. Progress bar and
   step transitions live here; interaction lives in initContactForm() in
   main.js. */

.contact-card {
  position: relative;
  background:
    radial-gradient(55% 70% at 12% 0%, rgba(47, 127, 224, 0.14), transparent 70%),
    radial-gradient(50% 65% at 100% 100%, rgba(245, 166, 35, 0.1), transparent 70%),
    var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 64px 40px;
  text-align: center;
  overflow: hidden;
}

.contact-intro {
  transition: opacity 0.35s ease, transform 0.35s ease;
}

.contact-intro .eyebrow {
  display: inline-block;
  color: var(--accent-bright);
  font-size: 13px;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  margin-bottom: 14px;
}

.contact-intro h2 {
  font-size: clamp(26px, 4vw, 34px);
  margin-bottom: 14px;
}

.contact-intro p {
  color: var(--text-dim);
  font-size: 17px;
  margin: 0 auto 32px;
  max-width: 480px;
}

.contact-card.is-active .contact-intro {
  opacity: 0;
  transform: translateY(-12px);
  position: absolute;
  inset: 0 40px auto;
  pointer-events: none;
}

.contact-form {
  max-width: 480px;
  margin: 0 auto;
  text-align: left;
  opacity: 0;
  visibility: hidden;
  transform: translateY(16px);
  transition: opacity 0.4s 0.1s ease, transform 0.4s 0.1s ease, visibility 0s 0.4s;
}

.contact-card.is-active .contact-form {
  opacity: 1;
  visibility: visible;
  transform: translateY(0);
  transition: opacity 0.4s 0.15s ease, transform 0.4s 0.15s ease;
}

.contact-honeypot {
  position: absolute;
  left: -9999px;
  width: 1px;
  height: 1px;
  overflow: hidden;
}

.contact-progress {
  height: 3px;
  background: var(--border);
  border-radius: 3px;
  margin-bottom: 36px;
  overflow: hidden;
}

.contact-progress-bar {
  display: block;
  height: 100%;
  width: 0%;
  background: linear-gradient(90deg, var(--accent), var(--accent-bright));
  transition: width 0.4s ease;
}

.contact-steps {
  position: relative;
  min-height: 96px;
}

.contact-step {
  border: none;
  padding: 0;
  margin: 0;
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  opacity: 0;
  pointer-events: none;
  transform: translateX(20px);
  transition: opacity 0.35s ease, transform 0.35s ease;
}

.contact-step.is-past {
  transform: translateX(-20px);
}

.contact-step.is-active {
  opacity: 1;
  pointer-events: auto;
  transform: translateX(0);
  position: relative;
}

.contact-step label {
  display: block;
  font-size: 14px;
  font-weight: 600;
  margin-bottom: 8px;
  color: var(--text-dim);
}

.contact-input-wrap {
  position: relative;
}

.contact-step input,
.contact-step textarea {
  width: 100%;
  padding: 12px 46px 12px 14px;
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  color: var(--text);
  font-size: 15px;
  font-family: inherit;
  transition: border-color 0.15s ease;
}

.contact-step textarea {
  resize: vertical;
  min-height: 110px;
}

.contact-step input:focus,
.contact-step textarea:focus {
  outline: none;
  border-color: var(--accent);
}

.contact-next {
  position: absolute;
  right: 8px;
  top: 8px;
  width: 30px;
  height: 30px;
  padding: 7px;
  border: none;
  border-radius: 999px;
  background: none;
  color: var(--text-dimmer);
  cursor: pointer;
  opacity: 0;
  transform: translateX(-6px);
  pointer-events: none;
  transition: opacity 0.25s ease, transform 0.25s ease, color 0.2s ease, background 0.2s ease;
}

.contact-step textarea ~ .contact-next {
  top: auto;
  bottom: 8px;
}

.contact-next.is-ready {
  opacity: 1;
  transform: translateX(0);
  pointer-events: auto;
}

.contact-next:hover {
  color: var(--accent-bright);
  background: rgba(90, 168, 245, 0.12);
}

.contact-next svg {
  width: 100%;
  height: 100%;
  fill: currentColor;
}

.contact-next.is-sending svg {
  animation: contactSpin 0.8s linear infinite;
}

@keyframes contactSpin {
  to { transform: rotate(360deg); }
}

.contact-error {
  color: #ff8a80;
  font-size: 14px;
  margin: 14px 0 0;
  min-height: 20px;
}

.contact-success {
  opacity: 0;
  transform: translateY(10px);
  transition: opacity 0.5s ease, transform 0.5s ease;
}

.contact-success.is-visible {
  opacity: 1;
  transform: translateY(0);
}

/* A small, self-contained "space" strip the rocket flies across on submit —
   echoes the hero nebula's teal/gold gas clouds with a couple of large,
   heavily blurred blobs (.contact-nebula) plus a real starfield, instead of
   running a second WebGL shader for one brief animation. A radial vignette
   (::after) darkens the edges so it reads as depth rather than a flat gradient
   swatch. */
.contact-space {
  position: relative;
  height: 110px;
  max-width: 420px;
  margin: 0 auto 24px;
  border-radius: var(--radius);
  overflow: hidden;
  background: radial-gradient(120% 140% at 50% 50%, #12121c, #060609);
}

.contact-space::after {
  content: '';
  position: absolute;
  inset: 0;
  box-shadow: inset 0 0 26px 6px rgba(0, 0, 0, 0.65);
  pointer-events: none;
}

.contact-nebula {
  position: absolute;
  border-radius: 50%;
  filter: blur(18px);
  mix-blend-mode: screen;
  opacity: 0.55;
}

.contact-nebula-a {
  width: 65%;
  height: 160%;
  top: -30%;
  left: -12%;
  background: radial-gradient(closest-side, rgba(90, 168, 245, 0.55), transparent 75%);
}

.contact-nebula-b {
  width: 60%;
  height: 150%;
  top: -20%;
  right: -14%;
  background: radial-gradient(closest-side, rgba(245, 166, 35, 0.4), transparent 75%);
}

.contact-star {
  position: absolute;
  border-radius: 50%;
  opacity: 0.2;
  animation: contactTwinkle 3.2s ease-in-out infinite;
  box-shadow: 0 0 4px 0.5px var(--star-color, #fff);
}

@keyframes contactTwinkle {
  0%, 100% { opacity: 0.2; }
  50% { opacity: var(--peak, 0.75); }
}

.contact-rocket {
  position: absolute;
  top: 50%;
  left: -15%;
  width: 40px;
  height: 20px;
  transform: translate(0, -50%) rotate(-8deg);
  opacity: 0;
}

.contact-success.is-visible .contact-rocket {
  animation: contactRocketFly 3.2s cubic-bezier(0.4, 0.05, 0.3, 1) 0.2s forwards;
}

@keyframes contactRocketFly {
  0% {
    left: -15%;
    opacity: 0;
    transform: translate(0, -50%) rotate(-8deg) scale(0.85);
  }
  10% {
    opacity: 1;
  }
  85% {
    opacity: 1;
  }
  100% {
    left: 115%;
    opacity: 0;
    transform: translate(0, -80%) rotate(-8deg) scale(1.05);
  }
}

.contact-rocket svg {
  width: 100%;
  height: 100%;
  overflow: visible;
}

.contact-rocket-flame { fill: var(--accent-2-bright); }
.contact-rocket-body { fill: #e7e9f0; }
.contact-rocket-fin { fill: var(--accent-bright); }
.contact-rocket-window {
  fill: var(--bg);
  stroke: var(--accent-bright);
  stroke-width: 1.5;
}

.contact-rocket-trail {
  position: absolute;
  right: 100%;
  top: 50%;
  width: 34px;
  height: 4px;
  transform: translateY(-50%);
  background: linear-gradient(90deg, transparent, rgba(255, 193, 77, 0.65));
  border-radius: 999px;
  filter: blur(1.5px);
}

.contact-success h2 {
  font-size: clamp(26px, 4vw, 34px);
  margin-bottom: 14px;
  opacity: 0;
  transform: translateY(6px);
}

.contact-success p {
  color: var(--text-dim);
  font-size: 17px;
  opacity: 0;
  transform: translateY(6px);
}

.contact-success.is-visible h2 {
  animation: contactTextIn 0.5s ease 2.7s forwards;
}

.contact-success.is-visible p {
  animation: contactTextIn 0.5s ease 2.9s forwards;
}

@keyframes contactTextIn {
  to { opacity: 1; transform: translateY(0); }
}

@media (prefers-reduced-motion: reduce) {
  .contact-star {
    animation: none;
    opacity: 0.6;
  }

  .contact-rocket {
    animation: none !important;
    left: 40%;
    opacity: 1 !important;
  }

  .contact-success h2,
  .contact-success p {
    animation: none !important;
    opacity: 1 !important;
    transform: none !important;
  }
}

/* Forms (auth, account)
   ========================================================================== */

.auth-section {
  padding: 96px 0;
  display: flex;
  justify-content: center;
}

.auth-card {
  width: 100%;
  max-width: 420px;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 40px;
}

.auth-card h1 {
  font-size: 26px;
  margin-bottom: 8px;
  text-align: center;
}

.auth-card .auth-subtext {
  color: var(--text-dim);
  font-size: 14px;
  text-align: center;
  margin-bottom: 28px;
}

.form-group {
  margin-bottom: 20px;
}

.form-group label {
  display: block;
  font-size: 14px;
  font-weight: 600;
  margin-bottom: 8px;
  color: var(--text-dim);
}

.form-group input,
.form-group textarea,
.form-group select {
  width: 100%;
  padding: 12px 14px;
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  color: var(--text);
  font-size: 15px;
  font-family: inherit;
  transition: border-color 0.15s ease;
}

.form-group textarea {
  resize: vertical;
}

.form-group input:focus,
.form-group textarea:focus,
.form-group select:focus {
  outline: none;
  border-color: var(--accent);
}

.form-errors {
  background: rgba(231, 76, 60, 0.12);
  border: 1px solid rgba(231, 76, 60, 0.35);
  color: #ff8a80;
  border-radius: var(--radius);
  padding: 14px 18px;
  font-size: 14px;
  margin-bottom: 20px;
}

.form-errors ul {
  list-style: disc;
  padding-left: 18px;
}

.form-errors li + li {
  margin-top: 4px;
}

.btn-block {
  width: 100%;
}

.auth-switch {
  text-align: center;
  font-size: 14px;
  color: var(--text-dim);
  margin-top: 24px;
}

.auth-switch a {
  color: var(--accent-bright);
  font-weight: 600;
}

/* Account page
   ========================================================================== */

.account-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 32px;
  margin-bottom: 24px;
}

.account-card h2 {
  font-size: 18px;
  margin-bottom: 16px;
}

.account-meta {
  display: flex;
  flex-direction: column;
  gap: 8px;
  font-size: 15px;
  color: var(--text-dim);
}

.account-meta strong {
  color: var(--text);
}

.empty-state {
  color: var(--text-dimmer);
  font-size: 14px;
  padding: 24px;
  text-align: center;
  border: 1px dashed var(--border);
  border-radius: var(--radius);
}

/* Invoice / receipt
   ========================================================================== */

.invoice {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 32px;
}

.invoice-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding-bottom: 20px;
  margin-bottom: 20px;
  border-bottom: 1px solid var(--border);
}

.invoice-logo {
  height: 32px;
  width: auto;
}

.invoice-head-meta {
  text-align: right;
}

.invoice-head-meta h2 {
  margin-bottom: 2px;
}

.invoice-head-meta p {
  color: var(--text-dimmer);
  font-size: 14px;
}

.invoice-meta {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 16px;
  margin-bottom: 24px;
}

.invoice-label {
  display: block;
  font-size: 12px;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: var(--text-dimmer);
  margin-bottom: 4px;
}

.invoice-meta p {
  font-size: 14px;
  color: var(--text-dim);
  word-break: break-word;
}

.invoice-table {
  width: 100%;
  border-collapse: collapse;
}

.invoice-table th,
.invoice-table td {
  padding: 12px 0;
  text-align: left;
  font-size: 14px;
  border-bottom: 1px solid var(--border);
}

.invoice-table th {
  color: var(--text-dimmer);
  font-size: 12px;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

.invoice-table tfoot td {
  border-bottom: none;
  border-top: 1px solid var(--border);
  font-weight: 700;
  padding-top: 16px;
}

.invoice-actions {
  display: flex;
  gap: 12px;
  justify-content: center;
  margin-top: 24px;
}

@media print {
  .site-header, .site-footer, .no-print { display: none !important; }
  .no-print-section { min-height: 0; padding: 0; display: block; }
  body { background: #fff; color: #000; }
  .invoice { border: none; background: #fff; padding: 0; }
}

/* Footer
   ========================================================================== */

.site-footer {
  border-top: 1px solid var(--border);
  padding: 64px 0 0;
  margin-top: 40px;
}

.footer-inner {
  display: grid;
  grid-template-columns: 2fr 1fr 1fr;
  gap: 40px;
  padding-bottom: 48px;
}

.footer-brand p {
  color: var(--text-dim);
  font-size: 14px;
  margin-top: 16px;
  max-width: 320px;
}

.footer-links h4,
.footer-contact h4 {
  font-size: 14px;
  margin-bottom: 16px;
  color: var(--text-dimmer);
  text-transform: uppercase;
  letter-spacing: 0.06em;
}

.footer-links li,
.footer-contact li {
  margin-bottom: 10px;
}

.footer-links a,
.footer-contact a {
  color: var(--text-dim);
  font-size: 14px;
  transition: color 0.15s ease;
}

.footer-links a:hover,
.footer-contact a:hover {
  color: var(--text);
}

.footer-bottom {
  border-top: 1px solid var(--border);
  padding: 24px 0;
  text-align: center;
  color: var(--text-dimmer);
  font-size: 13px;
}

/* ==========================================================================
   Responsive
   ========================================================================== */

@media (max-width: 900px) {
  .grid-4 { grid-template-columns: repeat(2, 1fr); }
  .grid-3 { grid-template-columns: 1fr; }
  .steps { grid-template-columns: 1fr; gap: 40px; }
  .footer-inner { grid-template-columns: 1fr; gap: 32px; }
  .admin-stats { grid-template-columns: repeat(2, 1fr); }
}

/* Admin
   ========================================================================== */

.admin-shell {
  display: flex;
  min-height: 100vh;
  align-items: flex-start;
}

.admin-sidebar {
  width: 240px;
  flex-shrink: 0;
  background: var(--bg-card);
  border-right: 1px solid var(--border);
  padding: 24px;
  display: flex;
  flex-direction: column;
  position: sticky;
  top: 0;
  height: 100vh;
}

.admin-sidebar-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 32px;
}

.admin-sidebar .logo {
  margin-bottom: 0;
}

.admin-sidebar .logo-img {
  height: 30px;
}

.admin-nav-collapse {
  display: contents;
}

.admin-nav {
  display: flex;
  flex-direction: column;
  gap: 4px;
  flex: 1;
}

.admin-nav a {
  padding: 10px 14px;
  border-radius: var(--radius);
  color: var(--text-dim);
  font-size: 14px;
  font-weight: 500;
}

.admin-nav a:hover {
  background: var(--bg-alt);
  color: var(--text);
}

.admin-nav a.is-active {
  background: rgba(47, 127, 224, 0.15);
  color: var(--accent-bright);
}

.admin-sidebar-footer {
  display: flex;
  flex-direction: column;
  gap: 8px;
  padding-top: 20px;
  border-top: 1px solid var(--border);
}

.admin-sidebar-footer a {
  font-size: 13px;
  color: var(--text-dimmer);
}

.admin-sidebar-footer a:hover {
  color: var(--text);
}

.admin-main {
  flex: 1;
  padding: 48px;
  max-width: 960px;
}

.admin-main h1 {
  font-size: 28px;
  margin-bottom: 8px;
}

.admin-subtext {
  color: var(--text-dim);
  margin-bottom: 32px;
}

.admin-header-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 32px;
}

.admin-header-row h1 {
  margin-bottom: 0;
}

.admin-stats {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 20px;
  margin-bottom: 40px;
}

.admin-stat {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 24px;
}

.admin-stat-value {
  display: block;
  font-size: 32px;
  font-weight: 800;
  margin-bottom: 4px;
}

.admin-stat-label {
  font-size: 13px;
  color: var(--text-dim);
}

.admin-quicklinks {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
}

.admin-form {
  max-width: 640px;
}

.admin-table {
  width: 100%;
  border-collapse: collapse;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  overflow: hidden;
}

.admin-table th,
.admin-table td {
  padding: 14px 18px;
  text-align: left;
  font-size: 14px;
  border-bottom: 1px solid var(--border);
}

.admin-table th {
  color: var(--text-dimmer);
  font-size: 12px;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

.admin-table tr:last-child td {
  border-bottom: none;
}

.admin-table-actions {
  display: flex;
  gap: 14px;
  align-items: center;
}

.admin-table-thumb {
  display: block;
  width: 64px;
  min-width: 64px;
  height: 44px;
  object-fit: cover;
  border-radius: var(--radius);
  border: 1px solid var(--border);
  background: var(--bg-alt);
}

.admin-table-thumb-empty {
  display: block;
  width: 64px;
  min-width: 64px;
  height: 44px;
  border-radius: var(--radius);
  border: 1px dashed var(--border);
  background: var(--bg-alt);
}

.admin-table-actions form {
  margin: 0;
}

.admin-filter-bar {
  display: flex;
  align-items: center;
  gap: 16px;
  flex-wrap: wrap;
  margin-bottom: 24px;
}

.admin-filter-form {
  display: flex;
  align-items: center;
  gap: 10px;
}

.admin-filter-form label {
  font-size: 13px;
  color: var(--text-dim);
}

.admin-filter-form select {
  padding: 8px 12px;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  color: var(--text);
  font-size: 13px;
  font-family: inherit;
  cursor: pointer;
}

.admin-filter-form select:focus {
  outline: none;
  border-color: var(--accent);
}

.badge {
  display: inline-block;
  padding: 4px 10px;
  border-radius: 999px;
  font-size: 12px;
  font-weight: 600;
}

.badge-draft {
  background: rgba(163, 163, 175, 0.15);
  color: var(--text-dim);
}

.badge-published {
  background: rgba(46, 204, 113, 0.15);
  color: #6fe0a0;
}

.link-danger {
  background: none;
  border: none;
  color: #ff8a80;
  font-size: 14px;
  cursor: pointer;
  padding: 0;
  font-family: inherit;
}

.link-danger:hover {
  text-decoration: underline;
}

.link-action {
  background: none;
  border: none;
  color: var(--accent, #8a7cff);
  font-size: 14px;
  cursor: pointer;
  padding: 0;
  font-family: inherit;
}

.link-action:hover {
  text-decoration: underline;
}

/* Blog
   ========================================================================== */

.blog-list {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 24px;
}

.blog-card {
  display: block;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 28px;
  transition: border-color 0.15s ease, transform 0.15s ease, box-shadow 0.15s ease;
  transform-style: preserve-3d;
  will-change: transform;
}

.blog-card:hover {
  border-color: rgba(245, 166, 35, 0.5);
  box-shadow: 0 0 28px -6px rgba(245, 166, 35, 0.45);
  transform: translateY(-2px);
}

.blog-card .blog-date { transform: translateZ(18px); }
.blog-card h3 { transform: translateZ(32px); }
.blog-card p { transform: translateZ(20px); }
.blog-card .blog-read-more { transform: translateZ(18px); }

.blog-date {
  font-size: 13px;
  color: var(--text-dimmer);
}

.blog-card h3 {
  font-size: 20px;
  margin: 10px 0;
}

.blog-card p {
  color: var(--text-dim);
  font-size: 15px;
}

.blog-read-more {
  display: inline-block;
  margin-top: 12px;
  font-size: 14px;
  font-weight: 600;
  color: var(--accent-bright);
}

.blog-post {
  max-width: 720px;
}

.blog-post h1 {
  font-size: clamp(28px, 4vw, 40px);
  margin: 12px 0 32px;
}

.blog-post-body {
  color: var(--text-dim);
  font-size: 17px;
  line-height: 1.8;
}

/* Help Center / FAQ
   ========================================================================== */

.faq-list {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.faq-item {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 18px 22px;
}

.faq-item summary {
  cursor: pointer;
  font-weight: 600;
  font-size: 15px;
  list-style: none;
}

.faq-item summary::-webkit-details-marker {
  display: none;
}

.faq-item summary::before {
  content: '+';
  display: inline-block;
  width: 18px;
  color: var(--accent-bright);
  font-weight: 700;
}

.faq-item[open] summary::before {
  content: '\2212';
}

.faq-item p {
  margin-top: 12px;
  padding-left: 18px;
  color: var(--text-dim);
  font-size: 14px;
  line-height: 1.7;
}

/* Store / product detail
   ========================================================================== */

.category-tabs {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
  justify-content: center;
  margin-bottom: 40px;
}

.category-tab {
  padding: 8px 18px;
  border-radius: 999px;
  border: 1px solid var(--border);
  color: var(--text-dim);
  font-size: 14px;
  font-weight: 600;
  transition: border-color 0.15s ease, color 0.15s ease, background 0.15s ease;
}

.category-tab:hover {
  border-color: var(--text-dim);
  color: var(--text);
}

.category-tab.is-active {
  background: var(--accent);
  border-color: var(--accent);
  color: var(--accent-text);
}

.product-detail {
  max-width: 640px;
}

.product-detail-thumb {
  height: 320px;
  border-radius: var(--radius-lg);
  border: 1px solid var(--border);
  margin-bottom: 28px;
  overflow: hidden;
}

.product-detail-thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: top center;
}

.product-detail h1 {
  font-size: clamp(28px, 4vw, 38px);
  margin: 12px 0 16px;
}

.product-price {
  font-size: 28px;
  font-weight: 800;
  margin: 24px 0 8px;
}

.product-buy-actions {
  display: flex;
  gap: 16px;
  flex-wrap: wrap;
  margin-top: 24px;
}

.admin-form-hint {
  font-size: 13px;
  color: var(--text-dimmer);
  margin: -8px 0 20px;
}

.admin-image-preview {
  max-width: 240px;
  border-radius: var(--radius);
  border: 1px solid var(--border);
  margin-bottom: 12px;
  display: block;
}

@media (max-width: 768px) {
  /* Full-viewport sections are a large-monitor thing — on phones they'd
     just pad short sections with empty space, so let content set the
     height again. */
  .hero, .section {
    min-height: 0;
    display: block;
  }

  .main-nav {
    position: absolute;
    top: var(--header-h);
    left: 0;
    right: 0;
    background: var(--bg-alt);
    border-bottom: 1px solid var(--border);
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.25s ease;
  }

  .main-nav.is-open { max-height: 80vh; overflow-y: auto; }

  .main-nav ul {
    flex-direction: column;
    padding: 8px 24px 20px;
    gap: 4px;
  }

  .main-nav a {
    display: block;
    padding: 12px 0;
    border-bottom: 1px solid var(--border);
  }

  .header-actions .btn-account { display: none; }

  .main-nav ul.nav-auth-links {
    display: flex;
    border-top: 1px solid var(--border);
    margin-top: 4px;
    padding-top: 4px;
  }

  .nav-toggle { display: flex; }

  .grid-4 { grid-template-columns: 1fr; }

  .section { padding: 64px 0; }

  .hero { padding: 80px 0 64px; }

  .contact-card { padding: 48px 24px; }
  .contact-card.is-active .contact-intro { inset: 0 24px auto; }

  .admin-shell { flex-direction: column; }
  .admin-sidebar { width: 100%; height: auto; position: static; flex-direction: column; padding: 16px 24px; }
  .admin-sidebar-top { margin-bottom: 0; }
  .admin-nav-collapse {
    display: block;
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.25s ease;
  }
  .admin-nav-collapse.is-open { max-height: 70vh; overflow-y: auto; }
  .admin-nav { flex-direction: column; padding-top: 16px; }
  .admin-sidebar-footer { flex-direction: column; align-items: flex-start; border-top: 1px solid var(--border); padding-top: 16px; margin-top: 16px; }
  .admin-main { padding: 24px; }
  .admin-stats { grid-template-columns: 1fr; }
  .blog-list { grid-template-columns: 1fr; }
}
