/* PhotoMetrics Brand Website Styles
 * Built on Foundation CSS framework
 * Design: "Intelligent Minimalism"
 */

/* ============================================
   CSS Custom Properties (Brand Colors)
   ============================================ */
:root {
  /* Primary Colors - from Flutter theme */
  --pm-charcoal: #2C3E50;
  --pm-iris-blue: #5856D6;
  --pm-coral: #FF6B6B;
  --pm-off-white: #FAFAFA;
  --pm-white: #FFFFFF;
  --pm-success: #34C759;
  --pm-error: #FF3B30;

  /* Extended Palette */
  --pm-iris-blue-light: #7B79E6;
  --pm-iris-blue-dark: #4240B0;
  --pm-charcoal-light: #4A5568;
  --pm-gray-100: #F7FAFC;
  --pm-gray-200: #EDF2F7;
  --pm-gray-300: #E2E8F0;
  --pm-gray-400: #CBD5E0;
  --pm-gray-500: #A0AEC0;
  --pm-gray-600: #718096;

  /* Typography */
  --pm-font-family: -apple-system, BlinkMacSystemFont, 'SF Pro Display',
                    'Segoe UI', Roboto, 'Helvetica Neue', sans-serif;
  --pm-font-mono: 'SF Mono', Monaco, 'Courier New', monospace;

  /* Spacing */
  --pm-section-padding: 6rem 0;
  --pm-section-padding-mobile: 4rem 0;

  /* Border Radius */
  --pm-radius-sm: 6px;
  --pm-radius-md: 12px;
  --pm-radius-lg: 20px;
  --pm-radius-full: 9999px;

  /* Shadows */
  --pm-shadow-xs: 0 1px 2px rgba(0, 0, 0, 0.05);
  --pm-shadow-sm: 0 2px 4px rgba(0, 0, 0, 0.06);
  --pm-shadow-md: 0 4px 12px rgba(0, 0, 0, 0.08);
  --pm-shadow-lg: 0 8px 24px rgba(0, 0, 0, 0.12);
  --pm-shadow-xl: 0 16px 48px rgba(0, 0, 0, 0.16);

  /* Transitions */
  --pm-transition-fast: 150ms ease;
  --pm-transition-base: 250ms ease;
  --pm-transition-slow: 400ms ease;
}

/* ============================================
   Base & Reset
   ============================================ */
html {
  scroll-behavior: smooth;
}

body {
  font-family: var(--pm-font-family);
  color: var(--pm-charcoal);
  background-color: var(--pm-white);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

/* ============================================
   Typography
   ============================================ */
h1, h2, h3, h4, h5, h6 {
  font-weight: 600;
  line-height: 1.2;
  color: var(--pm-charcoal);
}

h1 {
  font-size: 3rem;
  font-weight: 700;
  letter-spacing: -0.02em;
}

h2 {
  font-size: 2.25rem;
  font-weight: 600;
  letter-spacing: -0.01em;
}

h3 {
  font-size: 1.5rem;
  font-weight: 600;
}

h4 {
  font-size: 1.25rem;
  font-weight: 600;
}

p {
  color: var(--pm-charcoal-light);
  margin-bottom: 1rem;
}

.lead {
  font-size: 1.25rem;
  color: var(--pm-gray-600);
  line-height: 1.7;
}

@media screen and (max-width: 639px) {
  h1 { font-size: 2.25rem; }
  h2 { font-size: 1.75rem; }
  h3 { font-size: 1.25rem; }
  .lead { font-size: 1.1rem; }
}

/* ============================================
   Links
   ============================================ */
a {
  color: var(--pm-iris-blue);
  transition: color var(--pm-transition-fast);
}

a:hover {
  color: var(--pm-iris-blue-dark);
}

/* ============================================
   Buttons
   ============================================ */
.button, button {
  font-family: var(--pm-font-family);
  font-weight: 600;
  border-radius: var(--pm-radius-md);
  transition: all var(--pm-transition-fast);
}

.button.primary {
  background-color: var(--pm-iris-blue);
  color: var(--pm-white);
}

.button.primary:hover,
.button.primary:focus {
  background-color: var(--pm-iris-blue-dark);
}

.button.secondary {
  background-color: var(--pm-coral);
  color: var(--pm-white);
}

.button.secondary:hover,
.button.secondary:focus {
  background-color: #E85555;
}

.button.outline {
  background-color: transparent;
  border: 2px solid var(--pm-iris-blue);
  color: var(--pm-iris-blue);
}

.button.outline:hover,
.button.outline:focus {
  background-color: var(--pm-iris-blue);
  color: var(--pm-white);
}

.button.large {
  padding: 1rem 2rem;
  font-size: 1.125rem;
}

/* App Store Badge */
.app-store-badge {
  display: inline-block;
  transition: transform var(--pm-transition-fast), opacity var(--pm-transition-fast);
}

.app-store-badge:hover {
  transform: scale(1.05);
  opacity: 0.9;
}

.app-store-badge img {
  height: 54px;
  width: auto;
}

/* ============================================
   Header / Navigation
   ============================================ */
.site-header {
  background-color: var(--pm-white);
  border-bottom: 1px solid var(--pm-gray-200);
  position: sticky;
  top: 0;
  z-index: 100;
}

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

.site-logo {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  text-decoration: none;
}

.site-logo img {
  width: 40px;
  height: 40px;
  border-radius: var(--pm-radius-sm);
}

.site-logo span {
  font-size: 1.25rem;
  font-weight: 700;
  color: var(--pm-charcoal);
}

.site-logo .beta-tag {
  font-size: 0.5rem !important;
  font-weight: 700 !important;
  color: var(--pm-white) !important;
  background-color: var(--pm-coral);
  padding: 0.15rem 0.4rem;
  border-radius: var(--pm-radius-sm);
  text-transform: uppercase;
  letter-spacing: 0.05em;
  vertical-align: middle;
  margin-left: 0.25rem;
}

.nav-links {
  display: flex;
  align-items: center;
  gap: 2rem;
  list-style: none;
  margin: 0;
}

.nav-links a {
  color: var(--pm-charcoal-light);
  font-weight: 500;
  text-decoration: none;
  transition: color var(--pm-transition-fast);
}

.nav-links a:hover {
  color: var(--pm-iris-blue);
}

/* Mobile Nav Toggle */
.nav-toggle {
  display: none;
  background: none;
  border: none;
  padding: 0.5rem;
  cursor: pointer;
}

.nav-toggle span {
  display: block;
  width: 24px;
  height: 2px;
  background-color: var(--pm-charcoal);
  margin: 5px 0;
  transition: var(--pm-transition-fast);
}

@media screen and (max-width: 639px) {
  .nav-toggle {
    display: block;
  }

  .nav-links {
    display: none;
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    background: var(--pm-white);
    flex-direction: column;
    padding: 1rem;
    border-bottom: 1px solid var(--pm-gray-200);
    gap: 1rem;
  }

  .nav-links.is-active {
    display: flex;
  }
}

/* ============================================
   Hero Section
   ============================================ */
.hero {
  padding: 5rem 0 6rem;
  background: linear-gradient(180deg, var(--pm-white) 0%, var(--pm-gray-100) 100%);
  overflow: hidden;
}

.hero-content {
  max-width: 560px;
}

.hero h1 {
  margin-bottom: 1.5rem;
}

.hero .lead {
  margin-bottom: 2rem;
}

.hero-cta {
  display: flex;
  flex-wrap: wrap;
  gap: 1rem;
  align-items: center;
  margin-bottom: 2rem;
}

.hero-image {
  position: relative;
}

.hero-image img {
  max-width: 100%;
  height: auto;
  filter: drop-shadow(var(--pm-shadow-xl));
}

.hero-phone-mockup {
  max-width: 320px;
  margin: 0 auto;
}

.hero-phone-mockup img {
  width: 100%;
  height: auto;
  border-radius: 24px;
  box-shadow: var(--pm-shadow-xl);
}

@media screen and (max-width: 1023px) {
  .hero {
    text-align: center;
    padding: 3rem 0 4rem;
  }

  .hero-content {
    max-width: 100%;
    margin-bottom: 3rem;
  }

  .hero-cta {
    justify-content: center;
  }
}

/* ============================================
   Sections (Generic)
   ============================================ */
.section {
  padding: var(--pm-section-padding);
}

.section-alt {
  background-color: var(--pm-gray-100);
}

.section-dark {
  background-color: var(--pm-charcoal);
  color: var(--pm-white);
}

.section-dark h2,
.section-dark h3,
.section-dark h4 {
  color: var(--pm-white);
}

.section-dark p {
  color: var(--pm-gray-400);
}

.section-header {
  text-align: center;
  max-width: 640px;
  margin: 0 auto 3rem;
}

.section-header h2 {
  margin-bottom: 1rem;
}

@media screen and (max-width: 639px) {
  .section {
    padding: var(--pm-section-padding-mobile);
  }

  .section-header {
    margin-bottom: 2rem;
  }
}

/* ============================================
   How It Works (3 Steps)
   ============================================ */
.how-it-works {
  background-color: var(--pm-white);
}

.step-card {
  text-align: center;
  padding: 2rem;
}

.step-icon {
  width: 80px;
  height: 80px;
  margin: 0 auto 1.5rem;
  background: linear-gradient(135deg, var(--pm-iris-blue-light), var(--pm-iris-blue));
  border-radius: var(--pm-radius-lg);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--pm-white);
  font-size: 2rem;
}

.step-number {
  display: inline-block;
  width: 32px;
  height: 32px;
  background-color: var(--pm-iris-blue);
  color: var(--pm-white);
  border-radius: var(--pm-radius-full);
  font-weight: 700;
  font-size: 1rem;
  line-height: 32px;
  margin-bottom: 1rem;
}

.step-card h3 {
  margin-bottom: 0.75rem;
}

.step-card p {
  font-size: 0.95rem;
}

.step-arrow {
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--pm-gray-400);
  font-size: 2rem;
}

@media screen and (max-width: 639px) {
  .step-arrow {
    transform: rotate(90deg);
    margin: 1rem 0;
  }
}

/* ============================================
   Features Grid
   ============================================ */
.features-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 2rem;
}

@media screen and (max-width: 639px) {
  .features-grid {
    grid-template-columns: 1fr;
  }
}

.feature-card {
  background-color: var(--pm-white);
  border-radius: var(--pm-radius-md);
  padding: 2rem;
  box-shadow: var(--pm-shadow-sm);
  border: 1px solid var(--pm-gray-200);
  transition: box-shadow var(--pm-transition-base), transform var(--pm-transition-base);
}

.feature-card:hover {
  box-shadow: var(--pm-shadow-md);
  transform: translateY(-2px);
}

.feature-icon {
  width: 56px;
  height: 56px;
  background-color: var(--pm-iris-blue);
  background: linear-gradient(135deg, var(--pm-iris-blue-light), var(--pm-iris-blue));
  border-radius: var(--pm-radius-md);
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 1.25rem;
  color: var(--pm-white);
  font-size: 1.5rem;
}

.feature-card h3 {
  margin-bottom: 0.5rem;
}

.feature-card p {
  font-size: 0.95rem;
  margin-bottom: 0;
}

/* ============================================
   Usage Patterns Section
   ============================================ */
.usage-patterns {
  background-color: var(--pm-gray-100);
}

.pattern-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 1.5rem;
}

.pattern-card {
  background-color: var(--pm-white);
  border-radius: var(--pm-radius-md);
  overflow: hidden;
  box-shadow: var(--pm-shadow-sm);
  border: 1px solid var(--pm-gray-200);
  transition: box-shadow var(--pm-transition-base);
}

.pattern-card:hover {
  box-shadow: var(--pm-shadow-md);
}

.pattern-image {
  width: 100%;
  height: 160px;
  object-fit: cover;
  background-color: var(--pm-gray-200);
}

.pattern-content {
  padding: 1.5rem;
}

.pattern-card h3 {
  font-size: 1.125rem;
  margin-bottom: 0.5rem;
}

.pattern-card p {
  font-size: 0.9rem;
  color: var(--pm-gray-600);
  margin-bottom: 1rem;
}

.pattern-expand-btn {
  background: none;
  border: none;
  color: var(--pm-iris-blue);
  font-weight: 600;
  font-size: 0.9rem;
  padding: 0;
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 0.25rem;
  transition: color var(--pm-transition-fast);
}

.pattern-expand-btn:hover {
  color: var(--pm-iris-blue-dark);
}

.pattern-expand-btn .arrow {
  transition: transform var(--pm-transition-fast);
}

.pattern-card.is-expanded .pattern-expand-btn .arrow {
  transform: rotate(90deg);
}

.pattern-details {
  display: none;
  padding: 0 1.5rem 1.5rem;
  border-top: 1px solid var(--pm-gray-200);
  margin-top: 1rem;
  padding-top: 1rem;
}

.pattern-card.is-expanded .pattern-details {
  display: block;
}

.pattern-details h4 {
  font-size: 0.9rem;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--pm-gray-500);
  margin-bottom: 0.75rem;
  margin-top: 1rem;
}

.pattern-details h4:first-child {
  margin-top: 0;
}

.pattern-details ul,
.pattern-details ol {
  margin-left: 1.25rem;
  margin-bottom: 0;
}

.pattern-details li {
  font-size: 0.9rem;
  color: var(--pm-charcoal-light);
  margin-bottom: 0.5rem;
}

/* ============================================
   Trust Section
   ============================================ */
.trust-section {
  background-color: var(--pm-charcoal);
  color: var(--pm-white);
}

.trust-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 2rem;
}

@media screen and (max-width: 639px) {
  .trust-grid {
    grid-template-columns: 1fr;
  }
}

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

.trust-icon {
  width: 64px;
  height: 64px;
  margin: 0 auto 1rem;
  background-color: rgba(255, 255, 255, 0.1);
  border-radius: var(--pm-radius-full);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.75rem;
}

.trust-item h3 {
  color: var(--pm-white);
  margin-bottom: 0.5rem;
}

.trust-item p {
  font-size: 0.95rem;
  color: var(--pm-gray-400);
  margin-bottom: 0;
}

/* ============================================
   Final CTA Section
   ============================================ */
.final-cta {
  text-align: center;
  background: linear-gradient(180deg, var(--pm-gray-100) 0%, var(--pm-white) 100%);
}

.final-cta h2 {
  margin-bottom: 1rem;
}

.final-cta .lead {
  margin-bottom: 2rem;
}

/* ============================================
   Footer
   ============================================ */
.site-footer {
  background-color: var(--pm-charcoal);
  color: var(--pm-gray-400);
  padding: 3rem 0 2rem;
}

.footer-content {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  flex-wrap: wrap;
  gap: 2rem;
  margin-bottom: 2rem;
}

.footer-brand {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  margin-bottom: 0.5rem;
}

.footer-brand img {
  width: 36px;
  height: 36px;
  border-radius: var(--pm-radius-sm);
}

.footer-brand span {
  font-size: 1.125rem;
  font-weight: 600;
  color: var(--pm-white);
}

.footer-tagline {
  font-size: 0.9rem;
  color: var(--pm-gray-500);
}

.footer-links {
  display: flex;
  gap: 2rem;
}

.footer-links a {
  color: var(--pm-gray-400);
  text-decoration: none;
  font-size: 0.9rem;
  transition: color var(--pm-transition-fast);
}

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

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

@media screen and (max-width: 639px) {
  .footer-content {
    flex-direction: column;
    text-align: center;
  }

  .footer-brand {
    justify-content: center;
  }

  .footer-links {
    justify-content: center;
  }
}

/* ============================================
   Utility Classes
   ============================================ */
.text-center { text-align: center; }
.text-left { text-align: left; }
.text-right { text-align: right; }

.text-iris { color: var(--pm-iris-blue); }
.text-coral { color: var(--pm-coral); }
.text-muted { color: var(--pm-gray-600); }

.bg-iris { background-color: var(--pm-iris-blue); }
.bg-coral { background-color: var(--pm-coral); }

.mt-1 { margin-top: 0.5rem; }
.mt-2 { margin-top: 1rem; }
.mt-3 { margin-top: 1.5rem; }
.mt-4 { margin-top: 2rem; }

.mb-1 { margin-bottom: 0.5rem; }
.mb-2 { margin-bottom: 1rem; }
.mb-3 { margin-bottom: 1.5rem; }
.mb-4 { margin-bottom: 2rem; }

.visually-hidden {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}
