/* ─────────────────────────────────────────────────────────────
   ShelvesApp landing page
   Warm + literary aesthetic — cream paper, serif, foil accents.
   Mobile-first, semantic, no framework.
   ───────────────────────────────────────────────────────────── */

:root {
  --paper: #f6f1e8;
  --paper-2: #ece3d2;
  --paper-3: #fbf6ec;
  --ink: #2a241c;
  --ink-2: #4a3f30;
  --ink-dim: #6b6455;
  --ink-muted: #9a9384;
  --rule: rgba(42, 36, 28, 0.14);
  --rule-strong: rgba(42, 36, 28, 0.28);
  --foil: #b07b46;
  --foil-light: #d4a548;
  --crimson: #8b3a2e;
  --leaf: #4e6a3a;
  --shadow-sm: 0 1px 2px rgba(42, 36, 28, 0.08);
  --shadow-md: 0 4px 14px rgba(42, 36, 28, 0.10);
  --shadow-lg: 0 18px 40px rgba(42, 36, 28, 0.16);
  --serif-display: "Playfair Display", "EB Garamond", Georgia, serif;
  --serif-body: "EB Garamond", "Hoefler Text", Georgia, serif;
  --sans: "Inter", -apple-system, BlinkMacSystemFont, system-ui, sans-serif;
  --radius-sm: 4px;
  --radius-md: 10px;
  --radius-lg: 18px;
  --w-prose: 64ch;
  --w-page: 1200px;
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: var(--serif-body);
  font-size: 18px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

/* Subtle paper grain on the body */
body::before {
  content: "";
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 0;
  background-image:
    radial-gradient(circle at 20% 10%, rgba(176, 123, 70, 0.04), transparent 50%),
    radial-gradient(circle at 80% 90%, rgba(139, 58, 46, 0.03), transparent 50%);
}

main, header, footer, section, article, nav {
  position: relative;
  z-index: 1;
}

img { max-width: 100%; display: block; }

a {
  color: var(--ink);
  text-decoration-color: var(--rule-strong);
  text-decoration-thickness: 1px;
  text-underline-offset: 3px;
}
a:hover { text-decoration-color: var(--foil); }

/* ── Layout primitives ─────────────────────────── */
.container {
  width: 100%;
  max-width: var(--w-page);
  padding: 0 20px;
  margin: 0 auto;
}

.eyebrow {
  font-family: var(--sans);
  font-size: 11px;
  letter-spacing: 2.5px;
  text-transform: uppercase;
  color: var(--ink-muted);
  font-weight: 600;
  margin: 0 0 12px;
}

h1, h2, h3, h4 {
  font-family: var(--serif-display);
  color: var(--ink);
  font-weight: 600;
  line-height: 1.15;
  text-wrap: balance;
  margin: 0 0 0.5em;
}
h1 { font-size: clamp(34px, 5vw, 56px); letter-spacing: -0.5px; }
h2 { font-size: clamp(26px, 3.4vw, 38px); letter-spacing: -0.3px; }
h3 { font-size: clamp(20px, 2.2vw, 24px); }
h4 { font-size: 17px; font-family: var(--serif-body); font-weight: 600; }

p { margin: 0 0 1em; max-width: var(--w-prose); }
p.lede { font-size: clamp(18px, 2vw, 22px); color: var(--ink-2); }

/* ── Top nav ─────────────────────────── */
.topnav {
  border-bottom: 1px solid var(--rule);
  background: rgba(246, 241, 232, 0.86);
  backdrop-filter: saturate(140%) blur(10px);
  position: sticky; top: 0; z-index: 50;
}
.topnav-inner {
  display: flex; align-items: center; justify-content: space-between;
  padding: 14px 0;
}
.brand {
  display: flex; align-items: center; gap: 10px;
  font-family: var(--serif-display);
  font-weight: 700; font-size: 20px;
  color: var(--ink); text-decoration: none;
  letter-spacing: -0.3px;
}
.brand-mark {
  width: 32px; height: 32px;
  border-radius: 8px;
  flex-shrink: 0;
  object-fit: cover;
  background: var(--paper-2);
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.15);
}
.nav-links { display: none; gap: 26px; align-items: center; }
.nav-links a {
  font-size: 15px; color: var(--ink-2); text-decoration: none;
  font-family: var(--sans); font-weight: 500;
}
.nav-links a:hover { color: var(--foil); }
.nav-cta { font-family: var(--sans); }
@media (min-width: 760px) { .nav-links { display: flex; } }

/* ── Buttons ─────────────────────────── */
.btn {
  display: inline-flex; align-items: center; justify-content: center;
  gap: 10px; padding: 14px 22px;
  font-family: var(--sans); font-size: 15px; font-weight: 600;
  letter-spacing: 0.2px;
  border: 1px solid transparent; border-radius: 999px;
  cursor: pointer; text-decoration: none;
  transition: transform 160ms ease, box-shadow 160ms ease, background 160ms ease;
  white-space: nowrap;
}
.btn-primary {
  background: var(--ink); color: var(--paper);
  box-shadow: var(--shadow-md);
}
.btn-primary:hover {
  background: var(--ink-2); transform: translateY(-1px);
  box-shadow: var(--shadow-lg);
}
.btn-ghost {
  background: transparent; color: var(--ink);
  border-color: var(--rule-strong);
}
.btn-ghost:hover { border-color: var(--foil); color: var(--foil); }
.btn .btn-icon { width: 18px; height: 18px; flex-shrink: 0; }

/* ── Hero ─────────────────────────── */
.hero {
  padding: 60px 0 40px;
  border-bottom: 1px solid var(--rule);
}
.hero-grid {
  display: grid; gap: 40px;
  grid-template-columns: 1fr;
  align-items: center;
}
@media (min-width: 900px) {
  .hero { padding: 90px 0 70px; }
  .hero-grid { grid-template-columns: 1.1fr 1fr; gap: 60px; }
}
.hero-copy h1 { margin-top: 14px; }
.hero-meta {
  display: flex; gap: 18px; flex-wrap: wrap;
  margin-top: 28px;
  font-family: var(--sans); font-size: 13px;
  color: var(--ink-dim);
}
.hero-meta-item {
  display: inline-flex; align-items: center; gap: 8px;
}
.hero-meta-dot { width: 6px; height: 6px; border-radius: 50%; background: var(--foil); }
.hero-ctas { display: flex; flex-wrap: wrap; gap: 14px; margin-top: 30px; }

/* Hero visual = phone mock holding a real screenshot */
.hero-visual {
  position: relative;
  display: flex; align-items: center; justify-content: center;
  padding: 20px 0;
}
.phone {
  position: relative;
  width: min(280px, 80%);
  aspect-ratio: 9 / 19.5;
  background: #0c0a08;
  border-radius: 38px;
  padding: 8px;
  box-shadow:
    0 0 0 2px #1a1612 inset,
    0 0 0 8px rgba(176, 123, 70, 0.08),
    0 30px 60px -10px rgba(42, 36, 28, 0.45),
    0 18px 36px -8px rgba(42, 36, 28, 0.30);
}
.phone::before {
  content: ""; position: absolute;
  top: 14px; left: 50%; transform: translateX(-50%);
  width: 80px; height: 22px;
  background: #0c0a08; border-radius: 999px;
  z-index: 2;
}
.phone-screen {
  width: 100%; height: 100%;
  border-radius: 30px; overflow: hidden;
  background: #1a1612;
}
.phone-screen img { width: 100%; height: 100%; object-fit: cover; object-position: top; }
.hero-visual .floating-badge {
  position: absolute;
  bottom: 8%; right: -2%;
  background: var(--paper-3);
  border: 1px solid var(--rule);
  border-radius: var(--radius-md);
  padding: 14px 18px;
  box-shadow: var(--shadow-lg);
  display: flex; align-items: center; gap: 12px;
  font-family: var(--sans); font-size: 13px;
  max-width: 230px;
}
.floating-badge .pulse {
  width: 10px; height: 10px; border-radius: 50%;
  background: var(--leaf); flex-shrink: 0;
  box-shadow: 0 0 0 0 rgba(78, 106, 58, 0.5);
  animation: pulse 2s infinite;
}
@keyframes pulse {
  0% { box-shadow: 0 0 0 0 rgba(78, 106, 58, 0.5); }
  70% { box-shadow: 0 0 0 12px rgba(78, 106, 58, 0); }
  100% { box-shadow: 0 0 0 0 rgba(78, 106, 58, 0); }
}
.floating-badge .strong { color: var(--ink); font-weight: 600; }
.floating-badge .meta { color: var(--ink-muted); font-size: 12px; margin-top: 2px; }

.hero-visual .floating-card {
  position: absolute;
  top: 8%; left: -4%;
  background: var(--ink);
  color: var(--paper);
  border-radius: var(--radius-md);
  padding: 14px 16px;
  box-shadow: var(--shadow-lg);
  font-family: var(--sans); font-size: 12px;
  max-width: 200px;
  border: 1px solid rgba(212, 165, 72, 0.25);
}
.floating-card .label {
  font-size: 10px; letter-spacing: 1.5px; text-transform: uppercase;
  color: var(--foil-light); margin-bottom: 6px;
}
.floating-card .quote {
  font-family: var(--serif-body); font-style: italic;
  font-size: 13px; line-height: 1.4;
}
@media (max-width: 540px) {
  .hero-visual .floating-card,
  .hero-visual .floating-badge { display: none; }
}

/* Screenshots section */
.shots {
  display: grid; gap: 22px;
  grid-template-columns: 1fr;
}
@media (min-width: 700px) { .shots { grid-template-columns: repeat(3, 1fr); } }
@media (min-width: 1000px) { .shots { grid-template-columns: repeat(5, 1fr); } }
.shot {
  background: var(--paper-3);
  border: 1px solid var(--rule);
  border-radius: var(--radius-md);
  padding: 14px;
  display: flex; flex-direction: column; gap: 10px;
  transition: transform 200ms ease, box-shadow 200ms ease;
}
.shot:hover { transform: translateY(-3px); box-shadow: var(--shadow-md); }
.shot-frame {
  aspect-ratio: 9 / 19.5;
  border-radius: 14px;
  overflow: hidden;
  background: #0c0a08;
  border: 1px solid #1a1612;
}
.shot-frame img { width: 100%; height: 100%; object-fit: cover; object-position: top; }
.shot-cap {
  font-family: var(--sans); font-size: 12px;
  color: var(--ink-dim); text-align: center;
  line-height: 1.4;
}
.shot-cap .name {
  display: block; color: var(--ink); font-weight: 600;
  font-family: var(--serif-display); font-size: 15px; margin-bottom: 2px;
}

/* ── Quick answer block (LLM-optimized) ─────────────────────────── */
.quick-answer {
  background: var(--paper-3);
  border: 1px solid var(--rule);
  border-radius: var(--radius-lg);
  padding: 32px;
  margin: 60px auto;
  max-width: 880px;
  position: relative;
  box-shadow: var(--shadow-sm);
}
.quick-answer::before {
  content: ""; position: absolute; left: -1px; top: 18px; bottom: 18px;
  width: 3px; background: var(--foil); border-radius: 2px;
}
.quick-answer .eyebrow { color: var(--foil); }
.quick-answer h2 {
  font-size: clamp(20px, 2.4vw, 26px); margin-bottom: 14px;
}
.quick-answer p {
  font-size: 18px; line-height: 1.7; max-width: none;
  color: var(--ink-2); margin-bottom: 0.6em;
}
.quick-answer p:last-child { margin-bottom: 0; }

/* ── Section base ─────────────────────────── */
.section {
  padding: 70px 0;
  border-top: 1px solid var(--rule);
}
.section-head {
  max-width: 720px; margin-bottom: 44px;
}
.section-head .eyebrow { color: var(--foil); }

/* ── Problem → Solution ─────────────────────────── */
.problems {
  display: grid; gap: 24px;
  grid-template-columns: 1fr;
}
@media (min-width: 760px) { .problems { grid-template-columns: 1fr 1fr; gap: 30px; } }
.prob-card {
  background: var(--paper-3);
  border: 1px solid var(--rule);
  border-radius: var(--radius-md);
  padding: 26px;
}
.prob-card.solution {
  background: var(--ink); color: var(--paper);
  border-color: transparent;
}
.prob-card h3 {
  display: flex; align-items: center; gap: 10px;
  margin-bottom: 16px;
}
.prob-card.solution h3 { color: var(--paper); }
.prob-card.solution .eyebrow { color: var(--foil-light); }
.prob-card ul { margin: 0; padding: 0; list-style: none; }
.prob-card li {
  padding: 10px 0;
  border-top: 1px solid var(--rule);
  display: flex; gap: 12px; align-items: flex-start;
  font-size: 16px; line-height: 1.5;
}
.prob-card.solution li { border-top-color: rgba(255, 255, 255, 0.10); color: rgba(246, 241, 232, 0.92); }
.prob-card li:first-child { border-top: none; padding-top: 0; }
.prob-card li::before {
  content: ""; flex-shrink: 0;
  width: 18px; height: 18px; margin-top: 4px;
  background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 18 18' fill='none' stroke='%239a9384' stroke-width='1.6' stroke-linecap='round'><path d='M3 9 L8 14 L15 4'/></svg>");
}
.prob-card.solution li::before {
  background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 18 18' fill='none' stroke='%23d4a548' stroke-width='1.6' stroke-linecap='round'><path d='M3 9 L8 14 L15 4'/></svg>");
}

/* ── Features ─────────────────────────── */
.features {
  display: grid; gap: 24px;
  grid-template-columns: 1fr;
}
@media (min-width: 720px) { .features { grid-template-columns: 1fr 1fr; } }
@media (min-width: 1040px) { .features { grid-template-columns: 1fr 1fr 1fr; } }
.feature {
  background: var(--paper-3);
  border: 1px solid var(--rule);
  border-radius: var(--radius-md);
  padding: 28px 24px;
  transition: transform 200ms ease, box-shadow 200ms ease;
}
.feature:hover { transform: translateY(-2px); box-shadow: var(--shadow-md); }
.feature .feat-icon {
  width: 44px; height: 44px; margin-bottom: 18px;
  background: var(--paper-2); border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  border: 1px solid var(--rule);
}
.feature .feat-icon svg { width: 22px; height: 22px; color: var(--foil); }
.feature h3 { font-family: var(--serif-display); font-size: 21px; margin-bottom: 8px; }
.feature p { color: var(--ink-dim); font-size: 16px; margin: 0; }
.feature .feat-tag {
  margin-top: 14px;
  display: inline-block;
  font-family: var(--sans); font-size: 11px; letter-spacing: 1.5px;
  text-transform: uppercase; color: var(--foil); font-weight: 600;
}

/* ── Comparison table ─────────────────────────── */
.compare-wrap { overflow-x: auto; border-radius: var(--radius-md); border: 1px solid var(--rule); background: var(--paper-3); }
.compare {
  width: 100%; border-collapse: collapse;
  font-family: var(--serif-body);
  font-size: 16px;
  min-width: 640px;
}
.compare th, .compare td {
  padding: 16px 22px; text-align: left;
  border-bottom: 1px solid var(--rule);
  vertical-align: top;
}
.compare thead th {
  font-family: var(--sans); font-size: 12px; letter-spacing: 1.5px;
  text-transform: uppercase; color: var(--ink-muted); font-weight: 600;
  background: var(--paper-2);
}
.compare tbody tr:last-child td { border-bottom: none; }
.compare td:first-child { font-weight: 600; color: var(--ink); }
.compare td.alt { color: var(--ink-dim); }
.compare td.us {
  background: rgba(176, 123, 70, 0.08);
  color: var(--ink);
}
.compare-yes { color: var(--leaf); font-weight: 700; }
.compare-no { color: var(--ink-muted); }
.compare-meh { color: var(--crimson); }

/* ── How it works ─────────────────────────── */
.steps {
  display: grid; gap: 30px;
  grid-template-columns: 1fr;
  counter-reset: step;
}
@media (min-width: 760px) { .steps { grid-template-columns: 1fr 1fr; } }
@media (min-width: 1040px) { .steps { grid-template-columns: 1fr 1fr 1fr 1fr; } }
.step {
  position: relative;
  padding: 28px 22px;
  background: var(--paper-3);
  border: 1px solid var(--rule);
  border-radius: var(--radius-md);
  counter-increment: step;
}
.step::before {
  content: counter(step, decimal-leading-zero);
  position: absolute; top: -14px; left: 22px;
  background: var(--ink); color: var(--paper-3);
  font-family: var(--serif-display); font-weight: 700; font-size: 13px;
  padding: 4px 12px; border-radius: 999px;
  box-shadow: var(--shadow-sm);
  letter-spacing: 1px;
}
.step h3 { font-size: 19px; margin: 8px 0 6px; }
.step p { font-size: 15px; color: var(--ink-dim); margin: 0; }

/* ── FAQ ─────────────────────────── */
.faq {
  max-width: 820px;
  margin: 0 auto;
}
.faq details {
  border-top: 1px solid var(--rule);
  padding: 6px 0;
}
.faq details:last-of-type { border-bottom: 1px solid var(--rule); }
.faq summary {
  list-style: none;
  padding: 22px 4px;
  cursor: pointer;
  display: flex; justify-content: space-between; align-items: flex-start; gap: 18px;
  font-family: var(--serif-display);
  font-size: clamp(17px, 2vw, 20px); font-weight: 600;
  color: var(--ink);
}
.faq summary::-webkit-details-marker { display: none; }
.faq summary .chev {
  flex-shrink: 0;
  width: 22px; height: 22px; border-radius: 50%;
  background: var(--paper-3); border: 1px solid var(--rule);
  display: flex; align-items: center; justify-content: center;
  transition: transform 220ms ease, background 220ms ease;
  color: var(--ink-dim);
}
.faq details[open] summary .chev { transform: rotate(45deg); background: var(--foil); color: var(--paper); border-color: var(--foil); }
.faq .answer {
  padding: 0 4px 22px;
  color: var(--ink-2); font-size: 17px; line-height: 1.6;
  max-width: 70ch;
}
.faq .answer p { margin: 0 0 10px; }
.faq .answer p:last-child { margin: 0; }

/* ── Testimonials ─────────────────────────── */
.testimonials {
  display: grid; gap: 22px;
  grid-template-columns: 1fr;
}
@media (min-width: 760px) { .testimonials { grid-template-columns: 1fr 1fr; } }
@media (min-width: 1040px) { .testimonials { grid-template-columns: 1fr 1fr 1fr; } }
.testimonial {
  background: var(--paper-3);
  border: 1px solid var(--rule);
  border-radius: var(--radius-md);
  padding: 28px;
  position: relative;
}
.testimonial::before {
  content: "“";
  position: absolute; top: 6px; left: 18px;
  font-family: var(--serif-display); font-size: 70px;
  color: var(--foil); opacity: 0.4; line-height: 1;
}
.testimonial blockquote {
  margin: 0 0 18px; font-size: 17px; line-height: 1.55;
  color: var(--ink-2); font-style: italic;
  position: relative; z-index: 1;
}
.testimonial cite {
  display: flex; flex-direction: column; gap: 2px;
  font-style: normal;
}
.testimonial cite .name { font-weight: 600; color: var(--ink); font-family: var(--serif-display); font-size: 15px; }
.testimonial cite .meta { font-family: var(--sans); font-size: 12px; color: var(--ink-muted); letter-spacing: 0.5px; }
.testimonial .stars { color: var(--foil); letter-spacing: 1px; margin-bottom: 12px; font-size: 14px; }
.illustrative-note {
  margin-top: 26px;
  font-family: var(--sans); font-size: 12px;
  color: var(--ink-muted); text-align: center;
  letter-spacing: 0.5px;
}

/* ── Blog teaser ─────────────────────────── */
.blog-teaser {
  display: grid; gap: 22px;
  grid-template-columns: 1fr;
}
@media (min-width: 760px) { .blog-teaser { grid-template-columns: 1fr 1fr 1fr; } }
.blog-card {
  display: flex; flex-direction: column;
  text-decoration: none; color: inherit;
  background: var(--paper-3);
  border: 1px solid var(--rule);
  border-radius: var(--radius-md);
  overflow: hidden;
  transition: transform 200ms ease, box-shadow 200ms ease;
}
.blog-card:hover { transform: translateY(-2px); box-shadow: var(--shadow-md); }
.blog-cover {
  aspect-ratio: 16 / 10;
  background: linear-gradient(135deg, var(--paper-2) 0%, var(--paper) 100%);
  position: relative; overflow: hidden;
}
.blog-cover::after {
  content: ""; position: absolute; inset: 0;
  background-image: repeating-linear-gradient(45deg, rgba(176,123,70,0.05) 0 8px, transparent 8px 16px);
}
.blog-cover .glyph {
  position: absolute; inset: 0;
  display: flex; align-items: center; justify-content: center;
  font-family: var(--serif-display); font-size: 60px; color: var(--foil);
  opacity: 0.5;
}
.blog-body { padding: 22px; flex: 1; display: flex; flex-direction: column; gap: 8px; }
.blog-body .tag {
  font-family: var(--sans); font-size: 11px; letter-spacing: 1.5px;
  text-transform: uppercase; color: var(--foil); font-weight: 600;
}
.blog-body h3 { font-size: 19px; margin: 4px 0 6px; }
.blog-body p { font-size: 15px; color: var(--ink-dim); margin: 0; }
.blog-body .read { margin-top: auto; padding-top: 14px; font-family: var(--sans); font-size: 13px; color: var(--ink); font-weight: 600; }

/* ── Final CTA ─────────────────────────── */
.cta-final {
  margin-top: 0;
  background: var(--ink); color: var(--paper);
  padding: 70px 0;
  text-align: center;
  position: relative; overflow: hidden;
}
.cta-final::before {
  content: ""; position: absolute; inset: 0;
  background:
    radial-gradient(ellipse at 20% 20%, rgba(176, 123, 70, 0.18), transparent 50%),
    radial-gradient(ellipse at 80% 80%, rgba(212, 165, 72, 0.14), transparent 50%);
  pointer-events: none;
}
.cta-final h2 { color: var(--paper); margin-bottom: 14px; }
.cta-final p { color: rgba(246, 241, 232, 0.8); max-width: 560px; margin: 0 auto 28px; font-size: 18px; }
.cta-final .btn-primary { background: var(--foil); color: var(--ink); }
.cta-final .btn-primary:hover { background: var(--foil-light); }
.cta-final .btn-ghost { color: var(--paper); border-color: rgba(246, 241, 232, 0.3); }
.cta-final .btn-ghost:hover { color: var(--foil-light); border-color: var(--foil-light); }

/* ── Footer ─────────────────────────── */
footer {
  background: var(--paper-2); padding: 50px 0 30px;
  font-family: var(--sans); font-size: 14px; color: var(--ink-dim);
}
.footer-grid {
  display: grid; gap: 30px;
  grid-template-columns: 1fr;
  margin-bottom: 30px;
}
@media (min-width: 760px) { .footer-grid { grid-template-columns: 2fr 1fr 1fr 1fr; } }
.footer-brand p { margin-top: 10px; max-width: 36ch; }
.footer-col h4 { font-family: var(--sans); font-size: 12px; text-transform: uppercase; letter-spacing: 1.5px; color: var(--ink); margin-bottom: 12px; }
.footer-col ul { list-style: none; padding: 0; margin: 0; }
.footer-col li { margin-bottom: 8px; }
.footer-col a { text-decoration: none; color: var(--ink-dim); }
.footer-col a:hover { color: var(--foil); }
.footer-bottom {
  border-top: 1px solid var(--rule);
  padding-top: 22px;
  display: flex; justify-content: space-between; flex-wrap: wrap; gap: 12px;
  font-size: 12px; color: var(--ink-muted);
}

/* ── Responsive tweaks ─────────────────────────── */
@media (max-width: 540px) {
  body { font-size: 17px; }
  .hero { padding: 40px 0 30px; }
  .hero-visual { padding: 18px; }
  .hero-shelf-label { font-size: 10px; }
  .quick-answer { padding: 24px; margin: 40px 16px; }
  .section { padding: 50px 0; }
  .compare th, .compare td { padding: 12px 14px; font-size: 14px; }
}
