/* Public storefront finish. Shared palette and typography live in style.css. */
@media(prefers-reduced-motion:no-preference){
    .is-home .home-opening::after { content:""; position:absolute; width:170px; height:170px; border:1px solid rgba(214,186,144,.12); border-radius:50%; top:30px; inset-inline-start:-85px; pointer-events:none; animation:home-orbit-breathe 9s ease-in-out infinite; }
    .is-home .opening-copy .eyebrow-ornament::before { animation:home-rule-breathe 5s ease-in-out infinite; }
    .is-home .service-item i { transition:transform .35s ease; }
    .is-home .service-item:hover i { transform:translateY(-3px) rotate(-8deg); }
    .is-home .opening-actions .btn { transition:box-shadow .3s ease,background-color .3s ease; }
    .is-home .opening-actions .btn:hover { box-shadow:0 8px 24px -10px rgba(228,211,184,.6); }
    @keyframes home-orbit-breathe { 50%{transform:scale(1.25);opacity:.3} }
    @keyframes home-rule-breathe { 50%{transform:scaleX(.65);opacity:.5} }
}
.maintenance-preview { display:flex; align-items:center; justify-content:center; flex-wrap:wrap; gap:12px 24px; padding:10px 20px; background:#e8d9bd; color:#172c3e; font-size:13px; border-bottom:1px solid #cdb28b; }
.maintenance-preview form { margin:0; }
.maintenance-preview button { border:1px solid #172c3e; border-radius:6px; padding:5px 12px; background:#172c3e; color:#fff; cursor:pointer; font:inherit; }
.maintenance-preview a { text-decoration:underline; text-underline-offset:4px; }
.nav-actions .account-shortcut.has-account-name { width:auto; padding-inline:12px; display:flex; gap:8px; }
.account-shortcut span { max-width:130px; white-space:nowrap; overflow:hidden; text-overflow:ellipsis; font-size:13px; }
@media(max-width:560px){.account-shortcut span{max-width:76px;font-size:12px}.maintenance-preview{font-size:12px;gap:8px 12px}}
@media(prefers-reduced-motion:no-preference){
    .opening-copy { animation:enterprise-arrive .65s ease-out both; }
    .opening-feature { animation:enterprise-arrive .85s ease-out both; }
    .opening-feature .book-object { animation:enterprise-book-drift 8s ease-in-out 1s infinite; }
    .category-item i { transition:transform .3s ease; }
    .category-item:hover i { transform:translateY(-4px) rotate(-6deg); }
    .book-card .book-cover { transition:background-color .3s ease; }
    .book-card:hover .book-cover { background:var(--border); }
    .footer-social a { transition:transform .25s ease; }
    .footer-social a:hover { transform:translateY(-3px); }
    @keyframes enterprise-arrive { from{opacity:0;transform:translateY(14px)}to{opacity:1;transform:none} }
    @keyframes enterprise-book-drift { 50%{transform:translateY(-5px)} }
}
body { font-weight: 400; line-height: 1.8; }
h1, h2, h3, .display { font-family: var(--font-display); line-height: 1.45; font-weight: 700; }
button, input, select, textarea { letter-spacing: normal; }
::selection { background: #DFD0B9; color: #142536; }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 4px; }
.section-space { padding-block: clamp(48px, 6vw, 88px); }
.section-title { font-size: clamp(1.65rem, 2.6vw, 2.4rem); line-height: 1.5; }
.section-head { border-bottom-color: var(--border); padding-bottom: 22px; margin-bottom: 32px; }
.eyebrow-ornament, .section-eyebrow { font-size: 12px; font-weight: 700; letter-spacing: 0; color: var(--accent); }
.eyebrow-ornament::before { width: 24px; height: 2px; }
.link-arrow { font-size: 14px; font-weight: 500; padding-bottom: 5px; border-color: var(--border-strong); }
.link-arrow:hover { color: var(--accent); border-color: var(--accent); }

/* Quiet navigation and controls. */
.top-bar { background: var(--ink); padding-block: 6px; font-size: 12px; }
.top-bar a { opacity: .9; }
.top-bar a i, .top-contact i { color: #D6BA90 !important; }
.header { background: var(--surface-glass); }
.nav-container { height: 84px; }
.logo .logo-text { font-family: var(--font-body); font-size: 25px; font-weight: 800; }
.logo .logo-text b { color: var(--accent); }
.logo-lockup small { font-size: 10px; letter-spacing: 0; font-weight: 500; }
.nav-links a { font-size: 14px; font-weight: 500; }
.nav-links a.active { font-weight: 700; }
.nav-icon-btn, .cart-icon { border-radius: 10px; background: var(--surface); border-color: var(--border); }
.shop-bar { background: var(--surface); }
.shop-bar-inner { padding-block: 14px; }
.shop-search { background: var(--bg-color); border-radius: 10px; }
.shop-search:focus-within { border-color: var(--accent); box-shadow: 0 0 0 3px var(--accent-light); }
.shop-search input { font-size: 14px; }
.cat-menu-btn { background: var(--surface); border: 1px solid var(--border); border-radius: 10px; font-weight: 500; font-size: 14px; }
.cat-menu-btn i:first-child { color: var(--accent); }
.cat-menu-panel { border-radius: 12px; padding: 10px; }
.btn { border-radius: 9px; font-weight: 700; font-size: 14px; letter-spacing: 0; box-shadow: 0 3px 7px rgba(15,31,46,.06); }
.btn-lg { min-height: 54px; padding: 16px 28px; font-size: 15px; }
.btn-gold { background: var(--ink); border-color: var(--ink); color: #fff; }
.btn-gold:hover { background: var(--ink-3); border-color: var(--ink-3); }
.btn-outline, .btn-ghost { box-shadow: none; }
.btn-outline { border-color: var(--border-strong); }

/* Signature opening: ink, warm paper, and a bronze rule. */
.home-opening { background: var(--ink); color: #F7F5F0; padding-block: clamp(44px, 6vw, 80px); position: relative; overflow: hidden; }
.home-opening::before { content: ""; position: absolute; inset-block: 0; inset-inline-end: 0; width: 32%; background: rgba(255,255,255,.025); border-inline-start: 1px solid rgba(255,255,255,.07); pointer-events: none; }
.opening-grid { position: relative; gap: clamp(32px, 7vw, 100px); }
.opening-copy .eyebrow-ornament { color: #D6BA90; }
.opening-copy h1 { font-family: var(--font-display); font-size: clamp(2.3rem, 4vw, 3.9rem); line-height: 1.5; font-weight: 700; max-width: 17ch; margin: 20px 0 22px; }
.opening-lead { color: #C4CED7; font-size: 17px; line-height: 2; max-width: 46ch; }
.opening-actions { margin-top: 30px; }
.opening-actions .btn-gold { background: #E4D3B8; border-color: #E4D3B8; color: #142536; box-shadow: none; }
.opening-actions .btn-gold:hover { background: #F1E6D5; border-color: #F1E6D5; }
.opening-actions .link-arrow { color: #F7F5F0; border-color: #657381; }
.opening-actions .link-arrow i { color: #D6BA90; }
.opening-publish { color: #C4CED7; font-size: 13px; }
.opening-publish:hover { color: #E4D3B8; }
.opening-feature { background: #EEEAE1; border-radius: 14px; padding: 36px 28px 26px; gap: 28px; border: 1px solid #D9D0C2; box-shadow: 0 24px 60px -30px rgba(0,0,0,.5); }
.opening-feature .eyebrow-ornament { color: #80603C; }
.opening-book-title { color: #182B3B; font-family: var(--font-literary); font-size: 1.65rem; }
.opening-author { color: #59636C; font-size: 14px; }
.opening-cover .book-object { width: clamp(180px, 20vw, 260px); }
.services-band { background: var(--surface); }
.service-item { padding: 24px 20px; }
.service-item i { color: var(--accent); font-size: 22px; }
.service-item h3 { font-size: 14px; font-weight: 700; }
.service-item p { font-size: 12px; }

/* Books keep their literary identity inside a consistent product frame. */
.books-grid { gap: 28px 24px; }
.book-card { border: 1px solid var(--border); background: var(--surface); border-radius: 13px; overflow: hidden; padding: 8px; box-shadow: var(--shadow-sm); transition: border-color .2s ease, box-shadow .2s ease; }
.book-card:hover { border: 1px solid var(--border-strong); box-shadow: var(--shadow); transform: none; }
.book-card .book-cover { background: var(--surface-2); border-radius: 8px; padding: 30px 20% 32px; }
.book-card .book-info { padding: 16px 10px 8px; gap: 6px; }
.book-card .book-title { font-family: var(--font-literary); font-size: 1.3rem; line-height: 1.5; min-height: 3em; }
.book-category { color: var(--accent); font-size: 11px; letter-spacing: 0; }
.book-author { color: var(--text-light); font-size: 13px; margin-bottom: 8px; }
.book-card .book-footer { padding-top: 12px; }
.book-card .price-now { font-size: 15px; font-weight: 700; }
.book-card .add-to-cart-btn { background: var(--ink); color: #fff; border-radius: 9px; width: 40px; height: 40px; }
.book-card:hover .add-to-cart-btn { background: var(--ink); color: #fff; }
.book-card .add-to-cart-btn:hover { background: var(--accent-hover); }
.book-ribbon, html[dir="rtl"] .book-ribbon, html[dir="ltr"] .book-ribbon { border-radius: 5px; font-size: 10px; }
.book-card .quick-btn { background: var(--surface); border-radius: 8px; }
.book-object .gen-cover-title { font-family: var(--font-literary); }
.spotlight { background: var(--ink); }
.spotlight::before { background: rgba(255,255,255,.04); border-inline-end: 1px solid rgba(255,255,255,.08); }
.spotlight-title { font-family: var(--font-literary); font-size: clamp(2.4rem, 4vw, 4rem); line-height: 1.45; }
.spotlight-copy .eyebrow-ornament { color: #D6BA90; }
.spotlight .btn-gold { background: #E4D3B8; color: #142536; border-color: #E4D3B8; }
.spotlight .btn-gold:hover { background: #F1E6D5; border-color: #F1E6D5; }
.spotlight-price .price-now { font-family: var(--font-body); font-size: 1.7rem; }

/* Supporting sections, forms, and page furniture. */
.categories-grid { gap: 16px; border: 0; }
.category-item, .categories-stage .category-item { border: 1px solid var(--border); border-radius: 12px; background: var(--surface); --swatch: var(--accent); }
.category-item + .category-item { border-inline-start: 1px solid var(--border); }
.category-item:nth-child(n) { --swatch: var(--accent); }
.category-item::before { display: none; }
.category-item:hover { background: var(--surface-2); border-color: var(--border-strong); color: var(--text); }
.category-item i { color: var(--accent); }
.category-item:hover i, .category-item:hover h3 { color: var(--text); }
.category-index, .category-item:hover .category-index { color: var(--text-light); font-family: var(--font-body); font-size: 24px; }
.category-count, .category-item:hover .category-count { color: var(--text-light); }
.category-item h3 { font-size: 17px; }
.quote-card { border: 1px solid var(--border); border-radius: 12px; background: var(--surface); box-shadow: var(--shadow-sm); }
.quote-card blockquote { font-family: var(--font-literary); font-size: 1.4rem; line-height: 1.8; }
.page-header h1, .book-hero h1 { line-height: 1.5; }
.page-header { border-bottom: 1px solid var(--border); }
.breadcrumbs { font-size: 12px; }
input:not([type="checkbox"]):not([type="radio"]):not([type="range"]):not([type="submit"]), select, textarea { accent-color: var(--accent); }
.form-control, .form-group input, .form-group select, .form-group textarea { border-radius: 9px; border-color: var(--border-strong); background-color: var(--surface); }
.form-control:focus, .form-group input:focus, .form-group select:focus, .form-group textarea:focus { border-color: var(--accent); box-shadow: 0 0 0 3px var(--accent-light); }
.newsletter-section { background: var(--surface-2); border-top: 1px solid var(--border); }
.newsletter-section h2 { font-family: var(--font-display); }
.footer { background: var(--ink); }
.footer-logo { font-family: var(--font-display); }
.footer-logo span { color: #D6BA90; }
.footer-links h4 { font-size: 15px; font-weight: 700; }
.footer-links a, .footer-note { font-size: 14px; }
.footer-bottom { color: #B9C5CE; font-size: 12px; }

[data-theme="dark"] .btn.btn-gold { background: #D9C4A3; color: #142536; border-color: #D9C4A3; }
[data-theme="dark"] .btn.btn-gold:hover { background: #EADCC6; border-color: #EADCC6; }
[data-theme="dark"] .book-card .add-to-cart-btn { background: var(--surface-2); color: var(--text); border: 1px solid var(--border-strong); }
[data-theme="dark"] .book-card .add-to-cart-btn:hover { background: var(--accent); color: #142536; }
[data-theme="dark"] .opening-feature { background: #1E3040; border-color: #3A4B59; }
[data-theme="dark"] .opening-book-title { color: #F3F0E9; }
[data-theme="dark"] .opening-author { color: #B8C5CE; }
[data-theme="dark"] .opening-feature .eyebrow-ornament { color: #D6BA90; }

@media (max-width: 992px) {
    .nav-container { height: 72px; }
    .nav-links a { padding: 12px 16px; font-size: 16px; }
    .opening-copy h1 { font-size: clamp(2rem, 4.2vw, 3rem); }
}
@media (max-width: 560px) {
    .home-opening { padding-block: 36px; }
    .opening-grid { gap: 30px; }
    .opening-copy h1 { font-size: 2.15rem; line-height: 1.5; margin-block: 14px 18px; }
    .opening-lead { font-size: 15px; line-height: 1.95; }
    .opening-actions { gap: 20px; margin-top: 24px; }
    .opening-feature { max-width: 360px; padding: 26px 20px 20px; border-radius: 12px; gap: 22px; }
    .opening-cover .book-object { width: 170px; }
    .opening-book-title { font-size: 1.45rem; }
    .books-grid { gap: 20px 12px; }
    .book-card { padding: 5px; border-radius: 10px; }
    .book-card .book-cover { padding: 26px 15% 30px; border-radius: 6px; }
    .book-card .book-info { padding: 12px 5px 6px; }
    .book-card .book-title { font-size: 1.15rem; }
    .book-card .price-now { font-size: 13px; }
    .book-card .add-to-cart-btn { width: 36px; height: 36px; }
    .section-head { gap: 12px; align-items: center; }
    .section-head .link-arrow { font-size: 12px; }
    .section-title { font-size: 1.55rem; }
    .categories-grid { gap: 10px; }
    .category-item h3 { font-size: 15px; }
    .shop-bar-inner { gap: 12px; padding-block: 10px; }
    .sticky-add-to-cart.visible { bottom: calc(64px + env(safe-area-inset-bottom)); }
    .sticky-add-to-cart { padding-block: 12px; }
}
@media (prefers-reduced-motion: reduce) {
    .book-card, .opening-feature, .btn { transition: none; }
}
