/* ============================================
   Suite Deal - Shared Design System
   Matches Flutter app AppColors & design tokens
   ============================================ */

:root {
  /* Primary colors */
  --purple: #A855F7;
  --pink: #EC4899;
  --blue: #3B82F6;
  --teal: #14B8A6;

  /* Purple shades */
  --purple50: #FAF5FF;
  --purple200: #E9D5FF;
  --purple-dark: #7C3AED;

  /* Blue shades */
  --blue50: #EFF6FF;
  --blue200: #BFDBFE;
  --blue-dark: #2563EB;

  /* Teal shades */
  --teal50: #F0FDFA;

  /* Green shades */
  --green: #4ADE80;
  --green50: #F0FDF4;
  --green-dark: #10B981;
  --green-light: #D1FAE5;

  /* Gray scale */
  --gray50: #F9FAFB;
  --gray100: #F3F4F6;
  --gray200: #E5E7EB;
  --gray300: #D1D5DB;
  --gray400: #9CA3AF;
  --gray700: #374151;
  --gray800: #1F2937;

  /* Error */
  --error: #EF4444;

  /* Gradients */
  --gradient-primary: linear-gradient(135deg, #A855F7, #EC4899);
  --gradient-secondary: linear-gradient(135deg, #3B82F6, #14B8A6);
  --gradient-green: linear-gradient(135deg, #4ADE80, #10B981);
  --gradient-bg: linear-gradient(135deg, #FAF5FF, #EFF6FF, #F0FDFA);

  /* Spacing & Radius */
  --radius-card: 16px;
  --radius-input: 12px;
  --radius-button: 12px;

  /* Shadows */
  --shadow-subtle: 0 2px 10px rgba(0, 0, 0, 0.05);
  --shadow-medium: 0 4px 20px rgba(0, 0, 0, 0.08);
  --shadow-purple: 0 4px 15px rgba(168, 85, 247, 0.2);

  /* Font */
  --font-stack: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Arial, sans-serif;
}

/* ============================================
   Reset & Base
   ============================================ */

* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  font-family: var(--font-stack);
  line-height: 1.6;
  color: var(--gray800);
  background: var(--gray50);
}

a {
  text-decoration: none;
  color: inherit;
}

img {
  max-width: 100%;
  height: auto;
}

/* ============================================
   Typography
   ============================================ */

.text-display {
  font-size: 2.5rem;
  font-weight: 800;
  line-height: 1.2;
  color: var(--gray800);
}

.text-heading {
  font-size: 1.75rem;
  font-weight: 700;
  line-height: 1.3;
  color: var(--gray800);
}

.text-subheading {
  font-size: 1.25rem;
  font-weight: 600;
  color: var(--gray700);
}

.text-body {
  font-size: 1rem;
  color: var(--gray700);
  line-height: 1.7;
}

.text-small {
  font-size: 0.875rem;
  color: var(--gray400);
}

.text-center {
  text-align: center;
}

/* ============================================
   Layout
   ============================================ */

.container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 24px;
}

.section {
  padding: 80px 0;
}

.section-alt {
  background: white;
}

/* ============================================
   Header / Navigation
   ============================================ */

.site-header {
  background: var(--gradient-primary);
  padding: 16px 0;
  position: sticky;
  top: 0;
  z-index: 100;
  box-shadow: 0 2px 20px rgba(168, 85, 247, 0.3);
}

.site-header .container {
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.site-logo {
  font-size: 1.5rem;
  font-weight: 800;
  color: white;
  letter-spacing: -0.5px;
}

.site-nav {
  display: flex;
  align-items: center;
  gap: 32px;
}

.site-nav a {
  color: rgba(255, 255, 255, 0.9);
  font-weight: 500;
  font-size: 0.95rem;
  transition: color 0.2s;
}

.site-nav a:hover {
  color: white;
}

.nav-toggle {
  display: none;
  background: none;
  border: none;
  cursor: pointer;
  padding: 8px;
}

.nav-toggle span {
  display: block;
  width: 24px;
  height: 2px;
  background: white;
  margin: 5px 0;
  transition: 0.3s;
}

/* ============================================
   Footer
   ============================================ */

.site-footer {
  background: var(--gray800);
  color: rgba(255, 255, 255, 0.7);
  padding: 60px 0 30px;
}

.footer-grid {
  display: grid;
  grid-template-columns: 2fr 1fr 1fr;
  gap: 48px;
  margin-bottom: 40px;
}

.footer-brand h3 {
  color: white;
  font-size: 1.5rem;
  font-weight: 800;
  margin-bottom: 8px;
}

.footer-brand p {
  font-size: 0.95rem;
  line-height: 1.6;
}

.footer-links h4,
.footer-legal h4 {
  color: white;
  font-size: 1rem;
  font-weight: 600;
  margin-bottom: 16px;
}

.footer-links ul,
.footer-legal ul {
  list-style: none;
}

.footer-links li,
.footer-legal li {
  margin-bottom: 10px;
}

.footer-links a,
.footer-legal a {
  color: rgba(255, 255, 255, 0.7);
  font-size: 0.9rem;
  transition: color 0.2s;
}

.footer-links a:hover,
.footer-legal a:hover {
  color: white;
}

.footer-bottom {
  border-top: 1px solid rgba(255, 255, 255, 0.1);
  padding-top: 24px;
  text-align: center;
  font-size: 0.85rem;
}

/* ============================================
   Buttons
   ============================================ */

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 14px 28px;
  border-radius: var(--radius-button);
  font-weight: 600;
  font-size: 1rem;
  font-family: var(--font-stack);
  cursor: pointer;
  border: none;
  transition: transform 0.2s, box-shadow 0.2s;
}

.btn:hover {
  transform: translateY(-2px);
}

.btn-primary {
  background: var(--gradient-primary);
  color: white;
  box-shadow: var(--shadow-purple);
}

.btn-primary:hover {
  box-shadow: 0 6px 25px rgba(168, 85, 247, 0.35);
}

.btn-secondary {
  background: white;
  color: var(--purple);
  border: 2px solid var(--purple200);
}

.btn-secondary:hover {
  border-color: var(--purple);
  box-shadow: var(--shadow-subtle);
}

.btn-white {
  background: white;
  color: var(--purple);
  box-shadow: var(--shadow-medium);
}

.btn-white:hover {
  box-shadow: 0 6px 25px rgba(0, 0, 0, 0.12);
}

.btn-outline-white {
  background: transparent;
  color: white;
  border: 2px solid rgba(255, 255, 255, 0.5);
}

.btn-outline-white:hover {
  border-color: white;
  background: rgba(255, 255, 255, 0.1);
}

/* App Store Buttons */
.store-buttons {
  display: flex;
  gap: 16px;
  flex-wrap: wrap;
  justify-content: center;
}

.btn-store {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  background: var(--gray800);
  color: white;
  padding: 12px 24px;
  border-radius: var(--radius-button);
  font-size: 0.9rem;
  font-weight: 500;
  transition: transform 0.2s, background 0.2s;
  border: 1px solid rgba(255, 255, 255, 0.1);
}

.btn-store:hover {
  transform: translateY(-2px);
  background: var(--gray700);
}

.btn-store-light {
  background: white;
  color: var(--gray800);
  border: 2px solid var(--gray200);
}

.btn-store-light:hover {
  background: var(--gray50);
  border-color: var(--gray300);
}

.btn-store .store-icon {
  font-size: 1.5rem;
}

.btn-store .store-text {
  display: flex;
  flex-direction: column;
  text-align: left;
  line-height: 1.2;
}

.btn-store .store-label {
  font-size: 0.65rem;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  opacity: 0.8;
}

.btn-store .store-name {
  font-size: 1.05rem;
  font-weight: 700;
}

/* ============================================
   Cards
   ============================================ */

.card {
  background: white;
  border-radius: var(--radius-card);
  padding: 32px;
  box-shadow: var(--shadow-subtle);
  border: 1px solid var(--gray100);
  transition: transform 0.2s, box-shadow 0.2s;
}

.card:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-medium);
}

.card-icon {
  width: 56px;
  height: 56px;
  border-radius: 14px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.5rem;
  margin-bottom: 20px;
}

.card h3 {
  font-size: 1.15rem;
  font-weight: 700;
  color: var(--gray800);
  margin-bottom: 8px;
}

.card p {
  font-size: 0.95rem;
  color: var(--gray400);
  line-height: 1.6;
}

/* ============================================
   Forms
   ============================================ */

.form-group {
  margin-bottom: 20px;
}

.form-label {
  display: block;
  font-size: 0.9rem;
  font-weight: 600;
  color: var(--gray700);
  margin-bottom: 6px;
}

.form-input {
  width: 100%;
  padding: 12px 16px;
  border: 2px solid var(--gray200);
  border-radius: var(--radius-input);
  font-size: 1rem;
  font-family: var(--font-stack);
  color: var(--gray800);
  background: white;
  transition: border-color 0.2s, box-shadow 0.2s;
}

.form-input:focus {
  outline: none;
  border-color: var(--purple);
  box-shadow: 0 0 0 3px rgba(168, 85, 247, 0.1);
}

.form-input::placeholder {
  color: var(--gray300);
}

.form-input[readonly] {
  background: var(--gray50);
  color: var(--gray400);
}

.form-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
}

.form-card {
  background: white;
  border-radius: var(--radius-card);
  padding: 40px;
  box-shadow: var(--shadow-medium);
  max-width: 600px;
  margin: 0 auto;
}

.form-card h2 {
  font-size: 1.5rem;
  font-weight: 700;
  color: var(--gray800);
  margin-bottom: 8px;
}

.form-card .form-subtitle {
  font-size: 0.95rem;
  color: var(--gray400);
  margin-bottom: 32px;
}

.form-section-label {
  font-size: 0.8rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 1px;
  color: var(--purple);
  margin-bottom: 16px;
  margin-top: 8px;
}

.form-submit {
  width: 100%;
  padding: 14px;
  background: var(--gradient-primary);
  color: white;
  border: none;
  border-radius: var(--radius-button);
  font-size: 1rem;
  font-weight: 600;
  font-family: var(--font-stack);
  cursor: pointer;
  transition: transform 0.2s, box-shadow 0.2s;
  box-shadow: var(--shadow-purple);
}

.form-submit:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 25px rgba(168, 85, 247, 0.35);
}

.form-submit:disabled {
  opacity: 0.6;
  cursor: not-allowed;
  transform: none;
}

/* ============================================
   Messages
   ============================================ */

.message {
  padding: 14px 20px;
  border-radius: var(--radius-input);
  font-size: 0.95rem;
  margin-top: 16px;
  display: none;
}

.message.show {
  display: block;
}

.message-success {
  background: var(--green50);
  color: #166534;
  border: 1px solid var(--green-light);
}

.message-error {
  background: #FEF2F2;
  color: #991B1B;
  border: 1px solid #FECACA;
}

.message-info {
  background: var(--blue50);
  color: #1E40AF;
  border: 1px solid var(--blue200);
}

/* ============================================
   Page Layout (for form pages)
   ============================================ */

.page-wrapper {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

.page-content {
  flex: 1;
  padding: 48px 24px;
  background: var(--gradient-bg);
}

/* Centered card page (verify, 404) */
.page-centered {
  flex: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 48px 24px;
  background: var(--gradient-bg);
}

/* ============================================
   Spinner
   ============================================ */

.spinner {
  width: 40px;
  height: 40px;
  border: 4px solid var(--gray200);
  border-top-color: var(--purple);
  border-radius: 50%;
  animation: spin 0.8s linear infinite;
  margin: 0 auto;
}

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

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

@media (max-width: 768px) {
  .text-display {
    font-size: 1.75rem;
  }

  .text-heading {
    font-size: 1.35rem;
  }

  .section {
    padding: 48px 0;
  }

  .form-row {
    grid-template-columns: 1fr;
  }

  .form-card {
    padding: 24px;
  }

  .footer-grid {
    grid-template-columns: 1fr;
    gap: 32px;
  }

  /* Mobile nav */
  .site-nav {
    display: none;
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    background: var(--purple-dark);
    flex-direction: column;
    padding: 16px 24px;
    gap: 12px;
  }

  .site-nav.active {
    display: flex;
  }

  .nav-toggle {
    display: block;
  }

  .store-buttons {
    flex-direction: column;
    align-items: center;
  }
}
