/* ---------- Reset & tokens ---------- */
*,
*::before,
*::after {
  box-sizing: border-box;
}

:root {
  --bg: #fffaf3;
  --surface: #ffffff;
  --ink: #221a15;
  --ink-soft: #5b4a41;
  --muted: #8a7a70;
  --line: #f0e3d3;

  --brand: #ff8a3d;
  --brand-strong: #f26a1d;
  --brand-soft: #ffe4cf;
  --accent: #6c4cff;
  --sun: #ffcf4b;
  --leaf: #2fbf71;

  --radius-sm: 10px;
  --radius: 18px;
  --radius-lg: 28px;

  --shadow-sm: 0 2px 6px rgba(34, 26, 21, 0.06);
  --shadow: 0 10px 30px rgba(34, 26, 21, 0.10);
  --shadow-lg: 0 30px 60px rgba(34, 26, 21, 0.18);

  --container: 1120px;
  --font-sans: "Inter", ui-sans-serif, system-ui, -apple-system, "Segoe UI", Roboto,
    "Helvetica Neue", Arial, "Apple Color Emoji", "Segoe UI Emoji", sans-serif;
}

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

body {
  margin: 0;
  font-family: var(--font-sans);
  font-size: 17px;
  line-height: 1.55;
  color: var(--ink);
  background:
    radial-gradient(1200px 500px at 90% -100px, #ffe0c4 0%, transparent 60%),
    radial-gradient(900px 500px at -10% 200px, #f5eaff 0%, transparent 60%),
    var(--bg);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

img,
svg {
  display: block;
  max-width: 100%;
}

a {
  color: var(--brand-strong);
  text-decoration: none;
}

a:hover {
  text-decoration: underline;
}

h1,
h2,
h3 {
  line-height: 1.15;
  margin: 0 0 0.5em;
  letter-spacing: -0.02em;
}

h1 {
  font-size: clamp(2.2rem, 5.5vw, 3.6rem);
  font-weight: 800;
}

h2 {
  font-size: clamp(1.6rem, 3.5vw, 2.4rem);
  font-weight: 800;
}

h3 {
  font-size: 1.15rem;
  font-weight: 700;
}

p {
  margin: 0 0 1em;
}

.accent {
  color: var(--brand-strong);
  background: linear-gradient(120deg, var(--brand) 0%, var(--sun) 100%);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

/* ---------- Layout helpers ---------- */
.site-header,
.site-footer .footer-inner,
main > section {
  max-width: var(--container);
  margin-inline: auto;
  padding-inline: clamp(1rem, 4vw, 2rem);
}

main > section {
  padding-block: clamp(3rem, 8vw, 6rem);
}

.section-title {
  text-align: center;
}

.section-lede {
  text-align: center;
  max-width: 60ch;
  margin: 0 auto 2.5rem;
  color: var(--ink-soft);
}

/* ---------- Header ---------- */
.site-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding-block: 1.25rem;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 0.6rem;
  color: var(--ink);
  font-weight: 800;
  font-size: 1.15rem;
  letter-spacing: -0.01em;
}

.brand:hover {
  text-decoration: none;
}

.brand-mark {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 2rem;
  height: 2rem;
}

.brand-mark img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  display: block;
  background: transparent;
}

.site-nav {
  display: flex;
  align-items: center;
  gap: clamp(0.75rem, 2vw, 1.5rem);
}

.site-nav a {
  color: var(--ink-soft);
  font-weight: 600;
}

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

.btn {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.6rem 1rem;
  border-radius: 999px;
  font-weight: 700;
  transition: transform 0.15s ease, background 0.15s ease, color 0.15s ease;
}

.btn-ghost {
  background: var(--ink);
  color: #fff;
}

.btn-ghost:hover {
  background: var(--brand-strong);
  color: #fff;
  text-decoration: none;
  transform: translateY(-1px);
}

/* ---------- Hero ---------- */
.hero {
  display: grid;
  grid-template-columns: 1fr;
  gap: clamp(2rem, 6vw, 4rem);
  align-items: center;
  padding-top: clamp(2rem, 6vw, 4rem) !important;
}

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

.hero-content .lede {
  font-size: clamp(1.05rem, 1.6vw, 1.2rem);
  color: var(--ink-soft);
  max-width: 52ch;
  margin-bottom: 1.75rem;
}

.microcopy {
  color: var(--muted);
  font-size: 0.9rem;
  margin-top: 1rem;
}

/* Store badges */
.download-buttons {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
}

.store-badge {
  display: inline-flex;
  align-items: center;
  gap: 0.6rem;
  background: var(--ink);
  color: #fff;
  padding: 0.65rem 1.1rem;
  border-radius: 14px;
  border: 1px solid var(--ink);
  transition: transform 0.15s ease, background 0.15s ease;
  min-width: 180px;
}

.store-badge:hover {
  background: #000;
  color: #fff;
  transform: translateY(-1px);
  text-decoration: none;
}

.store-badge svg {
  flex: 0 0 auto;
}

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

.badge-text small {
  font-size: 0.7rem;
  opacity: 0.85;
}

.badge-text strong {
  font-size: 1.05rem;
  font-weight: 700;
}

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

.phone {
  position: relative;
  width: min(280px, 80vw);
  aspect-ratio: 9 / 19;
  background: #1c1410;
  border-radius: 40px;
  padding: 12px;
  box-shadow: var(--shadow-lg);
  transform: rotate(-2deg);
}

.phone-notch {
  position: absolute;
  top: 12px;
  left: 50%;
  transform: translateX(-50%);
  width: 90px;
  height: 22px;
  background: #1c1410;
  border-radius: 0 0 14px 14px;
  z-index: 2;
}

.phone-screen {
  width: 100%;
  height: 100%;
  border-radius: 30px;
  background: linear-gradient(180deg, #fff6ea 0%, #ffffff 60%);
  padding: 2rem 1rem 1rem;
  display: flex;
  flex-direction: column;
  gap: 1rem;
  overflow: hidden;
}

.mock-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 0.75rem;
  color: var(--ink-soft);
  padding: 0 0.25rem;
}

.mock-title {
  font-weight: 700;
  color: var(--ink);
  font-size: 0.85rem;
}

.mock-streak {
  font-weight: 700;
  color: var(--brand-strong);
}

.mock-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 6px;
  flex: 1;
}

.mock-tile {
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 8px;
  font-size: 0.7rem;
  font-weight: 700;
  color: #fff;
  text-align: center;
  padding: 4px 2px;
  min-height: 44px;
}

.mock-tile-a { background: linear-gradient(135deg, #ff8a3d, #f26a1d); }
.mock-tile-b { background: linear-gradient(135deg, #6c4cff, #9678ff); }
.mock-tile-c { background: linear-gradient(135deg, #2fbf71, #67d99a); }
.mock-tile-d { background: linear-gradient(135deg, #ffcf4b, #ffb31f); color: #4a3a10; }

.mock-footer {
  text-align: center;
  font-size: 0.75rem;
  color: var(--muted);
}

/* ---------- Features ---------- */
.features {
  text-align: center;
}

.feature-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 1rem;
  text-align: left;
}

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

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

.feature-card {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 1.5rem;
  box-shadow: var(--shadow-sm);
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

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

.feature-icon {
  font-size: 1.75rem;
  width: 3rem;
  height: 3rem;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 14px;
  background: var(--brand-soft);
  margin-bottom: 1rem;
}

.feature-card h3 {
  margin-bottom: 0.4rem;
}

.feature-card p {
  color: var(--ink-soft);
  margin: 0;
  font-size: 0.95rem;
}

/* ---------- Screenshots ---------- */
.screenshots {
  text-align: center;
}

.screenshot-row {
  display: flex;
  gap: 1rem;
  overflow-x: auto;
  padding: 1rem 0.25rem 2rem;
  scroll-snap-type: x mandatory;
  -webkit-overflow-scrolling: touch;
  scrollbar-width: thin;
}

.screenshot {
  flex: 0 0 auto;
  width: min(220px, 60vw);
  aspect-ratio: 9 / 19;
  border-radius: 26px;
  background: linear-gradient(160deg, #ffe4cf 0%, #f5eaff 100%);
  border: 1px solid var(--line);
  box-shadow: var(--shadow);
  position: relative;
  scroll-snap-align: start;
  display: flex;
  align-items: flex-end;
  justify-content: center;
  padding-bottom: 1rem;
}

.screenshot::before {
  content: "";
  position: absolute;
  top: 12px;
  left: 50%;
  transform: translateX(-50%);
  width: 60px;
  height: 6px;
  background: rgba(34, 26, 21, 0.15);
  border-radius: 3px;
}

.screenshot-label {
  background: rgba(255, 255, 255, 0.85);
  backdrop-filter: blur(6px);
  color: var(--ink);
  font-weight: 700;
  font-size: 0.85rem;
  padding: 0.4rem 0.8rem;
  border-radius: 999px;
  border: 1px solid var(--line);
}

/* ---------- CTA ---------- */
.cta {
  text-align: center;
  background: linear-gradient(135deg, #fff2e0 0%, #f2ecff 100%);
  border-radius: var(--radius-lg);
  padding: clamp(2rem, 6vw, 4rem) 1.5rem !important;
  margin-bottom: clamp(3rem, 8vw, 6rem);
  max-width: calc(var(--container) - 2rem);
}

.cta h2 {
  margin-bottom: 0.5rem;
}

.cta p {
  color: var(--ink-soft);
  margin-bottom: 1.75rem;
}

.cta .download-buttons {
  justify-content: center;
}

/* ---------- Footer ---------- */
.site-footer {
  border-top: 1px solid var(--line);
  background: #fff;
}

.footer-inner {
  padding-block: 2.5rem;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 1rem;
  text-align: center;
}

.footer-brand {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  font-weight: 800;
}

.footer-nav {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 1.25rem;
}

.footer-nav a {
  color: var(--ink-soft);
  font-weight: 600;
}

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

.copyright {
  color: var(--muted);
  font-size: 0.9rem;
  margin: 0;
}

/* ---------- Legal page ---------- */
.legal {
  max-width: 780px;
  margin: 0 auto;
  padding: clamp(2rem, 6vw, 4rem) clamp(1rem, 4vw, 2rem);
}

.legal h1 {
  font-size: clamp(1.8rem, 4vw, 2.4rem);
}

.legal h2 {
  font-size: 1.35rem;
  margin-top: 2rem;
}

.legal h3 {
  font-size: 1.1rem;
  margin-top: 1.5rem;
}

.legal p,
.legal li {
  color: var(--ink-soft);
}

.legal ul,
.legal ol {
  padding-left: 1.25rem;
  margin: 0 0 1em;
}

.legal li {
  margin-bottom: 0.35em;
}

.legal strong {
  color: var(--ink);
}

.legal a:not(.back):not(.btn) {
  color: var(--brand-strong);
  text-decoration: underline;
  text-decoration-color: rgba(242, 106, 29, 0.35);
  text-underline-offset: 2px;
}

.legal a:not(.back):not(.btn):hover {
  text-decoration-color: var(--brand-strong);
}

.legal .table-wrap {
  overflow-x: auto;
  margin: 1rem 0 1.5rem;
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
}

.legal table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.95rem;
}

.legal th,
.legal td {
  padding: 0.75rem 1rem;
  text-align: left;
  border-bottom: 1px solid var(--line);
  color: var(--ink-soft);
  vertical-align: top;
}

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

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

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

.legal .disclaimer {
  color: var(--muted);
  font-size: 0.85rem;
  font-style: italic;
}

.legal a.back {
  display: inline-block;
  margin-bottom: 1.5rem;
  color: var(--brand-strong);
  font-weight: 600;
}

.legal .meta {
  color: var(--muted);
  font-size: 0.9rem;
  margin-bottom: 2rem;
}

.notice {
  background: var(--brand-soft);
  border: 1px solid #fbcfa9;
  border-radius: var(--radius);
  padding: 1.25rem 1.5rem;
  color: var(--ink);
}

/* ---------- Motion preferences ---------- */
@media (prefers-reduced-motion: reduce) {
  * {
    animation: none !important;
    transition: none !important;
    scroll-behavior: auto !important;
  }
}
