/* === VavaStone Brand Tokens === */
:root {
  --primary-400: #3C89CD;
  --primary-500: #2A7AC4;
  --primary-600: #0364B1;
  --bg-dark: #0A0F1A;
  --bg-dark-alt: #111827;
  --surface: #1E293B;
  --border-dark: #334155;
  --text-light: #F1F5F9;
  --text-muted: #94A3B8;
  --success: #10B981;
  --danger: #EF4444;
  --radius-md: 0.75rem;
  --radius-lg: 1rem;
}

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

html {
  font-size: 16px;
  -webkit-text-size-adjust: 100%;
}

body {
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  background: var(--bg-dark);
  color: var(--text-light);
  min-height: 100dvh;
  -webkit-font-smoothing: antialiased;
}

/* === Layout === */
.container {
  max-width: 480px;
  margin: 0 auto;
  padding: 24px 20px 40px;
}

.hidden {
  display: none !important;
}

/* === Offer Banner === */
.offer-banner {
  text-align: center;
  margin-bottom: 36px;
}

.logo-img {
  height: 32px;
  width: auto;
  margin-bottom: 28px;
}

/* --- Hero Offer --- */
.offer-hero {
  margin-bottom: 8px;
}

.offer-free {
  display: block;
  font-size: 2.5rem;
  font-weight: 700;
  letter-spacing: -0.03em;
  line-height: 1.1;
  background: linear-gradient(135deg, #4DA3FF, #3C89CD, #2A7AC4);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.offer-free-accent {
  font-size: 3rem;
  background: linear-gradient(135deg, #FBBF24, #F59E0B);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.offer-sub {
  margin-top: 12px;
  font-size: 0.85rem;
  font-weight: 400;
  color: var(--text-muted);
  letter-spacing: 0.01em;
}

.offer-tagline {
  margin-top: 14px;
  font-size: 0.9rem;
  color: var(--text-muted);
  font-weight: 400;
}

/* === Form === */
form {
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.field {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.field-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
}

.field-row-location {
  grid-template-columns: 1fr 64px 64px;
}

label {
  font-size: 0.75rem;
  font-weight: 500;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.req {
  color: var(--primary-400);
}

.optional {
  font-weight: 400;
  color: var(--border-dark);
  text-transform: none;
  letter-spacing: normal;
  font-size: 0.7rem;
}

input, textarea {
  width: 100%;
  padding: 12px 14px;
  font-family: inherit;
  font-size: 1rem;
  color: var(--bg-dark);
  background: #efeee8;
  border: 1.5px solid var(--border-dark);
  border-radius: var(--radius-md);
  outline: none;
  transition: border-color 0.15s, box-shadow 0.15s;
  -webkit-appearance: none;
}

input:focus, textarea:focus {
  border-color: var(--primary-500);
  box-shadow: 0 0 0 3px rgba(42, 122, 196, 0.15);
}

input.invalid, textarea.invalid {
  border-color: var(--danger);
  box-shadow: 0 0 0 3px rgba(239, 68, 68, 0.12);
}

textarea {
  resize: vertical;
  min-height: 56px;
}

::placeholder {
  color: #475569;
}

/* === Error Message === */
.form-error {
  padding: 10px 14px;
  background: rgba(239, 68, 68, 0.1);
  border: 1px solid rgba(239, 68, 68, 0.25);
  border-radius: var(--radius-md);
  color: #FCA5A5;
  font-size: 0.875rem;
  font-weight: 500;
}

/* === Submit Button === */
.btn-submit {
  width: 100%;
  padding: 16px;
  font-family: inherit;
  font-size: 1.1rem;
  font-weight: 600;
  color: white;
  background: linear-gradient(135deg, var(--primary-400), var(--primary-600));
  border: none;
  border-radius: var(--radius-md);
  cursor: pointer;
  transition: opacity 0.15s, transform 0.1s, box-shadow 0.15s;
  -webkit-tap-highlight-color: transparent;
  margin-top: 10px;
  box-shadow: 0 4px 20px rgba(3, 100, 177, 0.35), 0 0 40px rgba(60, 137, 205, 0.1);
}

.btn-submit:hover {
  opacity: 0.92;
  box-shadow: 0 6px 28px rgba(3, 100, 177, 0.45), 0 0 60px rgba(60, 137, 205, 0.15);
}

.btn-submit:active {
  transform: scale(0.985);
}

.btn-submit:disabled {
  background: var(--border-dark);
  cursor: not-allowed;
  transform: none;
  box-shadow: none;
}

.btn-submit.loading {
  position: relative;
  color: transparent;
}

.btn-submit.loading::after {
  content: '';
  position: absolute;
  top: 50%;
  left: 50%;
  width: 22px;
  height: 22px;
  margin: -11px 0 0 -11px;
  border: 2.5px solid rgba(255,255,255,0.3);
  border-top-color: white;
  border-radius: 50%;
  animation: spin 0.6s linear infinite;
}

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

/* === Success View === */
.success {
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 100dvh;
  text-align: center;
}

.success-content {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 12px;
}

.success-icon {
  margin-bottom: 8px;
  animation: pop 0.4s cubic-bezier(0.34, 1.56, 0.64, 1);
}

@keyframes pop {
  0% { transform: scale(0); opacity: 0; }
  100% { transform: scale(1); opacity: 1; }
}

.success h2 {
  font-size: 1.75rem;
  font-weight: 700;
  color: white;
}

.success-sub {
  font-size: 1rem;
  color: var(--text-muted);
}

.success-company {
  font-size: 0.875rem;
  font-weight: 500;
  color: var(--border-dark);
}

.success-countdown {
  font-size: 0.8rem;
  color: var(--border-dark);
  margin-top: 8px;
}

.btn-new {
  margin-top: 16px;
  padding: 10px 24px;
  font-family: inherit;
  font-size: 0.875rem;
  font-weight: 500;
  color: var(--primary-400);
  background: transparent;
  border: 1.5px solid var(--border-dark);
  border-radius: var(--radius-md);
  cursor: pointer;
  transition: border-color 0.15s;
  -webkit-tap-highlight-color: transparent;
}

.btn-new:hover {
  border-color: var(--primary-400);
}

/* === Sync Badge === */
.sync-badge {
  position: fixed;
  top: 12px;
  right: 12px;
  padding: 6px 12px;
  font-size: 0.75rem;
  font-weight: 600;
  color: #FDE68A;
  background: rgba(251, 191, 36, 0.1);
  border: 1px solid rgba(251, 191, 36, 0.2);
  border-radius: 20px;
  z-index: 100;
  animation: fadeIn 0.3s ease;
}

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

/* === Responsive === */
@media (max-width: 480px) {
  .field-row-location {
    grid-template-columns: 1fr 56px 56px;
  }
}

@media (max-width: 380px) {
  .offer-free {
    font-size: 2rem;
  }
  .field-row-location {
    grid-template-columns: 1fr 50px 50px;
  }
}
