*{box-sizing:border-box}
html,body{margin:0;padding:0}
html{scroll-behavior:smooth}
body{
  font-family:system-ui,-apple-system,Segoe UI,Roboto,Helvetica,Arial,sans-serif;
  line-height:1.5;
  color:#0e0e0e;
  background:#fff;
}

/* Layout */
.wrap{
  max-width:75%;
  margin:0 auto;
  padding:0 20px;
}
.site-header{
  position:sticky;
  top:0;
  background:#ffffffcc;
  backdrop-filter:saturate(160%) blur(8px);
  border-bottom:1px solid #eee;
  z-index:10;
}
.site-header .wrap{
  display:flex;
  align-items:center;
  justify-content:space-between;
  min-height:64px;
}
.brand{
  display:flex;
  gap:10px;
  align-items:center;
  color:inherit;
  text-decoration:none;
  font-weight:600;
}
.brand img{
  width:28px;
  height:42px;
  object-fit:cover;
  border-radius:2px;
}
.site-header nav a{
  margin-left:18px;
  text-decoration:none;
  color:#222;
}
.site-header nav a:hover{text-decoration:underline}

/* Hero */
.hero{padding:48px 0 24px}
.hero-grid{
  display:grid;
  grid-template-columns:0.7fr 1.3fr;
  gap:36px;
  align-items:center;
}
.hero-copy h1{
  font-size:clamp(28px,3.2vw,40px);
  font-weight:700;
  line-height:1.1;
  color:#fff;
  margin:0;
  text-shadow:
    2px 3px 6px rgba(0,0,0,0.6),
    0 0 8px rgba(0,0,0,0.5);
}
.hero img,
.heronext img,
.book-cover img,
img.cover{
  width:100%;
  height:auto;
  max-width:400px;
  display:block;
  margin:0 auto;
}
.hero-media img{
  border:3px solid #fff;
  box-shadow:6px 8px 18px rgba(0,0,0,0.5);
  border-radius:3px;
  transform:rotate(0deg);
}
.tagline{font-size:1.1rem;color:#fff}
.cta-row{display:flex;gap:12px;margin:14px 0 10px}
.bullets{margin:10px 0 0 0;padding-left:18px;color:#fff}

/* Buttons */
.btn{
  display:inline-flex;
  align-items:center;
  justify-content:center;
  border:1px solid #111;
  border-radius:6px;
  padding:10px 14px;
  font-weight:600;
  text-decoration:none;
  color:#111;
  cursor:pointer;
}
.btn.primary{
  background:#111;
  color:#fff;
  border-color:#111;
}
.btn.primary:hover{opacity:.9}
.btn.ghost{
  background:#fff;
  color:#000;
  border-color:#fff;
}
.btn.stretch{width:100%}

/* Disabled state */
.btn.disabled{
  pointer-events:none;
  opacity:.45;
  filter:grayscale(.7);
  cursor:not-allowed;
}
.btn.disabled:hover{opacity:.45}

/* Buy cards area */
.purchase{padding:28px 0}

/* 3 cards across by default */
.cards{
  display:grid;
  grid-template-columns:repeat(3,1fr);
  gap:18px;
}

/* Individual cards */
.card{
  border:1px solid #eaeaea;
  border-radius:10px;
  padding:16px;
  background:#fafafa;
}
.card h3{margin-top:0}
.availability{margin-top:8px;font-size:.85rem}
.availability.ok{color:#116611}
.availability.soon{color:#555}

/* Buy card layout */
.card.buy-card{
  display:flex;
  flex-direction:column;
  justify-content:space-between;
}

/* Popular badge + ribbon base */
.card.buy-card.card-popular{
  position:relative;
  overflow:hidden;
}

/* Single source of truth for badge-popular */
.badge-popular{
  position:absolute;
  top:-10px;
  right:-10px;
  display:inline-block;
  margin-bottom:0.5rem;
  padding:0.2rem 0.8rem;
  background:#e63946;
  color:#ffffff;
  font-size:0.7rem;
  font-weight:700;
  text-transform:uppercase;
  letter-spacing:0.06em;
  border-radius:999px;
  white-space:nowrap;
  z-index:50;
  box-shadow:0 2px 6px rgba(0,0,0,0.25);
}

/* Goodreads card highlight */
.goodreads-card{
  background:#fdf5e6;
  border-color:#e0c896;
  transition:transform 0.15s ease, box-shadow 0.15s ease;
}
.goodreads-card:hover{
  transform:translateY(-3px);
  box-shadow:0 4px 14px rgba(0,0,0,0.18);
}

/* Button hover: apply lift to buy-card buttons, except Goodreads */
.card.buy-card:not(.goodreads-card) .btn{
  transition:transform 0.15s ease, box-shadow 0.15s ease;
}
.card.buy-card:not(.goodreads-card) .btn:hover{
  transform:translateY(-3px);
  box-shadow:0 4px 12px rgba(0,0,0,0.18);
}

/* Explicitly no extra hover on Goodreads buttons */
.goodreads-card .btn:hover{
  transform:none;
  box-shadow:none;
}

/* Signed Edition */
.signed{
  padding:28px 0;
  background:#f6f6f6;
  border-top:1px solid #eee;
  border-bottom:1px solid #eee;
}
.signed .aside{font-size:.9rem;color:#444}
.fineprint{font-size:.85rem;color:#666}

/* Sections */
.about,.faq,.next{padding:28px 0}
blockquote{
  border-left:4px solid #ddd;
  padding-left:12px;
  color:#333;
}
.faq{
  background:#f6f6f6;
  border-top:1px solid #eee;
  border-bottom:1px solid #eee;
}

/* Footer */
.site-footer{
  padding:18px 0;
  border-top:1px solid #eee;
  background:#fff;
}
.foot-grid{
  display:flex;
  align-items:center;
  justify-content:space-between;
}
.site-footer nav a{
  margin-left:14px;
  text-decoration:none;
  color:#222;
}
.site-footer nav a:hover{text-decoration:underline}

/* Newsletter */
.newsletter{
  padding:18px 0;
  border-top:1px solid #eee;
  border-bottom:1px solid #eee;
  background:#fbfbfb;
}
.newsletter .nl-grid{
  display:grid;
  grid-template-columns:1fr auto;
  gap:10px;
  max-width:520px;
}
.newsletter input{
  border:1px solid #ccc;
  border-radius:6px;
  padding:10px;
}
.sr-only{
  position:absolute;
  width:1px;
  height:1px;
  padding:0;
  margin:-1px;
  overflow:hidden;
  clip:rect(0,0,0,0);
  white-space:nowrap;
  border:0;
}

/* Background image hooks */
body.has-bg{
  background:#0b0b0b;
  color:#f5f5f5;
}
body.has-bg .site-header{
  background:#111111cc;
  border-bottom-color:#222;
}
body.has-bg .card{
  background:#111;
  border-color:#222;
}
body.has-bg .btn{
  border-color:#eee;
  color:#eee;
}
body.has-bg .btn.primary{
  background:#eee;
  color:#111;
  border-color:#eee;
}
.hero.bg{
  background:url('assets/hero-bg.jpg') center/cover no-repeat;
  position:relative;
  isolation:isolate;
  opacity:0.85;
}
.hero.bg::after{
  content:"";
  position:absolute;
  inset:0;
  background:radial-gradient(
    ellipse at 20% 10%,
    rgba(0,0,0,0.25) 0%,
    rgba(0,0,0,0.4) 60%,
    rgba(0,0,0,0.5) 100%
  );
  z-index:-1;
}

/* Custom hero background for Jetlagged teaser */
.hero.heronext.bg{
  background-image:url('/assets/heronext-bg2.jpg') !important;
  background-size:cover !important;
  background-position:center !important;
  background-repeat:no-repeat !important;
  color:#fff;
  position:relative;
  isolation:isolate;
}
.hero.heronext.bg::after{
  content:"";
  position:absolute;
  inset:0;
  background:radial-gradient(
    ellipse at 20% 10%,
    rgba(0,0,0,0.25) 0%,
    rgba(0,0,0,0.4) 60%,
    rgba(0,0,0,0.5) 100%
  );
  z-index:-1;
}

/* Utility */
.hidden{
  position:absolute;
  left:-9999px;
}
.nl-success{
  margin-top:1rem;
  padding:0.75rem 1rem;
  background:#1f9d55;
  color:#fff;
  border-radius:6px;
}
.nl-error{
  margin-top:1rem;
  padding:0.75rem 1rem;
  background:#d64545;
  color:#fff;
  border-radius:6px;
}

/* MailerLite overrides */
.newsletter .newsletter-row{
  display:flex;
  gap:10px;
  justify-content:center;
  align-items:center;
  flex-wrap:wrap;
  margin-bottom:10px;
}
.newsletter .newsletter-row .form-control{
  padding:10px 12px;
  border:1px solid #ccc;
  border-radius:6px;
  min-width:240px;
  font-size:0.95rem;
}
.newsletter .btn.primary,
.ml-form-embedContainer .btn.primary{
  background:#000;
  color:#fff;
  border:none;
  border-radius:6px;
  padding:10px 18px;
  font-weight:600;
  cursor:pointer;
}
.newsletter .btn.primary:hover{
  background:#222;
}
.nl-optin{
  display:flex;
  justify-content:center;
  gap:6px;
  font-size:0.8rem;
  color:#555;
  margin-bottom:6px;
}

/* success box style */
.ml-form-successBody{
  text-align:center;
  background:#e8fff1;
  border:1px solid #3fbf7f;
  color:#125233;
  padding:12px 14px;
  border-radius:6px;
}

/* Left align only MailerLite form fields and labels */
.ml-form-embedBody,
.ml-form-embedBody *{
  text-align:left !important;
  justify-content:flex-start !important;
}

/* Override MailerLite default centering */
.ml-form-embedContainer,
.ml-form-embedContainer .ml-form-embedWrapper,
.ml-form-embedContainer .ml-form-embedBody,
.ml-form-embedContainer .ml-form-embedContent,
.ml-form-embedContainer form,
.ml-form-embedContainer p,
.ml-form-embedContainer h4{
  text-align:left !important;
  margin-left:0 !important;
  margin-right:auto !important;
  justify-content:flex-start !important;
}

/* ensure email field + button sit left */
.ml-form-embedContainer .newsletter-row{
  justify-content:flex-start !important;
}
.ml-form-embedContainer .newsletter-row input,
.ml-form-embedContainer .newsletter-row button{
  display:inline-block !important;
  margin-right:8px;
}

/* Responsive tweaks */
@media (max-width:960px){
  .hero-grid{grid-template-columns:1fr}
  .cards{grid-template-columns:1fr 1fr}
}
@media (max-width:480px){
  .cards{grid-template-columns:1fr}
  .hero img,
  .book-cover img{
    max-width:90%;
  }
}
@media (max-width:600px){
  .badge-popular{right:0.5rem}
}

/* === SLEDGEHAMMER HARD OVERRIDES FOR CARDS LAYOUT === */
.cards {
  display: grid !important;
  grid-template-columns: repeat(3, minmax(0, 1fr)) !important;
  gap: 18px !important;
}

/* Make sure cards are not forcing 4-up via width or flex */
.card {
  width: auto !important;
  flex: none !important;
}

@media (max-width: 960px) {
  .cards {
    grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
  }
}

@media (max-width: 480px) {
  .cards {
    grid-template-columns: 1fr !important;
  }
}

body {
  outline: 4px solid hotpink !important;
}

