/* Geist Font */
@font-face {
  font-family: 'Geist';
  src: url('/assets/fonts/Geist/webfonts/Geist-Regular.woff2') format('woff2');
  font-weight: 400;
  font-style: normal;
  font-display: swap;
}

@font-face {
  font-family: 'Geist';
  src: url('/assets/fonts/Geist/webfonts/Geist-Medium.woff2') format('woff2');
  font-weight: 500;
  font-style: normal;
  font-display: swap;
}

@font-face {
  font-family: 'Geist';
  src: url('/assets/fonts/Geist/webfonts/Geist-SemiBold.woff2') format('woff2');
  font-weight: 600;
  font-style: normal;
  font-display: swap;
}

@font-face {
  font-family: 'Geist Mono';
  src: url('/assets/fonts/GeistMono/webfonts/GeistMono-Regular.woff2') format('woff2');
  font-weight: 400;
  font-style: normal;
  font-display: swap;
}

/* Design Tokens */
:root,
[data-theme="light"] {
  /* Colors - Light Mode */
  --color-background: #FAFAFA;
  --color-background-secondary: #F4F4F5;
  --color-foreground: #18181B;
  --color-foreground-secondary: #71717A;
  --color-foreground-tertiary: #A1A1AA;
  --color-accent: #EA580C;
  --color-accent-secondary: #FB923C;

  /* Typography */
  --font-sans: 'Geist', system-ui, sans-serif;
  --font-mono: 'Geist Mono', monospace;

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

  /* Layout */
  --max-width: 1200px;

  /* Fluid Typography */
  --font-size-hero-title: clamp(3.5rem, 8vw, 4.5rem);
  --font-size-hero-tagline: clamp(2rem, 4vw, 2.5rem);
  --font-size-section-title: clamp(1.25rem, 3vw, 2rem);

  /* Fluid Spacing */
  --space-section: clamp(1.5rem, 4vh, 2.25rem);

  /* Fluid Screenshot Sizes */
  --screenshot-home: clamp(180px, 22vw, 240px);
  --screenshot-feature: clamp(180px, 20vw, 220px);
}

/* Dark Mode */
[data-theme="dark"] {
  --color-background: #09090B;
  --color-background-secondary: #18181B;
  --color-foreground: #FAFAFA;
  --color-foreground-secondary: #A1A1AA;
  --color-foreground-tertiary: #71717A;
  --color-accent: #FB923C;
  --color-accent-secondary: #EA580C;
}

/* Theme toggle icon visibility */
[data-theme="light"] .icon-sun {
  display: none;
}

[data-theme="dark"] .icon-moon {
  display: none;
}

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

/* Base */
html {
  font-size: 16px;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

body {
  font-family: var(--font-sans);
  font-weight: 400;
  line-height: 1.5;
  color: var(--color-foreground);
  background-color: var(--color-background);
}

/* Typography */
h1, h2, h3 {
  font-weight: 600;
  line-height: 1.2;
}

h1 {
  font-size: 3rem;
  line-height: 1.1;
}

h2 {
  font-size: 2rem;
}

h3 {
  font-size: 1.5rem;
  font-weight: 500;
  line-height: 1.3;
}

p {
  color: var(--color-foreground-secondary);
}

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

a:hover {
  color: var(--color-accent);
}

/* Utilities */
.container {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 0 var(--space-md);
}


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

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

/* Header */
.header {
  position: sticky;
  top: 0;
  z-index: 100;
  background-color: var(--color-background);
  border-bottom: 1px solid var(--color-background-secondary);
}

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

.header-logo {
  display: flex;
  align-items: center;
  gap: var(--space-xs);
}

.header-icon {
  height: 1.75rem;
  width: auto;
}

.header-wordmark {
  font-size: 1.125rem;
  font-weight: 600;
  color: var(--color-foreground);
}

.header-nav {
  display: flex;
  gap: var(--space-lg);
  margin-left: auto;
  margin-right: var(--space-lg);
}

.header-nav a:not(.button) {
  font-size: 0.875rem;
  font-weight: 500;
  color: var(--color-foreground-secondary);
  transition: color 0.2s;
}

.header-nav a:not(.button):hover {
  color: var(--color-foreground);
}

.header-actions {
  display: flex;
  align-items: center;
  gap: var(--space-xs);
}

.theme-toggle {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 2.5rem;
  height: 2.5rem;
  background: none;
  border: none;
  border-radius: 0.5rem;
  color: var(--color-foreground-secondary);
  cursor: pointer;
  transition: color 0.2s, background-color 0.2s;
}

.theme-toggle:hover {
  color: var(--color-foreground);
  background-color: var(--color-background-secondary);
}

/* App Store Badge */
.app-store-badge {
  display: inline-block;
}

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

.badge-dark {
  display: none;
}

[data-theme="dark"] .badge-light {
  display: none;
}

[data-theme="dark"] .badge-dark {
  display: inline;
}

/* Footer */
.footer {
  margin-top: var(--space-2xl);
  padding: var(--space-xl) 0;
  border-top: 1px solid var(--color-background-secondary);
}

.footer-inner {
  display: grid;
  grid-template-columns: 1fr auto auto;
  gap: var(--space-xl);
  align-items: start;
}

.footer-icon {
  height: 2rem;
  width: auto;
}

.footer-tagline {
  margin-top: var(--space-xs);
  font-size: 0.875rem;
}

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

.footer-nav a {
  font-size: 0.875rem;
  color: var(--color-foreground-secondary);
}

.footer-social {
  display: flex;
  gap: var(--space-sm);
}

.footer-social a {
  color: var(--color-foreground-tertiary);
}

.footer-social a:hover {
  color: var(--color-accent);
}

.footer-copyright {
  grid-column: 1 / -1;
  padding-top: var(--space-lg);
  border-top: 1px solid var(--color-background-secondary);
}

.footer-copyright p {
  font-size: 0.75rem;
  color: var(--color-foreground-tertiary);
}

.product-link {
  display: inline-flex;
  align-items: center;
  gap: 0.25rem;
  font-size: 0.875rem;
  font-weight: 500;
  color: var(--color-accent);
}

.product-link svg {
  transition: transform 0.2s;
}

.product-link:hover svg {
  transform: translateX(4px);
}

/* Product Hero - Homepage */
.product-hero-home {
  padding: var(--space-section) 0;
}


.product-hero-home-inner {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: clamp(1rem, 3vw, 4rem);
  max-width: 500px;
  margin: 0 auto;
}

.product-hero-home-screenshot {
  width: clamp(80px, 20vw, 200px);
  flex-shrink: 1;
}

.product-hero-home-screenshot img {
  width: 100%;
  height: auto;
  animation: screenshotFadeIn 0.6s ease-out 0.1s both;
}

.product-hero-home-content {
  animation: contentFadeIn 0.6s ease-out 0.2s both;
}

@keyframes contentFadeIn {
  from {
    opacity: 0;
    transform: translateY(10px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.product-hero-home-title {
  font-size: clamp(1.5rem, 6vw, 4rem);
  font-weight: 600;
  margin-bottom: var(--space-xs);
}

.product-hero-home-tagline {
  font-size: clamp(0.875rem, 3vw, 2rem);
  color: var(--color-foreground-secondary);
  margin-bottom: clamp(0.75rem, 2vh, 2rem);
}

.product-hero-home-links {
  display: flex;
  align-items: center;
  gap: var(--space-md);
}

.product-hero-home-links .app-store-badge img {
  height: clamp(32px, 4vw, 40px);
}

/* Values Section */
.values {
  padding: var(--space-section) 0;
}

.values-grid {
  display: flex;
  gap: clamp(0.5rem, 1.5vw, 1.5rem);
  max-width: 900px;
  margin: 0 auto;
}

.value-card {
  flex: 1;
  padding: clamp(0.75rem, 2vw, 1.5rem);
  background-color: var(--color-background-secondary);
  border-radius: 12px;
  min-width: 0;
}

.value-icon {
  color: var(--color-accent);
  margin-bottom: clamp(0.375rem, 1vw, 0.75rem);
}

.value-icon svg {
  width: clamp(18px, 2.5vw, 24px);
  height: clamp(18px, 2.5vw, 24px);
}

.value-title {
  font-size: clamp(0.8125rem, 1.5vw, 1rem);
  font-weight: 600;
  margin-bottom: var(--space-xs);
}

.value-text {
  font-size: clamp(0.75rem, 1.25vw, 0.875rem);
  color: var(--color-foreground-secondary);
  line-height: 1.5;
}

@media (max-width: 600px) {
  .values-grid {
    flex-direction: column;
    gap: 0.5rem;
  }

  .value-card {
    padding: 0.625rem 0.875rem;
  }

  .value-icon {
    margin-bottom: 0.25rem;
  }

  .value-icon svg {
    width: 18px;
    height: 18px;
  }

  .value-title {
    font-size: 0.8125rem;
    margin-bottom: 0.125rem;
  }

  .value-text {
    font-size: 0.75rem;
    line-height: 1.4;
  }
}

/* Product Hero */
.product-hero {
  padding: var(--space-section) 0;
  text-align: center;
}

.product-hero h1 {
  font-size: var(--font-size-hero-title);
  margin-bottom: var(--space-xs);
}

.product-hero-subtitle {
  font-size: var(--font-size-hero-tagline);
  font-weight: 500;
  color: var(--color-foreground-secondary);
  margin-bottom: clamp(0.75rem, 2vh, 1.5rem);
}

/* Features */
.features {
  padding: 0;
}

.feature {
  padding: var(--space-xl) 0;
  border-top: 1px solid var(--color-background-secondary);
}

.feature:last-child {
  border-bottom: 1px solid var(--color-background-secondary);
}

.feature-content {
  max-width: 600px;
}

.feature-alt .feature-content {
  margin-left: auto;
}

.feature h2 {
  margin-bottom: var(--space-md);
}

.feature-list {
  list-style: none;
}

.feature-list li {
  padding: var(--space-xs) 0;
  color: var(--color-foreground-secondary);
  position: relative;
  padding-left: var(--space-md);
}

.feature-list li::before {
  content: "";
  position: absolute;
  left: 0;
  top: 50%;
  transform: translateY(-50%);
  width: 6px;
  height: 6px;
  background-color: var(--color-accent);
  border-radius: 50%;
}

/* Feature Showcase */
.feature-showcase {
  display: flex;
  align-items: center;
  gap: clamp(1.5rem, 4vw, 3rem);
  padding: clamp(1.5rem, 4vh, 3rem) 0;
}

.feature-showcase:first-child {
  padding-top: clamp(1rem, 3vh, 2rem);
}

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

.feature-screenshot {
  flex: 0 0 auto;
  width: var(--screenshot-feature);
}

.feature-screenshot img {
  width: 100%;
  height: auto;
  border-radius: 12px;
  animation: screenshotFadeIn 0.6s ease-out both;
}

.feature-showcase:nth-child(1) .feature-screenshot img {
  animation-delay: 0.1s;
}

.feature-showcase:nth-child(2) .feature-screenshot img {
  animation-delay: 0.2s;
}

.feature-showcase:nth-child(3) .feature-screenshot img {
  animation-delay: 0.3s;
}

@keyframes screenshotFadeIn {
  from {
    opacity: 0;
    transform: translateY(20px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.screenshot-dark {
  display: none;
}

.screenshot-light {
  display: block;
}

[data-theme="dark"] .screenshot-dark {
  display: block;
}

[data-theme="dark"] .screenshot-light {
  display: none;
}

.feature-details {
  flex: 1;
}

.feature-details h2 {
  font-size: clamp(1.5rem, 3vw, 2rem);
  margin-bottom: var(--space-sm);
}

.feature-details p {
  color: var(--color-foreground-secondary);
  line-height: 1.6;
  font-size: clamp(1rem, 1.5vw, 1.125rem);
}

@media (max-width: 640px) {
  .feature-showcase {
    flex-direction: column;
    text-align: center;
  }

  .feature-showcase-alt {
    flex-direction: column;
  }

  .feature-screenshot {
    width: clamp(120px, 35vw, 180px);
  }

  .feature-alt .feature-content {
    margin-left: 0;
  }
}

/* Product CTA */
.product-cta {
  padding: var(--space-2xl) 0;
  text-align: center;
}

/* Page Content */
.page-content {
  padding: var(--space-2xl) 0;
}

/* Prose */
.prose {
  max-width: 650px;
  line-height: 1.7;
}

.prose h1 {
  margin-bottom: var(--space-lg);
}

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

.prose h2:first-of-type {
  margin-top: var(--space-lg);
}

.prose p {
  margin-bottom: var(--space-md);
  color: var(--color-foreground-secondary);
}

.prose ul {
  margin-bottom: var(--space-md);
  padding-left: var(--space-lg);
  color: var(--color-foreground-secondary);
}

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

.prose strong {
  color: var(--color-foreground);
  font-weight: 600;
}

.prose a {
  color: var(--color-accent);
}

.prose p:last-child {
  margin-top: var(--space-xl);
  margin-bottom: 0;
  color: var(--color-foreground-tertiary);
  font-size: 0.875rem;
}

/* Page Subtitle */
.page-subtitle {
  color: var(--color-foreground-secondary);
  margin-bottom: var(--space-xl);
}

/* Changelog */
.changelog {
  max-width: 650px;
}

.changelog-entry {
  padding: clamp(1.5rem, 4vh, 3rem) 0;
  border-bottom: 1px solid var(--color-background-secondary);
}

.changelog-entry:first-child {
  padding-top: 0;
}

.changelog-entry-latest {
  border-left: 3px solid var(--color-accent);
  padding-left: var(--space-md);
  margin-left: calc(var(--space-md) * -1);
}

.changelog-header {
  display: flex;
  align-items: center;
  gap: var(--space-sm);
  margin-bottom: var(--space-md);
  flex-wrap: wrap;
}

.changelog-version {
  display: inline-block;
  padding: 0.375rem 0.75rem;
  background-color: var(--color-background-secondary);
  border-radius: 0.375rem;
  font-family: var(--font-mono);
  font-size: clamp(1rem, 2vw, 1.125rem);
  font-weight: 600;
}

.changelog-latest-badge {
  font-size: 0.75rem;
  font-weight: 500;
  padding: 0.25rem 0.5rem;
  border-radius: 1rem;
  background-color: var(--color-accent);
  color: white;
}

.changelog-date {
  color: var(--color-foreground-tertiary);
  font-size: 0.875rem;
}

.changelog-list {
  list-style: none;
}

.changelog-item {
  padding: var(--space-xs) 0;
  color: var(--color-foreground-secondary);
  font-size: clamp(0.875rem, 1.5vw, 0.9375rem);
  display: flex;
  align-items: baseline;
  gap: var(--space-sm);
}

.changelog-type {
  font-size: 0.6875rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  padding: 0.125rem 0.375rem;
  border-radius: 0.25rem;
  background-color: var(--color-background-secondary);
  color: var(--color-foreground-tertiary);
  flex-shrink: 0;
}

.changelog-item-new .changelog-type {
  background-color: var(--color-accent);
  color: white;
}

.changelog-item-fixed .changelog-type {
  background-color: var(--color-background-secondary);
}

.changelog-item-improved .changelog-type {
  background-color: var(--color-background-secondary);
}

/* Mobile Header */
.header-toggle {
  display: none;
  align-items: center;
  justify-content: center;
  width: 2.5rem;
  height: 2.5rem;
  background: none;
  border: none;
  border-radius: 0.5rem;
  color: var(--color-foreground-secondary);
  cursor: pointer;
  transition: color 0.2s, background-color 0.2s;
}

.header-toggle:hover {
  color: var(--color-foreground);
  background-color: var(--color-background-secondary);
}

@media (max-width: 768px) {
  .header-inner {
    position: relative;
  }

  .header-toggle {
    display: flex;
  }

  .header-nav {
    position: absolute;
    top: 100%;
    right: var(--space-md);
    flex-direction: column;
    background-color: var(--color-background);
    padding: var(--space-xs) 0;
    gap: 0;
    display: none;
    border-radius: 8px;
    border: 1px solid var(--color-background-secondary);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
    min-width: 150px;
    margin-top: var(--space-xs);
    z-index: 100;
  }

  [data-theme="dark"] .header-nav {
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
  }

  .nav-open .header-nav {
    display: flex;
  }

  .header-nav a {
    font-size: 0.875rem;
    padding: var(--space-xs) var(--space-md);
    border-bottom: 1px solid var(--color-background-secondary);
  }

  .header-nav a:last-child {
    border-bottom: none;
  }

  .header-nav a:hover {
    background-color: var(--color-background-secondary);
  }

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

  .footer-inner {
    display: flex !important;
    flex-direction: column;
    align-items: center;
    text-align: center;
    gap: var(--space-md);
  }

  .footer-brand,
  .footer-nav,
  .footer-social,
  .footer-copyright {
    display: flex;
    width: 100%;
    justify-content: center;
  }

  .footer-brand {
    flex-direction: column;
    align-items: center;
  }

  .footer-social {
    gap: var(--space-md);
  }

  .footer-social a {
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--color-foreground-secondary);
  }

  .footer-social svg {
    width: 24px;
    height: 24px;
  }

  .footer-nav {
    flex-wrap: wrap;
    gap: var(--space-sm);
  }

  .footer-copyright {
    grid-column: auto;
    padding-top: var(--space-md);
    border-top: none;
  }

  /* Feature sections mobile */
  .feature-alt .feature-content {
    margin-left: 0;
  }

}
