/* ==========================================================================
   Modern "Coming Soon" Page Stylesheet
   Theme: Golden Yellow (#FFCC00 / #FFD700) with Warm Cream & Charcoal
   Fully Responsive for All Devices (Mobile, Foldables, Tablets, Desktops, Landscape)
   ========================================================================== */

/* --- CSS Variables / Design Tokens --- */
:root {
  /* Yellow Theme Palette */
  --primary-yellow: #FFCC00;
  --primary-gold: #FFB800;
  --primary-yellow-light: #FFF4A3;
  --primary-yellow-subtle: #FFF9D6;
  --primary-yellow-glow: rgba(255, 184, 0, 0.35);
  
  /* Background & Surface Accents */
  --bg-base: #FCF9F0;
  --bg-gradient-top: #FFFDF5;
  --bg-gradient-bottom: #FBF4DE;
  --card-bg: rgba(255, 255, 255, 0.90);
  --card-border: rgba(255, 204, 0, 0.35);
  --input-bg: #FFFFFF;
  --input-border: #E8DFCE;
  --input-focus-border: #FFB800;

  /* Charcoal / Text Contrast */
  --text-primary: #17191E;
  --text-secondary: #525866;
  --text-muted: #848B99;
  --text-badge: #855800;

  /* Status Colors */
  --success-bg: #EBFBEE;
  --success-text: #1B7A33;
  --success-border: #A6E7B4;
  --error-bg: #FEECEB;
  --error-text: #B42318;
  --error-border: #FECDCA;

  /* Shadows */
  --shadow-card: 0 24px 70px -12px rgba(230, 160, 0, 0.16), 0 8px 30px rgba(0, 0, 0, 0.04);
  --shadow-button: 0 10px 25px -4px rgba(255, 184, 0, 0.5), 0 4px 10px rgba(0, 0, 0, 0.05);
  --shadow-button-hover: 0 14px 30px -2px rgba(255, 184, 0, 0.65), 0 6px 14px rgba(0, 0, 0, 0.08);

  /* Typography & Sizing */
  --font-main: 'Plus Jakarta Sans', system-ui, -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  --radius-card: 32px;
  --radius-pill: 9999px;
  --radius-input: 16px;
  --transition-smooth: all 0.3s cubic-bezier(0.16, 1, 0.3, 1);
}

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

html {
  width: 100%;
  height: 100%;
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
}

body {
  width: 100%;
  min-height: 100vh;
  min-height: 100dvh;
  font-family: var(--font-main);
  background: radial-gradient(circle at 50% 20%, var(--bg-gradient-top) 0%, var(--bg-gradient-bottom) 100%);
  color: var(--text-primary);
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: clamp(16px, 3vh, 32px) clamp(12px, 3vw, 24px);
}

/* --- Animated Canvas Background Particles --- */
#particle-canvas {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
  z-index: 0;
}

/* --- Soft Glowing Ambient Orbs --- */
.glow-orb {
  position: fixed;
  border-radius: 50%;
  filter: blur(80px);
  pointer-events: none;
  z-index: 0;
  opacity: 0.55;
  animation: floatOrb 14s ease-in-out infinite alternate;
}

.orb-1 {
  width: clamp(280px, 35vw, 440px);
  height: clamp(280px, 35vw, 440px);
  background: radial-gradient(circle, rgba(255, 215, 0, 0.32) 0%, rgba(255, 184, 0, 0) 70%);
  top: -80px;
  left: 5%;
}

.orb-2 {
  width: clamp(300px, 40vw, 500px);
  height: clamp(300px, 40vw, 500px);
  background: radial-gradient(circle, rgba(255, 204, 0, 0.28) 0%, rgba(255, 160, 0, 0) 70%);
  bottom: -100px;
  right: 5%;
  animation-delay: -5s;
}

.orb-3 {
  width: clamp(220px, 25vw, 320px);
  height: clamp(220px, 25vw, 320px);
  background: radial-gradient(circle, rgba(255, 230, 100, 0.22) 0%, rgba(255, 190, 0, 0) 70%);
  top: 35%;
  left: 70%;
  animation-delay: -9s;
}

@keyframes floatOrb {
  0% { transform: translate(0, 0) scale(1); }
  50% { transform: translate(25px, -20px) scale(1.08); }
  100% { transform: translate(-20px, 15px) scale(0.95); }
}

/* --- Main Layout Container --- */
.main-container {
  position: relative;
  z-index: 1;
  width: 100%;
  max-width: 660px;
  margin: auto;
  display: flex;
  justify-content: center;
  align-items: center;
}

/* --- Glassmorphism Card Wrapper --- */
.card-wrapper {
  width: 100%;
  background: var(--card-bg);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border: 1.5px solid var(--card-border);
  border-radius: var(--radius-card);
  box-shadow: var(--shadow-card);
  padding: clamp(28px, 5.5vw, 52px) clamp(18px, 4.5vw, 44px);
  text-align: center;
  display: flex;
  flex-direction: column;
  align-items: center;
  position: relative;
  transition: transform 0.4s cubic-bezier(0.16, 1, 0.3, 1), box-shadow 0.4s ease;
}

/* --- Status Badge --- */
.status-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex-wrap: wrap;
  gap: 8px;
  max-width: 100%;
  background: var(--primary-yellow-subtle);
  border: 1px solid rgba(255, 184, 0, 0.5);
  color: var(--text-badge);
  font-size: clamp(0.725rem, 2vw, 0.825rem);
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  padding: 6px 14px;
  border-radius: var(--radius-pill);
  margin-bottom: clamp(16px, 3vh, 24px);
  box-shadow: 0 2px 8px rgba(255, 184, 0, 0.12);
  line-height: 1.3;
}

.badge-dot {
  width: 8px;
  height: 8px;
  min-width: 8px;
  background-color: #E69500;
  border-radius: 50%;
  position: relative;
}

.badge-dot::after {
  content: '';
  position: absolute;
  top: -3px;
  left: -3px;
  right: -3px;
  bottom: -3px;
  border-radius: 50%;
  background-color: #FFB800;
  opacity: 0.7;
  animation: pulseDot 2s cubic-bezier(0.4, 0, 0.6, 1) infinite;
}

@keyframes pulseDot {
  0%, 100% { transform: scale(1); opacity: 0.7; }
  50% { transform: scale(2.2); opacity: 0; }
}

/* --- Illustration Container & Animations --- */
.illustration-container {
  position: relative;
  width: clamp(160px, 28vw, 220px);
  height: clamp(160px, 28vw, 220px);
  margin: 0 auto clamp(14px, 2.5vh, 22px);
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  touch-action: manipulation;
}

.illustration-halo {
  position: absolute;
  width: 80%;
  height: 80%;
  background: radial-gradient(circle, rgba(255, 204, 0, 0.38) 0%, rgba(255, 184, 0, 0) 70%);
  border-radius: 50%;
  z-index: 0;
  animation: pulseHalo 4s ease-in-out infinite alternate;
}

@keyframes pulseHalo {
  0% { transform: scale(0.9); opacity: 0.5; }
  100% { transform: scale(1.2); opacity: 0.9; }
}

.worker-svg {
  width: 100%;
  height: 100%;
  position: relative;
  z-index: 1;
  filter: drop-shadow(0 12px 20px rgba(230, 160, 0, 0.15));
  transition: transform 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

.illustration-container:hover .worker-svg {
  transform: scale(1.05) translateY(-4px);
}

/* Gear Animations */
.gear-large {
  transform-origin: 42px 52px;
  animation: spinClockwise 16s linear infinite;
}

.gear-small {
  transform-origin: 195px 95px;
  animation: spinCounter 12s linear infinite;
}

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

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

/* Worker Gentle Breathing / Floating */
.worker-character {
  animation: workerFloat 4.5s ease-in-out infinite alternate;
}

@keyframes workerFloat {
  0% { transform: translateY(0); }
  100% { transform: translateY(-5px); }
}

/* Animated Wrench Tilt */
.wrench-tilt {
  transform-origin: 0px 40px;
  animation: wrenchRock 3s ease-in-out infinite alternate;
}

@keyframes wrenchRock {
  0% { transform: rotate(-8deg); }
  100% { transform: rotate(18deg); }
}

/* Sparkles animation */
.sparkle {
  animation: sparkleTwinkle 2.5s ease-in-out infinite alternate;
}

.sp-1 { animation-delay: 0.2s; }
.sp-2 { animation-delay: 0.9s; }
.sp-3 { animation-delay: 1.5s; }
.sp-4 { animation-delay: 0.6s; }

@keyframes sparkleTwinkle {
  0% { transform: scale(0.6) rotate(0deg); opacity: 0.3; }
  50% { transform: scale(1.15) rotate(45deg); opacity: 1; }
  100% { transform: scale(0.6) rotate(90deg); opacity: 0.3; }
}

/* --- Content Header & Typography --- */
.content-header {
  margin-bottom: clamp(20px, 3.5vh, 32px);
  width: 100%;
}

.main-title {
  font-size: clamp(2.1rem, 6vw, 3.3rem);
  font-weight: 800;
  line-height: 1.15;
  color: var(--text-primary);
  letter-spacing: -0.03em;
  margin-bottom: clamp(8px, 1.5vh, 14px);
  word-break: break-word;
}

.highlight-text {
  background: linear-gradient(135deg, #FFB800 0%, #FF9500 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  display: inline-block;
  position: relative;
}

.highlight-text::after {
  content: '';
  position: absolute;
  bottom: 2px;
  left: 0;
  width: 100%;
  height: 6px;
  background: var(--primary-yellow-light);
  z-index: -1;
  border-radius: 4px;
  opacity: 0.7;
}

.subtitle {
  font-size: clamp(0.95rem, 2.4vw, 1.15rem);
  font-weight: 500;
  color: var(--text-secondary);
  line-height: 1.6;
  max-width: 480px;
  margin: 0 auto;
}

/* --- Newsletter Form --- */
.form-section {
  width: 100%;
  max-width: 520px;
  margin-bottom: 0;
}

.subscribe-form {
  display: flex;
  align-items: stretch;
  gap: 10px;
  background: #FFFFFF;
  padding: 6px;
  border: 1.5px solid var(--input-border);
  border-radius: var(--radius-pill);
  box-shadow: 0 4px 18px rgba(0, 0, 0, 0.04);
  transition: var(--transition-smooth);
  width: 100%;
}

.subscribe-form:focus-within {
  border-color: var(--input-focus-border);
  box-shadow: 0 0 0 4px var(--primary-yellow-glow), 0 8px 24px rgba(255, 184, 0, 0.15);
}

.input-wrapper {
  position: relative;
  flex: 1;
  display: flex;
  align-items: center;
  min-width: 0;
}

.input-icon {
  position: absolute;
  left: 16px;
  width: 20px;
  height: 20px;
  color: var(--text-muted);
  pointer-events: none;
  transition: color 0.2s ease;
  flex-shrink: 0;
}

.subscribe-form:focus-within .input-icon {
  color: var(--primary-gold);
}

.email-input {
  width: 100%;
  height: 48px;
  padding: 0 16px 0 46px;
  border: none;
  background: transparent;
  font-family: inherit;
  font-size: 1rem;
  font-weight: 500;
  color: var(--text-primary);
  outline: none;
  -webkit-appearance: none;
}

.email-input::placeholder {
  color: var(--text-muted);
  font-weight: 400;
}

/* Primary Notify Button */
.btn-primary {
  position: relative;
  background: linear-gradient(135deg, #FFD700 0%, #FFB800 100%);
  color: #1A1D24;
  border: none;
  outline: none;
  font-family: inherit;
  font-size: 0.975rem;
  font-weight: 700;
  padding: 0 26px;
  border-radius: var(--radius-pill);
  cursor: pointer;
  box-shadow: var(--shadow-button);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 48px;
  transition: var(--transition-smooth);
  white-space: nowrap;
  flex-shrink: 0;
  touch-action: manipulation;
}

.btn-primary:hover {
  transform: translateY(-2px);
  box-shadow: var(--shadow-button-hover);
  background: linear-gradient(135deg, #FFE033 0%, #FFA800 100%);
}

.btn-primary:active {
  transform: translateY(0);
  box-shadow: 0 4px 12px rgba(255, 184, 0, 0.4);
}

.btn-content {
  display: flex;
  align-items: center;
  gap: 6px;
  transition: opacity 0.2s ease;
}

.btn-arrow {
  width: 16px;
  height: 16px;
  transition: transform 0.25s ease;
  flex-shrink: 0;
}

.btn-primary:hover .btn-arrow {
  transform: translateX(4px);
}

/* Loading State for Button */
.btn-loader {
  position: absolute;
  display: none;
  align-items: center;
  justify-content: center;
}

.btn-primary.loading .btn-content {
  opacity: 0;
  visibility: hidden;
}

.btn-primary.loading .btn-loader {
  display: flex;
}

.btn-primary.loading {
  pointer-events: none;
}

.spinner {
  width: 22px;
  height: 22px;
  animation: spin 0.8s linear infinite;
}

.spinner-track {
  stroke: rgba(0, 0, 0, 0.15);
}

.spinner-head {
  stroke: #1A1D24;
  stroke-dasharray: 40;
  stroke-dashoffset: 20;
}

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

/* Form Feedback Alerts */
.form-feedback {
  margin-top: 14px;
  padding: 12px 18px;
  border-radius: 14px;
  font-size: 0.9rem;
  font-weight: 600;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  animation: slideDown 0.3s cubic-bezier(0.16, 1, 0.3, 1) forwards;
  word-break: break-word;
  line-height: 1.4;
}

@keyframes slideDown {
  from { opacity: 0; transform: translateY(-8px); }
  to { opacity: 1; transform: translateY(0); }
}

.form-feedback.success {
  background-color: var(--success-bg);
  color: var(--success-text);
  border: 1px solid var(--success-border);
}

.form-feedback.error {
  background-color: var(--error-bg);
  color: var(--error-text);
  border: 1px solid var(--error-border);
}

/* ==========================================================================
   Responsive Breakpoints
   ========================================================================== */

/* --- Tablet / Medium Devices (<= 768px) --- */
@media (max-width: 768px) {
  .card-wrapper {
    padding: clamp(26px, 5vw, 40px) clamp(18px, 4vw, 32px);
    border-radius: 28px;
  }
}

/* --- Mobile Smartphones (<= 600px) --- */
@media (max-width: 600px) {
  body {
    padding: 16px 12px;
    align-items: center;
  }

  .main-container {
    width: 100%;
  }

  .card-wrapper {
    padding: 30px 18px;
    border-radius: 24px;
  }

  .illustration-container {
    width: 175px;
    height: 175px;
    margin-bottom: 16px;
  }

  /* Ergonomic full-width vertical stack on mobile */
  .subscribe-form {
    flex-direction: column;
    background: transparent;
    padding: 0;
    border: none;
    box-shadow: none;
    gap: 12px;
  }

  .input-wrapper {
    background: #FFFFFF;
    border: 1.5px solid var(--input-border);
    border-radius: var(--radius-pill);
    box-shadow: 0 4px 14px rgba(0, 0, 0, 0.04);
  }

  .email-input {
    height: 50px;
    font-size: 1rem; /* >= 16px prevents iOS Safari auto-zoom */
  }

  .btn-primary {
    width: 100%;
    height: 50px;
    font-size: 1.02rem;
  }
}

/* --- Extra Small Screens (<= 375px e.g. iPhone SE, Galaxy Fold outer screen) --- */
@media (max-width: 375px) {
  body {
    padding: 12px 8px;
  }

  .card-wrapper {
    padding: 24px 14px;
    border-radius: 20px;
  }

  .illustration-container {
    width: 145px;
    height: 145px;
    margin-bottom: 12px;
  }

  .status-badge {
    font-size: 0.72rem;
    padding: 5px 10px;
  }

  .main-title {
    font-size: 1.85rem;
  }

  .subtitle {
    font-size: 0.9rem;
  }

  .email-input {
    padding-left: 40px;
  }

  .input-icon {
    left: 12px;
  }
}

/* --- Short Height Viewports / Landscape Mobile (max-height: 650px) --- */
@media (max-height: 650px) {
  body {
    padding: 12px 10px;
    align-items: center;
  }

  .card-wrapper {
    padding: 20px 24px;
    border-radius: 20px;
  }

  .status-badge {
    margin-bottom: 10px;
    padding: 4px 12px;
  }

  .illustration-container {
    width: 120px;
    height: 120px;
    margin-bottom: 10px;
  }

  .content-header {
    margin-bottom: 16px;
  }

  .main-title {
    font-size: 2rem;
    margin-bottom: 4px;
  }

  .subtitle {
    font-size: 0.92rem;
  }

  .form-section {
    margin-top: 0;
  }
}

/* --- Landscape Mode on Smartphones (orientation: landscape and max-height: 500px) --- */
@media (orientation: landscape) and (max-height: 500px) {
  body {
    padding: 10px;
  }

  .card-wrapper {
    padding: 16px 24px;
    max-width: 600px;
  }

  .illustration-container {
    width: 90px;
    height: 90px;
    margin-bottom: 8px;
  }

  .status-badge {
    display: none; /* Hide status badge on ultra-short landscape to conserve vertical space */
  }

  .main-title {
    font-size: 1.7rem;
    margin-bottom: 4px;
  }

  .subtitle {
    font-size: 0.85rem;
  }

  .subscribe-form {
    flex-direction: row;
    background: #FFFFFF;
    border: 1.5px solid var(--input-border);
    border-radius: var(--radius-pill);
    padding: 4px;
  }

  .email-input {
    height: 40px;
  }

  .btn-primary {
    width: auto;
    height: 40px;
    padding: 0 20px;
  }
}

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