/* Big 4 Handbook Library — finrep design system (referenced from finrep.ai) */
:root {
  --bg: #0a0a0a;
  --surface: #131313;
  --surface-2: #191919;
  --text: #ededed;
  --muted: #9a9a9a;
  --faint: #6d6d6d;
  --line: rgba(255, 255, 255, 0.1);
  --line-strong: rgba(255, 255, 255, 0.18);
  --green: #29ab87;
  --green-hi: #34c79c;
  --green-deep: #10362a;
  --radius: 8px;
  --radius-lg: 14px;
  --maxw: 1160px;
  --serif: "Source Serif 4", Georgia, "Times New Roman", serif;
  --sans: "Inter", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
}

* {
  box-sizing: border-box;
}
html {
  scroll-behavior: smooth;
}
body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: var(--sans);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}
.container {
  width: 100%;
  max-width: var(--maxw);
  margin: 0 auto;
  padding: 0 24px;
}
a {
  color: var(--text);
  text-decoration: none;
}

/* Announcement bar */
.announce {
  background: var(--green-deep);
  border-bottom: 1px solid rgba(41, 171, 135, 0.25);
  font-size: 14px;
}
.announce-inner {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  height: 40px;
  color: #cfe9e0;
}
.announce-link {
  color: var(--green-hi);
  font-weight: 600;
}
.announce-dot {
  font-size: 13px;
}

/* Header */
.site-header {
  position: sticky;
  top: 0;
  z-index: 30;
  background: rgba(10, 10, 10, 0.72);
  backdrop-filter: saturate(1.3) blur(12px);
  border-bottom: 1px solid var(--line);
}
.header-inner {
  display: flex;
  align-items: center;
  gap: 28px;
  height: 68px;
}
.brand-logo {
  display: block;
  height: 28px;
  width: auto;
}
.site-nav {
  display: flex;
  gap: 26px;
  margin-left: auto;
}
.site-nav a {
  color: var(--muted);
  font-size: 15px;
  font-weight: 500;
}
.site-nav a:hover {
  color: var(--text);
}
.header-cta {
  margin-left: auto;
  display: flex;
  gap: 12px;
}

/* Buttons */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: var(--radius);
  font-family: var(--sans);
  font-weight: 500;
  font-size: 15px;
  padding: 10px 18px;
  cursor: pointer;
  border: 1px solid transparent;
  transition: background 0.15s ease, border-color 0.15s ease, transform 0.12s ease;
  white-space: nowrap;
}
.btn-lg {
  padding: 14px 24px;
  font-size: 16px;
}
.btn-primary {
  background: var(--green);
  color: #f4fbf8;
}
.btn-primary:hover {
  background: var(--green-hi);
  transform: translateY(-1px);
}
.btn-ghost {
  background: transparent;
  color: var(--text);
  border-color: rgba(255, 255, 255, 0.7);
}
.btn-ghost:hover {
  border-color: #fff;
  background: rgba(255, 255, 255, 0.06);
}

/* Hero */
.hero {
  position: relative;
  overflow: hidden;
  border-bottom: 1px solid var(--line);
  padding: 96px 0 84px;
}
.hero-video {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  opacity: 0.28;
  z-index: 0;
}
.hero-motion {
  position: absolute;
  inset: -40%;
  z-index: 0;
  background:
    radial-gradient(38% 40% at 20% 30%, rgba(41, 171, 135, 0.28), transparent 60%),
    radial-gradient(34% 38% at 80% 20%, rgba(41, 171, 135, 0.16), transparent 60%),
    radial-gradient(40% 46% at 65% 80%, rgba(52, 199, 156, 0.14), transparent 60%);
  filter: blur(10px);
  animation: drift 18s ease-in-out infinite alternate;
}
@keyframes drift {
  0% {
    transform: translate3d(-3%, -2%, 0) scale(1);
  }
  50% {
    transform: translate3d(3%, 2%, 0) scale(1.08);
  }
  100% {
    transform: translate3d(-2%, 3%, 0) scale(1.02);
  }
}
.hero-inner {
  position: relative;
  z-index: 1;
  display: flex;
  align-items: center;
  gap: 40px;
}
.hero-copy {
  flex: 1 1 auto;
  min-width: 0;
}
.eyebrow {
  color: var(--green-hi);
  font-size: 13px;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  margin: 0 0 18px;
}
.hero-title {
  font-family: var(--serif);
  font-weight: 500;
  font-size: clamp(34px, 5.4vw, 58px);
  line-height: 1.06;
  letter-spacing: -0.025em;
  color: #fff;
  margin: 0 0 20px;
  max-width: 720px;
}
.hero-sub {
  color: var(--muted);
  font-size: clamp(16px, 2vw, 19px);
  max-width: 56ch;
  margin: 0 0 30px;
}
.hero-actions {
  display: flex;
  gap: 14px;
  flex-wrap: wrap;
}
.firm-strip {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
  margin-top: 40px;
  align-items: center;
}

/* Drifting accounting-standards tags in the hero's right column */
.hero-standards {
  flex: 0 0 auto;
  display: flex;
  justify-content: flex-end;
  gap: 16px;
  height: 400px;
  width: auto;
  pointer-events: none;
  -webkit-mask-image: linear-gradient(180deg, transparent, #000 16%, #000 84%, transparent);
  mask-image: linear-gradient(180deg, transparent, #000 16%, #000 84%, transparent);
}
.std-col {
  flex: 0 0 auto;
  width: 134px;
  overflow: hidden;
}
.std-track {
  display: flex;
  flex-direction: column;
  gap: 12px;
}
.std-up .std-track {
  animation: stdUp 24s linear infinite;
}
.std-down .std-track {
  animation: stdDown 28s linear infinite;
}
@keyframes stdUp {
  from { transform: translateY(0); }
  to { transform: translateY(-50%); }
}
@keyframes stdDown {
  from { transform: translateY(-50%); }
  to { transform: translateY(0); }
}
.std-chip {
  display: flex;
  align-items: center;
  gap: 8px;
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid var(--line);
  border-radius: 999px;
  padding: 9px 15px;
  font-size: 13px;
  font-weight: 600;
  color: #cfd3da;
  white-space: nowrap;
}
.std-chip i {
  width: 8px;
  height: 8px;
  border-radius: 2px;
  flex: 0 0 auto;
}
@media (max-width: 1100px) {
  .hero-standards {
    display: none;
  }
}
@media (prefers-reduced-motion: reduce) {
  .std-up .std-track,
  .std-down .std-track {
    animation: none;
  }
}

/* Firm brand chips (text-only; no trademarked logo files) */
.firm-tag {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  font-weight: 700;
  font-size: 13px;
  letter-spacing: 0.01em;
  padding: 6px 13px;
  border-radius: 999px;
  border: 1px solid var(--line-strong);
  background: var(--surface);
}
.firm-tag::before {
  content: "";
  width: 8px;
  height: 8px;
  border-radius: 2px;
  background: currentColor;
}
.firm-KPMG {
  color: #4a8cff;
}
.firm-Deloitte {
  color: #9ccc3b;
}
.firm-PwC {
  color: #ff8a3d;
}
.firm-EY {
  color: #ffe600;
}
.firm-Other {
  color: var(--muted);
}

/* Featured spotlight (pinned at top) */
.featured {
  padding: 40px 0 0;
}
.spotlight {
  display: flex;
  align-items: stretch;
  border: 1px solid var(--line-strong);
  border-radius: var(--radius-lg);
  overflow: hidden;
  background: #0b0b0b;
}
.spot-cover {
  flex: 0 0 auto;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 30px 40px;
  background: linear-gradient(180deg, #121820, #0a0d11);
}

/* Turning-pages flipbook (spotlight = continuous, cards = on hover) */
.flipbook {
  position: relative;
  perspective: 1500px;
}
.spot-cover .flipbook {
  height: 320px;
  aspect-ratio: 340 / 440;
}
.cover .flipbook {
  position: absolute;
  inset: 0;
}
.flipbook::before {
  /* spine shadow at the hinge */
  content: "";
  position: absolute;
  left: 0;
  top: 0;
  bottom: 0;
  width: 12px;
  background: linear-gradient(90deg, rgba(0, 0, 0, 0.4), transparent);
  z-index: 5;
}
.leaf {
  position: absolute;
  inset: 0;
  transform-origin: left center;
  transform-style: preserve-3d;
  backface-visibility: hidden;
  overflow: hidden;
  background: #fff;
  box-shadow: 0 14px 34px rgba(0, 0, 0, 0.5);
}
.spot-cover .leaf {
  border-radius: 2px 6px 6px 2px;
}
.leaf img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}
.leaf1 { z-index: 3; }
.leaf2 { z-index: 2; }
.leaf3 { z-index: 1; }
@keyframes turnFront {
  0% { transform: rotateY(0deg); }
  11% { transform: rotateY(-158deg); }
  42% { transform: rotateY(-158deg); }
  53% { transform: rotateY(0deg); }
  100% { transform: rotateY(0deg); }
}
@keyframes turnMid {
  0%, 13% { transform: rotateY(0deg); }
  24% { transform: rotateY(-158deg); }
  31% { transform: rotateY(-158deg); }
  42% { transform: rotateY(0deg); }
  100% { transform: rotateY(0deg); }
}
/* Spotlight book turns on its own */
.spot-cover .leaf1 { animation: turnFront 9s ease-in-out infinite; }
.spot-cover .leaf2 { animation: turnMid 9s ease-in-out infinite; }
/* Card books turn while hovered */
.card:hover .leaf1 { animation: turnFront 4.2s ease-in-out infinite; }
.card:hover .leaf2 { animation: turnMid 4.2s ease-in-out infinite; }

/* Representative inner pages (swap for real rendered PDF pages) */
.inner-page {
  width: 100%;
  height: 100%;
  background: #fff;
  padding: 26px 22px;
  box-sizing: border-box;
  color: #0b1533;
}
.ip-kicker {
  font: 700 10px/1 Arial, sans-serif;
  letter-spacing: 2px;
  color: var(--firm, #00338d);
}
.ip-h {
  font-family: Georgia, "Times New Roman", serif;
  font-size: 22px;
  margin: 12px 0 0;
}
.ip-accent {
  width: 46px;
  height: 4px;
  background: var(--firm, #00a3a1);
  margin: 12px 0 16px;
}
.ip-toc {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  font: 13px/1.6 Arial, sans-serif;
  color: #33405a;
  border-bottom: 1px dotted #cfd6e0;
  padding: 6px 0;
}
.ip-toc em {
  font-style: normal;
  color: #8a93a3;
}
.ip-formula {
  font: 12px/1.5 Georgia, serif;
  color: #0b1533;
  background: #f2f5f9;
  border-left: 3px solid #00338d;
  padding: 10px 12px;
  border-radius: 4px;
  margin-bottom: 16px;
}
.ip-line {
  height: 7px;
  background: #eef1f5;
  border-radius: 4px;
  margin: 9px 0;
}
.ip-line.short {
  width: 58%;
}
@media (prefers-reduced-motion: reduce) {
  .leaf1,
  .leaf2 {
    animation: none !important;
  }
}

.spot-body {
  flex: 1;
  min-width: 0;
  padding: 30px 34px;
  display: flex;
  flex-direction: column;
  justify-content: center;
}
.spot-badge {
  align-self: flex-start;
  color: var(--green-hi);
  background: rgba(41, 171, 135, 0.12);
  border: 1px solid rgba(41, 171, 135, 0.35);
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  padding: 5px 11px;
  border-radius: 999px;
  margin-bottom: 16px;
}
.spot-title {
  font-family: var(--serif);
  font-weight: 500;
  font-size: clamp(24px, 3vw, 32px);
  line-height: 1.15;
  letter-spacing: -0.02em;
  color: #fff;
  margin: 0 0 10px;
}
.spot-meta {
  color: var(--faint);
  font-size: 13px;
  margin: 0 0 14px;
}
.spot-desc {
  color: var(--muted);
  font-size: 15.5px;
  margin: 0 0 24px;
  max-width: 52ch;
}
.spot-actions {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
}

@media (max-width: 760px) {
  .spotlight {
    grid-template-columns: 1fr;
  }
  .spot-cover {
    min-height: 180px;
  }
}

/* Library */
.library {
  padding: 56px 0 40px;
}
.lib-head {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 24px;
  flex-wrap: wrap;
}
.section-title {
  font-family: var(--serif);
  font-weight: 500;
  font-size: clamp(26px, 3vw, 34px);
  letter-spacing: -0.02em;
  color: #fff;
  margin: 0;
}
.section-sub {
  color: var(--muted);
  font-size: 14px;
  margin: 8px 0 0;
}
.search-wrap {
  position: relative;
  min-width: 300px;
  flex: 1;
  max-width: 420px;
}
.search-icon {
  position: absolute;
  left: 14px;
  top: 50%;
  transform: translateY(-50%);
  width: 19px;
  height: 19px;
  color: var(--faint);
}
.search-input {
  width: 100%;
  padding: 12px 16px 12px 42px;
  border-radius: var(--radius);
  border: 1px solid var(--line);
  background: var(--surface);
  color: var(--text);
  font-size: 15px;
  font-family: var(--sans);
  outline: none;
}
.search-input::placeholder {
  color: var(--faint);
}
.search-input:focus {
  border-color: var(--green);
  box-shadow: 0 0 0 3px rgba(41, 171, 135, 0.2);
}

.filters {
  display: flex;
  flex-wrap: wrap;
  gap: 9px;
  margin: 26px 0 30px;
}
.chip {
  padding: 8px 15px;
  border-radius: 999px;
  border: 1px solid var(--line);
  background: var(--surface);
  color: var(--muted);
  font-size: 13.5px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.14s ease;
}
.chip:hover {
  border-color: var(--line-strong);
  color: var(--text);
}
.chip.active {
  background: var(--green);
  border-color: var(--green);
  color: #f4fbf8;
}

/* Firm overview (shown when a firm filter is selected) */
.firm-overview {
  margin: 0 0 28px;
}
.fo-inner {
  display: flex;
  align-items: flex-start;
  gap: 16px;
  background: var(--surface);
  border: 1px solid var(--line);
  border-left: 3px solid var(--firm, var(--green));
  border-radius: var(--radius);
  padding: 18px 20px;
  animation: foIn 0.25s ease;
}
@keyframes foIn {
  from { opacity: 0; transform: translateY(-4px); }
  to { opacity: 1; transform: translateY(0); }
}
.fo-firm {
  flex: 0 0 auto;
  margin-top: 2px;
}
.fo-body {
  min-width: 0;
}
.fo-text {
  margin: 0 0 8px;
  color: var(--muted);
  font-size: 15px;
  line-height: 1.6;
  max-width: 90ch;
}
.fo-link {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  color: var(--firm, var(--green-hi));
  font-size: 14px;
  font-weight: 600;
}
.fo-link:hover {
  text-decoration: underline;
}

/* Grid + cards */
.grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
  gap: 22px;
}
.card {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  overflow: hidden;
  display: flex;
  flex-direction: column;
  transition: transform 0.16s ease, border-color 0.16s ease;
}
.card:hover {
  transform: translateY(-4px);
  border-color: var(--line-strong);
}

/* Moving cover */
.cover {
  position: relative;
  aspect-ratio: 3 / 4;
  overflow: hidden;
  background: #0c0c0c;
}
.cover video {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
}
.cover-anim {
  position: absolute;
  inset: 0;
  background-size: 240% 240%;
  animation: pan 12s ease-in-out infinite alternate;
}
.card:hover .cover-anim {
  animation-duration: 6s;
}
@keyframes pan {
  0% {
    background-position: 0% 50%;
  }
  100% {
    background-position: 100% 50%;
  }
}
.cover-firm {
  position: absolute;
  z-index: 2;
  left: 12px;
  top: 12px;
}
.cover-topic {
  position: absolute;
  z-index: 2;
  left: 12px;
  bottom: 12px;
  font-size: 12px;
  font-weight: 600;
  color: #e8e8e8;
  background: rgba(0, 0, 0, 0.4);
  backdrop-filter: blur(4px);
  padding: 4px 10px;
  border-radius: 999px;
  border: 1px solid rgba(255, 255, 255, 0.14);
}

.anim-1 { background-image: linear-gradient(120deg, #0b1f3a, #123a63, #29ab87, #0b1f3a); }
.anim-2 { background-image: linear-gradient(120deg, #10362a, #1c5f49, #34c79c, #0d2a20); }
.anim-3 { background-image: linear-gradient(120deg, #2a1a3a, #4a2d6b, #29ab87, #201430); }
.anim-4 { background-image: linear-gradient(120deg, #3a1010, #6b2d2d, #29ab87, #2a0d0d); }
.anim-5 { background-image: linear-gradient(120deg, #0d1b1b, #1c4f4f, #34c79c, #0a1414); }
.anim-6 { background-image: linear-gradient(120deg, #1a1a1a, #333333, #29ab87, #121212); }

/* ── Showcase reel (rectangular "video" of covers sliding side by side) ── */
.showcase {
  padding: 40px 0 8px;
}
.reel-frame {
  position: relative;
  border: 1px solid var(--line-strong);
  border-radius: 16px;
  background: radial-gradient(120% 140% at 50% -20%, #14201c, #0b0b0b 60%);
  padding: 16px 16px 18px;
  overflow: hidden;
}
.reel-head {
  display: flex;
  align-items: center;
  gap: 9px;
  font-size: 13px;
  font-weight: 600;
  letter-spacing: 0.02em;
  color: var(--muted);
  margin: 2px 4px 14px;
}
.live-dot {
  width: 8px;
  height: 8px;
  border-radius: 999px;
  background: var(--green-hi);
  box-shadow: 0 0 0 0 rgba(52, 199, 156, 0.6);
  animation: pulse 1.8s ease-out infinite;
}
@keyframes pulse {
  0% { box-shadow: 0 0 0 0 rgba(52, 199, 156, 0.55); }
  100% { box-shadow: 0 0 0 10px rgba(52, 199, 156, 0); }
}
.reel-rows {
  display: flex;
  flex-direction: column;
  gap: 14px;
}
.reel-row {
  overflow: hidden;
}
.reel-track {
  display: flex;
  gap: 14px;
  width: max-content;
  animation: reel-l 46s linear infinite;
}
.reel-row.rev .reel-track {
  animation: reel-r 52s linear infinite;
}
.reel-frame:hover .reel-track {
  animation-play-state: paused;
}
@keyframes reel-l {
  from { transform: translateX(0); }
  to { transform: translateX(-50%); }
}
@keyframes reel-r {
  from { transform: translateX(-50%); }
  to { transform: translateX(0); }
}
.reel-tile {
  position: relative;
  flex: 0 0 auto;
  width: 216px;
  height: 122px;
  border-radius: 11px;
  overflow: hidden;
  border: 1px solid var(--line);
}
.reel-tile .cover-anim {
  animation-duration: 10s;
}
.sec-badge {
  position: absolute;
  top: 10px;
  right: 10px;
  z-index: 3;
  width: 34px;
  height: 34px;
  filter: drop-shadow(0 2px 5px rgba(0, 0, 0, 0.5));
}
.sec-badge svg {
  width: 100%;
  height: 100%;
  display: block;
}
.tile-body {
  position: absolute;
  inset: auto 0 0 0;
  padding: 12px 13px;
  background: linear-gradient(transparent, rgba(0, 0, 0, 0.72));
}
.tile-firm {
  margin-bottom: 7px;
  font-size: 11.5px;
  padding: 4px 9px;
}
.tile-title {
  font-family: var(--serif);
  font-weight: 500;
  font-size: 13px;
  line-height: 1.25;
  color: #fff;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}
/* Edge fades so tiles glide in/out like a video */
.reel-fade {
  position: absolute;
  top: 0;
  bottom: 0;
  width: 64px;
  z-index: 3;
  pointer-events: none;
}
.reel-fade-l {
  left: 0;
  background: linear-gradient(90deg, #0b0b0b, transparent);
}
.reel-fade-r {
  right: 0;
  background: linear-gradient(270deg, #0b0b0b, transparent);
}

.card-body {
  padding: 18px 18px 8px;
  flex: 1;
  display: flex;
  flex-direction: column;
}
.card-title {
  font-family: var(--serif);
  font-weight: 500;
  font-size: 18px;
  line-height: 1.3;
  letter-spacing: -0.01em;
  color: #fff;
  margin: 0 0 10px;
}
.card-meta {
  font-size: 12.5px;
  color: var(--faint);
  margin: 0 0 10px;
}
.card-desc {
  font-size: 14px;
  color: var(--muted);
  margin: 0 0 4px;
}
.card-foot {
  padding: 14px 18px 18px;
  display: flex;
  gap: 10px;
}
.btn-view {
  flex: 1;
  background: var(--surface-2);
  border: 1px solid var(--line);
  color: var(--text);
  padding: 10px 14px;
  border-radius: var(--radius);
  font-weight: 600;
  font-size: 14px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
}
.btn-view:hover {
  border-color: var(--green);
  color: var(--green-hi);
}
.btn-download {
  background: var(--green);
  color: #f4fbf8;
  padding: 10px 16px;
  border-radius: var(--radius);
  font-weight: 600;
  font-size: 14px;
  display: inline-flex;
  align-items: center;
  gap: 7px;
}
.btn-download:hover {
  background: var(--green-hi);
}
.btn-download svg {
  width: 14px;
  height: 14px;
}

.empty-state {
  text-align: center;
  color: var(--muted);
  padding: 56px 0;
}

/* About */
.about {
  padding: 48px 0 80px;
}
.about-inner {
  max-width: 760px;
}
.about p {
  color: var(--muted);
  font-size: 16px;
}
.disclaimer {
  font-size: 13px;
  color: var(--faint);
  border-left: 2px solid var(--line-strong);
  padding-left: 14px;
  margin-top: 22px;
}

/* Footer */
.site-footer {
  border-top: 1px solid var(--line);
  padding: 26px 0;
}
.footer-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  flex-wrap: wrap;
}
.footer-logo {
  height: 24px;
  width: auto;
}
.footer-note {
  color: var(--faint);
  font-size: 14px;
}

@media (prefers-reduced-motion: reduce) {
  .hero-motion,
  .cover-anim,
  .reel-track,
  .live-dot {
    animation: none;
  }
}
@media (max-width: 720px) {
  .site-nav {
    display: none;
  }
  .hero {
    padding: 64px 0 60px;
  }
}
