/* Custom Design System for Alfa Refractories */
:root {
  --bg-color: #121212;
  --bg-accent: #1C1E22;
  --text-primary: #FFFFFF;
  --text-secondary: #94A3B8;
  
  /* Brand Theme: Orange & Black */
  --primary: #F15A24; /* Alfa Lava Orange */
  --primary-hover: #D44210;
  --primary-glow: rgba(241, 90, 36, 0.25);
  
  /* Glassmorphism/Dark Settings */
  --card-bg: rgba(28, 30, 34, 0.6);
  --card-border: rgba(255, 255, 255, 0.05);
  
  /* Transitions */
  --transition-smooth: all 0.4s cubic-bezier(0.16, 1, 0.3, 1);
  --transition-fast: all 0.2s ease;
}

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

html {
  font-size: 16px;
  scroll-behavior: smooth;
  height: -webkit-fill-available;
}

body {
  font-family: 'Outfit', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  background-color: var(--bg-color);
  color: var(--text-primary);
  line-height: 1.6;
  overflow-x: hidden;
  min-height: 100vh;
  min-height: -webkit-fill-available;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  position: relative;
}

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

/* Ambient Background Orbs */
.ambient-orbs {
  position: fixed;
  top: 0;
  left: 0;
  width: 100vw;
  height: 100vh;
  z-index: -1;
  overflow: hidden;
  pointer-events: none;
  background: radial-gradient(circle at 50% 50%, rgba(28, 30, 34, 0.8) 0%, #121212 100%);
}

.orb {
  position: absolute;
  border-radius: 50%;
  filter: blur(120px);
  mix-blend-mode: screen;
  opacity: 0.2;
  animation: floatOrb 20s infinite alternate ease-in-out;
}

.orb-orange {
  top: -15%;
  right: -10%;
  width: min(600px, 80vw);
  height: min(600px, 80vw);
  background: radial-gradient(circle, rgba(241, 90, 36, 0.4) 0%, rgba(241, 90, 36, 0) 70%);
}

.orb-dark {
  bottom: -20%;
  left: -10%;
  width: min(500px, 70vw);
  height: min(500px, 70vw);
  background: radial-gradient(circle, rgba(241, 90, 36, 0.15) 0%, rgba(241, 90, 36, 0) 75%);
  animation-delay: -5s;
}

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

/* Page Container */
.container {
  width: 100%;
  max-width: 1200px;
  min-height: 100vh;
  padding: 3rem 1.5rem;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  align-items: center;
  position: relative;
  z-index: 10;
}

/* Main Content Wrapper */
.main-content {
  flex: 1;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  text-align: center;
  max-width: 750px;
  width: 100%;
  margin: 2rem 0;
  opacity: 0;
  transform: translateY(20px);
  animation: fadeInContent 1s forwards cubic-bezier(0.16, 1, 0.3, 1);
}

@keyframes fadeInContent {
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* Logo Sizing & Animation */
.logo-wrapper {
  margin-bottom: 2.5rem;
}

.brand-logo {
  max-width: 220px;
  height: auto;
  transition: var(--transition-smooth);
  filter: drop-shadow(0 4px 20px rgba(0, 0, 0, 0.4));
}

.brand-logo:hover {
  transform: scale(1.03);
}

/* Text Section */
.intro {
  margin-bottom: 3rem;
}

.badge {
  display: inline-block;
  font-size: 0.8rem;
  font-weight: 700;
  letter-spacing: 0.25em;
  padding: 0.5rem 1.5rem;
  background: rgba(241, 90, 36, 0.08);
  border: 1px solid rgba(241, 90, 36, 0.2);
  border-radius: 9999px;
  color: var(--primary);
  margin-bottom: 1.75rem;
  box-shadow: 0 0 15px rgba(241, 90, 36, 0.05);
}

.title {
  font-weight: 800;
  font-size: clamp(2.25rem, 5vw, 3.75rem);
  line-height: 1.2;
  letter-spacing: -0.01em;
  margin-bottom: 1.5rem;
}

.accent-text {
  color: var(--primary);
}

.subtitle {
  font-size: clamp(1rem, 2vw, 1.15rem);
  color: var(--text-secondary);
  max-width: 580px;
  margin: 0 auto;
  font-weight: 300;
}

/* Subscription Form Area */
.subscription-section {
  width: 100%;
  max-width: 500px;
  margin: 0 auto;
}

.subscribe-form {
  width: 100%;
}

.input-wrapper {
  position: relative;
  display: flex;
  background: var(--bg-accent);
  border: 1px solid var(--card-border);
  border-radius: 8px;
  padding: 0.375rem;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.3);
  transition: var(--transition-smooth);
}

.input-wrapper:focus-within {
  border-color: var(--primary);
  box-shadow: 0 0 20px var(--primary-glow);
}

.email-input {
  flex: 1;
  background: transparent;
  border: none;
  padding: 0.875rem 1.25rem;
  color: var(--text-primary);
  font-size: 0.95rem;
  font-family: inherit;
  width: 100%;
  outline: none;
}

.email-input::placeholder {
  color: rgba(148, 163, 184, 0.5);
}

.subscribe-btn {
  background-color: var(--primary);
  color: var(--text-primary);
  border: none;
  padding: 0.875rem 1.75rem;
  border-radius: 6px;
  font-weight: 600;
  font-size: 0.95rem;
  font-family: inherit;
  cursor: pointer;
  transition: var(--transition-smooth);
  display: flex;
  align-items: center;
  justify-content: center;
  min-width: 120px;
  position: relative;
  overflow: hidden;
  box-shadow: 0 4px 12px rgba(241, 90, 36, 0.25);
}

.subscribe-btn:hover {
  background-color: var(--primary-hover);
  transform: translateY(-1px);
  box-shadow: 0 6px 18px rgba(241, 90, 36, 0.4);
}

.subscribe-btn:active {
  transform: translateY(1px);
}

/* Button Status Animations */
.btn-loader {
  display: none;
  width: 1.25rem;
  height: 1.25rem;
  border: 2px solid rgba(255, 255, 255, 0.3);
  border-top-color: #fff;
  border-radius: 50%;
  animation: spin 0.8s linear infinite;
  position: absolute;
}

.btn-success-icon {
  display: none;
  font-size: 1.2rem;
  position: absolute;
  transform: scale(0);
  transition: transform 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

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

/* Active states for submit feedback */
.subscribe-btn.loading .btn-text {
  opacity: 0;
}
.subscribe-btn.loading .btn-loader {
  display: block;
}

.subscribe-btn.success {
  background: #10b981;
  box-shadow: 0 4px 15px rgba(16, 185, 129, 0.3);
}
.subscribe-btn.success:hover {
  background: #059669;
}
.subscribe-btn.success .btn-text,
.subscribe-btn.success .btn-loader {
  display: none;
}
.subscribe-btn.success .btn-success-icon {
  display: block;
  transform: scale(1);
}

/* Validation Feedback message */
.form-feedback {
  font-size: 0.85rem;
  margin-top: 0.75rem;
  min-height: 1.25rem;
  transition: var(--transition-fast);
  opacity: 0;
  transform: translateY(-5px);
  font-weight: 500;
}

.form-feedback.visible {
  opacity: 1;
  transform: translateY(0);
}

.form-feedback.success-msg {
  color: #34d399;
}

.form-feedback.error-msg {
  color: #f87171;
}

/* Footer Details */
.footer {
  width: 100%;
  display: flex;
  justify-content: center;
  margin-top: 2rem;
}

.copyright {
  font-size: 0.8rem;
  color: rgba(148, 163, 184, 0.35);
  letter-spacing: 0.02em;
}

.email-input:focus-visible,
.subscribe-btn:focus-visible {
  outline: 2px solid var(--primary);
  outline-offset: 4px;
}

/* Responsive Breakpoints */
@media (max-width: 768px) {
  .container {
    padding: 2.5rem 1rem;
  }
  
  .intro {
    margin-bottom: 2.5rem;
  }

  .brand-logo {
    max-width: 190px;
  }
}

@media (max-width: 480px) {
  .input-wrapper {
    flex-direction: column;
    background: transparent;
    border: none;
    border-radius: 0;
    gap: 0.75rem;
    padding: 0;
    box-shadow: none;
  }
  
  .email-input {
    background: var(--bg-accent);
    border: 1px solid var(--card-border);
    border-radius: 8px;
    padding: 1rem 1.25rem;
    box-shadow: 0 10px 20px rgba(0, 0, 0, 0.2);
  }
  
  .email-input:focus {
    border-color: var(--primary);
  }
  
  .subscribe-btn {
    width: 100%;
    padding: 1rem;
    border-radius: 8px;
  }
}
