/* Everjoy Press storefront — KDP Lab's colours, calm type: one size step at a time, generous space, mobile first */
:root {
  --bg: #0a0b0d; --surface: #111216; --surface-2: #16181d; --border: rgba(255,255,255,.07); --border-2: rgba(255,255,255,.13);
  --text: #ececef; --text-2: #a5a6ae; --text-3: #73747d; --accent: #ff8a3d;
  --grad: linear-gradient(135deg, #ffb347 0%, #ff8a3d 45%, #ff4f6d 100%); --ok: #34d399;
  --r: 14px; --r-lg: 18px; --shadow: 0 18px 40px -18px rgba(0,0,0,.75);
  --font: "Inter", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif; --ease: cubic-bezier(.2,.7,.2,1);
}
* { box-sizing: border-box; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
body { margin: 0; background: var(--bg); color: var(--text); font: 16px/1.65 var(--font); -webkit-font-smoothing: antialiased;
  background-image: radial-gradient(700px 420px at 90% -10%, rgba(255,79,109,.08), transparent 60%); }
a { color: inherit; text-decoration: none; }
img { max-width: 100%; height: auto; display: block; }
h1, h2, h3 { font-weight: 700; letter-spacing: -.02em; margin: 0; }
.wrap { width: min(1080px, 100% - 40px); margin-inline: auto; }
.muted { color: var(--text-3); }

/* nav */
.nav { position: sticky; top: 0; z-index: 20; background: rgba(10,11,13,.8); backdrop-filter: blur(14px); -webkit-backdrop-filter: blur(14px); border-bottom: 1px solid var(--border); }
.navrow { display: flex; align-items: center; justify-content: space-between; height: 58px; }
.brand { display: flex; align-items: center; gap: 10px; font-weight: 650; font-size: 15px; }
.logo { width: 28px; height: 28px; border-radius: 8px; background: var(--grad); display: grid; place-items: center; color: #1a0d05; font-weight: 800; font-size: 14px; }
.links { display: flex; gap: 22px; color: var(--text-2); font-size: 14px; }
.links a:hover { color: var(--text); }

/* buttons */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; padding: 12px 22px; border-radius: 999px; font-weight: 600; font-size: 15px;
  white-space: nowrap; border: 1px solid var(--border-2); transition: transform .2s var(--ease), box-shadow .2s var(--ease); }
.btn:hover { transform: translateY(-1px); }
.btn.ghost { background: rgba(255,255,255,.03); color: var(--text-2); }
.btn.buy { background: var(--grad); color: #1a0d05; border: 0; box-shadow: 0 10px 26px -12px rgba(255,108,80,.7); }
.btn.lg { padding: 14px 30px; font-size: 16px; }

/* hero */
.hero { padding: 64px 0 24px; }
.hero-grid { display: grid; grid-template-columns: 1.1fr 1fr; gap: 32px; align-items: center; }
.hero h1 { font-size: clamp(32px, 4.6vw, 52px); line-height: 1.1; letter-spacing: -.03em; margin-bottom: 16px; max-width: 13ch; }
.grad { background: var(--grad); -webkit-background-clip: text; background-clip: text; color: transparent; }
.lede { font-size: 17px; color: var(--text-2); max-width: 440px; margin: 0 0 26px; }
.stack { position: relative; height: 360px; }
.stack img { position: absolute; width: 200px; border-radius: 6px; box-shadow: 0 26px 50px -18px rgba(0,0,0,.9); }
.stack .s0 { left: 50%; top: 10px; transform: translateX(-50%) rotate(-2deg); z-index: 3; }
.stack .s1 { left: 8%; top: 44px; transform: rotate(-10deg); z-index: 2; opacity: .85; }
.stack .s2 { right: 6%; top: 44px; transform: rotate(9deg); z-index: 1; opacity: .85; }

/* book grid */
.h { font-size: 22px; margin: 44px 0 20px; }
.grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(230px, 1fr)); gap: 20px; }
.card { display: flex; flex-direction: column; background: var(--surface); border: 1px solid var(--border); border-radius: var(--r-lg); overflow: hidden;
  transition: transform .25s var(--ease), border-color .25s; }
.card:hover { transform: translateY(-3px); border-color: var(--border-2); }
.card .cover { padding: 24px 30px 0; background: linear-gradient(180deg, #191b21, #121317); }
.card .cover img { border-radius: 5px 5px 0 0; box-shadow: var(--shadow); width: 100%; }
.card .body { padding: 16px 18px 18px; display: flex; flex-direction: column; gap: 8px; flex: 1; }
.card h3 { font-size: 16px; line-height: 1.35; font-weight: 650; }
.more { margin-top: auto; padding-top: 4px; font-size: 14px; color: var(--accent); font-weight: 600; }
.tags { display: flex; gap: 6px; flex-wrap: wrap; }
.tag { font-size: 12px; color: var(--text-2); background: var(--surface-2); border: 1px solid var(--border); border-radius: 999px; padding: 1px 10px; }

.about { padding-bottom: 32px; }
.about p { color: var(--text-2); max-width: 640px; margin: 0; }

/* book page */
.book { padding: 22px 0 32px; }
.back { display: inline-block; color: var(--text-3); font-size: 14px; margin-bottom: 20px; }
.back:hover { color: var(--text); }
.top { display: grid; grid-template-columns: minmax(220px, 360px) 1fr; gap: 44px; align-items: center; }
.cov { background: linear-gradient(180deg, #191b21, #111216); border: 1px solid var(--border); border-radius: var(--r-lg); padding: 28px; }
.cov img { border-radius: 5px; box-shadow: var(--shadow); width: 100%; }
.info h1 { font-size: clamp(26px, 3.4vw, 38px); line-height: 1.15; margin: 12px 0 10px; }
.sub { color: var(--text-2); font-size: 16px; margin: 0; max-width: 520px; }
.facts { list-style: none; padding: 0; margin: 20px 0 26px; display: flex; flex-wrap: wrap; color: var(--text-3); font-size: 14px; }
.facts li + li::before { content: "·"; margin: 0 10px; }
.note { font-size: 13px; color: var(--text-3); margin: 10px 0 0; }

/* gallery: the A+ pictures — a swipe strip on phones, a tidy grid on desktop; tap = full view (CSS :target, no script) */
.gal { margin-top: 52px; }
.gal h2, .desc h2, .others h2 { font-size: 20px; margin-bottom: 16px; }
.strip { display: grid; grid-template-columns: repeat(2, 1fr); gap: 14px; }
.shot { display: block; border-radius: var(--r); overflow: hidden; border: 1px solid var(--border); background: var(--surface); }
.shot img { width: 100%; transition: transform .35s var(--ease); }
.shot:hover img { transform: scale(1.02); }
.strip + .strip { margin-top: 14px; }
.strip.sq { grid-template-columns: repeat(3, 1fr); }
.strip.wide.odd .shot:first-child { grid-column: 1 / -1; }
.lb { position: fixed; inset: 0; z-index: 50; background: rgba(5,6,8,.97); display: none; align-items: center; justify-content: center; padding: 20px; }
.lb:target { display: flex; }
.lb img { position: relative; z-index: 1; max-width: min(1200px, 100%); max-height: 86vh; width: auto; border-radius: 10px; }
.lb-x { position: absolute; inset: 0; }
.lb-close { position: absolute; z-index: 2; top: 16px; right: 18px; color: var(--text-2); font-size: 14px; background: var(--surface-2); border: 1px solid var(--border-2); border-radius: 999px; padding: 6px 14px; }

.desc { margin-top: 52px; max-width: 680px; }
.desc p { color: #cbccd3; margin: 0 0 14px; }
.desc h3 { font-size: 16px; margin: 22px 0 8px; }
.ticks { list-style: none; padding: 0; margin: 4px 0 18px; display: grid; gap: 8px; }
.ticks li { padding-left: 26px; position: relative; color: #d4d5db; }
.ticks li::before { content: "✓"; position: absolute; left: 0; color: var(--ok); font-weight: 700; }
.others { margin-top: 56px; }
.mbar { display: none; }

.foot { border-top: 1px solid var(--border); margin-top: 48px; padding: 22px 0; font-size: 13px; color: var(--text-3); }
.foot .wrap { display: flex; justify-content: space-between; gap: 12px; flex-wrap: wrap; }

/* tablet */
@media (max-width: 860px) {
  .hero-grid { grid-template-columns: 1fr; }
  .stack { display: none; }
  .top { grid-template-columns: 1fr; gap: 24px; }
  .cov { max-width: 340px; padding: 22px; }
}
/* phone */
@media (max-width: 600px) {
  body { font-size: 15.5px; }
  .wrap { width: calc(100% - 32px); }
  .hero { padding: 40px 0 8px; }
  .hero h1 { font-size: 32px; }
  .lede { font-size: 16px; }
  .h { margin: 32px 0 16px; }
  .grid { grid-template-columns: 1fr 1fr; gap: 12px; }
  .card .cover { padding: 14px 16px 0; }
  .card .body { padding: 12px 12px 14px; }
  .card h3 { font-size: 14px; }
  .card .tags { display: none; }
  .more { font-size: 13px; }
  .cov { margin-inline: auto; max-width: 260px; }
  .info { text-align: center; }
  .info .tags, .facts { justify-content: center; }
  .info h1 { font-size: 25px; }
  .info .btn.buy, .info .note { display: none; }
  .gal, .desc, .others { margin-top: 38px; }
  .strip, .strip.sq { display: flex; overflow-x: auto; scroll-snap-type: x mandatory; gap: 10px; margin-inline: -16px; padding: 0 16px 6px; scrollbar-width: none; }
  .strip::-webkit-scrollbar { display: none; }
  .shot { flex: 0 0 84%; scroll-snap-align: center; }
  .shot.s { flex-basis: 62%; }
  .mbar { display: block; position: sticky; bottom: 0; z-index: 30; padding: 12px 16px calc(12px + env(safe-area-inset-bottom));
    background: rgba(10,11,13,.92); backdrop-filter: blur(12px); -webkit-backdrop-filter: blur(12px); border-top: 1px solid var(--border); }
  .mbar .btn { width: 100%; padding: 14px; }
  .foot .wrap { flex-direction: column; }
}
@media (prefers-reduced-motion: reduce) { * { transition: none !important; scroll-behavior: auto !important; } }
