/* Sheafly — site styles. Clean tool-site look: cool grey canvas, white header and cards,
   bold sans headings, one red accent. The phone mock keeps the app's own colours. */

:root {
  --bg: #F5F5FA;
  --surface: #FFFFFF;
  --surface-alt: #EDEDF3;
  --ink: #33333B;
  --ink2: #47474F;
  --ink3: #707078;
  --hair: #D6D6DF;
  --hair2: #E8E8EF;
  --accent: #E5322D;
  --accent-hover: #C92A25;
  --accent-tint: #FDECEB;
  --good: #2E9E5B;
  --good-tint: #E4F5EA;
  --primary: #E5322D;
  --primary-ink: #FFFFFF;
  --shadow: 0 5px 30px 0 rgba(23, 23, 23, .10);
  --shadow-sm: 0 1px 3px rgba(23, 23, 23, .06), 0 4px 14px rgba(23, 23, 23, .05);

  --sans: "Inter", -apple-system, "Segoe UI", system-ui, Arial, sans-serif;
  --radius: 12px;
  --max: 1120px;
}

@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --bg: #18181D;
    --surface: #23232A;
    --surface-alt: #2D2D35;
    --ink: #F2F2F5;
    --ink2: #C4C4CC;
    --ink3: #92929B;
    --hair: #3A3A43;
    --hair2: #2E2E36;
    --accent: #F0524D;
    --accent-hover: #FF6A65;
    --accent-tint: #3A1F1F;
    --good: #5CC487;
    --good-tint: #1E3327;
    --primary: #E5322D;
    --primary-ink: #FFFFFF;
    --shadow: 0 5px 30px 0 rgba(0, 0, 0, .45);
    --shadow-sm: 0 1px 3px rgba(0, 0, 0, .3), 0 4px 14px rgba(0, 0, 0, .25);
  }
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--ink2);
  font: 16px/1.6 var(--sans);
  -webkit-font-smoothing: antialiased;
}
img, svg { display: block; max-width: 100%; }
a { color: var(--accent); text-decoration: none; }
a:hover { text-decoration: underline; text-underline-offset: 3px; }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; border-radius: 4px; }

.wrap { max-width: var(--max); margin: 0 auto; padding: 0 24px; }
@media (max-width: 560px) { .wrap { padding: 0 16px; } }

.eyebrow {
  font: 600 12px/1.4 var(--sans);
  letter-spacing: .08em;
  text-transform: uppercase;
  color: var(--accent);
  margin: 0 0 12px;
}
h1, h2, h3 { font-family: var(--sans); font-weight: 600; color: var(--ink); letter-spacing: -.015em; margin: 0; }
h1 { font-size: clamp(36px, 5.2vw, 52px); line-height: 1.1; }
h2 { font-size: clamp(28px, 3.6vw, 40px); line-height: 1.15; }
h3 { font-size: 19px; line-height: 1.3; }
p { margin: 0; }
.lede { font-size: 20px; line-height: 1.5; color: var(--ink2); max-width: 34em; }

/* ---------- header ---------- */
.site-header {
  position: sticky; top: 0; z-index: 10;
  background: var(--surface);
  border-bottom: 1px solid var(--hair);
}
.site-header .wrap { display: flex; align-items: center; justify-content: space-between; height: 60px; }
.wordmark {
  display: inline-flex; align-items: center; gap: 10px;
  font: 700 21px/1 var(--sans); letter-spacing: -.01em;
  color: var(--ink); text-decoration: none;
}
.wordmark:hover { text-decoration: none; }
.wordmark img { width: 30px; height: 30px; border-radius: 7px; }
.nav { display: flex; gap: 26px; align-items: center; }
.nav a {
  color: var(--ink); text-decoration: none;
  font-size: 12.5px; font-weight: 600; text-transform: uppercase; letter-spacing: .02em;
}
.nav a:hover, .nav a[aria-current="page"] { color: var(--accent); text-decoration: none; }
@media (max-width: 720px) { .nav .hide-sm { display: none; } .nav { gap: 18px; } }

/* ---------- buttons ---------- */
.btn {
  display: inline-flex; align-items: center; gap: 10px;
  padding: 13px 22px; border-radius: 8px;
  font: 600 15px/1 var(--sans); text-decoration: none;
  border: 1px solid transparent; cursor: pointer;
  transition: background .15s ease, box-shadow .15s ease, border-color .15s ease;
}
.btn:hover { text-decoration: none; }
.btn-primary { background: var(--primary); color: var(--primary-ink); box-shadow: 0 4px 14px rgba(229, 50, 45, .28); }
.btn-primary:hover { background: var(--accent-hover); }
.btn-ghost { background: var(--surface); color: var(--ink); border-color: var(--hair); }
.btn-ghost:hover { border-color: var(--ink3); }
.btn svg { width: 20px; height: 20px; flex: none; }
.btn small { display: block; font: 500 10.5px/1.2 var(--sans); opacity: .8; letter-spacing: .02em; }
.btn .stack { display: flex; flex-direction: column; gap: 3px; text-align: left; }
.store-row { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 32px; }

/* ---------- hero ---------- */
.hero { padding: 72px 0 88px; }
.hero .wrap { display: grid; grid-template-columns: 1.1fr .9fr; gap: 56px; align-items: center; }
.hero .lede { margin-top: 20px; }
.hero-note { margin-top: 18px; font-size: 14px; color: var(--ink3); }
@media (max-width: 860px) {
  .hero { padding: 48px 0 64px; }
  .hero .wrap { grid-template-columns: 1fr; gap: 48px; }
}

/* phone mock: the library screen, drawn in HTML (app colours, not site colours) */
.phone {
  width: 300px; max-width: 100%; margin: 0 auto;
  background: #0f0d0c; border-radius: 46px; padding: 11px;
  box-shadow: var(--shadow);
}
.screen {
  background: #F4EFE4; color: #181513;
  border-radius: 36px; overflow: hidden;
  padding: 18px 16px 0; height: 560px; position: relative;
  font-family: var(--sans);
}
.screen .status { display: flex; justify-content: space-between; font: 600 12px/1 var(--sans); padding: 0 10px 16px; }
.screen .eb { font: 600 9.5px/1 var(--sans); letter-spacing: .12em; color: #A6451F; text-transform: uppercase; }
.screen .title { font: 600 25px/1.1 var(--sans); letter-spacing: -.01em; margin: 6px 0 14px; color: #181513; }
.screen .search {
  background: #EBE4D5; border-radius: 10px; padding: 9px 12px;
  font-size: 12.5px; color: #968E80; display: flex; gap: 8px; align-items: center;
}
.screen .chips { display: flex; gap: 6px; margin: 12px 0 14px; }
.screen .chip { font-size: 11px; font-weight: 600; padding: 5px 10px; border-radius: 99px; background: #FFFDF8; border: 1px solid rgba(24,21,19,.1); }
.screen .chip.on { background: #181513; color: #F7F3E9; border-color: #181513; }
.screen .doc { display: flex; gap: 12px; align-items: center; padding: 10px 0; border-bottom: 1px solid rgba(24,21,19,.07); }
.screen .thumb {
  width: 38px; height: 48px; border-radius: 3px; background: #FFFEFB; flex: none;
  box-shadow: 0 1px 2px rgba(24,21,19,.16);
  background-image: repeating-linear-gradient(#fff0 0 6px, rgba(24,21,19,.13) 6px 7px);
  background-size: 70% 100%; background-repeat: no-repeat; background-position: 50% 8px;
}
.screen .doc b { display: block; font-size: 13px; font-weight: 600; }
.screen .doc span { font-size: 11px; color: #59524A; }
.screen .dot { width: 7px; height: 7px; border-radius: 50%; margin-left: auto; flex: none; }
.screen .tabbar {
  position: absolute; left: 0; right: 0; bottom: 0; height: 70px;
  background: #FFFDF8; border-top: 1px solid rgba(24,21,19,.08);
  display: flex; justify-content: space-around; align-items: center; padding-bottom: 10px;
}
.screen .tabbar i { width: 18px; height: 18px; border-radius: 5px; background: #968E80; opacity: .45; display: block; }
.screen .tabbar i.on { background: #181513; opacity: 1; }
.screen .fab {
  width: 50px; height: 50px; border-radius: 50%; background: #A6451F; margin-top: -26px;
  display: grid; place-items: center; box-shadow: 0 6px 16px rgba(166,69,31,.35);
}
.screen .fab svg { width: 22px; height: 22px; }

/* ---------- sections ---------- */
section { padding: 88px 0; scroll-margin-top: 60px; }
section.tint { background: var(--surface); border-top: 1px solid var(--hair2); border-bottom: 1px solid var(--hair2); }
.section-head { max-width: 44em; margin: 0 auto 48px; text-align: center; }
.section-head p { margin-top: 14px; color: var(--ink2); font-size: 18px; }
.section-head p.eyebrow { margin: 0 0 12px; font-size: 12px; color: var(--accent); }
.split .section-head { text-align: left; margin: 0; }
@media (max-width: 560px) { section { padding: 64px 0; } }

/* cards: white, rounded, soft shadow; on white sections they sit on the grey canvas colour */
.step, .promises, .feature, .plan, .doc-page .summary {
  background: var(--surface); border: 1px solid var(--hair2); border-radius: var(--radius);
  box-shadow: var(--shadow-sm);
}
.tint .step, .tint .feature, .tint .plan { background: var(--bg); box-shadow: none; }

.steps { display: grid; grid-template-columns: repeat(3, 1fr); gap: 24px; counter-reset: step; }
.step { padding: 30px 28px; text-align: center; }
.step::before {
  counter-increment: step; content: "Step " counter(step);
  display: inline-block; font: 600 12px/1 var(--sans); color: var(--accent);
  background: var(--accent-tint); padding: 7px 12px; border-radius: 99px; margin-bottom: 18px;
  text-transform: uppercase; letter-spacing: .06em;
}
.step h3 { font-size: 24px; }
.step p { margin-top: 10px; color: var(--ink2); font-size: 15.5px; }
@media (max-width: 820px) { .steps { grid-template-columns: 1fr; } }

.drives { display: flex; flex-wrap: wrap; justify-content: center; gap: 10px; margin-top: 32px; }
.drive {
  display: inline-flex; align-items: center; gap: 9px;
  padding: 10px 16px; border-radius: 8px;
  background: var(--surface); border: 1px solid var(--hair);
  font-weight: 600; font-size: 14.5px; color: var(--ink);
}
.drive::before { content: ""; width: 8px; height: 8px; border-radius: 50%; background: var(--good); }

.split { display: grid; grid-template-columns: 1fr 1fr; gap: 64px; align-items: start; }
@media (max-width: 860px) { .split { grid-template-columns: 1fr; gap: 40px; } }

.promises { list-style: none; margin: 0; padding: 0; }
.promises li { display: grid; grid-template-columns: 40px 1fr; gap: 14px; padding: 20px 22px; border-bottom: 1px solid var(--hair2); }
.promises li:last-child { border-bottom: 0; }
.promises .ic {
  width: 40px; height: 40px; border-radius: 10px; background: var(--accent-tint); color: var(--accent);
  display: grid; place-items: center;
}
.promises .ic svg { width: 20px; height: 20px; }
.promises b { display: block; font-weight: 600; font-size: 15.5px; color: var(--ink); }
.promises span { color: var(--ink2); font-size: 14.5px; }

.features { display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px; }
.feature { padding: 26px 24px; transition: box-shadow .2s ease, transform .2s ease; }
.feature:hover { box-shadow: var(--shadow); transform: translateY(-2px); }
.feature svg {
  width: 44px; height: 44px; padding: 11px; border-radius: 10px;
  color: var(--accent); background: var(--accent-tint); margin-bottom: 16px;
}
.feature h3 { font-size: 18px; }
.feature p { margin-top: 8px; color: var(--ink2); font-size: 15px; }
@media (max-width: 860px) { .features { grid-template-columns: 1fr 1fr; } }
@media (max-width: 560px) { .features { grid-template-columns: 1fr; } }

.plans { display: grid; grid-template-columns: 1fr 1fr; gap: 24px; max-width: 860px; margin: 0 auto; }
.plan { padding: 32px 30px; }
.plan.pro { border: 2px solid var(--accent); box-shadow: var(--shadow); position: relative; }
.plan .eyebrow { margin-bottom: 10px; }
.plan:not(.pro) .eyebrow { color: var(--ink3); }
.plan h3 { font-size: 28px; }
.plan ul { list-style: none; padding: 0; margin: 20px 0 0; }
.plan li { padding: 10px 0 10px 28px; position: relative; font-size: 15px; border-top: 1px solid var(--hair2); }
.plan li::before { content: "✓"; position: absolute; left: 0; color: var(--good); font-weight: 700; }
.plan.pro li::before { color: var(--accent); }
.plan .fine { margin-top: 18px; font-size: 13px; color: var(--ink3); }
@media (max-width: 720px) { .plans { grid-template-columns: 1fr; } }

.faq { max-width: 800px; margin: 0 auto; display: grid; gap: 12px; }
.faq details {
  background: var(--bg); border: 1px solid var(--hair2); border-radius: var(--radius);
  padding: 0 22px;
}
.faq summary {
  cursor: pointer; list-style: none; padding: 18px 36px 18px 0; position: relative;
  font: 600 16.5px/1.4 var(--sans); color: var(--ink);
}
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after {
  content: "+"; position: absolute; right: 0; top: 14px;
  font: 400 26px/1 var(--sans); color: var(--accent); transition: transform .2s ease;
}
.faq details[open] summary::after { transform: rotate(45deg); }
.faq details p { padding: 0 0 20px; color: var(--ink2); }

.cta { text-align: center; }
.cta .lede { margin: 16px auto 0; }
.cta .store-row { justify-content: center; }

/* ---------- long-form pages (privacy, support, terms) ---------- */
.doc-page { padding: 64px 0 96px; }
.doc-page .wrap { max-width: 800px; }
.doc-page h1 { font-size: clamp(34px, 4.8vw, 46px); }
.doc-page .meta { margin-top: 14px; color: var(--ink3); font-size: 14px; }
.doc-page .summary { margin: 36px 0 8px; padding: 22px 24px; }
.doc-page .summary b { display: block; font: 600 17px/1.3 var(--sans); color: var(--ink); margin-bottom: 8px; }
.doc-page .summary ul { margin: 0; padding-left: 20px; color: var(--ink2); }
.doc-page .summary li { margin: 4px 0; }
.doc-page h2 { font-size: 26px; margin: 48px 0 14px; }
.doc-page h3 { font-size: 18px; margin: 28px 0 8px; }
.doc-page p, .doc-page li { color: var(--ink2); }
.doc-page p + p { margin-top: 14px; }
.doc-page ul { padding-left: 20px; }
.doc-page li { margin: 6px 0; }
.doc-page strong { color: var(--ink); font-weight: 600; }
.doc-page a { text-decoration: underline; text-underline-offset: 3px; }
.doc-page table { width: 100%; border-collapse: collapse; margin: 16px 0; font-size: 14.5px; }
.doc-page th, .doc-page td { text-align: left; padding: 11px 12px 11px 0; border-bottom: 1px solid var(--hair); vertical-align: top; }
.doc-page th { font-weight: 600; color: var(--ink); font-size: 13px; }
.doc-page td { color: var(--ink2); }
.table-scroll { overflow-x: auto; }

.contact-card {
  margin-top: 36px; padding: 26px; border-radius: var(--radius);
  background: var(--accent); color: #fff;
  display: flex; flex-wrap: wrap; gap: 18px; align-items: center; justify-content: space-between;
}
.doc-page .contact-card p { color: inherit; opacity: .9; }
.contact-card b { font: 600 20px/1.2 var(--sans); display: block; margin-bottom: 4px; opacity: 1; }
.doc-page .contact-card .btn { background: #fff; color: #E5322D; text-decoration: none; box-shadow: none; }

/* ---------- footer ---------- */
.site-footer { background: var(--surface); border-top: 1px solid var(--hair); padding: 28px 0 32px; font-size: 13.5px; color: var(--ink3); }
.site-footer .wrap { display: flex; flex-wrap: wrap; gap: 20px; justify-content: space-between; align-items: center; }
.site-footer nav { display: flex; flex-wrap: wrap; gap: 22px; }
.site-footer a { color: var(--ink2); text-decoration: none; }
.site-footer a:hover { color: var(--accent); }
