/* Shared layout for every Writerphernalia page.
   Source of truth: tools/css/site.css. Run tools/sync.sh to copy it into each site folder.
   Colors and fonts live in each folder's assets/theme.css. */

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; scroll-padding-top: 84px; }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } *, *::before, *::after { transition: none !important; animation: none !important; } }
body {
  margin: 0; background: var(--bg); color: var(--ink);
  font-family: var(--text); font-size: 18px; line-height: 1.65;
  -webkit-font-smoothing: antialiased; text-rendering: optimizeLegibility;
  overflow-x: hidden;
}
img { max-width: 100%; height: auto; display: block; }
a { color: var(--link, var(--accent)); text-underline-offset: 3px; text-decoration-thickness: 1px; }
a:hover { text-decoration-thickness: 2px; }
:focus-visible { outline: 3px solid var(--focus, var(--accent)); outline-offset: 3px; border-radius: 4px; }
h1, h2, h3 { font-family: var(--display); font-weight: var(--display-weight, 600); line-height: 1.15; margin: 0; letter-spacing: -0.012em; font-variation-settings: var(--display-vars, normal); color: var(--heading, var(--ink)); }
p { margin: 0 0 1em; }
ul, ol { margin: 0; }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.skip { position: absolute; left: 12px; top: -60px; z-index: 100; background: var(--ink); color: var(--bg); padding: 10px 16px; border-radius: 8px; font-family: var(--sans); font-size: 15px; }
.skip:focus { top: 12px; }

.wrap { width: min(1160px, 100% - 40px); margin-inline: auto; }
.narrow { width: min(760px, 100% - 40px); margin-inline: auto; }

/* ---------- header ---------- */
.site-header { position: sticky; top: 0; z-index: 50; background: var(--header-bg); backdrop-filter: saturate(1.4) blur(10px); -webkit-backdrop-filter: saturate(1.4) blur(10px); border-bottom: 1px solid var(--line); }
.site-header .wrap { display: flex; align-items: center; gap: 20px; min-height: 64px; }
.brand { display: inline-flex; align-items: center; gap: 10px; color: var(--ink); text-decoration: none; font-family: var(--brand-font, var(--display)); font-weight: var(--brand-weight, 600); font-size: 21px; letter-spacing: -0.01em; font-variation-settings: var(--display-vars, normal); white-space: nowrap; }
.brand svg, .brand .mark { flex: none; }
.site-nav { margin-left: auto; display: flex; align-items: center; gap: 4px; font-family: var(--sans); font-size: 15px; }
.site-nav a { color: var(--ink-2); text-decoration: none; padding: 8px 12px; border-radius: 8px; }
.site-nav a:hover { color: var(--ink); background: var(--hover); }
.site-nav .btn { margin-left: 8px; color: var(--accent-ink); }
.site-nav .btn:hover { color: var(--accent-ink); background: var(--accent-hover); }
@media (max-width: 760px) {
  .site-nav a:not(.btn) { display: none; }
  .site-header .wrap { min-height: 58px; }
  .brand { font-size: 19px; }
}

/* ---------- buttons ---------- */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; font-family: var(--sans); font-weight: 600; font-size: 15px; line-height: 1; padding: 11px 18px; border-radius: var(--btn-radius, 10px); border: 1px solid transparent; text-decoration: none; background: var(--accent); color: var(--accent-ink); transition: background .15s, transform .15s, box-shadow .15s; white-space: nowrap; }
.btn:hover { background: var(--accent-hover); text-decoration: none; }
.btn-lg { font-size: 18px; padding: 17px 28px; border-radius: var(--btn-radius-lg, 12px); box-shadow: var(--btn-shadow, 0 1px 2px rgba(0,0,0,.08), 0 8px 24px rgba(0,0,0,.12)); }
.btn-lg:hover { transform: translateY(-1px); }
.btn-quiet { background: transparent; color: var(--ink); border-color: var(--line-2); }
.btn-quiet:hover { background: var(--hover); }
.btn .arrow { transition: transform .15s; }
.btn:hover .arrow { transform: translateX(3px); }

/* ---------- hero ---------- */
.hero { position: relative; padding: 72px 0 88px; overflow: hidden; background: var(--hero-bg, var(--bg)); }
.hero .wrap { display: grid; grid-template-columns: minmax(0, 0.92fr) minmax(0, 1.18fr); gap: 56px; align-items: center; }
.eyebrow { font-family: var(--sans); font-size: 13px; font-weight: 600; letter-spacing: .09em; text-transform: uppercase; color: var(--eyebrow, var(--accent)); margin: 0 0 18px; }
.hero h1 { display: grid; gap: 14px; }
.hero h1 { gap: 22px; }
.hero h1 .name { font-family: var(--brand-font, var(--display)); font-size: 25px; font-weight: var(--brand-weight, 600); letter-spacing: -0.01em; color: var(--ink); display: inline-flex; align-items: center; gap: 12px; }
.hero h1 .name svg, .hero h1 .name .mark { width: 44px; height: 44px; flex: none; filter: drop-shadow(0 2px 6px rgba(40, 30, 20, 0.18)); }
.hero h1 .promise { font-size: clamp(40px, 5.6vw, 66px); line-height: 1.04; letter-spacing: -0.022em; }
.lede { font-size: 20px; line-height: 1.6; color: var(--ink-2); margin: 24px 0 32px; max-width: 34em; }
.cta-row { display: flex; flex-wrap: wrap; gap: 12px 14px; align-items: center; }
.reassure { list-style: none; padding: 0; margin: 26px 0 0; display: flex; flex-wrap: wrap; gap: 8px 20px; font-family: var(--sans); font-size: 14.5px; color: var(--muted); }
.reassure li { display: inline-flex; align-items: center; gap: 7px; }
.reassure li::before { content: ""; width: 16px; height: 16px; flex: none; background: var(--tick) center / contain no-repeat; }
@media (max-width: 960px) {
  .hero { padding: 40px 0 56px; }
  .hero .wrap { grid-template-columns: minmax(0, 1fr); gap: 44px; }
  .lede { font-size: 18.5px; margin: 18px 0 26px; }
}
@media (max-width: 520px) {
  .cta-row .btn-lg { width: 100%; }
  .cta-row .btn-quiet { width: 100%; }
}

/* ---------- device frames ---------- */
.frame-desktop { position: relative; border-radius: 12px; overflow: hidden; background: var(--surface); box-shadow: var(--shot-shadow); border: 1px solid var(--frame-line); }
.frame-desktop .bar { display: flex; align-items: center; gap: 6px; height: 30px; padding: 0 12px; background: var(--chrome); border-bottom: 1px solid var(--frame-line); }
.frame-desktop .bar i { width: 10px; height: 10px; border-radius: 50%; background: var(--chrome-dot); }
.frame-desktop .bar span { margin: 0 auto; transform: translateX(-20px); font-family: var(--sans); font-size: 11.5px; color: var(--muted); background: var(--chrome-url); border-radius: 6px; padding: 2px 14px; max-width: 60%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.frame-desktop img { width: 100%; aspect-ratio: 1280 / 800; }
.frame-phone { position: relative; border-radius: 15% / 7%; padding: 2.6%; background: #1c1916; box-shadow: var(--phone-shadow); }
.frame-phone img { width: 100%; aspect-ratio: 390 / 844; border-radius: 12.8% / 6%; }
@media (max-width: 520px) { .frame-desktop .bar { height: 20px; padding: 0 8px; gap: 4px; } .frame-desktop .bar i { width: 7px; height: 7px; } .frame-desktop .bar span { font-size: 9px; padding: 1px 8px; } .frame-desktop { border-radius: 8px; } }

.devices { position: relative; padding: 0 0 9% 13%; }
.devices .frame-phone { position: absolute; left: 0; bottom: 0; width: 29%; }
.devices.right { padding: 0 13% 9% 0; }
.devices.right .frame-phone { left: auto; right: 0; }
.shot-phone { width: min(320px, 78%); margin-inline: auto; }
.shot-pair { position: relative; padding: 0 0 16% 10%; }
.shot-pair .frame-desktop:last-child { position: absolute; left: 0; bottom: 0; width: 68%; }
.shot-pair .frame-desktop:first-child { width: 100%; }
@media (max-width: 600px) {
  .devices { padding: 0 0 22% 0; }
  .devices .frame-phone { width: 38%; left: auto; right: 2%; }
  .devices.right { padding: 0 0 22% 0; }
  .devices.right .frame-phone { right: 2%; }
  .devices .frame-desktop { width: 88%; }
  .shot-pair { padding: 0 0 18% 6%; }
}

/* ---------- sections ---------- */
.section { padding: 104px 0; }
.section.alt { background: var(--bg-2); }
.section-head { max-width: 720px; margin: 0 auto 56px; text-align: center; }
.section-head h2, .feature h2 { font-size: clamp(30px, 4vw, 44px); }
.section-head p { color: var(--ink-2); font-size: 19px; margin: 18px 0 0; }
.kicker { font-family: var(--sans); font-size: 13px; font-weight: 600; letter-spacing: .09em; text-transform: uppercase; color: var(--eyebrow, var(--accent)); margin: 0 0 14px; display: block; }
@media (max-width: 760px) { .section { padding: 68px 0; } .section-head { margin-bottom: 36px; } .section-head p { font-size: 17.5px; } }

.features { display: grid; gap: 120px; }
.feature { display: grid; grid-template-columns: minmax(0, 0.85fr) minmax(0, 1.15fr); gap: 64px; align-items: center; }
.feature.flip > .copy { order: 2; }
.feature .copy p { color: var(--ink-2); margin-top: 18px; }
.feature .copy > p:first-of-type { margin-top: 20px; }
.ticks { list-style: none; padding: 0; margin: 22px 0 0; display: grid; gap: 10px; font-family: var(--sans); font-size: 16px; color: var(--ink-2); line-height: 1.5; }
.ticks li { position: relative; padding-left: 28px; }
.ticks li::before { content: ""; position: absolute; left: 0; top: 3px; width: 18px; height: 18px; background: var(--tick) center / contain no-repeat; }
@media (max-width: 960px) {
  .features { gap: 80px; }
  .feature { grid-template-columns: minmax(0, 1fr); gap: 36px; }
  .feature.flip > .copy { order: 0; }
}

/* contents list ("what's inside") */
.contents { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 0 40px; max-width: 1000px; margin: 0 auto; padding: 0; list-style: none; font-family: var(--sans); }
.contents li { display: flex; gap: 14px; padding: 18px 0; border-top: 1px solid var(--line); font-size: 15.5px; line-height: 1.5; color: var(--ink-2); }
.contents li strong { display: block; color: var(--ink); font-weight: 600; margin-bottom: 2px; }
@media (max-width: 900px) { .contents { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 600px) { .contents { grid-template-columns: minmax(0, 1fr); } }

/* ---------- privacy band ---------- */
.band { background: var(--band-bg); color: var(--band-ink); padding: 104px 0; position: relative; overflow: hidden; }
.band h2, .band h3 { color: var(--band-heading, var(--band-ink)); }
.band .section-head p { color: var(--band-ink-2); }
.band .kicker { color: var(--band-accent); }
.pillars { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 20px; }
.pillar { background: var(--band-card); border: 1px solid var(--band-line); border-radius: 16px; padding: 26px 24px; }
.pillar svg { width: 30px; height: 30px; color: var(--band-accent); margin-bottom: 16px; }
.pillar h3 { font-size: 21px; margin-bottom: 8px; }
.pillar p { margin: 0; font-family: var(--sans); font-size: 15.5px; line-height: 1.6; color: var(--band-ink-2); }
.band-split { display: grid; grid-template-columns: minmax(0, 0.9fr) minmax(0, 1.1fr); gap: 56px; align-items: center; margin-top: 72px; padding-top: 72px; border-top: 1px solid var(--band-line); }
.band-split p { color: var(--band-ink-2); }
.band .ticks { color: var(--band-ink-2); }
.band .ticks li::before { background-image: var(--band-tick, var(--tick)); }
@media (max-width: 960px) { .pillars { grid-template-columns: repeat(2, minmax(0, 1fr)); } .band-split { grid-template-columns: minmax(0, 1fr); gap: 36px; margin-top: 52px; padding-top: 52px; } }
@media (max-width: 560px) { .band { padding: 68px 0; } .pillars { grid-template-columns: minmax(0, 1fr); gap: 14px; } .pillar { padding: 22px 20px; } }

/* ---------- install ---------- */
.install-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 20px; }
.install-card { background: var(--surface); border: 1px solid var(--line); border-radius: 16px; padding: 28px 26px; box-shadow: var(--card-shadow); }
.install-card h3 { font-size: 22px; display: flex; align-items: center; gap: 10px; margin-bottom: 16px; }
.install-card h3 svg { width: 24px; height: 24px; color: var(--accent); flex: none; }
.install-card ol { padding-left: 1.25em; display: grid; gap: 10px; font-family: var(--sans); font-size: 15.5px; line-height: 1.55; color: var(--ink-2); }
.install-card ol li::marker { color: var(--accent); font-weight: 600; }
.install-card .note { margin: 16px 0 0; font-family: var(--sans); font-size: 14px; color: var(--muted); }
.install-foot { text-align: center; margin: 32px auto 0; max-width: 640px; font-family: var(--sans); font-size: 15px; color: var(--muted); }
@media (max-width: 900px) { .install-grid { grid-template-columns: minmax(0, 1fr); max-width: 560px; margin-inline: auto; } }

/* ---------- pricing ---------- */
.pricing-card { max-width: 680px; margin: 0 auto; text-align: center; background: var(--surface); border: 1px solid var(--line); border-radius: 22px; padding: 52px 40px; box-shadow: var(--card-shadow); position: relative; }
.pricing-card .badge { display: inline-block; font-family: var(--sans); font-size: 13px; font-weight: 600; letter-spacing: .06em; text-transform: uppercase; color: var(--badge-ink, var(--accent)); background: var(--badge-bg, var(--accent-soft)); padding: 6px 12px; border-radius: 999px; margin-bottom: 18px; }
.pricing-card h2 { font-size: clamp(30px, 4vw, 42px); }
.pricing-card p { color: var(--ink-2); font-size: 19px; margin: 16px auto 28px; max-width: 30em; }
.pricing-card .fine { font-family: var(--sans); font-size: 14px; color: var(--muted); margin: 18px 0 0; }
@media (max-width: 560px) { .pricing-card { padding: 40px 22px; border-radius: 18px; } .pricing-card p { font-size: 17.5px; } }

/* ---------- FAQ ---------- */
.faq { max-width: 800px; margin: 0 auto; border-top: 1px solid var(--line); }
.faq details { border-bottom: 1px solid var(--line); }
.faq summary { list-style: none; cursor: pointer; display: flex; align-items: center; justify-content: space-between; gap: 20px; padding: 22px 4px; font-family: var(--display); font-weight: var(--display-weight, 600); font-variation-settings: var(--display-vars, normal); font-size: 21px; line-height: 1.3; color: var(--heading, var(--ink)); }
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after { content: ""; flex: none; width: 28px; height: 28px; border-radius: 50%; background: var(--accent-soft) var(--plus) center / 14px no-repeat; transition: transform .2s; }
.faq details[open] summary::after { transform: rotate(45deg); }
.faq .answer { padding: 0 4px 24px; color: var(--ink-2); font-size: 17.5px; }
.faq .answer p:last-child { margin-bottom: 0; }
@media (max-width: 560px) { .faq summary { font-size: 19px; padding: 19px 2px; } .faq .answer { font-size: 16.5px; } }

/* ---------- closing call to action ---------- */
.closing { text-align: center; padding: 112px 0; background: var(--closing-bg, var(--bg-2)); }
.closing h2 { font-size: clamp(34px, 5vw, 54px); }
.closing p { color: var(--ink-2); font-size: 19px; margin: 18px auto 32px; max-width: 32em; }
@media (max-width: 760px) { .closing { padding: 76px 0; } }

/* ---------- footer ---------- */
.site-footer { background: var(--footer-bg); color: var(--footer-ink); padding: 64px 0 48px; font-family: var(--sans); font-size: 15px; }
.site-footer a { color: var(--footer-ink); text-decoration: none; }
.site-footer a:hover { text-decoration: underline; }
.footer-top { display: flex; justify-content: space-between; gap: 40px; flex-wrap: wrap; padding-bottom: 36px; border-bottom: 1px solid var(--footer-line); }
.footer-top .brand { color: var(--footer-heading); }
.footer-top .tag { margin: 10px 0 0; color: var(--footer-ink); font-family: var(--text); font-style: italic; font-size: 16.5px; }
.footer-links { display: flex; gap: 10px 28px; flex-wrap: wrap; list-style: none; padding: 0; align-items: center; }
.footer-bottom { display: flex; justify-content: space-between; flex-wrap: wrap; gap: 12px 28px; padding-top: 24px; font-size: 13.5px; color: var(--footer-muted); }
.footer-bottom a { color: var(--footer-muted); }
.footer-bottom ul { display: flex; flex-wrap: wrap; gap: 8px 22px; list-style: none; padding: 0; }
.contact-placeholder { color: var(--footer-muted); }

/* ---------- document pages (privacy, terms) ---------- */
.doc { padding: 56px 0 96px; }
.doc h1 { font-size: clamp(34px, 5vw, 46px); margin-bottom: 12px; }
.doc h2 { font-size: 24px; margin: 40px 0 10px; }
.doc p, .doc li { color: var(--ink-2); }
.doc ul { padding-left: 1.2em; display: grid; gap: 6px; margin-bottom: 1em; }
.draft-note { font-family: var(--sans); font-size: 15px; line-height: 1.55; background: var(--draft-bg, #fbf0d6); color: var(--draft-ink, #5a4316); border: 1px solid var(--draft-line, #e9d29c); border-radius: 12px; padding: 14px 18px; margin: 20px 0 32px; }
.doc .updated { font-family: var(--sans); font-size: 14px; color: var(--muted); }

/* 404 */
.notfound { min-height: 60vh; display: grid; place-items: center; text-align: center; padding: 80px 0; }
.notfound h1 { font-size: clamp(36px, 6vw, 56px); margin-bottom: 14px; }
.notfound p { color: var(--ink-2); }
.band-h { font-size: clamp(26px, 3vw, 34px); margin-bottom: 14px; }
.pricing-card .price { white-space: nowrap; }
/* slim "back to Writerphernalia" bar on the app pages */
.umbrella-bar { background: var(--bg-2); border-bottom: 1px solid var(--line); font-family: var(--sans); font-size: 14px; }
.umbrella-bar a { display: inline-flex; align-items: center; gap: 8px; min-height: 44px; padding: 0 10px 0 0; color: var(--ink-2); text-decoration: none; }
.umbrella-bar a:hover { color: var(--ink); text-decoration: underline; }
.umbrella-bar svg { width: 20px; height: 20px; flex: none; }
