:root {
  --ink: #14263D;
  --muted: #5E6875;
  --gold: #C9A45D;
  --gold-light: #DDC891;
  --cream: #FAF9F6;
  --sand: #F1EFE9;
  --white: #FFFFFF;
  --line: #E5E2DB;
  --danger: #963E42;
  --good: #28644D;
  --shadow: 0 18px 48px rgba(20, 38, 61, .10);
}

html { scroll-padding-top: 90px; }
body { background: var(--cream); color: var(--ink); overflow-x: hidden; }
button, a, input, select, textarea { -webkit-tap-highlight-color: transparent; }
a:focus-visible, button:focus-visible, input:focus-visible, select:focus-visible, textarea:focus-visible {
  outline: 3px solid var(--gold);
  outline-offset: 3px;
}
.wrap { width: min(1220px, calc(100% - 64px)); }
.overline { color: #96763F; letter-spacing: .18em; }
.section { padding: clamp(68px, 8vw, 104px) 0; }
.section.soft { background: var(--sand); }
.section.dark { background: var(--ink); }

.btn {
  min-height: 44px;
  border-color: var(--ink);
  border-radius: 2px;
  background: var(--ink);
  padding: 12px 20px;
  letter-spacing: .075em;
}
.btn:hover { background: #203B5B; border-color: #203B5B; }
.btn.outline { background: transparent; color: var(--ink); }
.btn.outline:hover { background: var(--ink); color: #fff; }
.btn.gold { background: var(--gold); border-color: var(--gold); color: #14263D; }
.btn.gold:hover { background: #D6B872; border-color: #D6B872; }
.btn.light { color: var(--ink); }
.btn.sm { min-height: 38px; }
.link { color: #86662F; }

.site-header {
  background: rgba(250, 249, 246, .97);
  border-color: var(--line);
}
.header-inner { min-height: 78px; }
.brand {
  color: var(--ink);
  font-size: clamp(18px, 2vw, 23px);
  letter-spacing: .015em;
  text-transform: uppercase;
}
.brand small { color: #96763F; font-size: 8px; letter-spacing: .17em; }
.nav { gap: clamp(12px, 1.65vw, 23px); }
.nav a, .nav button { color: var(--ink); }
.menu-toggle {
  width: 42px;
  height: 42px;
  display: none;
  place-items: center;
  border: 1px solid var(--line);
  border-radius: 2px;
  color: var(--ink);
}
.menu-toggle svg { width: 21px; height: 21px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; }

.hero { background: var(--cream); }
.hero-grid {
  grid-template-columns: minmax(0, 1.04fr) minmax(0, .96fr);
  min-height: 620px;
  gap: clamp(32px, 6vw, 82px);
}
.hero-copy { padding: 82px 0 80px; }
.hero-copy .overline { margin-bottom: 23px; }
.hero-copy h1 {
  max-width: 610px;
  margin-bottom: 23px;
  color: var(--ink);
  font-size: clamp(48px, 5.6vw, 76px);
  line-height: 1.04;
  letter-spacing: -.045em;
}
.hero-copy .lead { max-width: 500px; font-size: 17px; line-height: 1.8; }
.hero-cta { gap: 12px; margin-top: 29px; }
.hero-verse {
  max-width: 430px;
  margin-top: 38px;
  border-color: var(--gold);
  color: #536071;
  line-height: 1.65;
}
.hero-visual {
  height: 610px;
  align-self: end;
  padding-top: 22px;
}
.hero-visual::before, .hero-stamp { display: none; }
.hero-visual img {
  width: 100%;
  height: 100%;
  max-height: 588px;
  clip-path: none;
  border-radius: 2px 2px 0 0;
  filter: none;
  object-fit: cover;
  object-position: center 20%;
}

.quicklinks { background: var(--cream); border: 0; }
.quickgrid { gap: 13px; padding: 22px 0 28px; }
.quicktile {
  min-width: 0;
  min-height: 90px;
  gap: 14px;
  padding: 16px 18px;
  border: 1px solid var(--line);
  border-radius: 2px;
  background: #fff;
}
.quicktile:last-child { border-right: 1px solid var(--line); }
.quicktile:hover { background: #fff; border-color: var(--gold); box-shadow: 0 8px 22px rgba(20, 38, 61, .07); }
.quick-icon {
  width: 25px;
  height: 25px;
  flex: 0 0 25px;
  color: var(--gold);
  fill: none;
  stroke: currentColor;
  stroke-width: 1.7;
  stroke-linecap: round;
  stroke-linejoin: round;
}
.quicktile strong { color: var(--ink); font: 700 14px/1.35 Georgia, "Times New Roman", serif; }
.quicktile small { display: block; margin-top: 4px; font-size: 11px; line-height: 1.45; }

.split-heading { margin-bottom: 35px; }
.split-heading h2 { color: var(--ink); }
.book-grid { gap: 20px; }
.book-card {
  display: flex;
  min-width: 0;
  flex-direction: column;
  border-color: var(--line);
  border-radius: 2px;
  background: #fff;
}
.book-card:hover { box-shadow: var(--shadow); }
.book-image {
  height: 285px;
  padding: 18px;
  background: #F5F3EE;
}
.book-image img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  box-shadow: none;
}
.book-details { display: flex; flex: 1; flex-direction: column; padding: 18px 19px 20px; }
.book-details .overline { font-size: 9px; }
.book-details h3 { min-height: 48px; margin: 9px 0 4px; font-size: 19px; }
.book-details p.book-author { margin-bottom: 17px; font-size: 12px; }
.book-card-footer { display: flex; flex-direction: column; align-items: flex-start; gap: 12px; margin-top: auto; }
.book-card-footer .badge { border-radius: 2px; }
.book-card-footer .btn { width: 100%; }

.about-layout { gap: clamp(42px, 8vw, 96px); }
.about-photo { isolation: isolate; height: clamp(390px, 44vw, 530px); }
.about-photo img { position: relative; z-index: 1; width: 92%; height: 96%; object-fit: cover; object-position: center 18%; }
.about-photo::after { inset: 25px 1% -12px 22px; }
.about-copy h2 { color: var(--ink); }
.about-copy p { font-size: 15px; line-height: 1.85; }
.quote-line { color: var(--ink); font-size: 21px; line-height: 1.45; }
.factrow { grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 13px; }
.factrow strong { color: var(--ink); }

.word-layout, .services-grid { gap: 18px; }
.word-card, .service-card {
  min-width: 0;
  border: 1px solid var(--line);
  border-radius: 2px;
  background: #fff;
}
.word-card { min-height: 275px; padding: 27px; }
.word-card h3, .service-card h3 { color: var(--ink); }
.word-card p, .service-card p { line-height: 1.7; }
.verse-card { background: var(--ink); color: #fff; }
.verse-card h3 { color: #fff; }
.verse-card p { color: #E2E6EB; }
.verse-card .overline, .verse-card .link { color: var(--gold-light); }
.service-card { min-height: 285px; padding: 29px; }
.service-card .number { color: #9A7A43; }
.service-card .link { align-self: flex-start; text-align: left; }

.invite { background: var(--ink); }
.invite-image { min-height: 410px; }
.invite-image img { object-position: center 18%; }
.invite-copy h2 { color: #fff; }
.invite-copy p { color: #D5DBE2; }
.invite-copy .overline { color: var(--gold-light); }
.footer { background: #102035; }
.footer h4 { color: var(--gold-light); }
.footer .brand { color: #fff; }
.footer .brand small { color: var(--gold-light); }
.footer .btn.light { color: var(--ink); }
.whatsapp { background: var(--ink); border: 1px solid rgba(255,255,255,.22); }
.whatsapp:hover { background: #203B5B; }

.library-intro { padding: 66px 0; background: var(--sand); }
.library-intro .wrap { max-width: 900px; }
.library-intro h1 { color: var(--ink); }
.library-intro p { font-size: 15px; line-height: 1.75; }
.filterbar { gap: 9px; }
.pill { border-radius: 2px; }
.pill.active, .pill:hover { border-color: var(--ink); background: var(--ink); }
.badge { border-radius: 2px; }
.modal-scrim { background: rgba(10, 23, 39, .72); }
.modal { border: 1px solid var(--line); border-radius: 2px; }
.modal h2 { color: var(--ink); }
.field input, .field textarea, .field select, .search-input { border-radius: 2px; }
.field input:focus, .field textarea:focus, .field select:focus { border-color: var(--gold); box-shadow: 0 0 0 3px rgba(201, 164, 93, .16); }
.hint { background: #F6F2E8; border-left-color: var(--gold); color: #465365; }
.book-modal-cover { object-fit: contain; }
.text-body { color: #354356; }

.admin-view { background: #F5F6F8; }
.admin-sidebar { background: var(--ink); }
.admin-menu button:hover, .admin-menu button.active { background: #263D58; }
.admin-top h1 { color: var(--ink); }
.admin-box, .stat { border-color: var(--line); border-radius: 2px; }
.data-table th { background: #F2F1ED; color: #4E5D70; }
.stat b { color: var(--ink); }
.admin-file { background: var(--cream); }

.about-gallery {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 16px;
  padding: 0 0 76px;
}
.about-gallery img {
  width: 100%;
  height: 300px;
  border-radius: 2px;
  object-fit: cover;
  object-position: center 20%;
}
.contact-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 245px), 1fr));
  gap: 18px;
  max-width: 940px;
  margin: 0 auto;
}
.contact-grid .service-card { min-height: 240px; }

@media (max-width: 1020px) {
  .header-inner { gap: 16px; }
  .menu-toggle { display: grid; }
  .nav {
    position: absolute;
    top: calc(100% - 1px);
    right: 18px;
    left: 18px;
    display: none;
    align-items: stretch;
    gap: 0;
    padding: 8px 18px;
    border: 1px solid var(--line);
    background: #fff;
    box-shadow: var(--shadow);
  }
  .nav.open { display: flex; flex-direction: column; }
  .nav a { padding: 13px 4px; border-bottom: 1px solid var(--line); font-size: 11px; }
  .nav a:last-child { border-bottom: 0; }
  .hero-grid { min-height: 560px; gap: 35px; }
  .hero-visual { height: 540px; }
  .quickgrid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .quicktile:nth-child(2) { border-right: 1px solid var(--line); }
  .quicktile:nth-child(-n+2) { border-bottom: 1px solid var(--line); }
  .book-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .about-layout { gap: 40px; }
  .admin-view { grid-template-columns: 205px minmax(0, 1fr); }
}

@media (max-width: 760px) {
  .wrap { width: min(100% - 36px, 1220px); }
  .header-inner { height: 70px; min-height: 70px; }
  .header-action { gap: 7px; }
  .header-action .btn { display: inline-flex; }
  .header-action .btn:not(.outline) { display: none; }
  .hero-grid { grid-template-columns: minmax(0, 1fr); gap: 0; min-height: 0; }
  .hero-copy { padding: 56px 0 24px; }
  .hero-copy h1 { max-width: 580px; font-size: clamp(44px, 10vw, 64px); }
  .hero-copy .lead { font-size: 15px; }
  .hero-verse { margin-top: 27px; font-size: 14px; }
  .hero-visual { width: min(100%, 460px); height: auto; aspect-ratio: 4 / 5; margin: 0 auto; padding: 0; }
  .hero-visual img { max-height: none; object-position: center 20%; }
  .book-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 13px; }
  .book-image { height: clamp(170px, 45vw, 245px); padding: 10px; }
  .book-details { padding: 13px; }
  .book-details h3 { min-height: 0; font-size: 17px; }
  .book-card-footer .btn { padding-inline: 8px; font-size: 9px; }
  .about-layout { display: flex; flex-direction: column; align-items: stretch; gap: 34px; }
  .about-photo { width: min(100%, 460px); height: auto; aspect-ratio: 4 / 5; margin: 0 auto; }
  .about-photo img { width: 94%; height: 96%; }
  .about-gallery { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; padding-bottom: 55px; }
  .about-gallery img { height: 220px; }
  .word-layout, .services-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .word-card, .service-card { min-height: 0; padding: 21px; }
  .invite { grid-template-columns: minmax(0, 1fr); }
  .invite-image { height: auto; min-height: 0; aspect-ratio: 4 / 3; }
  .invite-copy { padding: 42px 24px; }
  .foot-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 25px; }
  .admin-view { display: block; }
  .admin-sidebar { position: sticky; z-index: 18; top: 0; height: auto; padding: 10px 12px; }
  .admin-sidebar .brand { display: none; }
  .admin-menu { display: flex; overflow-x: auto; gap: 4px; }
  .admin-menu button { flex: 0 0 auto; white-space: nowrap; padding: 9px 10px; }
  .admin-return { display: none; }
  .admin-main { padding: 23px 16px 42px; }
  .admin-top { align-items: flex-start; }
}

@media (max-width: 460px) {
  .wrap { width: calc(100% - 32px); }
  .brand { max-width: 195px; font-size: 16px; white-space: normal; }
  .brand small { font-size: 7px; }
  .hero-copy { padding-top: 42px; }
  .hero-copy h1 { font-size: clamp(42px, 12vw, 54px); }
  .hero-cta { gap: 9px; }
  .hero-cta .btn { flex: 1 1 auto; padding-inline: 11px; font-size: 10px; }
  .quickgrid { gap: 9px; padding: 16px 0 22px; }
  .quicktile { min-height: 83px; gap: 10px; padding: 12px 10px; }
  .quick-icon { width: 22px; height: 22px; flex-basis: 22px; }
  .quicktile strong { font-size: 12px; }
  .quicktile small { font-size: 10px; }
  .book-grid { gap: 10px; }
  .book-image { height: 175px; padding: 8px; }
  .book-details { padding: 11px 10px 12px; }
  .book-details .overline { letter-spacing: .1em; }
  .book-details h3 { font-size: 15px; line-height: 1.25; }
  .book-details p.book-author { font-size: 10px; }
  .book-card-footer { gap: 9px; }
  .book-card-footer .badge { font-size: 9px; }
  .book-card-footer .btn { min-height: 38px; font-size: 8px; letter-spacing: .03em; }
  .word-layout, .services-grid { grid-template-columns: minmax(0, 1fr); }
  .foot-grid { gap: 22px 15px; }
  .copyright { display: grid; gap: 8px; }
  .formcols, .book-modal-grid, .settings-grid { grid-template-columns: minmax(0, 1fr); }
  .modal { padding: 26px 18px; }
  .modal h2 { font-size: 31px; }
  .stat-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 9px; }
  .stat { padding: 13px; }
  .stat b { font-size: 25px; }
  .admin-top { flex-wrap: wrap; }
  .admin-top h1 { font-size: 31px; }
  .admin-box { padding: 14px; }
  .about-gallery img { height: 175px; }
  .whatsapp { right: 12px; bottom: 14px; }
}

@media (max-width: 360px) {
  .header-action .btn { padding-inline: 8px; font-size: 9px; }
  .quicktile { gap: 8px; padding-inline: 8px; }
  .quicktile small { font-size: 9px; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { scroll-behavior: auto !important; transition-duration: .01ms !important; animation-duration: .01ms !important; animation-iteration-count: 1 !important; }
}
