/* ─────────────────────────────────────────────────────────────────
   TreeNote landing page — styles

   Brand palette matches the app's main.dart:
     Primary       #37474F   (deep blue-gray, from the Material seed)
     Primary dark  #263238   (hover / pressed)
     Primary tint  #ECEFF1   (subtle background panels)
     Warm accent   #FFB300   (used sparingly on "Best value" tags)

   Fully self-contained. No external fonts, no framework. Dark mode
   respects the OS preference via @media (prefers-color-scheme: dark).
   ───────────────────────────────────────────────────────────────── */

:root {
  --primary:       #37474F;
  --primary-dark:  #263238;
  --primary-tint:  #ECEFF1;
  --accent:        #FFB300;

  --bg:            #F7F7F5;
  --bg-alt:        #FFFFFF;
  --card:          #FFFFFF;
  --text:          #1A1A1A;
  --text-muted:    #5A5A5A;
  --border:        #E1E4E5;
  --border-strong: #BDBDBD;

  --radius:        10px;
  --radius-sm:     6px;
  --shadow-sm:     0 1px 2px rgba(0, 0, 0, 0.04);
  --shadow-md:     0 4px 12px rgba(0, 0, 0, 0.08);

  --font-body:     system-ui, -apple-system, "Segoe UI", Roboto,
                   "Helvetica Neue", Arial, sans-serif;
  --font-mono:     ui-monospace, "SF Mono", Menlo, Consolas,
                   "Liberation Mono", monospace;
}

@media (prefers-color-scheme: dark) {
  :root {
    --primary:       #90A4AE;
    --primary-dark:  #B0BEC5;
    --primary-tint:  #263238;
    --accent:        #FFB300;

    --bg:            #121212;
    --bg-alt:        #1A1A1A;
    --card:          #1E1E1E;
    --text:          #F5F5F5;
    --text-muted:    #A0A0A0;
    --border:        #333333;
    --border-strong: #4A4A4A;

    --shadow-sm:     0 1px 2px rgba(0, 0, 0, 0.4);
    --shadow-md:     0 4px 12px rgba(0, 0, 0, 0.5);
  }
}

/* ─── Reset ─── */

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  font-family: var(--font-body);
  font-size: 16px;
  line-height: 1.6;
  color: var(--text);
  background: var(--bg);
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}
img { max-width: 100%; height: auto; display: block; }
a { color: var(--primary); text-decoration: none; }
a:hover { color: var(--primary-dark); text-decoration: underline; }
code {
  font-family: var(--font-mono);
  font-size: 0.9em;
  background: var(--primary-tint);
  padding: 2px 5px;
  border-radius: 3px;
  color: var(--text);
}

.container {
  max-width: 1100px;
  margin: 0 auto;
  padding: 0 24px;
}
.container-narrow {
  max-width: 720px;
}

/* ─── Header ─── */

.site-header {
  position: sticky;
  top: 0;
  z-index: 100;
  background: var(--bg);
  border-bottom: 1px solid var(--border);
  backdrop-filter: blur(8px);
}
.header-inner {
  display: flex;
  align-items: center;
  gap: 24px;
  padding-top: 14px;
  padding-bottom: 14px;
}
.brand {
  display: flex;
  align-items: center;
  gap: 10px;
  font-weight: 700;
  color: var(--text);
}
.brand:hover { text-decoration: none; }
.brand-icon {
  border-radius: 6px;
}
.brand-name {
  font-size: 18px;
  letter-spacing: -0.01em;
}
.site-nav {
  display: flex;
  gap: 24px;
  margin-left: auto;
}
.site-nav a {
  color: var(--text-muted);
  font-size: 15px;
  font-weight: 500;
}
.site-nav a:hover {
  color: var(--text);
  text-decoration: none;
}
.header-inner .btn { margin-left: 0; }

@media (max-width: 640px) {
  .site-nav { display: none; }
  .header-inner .btn { margin-left: auto; }
}

/* ─── Buttons ─── */

.btn {
  display: inline-block;
  padding: 10px 20px;
  font-size: 15px;
  font-weight: 600;
  border-radius: var(--radius-sm);
  border: 1px solid transparent;
  cursor: pointer;
  transition: background 0.15s ease, transform 0.05s ease;
  text-align: center;
  line-height: 1.2;
}
.btn:hover { text-decoration: none; }
.btn:active { transform: translateY(1px); }

.btn-primary {
  background: var(--primary);
  color: #FFFFFF;
}
.btn-primary:hover {
  background: var(--primary-dark);
  color: #FFFFFF;
}
@media (prefers-color-scheme: dark) {
  .btn-primary { color: #121212; }
  .btn-primary:hover { color: #121212; }
}

.btn-outline {
  background: transparent;
  color: var(--text);
  border-color: var(--border-strong);
}
.btn-outline:hover {
  background: var(--primary-tint);
  border-color: var(--primary);
  color: var(--text);
}

.btn-sm { padding: 7px 14px; font-size: 14px; }
.btn-lg { padding: 14px 28px; font-size: 16px; }
.btn-block { display: block; width: 100%; }

/* ─── Hero ─── */

.hero {
  padding: 80px 0 60px;
  background: linear-gradient(180deg, var(--primary-tint) 0%, var(--bg) 100%);
}
.hero-inner {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 60px;
  align-items: center;
}
.hero-copy h1 {
  font-size: clamp(36px, 5vw, 52px);
  line-height: 1.05;
  letter-spacing: -0.03em;
  margin: 0 0 20px;
  font-weight: 800;
  color: var(--text);
}
.hero-lede {
  font-size: 19px;
  line-height: 1.5;
  color: var(--text-muted);
  margin: 0 0 28px;
  max-width: 460px;
}
.hero-ctas {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-bottom: 12px;
}
.hero-fine {
  font-size: 14px;
  color: var(--text-muted);
  margin: 0;
}
.hero-visual {
  display: flex;
  justify-content: center;
}
.hero-image {
  max-height: 620px;
  border-radius: 20px;
  box-shadow: var(--shadow-md);
}

@media (max-width: 900px) {
  .hero-inner {
    grid-template-columns: 1fr;
    gap: 40px;
    text-align: center;
  }
  .hero-lede { margin-left: auto; margin-right: auto; }
  .hero-ctas { justify-content: center; }
  .hero-image { max-height: 480px; }
}

/* ─── Sections ─── */

.section {
  padding: 80px 0;
}
.section-alt {
  background: var(--bg-alt);
  border-top: 1px solid var(--border);
  border-bottom: 1px solid var(--border);
}
.section-title {
  font-size: clamp(28px, 3.5vw, 36px);
  line-height: 1.15;
  letter-spacing: -0.02em;
  margin: 0 0 16px;
  font-weight: 800;
  text-align: center;
  color: var(--text);
}
.section-lede {
  font-size: 18px;
  color: var(--text-muted);
  text-align: center;
  margin: 0 auto 48px;
  max-width: 640px;
}

/* ─── Value grid (why section) ─── */

.value-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 32px;
  margin-top: 40px;
}
.value {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 32px 24px;
  text-align: center;
}
.value-icon {
  font-size: 40px;
  margin-bottom: 12px;
}
.value h3 {
  font-size: 20px;
  margin: 0 0 12px;
  color: var(--text);
}
.value p {
  color: var(--text-muted);
  margin: 0;
  font-size: 15px;
}

@media (max-width: 800px) {
  .value-grid { grid-template-columns: 1fr; gap: 20px; }
}

/* ─── Feature blocks ─── */

.feature {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 60px;
  align-items: center;
  padding: 60px 0;
  border-top: 1px solid var(--border);
}
.feature:first-of-type { border-top: none; padding-top: 40px; }
.feature-reverse .feature-copy { order: 2; }
.feature-copy h3 {
  font-size: clamp(24px, 2.5vw, 30px);
  margin: 0 0 16px;
  color: var(--text);
  letter-spacing: -0.01em;
}
.feature-copy p {
  color: var(--text-muted);
  font-size: 17px;
  margin: 0 0 20px;
}
.feature-list {
  list-style: none;
  padding: 0;
  margin: 0;
}
.feature-list li {
  padding: 8px 0 8px 28px;
  position: relative;
  color: var(--text);
  font-size: 15px;
}
.feature-list li::before {
  content: "→";
  position: absolute;
  left: 0;
  color: var(--primary);
  font-weight: 700;
}
.feature-visual img {
  border-radius: 16px;
  box-shadow: var(--shadow-md);
  max-height: 560px;
  margin: 0 auto;
}

@media (max-width: 800px) {
  .feature,
  .feature-reverse {
    grid-template-columns: 1fr;
    gap: 32px;
  }
  .feature-reverse .feature-copy { order: 0; }
}

/* ─── Pricing ─── */

.pricing-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 24px;
  max-width: 800px;
  margin: 0 auto;
}
.plan {
  position: relative;
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 36px 28px;
  display: flex;
  flex-direction: column;
}
.plan-featured {
  border-color: var(--primary);
  border-width: 2px;
  box-shadow: var(--shadow-md);
}
.plan-tag {
  position: absolute;
  top: -12px;
  right: 24px;
  background: var(--accent);
  color: #1A1A1A;
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  padding: 4px 10px;
  border-radius: 4px;
}
.plan-name {
  margin: 0 0 8px;
  font-size: 18px;
  color: var(--text-muted);
  font-weight: 600;
  letter-spacing: 0.02em;
  text-transform: uppercase;
}
.plan-price {
  margin: 0 0 12px;
  color: var(--text);
}
.price {
  font-size: 42px;
  font-weight: 800;
  letter-spacing: -0.02em;
}
.price-unit {
  font-size: 16px;
  color: var(--text-muted);
  margin-left: 6px;
}
.plan-desc,
.plan-desc-strike {
  color: var(--text-muted);
  margin: 0 0 20px;
  font-size: 15px;
}
.plan-list {
  list-style: none;
  padding: 0;
  margin: 0 0 28px;
  flex: 1;
}
.plan-list li {
  padding: 8px 0 8px 24px;
  position: relative;
  font-size: 15px;
  color: var(--text);
}
.plan-list li::before {
  content: "✓";
  position: absolute;
  left: 0;
  color: var(--primary);
  font-weight: 700;
}
.pricing-fine {
  text-align: center;
  color: var(--text-muted);
  font-size: 14px;
  max-width: 640px;
  margin: 32px auto 0;
}

@media (max-width: 700px) {
  .pricing-grid { grid-template-columns: 1fr; }
}

/* ─── Download ─── */

.download-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 24px;
  max-width: 800px;
  margin: 40px auto 0;
}
.download-card {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 36px 28px;
  text-align: center;
}
.download-icon {
  font-size: 48px;
  margin-bottom: 8px;
}
.download-card h3 {
  margin: 0 0 12px;
  font-size: 22px;
  color: var(--text);
}
.download-card p {
  color: var(--text-muted);
  font-size: 15px;
  margin: 0 0 24px;
}
.download-hint {
  font-size: 13px;
  color: var(--text-muted);
  margin: 12px 0 0;
}

/* Callout under the Windows download button. Sets expectation about
   the SmartScreen warning so non-technical users don't bail on the
   install when they see the blue box. Left-aligned inside a centered
   card reads as a "note" rather than a design element. */
.download-note {
  margin-top: 16px;
  padding: 12px 14px;
  background: var(--primary-tint);
  border-radius: var(--radius-sm);
  font-size: 13px;
  line-height: 1.5;
  color: var(--text);
  text-align: left;
}
.download-note strong {
  color: var(--text);
  font-weight: 700;
}

/* Google Play badge — Google's brand guidelines require the badge to
   be presented as-is (no filters, no color changes, no rotation),
   with a minimum height of 60px. Center it in the card and give it
   a subtle hover fade rather than a background change. */
.play-badge-link {
  display: inline-block;
  line-height: 0;
  transition: opacity 0.15s ease;
}
.play-badge-link:hover {
  opacity: 0.85;
  text-decoration: none;
}
.play-badge {
  height: 64px;
  width: auto;
  display: block;
  margin: 0 auto;
}
.download-fine {
  text-align: center;
  color: var(--text-muted);
  font-size: 14px;
  max-width: 640px;
  margin: 32px auto 0;
}

@media (max-width: 700px) {
  .download-grid { grid-template-columns: 1fr; }
}

/* ─── FAQ ─── */

.faq {
  border-bottom: 1px solid var(--border);
  padding: 20px 0;
}
.faq summary {
  cursor: pointer;
  font-size: 17px;
  font-weight: 600;
  color: var(--text);
  padding: 4px 0;
  list-style: none;
  position: relative;
  padding-right: 28px;
}
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after {
  content: "+";
  position: absolute;
  right: 0;
  top: 50%;
  transform: translateY(-50%);
  font-size: 24px;
  color: var(--primary);
  font-weight: 400;
  transition: transform 0.15s ease;
}
.faq[open] summary::after { content: "−"; }
.faq p {
  color: var(--text-muted);
  margin: 12px 0 4px;
  font-size: 16px;
}

/* ─── Footer ─── */

.site-footer {
  background: var(--bg-alt);
  border-top: 1px solid var(--border);
  padding: 40px 0 32px;
}
.footer-inner {
  display: grid;
  grid-template-columns: auto 1fr auto;
  gap: 24px;
  align-items: center;
}
.footer-brand {
  display: flex;
  align-items: center;
  gap: 8px;
  font-weight: 700;
  color: var(--text);
}
.footer-nav {
  display: flex;
  gap: 24px;
  justify-content: center;
}
.footer-nav a {
  color: var(--text-muted);
  font-size: 14px;
}
.footer-nav a:hover {
  color: var(--text);
  text-decoration: none;
}
.footer-copyright {
  font-size: 13px;
  color: var(--text-muted);
  margin: 0;
  text-align: right;
}

@media (max-width: 700px) {
  .footer-inner {
    grid-template-columns: 1fr;
    text-align: center;
    gap: 16px;
  }
  .footer-brand { justify-content: center; }
  .footer-copyright { text-align: center; }
}
