/* Taskvale — shared styles.
   Palette lifted from the app (AppearanceManager.AppBrand + tools/style.json)
   so the site and the product read as one thing:
     mint      #80CCA6   mintDeep #47947A   mintDeeper #337A66
     paper     #FBF7EF   cream    #F7F2E6   sand      #DACC8D
   Tone target: refined and modern, warm but not twee — soft edges and warm
   neutrals do the "cosy", restrained type and generous whitespace do the rest.
   No bouncing, no cartoon faces, no emoji soup. */

:root {
  --mint:        #80cca6;
  --mint-deep:   #47947a;
  --mint-deeper: #337a66;
  --sand:        #dacc8d;
  --paper:       #fbf7ef;
  --cream:       #f7f2e6;
  --card:        #ffffff;
  --ink:         #26282a;
  --muted:       #6c6f6b;
  --rule:        #e8e2d5;
  --shadow:      0 1px 2px rgba(38,40,42,.04), 0 8px 24px rgba(38,40,42,.06);
  --shadow-lift: 0 2px 4px rgba(38,40,42,.05), 0 18px 48px rgba(38,40,42,.10);
  --radius:      16px;
  --maxw:        68rem;
  /* The app's page wash: AppBrand.mint (#80CCA6) at 32% fading to 13% and out
     by mid-screen (BrandSoftBackground). Same three stops here. */
  --glow-1:      rgba(128, 204, 166, .32);
  --glow-2:      rgba(128, 204, 166, .13);
}

@media (prefers-color-scheme: dark) {
  :root {
    --paper: #16181a; --cream: #1b1e20; --card: #1f2225;
    --ink:   #e9e6df; --muted: #a2a49f; --rule: #2f3336;
    --mint-deep: #6fc0a2; --mint-deeper: #8fd3b6;
    --shadow:      0 1px 2px rgba(0,0,0,.30), 0 8px 24px rgba(0,0,0,.28);
    --shadow-lift: 0 2px 4px rgba(0,0,0,.32), 0 18px 48px rgba(0,0,0,.40);
    /* The app dials the glow right down in dark mode — 0.10 / 0.04. */
    --glow-1: rgba(128, 204, 166, .10);
    --glow-2: rgba(128, 204, 166, .04);
  }
}

* { box-sizing: border-box; }

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

body {
  margin: 0;
  /* Sticky footer: with the second CTA gone the landing page is shorter than a
     desktop viewport, which left the footer stranded mid-screen above a band of
     empty paper. Column layout + a growing <main> pins it to the bottom on
     short pages without affecting long ones. */
  min-height: 100vh; display: flex; flex-direction: column;
  color: var(--ink);
  /* Mint wash down from the top, fading out before the fold — the app's
     BrandSoftBackground. Sized to the viewport rather than the document so a
     long legal page gets the same gentle top glow as a short one, instead of
     a gradient stretched over several screens. */
  background-color: var(--paper);
  background-image: linear-gradient(to bottom,
                      var(--glow-1) 0%, var(--glow-2) 45%, transparent 100%);
  background-repeat: no-repeat;
  background-size: 100% 88vh;
  font: 400 17px/1.65 ui-sans-serif, -apple-system, BlinkMacSystemFont,
        "Segoe UI", Inter, Roboto, "Helvetica Neue", sans-serif;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

a { color: var(--mint-deeper); text-decoration-thickness: 1px; text-underline-offset: 2px; }
a:hover { color: var(--mint-deep); }

.wrap { max-width: var(--maxw); margin: 0 auto; padding: 0 1.5rem; }
main { flex: 1 0 auto; }
.site-foot { flex: none; }

/* ── Header ─────────────────────────────────────────────────────────── */

.site-head {
  position: sticky; top: 0; z-index: 20;
  /* Transparent at rest so the mint wash runs unbroken from the very top —
     painting even a translucent paper band here cut a visible seam across the
     strongest part of the gradient. The backdrop only appears once content is
     actually scrolling underneath and needs separating. */
  background: transparent;
  border-bottom: 1px solid transparent;
  transition: background-color .25s ease, border-color .25s ease;
}
.site-head.scrolled {
  background: color-mix(in srgb, var(--paper) 78%, transparent);
  backdrop-filter: saturate(1.4) blur(12px);
  border-bottom-color: var(--rule);
}
.site-head .wrap {
  display: flex; align-items: center; justify-content: space-between;
  min-height: 68px; gap: 1rem;
}
.brand {
  display: inline-flex; align-items: center; gap: .6rem;
  font-weight: 620; font-size: 1.06rem; letter-spacing: -.015em;
  color: var(--ink); text-decoration: none;
}
.brand .mark {
  /* The real app icon. border-radius approximates iOS's squircle so the mark
     reads the same here as it does on a home screen; height:auto keeps the
     width/height attributes from overriding the CSS size. */
  width: 26px; height: auto; flex: none;
  border-radius: 7px; display: block;
}
.nav { display: flex; gap: 1.5rem; align-items: center; }
.nav a {
  color: var(--muted); text-decoration: none; font-size: .95rem; font-weight: 500;
}
.nav a:hover { color: var(--ink); }
@media (max-width: 620px) { .nav a.hide-sm { display: none; } }

/* ── Hero ───────────────────────────────────────────────────────────── */

.hero { padding: clamp(2rem, 4.5vw, 3.5rem) 0 clamp(2.5rem, 6vw, 4.5rem); }
.hero .wrap {
  display: grid; gap: clamp(2.5rem, 6vw, 5rem);
  grid-template-columns: 1.05fr .95fr; align-items: center;
}
@media (max-width: 900px) {
  .hero .wrap { grid-template-columns: 1fr; }
  .hero-art { order: -1; }
}

.pill {
  display: inline-flex; align-items: center; gap: .5rem;
  padding: .34rem .8rem .34rem .62rem;
  border: 1px solid var(--rule); border-radius: 999px;
  background: var(--card); color: var(--muted);
  font-size: .82rem; font-weight: 550; letter-spacing: .01em;
}
.pill .dot {
  width: 7px; height: 7px; border-radius: 50%; background: var(--mint-deep);
  box-shadow: 0 0 0 3px color-mix(in srgb, var(--mint-deep) 18%, transparent);
}

h1 {
  margin: 1.15rem 0 0;
  font-size: clamp(2.15rem, 5.2vw, 3.5rem);
  line-height: 1.08; letter-spacing: -.028em; font-weight: 640;
}
h1 .accent {
  background: linear-gradient(100deg, var(--mint-deep), var(--mint-deeper));
  -webkit-background-clip: text; background-clip: text; color: transparent;
}
.lede {
  margin: 1.15rem 0 0; max-width: 34rem;
  font-size: clamp(1.02rem, 1.5vw, 1.15rem); color: var(--muted);
}

/* Phone frame around the map art */
.hero-art { display: flex; justify-content: center; }
.phone {
  position: relative; width: min(248px, 66vw);
  padding: 9px; border-radius: 36px;
  background: linear-gradient(160deg, #f3efe6, #ddd7c9);
  box-shadow: var(--shadow-lift);
}
@media (prefers-color-scheme: dark) {
  .phone { background: linear-gradient(160deg, #34383c, #212427); }
}
.phone::after {              /* speaker notch */
  content: ""; position: absolute; top: 19px; left: 50%; transform: translateX(-50%);
  width: 70px; height: 17px; border-radius: 999px; background: rgba(0,0,0,.82);
}
.phone img {
  /* height:auto is load-bearing. The <img> carries width/height attributes (so
     the browser can reserve space and avoid layout shift), and those act as a
     presentational hint that OVERRIDES aspect-ratio once width is set in CSS —
     without this the art rendered at its full 1344px intrinsic height and shoved
     the whole hero below the fold. */
  display: block; width: 100%; height: auto; border-radius: 28px;
  aspect-ratio: 768 / 1344; object-fit: cover;
}

/* ── Signup ─────────────────────────────────────────────────────────── */

.signup { margin: 1.9rem 0 0; max-width: 30rem; }
.signup-row { display: flex; gap: .55rem; flex-wrap: wrap; }
.signup input[type="email"] {
  flex: 1 1 15rem; min-width: 0;
  padding: .82rem 1rem; font: inherit; font-size: 1rem; color: var(--ink);
  background: var(--card); border: 1px solid var(--rule); border-radius: 12px;
  transition: border-color .15s ease, box-shadow .15s ease;
}
.signup input[type="email"]::placeholder { color: color-mix(in srgb, var(--muted) 72%, transparent); }
.signup input[type="email"]:focus {
  outline: none; border-color: var(--mint-deep);
  box-shadow: 0 0 0 4px color-mix(in srgb, var(--mint-deep) 14%, transparent);
}
.btn {
  appearance: none; cursor: pointer; white-space: nowrap;
  padding: .82rem 1.35rem; font: inherit; font-size: 1rem; font-weight: 570;
  color: #fff; border: 0; border-radius: 12px;
  background: linear-gradient(165deg, var(--mint-deep), var(--mint-deeper));
  box-shadow: var(--shadow);
  transition: transform .12s ease, filter .15s ease;
}
.btn:hover { filter: brightness(1.06); }
.btn:active { transform: translateY(1px); }
.btn[disabled] { opacity: .6; cursor: default; transform: none; }
.hp { position: absolute; left: -9999px; width: 1px; height: 1px; overflow: hidden; }
.signup-note { margin: .7rem 0 0; font-size: .85rem; color: var(--muted); }
.signup-msg:empty { display: none; }
.signup-msg { margin: .6rem 0 0; font-size: .92rem; font-weight: 520; }
.signup-msg.ok   { color: var(--mint-deeper); }
.signup-msg.err  { color: #b4553f; }

/* ── Platform badges ────────────────────────────────────────────────── */

.platforms { display: flex; gap: .6rem; margin: 1.6rem 0 0; flex-wrap: wrap; }
.badge {
  display: inline-flex; align-items: center; gap: .5rem;
  padding: .55rem .95rem; border-radius: 12px;
  border: 1px solid var(--rule); background: var(--card);
  font-size: .9rem; font-weight: 520; color: var(--ink); box-shadow: var(--shadow);
}
.badge span { color: var(--muted); font-weight: 450; font-size: .84rem; }
.badge svg { width: 17px; height: 17px; fill: currentColor; opacity: .82; }

/* ── Feature cards ──────────────────────────────────────────────────── */

/* ── Footer ─────────────────────────────────────────────────────────── */

.site-foot {
  border-top: 1px solid var(--rule); background: var(--paper);
  padding: 2.6rem 0 3.2rem; font-size: .92rem;
}
.site-foot .wrap {
  display: flex; justify-content: space-between; gap: 1.4rem; flex-wrap: wrap;
  align-items: baseline;
}
.site-foot .links { display: flex; gap: 1.35rem; flex-wrap: wrap; }
.site-foot a { color: var(--muted); text-decoration: none; }
.site-foot a:hover { color: var(--ink); text-decoration: underline; }
.site-foot .copy { color: var(--muted); }

/* ── Legal pages ────────────────────────────────────────────────────── */

.legal { padding: clamp(2.5rem, 6vw, 4rem) 0 clamp(3rem, 7vw, 5rem); }
.legal .doc {
  max-width: 46rem; margin: 0 auto;
  background: var(--card); border: 1px solid var(--rule);
  border-radius: var(--radius); padding: clamp(1.6rem, 4vw, 2.75rem);
  box-shadow: var(--shadow);
}
.legal h1 { margin: 0 0 .3rem; font-size: clamp(1.7rem, 4vw, 2.2rem); }
.legal h2 {
  margin: 2.3rem 0 .6rem; font-size: 1.12rem;
  letter-spacing: -.012em; font-weight: 620;
}
.legal h3 { margin: 1.5rem 0 .4rem; font-size: 1rem; font-weight: 600; }
.legal .meta { color: var(--muted); font-size: .9rem; margin: 0 0 1.9rem; }
.legal .lede { font-size: 1.04rem; max-width: none; }
.legal ul { padding-left: 1.15rem; }
.legal li { margin: .3rem 0; }
.legal hr { border: 0; border-top: 1px solid var(--rule); margin: 2.2rem 0; }
.legal table { width: 100%; border-collapse: collapse; margin: 1rem 0; font-size: .94rem; }
.legal th, .legal td { text-align: left; padding: .55rem .7rem; border-bottom: 1px solid var(--rule); }
.legal th { font-weight: 600; }
.legal code {
  background: var(--cream); padding: .1rem .35rem; border-radius: 5px;
  font-size: .9em; font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
}
.callout {
  background: var(--cream); border: 1px solid var(--rule);
  border-left: 3px solid var(--mint-deep);
  border-radius: 10px; padding: 1rem 1.15rem; margin: 1.5rem 0;
}
.callout p:last-child { margin-bottom: 0; }
.callout p:first-child { margin-top: 0; }

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

/* ── Contact page ───────────────────────────────────────────────────── */

.contact-form { margin: 1.4rem 0 0; }
.field { margin: 0 0 1.05rem; }
.field label {
  display: block; margin: 0 0 .35rem;
  font-size: .92rem; font-weight: 560; letter-spacing: -.005em;
}
.field input, .field select, .field textarea {
  width: 100%; padding: .78rem .95rem;
  font: inherit; font-size: 1rem; color: var(--ink);
  background: var(--card); border: 1px solid var(--rule); border-radius: 12px;
  transition: border-color .15s ease, box-shadow .15s ease;
}
.field textarea { resize: vertical; min-height: 8rem; }
.field input::placeholder, .field textarea::placeholder {
  color: color-mix(in srgb, var(--muted) 70%, transparent);
}
.field input:focus, .field select:focus, .field textarea:focus {
  outline: none; border-color: var(--mint-deep);
  box-shadow: 0 0 0 4px color-mix(in srgb, var(--mint-deep) 14%, transparent);
}
.field .hint { display: block; margin: .35rem 0 0; font-size: .85rem; color: var(--muted); }

.form-actions { display: flex; align-items: center; gap: 1rem; flex-wrap: wrap; margin: 1.4rem 0 0; }
.contact-msg:empty { display: none; }
.contact-msg { margin: 0; font-size: .93rem; font-weight: 520; }
.contact-msg.ok  { color: var(--mint-deeper); }
.contact-msg.err { color: #b4553f; }
