/* Inara Library. Colours taken from the storefront logo. */

:root {
  --cream:      #FBF4EE;
  --cream-deep: #F4E9DE;
  --paper:      #FFFCF9;
  --ink:        #2E1F16;
  --muted:      #6E5B4E;
  --plum:       #8C545B;
  --plum-deep:  #6F3B45;
  --sage:       #6A6345;
  --sage-soft:  #8E8A6E;
  --gold:       #C9A24A;
  --pink:       #D9A0A8;
  --rule:       #E4D5C6;
  --shadow:     0 1px 2px rgba(46,31,22,.06), 0 12px 28px rgba(46,31,22,.09);
  --shadow-lift:0 2px 4px rgba(46,31,22,.08), 0 22px 48px rgba(46,31,22,.14);
  --measure:    62ch;
  --display: "Cormorant Garamond", Georgia, "Times New Roman", serif;
  --body: "Karla", -apple-system, BlinkMacSystemFont, "Segoe UI", Helvetica, Arial, sans-serif;
  --script: "Noto Serif Gurmukhi", "Noto Serif Devanagari", "Noto Serif Gujarati",
            "Sama Gurmukhi", "Gurmukhi MN", "Devanagari MT", "Gujarati MT", serif;
}

*, *::before, *::after { box-sizing: border-box; }

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

body {
  margin: 0;
  background: var(--cream);
  color: var(--ink);
  font-family: var(--body);
  font-size: 17px;
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
}

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

a { color: var(--plum-deep); text-underline-offset: 3px; text-decoration-thickness: 1px; }
a:hover { color: var(--plum); }

h1, h2, h3, h4 {
  font-family: var(--display);
  font-weight: 600;
  line-height: 1.12;
  letter-spacing: -0.01em;
  color: var(--ink);
  margin: 0 0 .5em;
}
h1 { font-size: clamp(2.4rem, 6vw, 4rem); }
h2 { font-size: clamp(1.9rem, 4vw, 2.8rem); }
h3 { font-size: 1.35rem; }
p { margin: 0 0 1.1em; max-width: var(--measure); }

.script { font-family: var(--script); line-height: 1.9; }

/* ---------- layout ---------- */

.wrap { width: min(1140px, 100% - 3rem); margin-inline: auto; }
.narrow { width: min(720px, 100% - 3rem); margin-inline: auto; }

section { padding: clamp(3.5rem, 8vw, 6.5rem) 0; }
section + section { padding-top: 0; }
.band { background: var(--cream-deep); }
.band + section { padding-top: clamp(3.5rem, 8vw, 6.5rem); }

.eyebrow {
  font-family: var(--body);
  font-size: .74rem;
  font-weight: 700;
  letter-spacing: .18em;
  text-transform: uppercase;
  color: var(--sage);
  margin: 0 0 1rem;
}

.lede { font-size: 1.2rem; color: var(--muted); }

/* ---------- header ---------- */

.site-header {
  position: sticky; top: 0; z-index: 40;
  background: rgba(251, 244, 238, .92);
  backdrop-filter: saturate(180%) blur(12px);
  border-bottom: 1px solid var(--rule);
}
.site-header .wrap {
  display: flex; align-items: center; gap: 1.5rem;
  min-height: 74px;
}
.brand { display: flex; align-items: center; gap: .7rem; text-decoration: none; color: inherit; margin-right: auto; }
.brand img { width: 44px; height: 44px; border-radius: 50%; }
.brand-name { font-family: var(--display); font-size: 1.5rem; font-weight: 600; letter-spacing: .01em; color: var(--plum-deep); line-height: 1; }
.brand-sub { font-size: .64rem; letter-spacing: .18em; text-transform: uppercase; color: var(--sage); }

.nav { display: flex; align-items: center; gap: 1.6rem; }
.nav a { font-size: .95rem; text-decoration: none; color: var(--ink); }
.nav a:hover, .nav a[aria-current="page"] { color: var(--plum); }
.nav a[aria-current="page"] { font-weight: 700; }

.nav-toggle { display: none; }

/* ---------- buttons ---------- */

.btn {
  display: inline-block;
  font-family: var(--body); font-size: .97rem; font-weight: 700;
  padding: .8rem 1.5rem; border-radius: 999px;
  text-decoration: none; border: 1.5px solid transparent;
  transition: transform .15s ease, box-shadow .15s ease, background .15s ease;
}
.btn:hover { transform: translateY(-1px); }
.btn-primary { background: var(--plum-deep); color: var(--cream); box-shadow: var(--shadow); }
.btn-primary:hover { background: var(--plum); color: var(--cream); }
.btn-ghost { border-color: var(--plum-deep); color: var(--plum-deep); }
.btn-ghost:hover { background: rgba(140,84,91,.08); }
.btn-small { padding: .55rem 1.05rem; font-size: .88rem; }
.btn-row { display: flex; flex-wrap: wrap; gap: .8rem; margin-top: 2rem; }

/* ---------- hero ---------- */

.hero { padding-top: clamp(3rem, 7vw, 5rem); }
.hero-grid { display: grid; grid-template-columns: 1.05fr .95fr; gap: clamp(2rem, 5vw, 4.5rem); align-items: center; }
.hero h1 { margin-bottom: .3em; }
.hero .lede { font-size: 1.25rem; }
.hero-motto { font-family: var(--display); font-style: italic; font-size: 1.1rem; color: var(--sage); margin-bottom: 1rem; }

.cover-fan { position: relative; display: flex; justify-content: center; align-items: center; }
.cover-fan img {
  width: 40%; border-radius: 3px; box-shadow: var(--shadow-lift);
  transition: transform .3s ease;
}
.cover-fan img:nth-child(1) { transform: rotate(-7deg) translate(30%, 4%) scale(.86); z-index: 1; }
.cover-fan img:nth-child(2) { width: 44%; z-index: 3; }
.cover-fan img:nth-child(3) { transform: rotate(7deg) translate(-30%, 4%) scale(.86); z-index: 1; }
.cover-fan img:nth-child(1):hover { transform: rotate(-7deg) translate(30%, -2%) scale(.92); z-index: 5; }
.cover-fan img:nth-child(2):hover { transform: translateY(-8px) scale(1.04); }
.cover-fan img:nth-child(3):hover { transform: rotate(7deg) translate(-30%, -2%) scale(.92); z-index: 5; }

/* ---------- the three lines sample ---------- */

.sample {
  background: var(--paper);
  border: 1px solid var(--rule);
  border-radius: 14px;
  padding: 2rem 2.2rem;
  box-shadow: var(--shadow);
  max-width: var(--measure);
}
.sample .line { padding: .55rem 0; border-bottom: 1px dashed var(--rule); }
.sample .line:last-of-type { border-bottom: 0; }
.sample .tag {
  font-size: .68rem; letter-spacing: .16em; text-transform: uppercase;
  color: var(--sage); display: block; margin-bottom: .15rem;
}
.sample .l1 { font-family: var(--script); font-size: 1.5rem; color: var(--ink); }
.sample .l2 { font-family: var(--display); font-style: italic; font-size: 1.3rem; color: var(--plum-deep); }
.sample .l3 { font-size: 1.05rem; color: var(--muted); }
.sample .caption { font-size: .82rem; color: var(--sage-soft); margin: 1.2rem 0 0; }

.tip {
  border-left: 3px solid var(--gold);
  padding: .2rem 0 .2rem 1.3rem;
  font-family: var(--display); font-size: 1.28rem; font-style: italic;
  color: var(--ink); max-width: 54ch;
}

/* ---------- book grid ---------- */

.series { margin-bottom: clamp(3rem, 6vw, 5rem); }
.series-head { display: flex; align-items: baseline; justify-content: space-between; gap: 1rem; flex-wrap: wrap; border-bottom: 1px solid var(--rule); padding-bottom: 1rem; margin-bottom: 2.2rem; }
.series-head h2 { margin: 0; }
.series-count { font-size: .85rem; color: var(--sage); letter-spacing: .06em; }

.books { display: grid; grid-template-columns: repeat(auto-fill, minmax(210px, 1fr)); gap: clamp(1.6rem, 3vw, 2.6rem); }

.book { display: flex; flex-direction: column; }
.book a.cover-link { display: block; border-radius: 3px; overflow: hidden; box-shadow: var(--shadow); transition: transform .2s ease, box-shadow .2s ease; }
.book a.cover-link:hover { transform: translateY(-4px); box-shadow: var(--shadow-lift); }
.book .lang {
  display: inline-block; margin: 1rem 0 .35rem;
  font-size: .68rem; letter-spacing: .16em; text-transform: uppercase;
  color: var(--sage); font-weight: 700;
}
.book h3 { font-family: var(--script); font-size: 1.25rem; margin: 0 0 .15rem; line-height: 1.5; }
.book h3.latin { font-family: var(--display); line-height: 1.2; }
.book .roman { font-family: var(--display); font-style: italic; font-size: 1.05rem; color: var(--plum-deep); margin: 0 0 .35rem; }
.book .meta { font-size: .84rem; color: var(--muted); margin: 0; }

/* ---------- the shop ---------- */

/* The shop leads with the goods, so its head is smaller than a reading page. */
section.shop { padding-top: clamp(2rem, 4vw, 3rem); }
.shop h1 { font-size: clamp(1.9rem, 4vw, 2.9rem); margin-bottom: .35em; }
.shop .lede { font-size: 1.02rem; }

.shop-bar {
  display: flex; align-items: center; justify-content: space-between;
  gap: 1.2rem; flex-wrap: wrap;
  border-top: 1px solid var(--rule); border-bottom: 1px solid var(--rule);
  padding: .8rem 0; margin: 1.8rem 0 2rem;
}
.result-count { margin: 0; font-size: .92rem; color: var(--muted); }
.result-count strong { color: var(--ink); }

.chips { display: flex; flex-wrap: wrap; gap: .45rem; }
.chip {
  font: inherit; font-size: .85rem; cursor: pointer;
  padding: .38rem .9rem; border-radius: 999px;
  border: 1px solid var(--rule); background: var(--paper); color: var(--ink);
  transition: background .15s ease, border-color .15s ease, color .15s ease;
}
.chip:hover { border-color: var(--plum); color: var(--plum); }
.chip.is-on { background: var(--plum-deep); border-color: var(--plum-deep); color: var(--cream); }

.no-results { display: none; color: var(--muted); font-size: 1.05rem; }

/* The shop packs tighter than the home page, which is browsing not buying. */
.products + .series, .series:has(.products) { margin-bottom: 2.4rem; }
.series:has(.products) .series-head { padding-bottom: .7rem; margin-bottom: 1.4rem; }
.series:has(.products) .series-head h2 { font-size: clamp(1.5rem, 3vw, 2.1rem); }

/* 165px is chosen so a six edition series lands as one row at full width,
   instead of five tiles and an orphan. */
.products { display: grid; grid-template-columns: repeat(auto-fill, minmax(165px, 1fr)); gap: 1.1rem; }

.product {
  display: flex; flex-direction: column;
  background: var(--paper); border: 1px solid var(--rule); border-radius: 12px;
  overflow: hidden; transition: transform .18s ease, box-shadow .18s ease, border-color .18s ease;
}
.product:hover { transform: translateY(-3px); box-shadow: var(--shadow-lift); border-color: #DCC9B6; }
.product[hidden] { display: none; }

.p-cover {
  display: flex; align-items: center; justify-content: center;
  background: #fff; padding: .75rem; border-bottom: 1px solid var(--rule);
}
.p-cover img { width: auto; height: 152px; object-fit: contain; border-radius: 2px; box-shadow: 0 1px 7px rgba(46,31,22,.16); }

.p-body { display: flex; flex-direction: column; flex: 1; padding: .7rem .8rem .85rem; }
.p-lang {
  font-size: .58rem; letter-spacing: .14em; text-transform: uppercase;
  color: var(--sage); font-weight: 700; margin-bottom: .25rem;
}
.product h3 { font-size: .95rem; margin: 0; line-height: 1.4; }
.product h3.latin { line-height: 1.25; }
.product h3 a { color: var(--plum-deep); text-decoration: none; }
.product h3 a:hover { text-decoration: underline; }
.p-roman { font-family: var(--display); font-style: italic; font-size: .84rem; color: var(--muted); margin: .05rem 0 0; }
.p-by { font-size: .72rem; color: var(--muted); margin: .2rem 0 0; }
.p-spec { font-size: .68rem; color: var(--sage-soft); margin: .1rem 0 .6rem; }

.p-offers { display: flex; flex-direction: column; gap: .2rem; margin-bottom: .6rem; }
.p-offer {
  display: flex; align-items: baseline; justify-content: space-between; gap: .4rem;
  padding: .22rem .45rem; border: 1px solid var(--rule); border-radius: 6px;
  background: var(--cream); text-decoration: none; color: var(--ink);
}
a.p-offer:hover { border-color: var(--plum); background: #fff; }
.p-fmt { font-size: .72rem; letter-spacing: .01em; }
.p-price { font-family: var(--display); font-size: 1rem; font-weight: 600; color: var(--ink); }
.p-soon { color: var(--muted); font-style: italic; justify-content: flex-start; }

.p-cta {
  margin-top: auto; align-self: stretch; text-align: center;
  padding: .42rem .6rem; font-size: .78rem;
}

/* ---------- book detail ---------- */

.detail-grid { display: grid; grid-template-columns: minmax(240px, 340px) 1fr; gap: clamp(2rem, 5vw, 4rem); align-items: start; }
.detail-cover img { border-radius: 4px; box-shadow: var(--shadow-lift); width: 100%; }
.detail h1 { font-family: var(--script); font-size: clamp(2rem, 4.5vw, 3rem); line-height: 1.45; }
.detail h1.latin { font-family: var(--display); line-height: 1.12; }
.detail .roman-title { font-family: var(--display); font-style: italic; font-size: 1.5rem; color: var(--plum-deep); margin: -.3em 0 .2em; }
.detail .subtitle { font-size: 1.1rem; color: var(--muted); margin-bottom: 1.6rem; }

.facts { list-style: none; padding: 0; margin: 2rem 0 0; border-top: 1px solid var(--rule); }
.facts li { display: flex; gap: 1rem; padding: .65rem 0; border-bottom: 1px solid var(--rule); font-size: .92rem; }
.facts .k { flex: 0 0 8.5rem; color: var(--sage); letter-spacing: .04em; }
.facts .v { color: var(--ink); }

.also { display: flex; flex-wrap: wrap; gap: .5rem; margin-top: .8rem; }
.also a {
  font-size: .85rem; text-decoration: none; padding: .35rem .85rem;
  border: 1px solid var(--rule); border-radius: 999px; background: var(--paper); color: var(--ink);
}
.also a:hover { border-color: var(--plum); color: var(--plum); }
.also a[aria-current="page"] { background: var(--plum-deep); color: var(--cream); border-color: var(--plum-deep); }

/* ---------- cards / steps ---------- */

.cards { display: grid; grid-template-columns: repeat(auto-fit, minmax(230px, 1fr)); gap: 1.5rem; margin-top: 2.5rem; }
.card { background: var(--paper); border: 1px solid var(--rule); border-radius: 14px; padding: 1.7rem; box-shadow: var(--shadow); }
.card h3 { font-size: 1.15rem; margin-bottom: .4rem; }
.card p { font-size: .95rem; color: var(--muted); margin: 0; }
.card .num {
  font-family: var(--display); font-size: 2.2rem; color: var(--gold);
  line-height: 1; display: block; margin-bottom: .5rem;
}

.split { display: grid; grid-template-columns: 1fr 1fr; gap: clamp(2rem, 5vw, 4.5rem); align-items: center; }

/* The logo sits on the same cream the page is painted in, so it needs no card
   around it. A border or a shadow would draw a square nobody asked for. */
.logo-panel { display: flex; justify-content: center; }
.logo-panel img { width: min(100%, 470px); }

/* ---------- forms ---------- */

.form-card {
  background: var(--paper); border: 1px solid var(--rule); border-radius: 16px;
  padding: clamp(1.8rem, 4vw, 2.6rem); box-shadow: var(--shadow);
}
.field { margin-bottom: 1.1rem; }
.field label { display: block; font-size: .84rem; font-weight: 700; letter-spacing: .04em; margin-bottom: .35rem; color: var(--ink); }
.field input, .field textarea, .field select {
  width: 100%; font-family: var(--body); font-size: 1rem; color: var(--ink);
  background: var(--cream); border: 1px solid var(--rule); border-radius: 9px;
  padding: .75rem .9rem;
}
.field input:focus, .field textarea:focus, .field select:focus {
  outline: 2px solid var(--plum); outline-offset: 1px; background: #fff;
}
.field textarea { min-height: 130px; resize: vertical; }
.form-note { font-size: .88rem; color: var(--muted); }

.field-check label {
  display: flex; align-items: flex-start; gap: .6rem;
  font-weight: 400; font-size: .9rem; line-height: 1.45; cursor: pointer;
}
.field-check input { width: 1.05rem; height: 1.05rem; margin-top: .15rem; flex: none; accent-color: var(--plum-deep); }

.prose-block { margin-top: 2.6rem; }
.prose-block h2 { font-size: 1.5rem; margin-bottom: .5em; }
.hp { position: absolute; left: -9999px; }

.download-ready { display: none; margin-top: 1.4rem; padding: 1.2rem; border: 1px solid var(--sage-soft); border-radius: 12px; background: rgba(106,99,69,.07); }
.download-ready.show { display: block; }

/* ---------- colouring previews ---------- */

.sheets { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 1rem; margin-top: 2.5rem; }
.sheets img { border: 1px solid var(--rule); border-radius: 8px; background: #fff; }

/* ---------- footer ---------- */

.site-footer {
  background: var(--ink); color: var(--cream-deep);
  padding: clamp(3rem, 6vw, 4.5rem) 0 2.5rem; margin-top: clamp(3rem, 8vw, 6rem);
}
.site-footer a { color: var(--cream-deep); }
.site-footer a:hover { color: var(--gold); }
.footer-grid { display: grid; grid-template-columns: 1.4fr 1fr 1fr; gap: 2.5rem; }
.site-footer h4 { color: var(--cream); font-family: var(--body); font-size: .74rem; letter-spacing: .18em; text-transform: uppercase; margin-bottom: 1rem; }
.site-footer p { font-size: .92rem; opacity: .82; }
.site-footer ul { list-style: none; padding: 0; margin: 0; }
.site-footer li { margin-bottom: .5rem; font-size: .92rem; }
.footer-brand { font-family: var(--display); font-size: 1.8rem; color: var(--cream); margin-bottom: .3rem; }
.colophon { border-top: 1px solid rgba(251,244,238,.16); margin-top: 2.5rem; padding-top: 1.5rem; font-size: .84rem; opacity: .7; display: flex; justify-content: space-between; gap: 1rem; flex-wrap: wrap; }
.colophon p { margin: 0; }

/* ---------- responsive ---------- */

@media (max-width: 880px) {
  .hero-grid, .split, .detail-grid { grid-template-columns: 1fr; }
  .detail-cover { max-width: 280px; }
  .footer-grid { grid-template-columns: 1fr 1fr; }
  .hero-grid .cover-fan { max-width: 400px; margin: 2.5rem auto 0; }
  .cover-fan img { width: 37%; }
  .cover-fan img:nth-child(2) { width: 41%; }
}

@media (max-width: 640px) {
  body { font-size: 16px; }

  /* Two across on a phone. One column would make the catalogue a long scroll. */
  .products { grid-template-columns: repeat(2, 1fr); gap: .8rem; }
  .p-cover { padding: .55rem; }
  .p-cover img { height: 128px; }
  .p-body { padding: .6rem .65rem .7rem; }
  .product h3 { font-size: .88rem; }
  .p-roman { font-size: .78rem; }
  .p-offer { padding: .2rem .4rem; }
  .p-price { font-size: .92rem; }
  .wrap, .narrow { width: calc(100% - 2.2rem); }
  .footer-grid { grid-template-columns: 1fr; gap: 1.8rem; }
  .facts li { flex-direction: column; gap: .1rem; }
  .facts .k { flex: none; font-size: .72rem; letter-spacing: .12em; text-transform: uppercase; }

  .nav-toggle {
    display: block; background: none; border: 1px solid var(--rule);
    border-radius: 8px; padding: .45rem .7rem; font: inherit; font-size: .85rem;
    color: var(--ink); cursor: pointer;
  }
  .nav {
    display: none; position: absolute; top: 74px; left: 0; right: 0;
    flex-direction: column; align-items: flex-start; gap: 0;
    background: var(--cream); border-bottom: 1px solid var(--rule);
    padding: .5rem 1.1rem 1rem;
  }
  .nav.open { display: flex; }
  .nav a { padding: .7rem 0; width: 100%; border-bottom: 1px solid var(--rule); }
  .nav a:last-child { border-bottom: 0; }
}

@media (prefers-reduced-motion: reduce) {
  * { animation: none !important; transition: none !important; scroll-behavior: auto; }
}

@media print {
  .site-header, .site-footer, .btn { display: none; }
}
