/* ============================================================
   Tidify — site styles
   Palette, type scale and motion are lifted from the app's own
   design system (Tidify design/.../hifi/tokens.css) so the site
   and the product read as one thing.

   Two layouts share this sheet:
     body            -> prose (privacy, terms, support, 404)
     body.marketing  -> full-bleed landing page
   ============================================================ */

:root {
  --warm-white: #FAF8F3;
  --surface: #FFFFFF;
  --surface-sunk: #F4F1EA;

  --ink: #2B2A26;
  --ink-2: #6E6B63;
  --ink-3: #9C988D;

  --line: #ECE8DF;
  --line-strong: #DED9CD;

  --sage-700: #4F6451;
  --sage-600: #61795F;
  --sage-500: #76906F;
  --sage-100: #E4ECDF;
  --sage-50: #F1F5EE;

  --clay: #B07F62;
  --amber: #C39A4E;

  --bg: var(--warm-white);
  --fg1: var(--ink);
  --fg2: var(--ink-2);
  --fg3: var(--ink-3);
  --border: var(--line);
  --border-strong: var(--line-strong);
  --accent: var(--sage-600);
  --accent-hover: var(--sage-500);
  --accent-tint: var(--sage-100);
  --accent-wash: var(--sage-50);
  --on-accent: #FFFFFF;
  --focus-ring: rgba(97, 121, 95, 0.45);

  --font-sans: -apple-system, BlinkMacSystemFont, "SF Pro Text", "Segoe UI",
               system-ui, Helvetica, Arial, sans-serif;

  --radius-sm: 8px;
  --radius-md: 12px;
  --radius-lg: 16px;
  --radius-xl: 24px;
  --radius-pill: 999px;

  --shadow-sm: 0 1px 3px rgba(43,42,38,.05), 0 1px 2px rgba(43,42,38,.04);
  --shadow-md: 0 4px 16px rgba(43,42,38,.06), 0 1px 4px rgba(43,42,38,.04);
  --shadow-lg: 0 12px 32px rgba(43,42,38,.08), 0 2px 8px rgba(43,42,38,.05);
  --shadow-phone: 0 24px 60px rgba(43,42,38,.18), 0 4px 12px rgba(43,42,38,.10);

  --ease-out: cubic-bezier(.16, 1, .3, 1);
  --dur: 220ms;

  --measure: 42rem;
  --page: 74rem;
}

@media (prefers-color-scheme: dark) {
  :root {
    --warm-white: #1A1916;
    --surface: #242320;
    --surface-sunk: #2F2D29;
    --ink: #F1EEE7;
    --ink-2: #B3AFA5;
    --ink-3: #807D74;
    --line: #312F2A;
    --line-strong: #403E37;
    --sage-700: #BCD0B6;
    --sage-600: #7E9A7A;
    --sage-500: #94AE8F;
    --sage-100: #2C3A2C;
    --sage-50: #232A20;
    --focus-ring: rgba(148,174,143,.5);
    --shadow-sm: 0 1px 3px rgba(0,0,0,.45), 0 1px 2px rgba(0,0,0,.30);
    --shadow-md: 0 4px 16px rgba(0,0,0,.50), 0 1px 4px rgba(0,0,0,.30);
    --shadow-lg: 0 12px 32px rgba(0,0,0,.60), 0 2px 8px rgba(0,0,0,.40);
    --shadow-phone: 0 24px 60px rgba(0,0,0,.65), 0 4px 12px rgba(0,0,0,.45);
  }
}

*, *::before, *::after { box-sizing: border-box; }

html { scroll-behavior: smooth; }
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { animation-duration: .001ms !important; transition-duration: .001ms !important; }
}

/* ---------- prose layout: legal + support pages ---------- */
body {
  margin: 0 auto;
  padding: 3rem 1.5rem 6rem;
  max-width: var(--measure);
  background: var(--bg);
  color: var(--fg1);
  font: 16px/1.65 var(--font-sans);
  -webkit-text-size-adjust: 100%;
  -webkit-font-smoothing: antialiased;
}
header { border-bottom: 1px solid var(--border); padding-bottom: 1.5rem; margin-bottom: 2.5rem; }
h1 { font-size: 1.75rem; line-height: 1.25; margin: 0 0 .4rem; letter-spacing: -.015em; }
h2 { font-size: 1.05rem; margin: 2.5rem 0 .6rem; letter-spacing: -.01em; }
p, li { color: var(--fg1); }
ul { padding-left: 1.15rem; }
li { margin: .35rem 0; }
a { color: var(--accent); }
a:hover { color: var(--accent-hover); }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; border-radius: 4px; }
.meta { color: var(--fg2); font-size: .875rem; margin: 0; }
.lede { color: var(--fg2); }
table { border-collapse: collapse; width: 100%; margin: 1rem 0; font-size: .9rem; display: block; overflow-x: auto; }
th, td { text-align: left; padding: .5rem .65rem; border-bottom: 1px solid var(--border); vertical-align: top; }
th { font-weight: 600; }
footer { margin-top: 4rem; padding-top: 1.5rem; border-top: 1px solid var(--border); color: var(--fg2); font-size: .875rem; }

img { max-width: 100%; height: auto; }

.skip {
  position: absolute; left: -9999px; top: 0;
  background: var(--accent); color: var(--on-accent);
  padding: .6rem 1rem; border-radius: 0 0 var(--radius-md) 0; z-index: 100;
}
.skip:focus { left: 0; }

/* ============================================================
   MARKETING LAYOUT
   ============================================================ */
body.marketing {
  max-width: none;
  padding: 0;
  overflow-x: hidden;
}
body.marketing header { border: 0; padding: 0; margin: 0; }
body.marketing footer { margin: 0; }

.wrap { width: 100%; max-width: var(--page); margin: 0 auto; padding: 0 1.5rem; }

/* ---------- nav ---------- */
.nav {
  position: sticky; top: 0; z-index: 50;
  background: color-mix(in srgb, var(--bg) 82%, transparent);
  backdrop-filter: blur(16px) saturate(180%);
  -webkit-backdrop-filter: blur(16px) saturate(180%);
  border-bottom: 1px solid transparent;
  transition: border-color var(--dur) var(--ease-out);
}
.nav.is-stuck { border-bottom-color: var(--border); }
.nav-in { display: flex; align-items: center; gap: 1.5rem; height: 64px; }
.brand { display: flex; align-items: center; gap: .6rem; font-weight: 600; font-size: 1.05rem; color: var(--fg1); text-decoration: none; letter-spacing: -.01em; }
.brand svg { display: block; border-radius: 22.4%; }
.nav-links { display: flex; gap: 1.75rem; margin-left: auto; }
.nav-links a { color: var(--fg2); text-decoration: none; font-size: .925rem; transition: color var(--dur) var(--ease-out); }
.nav-links a:hover { color: var(--fg1); }
.nav .btn { margin-left: 1.5rem; }
@media (max-width: 820px) {
  .nav-links { display: none; }
  .nav .btn { margin-left: auto; }
}

/* ---------- buttons ---------- */
.btn {
  display: inline-flex; align-items: center; gap: .55rem;
  padding: .7rem 1.15rem; border-radius: var(--radius-md);
  background: var(--ink); color: var(--bg);
  text-decoration: none; font-size: .925rem; font-weight: 500;
  border: 1px solid transparent; white-space: nowrap;
  transition: transform var(--dur) var(--ease-out), opacity var(--dur) var(--ease-out);
}
.btn:hover { color: var(--bg); opacity: .88; transform: translateY(-1px); }
.btn svg { flex: none; }
.btn .btn-t { display: flex; flex-direction: column; line-height: 1.1; text-align: left; }
.btn .btn-t small { font-size: .625rem; opacity: .75; font-weight: 400; }
.btn .btn-t strong { font-size: .95rem; font-weight: 600; letter-spacing: -.01em; }
.btn-lg { padding: .85rem 1.4rem; }
.btn-ghost { background: transparent; color: var(--fg1); border-color: var(--border-strong); }
.btn-ghost:hover { color: var(--fg1); background: var(--surface-sunk); }

/* ---------- hero ---------- */
.hero { padding: clamp(3rem, 8vw, 6.5rem) 0 clamp(3rem, 6vw, 5rem); }
.hero-grid { display: grid; grid-template-columns: 1.1fr .9fr; gap: clamp(2rem, 5vw, 4rem); align-items: center; }
@media (max-width: 940px) { .hero-grid { grid-template-columns: 1fr; } }

.pill {
  display: inline-flex; align-items: center; gap: .45rem;
  padding: .38rem .8rem .38rem .6rem; border-radius: var(--radius-pill);
  background: var(--accent-wash); border: 1px solid var(--accent-tint);
  color: var(--sage-700); font-size: .8rem; font-weight: 500;
}
.pill svg { color: var(--accent); }

.hero h1 {
  /* Sized so "Make it minimal." and "Keep it minimal." each hold one line
     from 360px up — the two-line lockup is the whole point of the wordmark. */
  font-size: clamp(2.05rem, 4.6vw, 3.5rem);
  line-height: 1.06; letter-spacing: -.03em; font-weight: 700;
  text-wrap: balance;
  margin: 1.4rem 0 0;
}
.hero h1 .dim { color: var(--accent); display: block; }
.hero .sub {
  font-size: clamp(1.05rem, 2.1vw, 1.3rem); line-height: 1.55;
  color: var(--fg2); margin: 1.4rem 0 0; max-width: 32ch;
}
.hero-cta { display: flex; align-items: center; gap: 1.1rem; flex-wrap: wrap; margin-top: 2.2rem; }
.hero-cta .note { font-size: .875rem; color: var(--fg3); }

/* ---------- phone cluster ---------- */
/* The cluster is absolutely positioned, so the container needs a height of
   its own or the phones spill into the section below. An aspect ratio keeps
   that height tracking the column width at every breakpoint. */
.phones { position: relative; aspect-ratio: 1 / 1.42; }
.phone {
  border-radius: 30px; box-shadow: var(--shadow-phone);
  display: block; background: #111;
}
.phones .p1 {
  position: absolute; width: 54%; left: 0; top: 8%;
  transform: rotate(-5deg); z-index: 1;
}
.phones .p2 {
  position: absolute; width: 60%; right: 0; top: 0;
  transform: rotate(3.5deg); z-index: 2;
}
@media (max-width: 940px) {
  .phones { aspect-ratio: auto; display: flex; justify-content: center; gap: 1rem; margin-top: 3rem; }
  .phones .p1, .phones .p2 { position: static; width: 46%; max-width: 240px; transform: none; }
}

/* ---------- generic section ---------- */
.section { padding: clamp(3.5rem, 8vw, 6rem) 0; }
.section + .section { border-top: 1px solid var(--border); }
.eyebrow {
  font-size: .75rem; font-weight: 600; letter-spacing: .08em;
  text-transform: uppercase; color: var(--fg3); margin: 0 0 .9rem;
}
.section h2 {
  font-size: clamp(1.85rem, 4vw, 2.6rem); line-height: 1.12;
  letter-spacing: -.025em; font-weight: 700; margin: 0; max-width: 20ch;
}
.section .intro { color: var(--fg2); font-size: 1.075rem; margin: 1rem 0 0; max-width: 52ch; }
.center { text-align: center; }
.center h2, .center .intro { margin-left: auto; margin-right: auto; }

/* ---------- steps ---------- */
.steps { display: grid; grid-template-columns: repeat(3, 1fr); gap: 1.25rem; margin-top: 3rem; }
@media (max-width: 800px) { .steps { grid-template-columns: 1fr; } }
.step {
  background: var(--surface); border: 1px solid var(--border);
  border-radius: var(--radius-lg); padding: 1.75rem; box-shadow: var(--shadow-sm);
}
.step .n {
  width: 30px; height: 30px; border-radius: 50%;
  background: var(--accent-tint); color: var(--sage-700);
  display: grid; place-items: center; font-size: .8rem; font-weight: 700;
  margin-bottom: 1.1rem;
}
.step h3 { font-size: 1.075rem; margin: 0 0 .5rem; letter-spacing: -.01em; }
.step p { color: var(--fg2); font-size: .95rem; margin: 0; line-height: 1.6; }

/* ---------- feature rows ---------- */
.feature { display: grid; grid-template-columns: 1fr 1fr; gap: clamp(2rem, 6vw, 5rem); align-items: center; }
.feature + .feature { margin-top: clamp(3.5rem, 8vw, 6rem); }
.feature.flip .feature-media { order: -1; }
@media (max-width: 860px) {
  .feature { grid-template-columns: 1fr; gap: 2.5rem; }
  .feature.flip .feature-media { order: 0; }
}
.feature h3 { font-size: clamp(1.5rem, 3vw, 2rem); line-height: 1.16; letter-spacing: -.02em; margin: .75rem 0 0; }
.feature p { color: var(--fg2); margin: 1rem 0 0; line-height: 1.65; }
.feature-media { display: flex; justify-content: center; }
.feature-media img { width: 100%; max-width: 270px; border-radius: 30px; box-shadow: var(--shadow-phone); }
.ticks { list-style: none; padding: 0; margin: 1.5rem 0 0; }
.ticks li { display: flex; gap: .65rem; align-items: flex-start; margin: .6rem 0; color: var(--fg2); font-size: .95rem; }
.ticks svg { flex: none; color: var(--accent); margin-top: .25rem; }

/* ---------- pricing ---------- */
.plans { display: grid; grid-template-columns: repeat(2, 1fr); gap: 1.25rem; margin-top: 3rem; max-width: 44rem; margin-inline: auto; }
@media (max-width: 700px) { .plans { grid-template-columns: 1fr; } }
.plan {
  background: var(--surface); border: 1px solid var(--border);
  border-radius: var(--radius-lg); padding: 1.9rem; box-shadow: var(--shadow-sm);
  display: flex; flex-direction: column;
}
.plan.is-pro { border-color: var(--accent); box-shadow: var(--shadow-md); position: relative; }
.plan.is-pro::after {
  content: "Pro"; position: absolute; top: -.7rem; left: 1.9rem;
  background: var(--accent); color: var(--on-accent);
  font-size: .7rem; font-weight: 600; letter-spacing: .04em;
  padding: .2rem .6rem; border-radius: var(--radius-pill);
}
.plan h3 { font-size: 1.05rem; margin: 0; }
.plan .price { font-size: 2.1rem; font-weight: 700; letter-spacing: -.03em; margin: .8rem 0 .1rem; }
.plan .price small { font-size: .95rem; font-weight: 400; color: var(--fg2); letter-spacing: 0; }
.plan .alt { color: var(--fg3); font-size: .875rem; margin: 0 0 1.3rem; }
.plan ul { list-style: none; padding: 0; margin: 0 0 1.6rem; }
.plan li { display: flex; gap: .6rem; align-items: flex-start; margin: .55rem 0; font-size: .95rem; color: var(--fg2); }
.plan li svg { flex: none; color: var(--accent); margin-top: .25rem; }
.plan .btn { margin-top: auto; justify-content: center; }
.plan-note { text-align: center; color: var(--fg3); font-size: .85rem; margin: 1.5rem auto 0; max-width: 48ch; line-height: 1.6; }

/* ---------- faq ---------- */
.faq { max-width: var(--measure); margin: 2.5rem auto 0; }
.faq details {
  border-bottom: 1px solid var(--border); padding: 1.15rem 0;
}
.faq summary {
  cursor: pointer; font-weight: 500; font-size: 1.02rem;
  list-style: none; display: flex; justify-content: space-between; gap: 1rem; align-items: center;
}
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after {
  content: ""; flex: none; width: 10px; height: 10px;
  border-right: 2px solid var(--fg3); border-bottom: 2px solid var(--fg3);
  transform: rotate(45deg); transition: transform var(--dur) var(--ease-out);
}
.faq details[open] summary::after { transform: rotate(-135deg); }
.faq p { color: var(--fg2); margin: .85rem 0 0; font-size: .95rem; line-height: 1.65; }

/* ---------- closing cta ---------- */
.cta-band { background: var(--accent-wash); border-top: 1px solid var(--border); }
.cta-band .wrap { padding-block: clamp(3.5rem, 8vw, 5.5rem); text-align: center; }
.cta-band h2 { font-size: clamp(1.85rem, 4vw, 2.6rem); letter-spacing: -.025em; margin: 0 auto; max-width: 18ch; line-height: 1.12; }
.cta-band p { color: var(--fg2); margin: 1rem auto 2rem; max-width: 44ch; }
.cta-band .btn { justify-content: center; }

/* ---------- site footer ---------- */
.site-foot { border-top: 1px solid var(--border); background: var(--bg); }
.site-foot .wrap { padding-block: 2.5rem; display: flex; flex-wrap: wrap; gap: 1rem 2rem; align-items: center; }
.site-foot .brand { font-size: .95rem; }
.site-foot nav { display: flex; gap: 1.5rem; margin-left: auto; flex-wrap: wrap; }
.site-foot a { color: var(--fg2); text-decoration: none; font-size: .9rem; }
.site-foot a:hover { color: var(--fg1); text-decoration: underline; }
.site-foot .copy { width: 100%; color: var(--fg3); font-size: .825rem; margin: 0; }

/* The app screenshots are dark-mode captures, so on the dark site they sit on
   a near-matching ground. A hairline restores the edge without a visible frame. */
@media (prefers-color-scheme: dark) {
  .phone, .feature-media img {
    outline: 1px solid rgba(255,255,255,.09);
    outline-offset: -1px;
  }
}
