/* Jaraan — shared styles. Palette and type follow punitarice.com. */
:root {
  --ink: #221d1b;
  --text: #3a3431;
  --muted: #6d655f;
  --paper: #fbf8f3;
  --linen: #f2ece3;
  --maroon: #5a2620;
  --forest: #1d322f;
  --mist: #e6e2d6;
  --hair: #d9cfc1;
  --night: #141a1f;
  --serif: "Cormorant Garamond", Georgia, "Times New Roman", serif;
  --sans: system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", Helvetica, Arial, sans-serif;
  --wrap: 1120px;
}
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
body { margin: 0; background: var(--paper); color: var(--text); font-family: var(--sans); font-size: 16px; line-height: 1.7; -webkit-font-smoothing: antialiased; }
img { max-width: 100%; height: auto; display: block; }
a { color: inherit; }
h1, h2, h3, h4 { font-family: var(--serif); font-weight: 500; color: var(--ink); line-height: 1.12; margin: 0; }
p { margin: 0 0 1em; }
.wrap { width: 100%; max-width: var(--wrap); margin: 0 auto; padding: 0 24px; }
.narrow { max-width: 760px; }
.center { text-align: center; }
.skip { position: absolute; left: -9999px; }
.skip:focus { left: 16px; top: 16px; background: var(--ink); color: #fff; padding: 8px 14px; z-index: 100; }

/* labels, rules, eyebrows */
.label { display: inline-block; padding: 7px 14px 6px; background: #111; color: #fff; font-family: var(--sans); font-weight: 600; font-size: 12.5px; line-height: 1.3; letter-spacing: .14em; text-transform: uppercase; }
.eyebrow { font-family: var(--sans); font-size: 11.5px; font-weight: 600; letter-spacing: .16em; text-transform: uppercase; color: var(--maroon); }
.rule { display: block; width: 56px; height: 1px; background: var(--maroon); opacity: .55; margin: 20px auto; border: 0; }
.flank { display: flex; align-items: center; justify-content: center; gap: 18px; }
.flank::before, .flank::after { content: ""; width: 48px; height: 1px; background: currentColor; opacity: .45; flex: 0 0 auto; }

/* header */
.site-header { position: absolute; inset: 0 0 auto 0; z-index: 20; color: #fff; }
.site-header.solid { position: relative; color: var(--ink); background: var(--paper); border-bottom: 1px solid var(--hair); }
.site-header .wrap { display: flex; align-items: center; justify-content: space-between; gap: 24px; height: 76px; }
.wordmark { font-family: var(--serif); font-size: 24px; font-weight: 500; letter-spacing: .32em; text-decoration: none; text-transform: uppercase; }
.nav { display: flex; align-items: center; gap: 28px; }
.nav a { font-family: var(--sans); font-size: 12px; font-weight: 600; letter-spacing: .14em; text-transform: uppercase; text-decoration: none; opacity: .9; padding: 6px 0; border-bottom: 1px solid transparent; transition: border-color .2s, opacity .2s; }
.nav a:hover, .nav a[aria-current="page"] { opacity: 1; border-bottom-color: currentColor; }
.nav .ext { opacity: .7; }
.menu-btn { display: none; background: none; border: 0; color: inherit; font: 600 12px/1 var(--sans); letter-spacing: .14em; text-transform: uppercase; padding: 10px 0; cursor: pointer; }
@media (max-width: 860px) {
  .menu-btn { display: block; }
  .nav { display: none; position: absolute; top: 76px; left: 0; right: 0; flex-direction: column; align-items: flex-start; gap: 4px; padding: 16px 24px 24px; background: var(--paper); color: var(--ink); border-bottom: 1px solid var(--hair); }
  .nav.open { display: flex; }
  .nav a { font-size: 13px; padding: 10px 0; }
}

/* heroes */
.hero { position: relative; min-height: 92vh; min-height: 92svh; display: flex; align-items: center; justify-content: center; text-align: center; color: #fff; overflow: hidden; background: var(--night); }
.hero img.bg, .page-hero img.bg { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.hero::after, .page-hero::after { content: ""; position: absolute; inset: 0; background: linear-gradient(180deg, rgba(10, 14, 18, .45) 0%, rgba(10, 14, 18, .35) 45%, rgba(10, 14, 18, .7) 100%); }
.hero .inner, .page-hero .inner { position: relative; z-index: 1; padding: 120px 24px 80px; max-width: 900px; }
.hero h1 { color: #fff; font-size: clamp(72px, 13vw, 168px); letter-spacing: .08em; line-height: .95; margin: 22px 0 18px; text-transform: uppercase; font-weight: 500; }
.hero .sub { font-family: var(--serif); font-style: italic; font-size: clamp(22px, 2.6vw, 30px); line-height: 1.35; color: #f3efe6; margin: 0 auto; max-width: 640px; }
.hero .ctas { display: flex; gap: 14px; justify-content: center; flex-wrap: wrap; margin-top: 36px; }
.scroll-cue { position: absolute; z-index: 1; bottom: 26px; left: 50%; transform: translateX(-50%); font: 600 10.5px/1 var(--sans); letter-spacing: .2em; text-transform: uppercase; color: rgba(255, 255, 255, .75); text-decoration: none; }
.scroll-cue::after { content: ""; display: block; width: 1px; height: 34px; background: rgba(255, 255, 255, .55); margin: 12px auto 0; }
.page-hero { position: relative; height: clamp(240px, 32vw, 380px); overflow: hidden; background: var(--night); }
.page-hero::after { background: linear-gradient(180deg, rgba(10, 14, 18, .55) 0%, rgba(10, 14, 18, .1) 45%, rgba(10, 14, 18, 0) 100%) !important; }
.page-head { text-align: center; padding: clamp(48px, 6vw, 76px) 0 0; }
.page-head h1 { font-size: clamp(44px, 6vw, 76px); margin: 18px 0 12px; }
.page-head p { font-family: var(--serif); font-style: italic; font-size: clamp(20px, 2.2vw, 25px); color: var(--text); margin: 0 auto; max-width: 640px; }
.page-head + .pad { padding-top: clamp(48px, 6vw, 72px); }
.page-head + .pad-s, .page-head + section { margin-top: 0; }

/* buttons */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; padding: 14px 24px 13px; font: 600 12.5px/1.2 var(--sans); letter-spacing: .12em; text-transform: uppercase; text-decoration: none; border: 1px solid var(--ink); color: var(--ink); background: transparent; transition: background .2s, color .2s, border-color .2s; }
.btn:hover { background: var(--ink); color: #fff; }
.btn.solid { background: var(--forest); border-color: var(--forest); color: #fff; }
.btn.solid:hover { background: var(--maroon); border-color: var(--maroon); }
.btn.light { border-color: rgba(255, 255, 255, .75); color: #fff; }
.btn.light:hover { background: #fff; color: var(--ink); }
.link { font: 600 12.5px/1.4 var(--sans); letter-spacing: .1em; text-transform: uppercase; text-decoration: none; border-bottom: 1px solid currentColor; padding-bottom: 3px; color: var(--ink); }
.link:hover { color: var(--maroon); }

/* sections */
section { position: relative; }
.pad { padding: clamp(72px, 9vw, 128px) 0; }
.pad-s { padding: clamp(48px, 6vw, 80px) 0; }
.linen { background: var(--linen); }
.forest { background: var(--forest); color: var(--mist); }
.forest h2, .forest h3 { color: #fff; }
.sec-head { text-align: center; margin: 0 auto clamp(40px, 5vw, 64px); max-width: 720px; }
.sec-head h2 { font-size: clamp(34px, 4vw, 52px); margin: 14px 0 0; }
.sec-head p { font-family: var(--serif); font-style: italic; font-size: clamp(19px, 2vw, 23px); color: var(--text); margin: 18px 0 0; }

/* epigraph */
.epigraph { text-align: center; }
.epigraph blockquote { margin: 0 auto; max-width: 820px; font-family: var(--serif); font-size: clamp(28px, 3.4vw, 44px); line-height: 1.3; color: var(--ink); }
.epigraph cite { display: block; margin-top: 18px; font: normal 600 11.5px/1.4 var(--sans); letter-spacing: .16em; text-transform: uppercase; color: var(--maroon); }

/* the two eras */
.eras { position: relative; max-width: 1040px; margin: 0 auto; }
.eras::before { content: ""; position: absolute; left: 50%; top: 0; bottom: 0; width: 1px; background: var(--hair); }
.era { position: relative; display: grid; grid-template-columns: 1fr 1fr; gap: clamp(40px, 7vw, 110px); align-items: center; padding: clamp(32px, 5vw, 56px) 0; }
.era::before { content: ""; position: absolute; left: 50%; top: 50%; width: 11px; height: 11px; margin: -5px 0 0 -5px; border-radius: 50%; background: var(--paper); border: 1px solid var(--maroon); box-shadow: 0 0 0 6px var(--paper); }
.linen .era::before { background: var(--linen); box-shadow: 0 0 0 6px var(--linen); }
.era:nth-child(even) .era-img { order: 2; }
.era-img { position: relative; }
.era-img img { width: 100%; aspect-ratio: 4 / 3; object-fit: cover; outline: 1px solid rgba(255, 255, 255, .6); outline-offset: -14px; }
.era-text .when { margin-bottom: 10px; }
.era-text h3 { font-size: clamp(32px, 3.4vw, 44px); margin: 0 0 16px; }
.era-text q { display: block; quotes: none; font-family: var(--serif); font-style: italic; font-size: 22px; line-height: 1.4; color: var(--ink); margin: 0 0 6px; }
.era-text .by { font: 600 11px/1.4 var(--sans); letter-spacing: .14em; text-transform: uppercase; color: var(--maroon); margin-bottom: 20px; }
.era-text .links { display: flex; flex-wrap: wrap; gap: 14px 22px; margin-top: 22px; }
@media (max-width: 760px) {
  .eras::before { left: 6px; }
  .era { grid-template-columns: 1fr; padding-left: 30px; gap: 24px; }
  .era::before { left: 6px; top: 40px; }
  .era:nth-child(even) .era-img { order: 0; }
}

/* gods: arched portraits */
.gods { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: clamp(40px, 5vw, 64px) clamp(28px, 4vw, 52px); }
.gods.row { grid-template-columns: repeat(6, minmax(0, 1fr)); gap: 22px; }
.god { text-align: center; }
.god .arch { display: block; width: 100%; max-width: 260px; margin: 0 auto 22px; aspect-ratio: 4 / 5; border-radius: 999px 999px 0 0; overflow: hidden; background: var(--linen); }
.god .arch img { width: 100%; height: 100%; object-fit: cover; transition: transform .8s ease; }
.god:hover .arch img { transform: scale(1.04); }
.god h3 { font-size: 27px; margin: 0 0 4px; }
.god .role { margin-bottom: 14px; }
.god p { font-size: 15px; line-height: 1.7; margin: 0; }
.gods.row .god h3 { font-size: 21px; }
.gods.row .god .arch { margin-bottom: 14px; }
.gods.row a { text-decoration: none; }
@media (max-width: 900px) { .gods { grid-template-columns: repeat(2, minmax(0, 1fr)); } .gods.row { grid-template-columns: repeat(3, minmax(0, 1fr)); } }
@media (max-width: 560px) { .gods { grid-template-columns: 1fr; } .gods.row { grid-template-columns: repeat(2, minmax(0, 1fr)); } }

/* entries (people, places) */
.entries { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 44px 40px; }
.entry { border-top: 1px solid var(--hair); padding-top: 18px; }
.entry h3 { font-size: 25px; margin: 0 0 4px; }
.entry .role { margin: 2px 0 10px; }
.entry p { font-size: 15px; line-height: 1.7; margin: 8px 0 0; }
@media (max-width: 900px) { .entries { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 560px) { .entries { grid-template-columns: 1fr; } }
.part + .part { margin-top: clamp(64px, 8vw, 104px); }
.part-head { text-align: center; margin-bottom: 40px; }
.part-head h2 { font-size: clamp(30px, 3.2vw, 42px); margin-top: 10px; }
.part-head p { font-family: var(--serif); font-style: italic; font-size: 20px; margin: 12px 0 0; }

/* places preview: two lists */
.twin { display: grid; grid-template-columns: 1fr 1fr; gap: 0; max-width: 960px; margin: 0 auto; border-top: 1px solid var(--hair); border-bottom: 1px solid var(--hair); }
.twin > div { padding: 36px clamp(20px, 4vw, 48px); }
.twin > div + div { border-left: 1px solid var(--hair); }
.twin h3 { font-size: 28px; margin: 10px 0 18px; }
.twin ul { list-style: none; margin: 0; padding: 0; }
.twin li { font-family: var(--serif); font-size: 20px; padding: 6px 0; color: var(--ink); }
@media (max-width: 680px) { .twin { grid-template-columns: 1fr; } .twin > div + div { border-left: 0; border-top: 1px solid var(--hair); } }

/* books */
.book { display: grid; grid-template-columns: minmax(0, 5fr) minmax(0, 7fr); gap: clamp(36px, 6vw, 88px); align-items: center; }
.book + .book { margin-top: clamp(72px, 9vw, 120px); }
.book:nth-child(even) .cover { order: 2; }
.book .cover { background: var(--linen); padding: clamp(28px, 4vw, 56px); display: flex; justify-content: center; }
.book .cover img { max-height: 420px; width: auto; mix-blend-mode: multiply; }
.book h3 { font-size: clamp(34px, 3.6vw, 46px); font-style: italic; margin: 0 0 14px; }
.book .acc { display: flex; flex-wrap: wrap; gap: 6px 18px; margin-bottom: 20px; }
.book p { font-size: 16px; }
.book .actions { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 24px; }
@media (max-width: 760px) { .book { grid-template-columns: 1fr; } .book:nth-child(even) .cover { order: 0; } }

.orders { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); max-width: 1000px; margin: 0 auto; border-top: 1px solid var(--hair); border-bottom: 1px solid var(--hair); text-align: center; }
.orders > div { padding: 32px 26px 30px; }
.orders > div + div { border-left: 1px solid var(--hair); }
.orders .n { display: block; font-family: var(--serif); font-style: italic; font-size: 32px; line-height: 1; color: var(--maroon); margin-bottom: 12px; }
.orders h3 { font: 600 12px/1.4 var(--sans); letter-spacing: .14em; text-transform: uppercase; color: var(--ink); margin-bottom: 10px; }
.orders .which { font-family: var(--serif); font-size: 20px; line-height: 1.35; color: var(--ink); margin-bottom: 10px; }
.orders p { font-size: 14.5px; margin: 0; }
@media (max-width: 760px) { .orders { grid-template-columns: 1fr; } .orders > div + div { border-left: 0; border-top: 1px solid var(--hair); } }

.shop { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 32px; }
.shop a { text-decoration: none; display: block; }
.shop .ph { background: var(--linen); aspect-ratio: 1; display: flex; align-items: center; justify-content: center; padding: 28px; margin-bottom: 16px; }
.shop .ph img { max-height: 100%; width: auto; mix-blend-mode: multiply; }
.shop h3 { font-size: 23px; }
.shop p { font-size: 14.5px; color: var(--muted); margin: 4px 0 0; }
@media (max-width: 760px) { .shop { grid-template-columns: 1fr 1fr; gap: 20px; } }

/* extras */
.extras { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 0; border-top: 1px solid rgba(230, 226, 214, .25); border-bottom: 1px solid rgba(230, 226, 214, .25); }
.extras > a { display: block; padding: 40px clamp(20px, 3vw, 36px); text-decoration: none; transition: background .3s; }
.extras > a + a { border-left: 1px solid rgba(230, 226, 214, .25); }
.extras > a:hover { background: rgba(255, 255, 255, .04); }
.extras .eyebrow { color: rgba(230, 226, 214, .7); }
.extras h3 { font-size: 28px; margin: 12px 0 10px; }
.extras p { font-size: 15px; color: var(--mist); margin: 0 0 18px; }
.extras .go { font: 600 12px/1 var(--sans); letter-spacing: .12em; text-transform: uppercase; color: #fff; }
@media (max-width: 760px) { .extras { grid-template-columns: 1fr; } .extras > a + a { border-left: 0; border-top: 1px solid rgba(230, 226, 214, .25); } }

.extras > .xcard { display: block; padding: 40px clamp(20px, 3vw, 36px); }
.extras > * + * { border-left: 1px solid rgba(230, 226, 214, .25); }
.extras .parts { list-style: none; margin: 0 0 20px; padding: 0; }
.extras .parts li { display: flex; flex-wrap: wrap; gap: 4px 14px; padding: 8px 0; border-top: 1px solid rgba(230, 226, 214, .18); }
.extras .parts .bk { flex-basis: 100%; font-family: var(--serif); font-style: italic; font-size: 17px; color: #fff; }
.extras .parts a { font-size: 13.5px; color: var(--mist); text-decoration: none; border-bottom: 1px solid transparent; }
.extras .parts a:hover { color: #fff; border-color: rgba(255, 255, 255, .6); }
.extras a.go { text-decoration: none; }
@media (max-width: 760px) { .extras > * + * { border-left: 0; border-top: 1px solid rgba(230, 226, 214, .25); } }

/* closing line over the water */
.closing { position: relative; min-height: 340px; display: flex; align-items: center; justify-content: center; overflow: hidden; background: var(--night); text-align: center; }
.closing img.bg { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.closing::after { content: ""; position: absolute; inset: 0; background: rgba(10, 14, 18, .35); }
.closing p { position: relative; z-index: 1; margin: 0; padding: 0 24px; font-family: var(--serif); font-style: italic; font-size: clamp(32px, 4.4vw, 56px); color: #fff; }

/* next page nav */
.next { display: grid; grid-template-columns: 1fr 1fr; border-top: 1px solid var(--hair); }
.next a { display: block; padding: 40px 24px; text-decoration: none; text-align: center; transition: background .2s; }
.next a + a { border-left: 1px solid var(--hair); }
.next a:hover { background: var(--linen); }
.next .t { display: block; font-family: var(--serif); font-size: 28px; color: var(--ink); margin-top: 8px; }

/* footer */
.site-footer { background: var(--night); color: rgba(230, 226, 214, .8); padding: 72px 0 40px; text-align: center; }
.site-footer .wordmark { color: #fff; font-size: 28px; }
.site-footer p { font-family: var(--serif); font-style: italic; font-size: 20px; color: var(--mist); max-width: 560px; margin: 18px auto 26px; }
.site-footer nav { display: flex; flex-wrap: wrap; justify-content: center; gap: 10px 26px; margin-bottom: 36px; }
.site-footer nav a { font: 600 11.5px/1.4 var(--sans); letter-spacing: .14em; text-transform: uppercase; text-decoration: none; color: #fff; opacity: .85; }
.site-footer nav a:hover { opacity: 1; }
.site-footer small { font-size: 12.5px; opacity: .65; }

/* the timeline rail (home page) */
.pr-tl { position: fixed; z-index: 40; pointer-events: none; opacity: 0; transition: opacity .5s ease; }
.pr-tl.is-on { opacity: 1; }
.pr-tl__label { font: 600 10.5px/1 var(--sans); letter-spacing: .16em; text-transform: uppercase; color: var(--muted); white-space: nowrap; transition: color .4s; }
.pr-tl__label.is-here { color: var(--maroon); }
.pr-tl__track { position: relative; background: var(--hair); }
.pr-tl__fill { position: absolute; left: 0; top: 0; background: var(--maroon); }
.pr-tl__dot { position: absolute; width: 9px; height: 9px; border-radius: 50%; background: var(--maroon); box-shadow: 0 0 0 4px var(--paper), 0 0 0 5px rgba(90, 38, 32, .35); }
@media (min-width: 1100px) {
  .pr-tl { left: 26px; top: 50%; transform: translateY(-50%); height: 58vh; display: flex; flex-direction: column; align-items: center; gap: 14px; }
  .pr-tl__label { writing-mode: vertical-rl; transform: rotate(180deg); }
  .pr-tl__track { width: 1px; flex: 1; }
  .pr-tl__fill { width: 1px; height: calc(var(--p, 0) * 100%); }
  .pr-tl__dot { left: -4px; top: calc(var(--p, 0) * 100% - 4px); }
}
@media (max-width: 1099px) { .pr-tl { display: none; } }

/* gentle reveal */
@media (prefers-reduced-motion: no-preference) {
  .js .reveal { opacity: 0; transform: translateY(18px); transition: opacity .9s ease, transform .9s ease; }
  .js .reveal.in { opacity: 1; transform: none; }
}
