/* El-Dehy Publishing public website. Palette follows the logo: ink black and greys on warm paper. */
:root {
  --paper: #faf8f4;
  --card: #ffffff;
  --ink: #181818;
  --ink-soft: #3b3a37;
  --muted: #66615a;
  --line: #e5e0d6;
  --band: #f1ede4;
  --gold: #b07d1f;
  --gold-soft: #f6ecd2;
  --focus: #1d4ed8;
  --radius: 14px;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }

body.site {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font: 17px/1.65 system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  -webkit-text-size-adjust: 100%;
}

.site img { max-width: 100%; display: block; }
.site a { color: inherit; }
.site :focus-visible { outline: 3px solid var(--focus); outline-offset: 2px; border-radius: 4px; }

.skip { position: absolute; left: -999px; top: 8px; background: var(--ink); color: #fff; padding: 8px 14px; border-radius: 8px; z-index: 100; }
.skip:focus { left: 8px; }

.container { width: 100%; max-width: 1120px; margin: 0 auto; padding: 0 20px; }

/* ---------- header ---------- */
.site-header { background: var(--paper); border-bottom: 1px solid var(--line); position: sticky; top: 0; z-index: 50; }
.site-header .container { display: flex; align-items: center; justify-content: space-between; gap: 16px; padding-top: 10px; padding-bottom: 10px; flex-wrap: wrap; }
.brand { display: flex; align-items: center; gap: 12px; text-decoration: none; }
.brand img { width: 46px; height: auto; }
.brand-text { display: flex; flex-direction: column; line-height: 1.05; }
.brand-text b { font: 700 21px/1 Georgia, "Times New Roman", serif; letter-spacing: 0.02em; }
.brand-text span { font: 600 11px/1.3 system-ui, sans-serif; letter-spacing: 0.32em; color: var(--muted); margin-top: 3px; }
.nav { display: flex; gap: 4px 22px; flex-wrap: wrap; font-size: 15px; font-weight: 600; }
.nav a { text-decoration: none; color: var(--ink-soft); padding: 8px 2px; border-bottom: 2px solid transparent; }
.nav a:hover, .nav a[aria-current="page"] { color: var(--ink); border-bottom-color: var(--ink); }

/* ---------- type ---------- */
.site h1, .site h2, .site h3 { font-family: Georgia, "Times New Roman", serif; line-height: 1.15; margin: 0 0 14px; letter-spacing: -0.005em; }
.site h1 { font-size: clamp(32px, 5vw, 52px); }
.site h2 { font-size: clamp(24px, 3.2vw, 34px); }
.site h3 { font-size: 20px; }
.eyebrow { font: 700 12px/1 system-ui, sans-serif; letter-spacing: 0.16em; text-transform: uppercase; color: var(--gold); margin: 0 0 12px; }
.lead { font-size: clamp(18px, 2vw, 21px); color: var(--ink-soft); max-width: 62ch; }
.muted { color: var(--muted); }

/* ---------- buttons ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  padding: 13px 22px; border-radius: 999px; border: 2px solid var(--ink);
  background: var(--ink); color: #fff !important; font: 700 16px/1.2 system-ui, sans-serif;
  text-decoration: none; cursor: pointer; transition: transform .12s, background .12s, color .12s;
}
.btn:hover { background: #000; transform: translateY(-1px); }
.btn.ghost { background: transparent; color: var(--ink) !important; }
.btn.ghost:hover { background: var(--ink); color: #fff !important; }
.btn.small { padding: 9px 16px; font-size: 14px; }
.btn-row { display: flex; flex-wrap: wrap; gap: 12px; }

/* ---------- hero ---------- */
.hero { padding: 64px 0 56px; }
.hero .container { display: grid; grid-template-columns: 1.15fr .85fr; gap: 48px; align-items: center; }
.hero p.lead { margin: 0 0 28px; }
.hero-art { display: flex; justify-content: center; }
.hero-covers { position: relative; width: min(100%, 380px); aspect-ratio: 1 / 1.05; }
.hero-covers img { position: absolute; width: 52%; height: auto; border-radius: 4px; box-shadow: 0 18px 40px rgba(0,0,0,.25), 0 2px 6px rgba(0,0,0,.15); background: #ddd; }
.hero-covers img:nth-child(1) { left: 0; top: 14%; transform: rotate(-6deg); }
.hero-covers img:nth-child(2) { left: 24%; top: 0; z-index: 2; transform: rotate(1deg); }
.hero-covers img:nth-child(3) { right: 0; top: 18%; transform: rotate(7deg); }

/* ---------- sections ---------- */
.section { padding: 52px 0; }
.section.band { background: var(--band); border-block: 1px solid var(--line); }
.section-head { display: flex; align-items: end; justify-content: space-between; gap: 16px; margin-bottom: 26px; flex-wrap: wrap; }
.section-head h2 { margin: 0; }
.section-head p { margin: 6px 0 0; color: var(--muted); max-width: 60ch; }
.section-head a.more { font-weight: 700; font-size: 15px; white-space: nowrap; }

/* ---------- book grid / cards ---------- */
.grid { display: grid; gap: 28px 22px; grid-template-columns: repeat(4, minmax(0, 1fr)); }
.card { position: relative; display: flex; flex-direction: column; text-decoration: none; }
.card .cover-wrap { position: relative; aspect-ratio: 2 / 3; background: #ece7dc; border-radius: 6px; overflow: hidden; box-shadow: 0 10px 26px rgba(0,0,0,.18), 0 1px 3px rgba(0,0,0,.12); transition: transform .15s, box-shadow .15s; }
.card .cover-wrap img { width: 100%; height: 100%; object-fit: contain; }
.card:hover .cover-wrap { transform: translateY(-4px); box-shadow: 0 16px 34px rgba(0,0,0,.22); }
.card h3 { font: 700 17px/1.3 Georgia, serif; margin: 14px 0 4px; }
.card .meta { font-size: 14px; color: var(--muted); margin: 0; }
.tags { display: flex; flex-wrap: wrap; gap: 6px; margin: 8px 0 0; }
.tag { font: 700 11px/1 system-ui, sans-serif; letter-spacing: .08em; text-transform: uppercase; padding: 5px 8px; border-radius: 999px; background: var(--band); color: var(--ink-soft); border: 1px solid var(--line); }
.tag.new { background: var(--gold); border-color: var(--gold); color: #fff; }
.badge { position: absolute; top: 10px; left: 10px; z-index: 2; background: var(--gold); color: #fff; font: 800 11px/1 system-ui, sans-serif; letter-spacing: .12em; padding: 6px 9px; border-radius: 999px; }
.badge.free { left: auto; right: 10px; background: var(--ink); }

.shelf-row + .shelf-row { margin-top: 56px; }
.shelf-row .grid { grid-template-columns: repeat(4, minmax(0, 1fr)); }

/* ---------- filters ---------- */
.chips { display: flex; flex-wrap: wrap; gap: 10px; margin: 0 0 34px; padding: 0; list-style: none; }
.chips a { display: inline-block; padding: 8px 16px; border: 1.5px solid var(--line); border-radius: 999px; text-decoration: none; font-weight: 600; font-size: 15px; background: var(--card); }
.chips a:hover { border-color: var(--ink); }
.chips a[aria-current="true"] { background: var(--ink); border-color: var(--ink); color: #fff; }

/* ---------- book page ---------- */
.crumbs { font-size: 14px; color: var(--muted); padding: 22px 0 0; }
.crumbs a { text-decoration: none; }
.crumbs a:hover { text-decoration: underline; }
.book { padding: 26px 0 40px; }
.book .container { display: grid; grid-template-columns: minmax(240px, 380px) 1fr; gap: 56px; align-items: start; }
.book-cover img { width: 100%; height: auto; border-radius: 6px; box-shadow: 0 22px 50px rgba(0,0,0,.28), 0 2px 8px rgba(0,0,0,.15); background: #ece7dc; }
.book h1 { font-size: clamp(30px, 4.4vw, 46px); margin-bottom: 8px; }
.subtitle { font: italic 20px/1.4 Georgia, serif; color: var(--ink-soft); margin: 0 0 14px; }
.facts { display: flex; flex-wrap: wrap; gap: 8px 22px; margin: 0 0 22px; padding: 0; list-style: none; font-size: 15px; color: var(--muted); }
.facts b { color: var(--ink-soft); }
.buy { margin: 26px 0; padding: 22px; background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); }
.buy h2 { font-size: 20px; margin-bottom: 12px; }
.buy .fine { font-size: 13px; color: var(--muted); margin: 12px 0 0; }
.gift { margin: 22px 0; padding: 22px; background: var(--gold-soft); border: 1px solid #ead9a8; border-radius: var(--radius); }
.gift h2 { font-size: 20px; margin-bottom: 8px; }
.gift p { margin: 0 0 14px; color: var(--ink-soft); }

/* ---------- free page / prose ---------- */
.free-card { display: grid; grid-template-columns: 110px 1fr; gap: 18px; padding: 18px; background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); text-decoration: none; align-items: center; transition: box-shadow .15s, transform .15s; }
.free-card:hover { box-shadow: 0 12px 30px rgba(0,0,0,.12); transform: translateY(-2px); }
.free-card img { width: 100%; height: auto; border-radius: 4px; box-shadow: 0 8px 18px rgba(0,0,0,.2); }
.free-card h3 { margin: 0 0 6px; font-size: 18px; }
.free-card p { margin: 0; font-size: 15px; color: var(--muted); }
.free-grid { display: grid; gap: 20px; grid-template-columns: repeat(2, minmax(0, 1fr)); }
.prose { max-width: 70ch; }
.prose h2 { margin-top: 36px; }
.prose ul { padding-left: 22px; }
.prose li { margin: 6px 0; }
.page-head { padding: 54px 0 14px; }

/* ---------- about band ---------- */
.about-band .container { display: grid; grid-template-columns: .5fr 1fr; gap: 48px; align-items: center; }
.about-band img { width: min(100%, 240px); margin: 0 auto; }

/* ---------- footer ---------- */
.site-footer { margin-top: 48px; background: #151515; color: #cfcac0; padding: 44px 0 30px; font-size: 15px; }
.site-footer a { color: #fff; text-decoration: none; }
.site-footer a:hover { text-decoration: underline; }
.footer-grid { display: grid; grid-template-columns: 1.4fr 1fr 1fr; gap: 32px; }
.site-footer h3 { color: #fff; font: 700 13px/1 system-ui, sans-serif; letter-spacing: .14em; text-transform: uppercase; margin: 0 0 14px; }
.site-footer ul { list-style: none; margin: 0; padding: 0; }
.site-footer li { margin: 8px 0; }
.site-footer .brand-text b { color: #fff; }
.site-footer .brand-text span { color: #a8a299; }
.site-footer .logo-light { filter: invert(1); }
.legal { border-top: 1px solid #333; margin-top: 30px; padding-top: 18px; font-size: 13px; color: #9b968c; }

/* ---------- responsive ---------- */
@media (max-width: 900px) {
  .grid, .shelf-row .grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .hero .container { grid-template-columns: 1fr; gap: 34px; }
  .hero { padding: 40px 0 32px; }
  .book .container { grid-template-columns: 1fr; gap: 30px; }
  .book-cover { max-width: 300px; margin: 0 auto; }
  .about-band .container { grid-template-columns: 1fr; text-align: center; }
  .footer-grid { grid-template-columns: 1fr 1fr; }
}
@media (max-width: 640px) {
  body.site { font-size: 16px; }
  .site-header { position: static; }
  .grid, .shelf-row .grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 24px 14px; }
  .free-grid { grid-template-columns: 1fr; }
  .free-card { grid-template-columns: 84px 1fr; }
  .nav { gap: 2px 16px; font-size: 14px; width: 100%; }
  .site-header .container { padding-top: 8px; }
  .footer-grid { grid-template-columns: 1fr; }
  .btn { width: 100%; }
  .btn.small { width: auto; }
  .section { padding: 38px 0; }
}
@media (prefers-reduced-motion: reduce) { * { transition: none !important; scroll-behavior: auto !important; } }
