/* Theory Test Ready - Modern Landing Page */

/* CSS Custom Properties */
:root {
  /* Colors */
  --color-primary: #22C55E;
  --color-primary-dark: #16A34A;
  --color-primary-light: #4ADE80;
  --color-text: #111827;
  --color-text-secondary: #6B7280;
  --color-text-light: #9CA3AF;
  --color-background: #FFFFFF;
  --color-surface: #F9FAFB;
  --color-border: #E5E7EB;

  /* Typography */
  --font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;

  /* Spacing */
  --space-xs: 0.5rem;
  --space-sm: 0.75rem;
  --space-md: 1rem;
  --space-lg: 1.5rem;
  --space-xl: 2rem;
  --space-2xl: 3rem;
  --space-3xl: 4rem;
  --space-4xl: 6rem;
  --space-5xl: 8rem;

  /* Layout */
  --max-width: 1200px;
  --radius-sm: 8px;
  --radius-md: 12px;
  --radius-lg: 20px;
  --radius-xl: 28px;
}

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

html {
  scroll-behavior: smooth;
  -webkit-text-size-adjust: 100%;
}

/* Safe area support for notched phones */
@supports (padding: max(0px)) {
  .container {
    padding-left: max(var(--space-lg), env(safe-area-inset-left));
    padding-right: max(var(--space-lg), env(safe-area-inset-right));
  }

  .footer-bottom {
    padding-bottom: max(var(--space-lg), env(safe-area-inset-bottom));
  }
}

body {
  font-family: var(--font-family);
  font-size: 1rem;
  line-height: 1.6;
  color: var(--color-text);
  background-color: var(--color-background);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  overflow-x: hidden;
}

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

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

/* Skip Link */
.skip-link {
  position: absolute;
  top: -40px;
  left: 0;
  background: var(--color-primary);
  color: white;
  padding: var(--space-sm) var(--space-md);
  z-index: 100;
  border-radius: 0 0 var(--radius-sm) 0;
}

.skip-link:focus {
  top: 0;
}

/* Layout */
.container {
  width: 100%;
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 0 var(--space-lg);
}

/* Header */
.header {
  padding: var(--space-md) 0;
  position: sticky;
  top: 0;
  background: rgba(255, 255, 255, 0.9);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  z-index: 50;
  border-bottom: 1px solid var(--color-border);
}

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

.logo {
  display: flex;
  align-items: center;
  gap: var(--space-sm);
  font-size: 1.125rem;
  font-weight: 600;
  color: var(--color-text);
}

.logo:hover {
  opacity: 0.8;
}

.logo-icon {
  width: 36px;
  height: 36px;
  border-radius: var(--radius-sm);
}

/* Buttons */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: var(--space-xs);
  font-weight: 500;
  border-radius: var(--radius-sm);
  border: none;
  cursor: pointer;
  transition: all 0.2s ease;
  min-height: 44px; /* Touch-friendly target size */
}

.btn-appstore {
  padding: 0.5rem 0.875rem;
  background: var(--color-text);
  color: white;
  font-size: 0.8125rem;
  border-radius: 8px;
  gap: 0.4rem;
  min-height: 40px;
}

.btn-appstore:hover {
  background: #374151;
}

.btn-appstore .apple-icon {
  width: 16px;
  height: 16px;
}

.btn-appstore-large {
  padding: 0.75rem 1.25rem;
  background: var(--color-text);
  color: white;
  border-radius: 10px;
  gap: 0.625rem;
}

.btn-appstore-large:hover {
  background: #374151;
  transform: translateY(-1px);
}

.btn-appstore-large .apple-icon {
  width: 24px;
  height: 24px;
}

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

.btn-small {
  font-size: 0.5625rem;
  font-weight: 400;
  opacity: 0.9;
}

.btn-large {
  font-size: 1rem;
  font-weight: 600;
}

.btn-primary-large {
  width: 100%;
  padding: 1rem 2rem;
  background: var(--color-primary);
  color: white;
  font-size: 1rem;
  font-weight: 600;
  border-radius: var(--radius-md);
}

.btn-primary-large:hover {
  background: var(--color-primary-dark);
  transform: translateY(-1px);
}

/* Phone Mockup */
.phone {
  position: relative;
  background: #1a1a1a;
  border-radius: 40px;
  padding: 12px;
  box-shadow:
    0 25px 50px -12px rgba(0, 0, 0, 0.25),
    0 0 0 1px rgba(255, 255, 255, 0.1) inset;
}


.phone-screen {
  position: relative;
  border-radius: 32px;
  overflow: hidden;
  background: #000;
}

.phone-screen img {
  width: 100%;
  height: auto;
  display: block;
}

/* Hero Section */
.hero {
  padding: var(--space-3xl) 0 var(--space-4xl);
}

.hero-content {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: var(--space-3xl);
}

.hero-phones {
  position: relative;
  width: 100%;
  display: flex;
  justify-content: center;
}

.hero-phones .phone-main {
  width: 240px;
  z-index: 2;
}

.hero-phones .phone-secondary {
  display: none;
}

.hero-text {
  text-align: center;
  max-width: 560px;
}

.hero h1 {
  font-size: 2.5rem;
  font-weight: 700;
  line-height: 1.1;
  letter-spacing: -0.03em;
  margin-bottom: var(--space-lg);
  color: var(--color-text);
}

.hero p {
  font-size: 1.125rem;
  color: var(--color-text-secondary);
  line-height: 1.7;
  margin-bottom: var(--space-xl);
}

.hero-buttons {
  display: flex;
  justify-content: center;
  gap: var(--space-md);
}

/* Feature Sections */
.feature {
  padding: var(--space-4xl) 0;
}

.feature-row {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: var(--space-3xl);
}

/* Show phone first on mobile for visual impact */
.feature-phone {
  order: -1;
}

.feature-text {
  order: 1;
}

.feature-text {
  max-width: 480px;
  text-align: center;
}

.feature-text h2 {
  font-size: 1.875rem;
  font-weight: 700;
  line-height: 1.2;
  letter-spacing: -0.02em;
  margin-bottom: var(--space-md);
  color: var(--color-text);
}

.feature-text p {
  font-size: 1.0625rem;
  color: var(--color-text-secondary);
  line-height: 1.7;
}

.feature-phone {
  width: 100%;
  max-width: 280px;
}

.feature-phone .phone {
  width: 100%;
}

/* Pricing Section */
.pricing {
  padding: var(--space-4xl) 0;
  background: var(--color-surface);
}

.pricing-card {
  max-width: 400px;
  margin: 0 auto;
  background: white;
  border-radius: var(--radius-xl);
  padding: var(--space-2xl);
  box-shadow:
    0 4px 6px -1px rgba(0, 0, 0, 0.1),
    0 2px 4px -1px rgba(0, 0, 0, 0.06);
  border: 1px solid var(--color-border);
}

.pricing-header {
  text-align: center;
  margin-bottom: var(--space-xl);
}

.pricing-label {
  display: inline-block;
  padding: 0.25rem 0.75rem;
  background: rgba(34, 197, 94, 0.1);
  color: var(--color-primary-dark);
  font-size: 0.75rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  border-radius: 100px;
  margin-bottom: var(--space-md);
}

.pricing-amount {
  display: flex;
  align-items: flex-start;
  justify-content: center;
  gap: 0.25rem;
  margin-bottom: var(--space-sm);
}

.pricing-amount .currency {
  font-size: 1.5rem;
  font-weight: 600;
  color: var(--color-text);
  margin-top: 0.5rem;
}

.pricing-amount .price {
  font-size: 4rem;
  font-weight: 700;
  line-height: 1;
  color: var(--color-text);
  letter-spacing: -0.03em;
}

.pricing-note {
  font-size: 0.9375rem;
  color: var(--color-text-secondary);
}

.pricing-features {
  list-style: none;
  margin-bottom: var(--space-xl);
}

.pricing-features li {
  display: flex;
  align-items: center;
  gap: var(--space-sm);
  padding: var(--space-sm) 0;
  font-size: 0.9375rem;
  color: var(--color-text);
}

.pricing-features li svg {
  width: 20px;
  height: 20px;
  color: var(--color-primary);
  flex-shrink: 0;
}

/* Footer */
.footer {
  padding: var(--space-3xl) 0 0;
  background: var(--color-surface);
}

.footer .container {
  display: flex;
  flex-direction: column;
  gap: var(--space-2xl);
}

.footer-brand {
  display: flex;
  align-items: center;
  gap: var(--space-sm);
  font-size: 1rem;
  font-weight: 600;
  color: var(--color-text);
}

.footer-logo {
  width: 32px;
  height: 32px;
  border-radius: var(--radius-sm);
}

.footer-links-wrapper {
  display: flex;
  gap: var(--space-3xl);
}

.footer-col h4 {
  font-size: 0.75rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--color-text-light);
  margin-bottom: var(--space-md);
}

.footer-links {
  list-style: none;
}

.footer-links li {
  margin-bottom: var(--space-sm);
}

.footer-links a {
  font-size: 0.9375rem;
  color: var(--color-text-secondary);
  transition: color 0.2s;
}

.footer-links a:hover {
  color: var(--color-text);
}

.footer-bottom {
  margin-top: var(--space-3xl);
  padding: var(--space-lg) 0;
  border-top: 1px solid var(--color-border);
}

.copyright {
  font-size: 0.875rem;
  color: var(--color-text-light);
}

/* Legal Pages */
.legal-page {
  padding: var(--space-2xl) 0 var(--space-3xl);
}

.legal-page h1 {
  font-size: 2rem;
  font-weight: 700;
  margin-bottom: var(--space-xs);
}

.legal-page .last-updated {
  color: var(--color-text-secondary);
  font-size: 0.875rem;
  margin-bottom: var(--space-2xl);
}

.legal-page h2 {
  font-size: 1.25rem;
  font-weight: 600;
  margin-top: var(--space-xl);
  margin-bottom: var(--space-sm);
}

.legal-page p {
  margin-bottom: var(--space-md);
  color: var(--color-text-secondary);
}

.legal-page ul, .legal-page ol {
  margin-bottom: var(--space-md);
  padding-left: var(--space-lg);
  color: var(--color-text-secondary);
}

.legal-page li {
  margin-bottom: var(--space-xs);
}

/* Help Page */
.help-page {
  padding: var(--space-2xl) 0 var(--space-3xl);
}

.help-page h1 {
  font-size: 2rem;
  font-weight: 700;
  margin-bottom: var(--space-md);
}

.help-page .intro {
  color: var(--color-text-secondary);
  margin-bottom: var(--space-2xl);
  max-width: 640px;
}

.help-page h2 {
  font-size: 1.25rem;
  font-weight: 600;
  margin-top: var(--space-xl);
  margin-bottom: var(--space-md);
}

.faq-item {
  margin-bottom: var(--space-lg);
  padding-bottom: var(--space-lg);
  border-bottom: 1px solid var(--color-border);
}

.faq-item:last-child {
  border-bottom: none;
}

.faq-item h3 {
  font-size: 1rem;
  font-weight: 600;
  margin-bottom: var(--space-xs);
}

.faq-item p {
  color: var(--color-text-secondary);
}

.contact-box {
  background: white;
  padding: var(--space-lg);
  border-radius: var(--radius-md);
  margin-top: var(--space-2xl);
  border: 1px solid var(--color-border);
}

.contact-box h2 {
  margin-top: 0;
}

.contact-box a {
  color: var(--color-primary-dark);
  font-weight: 500;
}

.contact-box a:hover {
  text-decoration: underline;
}

/* Responsive - Mobile */
@media (max-width: 479px) {
  .container {
    padding: 0 var(--space-md);
  }

  /* Compact header button on small screens */
  .btn-appstore span {
    display: none;
  }

  .btn-appstore {
    padding: 0.5rem;
    min-height: 36px;
  }

  .btn-appstore .apple-icon {
    width: 20px;
    height: 20px;
  }

  .logo span {
    font-size: 0.9375rem;
  }

  .logo-icon {
    width: 30px;
    height: 30px;
  }

  /* Hero adjustments */
  .hero {
    padding: var(--space-2xl) 0 var(--space-3xl);
  }

  .hero-phones .phone-main {
    width: 220px;
  }

  .hero h1 {
    font-size: 1.75rem;
  }

  .hero p {
    font-size: 0.9375rem;
  }

  /* Phone mockup adjustments */
  .phone {
    border-radius: 28px;
    padding: 8px;
  }

  .phone-screen {
    border-radius: 22px;
  }

  /* Feature sections */
  .feature {
    padding: var(--space-2xl) 0;
  }

  .feature-row {
    gap: var(--space-xl);
  }

  .feature-text h2 {
    font-size: 1.375rem;
  }

  .feature-text p {
    font-size: 0.9375rem;
  }

  .feature-phone {
    max-width: 220px;
  }

  /* Pricing */
  .pricing {
    padding: var(--space-2xl) 0;
  }

  .pricing-card {
    padding: var(--space-lg);
    border-radius: var(--radius-lg);
  }

  .pricing-amount .price {
    font-size: 3rem;
  }

  .pricing-amount .currency {
    font-size: 1.25rem;
  }

  /* Footer */
  .footer {
    padding: var(--space-xl) 0 0;
  }

  .footer-links-wrapper {
    gap: var(--space-2xl);
  }

  .footer-bottom {
    margin-top: var(--space-xl);
  }
}

/* Responsive - Small phones */
@media (max-width: 359px) {
  .hero-phones .phone-main {
    width: 200px;
  }

  .hero h1 {
    font-size: 1.5rem;
  }

  .feature-phone {
    max-width: 200px;
  }
}

/* Responsive - Tablet */
@media (min-width: 768px) {
  .hero {
    padding: var(--space-3xl) 0 var(--space-4xl);
  }

  .hero-content {
    flex-direction: row;
    justify-content: space-between;
    align-items: center;
    gap: var(--space-2xl);
  }

  .hero-phones {
    flex-shrink: 0;
    width: auto;
  }

  .hero-phones .phone-main {
    width: 220px;
  }

  .hero-text {
    text-align: left;
    max-width: 400px;
  }

  .hero h1 {
    font-size: 2.25rem;
  }

  .hero p {
    font-size: 1rem;
  }

  .hero-buttons {
    justify-content: flex-start;
  }

  .feature-row {
    flex-direction: row;
    justify-content: space-between;
    align-items: center;
    gap: var(--space-3xl);
  }

  .feature-text {
    flex: 1;
    text-align: left;
    order: 0;
  }

  .feature-phone {
    flex-shrink: 0;
    max-width: 240px;
    order: 0;
  }

  .feature-reverse .feature-row {
    flex-direction: row-reverse;
  }

  .footer .container {
    flex-direction: row;
    justify-content: space-between;
    align-items: flex-start;
  }
}

/* Responsive - Desktop */
@media (min-width: 1024px) {
  .hero {
    padding: var(--space-4xl) 0 var(--space-5xl);
  }

  .hero-content {
    gap: var(--space-3xl);
  }

  .hero-phones .phone-main {
    width: 260px;
  }

  .hero-text {
    max-width: 480px;
  }

  .hero h1 {
    font-size: 2.75rem;
  }

  .hero p {
    font-size: 1.125rem;
  }

  .feature-row {
    gap: var(--space-4xl);
  }

  .feature-text h2 {
    font-size: 2rem;
  }

  .feature-phone {
    max-width: 280px;
  }
}

/* Responsive - Large Desktop (show two phones) */
@media (min-width: 1200px) {
  .hero-phones {
    position: relative;
  }

  .hero-phones .phone-main {
    width: 280px;
  }

  .hero-phones .phone-secondary {
    display: block;
    position: absolute;
    width: 240px;
    right: -180px;
    top: 60px;
    z-index: -1;
    opacity: 0.85;
  }

  .hero h1 {
    font-size: 3.25rem;
  }

  .hero p {
    font-size: 1.25rem;
  }

  .hero-text {
    max-width: 520px;
  }

  .feature-phone {
    max-width: 300px;
  }

  .feature-text h2 {
    font-size: 2.25rem;
  }
}

/* Focus States */
a:focus-visible,
button:focus-visible {
  outline: 2px solid var(--color-primary);
  outline-offset: 2px;
}

/* Print Styles */
@media print {
  .header,
  .footer,
  .btn {
    display: none;
  }

  body {
    font-size: 12pt;
  }
}

/* Animations */
@media (prefers-reduced-motion: no-preference) {
  .phone {
    transition: transform 0.3s ease;
  }

  .feature-phone:hover .phone {
    transform: translateY(-8px);
  }

  .btn {
    transition: all 0.2s ease;
  }
}

/* Touch feedback for mobile */
@media (hover: none) {
  .btn:active {
    transform: scale(0.97);
    opacity: 0.9;
  }

  .feature-phone:hover .phone {
    transform: none;
  }
}

/* Better tap highlight on iOS */
a, button {
  -webkit-tap-highlight-color: rgba(34, 197, 94, 0.2);
}
