/* ============================================================
   Unfed marketing site — shared styles
   Dark theme matching the in-app design system (theme.ts darkColors)
   ============================================================ */

:root {
  --bg: #0F0F0F;
  --surface: #1C1C1E;
  --surface-elevated: #2C2C2E;
  --text: #F5F5F7;
  --text-secondary: #AEAEB2;
  --text-tertiary: #6E6E73;
  --border: #2C2C2E;
  --border-light: #38383A;
  --accent: #D4A043;
  --accent-light: #E8C88A;
  --accent-dark: #B88A35;
  --accent-soft: rgba(212, 160, 67, 0.12);
  --success: #34C759;
  --error: #FF453A;

  --content-max: 1100px;
  --prose-max: 720px;
}

* {
  box-sizing: border-box;
}

html,
body {
  margin: 0;
  padding: 0;
  background: var(--bg);
  color: var(--text);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  overflow-x: hidden;
}

body {
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  font-size: 16px;
  line-height: 1.7;
  background:
    radial-gradient(ellipse at top, rgba(212, 160, 67, 0.08) 0%, transparent 50%),
    radial-gradient(ellipse at bottom, rgba(212, 160, 67, 0.04) 0%, transparent 60%),
    var(--bg);
  background-attachment: fixed;
  min-height: 100vh;
  text-size-adjust: 100%;
  -webkit-text-size-adjust: 100%;
}

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

/* ─── Layout ─────────────────────────────────────────────── */

.container {
  max-width: var(--content-max);
  margin: 0 auto;
  padding: 0 24px;
}

.container--prose {
  max-width: var(--prose-max);
}

main {
  min-height: calc(100vh - 200px);
}

section {
  padding: 80px 0;
}

@media (max-width: 640px) {
  section {
    padding: 56px 0;
  }
  .container {
    padding: 0 20px;
  }
}

@media (max-width: 380px) {
  section {
    padding: 44px 0;
  }
  .container {
    padding: 0 16px;
  }
}

/* ─── Header / Nav ─────────────────────────────────────────── */

.site-header {
  position: sticky;
  top: 0;
  z-index: 100;
  background: rgba(15, 15, 15, 0.85);
  backdrop-filter: saturate(180%) blur(16px);
  -webkit-backdrop-filter: saturate(180%) blur(16px);
  border-bottom: 1px solid var(--border);
}

.nav {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding-top: 18px;
  padding-bottom: 18px;
}

.brand {
  display: flex;
  align-items: center;
  gap: 10px;
  font-weight: 500;
  font-size: 1.125rem;
  letter-spacing: -0.01em;
  color: var(--text);
  text-decoration: none;
  border: none;
}

.brand:hover {
  border: none;
}

.brand-logo {
  width: 32px;
  height: 32px;
  border-radius: 8px;
  object-fit: cover;
  background: var(--surface-elevated);
}

.brand-name {
  color: var(--text);
}

.brand-name .accent {
  color: var(--accent);
}

.nav-links {
  display: flex;
  align-items: center;
  gap: 28px;
}

.nav-link {
  font-size: 0.9375rem;
  color: var(--text-secondary);
  text-decoration: none;
  border: none;
  transition: color 0.15s;
}

.nav-link:hover {
  color: var(--text);
  border: none;
}

.nav-link.is-active {
  color: var(--text);
}

@media (max-width: 640px) {
  .nav {
    padding-top: 14px;
    padding-bottom: 14px;
  }
  .nav-links {
    gap: 18px;
  }
  .nav-link {
    font-size: 0.875rem;
  }
}

@media (max-width: 380px) {
  .brand {
    font-size: 1rem;
    gap: 8px;
  }
  .brand-logo {
    width: 28px;
    height: 28px;
  }
  .nav-links {
    gap: 14px;
  }
  .nav-link {
    font-size: 0.8125rem;
  }
}

/* ─── Typography ─────────────────────────────────────────── */

h1,
h2,
h3 {
  margin: 0 0 16px;
  letter-spacing: -0.02em;
  line-height: 1.2;
}

h1 {
  font-size: clamp(2.25rem, 5vw, 3.5rem);
  font-weight: 700;
}

h2 {
  font-size: clamp(1.75rem, 3.5vw, 2.25rem);
  font-weight: 700;
}

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

p {
  margin: 0 0 14px;
  color: var(--text);
}

.lead {
  font-size: 1.125rem;
  color: var(--text-secondary);
  line-height: 1.6;
}

.eyebrow {
  display: inline-block;
  font-size: 0.8125rem;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  font-weight: 600;
  color: var(--accent);
  margin-bottom: 12px;
}

ul,
ol {
  margin: 0 0 14px;
  padding-left: 20px;
}

li {
  margin-bottom: 6px;
  color: var(--text);
}

a {
  color: var(--accent);
  text-decoration: none;
  border-bottom: 1px solid rgba(212, 160, 67, 0.3);
  transition: border-color 0.15s, color 0.15s;
}

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

/* ─── Hero ───────────────────────────────────────────────── */

.hero {
  padding-top: 96px;
  padding-bottom: 80px;
  text-align: center;
}

.hero-icon {
  width: 88px;
  height: 88px;
  border-radius: 22px;
  margin: 0 auto 24px;
  display: block;
  box-shadow: 0 12px 32px rgba(212, 160, 67, 0.15);
}

.hero h1 {
  margin-bottom: 16px;
}

.hero .lead {
  max-width: 580px;
  margin: 0 auto 36px;
}

.hero-cta {
  display: flex;
  gap: 16px;
  justify-content: center;
  flex-wrap: wrap;
  margin-top: 8px;
}

@media (max-width: 640px) {
  .hero {
    padding-top: 56px;
    padding-bottom: 56px;
  }
  .hero-icon {
    width: 72px;
    height: 72px;
    border-radius: 18px;
  }
  .hero-cta {
    gap: 12px;
  }
}

@media (max-width: 420px) {
  .hero-cta {
    flex-direction: column;
    align-items: stretch;
  }
  .hero-cta .badge,
  .hero-cta .btn-primary {
    width: 100%;
    justify-content: center;
  }
}

/* ─── Buttons / Badges ───────────────────────────────────── */

.badge {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  height: 56px;
  padding: 0 22px;
  border-radius: 12px;
  background: #000;
  color: #fff;
  font-weight: 600;
  text-decoration: none;
  border: 1px solid var(--border-light);
  transition: transform 0.15s, border-color 0.15s;
}

.badge:hover {
  transform: translateY(-1px);
  border-color: var(--accent);
  border-bottom-color: var(--accent);
}

.badge-icon {
  width: 28px;
  height: 28px;
  flex-shrink: 0;
}

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

.badge-text small {
  font-size: 0.6875rem;
  font-weight: 400;
  letter-spacing: 0.02em;
  opacity: 0.75;
}

.badge-text strong {
  font-size: 1.0625rem;
  font-weight: 600;
  letter-spacing: -0.01em;
}

.btn-primary {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  height: 52px;
  padding: 0 28px;
  background: var(--accent);
  color: #1A1A1E;
  border-radius: 999px;
  font-weight: 600;
  font-size: 1rem;
  text-decoration: none;
  border: none;
  transition: background 0.15s, transform 0.15s;
}

.btn-primary:hover {
  background: var(--accent-light);
  border: none;
  transform: translateY(-1px);
}

/* ─── Cards ─────────────────────────────────────────────── */

.card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 16px;
  padding: 28px;
  min-width: 0;
}

@media (max-width: 480px) {
  .card {
    padding: 22px;
    border-radius: 14px;
  }
}

.card h3 {
  color: var(--text);
}

.card-icon {
  width: 44px;
  height: 44px;
  border-radius: 12px;
  background: var(--accent-soft);
  color: var(--accent);
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 16px;
  font-size: 1.5rem;
}

.feature-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 20px;
  margin-top: 40px;
}

@media (max-width: 480px) {
  .feature-grid {
    gap: 14px;
    margin-top: 28px;
  }
}

/* ─── Screenshots / Phone Mockups ────────────────────────── */

.shots-preview {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 36px 28px;
  margin-top: 48px;
}

@media (max-width: 640px) {
  .shots-preview {
    grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
    gap: 28px 18px;
    margin-top: 32px;
  }
}

.shot {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 14px;
  margin: 0;
}

.shot-frame {
  width: 100%;
  border-radius: 14px;
  overflow: hidden;
  background: var(--surface);
  border: 1px solid rgba(255, 255, 255, 0.08);
  box-shadow:
    0 1px 0 rgba(255, 255, 255, 0.06) inset,
    0 24px 48px -12px rgba(0, 0, 0, 0.55),
    0 10px 24px -8px rgba(0, 0, 0, 0.4);
  position: relative;
  transition: transform 0.35s cubic-bezier(0.2, 0.8, 0.2, 1),
              box-shadow 0.35s cubic-bezier(0.2, 0.8, 0.2, 1);
}

.shot:hover .shot-frame {
  transform: translateY(-4px);
  border-color: rgba(255, 255, 255, 0.12);
  box-shadow:
    0 1px 0 rgba(255, 255, 255, 0.08) inset,
    0 32px 64px -12px rgba(0, 0, 0, 0.65),
    0 14px 32px -8px rgba(212, 160, 67, 0.18);
}

.shot-frame img {
  width: 100%;
  height: auto;
  display: block;
  background: var(--surface);
}

.shot-label {
  font-size: 0.875rem;
  color: var(--text-secondary);
  text-align: center;
  margin: 0;
  letter-spacing: -0.005em;
  line-height: 1.4;
  max-width: 240px;
}

.shot-placeholder {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  width: 100%;
  aspect-ratio: 9 / 20;
  color: var(--text-tertiary);
  font-size: 0.8125rem;
  text-align: center;
  padding: 24px 16px;
  background:
    linear-gradient(180deg, rgba(212, 160, 67, 0.04), transparent 60%),
    var(--surface);
  line-height: 1.5;
}

.shot-placeholder small {
  display: block;
  margin-top: 6px;
  color: var(--text-tertiary);
  opacity: 0.7;
  font-size: 0.6875rem;
}

/* ─── Callouts ──────────────────────────────────────────── */

.callout {
  background: var(--accent-soft);
  border: 1px solid rgba(212, 160, 67, 0.3);
  border-radius: 14px;
  padding: 24px 28px;
  margin: 32px 0;
}

@media (max-width: 480px) {
  .callout {
    padding: 20px;
    border-radius: 12px;
  }
}

.callout strong {
  color: var(--accent);
}

/* ─── FAQ ───────────────────────────────────────────────── */

.faq {
  margin-top: 32px;
}

.faq-item {
  border-bottom: 1px solid var(--border);
  padding: 20px 0;
}

.faq-item summary {
  font-weight: 600;
  font-size: 1.0625rem;
  cursor: pointer;
  color: var(--text);
  list-style: none;
  position: relative;
  padding-right: 32px;
}

.faq-item summary::-webkit-details-marker {
  display: none;
}

.faq-item summary::after {
  content: '+';
  position: absolute;
  right: 0;
  top: 50%;
  transform: translateY(-50%);
  font-size: 1.5rem;
  color: var(--accent);
  font-weight: 400;
  transition: transform 0.15s;
}

.faq-item[open] summary::after {
  content: '−';
}

.faq-item p {
  margin-top: 14px;
  color: var(--text-secondary);
  line-height: 1.7;
}

/* ─── Footer ────────────────────────────────────────────── */

.site-footer {
  border-top: 1px solid var(--border);
  padding: 56px 0 32px;
  margin-top: 80px;
  color: var(--text-secondary);
}

@media (max-width: 640px) {
  .site-footer {
    padding: 40px 0 24px;
    margin-top: 48px;
  }
}

.footer-grid {
  display: grid;
  grid-template-columns: 2fr 1fr 1fr 1fr;
  gap: 40px;
}

@media (max-width: 768px) {
  .footer-grid {
    grid-template-columns: 1fr 1fr;
    gap: 32px;
  }
}

@media (max-width: 480px) {
  .footer-grid {
    grid-template-columns: 1fr;
    gap: 28px;
  }
}

.footer-col h4 {
  font-size: 0.8125rem;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  color: var(--text-tertiary);
  margin: 0 0 14px;
}

.footer-col ul {
  list-style: none;
  padding: 0;
  margin: 0;
}

.footer-col li {
  margin-bottom: 8px;
}

.footer-col a {
  color: var(--text-secondary);
  border: none;
  font-size: 0.9375rem;
}

.footer-col a:hover {
  color: var(--text);
  border: none;
}

.footer-brand p {
  color: var(--text-secondary);
  font-size: 0.9375rem;
  margin-top: 12px;
  max-width: 280px;
}

.footer-bottom {
  margin-top: 48px;
  padding-top: 24px;
  border-top: 1px solid var(--border);
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 12px;
  color: var(--text-tertiary);
  font-size: 0.875rem;
}

@media (max-width: 480px) {
  .footer-bottom {
    margin-top: 32px;
    flex-direction: column;
    text-align: center;
    gap: 8px;
  }
}

/* ─── Prose pages (privacy, terms) ─────────────────────────── */

.prose {
  max-width: var(--prose-max);
  margin: 0 auto;
  padding: 64px 24px 96px;
  word-wrap: break-word;
  overflow-wrap: break-word;
}

.prose h1 {
  font-size: 2.25rem;
  margin-bottom: 8px;
}

.prose h2 {
  font-size: 1.25rem;
  font-weight: 600;
  color: var(--accent);
  margin: 48px 0 12px;
  letter-spacing: -0.01em;
}

.prose .subtitle {
  color: var(--text-secondary);
  font-size: 0.95rem;
  margin: 0 0 48px;
}

@media (max-width: 640px) {
  .prose {
    padding: 40px 20px 64px;
  }
  .prose h1 {
    font-size: 1.875rem;
  }
  .prose h2 {
    margin: 36px 0 10px;
  }
  .prose .subtitle {
    margin-bottom: 32px;
  }
}

@media (max-width: 380px) {
  .prose {
    padding: 32px 16px 48px;
  }
}

/* ─── 404 ───────────────────────────────────────────────── */

.error-page {
  min-height: 60vh;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: 80px 24px;
}

.error-code {
  font-size: 5rem;
  font-weight: 700;
  color: var(--accent);
  margin: 0;
  letter-spacing: -0.04em;
  line-height: 1;
}

@media (max-width: 480px) {
  .error-page {
    padding: 56px 20px;
  }
  .error-code {
    font-size: 3.75rem;
  }
}

/* ─── Word wrapping (long emails, URLs, etc.) ─────────────── */

p,
li,
.faq-item p {
  word-wrap: break-word;
  overflow-wrap: break-word;
}
