/* ============================================================
   Nestfy Marketing Site — Global Styles
   Tokens mirror the product app (solo-api/apps/web/src/styles.css)
   ============================================================ */

*, *::before, *::after { box-sizing: border-box; }

:root {
  /* Brand */
  --nestfy-navy: #1a2740;
  --nestfy-ink: #101522;
  --nestfy-sand: #d8cbb6;
  --nestfy-mist: #f7f3ec;

  /* Surfaces */
  --color-bg-primary: var(--nestfy-mist);
  --color-bg-secondary: #f0ece3;
  --color-bg-elevated: #ffffff;

  /* Borders */
  --color-border: rgba(16, 21, 34, 0.08);
  --color-border-strong: rgba(16, 21, 34, 0.2);

  /* Text */
  --color-text-primary: var(--nestfy-ink);
  --color-text-secondary: rgba(16, 21, 34, 0.7);
  --color-text-muted: rgba(16, 21, 34, 0.5);

  /* Accent */
  --color-accent: var(--nestfy-navy);
  --color-accent-hover: #122035;

  /* Typography */
  --font-logo: "Cormorant Garamond", "Times New Roman", serif;
  --font-sans: "Inter", system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;

  /* Shadows */
  --shadow-sm: 0 4px 16px rgba(16, 21, 34, 0.08);
}

@media (prefers-color-scheme: dark) {
  :root { color-scheme: light; }
}

body {
  margin: 0;
  font-family: var(--font-sans);
  background: var(--color-bg-primary);
  color: var(--color-text-primary);
  min-height: 100vh;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

a { color: inherit; }

/* ---- Layout ---- */

.page-wrapper {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

.page-wrapper > main { flex: none; }

.container {
  max-width: 1120px;
  margin: 0 auto;
  padding-left: 2rem;
  padding-right: 2rem;
}

.container--narrow {
  max-width: 800px;
  margin: 0 auto;
  padding-left: 2rem;
  padding-right: 2rem;
}

/* ---- Typography ---- */

h1, h2, h3, h4 {
  margin: 0;
  font-family: var(--font-logo);
  font-weight: 400;
  line-height: 1.2;
  color: var(--nestfy-navy);
}

p { margin: 0; }

.label-caps {
  font-family: var(--font-sans);
  font-size: 0.6875rem;
  font-weight: 500;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--color-text-muted);
}

.body-text {
  font-size: 0.9375rem;
  color: var(--color-text-secondary);
  line-height: 1.7;
}

/* ---- Buttons / Links ---- */

.btn-primary {
  display: inline-flex;
  align-items: center;
  background: var(--color-accent);
  color: var(--nestfy-sand);
  padding: 0.75rem 1.75rem;
  border-radius: 999px;
  font-family: var(--font-sans);
  font-weight: 500;
  font-size: 0.875rem;
  text-decoration: none;
  letter-spacing: 0.015em;
  transition: all 0.2s ease;
  border: none;
  cursor: pointer;
}

.btn-primary:hover {
  background: var(--color-accent-hover);
  transform: translateY(-1px);
  box-shadow: var(--shadow-sm);
}

/* ============================================================
   Header
   ============================================================ */

.site-header {
  position: sticky;
  top: 0;
  z-index: 100;
  background: rgba(247, 243, 236, 0.85);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border-bottom: 1px solid rgba(226, 224, 218, 0.4);
}

.site-header .inner {
  max-width: 1120px;
  margin: 0 auto;
  padding: 1rem 2rem;
  display: flex;
  align-items: center;
  gap: 2rem;
}

.site-header .logo-link {
  display: inline-flex;
  align-items: center;
  text-decoration: none;
}

.site-header .logo-wrap {
  height: 45px;
  overflow: hidden;
}

.site-header .logo-wrap img {
  height: 72px;
  display: block;
  margin-top: -14px;
  margin-left: -13px;
}

.site-header nav {
  display: flex;
  gap: 2rem;
  margin-left: auto;
  align-items: center;
}

.site-header .nav-link {
  text-decoration: none;
  color: rgba(16, 21, 34, 0.45);
  font-size: 0.8125rem;
  font-weight: 450;
  transition: color 0.2s ease;
}

.site-header .nav-link:hover,
.site-header .nav-link[aria-current="page"] {
  color: rgba(16, 21, 34, 0.7);
}

.site-header .actions {
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

.site-header .sign-in {
  color: rgba(16, 21, 34, 0.45);
  font-size: 0.8125rem;
  font-weight: 400;
  text-decoration: none;
  padding: 0.5rem 0.75rem;
  transition: color 0.2s ease;
}

.site-header .sign-in:hover {
  color: rgba(16, 21, 34, 0.7);
}

.site-header .cta {
  display: inline-flex;
  align-items: center;
  background: var(--nestfy-navy);
  color: var(--nestfy-sand);
  padding: 0.5rem 1.2rem;
  border-radius: 999px;
  font-size: 0.8125rem;
  font-weight: 500;
  text-decoration: none;
  letter-spacing: 0.01em;
  transition: all 0.2s ease;
}

.site-header .cta:hover {
  background: var(--color-accent-hover);
  transform: translateY(-1px);
  box-shadow: 0 4px 12px rgba(16, 21, 34, 0.15);
}

.menu-toggle {
  display: none;
  flex-direction: column;
  justify-content: center;
  gap: 0.35rem;
  border: none;
  background: transparent;
  padding: 0.25rem;
  cursor: pointer;
  margin-left: auto;
}

.menu-toggle span {
  width: 20px;
  height: 2px;
  background: var(--nestfy-navy);
  display: block;
}

/* ============================================================
   Footer
   ============================================================ */

.site-footer {
  border-top: 1px solid var(--color-border);
  padding: 2.5rem 2rem 1.5rem;
  margin-top: 2.5rem;
}

.site-footer .inner {
  max-width: 1120px;
  margin: 0 auto;
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 3rem;
}

.site-footer .brand-name {
  font-family: var(--font-logo);
  font-size: 1.375rem;
  font-weight: 400;
  color: var(--nestfy-navy);
  letter-spacing: 0.02em;
}

.site-footer .tagline {
  font-size: 0.8125rem;
  color: var(--color-text-muted);
  line-height: 1.55;
  max-width: 280px;
  margin-top: 0.3rem;
}

.site-footer .columns {
  display: flex;
  gap: 4rem;
}

.site-footer .col {
  display: flex;
  flex-direction: column;
  gap: 0.65rem;
}

.site-footer .col-title {
  font-size: 0.6875rem;
  font-weight: 500;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--color-text-muted);
  margin-bottom: 0.2rem;
}

.site-footer .foot-link {
  text-decoration: none;
  color: var(--color-text-secondary);
  font-size: 0.8125rem;
  transition: color 0.2s ease;
}

.site-footer .foot-link:hover {
  color: var(--color-text-primary);
}

.site-footer .bottom-bar {
  max-width: 1120px;
  margin: 1.5rem auto 0;
  padding: 1rem 2rem 0;
  border-top: 1px solid var(--color-border);
  font-size: 0.75rem;
  color: var(--color-text-muted);
}

/* ============================================================
   Page: Home
   ============================================================ */

/* Hero */
.hero {
  padding: 4rem 0 0;
  text-align: center;
}

.hero h1 {
  font-size: 3rem;
  letter-spacing: 0.01em;
  line-height: 1.18;
  max-width: 700px;
  margin: 0 auto 1rem;
}

.hero .sub {
  font-size: 1.0625rem;
  color: var(--color-text-secondary);
  line-height: 1.65;
  max-width: 560px;
  margin: 0 auto 1.5rem;
}

.hero .btn-primary {
  padding: 0.9rem 2rem;
  font-size: 0.9375rem;
}

.final-cta .btn-primary {
  padding: 0.9rem 2rem;
  font-size: 0.9375rem;
}

/* Sections — shared rhythm */
.section {
  padding: 2.75rem 0;
}

.section:first-child {
  padding-top: 2.25rem;
}

.section + .section {
  /* no divider — whitespace only */
}

.section-label {
  font-family: var(--font-sans);
  font-size: 0.6875rem;
  font-weight: 500;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: rgba(16, 21, 34, 0.35);
  margin-bottom: 0.5rem;
}

.section h2 {
  font-size: 2rem;
  margin-bottom: 1rem;
  line-height: 1.2;
  font-weight: 400;
}

.section .lead {
  font-size: 1rem;
  color: var(--color-text-secondary);
  line-height: 1.75;
  max-width: 500px;
  margin-bottom: 2rem;
}

/* Card grid (pillars, outcomes) */
.card-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1.25rem;
  align-items: stretch;
}

.card {
  background: var(--color-bg-elevated);
  border: 1px solid var(--color-border);
  border-radius: 20px;
  padding: 2.25rem 2rem;
  display: flex;
  flex-direction: column;
}

.card .card-label {
  font-family: var(--font-sans);
  font-size: 0.625rem;
  font-weight: 500;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: rgba(16, 21, 34, 0.3);
  margin-bottom: 0.65rem;
}

.card h3 {
  font-size: 1.0625rem;
  color: var(--nestfy-ink);
  margin-bottom: 0.5rem;
  line-height: 1.35;
}

.card p {
  font-size: 0.875rem;
  color: var(--color-text-secondary);
  line-height: 1.75;
}

/* Two-column prose (Who it's for, Why exists) */
.prose-block {
  font-size: 0.9375rem;
  color: var(--color-text-secondary);
  line-height: 1.7;
  max-width: 600px;
}

.prose-block p + p {
  margin-top: 1rem;
}

/* Steps (How it works - light) */
.steps {
  display: flex;
  flex-direction: column;
  gap: 2rem;
  max-width: 580px;
}

.step {
  display: flex;
  gap: 1.5rem;
  align-items: flex-start;
}

.step-num {
  font-family: var(--font-logo);
  font-size: 1.75rem;
  font-weight: 400;
  color: var(--nestfy-sand);
  line-height: 1;
  min-width: 2.25rem;
  padding-top: 0.1rem;
}

.step h3 {
  font-size: 1.125rem;
  color: var(--nestfy-ink);
  margin-bottom: 0.35rem;
}

.step p {
  font-size: 0.875rem;
  color: var(--color-text-secondary);
  line-height: 1.65;
}

/* Trust — inline statement (subtle card) */
.trust-statement {
  font-size: 0.8125rem;
  color: var(--color-text-secondary);
  line-height: 1.6;
  max-width: 580px;
  text-align: center;
  margin: 0 auto 2rem;
  background: var(--color-bg-elevated);
  border: 1px solid var(--color-border);
  border-radius: 16px;
  padding: 1.25rem 2rem;
}

/* Trust — boxed (inner pages) */
.trust-box {
  background: var(--color-bg-elevated);
  border: 1px solid var(--color-border);
  border-radius: 20px;
  padding: 2rem 2.25rem;
  max-width: 600px;
}

.trust-box h3 {
  font-size: 1.125rem;
  color: var(--nestfy-ink);
  margin-bottom: 0.5rem;
}

.trust-box p {
  font-size: 0.875rem;
  color: var(--color-text-secondary);
  line-height: 1.65;
}

/* Final CTA */
.final-cta {
  text-align: center;
  padding: 3rem 0 0;
}

.final-cta h2 {
  font-size: 2.25rem;
  margin-bottom: 0.75rem;
}

.final-cta .sub {
  font-size: 0.9375rem;
  color: var(--color-text-secondary);
  line-height: 1.6;
  max-width: 480px;
  margin: 0 auto 1.5rem;
}

/* ============================================================
   Pages: How, Why (content pages)
   ============================================================ */

.content-page {
  padding: 4.5rem 0 3rem;
}

.content-page h1 {
  font-size: 2.5rem;
  margin-bottom: 2.5rem;
}

.content-page .intro {
  font-size: 1rem;
  color: var(--color-text-secondary);
  line-height: 1.65;
  margin-bottom: 3rem;
  max-width: 600px;
}

/* Divider-separated list (Why page) */
.point-list {
  display: flex;
  flex-direction: column;
  gap: 2rem;
}

.point {
  padding-bottom: 2rem;
  border-bottom: 1px solid var(--color-border);
}

.point:last-child {
  border-bottom: none;
  padding-bottom: 0;
}

.point h3 {
  font-size: 1.25rem;
  color: var(--nestfy-ink);
  margin-bottom: 0.5rem;
}

.point p {
  font-size: 0.875rem;
  color: var(--color-text-secondary);
  line-height: 1.65;
}

/* Closing card (How page) */
.closing-card {
  margin-top: 2.5rem;
  background: var(--color-bg-elevated);
  border: 1px solid var(--color-border);
  border-radius: 20px;
  padding: 2rem;
}

.closing-card h3 {
  font-size: 1.25rem;
  color: var(--nestfy-navy);
  margin-bottom: 0.5rem;
}

.closing-card p {
  font-size: 0.875rem;
  color: var(--color-text-secondary);
  line-height: 1.65;
}

/* CTA block on content pages */
.page-cta {
  margin-top: 3rem;
  text-align: center;
}

.page-cta h2 {
  font-size: 1.75rem;
  margin-bottom: 1.5rem;
}

/* ============================================================
   Pages: Legal (Privacy, Terms)
   ============================================================ */

.legal-page {
  padding: 5rem 0 3rem;
}

.legal-page h1 {
  font-size: 2.5rem;
  margin-bottom: 0.5rem;
}

.legal-page .updated {
  font-size: 0.8125rem;
  color: var(--color-text-muted);
  margin-bottom: 3rem;
}

.legal-section {
  margin-bottom: 2.5rem;
}

.legal-section h2 {
  font-size: 1.25rem;
  color: var(--nestfy-ink);
  margin-bottom: 0.75rem;
}

.legal-section p {
  font-size: 0.875rem;
  color: var(--color-text-secondary);
  line-height: 1.7;
  margin-bottom: 0.75rem;
}

.legal-section ul {
  margin: 0.5rem 0 1rem;
  padding-left: 1.25rem;
  font-size: 0.875rem;
  color: var(--color-text-secondary);
  line-height: 1.7;
}

.legal-section li {
  margin-bottom: 0.35rem;
}

.contact-note {
  margin-top: 3rem;
  padding: 1.5rem 2rem;
  background: var(--color-bg-elevated);
  border: 1px solid var(--color-border);
  border-radius: 16px;
  font-size: 0.875rem;
  color: var(--color-text-secondary);
  line-height: 1.6;
}

.contact-note a {
  color: var(--nestfy-navy);
  text-decoration: none;
}

.contact-note a:hover {
  text-decoration: underline;
}

/* ============================================================
   Responsive
   ============================================================ */

@media (max-width: 768px) {
  .container, .container--narrow {
    padding-left: 1.25rem;
    padding-right: 1.25rem;
  }

  /* Header */
  .site-header .inner {
    flex-wrap: wrap;
    padding: 0.75rem 1.25rem;
    gap: 0;
  }
  .menu-toggle { display: inline-flex; }
  .site-header nav {
    display: none;
    flex-direction: column;
    gap: 1.25rem;
    width: 100%;
    order: 3;
    padding: 1.25rem 0 0.5rem;
    margin-left: 0;
  }
  .site-header nav.open { display: flex; }
  .site-header .actions {
    display: none;
    width: 100%;
    order: 4;
    padding: 0.75rem 0 0.5rem;
    border-top: 1px solid var(--color-border);
    margin-top: 0.75rem;
  }
  .site-header .actions.open { display: flex; }

  /* Hero */
  .hero { padding: 3rem 0 0; }
  .hero h1 { font-size: 2.125rem; }
  .hero .sub { font-size: 0.9375rem; }

  /* Card grid → stack */
  .card-grid {
    grid-template-columns: 1fr;
  }

  /* Section spacing */
  .section { padding: 2.25rem 0; }
  .section:first-child { padding-top: 1.75rem; }
  .section h2 { font-size: 1.75rem; }

  /* Footer */
  .site-footer .inner {
    flex-direction: column;
    gap: 2.5rem;
  }
  .site-footer .columns { gap: 2.5rem; }
  .site-footer .bottom-bar { padding-left: 0; padding-right: 0; }

  /* Content pages */
  .content-page { padding: 3rem 0 2rem; }
  .content-page h1 { font-size: 2rem; margin-bottom: 2rem; }
  .legal-page { padding: 3rem 0 2rem; }
  .legal-page h1 { font-size: 2rem; }

  .final-cta { padding: 2rem 0 0; }
  .final-cta h2 { font-size: 1.75rem; }

  .site-footer { margin-top: 2rem; }
}
