/* Inside Global Businesses · flipbook reader and newsstand
   Type: Bodoni Moda (display, Didone in the Vanity Fair / Harper's tradition),
         Source Serif 4 (reading text, Economist / FT-style transitional serif),
         Inter (interface, in the Helvetica / Neue Haas tradition of Monocle and Businessweek). */
@import url("fonts/fonts.css");

:root {
  --ink: #0c0d0e;
  --ink-2: #141618;
  --ink-3: #1d2023;
  --line: rgba(236, 228, 210, 0.14);
  --line-strong: rgba(236, 228, 210, 0.28);
  --ivory: #efe9dc;
  --ivory-dim: rgba(239, 233, 220, 0.62);
  --brass: #b89a5e;
  --brass-hi: #d7bd86;
  --teal: #3fb6c2;
  --paper: #f8f5ee;
  --display: "Bodoni Moda", Didot, "Bodoni 72", Georgia, serif;
  --text: "Source Serif 4", Georgia, serif;
  --sans: "Inter", "Helvetica Neue", Arial, sans-serif;
  --bar: 60px;
  --foot: 56px;
}

* { box-sizing: border-box; }
html, body { margin: 0; height: 100%; }
body {
  background: var(--ink);
  color: var(--ivory);
  font-family: var(--sans);
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}
button { font: inherit; color: inherit; background: none; border: 0; cursor: pointer; padding: 0; }
a { color: inherit; }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }

/* ---------- Masthead word mark ---------- */
.wordmark { font-family: var(--display); font-weight: 500; letter-spacing: 0.02em; line-height: 1; white-space: nowrap; text-decoration: none; }
.wordmark i { font-style: italic; font-weight: 400; }

/* =====================================================================
   READER
   ===================================================================== */
body.reader { overflow: hidden; overscroll-behavior: none; }
.reader-app { position: fixed; inset: 0; display: grid; grid-template-rows: var(--bar) minmax(0, 1fr) var(--foot); grid-template-columns: minmax(0, 1fr); }
.reader-app::before { /* reading-room spotlight */
  content: ""; position: absolute; inset: 0; pointer-events: none; z-index: 0;
  background:
    radial-gradient(60% 55% at 50% 46%, rgba(255, 245, 225, 0.075), transparent 70%),
    radial-gradient(120% 90% at 50% 120%, rgba(184, 154, 94, 0.06), transparent 60%),
    linear-gradient(#101213, #0a0b0c);
}

.topbar, .footbar { position: relative; z-index: 5; display: flex; align-items: center; gap: 16px; padding: 0 20px; }
.topbar { border-bottom: 1px solid var(--line); background: rgba(12, 13, 14, 0.72); backdrop-filter: blur(10px); }
.topbar .wordmark { font-size: 20px; color: var(--ivory); }
.topbar .rule { width: 1px; height: 22px; background: var(--line-strong); }
.topbar .edition { font-size: 10.5px; letter-spacing: 0.22em; text-transform: uppercase; color: var(--ivory-dim); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.topbar .edition b { color: var(--brass-hi); font-weight: 600; }
.topbar .spacer { flex: 1; }
.tools { display: flex; align-items: center; gap: 2px; }
.tool {
  width: 40px; height: 40px; display: grid; place-items: center; border-radius: 999px; color: var(--ivory-dim);
  transition: color .2s, background .2s;
}
.tool:hover, .tool[aria-pressed="true"] { color: var(--ivory); background: rgba(239, 233, 220, 0.08); }
.tool:focus-visible, .nav:focus-visible, .scrub:focus-visible { outline: 1px solid var(--brass); outline-offset: 2px; }
.tool svg { width: 19px; height: 19px; stroke: currentColor; fill: none; stroke-width: 1.4; stroke-linecap: round; stroke-linejoin: round; }
.tool[hidden] { display: none; }
.tool-sep { width: 1px; height: 20px; background: var(--line); margin: 0 6px; }

/* Stage & book */
.stage { position: relative; z-index: 1; min-height: 0; min-width: 0; overflow: hidden; padding: 26px 76px 18px; }
.book-wrap { position: relative; width: 100%; height: 100%; }
#book { margin: 0 auto; }
.stf__parent { filter: drop-shadow(0 30px 40px rgba(0, 0, 0, 0.55)) drop-shadow(0 6px 10px rgba(0, 0, 0, 0.35)); }
.page { background: var(--paper); overflow: hidden; }
.page .sheet { position: absolute; inset: 0; background: var(--paper); }
.page canvas { position: absolute; inset: 0; width: 100%; height: 100%; display: block; }
.page .gutter { position: absolute; top: 0; bottom: 0; width: 7%; pointer-events: none; z-index: 2; }
.page.--left .gutter, .page[data-side="left"] .gutter { right: 0; background: linear-gradient(to left, rgba(0,0,0,.22), rgba(0,0,0,.06) 35%, transparent); }
.page.--right .gutter, .page[data-side="right"] .gutter { left: 0; background: linear-gradient(to right, rgba(0,0,0,.22), rgba(0,0,0,.06) 35%, transparent); }
.page .ph { position: absolute; inset: 0; display: grid; place-items: center; color: #b7ae9c; font: italic 400 15px/1 var(--display); letter-spacing: .04em; }

.nav {
  position: absolute; top: 50%; transform: translateY(-50%); z-index: 4; width: 52px; height: 96px;
  display: grid; place-items: center; color: var(--ivory-dim); transition: color .2s, opacity .2s;
}
.nav:hover { color: var(--brass-hi); }
.nav[disabled] { opacity: 0.18; cursor: default; }
.nav svg { width: 26px; height: 54px; stroke: currentColor; fill: none; stroke-width: 1; }
.nav.prev { left: 14px; }
.nav.next { right: 14px; }

/* Foot: scrubber + folio */
.footbar { border-top: 1px solid var(--line); justify-content: center; gap: 22px; background: rgba(12, 13, 14, 0.72); }
.folio { font: 500 10.5px/1 var(--sans); letter-spacing: 0.2em; text-transform: uppercase; color: var(--ivory-dim); min-width: 150px; white-space: nowrap; }
.folio b { color: var(--ivory); font-weight: 600; }
.folio.right { text-align: right; }
.scrub { -webkit-appearance: none; appearance: none; width: min(520px, 46vw); height: 22px; background: transparent; cursor: pointer; }
.scrub::-webkit-slider-runnable-track { height: 1px; background: var(--line-strong); }
.scrub::-moz-range-track { height: 1px; background: var(--line-strong); }
.scrub::-webkit-slider-thumb { -webkit-appearance: none; width: 13px; height: 13px; margin-top: -6px; border-radius: 50%; background: var(--brass); border: 3px solid var(--ink); box-shadow: 0 0 0 1px var(--brass); }
.scrub::-moz-range-thumb { width: 9px; height: 9px; border-radius: 50%; background: var(--brass); border: 3px solid var(--ink); box-shadow: 0 0 0 1px var(--brass); }

/* Drawers */
.scrim { position: fixed; inset: 0; z-index: 20; background: rgba(5, 6, 7, 0.55); opacity: 0; pointer-events: none; transition: opacity .3s; }
.scrim.open { opacity: 1; pointer-events: auto; }
.drawer {
  position: fixed; z-index: 21; background: var(--ink-2); border: 1px solid var(--line);
  transition: transform .38s cubic-bezier(.2,.7,.2,1); display: flex; flex-direction: column;
}
.drawer header { display: flex; align-items: center; justify-content: space-between; padding: 22px 24px 16px; border-bottom: 1px solid var(--line); }
.drawer h2 { margin: 0; font: 400 26px/1 var(--display); color: var(--ivory); }
.drawer h2 i { font-weight: 400; }
.drawer .eyebrow { font: 600 10px/1 var(--sans); letter-spacing: .26em; text-transform: uppercase; color: var(--brass); margin-bottom: 8px; }
.drawer .body { overflow: auto; padding: 8px 24px 28px; }
.drawer.left { top: 0; bottom: 0; left: 0; width: min(400px, 92vw); transform: translateX(-102%); border-width: 0 1px 0 0; }
.drawer.bottom { left: 0; right: 0; bottom: 0; height: min(330px, 62vh); transform: translateY(102%); border-width: 1px 0 0; }
.drawer.right { top: 0; bottom: 0; right: 0; width: min(520px, 94vw); transform: translateX(102%); border-width: 0 0 0 1px; }
.drawer.open { transform: none; }

.toc { list-style: none; margin: 0; padding: 0; counter-reset: toc; }
.toc li { border-bottom: 1px solid var(--line); }
.toc button { width: 100%; display: grid; grid-template-columns: 1fr auto; align-items: baseline; gap: 18px; padding: 16px 0; text-align: left; }
.toc .t { font: 400 18px/1.25 var(--text); color: var(--ivory); transition: color .2s; }
.toc .p { font: 500 11px/1 var(--sans); letter-spacing: .14em; color: var(--brass); font-variant-numeric: tabular-nums; }
.toc button:hover .t { color: var(--brass-hi); }
.toc .current .t { font-style: italic; }

.thumbs { display: flex; gap: 22px; padding: 22px 24px 30px; overflow-x: auto; overflow-y: hidden; align-items: flex-start; height: 100%; }
.thumb { flex: none; display: flex; flex-direction: column; align-items: center; gap: 10px; }
.thumb .spread { display: flex; box-shadow: 0 10px 22px rgba(0,0,0,.45); outline: 1px solid transparent; outline-offset: 5px; transition: outline-color .2s; }
.thumb canvas, .thumb .blank { display: block; height: 180px; background: #2a2d30; }
.thumb .blank { width: 0; }
.thumb span { font: 500 10px/1 var(--sans); letter-spacing: .18em; color: var(--ivory-dim); }
.thumb:hover .spread, .thumb.current .spread { outline-color: var(--brass); }
.thumb.current span { color: var(--brass-hi); }

.textview { font: 400 17px/1.62 var(--text); color: #ddd6c6; }
.textview h3 { font: 600 10px/1 var(--sans); letter-spacing: .24em; text-transform: uppercase; color: var(--brass); margin: 26px 0 12px; }
.textview p { margin: 0 0 1em; }
.textview .none { font-style: italic; color: var(--ivory-dim); }

/* Zoom */
.zoom { position: fixed; inset: 0; z-index: 30; background: #0a0b0c; display: none; }
.zoom.open { display: block; }
.zoom .scroller { position: absolute; inset: 0; overflow: auto; cursor: grab; }
.zoom .scroller.dragging { cursor: grabbing; }
.zoom .canvas-row { display: flex; justify-content: center; padding: 40px; min-width: min-content; }
.zoom canvas { display: block; box-shadow: 0 20px 50px rgba(0,0,0,.6); }
.zoom .ctl { position: absolute; top: 16px; right: 16px; display: flex; gap: 4px; background: rgba(20,22,24,.86); border: 1px solid var(--line); border-radius: 999px; padding: 4px; z-index: 2; }
.zoom .lvl { align-self: center; min-width: 54px; text-align: center; font: 500 11px/1 var(--sans); letter-spacing: .14em; color: var(--ivory-dim); }

/* Loader */
.loader { position: fixed; inset: 0; z-index: 40; display: grid; place-items: center; background: var(--ink); transition: opacity .6s ease, visibility .6s; }
.loader.done { opacity: 0; visibility: hidden; }
.loader .inner { text-align: center; padding: 24px; }
.loader .wordmark { font-size: clamp(30px, 5vw, 52px); color: var(--ivory); }
.loader .orn { width: 64px; height: 1px; background: var(--brass); margin: 22px auto; }
.loader .msg { font: italic 400 16px/1.4 var(--text); color: var(--ivory-dim); }
.loader .bar { width: 220px; height: 1px; background: var(--line); margin: 26px auto 0; overflow: hidden; }
.loader .bar i { display: block; height: 100%; width: 0; background: var(--brass-hi); transition: width .3s; }
.loader .err { display: none; margin-top: 18px; font: 400 15px/1.5 var(--text); color: #e6b8a8; max-width: 440px; }
.loader .err a { color: var(--brass-hi); }
.loader.failed .err { display: block; }
.loader.failed .bar { display: none; }

.toast { position: fixed; left: 50%; bottom: 84px; transform: translate(-50%, 12px); z-index: 50; background: var(--ivory); color: var(--ink); font: 500 12px/1 var(--sans); letter-spacing: .08em; padding: 12px 18px; opacity: 0; transition: opacity .25s, transform .25s; pointer-events: none; }
.toast.show { opacity: 1; transform: translate(-50%, 0); }

@media (max-width: 860px) {
  :root { --bar: 54px; --foot: 52px; }
  .topbar { padding: 0 8px 0 14px; gap: 10px; }
  .topbar .wordmark { font-size: 17px; }
  .topbar .rule, .topbar .edition, .tool-sep, .tool.opt { display: none; }
  .tool { width: 38px; height: 38px; }
  .stage { padding: 12px 10px 10px; }
  .nav { display: none; }
  .folio { min-width: 0; letter-spacing: .14em; }
  .folio.left { display: none; }
  .scrub { width: 52vw; }
}

/* =====================================================================
   NEWSSTAND (library)
   ===================================================================== */
body.stand { background: var(--ink); }
.stand-head { border-bottom: 1px solid var(--line); }
.stand-head .row { max-width: 1240px; margin: 0 auto; padding: 18px 24px; display: flex; align-items: center; justify-content: space-between; gap: 16px; }
.stand-head .wordmark { font-size: 22px; color: var(--ivory); }
.stand-head nav a { font: 500 11px/1 var(--sans); letter-spacing: .2em; text-transform: uppercase; color: var(--ivory-dim); text-decoration: none; margin-left: 24px; }
.stand-head nav a:hover { color: var(--brass-hi); }
.stand main { max-width: 1240px; margin: 0 auto; padding: 0 24px 96px; }

.hero { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.1fr); gap: clamp(32px, 6vw, 88px); align-items: center; padding: clamp(40px, 7vw, 88px) 0 clamp(48px, 7vw, 96px); border-bottom: 1px solid var(--line); }
.hero .eyebrow { font: 600 11px/1 var(--sans); letter-spacing: .3em; text-transform: uppercase; color: var(--brass); }
.hero h1 { font: 400 clamp(40px, 6vw, 76px)/0.98 var(--display); margin: 22px 0 22px; letter-spacing: -0.01em; }
.hero h1 i { font-weight: 400; color: var(--brass-hi); }
.hero p.lede { font: 400 clamp(17px, 1.6vw, 20px)/1.55 var(--text); color: #d3ccbd; max-width: 34em; margin: 0 0 30px; }
.hero .meta { font: 500 11px/1 var(--sans); letter-spacing: .2em; text-transform: uppercase; color: var(--ivory-dim); margin-bottom: 30px; }
.btn { display: inline-flex; align-items: center; gap: 12px; padding: 16px 26px; border: 1px solid var(--brass); color: var(--ivory); text-decoration: none; font: 600 11px/1 var(--sans); letter-spacing: .24em; text-transform: uppercase; transition: background .25s, color .25s; }
.btn:hover { background: var(--brass); color: var(--ink); }
.btn.ghost { border-color: var(--line-strong); margin-left: 10px; }
.btn.ghost:hover { background: var(--ivory); border-color: var(--ivory); }
.hero .cover-link { display: block; justify-self: center; perspective: 1600px; }
.hero .cover-link .cv { width: min(420px, 78vw); transform: rotateY(-14deg) rotateX(2deg); transform-origin: left center; transition: transform .6s cubic-bezier(.2,.7,.2,1); box-shadow: -2px 0 0 rgba(255,255,255,.08) inset, 30px 40px 60px rgba(0,0,0,.6), 8px 10px 18px rgba(0,0,0,.4); }
.hero .cover-link:hover .cv { transform: rotateY(-4deg); }

.cv { position: relative; aspect-ratio: 682 / 847; overflow: hidden; background: #1a1c1e; }
.cv img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; object-position: left center; display: block; }
.cv::after { content: ""; position: absolute; inset: 0; background: linear-gradient(90deg, rgba(0,0,0,.28), rgba(255,255,255,.06) 2.5%, transparent 6%); pointer-events: none; }

.section-head { display: flex; align-items: baseline; justify-content: space-between; padding: 56px 0 28px; }
.section-head h2 { font: 400 34px/1 var(--display); margin: 0; }
.section-head h2 i { font-weight: 400; }
.section-head span { font: 500 11px/1 var(--sans); letter-spacing: .2em; text-transform: uppercase; color: var(--ivory-dim); }

.shelf { display: grid; grid-template-columns: repeat(auto-fill, minmax(190px, 1fr)); gap: 48px 32px; }
.issue { text-decoration: none; display: block; }
.issue .cv { box-shadow: 0 18px 30px rgba(0,0,0,.5), 0 3px 8px rgba(0,0,0,.35); transition: transform .35s cubic-bezier(.2,.7,.2,1), box-shadow .35s; }
.issue:hover .cv { transform: translateY(-6px); box-shadow: 0 28px 44px rgba(0,0,0,.6), 0 4px 10px rgba(0,0,0,.35); }
.issue .t { font: 400 19px/1.2 var(--display); color: var(--ivory); margin-top: 18px; }
.issue .m { font: 500 10px/1.4 var(--sans); letter-spacing: .2em; text-transform: uppercase; color: var(--ivory-dim); margin-top: 8px; }
.issue .m b { color: var(--brass); font-weight: 600; }

.stand-foot { border-top: 1px solid var(--line); text-align: center; padding: 40px 24px 56px; color: var(--ivory-dim); font: 400 14px/1.6 var(--text); }
.stand-foot .wordmark { display: block; font-size: 20px; color: var(--ivory); margin-bottom: 10px; }

@media (max-width: 760px) {
  .hero { grid-template-columns: 1fr; }
  .hero .cover-link { order: -1; }
  .hero .cover-link .cv { width: min(300px, 74vw); }
  .stand-head nav a.opt { display: none; }
  .stand-head .wordmark { font-size: 18px; }
  .stand-head nav a { white-space: nowrap; margin-left: 0; }
  .shelf { grid-template-columns: repeat(2, 1fr); gap: 36px 18px; }
  .btn.ghost { margin: 12px 0 0; }
}
@media (prefers-reduced-motion: reduce) { * { transition: none !important; } }

/* book centring */
.book-wrap { display: flex; align-items: center; justify-content: center; }
.sizer { flex: none; transition: transform .8s cubic-bezier(.3,.6,.2,1); }
#book { width: 100%; }
