/* ============================================================
   STG_ DESIGN SYSTEM — STARGAZER GOURMET LANDING PAGE
   All classes prefixed with stg_ for WordPress plugin isolation
============================================================ */

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

/* ── CSS Custom Properties ────────────────────────────────── */
:root {
  /* Brand Colours — tuned to the campfire photo palette */
  --stg-dark: #09090d; /* near-black sky */
  --stg-charcoal: #12100e; /* dark earth/ground */
  --stg-card-bg: rgba(10, 8, 6, 0.62); /* warm-charcoal glass */
  --stg-teal: #2ab8b0;
  --stg-teal-light: #4dd4cc;
  --stg-teal-glow: rgba(42, 184, 176, 0.18);
  --stg-amber: #e8960e; /* campfire / tent orange */
  --stg-amber-warm: #c8720a;
  --stg-amber-glow: rgba(232, 140, 14, 0.22);
  --stg-white: #ffffff;
  --stg-white-muted: rgba(255, 255, 255, 0.8);
  --stg-white-subtle: rgba(255, 255, 255, 0.1);

  /* Typography */
  --stg-font-script: "Dancing Script", cursive;
  --stg-font-display: "Cinzel", serif;
  --stg-font-body: "Outfit", sans-serif;

  /* Motion */
  --stg-ease: cubic-bezier(0.25, 0.46, 0.45, 0.94);
  --stg-ease-spring: cubic-bezier(0.34, 1.56, 0.64, 1);

  /* Spacing — tighter to fit in one viewport */
  --stg-space-xs: 0.35rem;
  --stg-space-sm: 0.7rem;
  --stg-space-md: 1rem;
  --stg-space-lg: 1.4rem;
  --stg-space-xl: 2rem;

  /* Radii */
  --stg-radius-sm: 8px;
  --stg-radius-md: 16px;
  --stg-radius-lg: 24px;
  --stg-radius-pill: 100px;
}

/* ── Page Foundation ──────────────────────────────────────── */
html,
body {
  height: 100%;
}

body {
  font-family: var(--stg-font-body);
  color: var(--stg-white);
  /* ── Real photo background ── */
  background-image: url("../images/stg-bg.jpg");
  background-size: cover;
  background-position: center 30%;
  background-repeat: no-repeat;
  background-attachment: fixed;
  /* Dark overlay to deepen and boost contrast */
  background-color: var(--stg-dark);
  overflow: hidden; /* single-viewport — no scroll */
  -webkit-font-smoothing: antialiased;
}

/* Overlay to darken photo enough for text legibility */
body::before {
  content: "";
  position: fixed;
  inset: 0;
  background:
    /* subtle vignette */
    radial-gradient(
      ellipse 110% 100% at 50% 50%,
      transparent 40%,
      rgba(0, 0, 0, 0.55) 100%
    ),
    /* top-to-bottom dark tint */
    linear-gradient(
        180deg,
        rgba(4, 4, 8, 0.45) 0%,
        rgba(4, 4, 8, 0.25) 40%,
        rgba(4, 4, 8, 0.5) 100%
      );
  pointer-events: none;
  z-index: 0;
}

/* (background scene replaced by photo on body + ::before overlay) */

/* ── Keyframes ─────────────────────────────────────────────── */

@keyframes stg_fadeInUp {
  from {
    opacity: 0;
    transform: translateY(28px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes stg_scaleIn {
  from {
    opacity: 0;
    transform: scale(0.88);
  }
  to {
    opacity: 1;
    transform: scale(1);
  }
}

@keyframes stg_orbit {
  from {
    transform: rotate(0deg) translateX(4px) rotate(0deg);
  }
  to {
    transform: rotate(360deg) translateX(4px) rotate(-360deg);
  }
}

@keyframes stg_spin {
  from {
    transform: rotate(0deg);
  }
  to {
    transform: rotate(360deg);
  }
}

@keyframes stg_shake {
  0%,
  100% {
    transform: translateX(0);
  }
  20% {
    transform: translateX(-6px);
  }
  40% {
    transform: translateX(6px);
  }
  60% {
    transform: translateX(-4px);
  }
  80% {
    transform: translateX(4px);
  }
}

@keyframes stg_pulse_ring {
  0% {
    box-shadow: 0 0 0 0 rgba(42, 184, 176, 0.5);
  }
  70% {
    box-shadow: 0 0 0 12px rgba(42, 184, 176, 0);
  }
  100% {
    box-shadow: 0 0 0 0 rgba(42, 184, 176, 0);
  }
}

/* ── Main Layout — single viewport, no scroll ─────────────── */
.stg_wrapper {
  position: relative;
  z-index: 10;
  height: 100dvh; /* exact viewport height */
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 1rem var(--stg-space-md);
  overflow: hidden;
}

/* ── Card — wider, warmer palette, photo-matched ──────────── */
.stg_card {
  width: 100%;
  max-width: 820px;
  /* Warm charcoal glass — picks up the dark earth tones of the photo */
  background: rgba(8, 6, 4, 0.6);
  backdrop-filter: blur(28px) saturate(1.6) brightness(1.05);
  -webkit-backdrop-filter: blur(28px) saturate(1.6) brightness(1.05);
  /* Amber-tinted inner border echoing campfire glow */
  border: 1px solid rgba(220, 130, 30, 0.22);
  border-top-color: rgba(255, 200, 100, 0.18);
  border-radius: var(--stg-radius-lg);
  padding: 2rem 3rem 2.2rem;
  box-shadow:
    0 0 0 1px rgba(255, 255, 255, 0.04) inset,
    0 4px 60px rgba(0, 0, 0, 0.75),
    /* warm amber glow from campfire */ 0 0 80px rgba(200, 100, 10, 0.12),
    /* cool teal accent glow */ 0 0 40px rgba(42, 184, 176, 0.06);
  animation: stg_scaleIn 0.7s var(--stg-ease) both;
  text-align: center;
}

/* ── Logo Area ─────────────────────────────────────────────── */
.stg_logo_wrap {
  margin-bottom: var(--stg-space-md);
  animation: stg_fadeInUp 0.8s var(--stg-ease) 0.1s both;
}

.stg_logo_img {
  width: auto;
  height: 110px;
  object-fit: contain;
  /* Warm amber glow to match campfire in photo */
  filter: drop-shadow(0 4px 20px rgba(220, 130, 20, 0.4))
    drop-shadow(0 0 40px rgba(42, 184, 176, 0.2));
  transition: filter 0.4s var(--stg-ease);
}

.stg_logo_img:hover {
  filter: drop-shadow(0 4px 30px rgba(220, 130, 20, 0.6))
    drop-shadow(0 0 60px rgba(42, 184, 176, 0.3));
}

/* Fallback text logo (when image not loaded) */
.stg_logo_fallback {
  display: none; /* hidden when img loads */
}

.stg_logo_fallback .stg_logo_script {
  font-family: var(--stg-font-script);
  font-size: 3rem;
  color: var(--stg-white);
  line-height: 1;
  display: block;
  text-shadow: 0 0 30px rgba(42, 184, 176, 0.5);
}

.stg_logo_fallback .stg_logo_text {
  font-family: var(--stg-font-display);
  font-size: 1rem;
  letter-spacing: 0.45em;
  color: var(--stg-teal);
  text-transform: uppercase;
  margin-top: 0.25rem;
  display: block;
}

/* ── Divider with stars ────────────────────────────────────── */
.stg_divider {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  margin: 0 auto var(--stg-space-sm);
  width: 80%;
  animation: stg_fadeInUp 0.8s var(--stg-ease) 0.2s both;
}

.stg_divider_line {
  flex: 1;
  height: 1px;
  background: linear-gradient(
    90deg,
    transparent 0%,
    rgba(220, 140, 30, 0.45) 50%,
    transparent 100%
  );
}

.stg_divider_star {
  color: var(--stg-amber);
  font-size: 0.6rem;
  animation: stg_orbit 8s linear infinite;
}

/* ── Headings ──────────────────────────────────────────────── */
.stg_eyebrow {
  font-family: var(--stg-font-display);
  font-size: 0.65rem;
  letter-spacing: 0.3em;
  color: var(--stg-amber);
  text-transform: uppercase;
  margin-bottom: 0.5rem;
  animation: stg_fadeInUp 0.8s var(--stg-ease) 0.25s both;
}

.stg_headline {
  font-family: var(--stg-font-body);
  font-weight: 300;
  font-size: clamp(1.4rem, 3.5vw, 1.85rem);
  line-height: 1.2;
  color: var(--stg-white);
  margin-bottom: 0.4rem;
  animation: stg_fadeInUp 0.8s var(--stg-ease) 0.3s both;
}

.stg_headline strong {
  font-weight: 600;
}

.stg_tagline {
  font-family: var(--stg-font-body);
  font-size: clamp(0.72rem, 2vw, 0.82rem);
  font-weight: 400;
  letter-spacing: 0.06em;
  color: var(--stg-teal-light);
  text-transform: uppercase;
  margin-bottom: var(--stg-space-sm);
  animation: stg_fadeInUp 0.8s var(--stg-ease) 0.35s both;
}

/* ── Description ───────────────────────────────────────────── */
.stg_description {
  font-size: 0.88rem;
  line-height: 1.6;
  color: var(--stg-white-muted);
  margin-bottom: var(--stg-space-md);
  padding: 0 0.25rem;
  animation: stg_fadeInUp 0.8s var(--stg-ease) 0.4s both;
}

.stg_description em {
  color: var(--stg-amber);
  font-style: normal;
  font-weight: 500;
}

/* ── Badge strip ───────────────────────────────────────────── */
.stg_badges {
  display: flex;
  justify-content: center;
  flex-wrap: wrap;
  gap: 0.4rem;
  margin-bottom: var(--stg-space-md);
  animation: stg_fadeInUp 0.8s var(--stg-ease) 0.45s both;
}

.stg_badge {
  display: inline-flex;
  align-items: center;
  gap: 0.3rem;
  padding: 0.25rem 0.7rem;
  /* amber-tinted badge to echo campfire warmth */
  border: 1px solid rgba(220, 140, 30, 0.3);
  border-radius: var(--stg-radius-pill);
  background: rgba(200, 110, 10, 0.1);
  font-size: 0.68rem;
  font-weight: 500;
  letter-spacing: 0.04em;
  color: rgba(255, 200, 130, 0.9);
  transition:
    background 0.25s,
    border-color 0.25s;
}

.stg_badge:hover {
  background: rgba(200, 110, 10, 0.2);
  border-color: rgba(220, 140, 30, 0.55);
}

.stg_badge_dot {
  width: 5px;
  height: 5px;
  border-radius: 50%;
  background: var(--stg-amber);
  flex-shrink: 0;
}

/* ── Form ──────────────────────────────────────────────────── */
.stg_form {
  animation: stg_fadeInUp 0.8s var(--stg-ease) 0.5s both;
}

.stg_form_group {
  position: relative;
  margin-bottom: var(--stg-space-xs);
}

.stg_form_label {
  display: block;
  font-size: 0.72rem;
  font-weight: 500;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: rgba(255, 190, 110, 0.8);
  margin-bottom: 0.35rem;
  text-align: left;
}

.stg_input_wrap {
  position: relative;
}

.stg_input_icon {
  position: absolute;
  left: 1.1rem;
  top: 50%;
  transform: translateY(-50%);
  color: rgba(220, 150, 50, 0.6);
  pointer-events: none;
  transition: color 0.25s;
}

.stg_input {
  width: 100%;
  padding: 0.8rem 3.2rem 0.8rem 3rem !important;
  background: rgba(4, 3, 2, 0.65) !important;
  border: 1.5px solid rgba(200, 120, 30, 0.25) !important;
  border-radius: var(--stg-radius-sm) !important;
  color: var(--stg-white) !important;
  font-family: var(--stg-font-body) !important;
  font-size: 0.95rem !important;
  letter-spacing: 0.08em !important;
  outline: none !important;
  transition:
    border-color 0.25s,
    box-shadow 0.25s,
    background 0.25s;
  -webkit-appearance: none !important;
}

.stg_input::placeholder {
  color: rgba(255, 255, 255, 0.22) !important;
  letter-spacing: 0.1em !important;
  font-size: 0.85rem !important;
}

.stg_input:focus {
  border-color: var(--stg-amber) !important;
  background: rgba(4, 3, 2, 0.8) !important;
  box-shadow:
    0 0 0 3px rgba(220, 130, 20, 0.12),
    0 0 20px rgba(220, 130, 20, 0.1);
}

.stg_input:focus + .stg_input_icon,
.stg_input_wrap:focus-within .stg_input_icon {
  color: var(--stg-amber);
}

/* Password toggle button */
.stg_toggle_pw {
  position: absolute;
  right: 1rem;
  top: 50%;
  transform: translateY(-50%);
  background: none;
  border: none;
  cursor: pointer;
  color: rgba(220, 150, 60, 0.55);
  padding: 0.2rem;
  border-radius: 4px;
  transition: color 0.2s;
  display: flex;
  align-items: center;
  justify-content: center;
}

.stg_toggle_pw:hover {
  color: var(--stg-amber);
}

/* Error state */
.stg_input.stg_input--error {
  border-color: rgba(220, 80, 80, 0.7) !important;
  box-shadow: 0 0 0 3px rgba(220, 80, 80, 0.1) !important;
  animation: stg_shake 0.4s var(--stg-ease) !important;
}

.stg_error_msg {
  display: none;
  font-size: 0.75rem;
  color: #f08080;
  margin-top: 0.4rem;
  text-align: left;
  padding-left: 0.25rem;
}

.stg_error_msg.stg_visible {
  display: block;
}

/* ── Submit Button — amber/campfire tone ──────────────────── */
.stg_btn {
  width: 100%;
  padding: 0.9rem 2rem;
  margin-top: var(--stg-space-sm);
  background: linear-gradient(135deg, #d07a10 0%, #b86008 60%, #9e5006 100%);
  border: none;
  border-radius: var(--stg-radius-sm);
  color: var(--stg-white);
  font-family: var(--stg-font-display);
  font-size: 0.78rem;
  font-weight: 600;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  cursor: pointer;
  position: relative;
  overflow: hidden;
  transition:
    transform 0.2s var(--stg-ease-spring),
    box-shadow 0.3s var(--stg-ease),
    opacity 0.2s;
  box-shadow:
    0 4px 20px rgba(200, 100, 10, 0.45),
    0 1px 0 rgba(255, 255, 255, 0.12) inset;
}

/* Shimmer sweep on hover */
.stg_btn::before {
  content: "";
  position: absolute;
  top: 0;
  left: -100%;
  width: 60%;
  height: 100%;
  background: linear-gradient(
    90deg,
    transparent,
    rgba(255, 255, 255, 0.15),
    transparent
  );
  transition: left 0.5s var(--stg-ease);
}

.stg_btn:hover::before {
  left: 150%;
}

.stg_btn:hover {
  transform: translateY(-2px);
  box-shadow:
    0 8px 30px rgba(200, 100, 10, 0.6),
    0 1px 0 rgba(255, 255, 255, 0.18) inset;
}

.stg_btn:active {
  transform: translateY(0px) scale(0.99);
}

.stg_btn:focus-visible {
  outline: 2px solid var(--stg-amber);
  outline-offset: 3px;
}

/* Pulse ring — amber glow when idle */
@keyframes stg_pulse_ring {
  0% {
    box-shadow:
      0 0 0 0 rgba(200, 100, 10, 0.55),
      0 4px 20px rgba(200, 100, 10, 0.45);
  }
  70% {
    box-shadow:
      0 0 0 12px rgba(200, 100, 10, 0),
      0 4px 20px rgba(200, 100, 10, 0.45);
  }
  100% {
    box-shadow:
      0 0 0 0 rgba(200, 100, 10, 0),
      0 4px 20px rgba(200, 100, 10, 0.45);
  }
}
.stg_btn.stg_pulse {
  animation: stg_pulse_ring 2.5s ease-out infinite;
}

/* Loading state */
.stg_btn.stg_btn--loading {
  pointer-events: none;
  opacity: 0.8;
}

.stg_btn_inner {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  position: relative;
  z-index: 1;
}

.stg_btn_icon {
  font-size: 0.9rem;
  transition: transform 0.3s var(--stg-ease-spring);
}

.stg_btn:hover .stg_btn_icon {
  transform: translateX(3px);
}

.stg_spinner {
  display: none;
  width: 16px;
  height: 16px;
  border: 2px solid rgba(255, 255, 255, 0.3);
  border-top-color: #fff;
  border-radius: 50%;
  animation: stg_spin 0.7s linear infinite;
}

.stg_btn--loading .stg_spinner {
  display: inline-block;
}

.stg_btn--loading .stg_btn_text,
.stg_btn--loading .stg_btn_icon {
  display: none;
}

/* ── Footer note ───────────────────────────────────────────── */
.stg_footer_note {
  margin-top: var(--stg-space-sm);
  font-size: 0.7rem;
  color: rgba(255, 255, 255, 0.3);
  line-height: 1.5;
  animation: stg_fadeInUp 0.8s var(--stg-ease) 0.6s both;
}

.stg_footer_note a {
  color: rgba(220, 150, 60, 0.6);
  text-decoration: none;
  transition: color 0.2s;
}

.stg_footer_note a:hover {
  color: var(--stg-amber);
}

/* ── Success overlay ───────────────────────────────────────── */
.stg_success {
  display: none;
  flex-direction: column;
  align-items: center;
  gap: 1rem;
  padding: 1rem 0;
  animation: stg_scaleIn 0.5s var(--stg-ease-spring) both;
}

.stg_success.stg_visible {
  display: flex;
}

.stg_success_icon {
  width: 64px;
  height: 64px;
  border-radius: 50%;
  background: rgba(200, 110, 10, 0.18);
  border: 2px solid var(--stg-amber);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.8rem;
  animation: stg_pulse_ring 1.5s ease-out 2;
}

.stg_success_title {
  font-family: var(--stg-font-display);
  font-size: 1rem;
  letter-spacing: 0.15em;
  color: var(--stg-amber);
  text-transform: uppercase;
}

.stg_success_text {
  font-size: 0.88rem;
  color: var(--stg-white-muted);
  text-align: center;
}

/* ── Floating particles ────────────────────────────────────── */
.stg_particles {
  position: fixed;
  inset: 0;
  z-index: 1;
  pointer-events: none;
  overflow: hidden;
}

.stg_particle {
  position: absolute;
  border-radius: 50%;
  background: var(--stg-amber);
  opacity: 0;
  animation: stg_float_up linear infinite;
}

@keyframes stg_float_up {
  0% {
    opacity: 0;
    transform: translateY(0) scale(0);
  }
  10% {
    opacity: 0.6;
  }
  90% {
    opacity: 0.2;
  }
  100% {
    opacity: 0;
    transform: translateY(-90vh) scale(1.5);
  }
}

/* ── Responsive ────────────────────────────────────────────── */
@media (max-width: 860px) {
  .stg_card {
    max-width: 96vw;
    padding: 1.6rem 2rem 1.8rem;
  }
}

@media (max-width: 600px) {
  .stg_wrapper {
    padding: 0.5rem;
  }

  .stg_card {
    padding: 1.4rem 1.2rem 1.6rem;
    border-radius: var(--stg-radius-md);
  }

  .stg_logo_img {
    height: 80px;
  }

  .stg_logo_fallback .stg_logo_script {
    font-size: 2.2rem;
  }

  .stg_tagline {
    font-size: 0.68rem;
    letter-spacing: 0.04em;
  }

  .stg_badges {
    gap: 0.3rem;
  }

  .stg_badge {
    font-size: 0.62rem;
    padding: 0.2rem 0.5rem;
  }

  .stg_headline {
    font-size: 1.3rem;
  }
}

@media (max-width: 380px) {
  .stg_card {
    padding: 1.2rem 1rem 1.4rem;
  }

  .stg_headline {
    font-size: 1.2rem;
  }
}

/* ── Reduced motion ────────────────────────────────────────── */
@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
}
