:root {
  --bg: #faf7f2;
  --surface: #ffffff;
  --ink: #14213d;
  --muted: #5f6675;
  --line: #e4ddd1;
  --accent: #b6212f;
  --accent-ink: #ffffff;
  --accent-soft: #f6e4e4;
  --navy: #14213d;
  --radius: 12px;
  --shadow: 0 10px 30px rgba(20, 33, 61, .12);
  --serif: "Playfair Display", Georgia, "Times New Roman", serif;
  --sans: "Inter", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  --max: 1120px;
}
* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body { margin: 0; background: var(--bg); color: var(--ink); font: 17px/1.65 var(--sans); -webkit-font-smoothing: antialiased; }
img { max-width: 100%; display: block; }
a { color: var(--accent); }
h1, h2, h3 { font-family: var(--serif); line-height: 1.2; margin: 0 0 .5em; font-weight: 700; }
h1 { font-size: clamp(2.2rem, 5vw, 3.6rem); }
h2 { font-size: clamp(1.6rem, 3vw, 2.2rem); }
h3 { font-size: 1.25rem; }
p { margin: 0 0 1em; }
.wrap { max-width: var(--max); margin: 0 auto; padding: 0 20px; }
.section { padding: 80px 0; }
.section.alt { background: var(--surface); border-block: 1px solid var(--line); }
.eyebrow { text-transform: uppercase; letter-spacing: .14em; font-size: .78rem; color: var(--accent); font-weight: 600; margin-bottom: .8em; }
.lead { font-size: 1.2rem; color: var(--muted); max-width: 60ch; }
.muted { color: var(--muted); }
:focus-visible { outline: 3px solid var(--accent); outline-offset: 3px; border-radius: 4px; }
.skip { position: absolute; left: -999px; top: 8px; background: var(--accent); color: var(--accent-ink); padding: 8px 14px; border-radius: 6px; z-index: 100; }
.skip:focus { left: 8px; }

/* header */
.site-header { position: sticky; top: 0; z-index: 50; background: rgba(250, 247, 242, .93); backdrop-filter: blur(8px); border-bottom: 1px solid var(--line); }
.bar { display: flex; align-items: center; justify-content: space-between; gap: 16px; min-height: 72px; }
.brand { display: flex; align-items: center; gap: 10px; text-decoration: none; color: var(--ink); }
.brand img { height: 52px; width: auto; }
.nav { display: flex; align-items: center; gap: 22px; }
.nav a { color: var(--ink); text-decoration: none; font-size: .96rem; font-weight: 500; padding: 6px 0; border-bottom: 2px solid transparent; }
.nav a:hover, .nav a[aria-current="page"] { border-color: var(--accent); }
.lang { display: flex; gap: 2px; border: 1px solid var(--line); border-radius: 999px; padding: 2px; background: var(--surface); }
.lang button { border: 0; background: none; font: inherit; font-size: .8rem; font-weight: 600; padding: 4px 10px; border-radius: 999px; cursor: pointer; color: var(--muted); }
.lang button[aria-pressed="true"] { background: var(--navy); color: #fff; }
.menu-btn { display: none; background: none; border: 1px solid var(--line); border-radius: 8px; padding: 8px 12px; font: inherit; color: var(--ink); cursor: pointer; }
@media (max-width: 860px) {
  .menu-btn { display: block; }
  .nav { display: none; position: absolute; left: 0; right: 0; top: 72px; flex-direction: column; align-items: flex-start; background: var(--bg); border-bottom: 1px solid var(--line); padding: 18px 20px 24px; }
  .nav.open { display: flex; }
}

/* buttons */
.btn { display: inline-flex; align-items: center; gap: 8px; padding: 13px 26px; border-radius: 999px; font-weight: 600; text-decoration: none; border: 2px solid var(--accent); background: var(--accent); color: var(--accent-ink); cursor: pointer; font-size: 1rem; transition: transform .15s, box-shadow .15s; }
.btn:hover { transform: translateY(-2px); box-shadow: var(--shadow); }
.btn.ghost { background: transparent; color: var(--accent); }
.btn-row { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 24px; }

/* hero */
.hero { padding: 80px 0 72px; background: radial-gradient(900px 420px at 88% 0%, var(--accent-soft), transparent 70%); }
.hero-grid { display: grid; grid-template-columns: 1.15fr .85fr; gap: 48px; align-items: center; }
.hero-art img { width: 100%; max-width: 420px; margin-inline: auto; filter: drop-shadow(0 24px 30px rgba(20, 33, 61, .25)); }
@media (max-width: 860px) { .hero-grid { grid-template-columns: 1fr; } .hero { padding-top: 48px; } .hero-art img { max-width: 300px; } }

/* books */
.grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(230px, 1fr)); gap: 36px 28px; }
.card { display: flex; flex-direction: column; text-decoration: none; color: inherit; }
.card .cover { transition: transform .2s; }
.card:hover .cover { transform: translateY(-6px); }
.card h3 { margin: 14px 0 2px; font-size: 1.1rem; }
.card .by { color: var(--muted); font-size: .92rem; margin: 0; }
.tag { display: inline-block; font-size: .72rem; text-transform: uppercase; letter-spacing: .08em; color: var(--accent); background: var(--accent-soft); padding: 2px 10px; border-radius: 999px; margin-top: 8px; align-self: flex-start; }
.cover { display: flex; align-items: flex-end; justify-content: center; height: 290px; }
.cover img { max-height: 100%; max-width: 100%; width: auto; object-fit: contain; filter: drop-shadow(0 14px 18px rgba(20, 33, 61, .22)); }
.detail .cover { height: auto; max-height: 520px; }
.detail .cover img { width: 100%; max-height: 520px; }
.cover.gen { height: auto; aspect-ratio: 2 / 3; flex-direction: column; align-items: flex-start; justify-content: space-between; padding: 18px 16px; color: #fff; border-radius: 4px 8px 8px 4px; background: linear-gradient(160deg, var(--c1), var(--c2)); box-shadow: var(--shadow); }
.cover.gen b { font-family: var(--serif); font-size: 1.15rem; line-height: 1.2; }
.cover.gen small { opacity: .85; letter-spacing: .08em; text-transform: uppercase; font-size: .68rem; }
.filters { display: flex; flex-wrap: wrap; gap: 12px; margin-bottom: 36px; }
.filters input, .filters select, .form input, .form textarea { font: inherit; padding: 11px 14px; border-radius: 8px; border: 1px solid var(--line); background: var(--surface); color: var(--ink); }
.filters input { flex: 1 1 240px; }

/* detail */
.detail { display: grid; grid-template-columns: 360px 1fr; gap: 56px; align-items: start; }
.facts { display: grid; grid-template-columns: auto 1fr; gap: 6px 20px; margin: 24px 0; padding: 18px 0; border-block: 1px solid var(--line); font-size: .95rem; }
.facts dt { color: var(--muted); }
.facts dd { margin: 0; }
.gallery { display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 20px; margin-top: 56px; }
.gallery img { border-radius: var(--radius); box-shadow: var(--shadow); width: 100%; }
@media (max-width: 860px) { .detail { grid-template-columns: 1fr; gap: 28px; } .detail .cover { max-width: 300px; } }

/* misc */
.two { display: grid; grid-template-columns: 1fr 1fr; gap: 48px; }
@media (max-width: 860px) { .two { grid-template-columns: 1fr; gap: 24px; } .section { padding: 56px 0; } }
.values { display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 24px; margin-top: 32px; }
.value { background: var(--bg); border: 1px solid var(--line); border-radius: var(--radius); padding: 26px; }
.value h3 { color: var(--accent); }
.cta { text-align: center; background: var(--navy); color: #fff; border-radius: 18px; padding: 60px 24px; }
.cta h2 { color: inherit; }
.cta p { color: #cdd3e0; max-width: 56ch; margin-inline: auto; }
.cta .btn { background: #fff; color: var(--navy); border-color: #fff; }
.form { display: grid; gap: 14px; }
.form label { font-weight: 600; font-size: .92rem; display: grid; gap: 6px; }
.legal h2 { font-size: 1.3rem; margin-top: 1.6em; }
.notice { background: var(--accent-soft); border-left: 4px solid var(--accent); padding: 12px 16px; border-radius: 6px; font-size: .92rem; }
.page-head { padding: 64px 20px 24px; }
.empty { color: var(--muted); padding: 40px 0; }

/* footer */
.site-footer { background: var(--navy); color: #cdd3e0; padding: 56px 0 28px; font-size: .94rem; }
.foot { display: grid; grid-template-columns: 2fr 1fr 1fr; gap: 32px; }
.foot ul { list-style: none; padding: 0; margin: 0; display: grid; gap: 8px; }
.foot a { color: #fff; text-decoration: none; }
.foot a:hover { text-decoration: underline; }
.foot h4 { margin: 0 0 12px; font-size: .8rem; text-transform: uppercase; letter-spacing: .12em; color: #8f99b3; }
.foot .logo { height: 64px; width: auto; border-radius: 8px; margin-bottom: 14px; }
.copy { margin-top: 32px; padding-top: 20px; border-top: 1px solid #2a3858; color: #8f99b3; font-size: .85rem; }
@media (max-width: 860px) { .foot { grid-template-columns: 1fr; } }
@media (prefers-reduced-motion: reduce) { * { transition: none !important; scroll-behavior: auto !important; } }

/* blog */
.posts { display: grid; grid-template-columns: repeat(auto-fill, minmax(320px, 1fr)); gap: 28px; }
.post { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; display: flex; flex-direction: column; text-decoration: none; color: inherit; transition: transform .2s, box-shadow .2s; }
.post:hover { transform: translateY(-4px); box-shadow: var(--shadow); }
.post img { width: 100%; aspect-ratio: 16 / 9; object-fit: cover; }
.post-body { padding: 24px 26px 28px; display: flex; flex-direction: column; flex: 1; align-items: flex-start; }
.post-body h3 { font-size: 1.15rem; }
.post-body .btn { margin-top: auto; }
.post-title { font-size: clamp(1.7rem, 4vw, 2.5rem); }
.post-figure { margin: 0 0 32px; }
.post-figure img { width: 100%; border-radius: var(--radius); }
.post-figure figcaption { font-size: .82rem; color: var(--muted); margin-top: 8px; }
.post-content h3 { margin-top: 2em; padding-top: 1.2em; border-top: 1px solid var(--line); color: var(--accent); }
.post-content ul { padding-left: 1.2em; }
.post-content li { margin-bottom: .3em; }
.legal code { background: var(--accent-soft); padding: 1px 6px; border-radius: 4px; font-size: .9em; }

.hp { position: absolute; left: -9999px; width: 1px; height: 1px; opacity: 0; }
.form .check { display: flex; gap: 10px; align-items: flex-start; font-weight: 400; font-size: .9rem; }
.form .check input { margin-top: .35em; }
#form-status { font-weight: 600; margin: 0; min-height: 1.5em; }
