/* Pine & Post — storefront styles */
:root {
  --paper: #faf7f0;
  --card: #ffffff;
  --ink: #26332b;
  --soft-ink: #5c6a60;
  --pine: #1f4d38;
  --pine-deep: #16382a;
  --gold: #b98d3f;
  --line: #e4ded1;
  --shadow: 0 10px 30px rgba(38, 51, 43, 0.10);
}
* { margin: 0; padding: 0; box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  font-family: 'Inter', 'Segoe UI', Arial, sans-serif;
  background: var(--paper);
  color: var(--ink);
  line-height: 1.6;
}
h1, h2, h3, .brand { font-family: 'Playfair Display', Georgia, serif; }
img { max-width: 100%; }

/* topbar */
.topbar {
  position: sticky; top: 0; z-index: 50;
  display: flex; align-items: center; justify-content: space-between;
  padding: 14px clamp(20px, 5vw, 56px);
  background: rgba(250, 247, 240, 0.92); backdrop-filter: blur(8px);
  border-bottom: 1px solid var(--line);
}
.brand { display: inline-flex; align-items: center; font-size: 22px; font-weight: 600; color: var(--pine); text-decoration: none; }
.brand-mark { height: 34px; width: auto; margin-right: 10px; }
.brand span { color: var(--gold); }
.brand.small { font-size: 18px; }
.topbar nav { display: flex; align-items: center; gap: clamp(12px, 3vw, 28px); }
.topbar nav a { color: var(--soft-ink); text-decoration: none; font-size: 14px; font-weight: 500; }
.topbar nav a:hover { color: var(--pine); }
.nav-cta {
  background: var(--pine); color: #fff !important; padding: 9px 18px; border-radius: 999px;
}

/* hero */
.hero {
  display: grid; grid-template-columns: 1.1fr 1fr; gap: 40px; align-items: center;
  padding: clamp(40px, 7vw, 90px) clamp(20px, 5vw, 56px);
  max-width: 1200px; margin: 0 auto;
}
.kicker { font-family: 'Playfair Display', Georgia, serif; font-style: italic; font-size: 17px; color: var(--gold); margin-bottom: 14px; }
.hero h1 { font-size: clamp(34px, 5vw, 58px); font-weight: 500; line-height: 1.1; color: var(--pine-deep); margin-bottom: 18px; }
.hero h1 em { font-style: italic; color: var(--pine); }
.lede { font-size: 17px; color: var(--soft-ink); max-width: 480px; margin-bottom: 26px; }
.hero-actions { display: flex; gap: 14px; flex-wrap: wrap; margin-bottom: 14px; }
.btn {
  display: inline-block; padding: 13px 26px; border-radius: 999px; font-weight: 600; font-size: 15px;
  text-decoration: none; border: none; cursor: pointer; font-family: inherit;
}
.btn.primary { background: var(--pine); color: #fff; box-shadow: var(--shadow); }
.btn.primary:hover { background: var(--pine-deep); }
.btn.ghost { border: 1.5px solid var(--pine); color: var(--pine); background: transparent; }
.btn.disabled { background: #cfd8d1; color: #6d7a70; cursor: default; box-shadow: none; }
.hero-note { font-size: 12.5px; color: #98a29a; }

.hero-fan { position: relative; height: clamp(320px, 36vw, 460px); }
.fan-img {
  position: absolute; width: clamp(180px, 20vw, 260px); border-radius: 8px;
  box-shadow: var(--shadow); border: 1px solid var(--line); background: #fff;
}
.fan-left  { left: 0; top: 40px; transform: rotate(-7deg); }
.fan-center { left: 50%; top: 0; transform: translateX(-50%) rotate(1deg); z-index: 2; }
.fan-right { right: 0; top: 52px; transform: rotate(7deg); }
@media (prefers-reduced-motion: no-preference) {
  .fan-img { opacity: 0; animation: fan-settle 0.7s cubic-bezier(0.2, 0.7, 0.3, 1) forwards; }
  .fan-left  { animation-delay: 0.15s; }
  .fan-center { animation-delay: 0s; }
  .fan-right { animation-delay: 0.3s; }
  @keyframes fan-settle {
    from { opacity: 0; translate: 0 22px; }
    to { opacity: 1; translate: 0 0; }
  }
}

/* bundle note */
.bundle-note {
  margin-top: 30px; display: flex; align-items: center; gap: 26px; flex-wrap: wrap;
  background: var(--card); border: 1px solid var(--line); border-radius: 16px; padding: 22px 28px;
}
.bundle-covers { display: flex; }
.bundle-covers img {
  width: 64px; border-radius: 4px; border: 1px solid var(--line); box-shadow: 0 3px 8px rgba(38,51,43,0.12);
  background: #fff;
}
.bundle-covers img:nth-child(1) { transform: rotate(-6deg); }
.bundle-covers img:nth-child(2) { z-index: 1; margin: 0 -10px; }
.bundle-covers img:nth-child(3) { transform: rotate(6deg); }
.bundle-note h3 { font-size: 19px; color: var(--pine-deep); margin-bottom: 3px; }
.bundle-note p { font-size: 14px; color: var(--soft-ink); max-width: 52ch; }

/* trust strip */
.strip {
  display: grid; grid-template-columns: repeat(auto-fit, minmax(180px, 1fr)); gap: 1px;
  background: var(--line); border-top: 1px solid var(--line); border-bottom: 1px solid var(--line);
}
.strip div { background: var(--paper); padding: 18px 22px; font-size: 13px; color: var(--soft-ink); }
.strip strong { display: block; color: var(--pine-deep); font-size: 14px; margin-bottom: 2px; }

/* sections */
.section { max-width: 1200px; margin: 0 auto; padding: clamp(48px, 6vw, 80px) clamp(20px, 5vw, 56px); }
.section-title { font-size: clamp(26px, 3.4vw, 38px); font-weight: 500; color: var(--pine-deep); margin-bottom: 8px; }
.section-sub { color: var(--soft-ink); margin-bottom: 36px; max-width: 560px; }

/* product grid */
.grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); gap: 28px; }
.card {
  background: var(--card); border: 1px solid var(--line); border-radius: 16px; overflow: hidden;
  box-shadow: 0 4px 14px rgba(38,51,43,0.06); transition: transform .15s ease, box-shadow .15s ease;
  display: flex; flex-direction: column; cursor: pointer;
}
.card:hover { transform: translateY(-4px); box-shadow: var(--shadow); }
.card-img { aspect-ratio: 17/22; overflow: hidden; background: #f0ede4; }
.card-img img { width: 100%; height: 100%; object-fit: cover; display: block; }
.card-body { padding: 20px 22px 22px; display: flex; flex-direction: column; flex: 1; }
.card-badge { display: inline-block; font-size: 12px; font-weight: 600; color: var(--pine); background: #eef2ea; border-radius: 999px; padding: 3px 11px; margin-bottom: 10px; width: fit-content; }
.card h3 { font-size: 20px; font-weight: 600; color: var(--pine-deep); margin-bottom: 6px; }
.card-tag { font-size: 13.5px; color: var(--soft-ink); flex: 1; }
.card-meta { display: flex; align-items: center; justify-content: space-between; margin-top: 16px; }
.price { font-family: 'Playfair Display', Georgia, serif; font-size: 22px; color: var(--pine); font-weight: 600; }
.pages-note { font-size: 12px; color: #98a29a; }
.card-actions { display: flex; gap: 10px; margin-top: 14px; }
.card-actions .btn { flex: 1; text-align: center; padding: 11px 10px; font-size: 13.5px; }

/* why */
.why { background: var(--pine); border-radius: 24px; max-width: 1140px; }
.why .section-title { color: #f6f3ea; }
.why-cols { display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 30px; margin-top: 28px; }
.why-cols h3 { color: #d9c9a3; font-size: 18px; margin-bottom: 8px; }
.why-cols p { color: rgba(246, 243, 234, 0.85); font-size: 14.5px; }

/* steps */
.steps { display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 28px; }
.step { background: var(--card); border: 1px solid var(--line); border-radius: 16px; padding: 26px; }
.step-num {
  display: inline-flex; width: 34px; height: 34px; align-items: center; justify-content: center;
  background: var(--pine); color: #fff; border-radius: 50%; font-weight: 700; margin-bottom: 14px;
  font-family: 'Playfair Display', Georgia, serif;
}
.step h3 { font-size: 18px; color: var(--pine-deep); margin-bottom: 6px; }
.step p { font-size: 14px; color: var(--soft-ink); }

/* email */
.email-block { padding-top: 0; }
.email-card {
  background: var(--card); border: 1px solid var(--line); border-radius: 20px;
  padding: clamp(28px, 5vw, 48px); text-align: center; box-shadow: var(--shadow);
}
.email-card h2 { font-size: clamp(22px, 3vw, 30px); color: var(--pine-deep); margin-bottom: 8px; }
.email-card p { color: var(--soft-ink); max-width: 480px; margin: 0 auto 22px; }
.email-form { display: flex; gap: 10px; justify-content: center; flex-wrap: wrap; }
.email-form input {
  padding: 12px 18px; border-radius: 999px; border: 1.5px solid var(--line); font-size: 15px;
  min-width: min(320px, 80vw); font-family: inherit; background: var(--paper);
}
.email-form input:focus { outline: 2px solid var(--pine); border-color: var(--pine); }
.tiny-note { font-size: 12px !important; color: #98a29a !important; margin-top: 12px !important; }

/* faq */
.faq { max-width: 720px; }
.faq details { border-bottom: 1px solid var(--line); padding: 16px 4px; }
.faq summary { font-weight: 600; font-size: 15.5px; cursor: pointer; color: var(--pine-deep); }
.faq p { margin-top: 10px; font-size: 14.5px; color: var(--soft-ink); }

/* footer */
.footer {
  border-top: 1px solid var(--line); margin-top: 40px;
  padding: 36px clamp(20px, 5vw, 56px) 42px;
  display: flex; flex-wrap: wrap; gap: 20px; align-items: baseline; justify-content: space-between;
  background: #f3efe5;
}
.foot-tag { font-size: 13px; color: var(--soft-ink); }
.foot-links { display: flex; gap: 20px; }
.foot-links a { color: var(--soft-ink); font-size: 13.5px; text-decoration: none; }
.foot-links a:hover { color: var(--pine); }
.foot-fine { width: 100%; font-size: 11.5px; color: #a0a89f; }

/* modal */
.modal-backdrop {
  position: fixed; inset: 0; background: rgba(22, 30, 25, 0.55); z-index: 100;
  display: flex; align-items: center; justify-content: center; padding: 20px;
}
.modal-backdrop[hidden] { display: none; }
.modal {
  background: var(--paper); border-radius: 20px; max-width: 900px; width: 100%;
  max-height: 88vh; overflow-y: auto; position: relative; padding: clamp(22px, 4vw, 40px);
}
.modal-close {
  position: absolute; top: 14px; right: 18px; background: none; border: none; font-size: 30px;
  color: var(--soft-ink); cursor: pointer; line-height: 1;
}
.modal-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 30px; }
.modal-pages { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; align-content: start; }
.modal-pages img { border: 1px solid var(--line); border-radius: 6px; background: #fff; box-shadow: 0 3px 10px rgba(38,51,43,0.08); }
.modal-info h3 { font-size: 26px; color: var(--pine-deep); margin-bottom: 6px; }
.modal-info .card-tag { margin-bottom: 16px; display: block; }
.modal-info ul { margin: 0 0 20px 18px; }
.modal-info li { font-size: 14px; color: var(--soft-ink); margin-bottom: 8px; }
.modal-buy { display: flex; align-items: center; gap: 16px; flex-wrap: wrap; }

@media (max-width: 860px) {
  .hero { grid-template-columns: 1fr; }
  .hero-fan { order: -1; height: 300px; }
  .modal-grid { grid-template-columns: 1fr; }
  .topbar nav a:not(.nav-cta) { display: none; }
}

/* small phones (added Sept 13): nothing may be wider than the screen */
@media (max-width: 520px) {
  html, body { overflow-x: hidden; }
  .hero-fan { height: 240px; }
  .fan-img { width: 140px; }
  .grid { grid-template-columns: 1fr; }
  .strip { grid-template-columns: 1fr 1fr; }
  .why-cols, .steps { grid-template-columns: 1fr; }
  .card-actions { flex-wrap: wrap; }
  .nav-cta { padding: 8px 14px; }
  .foot-links { flex-wrap: wrap; gap: 14px; }
}
