/* Kindklos — "Sticker Ledger" theme, matching the app (theme/palette.ts + theme/tokens.ts):
   forest ink on warm cream, with lavender / coral / mint / butter sticker accents.
   Radii follow the app's radius tokens (8 / 12 / 16 / 24 / pill). */

:root {
  /* Brand — forest ink ramp (palette.brand500/600/700) */
  --ink: #16281F;
  --ink-dark: #0F1D16;
  --ink-darker: #0A140F;

  /* Neutrals — warm cream ramp (palette.gray50…700) */
  --cream: #FDF8EC;
  --tint: #F3EAD5;
  --tint-border: #E9DFC5;
  --sand: #DDD0A8;
  --text-dark: #16281F;
  --text-mid: #4D4940;
  --text-light: #6B6555;
  --bg-page: #FDF8EC;
  --bg-card: #FFFFFF;
  --border: #E9DFC5;

  /* Sticker accents (palette.lavender/coral/mint/butter) + ink-graded hues */
  --lavender: #B9A8F0;
  --coral: #FF8B6B;
  --mint: #A8E0C4;
  --butter: #FCE79B;
  --coral-ink: #C24D2F;
  --mint-ink: #2F7D57;
  --mustard-ink: #A67C1B;

  /* Radii (tokens.radius) */
  --radius-sm: 8px;
  --radius-md: 12px;
  --radius-lg: 16px;
  --radius-xl: 24px;
  --radius-pill: 999px;

  /* Shadows tinted with the forest ink rather than pure black */
  --shadow-sm: 0 1px 2px 0 rgba(22, 40, 31, 0.05);
  --shadow-md: 0 4px 10px -2px rgba(22, 40, 31, 0.08), 0 2px 4px -1px rgba(22, 40, 31, 0.04);
  --shadow-lg: 0 12px 20px -6px rgba(22, 40, 31, 0.12), 0 4px 8px -2px rgba(22, 40, 31, 0.05);
  --shadow-xl: 0 24px 32px -10px rgba(22, 40, 31, 0.18), 0 10px 12px -6px rgba(22, 40, 31, 0.06);
}

* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

body {
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', 'Roboto', 'Oxygen',
               'Ubuntu', 'Cantarell', 'Fira Sans', 'Droid Sans', 'Helvetica Neue', sans-serif;
  line-height: 1.6;
  color: var(--text-dark);
  background-color: var(--bg-page);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

/* ── Header & Navigation ── */
header {
  background: var(--cream);
  border-bottom: 1px solid var(--border);
  padding: 0;
  position: sticky;
  top: 0;
  z-index: 1000;
}

nav {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 2rem;
  display: flex;
  justify-content: space-between;
  align-items: center;
  height: 64px;
  flex-wrap: wrap;
}

.logo {
  font-size: 1.375rem;
  font-weight: 700;
  color: var(--ink);
  text-decoration: none;
  letter-spacing: -0.02em;
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.logo-mark {
  width: 32px;
  height: 32px;
  border-radius: var(--radius-sm);
  display: inline-block;
  vertical-align: middle;
}

.logo-mark-sm {
  width: 24px;
  height: 24px;
  border-radius: 6px;
  margin-right: 0.25rem;
}

/* KiNDKLOS wordmark (359x59, forest ink on transparent) */
.logo-wordmark {
  height: 22px;
  width: auto;
  display: block;
}

.logo-wordmark-sm {
  height: 18px;
}

/* The footer is dark, so render the wordmark light there */
.footer-brand .logo-wordmark {
  filter: brightness(0) invert(1);
}

.nav-links {
  display: flex;
  gap: 0.375rem;
  list-style: none;
}

.nav-links a {
  color: var(--text-mid);
  text-decoration: none;
  font-weight: 500;
  font-size: 0.9375rem;
  padding: 0.375rem 0.875rem;
  border-radius: var(--radius-pill);
  transition: background-color 0.15s ease, color 0.15s ease;
}

.nav-links a:hover {
  color: var(--ink);
  background-color: var(--tint);
}

/* ── Hero Section ── */
.hero {
  background: var(--ink);
  color: var(--cream);
  padding: 6rem 2rem 5rem;
  text-align: center;
  position: relative;
  overflow: hidden;
  border-radius: var(--radius-xl);
}

/* Solid sticker blobs tucked into the corners, echoing the K-blobs icon */
.hero::before,
.hero::after,
.guide-hero::before,
.guide-hero::after {
  content: '';
  position: absolute;
  pointer-events: none;
}

.hero::before {
  width: 260px;
  height: 200px;
  top: -70px;
  right: -60px;
  background: var(--lavender);
  border-radius: 58% 42% 55% 45% / 50% 60% 40% 50%;
  transform: rotate(-18deg);
}

.hero::after {
  width: 220px;
  height: 150px;
  bottom: -60px;
  left: -50px;
  background: var(--coral);
  border-radius: 45% 55% 40% 60% / 55% 45% 55% 45%;
  transform: rotate(14deg);
}

@media (max-width: 768px) {
  .hero::before { width: 150px; height: 115px; top: -50px; right: -45px; }
  .hero::after { width: 130px; height: 90px; bottom: -45px; left: -40px; }
}

.hero > * {
  position: relative;
  z-index: 1;
}

.hero-eyebrow {
  display: inline-block;
  background: var(--butter);
  color: var(--ink);
  font-size: 0.8125rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  padding: 0.375rem 1rem;
  border-radius: var(--radius-pill);
  margin-bottom: 1.5rem;
}

.hero h1 {
  font-size: 3.75rem;
  margin-bottom: 1rem;
  font-weight: 800;
  letter-spacing: -0.03em;
  line-height: 1.1;
}

.hero-tagline {
  font-size: 1.25rem;
  margin-bottom: 0.75rem;
  opacity: 0.95;
  font-weight: 500;
  max-width: 560px;
  margin-left: auto;
  margin-right: auto;
}

.hero-sub {
  font-size: 1rem;
  opacity: 0.8;
  max-width: 520px;
  margin: 0 auto 2.5rem;
  line-height: 1.7;
}

.hero-buttons {
  display: flex;
  gap: 0.875rem;
  justify-content: center;
  flex-wrap: wrap;
  margin-top: 2rem;
}

/* ── Buttons (pill-shaped, like the app) ── */
.btn {
  padding: 0.875rem 2rem;
  border-radius: var(--radius-pill);
  text-decoration: none;
  font-weight: 600;
  font-size: 0.9375rem;
  transition: all 0.2s ease;
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  cursor: pointer;
}

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

.btn-primary:hover {
  transform: translateY(-2px);
  box-shadow: var(--shadow-lg);
}

.btn-secondary {
  background-color: rgba(253, 248, 236, 0.12);
  color: var(--cream);
  border: 1.5px solid rgba(253, 248, 236, 0.5);
}

.btn-secondary:hover {
  background-color: rgba(253, 248, 236, 0.22);
  transform: translateY(-2px);
}

.btn-green {
  background-color: var(--ink);
  color: var(--cream);
  box-shadow: var(--shadow-md);
}

.btn-green:hover {
  background-color: var(--ink-dark);
  transform: translateY(-2px);
  box-shadow: var(--shadow-lg);
}

/* ── Main Content ── */
main {
  max-width: 1200px;
  margin: 0 auto;
  padding: 2rem 2rem 4rem;
}

.container {
  max-width: 800px;
  margin: 0 auto;
}

/* ── Section Heading ── */
.section-heading {
  text-align: center;
  margin-bottom: 3rem;
}

.section-heading h2 {
  font-size: 2rem;
  font-weight: 700;
  color: var(--text-dark);
  letter-spacing: -0.02em;
  margin-bottom: 0.5rem;
}

.section-heading p {
  color: var(--text-light);
  font-size: 1.0625rem;
}

/* ── Features Section ── */
#features {
  padding: 1rem 0 2rem;
}

.features {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 1.25rem;
  margin: 2rem 0;
}

.feature-card {
  background: var(--bg-card);
  padding: 2rem 2.25rem;
  border-radius: var(--radius-xl);
  box-shadow: var(--shadow-sm);
  transition: transform 0.25s ease, box-shadow 0.25s ease;
  border: 1px solid var(--border);
}

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

.feature-icon {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 48px;
  height: 48px;
  margin-bottom: 1rem;
  border-radius: var(--radius-md);
  background: var(--lavender);
  color: var(--ink);
}

/* Cycle the icon tiles through the four sticker accents */
.feature-card:nth-child(4n + 2) .feature-icon { background: var(--mint); }
.feature-card:nth-child(4n + 3) .feature-icon { background: var(--butter); }
.feature-card:nth-child(4n + 4) .feature-icon { background: var(--coral); }

.feature-icon svg {
  width: 24px;
  height: 24px;
  stroke: currentColor;
  fill: none;
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.feature-card h3 {
  color: var(--text-dark);
  margin-bottom: 0.5rem;
  font-size: 1.125rem;
  font-weight: 700;
}

.feature-card p {
  color: var(--text-light);
  line-height: 1.65;
  font-size: 0.9375rem;
}

/* ── CTA Strip ── */
.cta-strip {
  background: var(--tint);
  border: 1px solid var(--border);
  border-radius: var(--radius-xl);
  padding: 3rem 2.5rem;
  text-align: center;
  margin: 3rem 0;
}

.cta-strip h2 {
  font-size: 1.75rem;
  font-weight: 700;
  color: var(--ink);
  margin-bottom: 0.75rem;
  letter-spacing: -0.02em;
}

.cta-strip p {
  color: var(--text-mid);
  margin-bottom: 1.75rem;
  font-size: 1.0625rem;
}

/* ── Legal Content ── */
.legal-content {
  background: var(--bg-card);
  padding: 3rem 3.5rem;
  border-radius: var(--radius-xl);
  box-shadow: var(--shadow-sm);
  border: 1px solid var(--border);
}

.legal-content h1 {
  color: var(--ink);
  margin-bottom: 0.5rem;
  font-size: 2.5rem;
  font-weight: 800;
  letter-spacing: -0.025em;
}

.legal-meta {
  color: var(--text-light);
  font-size: 0.9375rem;
  margin-bottom: 2rem;
}

.legal-content h2 {
  color: var(--text-dark);
  margin-top: 2.5rem;
  margin-bottom: 0.875rem;
  font-size: 1.375rem;
  font-weight: 700;
  padding-top: 0.5rem;
}

.legal-content h3 {
  color: var(--ink);
  margin-top: 1.5rem;
  margin-bottom: 0.625rem;
  font-size: 1.0625rem;
  font-weight: 600;
}

.legal-content p {
  margin-bottom: 1.125rem;
  color: var(--text-mid);
  line-height: 1.8;
}

.legal-content ul,
.legal-content ol {
  margin: 1rem 0 1rem 1.75rem;
  color: var(--text-mid);
  line-height: 1.8;
}

.legal-content li {
  margin-bottom: 0.5rem;
}

.legal-content a {
  color: var(--ink);
  font-weight: 600;
  text-decoration: underline;
  text-decoration-color: var(--lavender);
  text-decoration-thickness: 2px;
  text-underline-offset: 3px;
  transition: text-decoration-color 0.15s ease;
}

.legal-content a:hover {
  text-decoration-color: var(--coral);
}

.legal-content code {
  background-color: var(--tint);
  padding: 0.2rem 0.45rem;
  border-radius: 6px;
  font-size: 0.875em;
  color: var(--ink);
  font-family: 'Monaco', 'Menlo', 'Ubuntu Mono', monospace;
}

.legal-content blockquote {
  border-left: 4px solid var(--lavender);
  padding: 1rem 1.5rem;
  margin: 1.5rem 0;
  color: var(--text-mid);
  background-color: var(--tint);
  border-radius: var(--radius-md);
  font-style: italic;
}

.legal-content table {
  width: 100%;
  border-collapse: separate;
  border-spacing: 0;
  margin: 1.5rem 0;
  font-size: 0.9375rem;
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  overflow: hidden;
}

.legal-content th,
.legal-content td {
  border-bottom: 1px solid var(--border);
  padding: 0.875rem 1rem;
  text-align: left;
}

.legal-content th + th,
.legal-content td + td {
  border-left: 1px solid var(--border);
}

.legal-content tr:last-child td {
  border-bottom: none;
}

.legal-content th {
  background-color: var(--tint);
  color: var(--ink);
  font-weight: 700;
}

.legal-content tr:nth-child(even) {
  background-color: var(--cream);
}

.legal-content hr {
  border: none;
  border-top: 1px solid var(--border);
  margin: 2.5rem 0;
}

/* ── Info Boxes ── */
.info-box {
  background-color: var(--tint);
  border-left: 4px solid var(--mint);
  padding: 1.125rem 1.5rem;
  margin: 1.75rem 0;
  border-radius: var(--radius-md);
}

.info-box.warning {
  background-color: #FEF6D6;
  border-left-color: var(--mustard-ink);
}

/* ── Footer ── */
footer {
  background: var(--ink);
  color: var(--cream);
  padding: 4rem 2rem 1.5rem;
  margin-top: 4rem;
  border-radius: var(--radius-xl) var(--radius-xl) 0 0;
}

.footer-content {
  max-width: 1200px;
  margin: 0 auto;
  display: grid;
  grid-template-columns: 2fr 1fr 1fr;
  gap: 3rem;
  margin-bottom: 3rem;
}

.footer-brand h3 {
  font-size: 1.25rem;
  font-weight: 700;
  color: var(--cream);
  margin-bottom: 0.75rem;
  display: flex;
  align-items: center;
  gap: 0.4rem;
}

.footer-brand p {
  color: rgba(253, 248, 236, 0.6);
  line-height: 1.7;
  font-size: 0.9375rem;
  max-width: 320px;
}

.footer-section h4 {
  color: var(--butter);
  margin-bottom: 1rem;
  font-size: 0.8125rem;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.footer-section ul {
  list-style: none;
}

.footer-section a {
  color: rgba(253, 248, 236, 0.6);
  text-decoration: none;
  display: block;
  padding: 0.3rem 0;
  font-size: 0.9375rem;
  transition: color 0.15s ease;
}

.footer-section a:hover {
  color: var(--cream);
}

.footer-bottom {
  max-width: 1200px;
  margin: 0 auto;
  text-align: center;
  padding-top: 2rem;
  border-top: 1px solid rgba(253, 248, 236, 0.1);
  color: rgba(253, 248, 236, 0.4);
  font-size: 0.875rem;
}

/* ── Responsive ── */
@media (max-width: 768px) {
  .hero h1 {
    font-size: 2.5rem;
  }

  .hero-tagline {
    font-size: 1.0625rem;
  }

  nav {
    height: auto;
    padding: 0.875rem 1.5rem;
    gap: 0.75rem;
  }

  .nav-links {
    gap: 0.25rem;
    flex-wrap: wrap;
  }

  .features {
    grid-template-columns: 1fr;
  }

  .legal-content {
    padding: 1.75rem;
  }

  .legal-content h1 {
    font-size: 1.875rem;
  }

  .legal-content h2 {
    font-size: 1.25rem;
  }

  .hero {
    padding: 4rem 1.5rem 3.5rem;
  }

  .footer-content {
    grid-template-columns: 1fr;
    gap: 2rem;
  }
}

/* ── Hero layout (two-column) ── */
.hero-inner {
  display: grid;
  grid-template-columns: 1.1fr 0.9fr;
  align-items: center;
  gap: 3rem;
  max-width: 1100px;
  margin: 0 auto;
  text-align: left;
}

.hero-copy {
  text-align: left;
}

.hero-copy .hero-tagline,
.hero-copy .hero-sub {
  margin-left: 0;
  margin-right: 0;
}

.hero-buttons {
  justify-content: flex-start;
}

.hero-note {
  margin-top: 1rem;
  font-size: 0.875rem;
  opacity: 0.8;
}

.hero-media {
  display: flex;
  justify-content: center;
}

/* Phone mockup frame (wraps a screenshot or placeholder) */
.phone-frame {
  width: 240px;
  aspect-ratio: 9 / 19;
  background: var(--cream);
  border: 6px solid var(--bg-card);
  border-radius: 2rem;
  box-shadow: var(--shadow-xl);
  overflow: hidden;
  display: flex;
  align-items: center;
  justify-content: center;
}

.phone-frame img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

/* Image placeholder (swap for a real <img> later) */
.img-placeholder {
  background:
    repeating-linear-gradient(
      45deg,
      rgba(22, 40, 31, 0.04),
      rgba(22, 40, 31, 0.04) 12px,
      rgba(22, 40, 31, 0.08) 12px,
      rgba(22, 40, 31, 0.08) 24px
    );
  color: var(--ink);
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  font-size: 0.875rem;
  font-weight: 600;
  letter-spacing: 0.02em;
  padding: 1rem;
}

/* ── Store button ── */
.btn-store {
  background-color: var(--cream);
  color: var(--ink);
  box-shadow: var(--shadow-md);
  font-size: 1rem;
  padding: 0.875rem 2.25rem;
}

.btn-store:hover {
  transform: translateY(-2px);
  box-shadow: var(--shadow-lg);
}

/* On the light CTA strip the store button flips to forest ink */
.cta-strip .btn-store {
  background-color: var(--ink);
  color: var(--cream);
}

.btn-store .store-sub {
  font-size: 0.7rem;
  font-weight: 500;
  opacity: 0.75;
  display: block;
  line-height: 1.1;
}

.btn-store .store-main {
  font-size: 1.05rem;
  font-weight: 700;
  line-height: 1.1;
}

/* ── Lifestyle band ── */
.lifestyle {
  display: grid;
  grid-template-columns: 1fr 1fr;
  align-items: center;
  gap: 3rem;
  margin: 3rem 0 2rem;
}

.lifestyle-media {
  aspect-ratio: 4 / 3;
  border-radius: var(--radius-xl);
  overflow: hidden;
  box-shadow: var(--shadow-md);
}

.lifestyle-media img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.lifestyle-copy h2 {
  font-size: 2rem;
  font-weight: 700;
  color: var(--text-dark);
  letter-spacing: -0.02em;
  margin-bottom: 0.75rem;
}

.lifestyle-copy p {
  color: var(--text-light);
  font-size: 1.0625rem;
  line-height: 1.7;
}

/* ── Screenshots gallery ── */
.screens {
  margin: 3rem 0 1rem;
  padding: 3rem 1.5rem;
  background: var(--tint);
  border-radius: var(--radius-xl);
}

.screens-grid {
  display: flex;
  gap: 1.5rem;
  justify-content: center;
  flex-wrap: wrap;
}

.screens-grid .phone-frame {
  width: 200px;
}

@media (max-width: 768px) {
  .hero-inner {
    grid-template-columns: 1fr;
    text-align: center;
    gap: 2.5rem;
  }
  .hero-copy { text-align: center; }
  .hero-buttons { justify-content: center; }
  .hero-copy .hero-tagline,
  .hero-copy .hero-sub { margin-left: auto; margin-right: auto; }
  .lifestyle {
    grid-template-columns: 1fr;
    gap: 1.5rem;
  }
}

/* ── Smooth scrolling ── */
html {
  scroll-behavior: smooth;
}

/* ── Selection ── */
::selection {
  background-color: var(--lavender);
  color: var(--ink);
}

/* ── Print ── */
@media print {
  header, footer, .hero-buttons, .cta-strip {
    display: none;
  }
  .legal-content {
    box-shadow: none;
    border: none;
  }
}

/* ── Guide page ── */
.guide-hero {
  background: var(--ink);
  color: var(--cream);
  padding: 4rem 2rem;
  text-align: center;
  border-radius: var(--radius-xl);
  position: relative;
  overflow: hidden;
}

.guide-hero::before {
  width: 190px;
  height: 140px;
  top: -60px;
  right: -45px;
  background: var(--lavender);
  border-radius: 58% 42% 55% 45% / 50% 60% 40% 50%;
  transform: rotate(-18deg);
}

.guide-hero::after {
  width: 150px;
  height: 100px;
  bottom: -50px;
  left: -40px;
  background: var(--coral);
  border-radius: 45% 55% 40% 60% / 55% 45% 55% 45%;
  transform: rotate(14deg);
}

@media (max-width: 700px) {
  .guide-hero::before { width: 120px; height: 90px; top: -45px; right: -40px; }
  .guide-hero::after { width: 100px; height: 70px; bottom: -40px; left: -35px; }
}

.guide-hero > * {
  position: relative;
  z-index: 1;
}

.guide-hero h1 {
  font-size: 2.25rem;
  margin: 1rem 0 0.75rem;
}

.guide-hero p {
  max-width: 560px;
  margin: 0 auto;
  color: rgba(253, 248, 236, 0.9);
  line-height: 1.65;
}

.guide-steps {
  padding: 2rem 0 0;
}

/* Each step is its own rounded card, like the app's cards */
.guide-step {
  display: flex;
  align-items: center;
  gap: 3rem;
  padding: 2.5rem;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-xl);
  box-shadow: var(--shadow-sm);
}

.guide-step + .guide-step {
  margin-top: 1.25rem;
}

.guide-step:nth-child(even) {
  flex-direction: row-reverse;
}

.guide-step-copy {
  flex: 1;
}

.guide-step-number {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 2.25rem;
  height: 2.25rem;
  border-radius: 50%;
  background: var(--lavender);
  color: var(--ink);
  font-weight: 700;
  margin-bottom: 1rem;
}

.guide-step:nth-child(4n + 2) .guide-step-number { background: var(--mint); }
.guide-step:nth-child(4n + 3) .guide-step-number { background: var(--butter); }
.guide-step:nth-child(4n + 4) .guide-step-number { background: var(--coral); }

.guide-step h2 {
  font-size: 1.5rem;
  color: var(--text-dark);
  margin-bottom: 0.75rem;
}

.guide-step p {
  color: var(--text-mid);
  line-height: 1.7;
  margin-bottom: 0.75rem;
}

.guide-tip {
  background: var(--tint);
  border-left: 4px solid var(--butter);
  border-radius: var(--radius-md);
  padding: 0.75rem 1rem;
}

.guide-frame {
  flex-shrink: 0;
}

@media (max-width: 700px) {
  .guide-step,
  .guide-step:nth-child(even) {
    flex-direction: column;
    gap: 2rem;
    padding: 1.75rem;
    text-align: left;
  }

  .guide-hero h1 {
    font-size: 1.75rem;
  }
}
