/* GrowBold — palette and shapes mirror the mobile app (src/constants/theme.ts). */

:root {
  --text: #25332b;
  --text-secondary: #25332b;
  --background: #f7f3ea;
  --surface: #fffcf6;
  --background-element: #eee8dc;
  --border: #ddd6c8;
  --primary: #426b50;
  --primary-pressed: #345740;
  --primary-soft: #dce8dd;
  --accent: #d99a6c;
  --shadow: 36 49 41;

  --radius-small: 10px;
  --radius-medium: 16px;
  --radius-large: 24px;
  --radius-pill: 999px;

  --max-width: 640px;
}

* {
  box-sizing: border-box;
}

html {
  -webkit-text-size-adjust: 100%;
}

body {
  margin: 0;
  background: var(--background);
  color: var(--text);
  font-family: ui-rounded, "SF Pro Rounded", system-ui, -apple-system, "Segoe UI",
    Roboto, "Helvetica Neue", Arial, sans-serif;
  font-size: 17px;
  line-height: 1.6;
  display: flex;
  flex-direction: column;
  min-height: 100dvh;
}

main {
  width: 100%;
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 24px;
  flex: 1;
}

a {
  color: var(--primary);
  text-decoration-thickness: 1px;
  text-underline-offset: 3px;
}

a:hover {
  color: var(--primary-pressed);
}

h1,
h2,
h3 {
  line-height: 1.25;
  letter-spacing: -0.01em;
}

h1 {
  font-size: 34px;
  font-weight: 800;
  margin: 16px 0 8px;
}

h2 {
  font-size: 22px;
  font-weight: 700;
  margin: 40px 0 8px;
}

p {
  margin: 12px 0;
}

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

.small {
  font-size: 14px;
}

/* Header */

.site-header {
  width: 100%;
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 24px 24px 0;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}

.brand {
  display: flex;
  align-items: center;
  gap: 10px;
  font-weight: 800;
  font-size: 19px;
  color: var(--text);
  text-decoration: none;
}

.brand img {
  width: 34px;
  height: 34px;
}

.site-nav {
  display: flex;
  gap: 20px;
}

.site-nav a {
  color: var(--text-secondary);
  text-decoration: none;
  font-size: 15px;
  font-weight: 600;
}

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

/* Landing hero */

.hero {
  text-align: center;
  padding: 48px 0 8px;
}

.hero-tree {
  width: 180px;
  height: auto;
  margin: 0 auto 8px;
  display: block;
}

.hero .lead {
  font-size: 19px;
  color: var(--text-secondary);
  max-width: 480px;
  margin: 12px auto 0;
}

/* Store buttons */

.store-links {
  display: flex;
  justify-content: center;
  gap: 12px;
  flex-wrap: wrap;
  margin: 32px 0 8px;
}

.store-button {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  background: var(--primary);
  color: #ffffff;
  text-decoration: none;
  font-weight: 700;
  font-size: 16px;
  padding: 14px 24px;
  border-radius: var(--radius-pill);
  box-shadow: 0 5px 16px rgb(var(--shadow) / 0.12);
  transition: background 0.15s ease;
}

.store-button:hover {
  background: var(--primary-pressed);
  color: #ffffff;
}

.store-button svg {
  width: 20px;
  height: 20px;
  flex-shrink: 0;
}

.store-note {
  text-align: center;
  color: var(--text-secondary);
  font-size: 14px;
  margin-top: 12px;
}

/* Feature sections with app screenshots */

.features {
  display: grid;
  gap: 72px;
  margin: 64px 0 24px;
}

/* Grid items default to min-width auto, which lets the fixed-width tree strip
   inflate the whole page on small screens; force them to shrink instead. */
.feature,
.feature-tree,
.feature > *,
.tree-strip figure {
  min-width: 0;
}

.feature {
  display: grid;
  grid-template-columns: 1fr 240px;
  gap: 40px;
  align-items: center;
}

.feature-reverse {
  grid-template-columns: 240px 1fr;
}

.feature-reverse .feature-copy {
  order: 2;
}

.feature-reverse .phone {
  order: 1;
}

.feature-copy h2 {
  margin-top: 0;
}

.feature-copy.centered {
  text-align: center;
  max-width: 440px;
  margin: 0 auto 32px;
}

/* Simple device frame around raw screenshots */

.phone {
  border-radius: 32px;
  overflow: hidden;
  border: 1px solid var(--border);
  background: var(--surface);
  box-shadow: 0 12px 32px rgb(var(--shadow) / 0.14);
}

.phone img {
  display: block;
  width: 100%;
  height: auto;
}

/* Tree growth strip */

.tree-strip {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 20px;
}

.tree-strip figure {
  margin: 0;
}

.tree-strip figcaption {
  text-align: center;
  color: var(--text-secondary);
  font-size: 14px;
  font-weight: 600;
  margin-top: 10px;
}

@media (max-width: 560px) {
  .features {
    gap: 56px;
  }

  .feature,
  .feature-reverse {
    grid-template-columns: 1fr;
    gap: 24px;
  }

  .feature-reverse .feature-copy {
    order: 1;
  }

  .feature-reverse .phone {
    order: 2;
  }

  .feature .phone {
    width: min(260px, 78%);
    margin: 0 auto;
  }

  /* Swipeable strip so each tree stage stays readable on small screens */
  .tree-strip {
    display: flex;
    overflow-x: auto;
    scroll-snap-type: x mandatory;
    gap: 16px;
    margin: 0 -24px;
    padding: 4px 24px 8px;
    -webkit-overflow-scrolling: touch;
  }

  .tree-strip figure {
    flex: 0 0 220px;
    scroll-snap-align: center;
  }
}

/* Cards (match the app's principle cards) */

.cards {
  display: grid;
  gap: 12px;
  margin: 40px 0;
}

.card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-medium);
  padding: 20px;
  box-shadow: 0 5px 16px rgb(var(--shadow) / 0.08);
}

.card h3 {
  margin: 0 0 4px;
  font-size: 17px;
  font-weight: 700;
}

.card p {
  margin: 0;
  color: var(--text-secondary);
}

.card.note {
  background: var(--primary-soft);
  border-color: transparent;
}

/* Legal pages */

.legal h1 {
  font-size: 30px;
}

.legal-meta {
  color: var(--text-secondary);
  font-size: 14px;
  margin-top: -4px;
}

.legal ul {
  padding-left: 22px;
}

.legal li {
  margin: 6px 0;
}

/* Footer */

.site-footer {
  width: 100%;
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 32px 24px 40px;
  border-top: 1px solid var(--border);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  flex-wrap: wrap;
  color: var(--text-secondary);
  font-size: 14px;
}

.site-footer nav {
  display: flex;
  gap: 16px;
  flex-wrap: wrap;
}

.site-footer a {
  color: var(--text-secondary);
}

.site-footer a:hover {
  color: var(--primary);
}

@media (max-width: 480px) {
  .site-header {
    flex-direction: column;
    align-items: flex-start;
  }

  h1 {
    font-size: 28px;
  }

  .hero {
    padding-top: 32px;
  }

  .hero-tree {
    width: 150px;
  }
}
