/* ==========================================================================
   SkinSimple Landing Page Styles
   Premium skincare aesthetic — soft greens/teals, clean whites, light neutrals
   ========================================================================== */

/* --------------------------------------------------------------------------
   CSS Custom Properties (Design Tokens)
   -------------------------------------------------------------------------- */
:root {
  /* Brand Colors */
  --color-primary: #0d9488;        /* Teal-600 */
  --color-primary-light: #14b8a6;  /* Teal-500 */
  --color-primary-dark: #0f766e;   /* Teal-700 */
  --color-accent: #059669;         /* Emerald-600 */

  /* Neutrals */
  --color-white: #ffffff;
  --color-bg: #f9fafb;             /* Gray-50 */
  --color-bg-alt: #f3f4f6;         /* Gray-100 */
  --color-border: #e5e7eb;         /* Gray-200 */
  --color-text: #111827;           /* Gray-900 */
  --color-text-secondary: #6b7280; /* Gray-500 */
  --color-text-muted: #9ca3af;     /* Gray-400 */

  /* Feedback Colors */
  --color-success: #10b981;        /* Emerald-500 */
  --color-warning: #f59e0b;        /* Amber-500 */
  --color-danger: #ef4444;         /* Red-500 */

  /* Typography */
  --font-family: 'DM Sans', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  --font-size-xs: 0.75rem;
  --font-size-sm: 0.875rem;
  --font-size-base: 1rem;
  --font-size-lg: 1.125rem;
  --font-size-xl: 1.25rem;
  --font-size-2xl: 1.5rem;
  --font-size-3xl: 1.875rem;
  --font-size-4xl: 2.25rem;
  --font-size-5xl: 3rem;

  /* Spacing */
  --space-1: 0.25rem;
  --space-2: 0.5rem;
  --space-3: 0.75rem;
  --space-4: 1rem;
  --space-5: 1.25rem;
  --space-6: 1.5rem;
  --space-8: 2rem;
  --space-10: 2.5rem;
  --space-12: 3rem;
  --space-16: 4rem;
  --space-20: 5rem;
  --space-24: 6rem;

  /* Layout */
  --container-max: 1200px;
  --container-prose: 720px;

  /* Effects */
  --shadow-sm: 0 1px 2px 0 rgb(0 0 0 / 0.05);
  --shadow: 0 1px 3px 0 rgb(0 0 0 / 0.1), 0 1px 2px -1px rgb(0 0 0 / 0.1);
  --shadow-md: 0 4px 6px -1px rgb(0 0 0 / 0.1), 0 2px 4px -2px rgb(0 0 0 / 0.1);
  --shadow-lg: 0 10px 15px -3px rgb(0 0 0 / 0.1), 0 4px 6px -4px rgb(0 0 0 / 0.1);
  --shadow-xl: 0 20px 25px -5px rgb(0 0 0 / 0.1), 0 8px 10px -6px rgb(0 0 0 / 0.1);
  --radius-sm: 0.375rem;
  --radius: 0.5rem;
  --radius-lg: 0.75rem;
  --radius-xl: 1rem;
  --radius-2xl: 1.5rem;
  --radius-full: 9999px;

  /* Transitions */
  --transition-fast: 150ms ease;
  --transition-base: 200ms ease;
  --transition-slow: 300ms ease;
}

/* --------------------------------------------------------------------------
   Dark Mode
   -------------------------------------------------------------------------- */
@media (prefers-color-scheme: dark) {
  :root {
    --color-primary: #2dd4bf;        /* Teal-400 */
    --color-primary-light: #5eead4;  /* Teal-300 */
    --color-primary-dark: #14b8a6;   /* Teal-500 */

    --color-white: #1f2937;          /* Gray-800 */
    --color-bg: #111827;             /* Gray-900 */
    --color-bg-alt: #1f2937;         /* Gray-800 */
    --color-border: #374151;         /* Gray-700 */
    --color-text: #f9fafb;           /* Gray-50 */
    --color-text-secondary: #9ca3af; /* Gray-400 */
    --color-text-muted: #6b7280;     /* Gray-500 */
  }
}

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

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

body {
  font-family: var(--font-family);
  font-size: var(--font-size-base);
  line-height: 1.6;
  color: var(--color-text);
  background-color: var(--color-bg);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

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

a {
  color: var(--color-primary);
  text-decoration: none;
  transition: color var(--transition-fast);
}

a:hover {
  color: var(--color-primary-light);
}

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

.section {
  padding: var(--space-16) 0;
}

@media (min-width: 768px) {
  .section {
    padding: var(--space-24) 0;
  }
}

/* --------------------------------------------------------------------------
   Typography
   -------------------------------------------------------------------------- */
h1, h2, h3, h4, h5, h6 {
  font-weight: 700;
  line-height: 1.2;
  letter-spacing: -0.02em;
  color: var(--color-text);
}

h1 {
  font-size: var(--font-size-3xl);
}

h2 {
  font-size: var(--font-size-2xl);
}

h3 {
  font-size: var(--font-size-xl);
}

@media (min-width: 768px) {
  h1 {
    font-size: var(--font-size-5xl);
  }

  h2 {
    font-size: var(--font-size-3xl);
  }

  h3 {
    font-size: var(--font-size-2xl);
  }
}

p {
  margin-bottom: var(--space-4);
}

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

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

/* --------------------------------------------------------------------------
   Header / Navigation
   -------------------------------------------------------------------------- */
.header {
  position: sticky;
  top: 0;
  z-index: 100;
  background-color: var(--color-bg);
  border-bottom: 1px solid var(--color-border);
  backdrop-filter: blur(8px);
  background-color: rgba(249, 250, 251, 0.9);
}

@media (prefers-color-scheme: dark) {
  .header {
    background-color: rgba(17, 24, 39, 0.9);
  }
}

.header-inner {
  display: flex;
  justify-content: space-between;
  align-items: center;
  height: 64px;
}

.logo {
  font-size: var(--font-size-xl);
  font-weight: 700;
  color: var(--color-text);
}

.nav {
  display: flex;
  gap: var(--space-6);
}

.nav a {
  font-size: var(--font-size-sm);
  color: var(--color-text-secondary);
  font-weight: 500;
}

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

/* --------------------------------------------------------------------------
   Hero Section
   -------------------------------------------------------------------------- */
.hero {
  padding: var(--space-12) 0 var(--space-16);
  background: linear-gradient(180deg, var(--color-bg) 0%, var(--color-bg-alt) 100%);
}

@media (min-width: 768px) {
  .hero {
    padding: var(--space-20) 0 var(--space-24);
  }
}

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

@media (min-width: 1024px) {
  .hero-content {
    flex-direction: row;
    justify-content: space-between;
    gap: var(--space-16);
  }
}

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

@media (min-width: 1024px) {
  .hero-text {
    text-align: left;
    flex: 1;
  }
}

.hero-badge {
  display: inline-block;
  padding: var(--space-2) var(--space-4);
  background-color: var(--color-primary);
  color: white;
  font-size: var(--font-size-xs);
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  border-radius: var(--radius-full);
  margin-bottom: var(--space-4);
}

.hero h1 {
  margin-bottom: var(--space-6);
}

.hero-subtitle {
  font-size: var(--font-size-lg);
  color: var(--color-text-secondary);
  margin-bottom: var(--space-8);
}

@media (min-width: 768px) {
  .hero-subtitle {
    font-size: var(--font-size-xl);
  }
}

.hero-cta {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: var(--space-4);
}

@media (min-width: 1024px) {
  .hero-cta {
    align-items: flex-start;
  }
}

.app-store-badge {
  height: 54px;
  width: auto;
  transition: transform var(--transition-fast);
}

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

.hero-proof {
  font-size: var(--font-size-sm);
  color: var(--color-text-muted);
}

/* Hero Device Frame */
.hero-device {
  flex-shrink: 0;
}

.device-frame {
  position: relative;
  width: 280px;
}

@media (min-width: 768px) {
  .device-frame {
    width: 320px;
  }
}

.device-bezel {
  width: 100%;
  height: auto;
  position: relative;
  z-index: 2;
}

/* Screenshot placeholder inside device frame */
.device-screenshot {
  position: absolute;
  /* Positioning for iPhone 16 Pro bezel - adjust based on actual bezel dimensions */
  top: 1.8%;
  left: 4.5%;
  width: 91%;
  height: auto;
  aspect-ratio: 393 / 852; /* iPhone 16 Pro screen ratio */
  border-radius: 38px;
  overflow: hidden;
  z-index: 1;
  background: linear-gradient(135deg, var(--color-bg-alt) 0%, var(--color-border) 100%);
  display: flex;
  align-items: center;
  justify-content: center;
}

.screenshot-placeholder {
  width: 100%;
  height: 100%;
  object-fit: cover;
  border-radius: inherit;
}

/* Placeholder styling when no image is present */
.device-screenshot::before {
  content: "Screenshot\A393 × 852px";
  white-space: pre-wrap;
  text-align: center;
  font-size: var(--font-size-sm);
  color: var(--color-text-muted);
}

.device-screenshot:has(img)::before {
  display: none;
}

/* --------------------------------------------------------------------------
   Problem Section
   -------------------------------------------------------------------------- */
.problem {
  background-color: var(--color-white);
}

.problem-content {
  max-width: var(--container-prose);
  margin: 0 auto;
  text-align: center;
}

.problem-headline {
  font-size: var(--font-size-2xl);
  margin-bottom: var(--space-8);
}

@media (min-width: 768px) {
  .problem-headline {
    font-size: var(--font-size-3xl);
  }
}

.problem-points {
  display: grid;
  gap: var(--space-6);
  text-align: left;
  margin-top: var(--space-10);
}

@media (min-width: 768px) {
  .problem-points {
    grid-template-columns: repeat(2, 1fr);
    gap: var(--space-8);
  }
}

.problem-point {
  padding: var(--space-6);
  background-color: var(--color-bg);
  border-radius: var(--radius-xl);
  border: 1px solid var(--color-border);
}

.problem-point-icon {
  width: 48px;
  height: 48px;
  display: flex;
  align-items: center;
  justify-content: center;
  background-color: var(--color-bg-alt);
  border-radius: var(--radius-lg);
  margin-bottom: var(--space-4);
  font-size: var(--font-size-2xl);
}

.problem-point h3 {
  font-size: var(--font-size-lg);
  margin-bottom: var(--space-2);
}

.problem-point p {
  font-size: var(--font-size-sm);
  color: var(--color-text-secondary);
  margin-bottom: 0;
}

/* --------------------------------------------------------------------------
   How It Works Section
   -------------------------------------------------------------------------- */
.how-it-works {
  background-color: var(--color-bg);
}

.how-it-works h2 {
  text-align: center;
  margin-bottom: var(--space-12);
}

.steps {
  display: grid;
  gap: var(--space-8);
  max-width: 900px;
  margin: 0 auto;
}

@media (min-width: 768px) {
  .steps {
    grid-template-columns: repeat(3, 1fr);
    gap: var(--space-10);
  }
}

.step {
  text-align: center;
}

.step-number {
  width: 64px;
  height: 64px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: linear-gradient(135deg, var(--color-primary) 0%, var(--color-primary-dark) 100%);
  color: white;
  font-size: var(--font-size-2xl);
  font-weight: 700;
  border-radius: var(--radius-2xl);
  margin: 0 auto var(--space-6);
  box-shadow: var(--shadow-lg);
}

.step h3 {
  margin-bottom: var(--space-3);
}

.step p {
  color: var(--color-text-secondary);
  margin-bottom: 0;
}

/* --------------------------------------------------------------------------
   Features Section
   -------------------------------------------------------------------------- */
.features {
  background-color: var(--color-white);
}

.features h2 {
  text-align: center;
  margin-bottom: var(--space-4);
}

.features-subtitle {
  text-align: center;
  color: var(--color-text-secondary);
  max-width: 600px;
  margin: 0 auto var(--space-12);
}

.feature-grid {
  display: grid;
  gap: var(--space-6);
}

@media (min-width: 768px) {
  .feature-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (min-width: 1024px) {
  .feature-grid {
    grid-template-columns: repeat(3, 1fr);
  }
}

.feature-card {
  padding: var(--space-8);
  background-color: var(--color-bg);
  border-radius: var(--radius-xl);
  border: 1px solid var(--color-border);
  transition: transform var(--transition-base), box-shadow var(--transition-base);
}

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

.feature-icon {
  width: 56px;
  height: 56px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: linear-gradient(135deg, var(--color-primary) 0%, var(--color-accent) 100%);
  border-radius: var(--radius-xl);
  margin-bottom: var(--space-5);
  font-size: var(--font-size-2xl);
}

.feature-card h3 {
  margin-bottom: var(--space-3);
}

.feature-card p {
  color: var(--color-text-secondary);
  font-size: var(--font-size-sm);
  margin-bottom: 0;
}

/* --------------------------------------------------------------------------
   Screenshots Section
   -------------------------------------------------------------------------- */
.screenshots {
  background-color: var(--color-bg);
  overflow: hidden;
}

.screenshots h2 {
  text-align: center;
  margin-bottom: var(--space-12);
}

.screenshot-gallery {
  display: flex;
  gap: var(--space-6);
  justify-content: center;
  flex-wrap: wrap;
}

.screenshot-item {
  position: relative;
  width: 200px;
  flex-shrink: 0;
}

@media (min-width: 768px) {
  .screenshot-item {
    width: 240px;
  }
}

.screenshot-item .device-bezel {
  width: 100%;
}

.screenshot-item .device-screenshot {
  top: 1.8%;
  left: 4.5%;
  width: 91%;
  aspect-ratio: 393 / 852;
  border-radius: 28px;
}

@media (min-width: 768px) {
  .screenshot-item .device-screenshot {
    border-radius: 32px;
  }
}

.screenshot-caption {
  text-align: center;
  margin-top: var(--space-4);
  font-size: var(--font-size-sm);
  color: var(--color-text-secondary);
  font-weight: 500;
}

/* --------------------------------------------------------------------------
   FAQ Section
   -------------------------------------------------------------------------- */
.faq {
  background-color: var(--color-white);
}

.faq h2 {
  text-align: center;
  margin-bottom: var(--space-12);
}

.faq-list {
  max-width: var(--container-prose);
  margin: 0 auto;
  display: flex;
  flex-direction: column;
  gap: var(--space-4);
}

.faq-item {
  border: 1px solid var(--color-border);
  border-radius: var(--radius-xl);
  overflow: hidden;
}

.faq-question {
  width: 100%;
  padding: var(--space-5) var(--space-6);
  background-color: var(--color-bg);
  border: none;
  text-align: left;
  font-family: inherit;
  font-size: var(--font-size-base);
  font-weight: 600;
  color: var(--color-text);
  cursor: pointer;
  display: flex;
  justify-content: space-between;
  align-items: center;
  transition: background-color var(--transition-fast);
}

.faq-question:hover {
  background-color: var(--color-bg-alt);
}

.faq-question::after {
  content: "+";
  font-size: var(--font-size-xl);
  font-weight: 400;
  color: var(--color-text-muted);
  transition: transform var(--transition-fast);
}

.faq-item.open .faq-question::after {
  transform: rotate(45deg);
}

.faq-answer {
  max-height: 0;
  overflow: hidden;
  transition: max-height var(--transition-slow);
}

.faq-item.open .faq-answer {
  max-height: 500px;
}

.faq-answer-inner {
  padding: 0 var(--space-6) var(--space-6);
  color: var(--color-text-secondary);
  font-size: var(--font-size-sm);
  line-height: 1.7;
}

/* --------------------------------------------------------------------------
   CTA Section
   -------------------------------------------------------------------------- */
.cta {
  background: linear-gradient(135deg, var(--color-primary-dark) 0%, var(--color-primary) 50%, var(--color-accent) 100%);
  color: white;
  text-align: center;
}

.cta h2 {
  color: white;
  margin-bottom: var(--space-4);
}

.cta p {
  color: rgba(255, 255, 255, 0.9);
  max-width: 500px;
  margin: 0 auto var(--space-8);
}

.cta .app-store-badge {
  filter: brightness(0) invert(1);
}

/* --------------------------------------------------------------------------
   Footer
   -------------------------------------------------------------------------- */
.footer {
  background-color: var(--color-bg-alt);
  padding: var(--space-12) 0;
  border-top: 1px solid var(--color-border);
}

.footer-content {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: var(--space-6);
  text-align: center;
}

@media (min-width: 768px) {
  .footer-content {
    flex-direction: row;
    justify-content: space-between;
    text-align: left;
  }
}

.footer-brand {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: var(--space-2);
}

@media (min-width: 768px) {
  .footer-brand {
    align-items: flex-start;
  }
}

.footer-logo {
  font-size: var(--font-size-lg);
  font-weight: 700;
  color: var(--color-text);
}

.footer-company {
  font-size: var(--font-size-sm);
  color: var(--color-text-muted);
}

.footer-links {
  display: flex;
  gap: var(--space-6);
}

.footer-links a {
  font-size: var(--font-size-sm);
  color: var(--color-text-secondary);
}

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

.footer-bottom {
  margin-top: var(--space-8);
  padding-top: var(--space-6);
  border-top: 1px solid var(--color-border);
  text-align: center;
}

.footer-copyright {
  font-size: var(--font-size-xs);
  color: var(--color-text-muted);
}

/* --------------------------------------------------------------------------
   Utility Classes
   -------------------------------------------------------------------------- */
.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

/* --------------------------------------------------------------------------
   Progressive Enhancement: FAQ Toggle (requires minimal JS)
   -------------------------------------------------------------------------- */
/*
   If JS is not available, FAQs will be expanded by default.
   Add this class via CSS-only method or JavaScript.
*/
.no-js .faq-answer {
  max-height: none;
}
