:root {
  --bg: #f7f5f2;
  --surface: #ffffff;
  --ink: #1a1a1a;
  --ink-soft: #4a4a4a;
  --muted: #6b6b6b;
  --border: rgba(0, 0, 0, 0.08);
  --accent: #9a8b7a;
  --accent-dark: #7d6f61;
  --accent-light: #b8ada0;
  --shadow-sm: 0 1px 2px rgba(0, 0, 0, 0.04);
  --shadow: 0 8px 30px rgba(0, 0, 0, 0.06);
  --shadow-lg: 0 24px 60px rgba(0, 0, 0, 0.08);
  --radius: 18px;
  --radius-sm: 12px;
  --font-sans:
    'Inter', ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  --font-serif: 'Cormorant Garamond', ui-serif, Georgia, serif;
  --font-mono: 'JetBrains Mono', ui-monospace, SFMono-Regular, Menlo, monospace;
  --max-width: 1200px;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }
}

body {
  margin: 0;
  font-family: var(--font-sans);
  font-size: 16px;
  line-height: 1.6;
  color: var(--ink);
  background: var(--bg);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

.skip-link {
  position: absolute;
  left: -9999px;
  top: -9999px;
  z-index: 100;
  padding: 0.5rem 1rem;
  background: var(--ink);
  color: var(--bg);
  border-radius: var(--radius-sm);
}

.skip-link:focus {
  left: 1rem;
  top: 1rem;
}

.container {
  width: min(92%, var(--max-width));
  margin-inline: auto;
}

.section-padding {
  padding-block: clamp(4rem, 10vw, 8rem);
}

.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;
}

/* Typography */
h1,
h2,
h3 {
  margin: 0;
  font-weight: 400;
  line-height: 1.15;
  letter-spacing: -0.02em;
}

h1,
h2 {
  font-family: var(--font-serif);
}

p {
  margin: 0;
}

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

.eyebrow {
  font-family: var(--font-mono);
  font-size: 0.75rem;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  color: var(--accent);
  margin-block-end: 1rem;
}

.section-header {
  max-width: 640px;
  margin-block-end: 3.5rem;
}

.section-title {
  font-size: clamp(2rem, 4.5vw, 3.25rem);
  margin-block-end: 1rem;
}

.section-subtitle {
  font-size: clamp(1rem, 1.5vw, 1.25rem);
  color: var(--ink-soft);
  line-height: 1.6;
}

/* Buttons */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  padding: 0.875rem 1.75rem;
  font-family: var(--font-sans);
  font-size: 0.9375rem;
  font-weight: 500;
  border-radius: 999px;
  border: 1px solid transparent;
  cursor: pointer;
  transition:
    transform 180ms ease,
    box-shadow 180ms ease,
    background 180ms ease,
    border-color 180ms ease;
}

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

.btn:active {
  transform: translateY(0);
}

.btn-primary {
  background: var(--ink);
  color: var(--bg);
  box-shadow: var(--shadow-sm);
}

.btn-primary:hover {
  background: #000;
  box-shadow: var(--shadow);
}

.btn-secondary {
  background: var(--surface);
  color: var(--ink);
  border-color: var(--border);
  box-shadow: var(--shadow-sm);
}

.btn-secondary:hover {
  border-color: rgba(0, 0, 0, 0.18);
  box-shadow: var(--shadow);
}

.btn-small {
  padding: 0.5rem 1.125rem;
  font-size: 0.875rem;
}

/* Header */
.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: rgba(247, 245, 242, 0.82);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--border);
}

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

.logo {
  display: inline-flex;
  align-items: center;
  gap: 0.625rem;
  font-family: var(--font-serif);
  font-size: 1.5rem;
  font-weight: 600;
  letter-spacing: -0.03em;
}

.logo-mark {
  width: 28px;
  height: 28px;
  border-radius: 50%;
  background: radial-gradient(circle at 35% 35%, var(--accent-light), var(--accent));
  box-shadow: inset 0 0 0 1px rgba(0, 0, 0, 0.06);
}

.site-nav {
  display: none;
  align-items: center;
  gap: 2rem;
  font-size: 0.9375rem;
  color: var(--ink-soft);
}

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

@media (min-width: 720px) {
  .site-nav {
    display: flex;
  }
}

/* Hero */
.hero {
  padding-block: clamp(4rem, 10vw, 7rem);
  overflow: hidden;
}

.hero-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 3rem;
  align-items: center;
}

@media (min-width: 900px) {
  .hero-grid {
    grid-template-columns: 1.1fr 0.9fr;
    gap: 4rem;
  }
}

.hero-title {
  font-size: clamp(2.5rem, 6vw, 4.5rem);
  line-height: 1.05;
  margin-block-end: 1.25rem;
}

.hero-subtitle {
  font-size: clamp(1.0625rem, 1.6vw, 1.25rem);
  color: var(--ink-soft);
  max-width: 520px;
  margin-block-end: 2rem;
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.875rem;
}

/* Phone mockup */
.hero-visual {
  display: flex;
  justify-content: center;
}

.phone {
  width: min(280px, 80vw);
  aspect-ratio: 9 / 19;
  background: var(--ink);
  border-radius: 44px;
  padding: 12px;
  box-shadow: var(--shadow-lg);
  position: relative;
}

.phone-notch {
  position: absolute;
  top: 12px;
  left: 50%;
  transform: translateX(-50%);
  width: 38%;
  height: 24px;
  background: var(--ink);
  border-radius: 0 0 16px 16px;
  z-index: 2;
}

.phone-screen {
  width: 100%;
  height: 100%;
  background: var(--bg);
  border-radius: 34px;
  overflow: hidden;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 1.25rem;
}

.photo-card {
  width: 100%;
  background: var(--surface);
  border-radius: var(--radius);
  padding: 0.75rem;
  box-shadow: var(--shadow);
}

.photo-frame {
  width: 100%;
  aspect-ratio: 4 / 5;
  border-radius: var(--radius-sm);
  overflow: hidden;
  margin-block-end: 0.875rem;
}

.photo-placeholder {
  width: 100%;
  height: 100%;
  background: linear-gradient(135deg, #e6e2dc 0%, #d4cec6 50%, #c7c0b6 100%);
  position: relative;
}

.photo-placeholder::after {
  content: '';
  position: absolute;
  inset: 0;
  background: radial-gradient(circle at 30% 30%, rgba(255, 255, 255, 0.4), transparent 50%);
}

.mood-chip {
  display: inline-flex;
  align-items: center;
  gap: 0.375rem;
  font-family: var(--font-mono);
  font-size: 0.6875rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--accent-dark);
  background: rgba(154, 139, 122, 0.1);
  padding: 0.25rem 0.625rem;
  border-radius: 999px;
  margin-block-end: 0.625rem;
}

.mood-dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--accent);
}

.photo-title {
  font-family: var(--font-serif);
  font-size: 1.125rem;
  font-weight: 500;
  margin-block-end: 0.25rem;
}

.photo-desc {
  font-size: 0.8125rem;
  color: var(--muted);
  line-height: 1.5;
}

/* Bento grid */
.bento-grid {
  display: grid;
  grid-template-columns: repeat(1, 1fr);
  gap: 1.25rem;
}

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

.bento-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1.75rem;
  box-shadow: var(--shadow-sm);
  transition:
    transform 220ms ease,
    box-shadow 220ms ease,
    border-color 220ms ease;
}

.bento-card:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow);
  border-color: rgba(0, 0, 0, 0.14);
}

.bento-large {
  grid-column: span 1;
}

@media (min-width: 900px) {
  .bento-large {
    grid-column: span 2;
  }
}

.card-icon {
  font-family: var(--font-mono);
  font-size: 0.8125rem;
  color: var(--accent);
  margin-block-end: 1rem;
}

.bento-card h3 {
  font-family: var(--font-serif);
  font-size: 1.625rem;
  margin-block-end: 0.5rem;
}

.bento-card p {
  color: var(--ink-soft);
  line-height: 1.6;
}

/* How it works */
.how-it-works {
  background: var(--surface);
  border-block: 1px solid var(--border);
}

.steps {
  display: grid;
  grid-template-columns: repeat(1, 1fr);
  gap: 2rem;
  counter-reset: step;
  list-style: none;
  padding: 0;
  margin: 0;
}

@media (min-width: 720px) {
  .steps {
    grid-template-columns: repeat(4, 1fr);
  }
}

.step {
  position: relative;
}

.step-number {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background: var(--bg);
  border: 1px solid var(--border);
  font-family: var(--font-mono);
  font-size: 0.875rem;
  color: var(--accent-dark);
  margin-block-end: 1.125rem;
}

.step h3 {
  font-family: var(--font-serif);
  font-size: 1.375rem;
  margin-block-end: 0.375rem;
}

.step p {
  color: var(--ink-soft);
  font-size: 0.9375rem;
}

/* Open source */
.open-source {
  background: var(--ink);
  color: var(--bg);
}

.open-source .eyebrow {
  color: var(--accent-light);
}

.open-source .section-title {
  color: var(--surface);
}

.open-source p {
  color: rgba(247, 245, 242, 0.76);
  max-width: 520px;
  margin-block-end: 1.5rem;
}

.open-source-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 3rem;
  align-items: center;
}

@media (min-width: 900px) {
  .open-source-grid {
    grid-template-columns: 1fr 1fr;
  }
}

.open-source-stats {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1rem;
}

.stat {
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: var(--radius);
  padding: 1.5rem;
  text-align: center;
}

.stat-value {
  display: block;
  font-family: var(--font-serif);
  font-size: 2.25rem;
  color: var(--surface);
  line-height: 1;
  margin-block-end: 0.375rem;
}

.stat-label {
  font-size: 0.8125rem;
  color: rgba(247, 245, 242, 0.6);
  text-transform: uppercase;
  letter-spacing: 0.08em;
}

/* Waitlist */
.waitlist-inner {
  text-align: center;
  max-width: 560px;
  margin-inline: auto;
}

.waitlist-form {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
  margin-block-start: 2rem;
}

@media (min-width: 480px) {
  .waitlist-form {
    flex-direction: row;
  }
}

.waitlist-form input {
  flex: 1;
  padding: 0.875rem 1.25rem;
  font-family: var(--font-sans);
  font-size: 0.9375rem;
  border: 1px solid var(--border);
  border-radius: 999px;
  background: var(--surface);
  outline: none;
  transition:
    border-color 180ms ease,
    box-shadow 180ms ease;
}

.waitlist-form input:focus {
  border-color: var(--accent);
  box-shadow: 0 0 0 3px rgba(154, 139, 122, 0.15);
}

.waitlist-note {
  min-height: 1.5rem;
  margin-block-start: 0.875rem;
  font-size: 0.875rem;
  color: var(--muted);
}

/* Footer */
.site-footer {
  border-top: 1px solid var(--border);
  padding-block: 2.5rem;
}

.footer-inner {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 1.25rem;
  text-align: center;
}

.footer-brand {
  display: inline-flex;
  align-items: center;
  gap: 0.625rem;
  font-family: var(--font-serif);
  font-size: 1.25rem;
  font-weight: 600;
}

.footer-nav {
  display: flex;
  gap: 1.5rem;
  font-size: 0.9375rem;
  color: var(--ink-soft);
}

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

.copyright {
  font-size: 0.8125rem;
  color: var(--muted);
}

/* Reveal animations */
.reveal {
  opacity: 0;
  transform: translateY(24px);
  transition:
    opacity 600ms ease,
    transform 600ms ease;
}

.reveal.visible {
  opacity: 1;
  transform: translateY(0);
}

@media (prefers-reduced-motion: reduce) {
  .reveal {
    opacity: 1;
    transform: none;
    transition: none;
  }
}
