/* Jijnāsu: the "rubric" look of the covers. Cream paper, a black key plate, a red plate printed slightly
   out of register. Motion is the press at work: plates sliding into register, ink arriving. */
:root {
  --paper: #f1e9d8;
  --paper-2: #e9dfc9;
  --ink: #000;
  --red: #a3221d;
  --display: "Cormorant Garamond", "Georgia", serif;
  --text: "Source Serif 4", "Georgia", serif;
  --deva: "Tiro Devanagari Sanskrit", serif;
  --ease: cubic-bezier(.2, .8, .2, 1);
}
* { box-sizing: border-box; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
body { margin: 0; background: var(--paper); color: var(--ink); font-family: var(--text); font-size: 18px; line-height: 1.6; overflow-x: hidden; }
::selection { background: var(--red); color: var(--paper); }
a { color: inherit; }
img { display: block; max-width: 100%; }
.red { color: var(--red); }

.grain { position: fixed; inset: -50%; z-index: 50; pointer-events: none; opacity: .11; mix-blend-mode: multiply;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='220' height='220'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.9' numOctaves='2'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E"); }
.progress { position: fixed; left: 0; top: 0; right: 0; height: 3px; z-index: 60; }
.progress i { display: block; height: 100%; width: 100%; background: var(--red); transform-origin: 0 50%; transform: scaleX(var(--p, 0)); }

.top { position: fixed; z-index: 40; top: 0; left: 0; right: 0; display: flex; align-items: center; justify-content: space-between;
  padding: 18px clamp(18px, 4vw, 56px); mix-blend-mode: multiply; }
.top-mark img { width: 34px; transition: transform .6s var(--ease); }
.top-mark:hover img { transform: rotate(-8deg) scale(1.08); }
.top nav { display: flex; gap: clamp(14px, 2.4vw, 34px); font-family: var(--display); font-size: 19px; font-weight: 600; }
.top nav a { text-decoration: none; position: relative; padding: 4px 0; }
.top nav a::after { content: ""; position: absolute; left: 0; right: 0; bottom: 0; height: 2px; background: var(--red); transform: scaleX(0); transform-origin: 100% 50%; transition: transform .45s var(--ease); }
.top nav a:hover::after { transform: scaleX(1); transform-origin: 0 50%; }

.eyebrow { font-family: var(--text); font-size: 12.5px; letter-spacing: .26em; text-transform: uppercase; margin: 0 0 1.4em; }

/* ---------- hero ---------- */
.hero { min-height: 100svh; position: relative; display: grid; align-items: center; padding: 120px clamp(18px, 6vw, 96px) 80px; overflow: hidden; }
.hero-in { position: relative; z-index: 2; max-width: 980px; }
.plate { font-family: var(--display); font-weight: 600; font-size: clamp(88px, 21vw, 330px); line-height: .82; letter-spacing: -.035em; margin: 0 0 .12em -.04em; position: relative; }
.plate span { position: relative; z-index: 2; display: inline-block; clip-path: inset(0 100% 0 0); animation: ink 1.1s var(--ease) .35s forwards; }
.plate::before { content: attr(data-text); position: absolute; left: 0; top: 0; z-index: 1; color: var(--red);
  transform: translate(.11em, .07em); opacity: 0; animation: register 1.5s var(--ease) .15s forwards; }
@keyframes ink { to { clip-path: inset(0 0 0 0); } }
@keyframes register { 0% { opacity: 0; transform: translate(.34em, .2em); } 35% { opacity: 1; } 100% { opacity: 1; transform: translate(.035em, .028em); } }
.hero-line { font-family: var(--display); font-size: clamp(30px, 4.6vw, 64px); line-height: 1.05; margin: 0 0 .5em; font-weight: 500; }
.hero-line em { color: var(--red); font-style: italic; }
.hero-sub { max-width: 34em; margin: 0 0 2em; font-size: clamp(16px, 1.35vw, 20px); }
.cta { display: inline-flex; align-items: center; gap: 14px; text-decoration: none; font-family: var(--display); font-weight: 600; font-size: 22px;
  border: 2px solid var(--ink); padding: 12px 22px 12px 26px; position: relative; overflow: hidden; transition: color .45s var(--ease); }
.cta::before { content: ""; position: absolute; inset: 0; background: var(--ink); transform: translateY(101%); transition: transform .5s var(--ease); }
.cta:hover { color: var(--paper); }
.cta:hover::before { transform: none; }
.cta span, .cta i { position: relative; font-style: normal; }
.cta i { animation: bob 1.8s ease-in-out infinite; }
@keyframes bob { 50% { transform: translateY(5px); } }
.hero-deva { position: absolute; right: clamp(8px, 3vw, 48px); top: 50%; z-index: 1; margin: 0; font-family: var(--deva); font-size: clamp(120px, 26vw, 420px);
  line-height: 1; color: transparent; -webkit-text-stroke: 1.5px var(--red); opacity: .2; transform: translateY(calc(-50% + var(--sy, 0) * -.18px)); white-space: nowrap; pointer-events: none; }
.hero-mark { position: absolute; right: clamp(18px, 7vw, 120px); bottom: clamp(60px, 12vh, 140px); width: clamp(90px, 13vw, 190px); z-index: 2;
  transform: translate(calc(var(--mx, 0) * -14px), calc(var(--my, 0) * -14px + var(--sy, 0) * .12px)) rotate(calc(var(--mx, 0) * 3deg)); transition: transform .5s var(--ease);
  animation: fade 1.2s var(--ease) 1.2s both; }
.rule-x { position: absolute; left: 0; right: 0; bottom: 34px; height: 2px; background: var(--ink); transform: scaleX(0); transform-origin: 0 50%; animation: draw 1.4s var(--ease) 1.2s forwards; }
@keyframes draw { to { transform: scaleX(1); } }
@keyframes fade { from { opacity: 0; } }
.reveal { opacity: 0; transform: translateY(26px); animation: up .9s var(--ease) var(--d, 0s) forwards; }
@keyframes up { to { opacity: 1; transform: none; } }

/* ---------- statement ---------- */
.say { padding: clamp(90px, 16vh, 200px) clamp(18px, 8vw, 150px); }
.say-text { font-family: var(--display); font-weight: 500; font-size: clamp(28px, 4.1vw, 62px); line-height: 1.16; margin: 0; max-width: 22em; }
.say-text .w { opacity: .13; transition: opacity .5s linear, color .5s linear; }
.say-text .w.on { opacity: 1; }
.say-text .w.hot { color: var(--red); }

/* ---------- shelf: vertical scroll drives a horizontal track ---------- */
.shelf { height: 520vh; position: relative; background: var(--ink); color: var(--paper); }
.shelf-pin { position: sticky; top: 0; height: 100svh; overflow: hidden; display: flex; flex-direction: column; justify-content: center; }
.shelf-head { display: flex; align-items: baseline; gap: 28px; padding: 0 clamp(18px, 6vw, 96px); margin-bottom: clamp(14px, 3vh, 36px); }
.shelf-head h2 { font-family: var(--display); font-weight: 600; font-size: clamp(40px, 6vw, 92px); line-height: 1; margin: 0; flex: 1; }
.shelf-head .eyebrow { margin: 0; color: var(--paper); opacity: .7; }
.shelf-head .red, .book .num, .status.live { color: #e2463f; }
.shelf-count { font-family: var(--display); font-size: 26px; margin: 0; }
.shelf-count b { font-weight: 600; font-size: 44px; }
.track { display: flex; gap: clamp(40px, 7vw, 130px); padding: 0 clamp(18px, 6vw, 96px); will-change: transform; }
.book { flex: 0 0 auto; display: flex; gap: clamp(20px, 3vw, 48px); align-items: center; width: min(86vw, 820px); }
.cover { flex: 0 0 auto; width: clamp(170px, 24vw, 330px); perspective: 900px; display: block; }
.cover img { width: 100%; box-shadow: 14px 14px 0 #a3221d; transform: rotateY(calc(var(--rx, 0) * 1deg)) rotateX(calc(var(--ry, 0) * 1deg)); transition: transform .5s var(--ease), box-shadow .5s var(--ease); }
.cover:hover img { box-shadow: 22px 22px 0 #a3221d; }
.book .num { font-family: var(--display); font-size: 22px; font-weight: 600; margin: 0 0 6px; letter-spacing: .08em; }
.book h3 { font-family: var(--display); font-weight: 600; font-size: clamp(28px, 3.3vw, 50px); line-height: 1; margin: 0 0 8px; }
.book h3 i { display: block; font-weight: 400; font-size: .6em; margin-top: 6px; }
.book .sub { font-style: italic; margin: 0 0 14px; opacity: .85; }
.book .desc { margin: 0 0 18px; font-size: 16.5px; max-width: 26em; opacity: .92; }
.status { display: inline-block; font-size: 12px; letter-spacing: .22em; text-transform: uppercase; margin: 0; padding: 7px 12px; border: 1.5px solid currentColor; opacity: .75; }
.status.live { opacity: 1; }

/* ---------- method ---------- */
.method { padding: clamp(90px, 15vh, 180px) clamp(18px, 6vw, 96px); }
.cols { display: grid; grid-template-columns: repeat(3, 1fr); gap: clamp(24px, 4vw, 70px); }
.col { border-top: 2px solid var(--ink); padding-top: 18px; }
.col .big { font-family: var(--display); font-weight: 600; font-size: clamp(40px, 5.4vw, 84px); line-height: 1; display: block; margin-bottom: 14px; position: relative; }
.col:hover .big { color: var(--red); transition: color .4s; }
.col p { margin: 0; max-width: 22em; }
.io { opacity: 0; transform: translateY(40px); transition: opacity 1s var(--ease), transform 1s var(--ease); transition-delay: var(--d, 0s); }
.io.in { opacity: 1; transform: none; }
.cols .col:nth-child(2) { --d: .12s; } .cols .col:nth-child(3) { --d: .24s; }

/* ---------- band ---------- */
.band { background: var(--red); color: var(--paper); overflow: hidden; padding: 18px 0; transform: rotate(-1.4deg) scale(1.03); }
.marquee { display: flex; width: max-content; animation: slide 38s linear infinite; font-family: var(--deva); font-size: clamp(30px, 4.6vw, 66px); white-space: nowrap; }
@keyframes slide { to { transform: translateX(-50%); } }

/* ---------- note + footer ---------- */
.note { text-align: center; padding: clamp(100px, 18vh, 220px) 22px clamp(70px, 12vh, 140px); }
.note img { width: 86px; margin: 0 auto 26px; }
.note h2 { font-family: var(--display); font-weight: 600; font-size: clamp(36px, 5.2vw, 76px); line-height: 1.02; margin: 0 0 .4em; }
.note p { max-width: 34em; margin: 0 auto 1.6em; }
.links { display: flex; gap: 26px; justify-content: center; font-family: var(--display); font-weight: 600; font-size: 22px; }
.links a { text-decoration-color: var(--red); text-underline-offset: 6px; text-decoration-thickness: 2px; }
.foot { display: flex; justify-content: space-between; align-items: center; gap: 16px; padding: 22px clamp(18px, 6vw, 96px); border-top: 2px solid var(--ink); font-size: 14px; }
.foot p { margin: 0; }
.foot-deva { font-family: var(--deva); font-size: 24px; color: var(--red); }

.plain { min-height: calc(100svh - 70px); display: flex; flex-direction: column; justify-content: center; }
.mail a { font-family: var(--display); font-weight: 600; font-size: clamp(26px, 4vw, 48px); text-decoration-color: var(--red); text-underline-offset: 8px; text-decoration-thickness: 2px; overflow-wrap: anywhere; }
@media (max-width: 820px) {
  .top nav a:nth-child(2), .top nav a:nth-child(3) { display: none; }
  .hero-mark { position: static; margin-top: 34px; }
  .shelf { height: auto; }
  .shelf-pin { position: static; height: auto; padding: 80px 0; }
  .track { flex-direction: column; transform: none !important; gap: 70px; }
  .book { flex-direction: column; align-items: flex-start; width: auto; }
  .cover { width: min(64vw, 280px); }
  .shelf-count { display: none; }
  .cols { grid-template-columns: 1fr; }
  .foot { flex-direction: column; }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: .01s !important; animation-delay: 0s !important; transition-duration: .01s !important; }
  .say-text .w { opacity: 1; }
}
