/* Evey Hill — site stylesheet
   Palette: cream / brown / gold, preserved from the existing eveyhill.com identity.
   Priority: mobile readability. No oversized headlines, no split-word wrapping. */

@import url('https://fonts.googleapis.com/css2?family=Playfair+Display:ital,wght@0,500;0,700;1,500&family=Lato:wght@400;700&display=swap');

:root{
  --cream: #faf3e6;
  --cream-deep: #f2e6d0;
  --paper: #fffdf8;
  --brown-dark: #3e2a1e;
  --brown: #6b4423;
  --brown-soft: #8a6a4b;
  --gold: #b8912f;
  --gold-light: #e8c766;
  --line: #e2d3b4;
  --max-width: 1080px;
}

*{ box-sizing: border-box; }

html{ -webkit-text-size-adjust: 100%; text-size-adjust: 100%; }

body{
  margin: 0;
  background: var(--cream);
  color: var(--brown-dark);
  font-family: 'Lato', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
}

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

a{ color: var(--brown); text-decoration: underline; text-decoration-color: var(--gold); text-underline-offset: 3px; }
a:hover{ color: var(--gold); }

h1, h2, h3, h4{
  font-family: 'Playfair Display', Georgia, serif;
  color: var(--brown-dark);
  line-height: 1.25;
  margin: 0 0 0.6em 0;
  overflow-wrap: normal;
  word-break: keep-all;
  hyphens: none;
}

/* Mobile-safe fluid headline sizing — never large enough to force mid-word breaks */
h1{ font-size: clamp(1.6rem, 5.2vw, 2.75rem); }
h2{ font-size: clamp(1.35rem, 4vw, 2.1rem); }
h3{ font-size: clamp(1.15rem, 3vw, 1.5rem); }

p{ margin: 0 0 1em 0; max-width: 65ch; }

.container{
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 0 20px;
}

/* ---------- Header / Nav ---------- */
.site-header{
  background: var(--paper);
  border-bottom: 1px solid var(--line);
  position: sticky;
  top: 0;
  z-index: 50;
}
.header-inner{
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 14px 20px;
  max-width: var(--max-width);
  margin: 0 auto;
  gap: 12px;
}
.brand{
  font-family: 'Playfair Display', Georgia, serif;
  font-size: 1.4rem;
  font-weight: 700;
  color: var(--brown-dark);
  text-decoration: none;
  white-space: nowrap;
}
.brand:hover{ color: var(--gold); }

.nav-toggle{
  display: none;
  background: none;
  border: 1px solid var(--brown-soft);
  border-radius: 6px;
  padding: 8px 12px;
  font-size: 1rem;
  color: var(--brown-dark);
  cursor: pointer;
}

.site-nav{
  display: flex;
  flex-wrap: wrap;
  gap: 4px 18px;
  justify-content: flex-end;
}
.site-nav a{
  text-decoration: none;
  color: var(--brown-dark);
  font-weight: 700;
  font-size: 0.95rem;
  letter-spacing: 0.02em;
  padding: 6px 2px;
  border-bottom: 2px solid transparent;
  white-space: nowrap;
}
.site-nav a:hover, .site-nav a.active{
  border-bottom-color: var(--gold);
  color: var(--brown);
}

@media (max-width: 760px){
  .nav-toggle{ display: inline-block; }
  .site-nav{
    display: none;
    flex-direction: column;
    width: 100%;
    padding: 10px 20px 16px 20px;
    background: var(--paper);
    border-top: 1px solid var(--line);
  }
  .site-nav.open{ display: flex; }
  .header-inner{ flex-wrap: wrap; }
}

/* ---------- Hero ---------- */
.hero{
  background: linear-gradient(180deg, var(--cream-deep) 0%, var(--cream) 100%);
  padding: 56px 0 44px 0;
  text-align: center;
  border-bottom: 1px solid var(--line);
}
.hero .eyebrow{
  text-transform: uppercase;
  letter-spacing: 0.14em;
  font-weight: 700;
  color: var(--gold);
  font-size: 0.8rem;
  margin-bottom: 10px;
}
.hero h1{ margin-bottom: 0.35em; }
.hero p.lead{
  font-size: clamp(1rem, 2.6vw, 1.2rem);
  color: var(--brown);
  max-width: 56ch;
  margin: 0 auto;
}

/* ---------- Buttons ---------- */
.btn{
  display: inline-block;
  padding: 12px 22px;
  border-radius: 999px;
  font-weight: 700;
  text-decoration: none;
  font-size: 0.98rem;
  border: 2px solid transparent;
  margin: 6px 8px 6px 0;
}
.btn-primary{ background: var(--brown-dark); color: var(--cream); }
.btn-primary:hover{ background: var(--brown); color: #fff; }
.btn-gold{ background: var(--gold); color: var(--brown-dark); }
.btn-gold:hover{ background: var(--gold-light); }
.btn-outline{ background: transparent; color: var(--brown-dark); border-color: var(--brown-soft); }
.btn-outline:hover{ border-color: var(--gold); color: var(--brown); }
.btn[aria-disabled="true"]{
  background: var(--line);
  color: var(--brown-soft);
  cursor: not-allowed;
  pointer-events: none;
}

/* ---------- Sections & Cards ---------- */
section{ padding: 48px 0; }
section + section{ border-top: 1px solid var(--line); }

.section-head{ text-align: center; max-width: 60ch; margin: 0 auto 32px auto; }

.grid{
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 26px;
}

.card{
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: 14px;
  padding: 22px;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.cover-placeholder{
  aspect-ratio: 2 / 3;
  border-radius: 8px;
  background: linear-gradient(135deg, var(--brown-soft), var(--brown-dark));
  color: var(--cream);
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  font-family: 'Playfair Display', Georgia, serif;
  font-size: 1rem;
  padding: 14px;
  margin-bottom: 4px;
}
.cover-placeholder.gold{ background: linear-gradient(135deg, var(--gold-light), var(--gold)); color: var(--brown-dark); }

.cover-img{
  width: 100%;
  aspect-ratio: 2 / 3;
  object-fit: cover;
  object-position: top center;
  border-radius: 8px;
  box-shadow: 0 6px 18px rgba(62,42,30,0.25);
  margin-bottom: 4px;
}

.badge{
  display: inline-block;
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  padding: 4px 10px;
  border-radius: 999px;
  width: fit-content;
}
.badge-live{ background: #e7f0e2; color: #3f6b34; }
.badge-soon{ background: var(--cream-deep); color: var(--brown); border: 1px solid var(--gold); }

.card h3{ margin-bottom: 0.2em; }
.card .meta{ font-size: 0.9rem; color: var(--brown-soft); margin-bottom: 4px; }
.card .desc{ font-size: 0.95rem; flex-grow: 1; }

.coming-soon-card{ opacity: 0.9; }

/* ---------- Callout / banner ---------- */
.callout{
  background: var(--cream-deep);
  border: 1px solid var(--gold);
  border-radius: 12px;
  padding: 20px 24px;
  margin: 20px 0;
}

/* ---------- Footer ---------- */
.site-footer{
  background: var(--brown-dark);
  color: var(--cream);
  padding: 36px 0 24px 0;
}
.site-footer a{ color: var(--gold-light); text-decoration: none; }
.site-footer a:hover{ text-decoration: underline; }
.footer-grid{
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 20px;
  margin-bottom: 20px;
}
.footer-grid h4{ color: var(--cream); font-size: 1rem; margin-bottom: 10px; }
.footer-grid ul{ list-style: none; padding: 0; margin: 0; }
.footer-grid li{ margin-bottom: 6px; font-size: 0.92rem; }
.footer-note{
  border-top: 1px solid rgba(250,243,230,0.15);
  padding-top: 16px;
  font-size: 0.82rem;
  color: var(--gold-light);
  text-align: center;
}

/* ---------- Free preview reading layout ---------- */
.reading article h2{
  text-align: center;
  margin-top: 2.2em;
}
.reading article h2:first-child{ margin-top: 0; }
.reading .chapter-subtitle{
  text-align: center;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  font-size: 0.85rem;
  font-weight: 700;
  color: var(--gold);
  margin-bottom: 1.6em;
}
.reading article p{
  max-width: none;
  font-size: 1.05rem;
}
.reading .scene-break{
  text-align: center;
  color: var(--gold);
  letter-spacing: 0.4em;
  margin: 1.6em 0;
}

/* ---------- Reader reviews / testimonials ---------- */
.review-card{
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: 14px;
  padding: 28px 32px;
  max-width: 680px;
  margin: 0 auto;
}
.review-stars{
  color: var(--gold);
  font-size: 1.2rem;
  letter-spacing: 0.15em;
  margin-bottom: 10px;
}
.review-card blockquote{
  margin: 0 0 14px 0;
  font-family: 'Playfair Display', Georgia, serif;
  font-style: italic;
  font-size: 1.1rem;
  color: var(--brown-dark);
  line-height: 1.6;
}
.review-attribution{
  font-weight: 700;
  color: var(--brown);
  font-size: 0.9rem;
}

/* Utility */
.center{ text-align: center; }
.small{ font-size: 0.85rem; color: var(--brown-soft); }
.stack{ display: flex; flex-wrap: wrap; align-items: center; }
.tag-note{ font-size: 0.82rem; color: var(--brown-soft); font-style: italic; }

/* ── Eden chat widget ── */
#chat-bubble{
  position: fixed; bottom: 1.5rem; right: 1.5rem; z-index: 999;
  width: 58px; height: 58px; border-radius: 50%;
  background: var(--brown-dark); border: 2px solid var(--gold);
  cursor: pointer; display: flex; align-items: center; justify-content: center;
  box-shadow: 0 4px 20px rgba(0,0,0,0.3); transition: all 0.3s;
}
#chat-bubble:hover{ background: var(--gold); transform: scale(1.08); }
#chat-bubble svg{ width: 26px; height: 26px; fill: var(--gold-light); }
#chat-bubble:hover svg{ fill: var(--brown-dark); }
#chat-panel{
  position: fixed; bottom: 5.5rem; right: 1.5rem; z-index: 998;
  width: 340px; max-width: calc(100vw - 2rem);
  background: var(--cream); border: 1px solid var(--line);
  box-shadow: 0 8px 40px rgba(44,26,0,0.2);
  display: none; flex-direction: column;
  border-radius: 10px; overflow: hidden; height: 480px;
}
#chat-panel.open{ display: flex; }
.chat-header{ background: var(--brown-dark); padding: 0.9rem 1.1rem; display: flex; align-items: center; justify-content: space-between; }
.chat-header-info{ display: flex; align-items: center; gap: 0.65rem; }
.chat-avatar{ width: 34px; height: 34px; border-radius: 50%; background: var(--gold); display: flex; align-items: center; justify-content: center; font-family: 'Playfair Display', Georgia, serif; font-size: 0.95rem; color: var(--brown-dark); font-weight: 700; flex-shrink: 0; }
.chat-header-name{ font-family: 'Playfair Display', Georgia, serif; font-size: 0.92rem; color: var(--gold-light); font-weight: 700; }
.chat-header-status{ font-family: 'Lato', sans-serif; font-size: 0.68rem; color: var(--gold-light); opacity: 0.8; }
.chat-close{ background: none; border: none; cursor: pointer; color: var(--gold-light); font-size: 1.2rem; line-height: 1; padding: 0; }
.chat-close:hover{ color: #fff; }
.chat-messages{ flex: 1; overflow-y: auto; padding: 0.9rem; display: flex; flex-direction: column; gap: 0.6rem; }
.chat-messages::-webkit-scrollbar{ width: 4px; }
.chat-messages::-webkit-scrollbar-thumb{ background: var(--cream-deep); border-radius: 2px; }
.msg{ max-width: 88%; padding: 0.6rem 0.85rem; font-family: 'Lato', sans-serif; font-size: 0.88rem; line-height: 1.5; border-radius: 6px; }
.msg-bot{ background: var(--cream-deep); color: var(--brown-dark); border-left: 3px solid var(--gold); align-self: flex-start; }
.msg-bot a{ color: var(--brown-dark); font-weight: 700; text-decoration-color: var(--gold); }
.msg-user{ background: var(--brown-dark); color: var(--cream); align-self: flex-end; }
.chat-prompt-btns{ padding: 0 0.9rem 0.5rem; display: flex; flex-direction: column; gap: 0.35rem; }
.prompt-btn{ background: transparent; border: 1px solid var(--line); border-radius: 6px; padding: 0.5rem 0.75rem; text-align: left; cursor: pointer; font-family: 'Lato', sans-serif; font-size: 0.82rem; color: var(--brown); transition: all 0.2s; }
.prompt-btn:hover{ background: var(--cream-deep); border-color: var(--gold); color: var(--brown-dark); }
.chat-input-row{ border-top: 1px solid var(--line); display: flex; align-items: center; padding: 0.45rem 0.65rem; gap: 0.4rem; }
#chat-input{ flex: 1; border: none; background: transparent; outline: none; font-family: 'Lato', sans-serif; font-size: 0.88rem; color: var(--brown-dark); padding: 0.35rem 0; }
#chat-input::placeholder{ color: var(--brown-soft); }
#chat-send{ background: var(--brown-dark); border: none; cursor: pointer; width: 32px; height: 32px; display: flex; align-items: center; justify-content: center; border-radius: 6px; flex-shrink: 0; }
#chat-send:hover{ background: var(--gold); }
#chat-send svg{ width: 15px; height: 15px; fill: var(--gold-light); }
.typing-indicator{ display: flex; gap: 4px; padding: 0.6rem 0.85rem; background: var(--cream-deep); border-left: 3px solid var(--gold); align-self: flex-start; max-width: 70px; border-radius: 6px; }
.typing-dot{ width: 6px; height: 6px; border-radius: 50%; background: var(--gold); animation: typingBounce 1.2s ease-in-out infinite; }
.typing-dot:nth-child(2){ animation-delay: 0.2s; }
.typing-dot:nth-child(3){ animation-delay: 0.4s; }
@keyframes typingBounce{ 0%, 60%, 100% { transform: translateY(0); opacity: 0.5; } 30% { transform: translateY(-5px); opacity: 1; } }
@media (max-width: 480px){
  #chat-panel{ width: calc(100vw - 1.5rem); right: 0.75rem; bottom: 4.75rem; height: 65vh; }
  #chat-bubble{ right: 0.85rem; bottom: 0.85rem; }
}
