/* ============================================================
   KING'S LAW REPORTS — shared stylesheet
   Primary color drawn from the e-KLR app: warm orange
   ============================================================ */

:root {
  --primary: #F7941D;
  --primary-dark: #D97A0A;
  --primary-deep: #B36409;
  --primary-soft: #FEF3E2;
  --primary-softer: #FFF9F0;
  --ink: #1F1A12;
  --ink-soft: #4A4238;
  --ink-muted: #7A7061;
  --cream: #FDF6EC;
  --cream-deep: #F5E9D7;
  --white: #FFFFFF;
  --line: #EFE3D0;
  --radius-lg: 24px;
  --radius-md: 14px;
  --shadow-card: 0 8px 30px rgba(131, 84, 12, 0.10);
  --shadow-pop: 0 24px 80px rgba(60, 36, 4, 0.30);
  --font: "Poppins", "Avenir Next", "Segoe UI", -apple-system, BlinkMacSystemFont, sans-serif;
}

* { margin: 0; padding: 0; box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  font-family: var(--font);
  color: var(--ink);
  background: var(--cream);
  line-height: 1.7;
  -webkit-font-smoothing: antialiased;
}

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

a { color: inherit; text-decoration: none; }

.container {
  width: min(1140px, 92%);
  margin: 0 auto;
}

/* ---------------- Header ---------------- */

.site-header {
  position: sticky;
  top: 0;
  z-index: 100;
  background: rgba(253, 246, 236, 0.92);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--line);
}

.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  padding: 14px 0;
}

.brand {
  display: flex;
  align-items: center;
  gap: 12px;
  min-width: 0;
}

.brand img {
  height: 46px;
  width: auto;
  border-radius: 8px;
}

.brand-name {
  font-weight: 700;
  font-size: 1.35rem;
  line-height: 1.2;
  letter-spacing: 0.2px;
}

.brand-name span { color: var(--primary-dark); }

.brand-tag {
  display: block;
  font-size: 0.82rem;
  font-weight: 700;
  color: var(--ink-muted);
  font-style: italic;
}

.main-nav {
  display: flex;
  align-items: center;
  gap: 28px;
}

.main-nav a {
  font-weight: 500;
  font-size: 0.95rem;
  color: var(--ink-soft);
  padding: 6px 2px;
  border-bottom: 2px solid transparent;
  transition: color 0.2s, border-color 0.2s;
}

.main-nav a:hover { color: var(--primary-dark); }

.main-nav a.active {
  color: var(--primary-dark);
  border-bottom-color: var(--primary);
}

.btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-family: var(--font);
  font-weight: 600;
  font-size: 0.95rem;
  padding: 12px 26px;
  border-radius: 999px;
  border: none;
  cursor: pointer;
  transition: transform 0.15s, box-shadow 0.2s, background 0.2s;
}

.btn-primary {
  background: linear-gradient(135deg, #FFA63A, var(--primary) 55%, #E8820C);
  color: #fff;
  box-shadow: 0 6px 18px rgba(247, 148, 29, 0.35);
}

.btn-primary:hover {
  transform: translateY(-2px);
  box-shadow: 0 10px 24px rgba(247, 148, 29, 0.45);
}

.btn-ghost {
  background: var(--white);
  color: var(--ink);
  border: 1px solid var(--line);
  box-shadow: 0 4px 14px rgba(131, 84, 12, 0.08);
}

.btn-ghost:hover { transform: translateY(-2px); }

.nav-toggle { display: none; }

/* ---------------- Hero ---------------- */

.hero {
  background: linear-gradient(180deg, var(--cream) 0%, #F9EDDC 55%, var(--cream-deep) 100%);
  padding: 84px 0 70px;
  text-align: center;
}

.hero-banner {
  width: min(360px, 80%);
  margin: 0 auto 28px;
  border-radius: 16px;
  box-shadow: 0 12px 32px rgba(247, 148, 29, 0.30);
}

.hero h1 {
  font-size: clamp(2.2rem, 5.2vw, 4rem);
  font-weight: 700;
  line-height: 1.14;
  letter-spacing: -0.5px;
  max-width: 900px;
  margin: 0 auto;
}

.hero h1 .accent { color: var(--primary); }

.hero p.lede {
  max-width: 640px;
  margin: 26px auto 0;
  font-size: 1.08rem;
  color: var(--ink-soft);
}

.hero-actions {
  margin-top: 36px;
  display: flex;
  gap: 16px;
  justify-content: center;
  flex-wrap: wrap;
}

.hero-kicker {
  display: inline-block;
  background: var(--primary-soft);
  color: var(--primary-deep);
  border: 1px solid #F6D9AE;
  font-size: 0.78rem;
  font-weight: 600;
  letter-spacing: 1.6px;
  text-transform: uppercase;
  padding: 7px 18px;
  border-radius: 999px;
  margin-bottom: 24px;
}

/* ---------------- Stats strip ---------------- */

.stats {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 18px;
  margin: 60px auto 0;
  position: relative;
  z-index: 5;
}

.stat-card {
  background: var(--white);
  border: 1px solid var(--line);
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-card);
  padding: 22px 18px;
  text-align: center;
}

.stat-card .num {
  font-size: 1.7rem;
  font-weight: 700;
  color: var(--primary-dark);
  line-height: 1.2;
}

.stat-card .label {
  font-size: 0.85rem;
  color: var(--ink-muted);
  margin-top: 4px;
}

/* ---------------- Sections ---------------- */

.section { padding: 84px 0; }

.section-kicker {
  color: var(--primary-dark);
  font-size: 0.8rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 2px;
}

.section h2 {
  font-size: clamp(1.7rem, 3.4vw, 2.5rem);
  font-weight: 700;
  line-height: 1.25;
  margin-top: 10px;
}

.section h2 .accent { color: var(--primary); }

.section .section-intro {
  color: var(--ink-soft);
  max-width: 620px;
  margin-top: 16px;
}

/* Story / snippet split */

.split {
  display: grid;
  grid-template-columns: 1.05fr 0.95fr;
  gap: 56px;
  align-items: center;
}

.split .copy p {
  color: var(--ink-soft);
  margin-top: 18px;
}

.split .copy p strong { color: var(--ink); }

.snippet-figures {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 20px;
}

.snippet-figures figure:last-child { margin-top: 42px; }

.doc-frame {
  background: var(--white);
  border: 1px solid var(--line);
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-card);
  padding: 10px;
  transition: transform 0.25s;
}

.doc-frame:hover { transform: translateY(-4px) rotate(-0.4deg); }

.doc-frame img { border-radius: 8px; }

.doc-frame figcaption {
  font-size: 0.78rem;
  color: var(--ink-muted);
  padding: 10px 6px 4px;
  text-align: center;
  font-style: italic;
}

/* Feature cards */

.cards {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 24px;
  margin-top: 48px;
}

.card {
  background: var(--white);
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  padding: 32px 28px;
  box-shadow: var(--shadow-card);
  transition: transform 0.2s;
}

.card:hover { transform: translateY(-5px); }

.card .icon {
  width: 52px;
  height: 52px;
  border-radius: 14px;
  background: var(--primary-soft);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.5rem;
  margin-bottom: 18px;
}

.card h3 { font-size: 1.12rem; font-weight: 600; }

.card p { font-size: 0.93rem; color: var(--ink-soft); margin-top: 10px; }

/* CTA band */

.cta-band {
  background: linear-gradient(120deg, var(--primary-deep), var(--primary) 60%, #FFAE4D);
  border-radius: var(--radius-lg);
  color: #fff;
  padding: 56px 48px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 32px;
  flex-wrap: wrap;
  box-shadow: 0 18px 50px rgba(217, 122, 10, 0.35);
}

.cta-band h2 { font-size: clamp(1.5rem, 3vw, 2.1rem); }

.cta-band p { opacity: 0.92; margin-top: 8px; max-width: 560px; }

.cta-band .btn {
  background: #fff;
  color: var(--primary-deep);
  font-weight: 700;
}

/* ---------------- Footer ---------------- */

.site-footer {
  background: #241B0E;
  color: #D8CDBC;
  margin-top: 90px;
  padding: 60px 0 28px;
}

.footer-grid {
  display: grid;
  grid-template-columns: 1.3fr 0.7fr 1fr 1fr;
  gap: 40px;
}

.site-footer .brand-name { color: #fff; }

.site-footer p { font-size: 0.92rem; margin-top: 14px; max-width: 380px; }

.site-footer h4 {
  color: #fff;
  font-size: 0.95rem;
  margin-bottom: 14px;
  letter-spacing: 0.5px;
}

.site-footer ul { list-style: none; }

.site-footer li { margin-bottom: 10px; font-size: 0.92rem; }

.site-footer a:hover { color: var(--primary); }

.footer-bottom {
  border-top: 1px solid rgba(255, 255, 255, 0.12);
  margin-top: 44px;
  padding-top: 22px;
  font-size: 0.82rem;
  color: #A79A85;
  display: flex;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 10px;
}

/* ---------------- Homepage scroll sections ---------------- */

.scroll-section {
  padding: 84px 0;
  position: relative;
  scroll-margin-top: 90px;
}

/* Slide-in animations must never create sideways page scroll */
.scroll-section,
.section {
  overflow-x: hidden;
  overflow-x: clip;
}

.scroll-section.band-white {
  background: var(--white);
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
}

.scroll-section.band-soft {
  background: var(--primary-softer);
}

/* h2 / intro sizing inside scroll sections (mirrors .section) */
.scroll-section h2 {
  font-size: clamp(1.7rem, 3.4vw, 2.5rem);
  font-weight: 700;
  line-height: 1.25;
  margin-top: 10px;
}

.scroll-section h2 .accent { color: var(--primary); }

.scroll-section .section-intro {
  color: var(--ink-soft);
  max-width: 620px;
  margin-top: 16px;
}

/* Numbered demarcation marker at the top of each scroll section */
.scroll-marker {
  display: flex;
  align-items: center;
  gap: 14px;
  margin-bottom: 40px;
}

.scroll-marker::after {
  content: "";
  flex: 1;
  height: 2px;
  border-radius: 2px;
  background: linear-gradient(90deg, var(--primary), rgba(247, 148, 29, 0));
}

.marker-num {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 42px;
  height: 42px;
  border-radius: 50%;
  background: var(--primary-soft);
  border: 1px solid #F6D9AE;
  color: var(--primary-deep);
  font-weight: 700;
  font-size: 0.9rem;
}

.marker-label {
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: 2px;
  text-transform: uppercase;
  color: var(--ink-muted);
}

/* Reveal-on-scroll animation */
.reveal {
  opacity: 0;
  transform: translateY(28px);
  transition: opacity 0.7s ease, transform 0.7s ease;
}

.reveal.in-view {
  opacity: 1;
  transform: none;
}

/* Fine-grained reveal for the narrative write-ups and documents.
   Uses `translate` (not `transform`) so it composes with the
   rotate() the floated figures already carry. */
.reveal-item {
  opacity: 0;
  translate: 0 26px;
  transition: opacity 0.65s ease, translate 0.65s ease;
}

.reveal-item.in-view {
  opacity: 1;
  translate: 0 0;
}

/* Milestones cascade in one after another */
.milestones li.reveal-item:nth-child(2) { transition-delay: 0.12s; }
.milestones li.reveal-item:nth-child(3) { transition-delay: 0.24s; }
.milestones li.reveal-item:nth-child(4) { transition-delay: 0.36s; }

@media (prefers-reduced-motion: reduce) {
  .reveal { opacity: 1; transform: none; transition: none; }
  .reveal-item { opacity: 1; translate: none; transition: none; }
}

/* ---------------- e-KLR app section (scroll 4) ---------------- */

.app-feature {
  display: grid;
  grid-template-columns: 300px 1fr;
  gap: 52px;
  align-items: center;
}

.app-phone {
  border-radius: 22px;
  overflow: hidden;
  border: 1px solid var(--line);
  box-shadow: 0 16px 40px rgba(131, 84, 12, 0.22);
  transform: rotate(-2deg);
}

.app-chip {
  display: inline-block;
  background: var(--primary-soft);
  border: 1px solid #F6D9AE;
  color: var(--primary-deep);
  font-size: 0.74rem;
  font-weight: 700;
  letter-spacing: 2px;
  text-transform: uppercase;
  padding: 6px 16px;
  border-radius: 999px;
}

.app-copy h2 { margin-top: 16px; }

.app-copy p {
  color: var(--ink-soft);
  font-size: 0.98rem;
  margin-top: 14px;
}

.app-copy .app-note {
  font-size: 0.84rem;
  font-style: italic;
  color: var(--ink-muted);
}

.app-copy .hero-actions { margin-top: 26px; }

/* ---------------- Contact cards (scroll 5 + contact page) ---------------- */

.contact-cards {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 24px;
  margin-top: 48px;
}

.contact-card {
  background: var(--white);
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  padding: 32px 28px;
  box-shadow: var(--shadow-card);
  transition: transform 0.2s;
}

.contact-card:hover { transform: translateY(-5px); }

.contact-card h3 {
  font-size: 1.06rem;
  font-weight: 600;
  display: flex;
  align-items: center;
  gap: 10px;
}

.contact-card ul {
  list-style: none;
  margin-top: 16px;
}

.contact-card li {
  color: var(--ink-soft);
  font-size: 0.95rem;
  margin-bottom: 8px;
}

.contact-card a {
  color: var(--primary-dark);
  font-weight: 500;
}

.contact-card a:hover { text-decoration: underline; }

.contact-card-app { background: var(--primary-soft); }

/* ---------------- Page hero (inner pages) ---------------- */

.page-hero {
  background: linear-gradient(180deg, var(--cream) 0%, #F7EBD9 100%);
  padding: 70px 0 56px;
  text-align: center;
  border-bottom: 1px solid var(--line);
}

.page-hero h1 {
  font-size: clamp(2rem, 4.4vw, 3.2rem);
  font-weight: 700;
  line-height: 1.18;
}

.page-hero h1 .accent { color: var(--primary); }

.page-hero p {
  max-width: 620px;
  margin: 18px auto 0;
  color: var(--ink-soft);
}

/* ---------------- Article (blog) ---------------- */

.article {
  max-width: 780px;
  margin: 0 auto;
  padding: 70px 0 30px;
}

.article-meta {
  display: flex;
  align-items: center;
  gap: 14px;
  color: var(--ink-muted);
  font-size: 0.86rem;
  margin-bottom: 34px;
  flex-wrap: wrap;
}

.article-meta .dot { width: 4px; height: 4px; border-radius: 50%; background: var(--primary); }

.article p {
  color: var(--ink-soft);
  font-size: 1.04rem;
  margin-bottom: 24px;
}

.article p strong { color: var(--ink); }

.article .drop::first-letter {
  color: var(--primary-dark);
  font-size: 3.3em;
  font-weight: 700;
  float: left;
  line-height: 0.85;
  padding-right: 10px;
  padding-top: 4px;
}

.article h2 {
  font-size: 1.5rem;
  margin: 44px 0 16px;
  position: relative;
  padding-left: 18px;
}

.article h2::before {
  content: "";
  position: absolute;
  left: 0;
  top: 6px;
  bottom: 6px;
  width: 5px;
  border-radius: 4px;
  background: linear-gradient(180deg, var(--primary), #FFBE68);
}

.milestones {
  background: var(--white);
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-card);
  padding: 30px 34px;
  margin: 10px 0 34px;
  list-style: none;
}

.milestones li {
  display: flex;
  gap: 18px;
  padding: 14px 0;
  color: var(--ink-soft);
  font-size: 0.98rem;
}

.milestones li + li { border-top: 1px dashed var(--line); }

.milestones .year {
  flex: 0 0 84px;
  font-weight: 700;
  color: var(--primary-dark);
}

/* Dynamically positioned article figures */

.article figure {
  margin: 34px 0 38px;
  background: var(--white);
  border: 1px solid var(--line);
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-card);
  padding: 12px;
}

.article figure img { border-radius: 8px; width: 100%; }

.article figure figcaption {
  text-align: center;
  font-size: 0.84rem;
  font-style: italic;
  color: var(--ink-muted);
  padding: 12px 8px 4px;
}

.article .clear { clear: both; }

/* Story cards — blog-style entries: write-up on top, its document(s)
   below, each card a clearly demarcated standalone article */
.story-card {
  display: flex;
  flex-direction: column;
  gap: 26px;
  background: var(--white);
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-card);
  padding: 34px 40px 30px;
  margin: 30px 0;
  transition: box-shadow 0.25s;
}

.story-card:hover { box-shadow: 0 14px 44px rgba(131, 84, 12, 0.16); }

.story-card .story-copy { order: 1; }
.story-card .story-media { order: 2; }

.article .story-card figure {
  margin: 0;
  background: none;
  border: none;
  box-shadow: none;
  padding: 0;
}

.story-media img {
  width: auto;
  max-width: 100%;
  max-height: 420px;
  margin: 0 auto;
  border-radius: 10px;
  border: 1px solid var(--line);
  box-shadow: 0 8px 22px rgba(131, 84, 12, 0.14);
}

.story-media.pair {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
  align-items: start;
  justify-items: center;
}

.story-media.pair figcaption { grid-column: 1 / -1; }

.story-num {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background: var(--primary-soft);
  border: 1px solid #F6D9AE;
  color: var(--primary-deep);
  font-weight: 700;
  font-size: 0.85rem;
  margin-bottom: 14px;
}

.story-copy p {
  margin: 0 0 14px;
  font-size: 1.04rem;
}

.story-copy p:last-child { margin-bottom: 0; }

/* Cards rise gently into view */
.story-card.reveal-item { translate: 0 34px; }
.story-card.reveal-item.in-view { translate: 0 0; }

@media (max-width: 900px) {
  .story-card { gap: 20px; padding: 24px 22px 22px; }
  .story-media img { max-height: 340px; }
  .story-media.pair { grid-template-columns: 1fr; }
}

.pull-quote {
  border-left: 5px solid var(--primary);
  background: var(--primary-soft);
  border-radius: 0 var(--radius-md) var(--radius-md) 0;
  padding: 24px 28px;
  margin: 34px 0;
  font-size: 1.08rem;
  font-style: italic;
  color: var(--primary-deep);
  font-weight: 500;
}

/* Lightbox */

.lightbox {
  position: fixed;
  inset: 0;
  background: rgba(20, 12, 2, 0.88);
  z-index: 1200;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 30px;
  cursor: zoom-out;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.25s;
}

.lightbox.open { opacity: 1; pointer-events: auto; }

.lightbox img {
  max-height: 92vh;
  max-width: 92vw;
  width: auto;
  border-radius: 10px;
  box-shadow: 0 30px 90px rgba(0, 0, 0, 0.5);
}

.article figure img { cursor: zoom-in; }

/* ---------------- About page ---------------- */

.about-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 56px;
  align-items: start;
}

.about-grid .copy p { color: var(--ink-soft); margin-top: 18px; }

.timeline {
  list-style: none;
  position: relative;
  padding-left: 30px;
}

.timeline::before {
  content: "";
  position: absolute;
  left: 8px;
  top: 8px;
  bottom: 8px;
  width: 3px;
  border-radius: 3px;
  background: linear-gradient(180deg, var(--primary), #F3D9AE);
}

.timeline li { position: relative; padding: 0 0 30px 18px; }

.timeline li::before {
  content: "";
  position: absolute;
  left: -30px;
  top: 6px;
  width: 19px;
  height: 19px;
  border-radius: 50%;
  background: var(--white);
  border: 5px solid var(--primary);
  box-shadow: 0 0 0 4px var(--primary-soft);
}

.timeline .year {
  font-weight: 700;
  color: var(--primary-dark);
  font-size: 1.02rem;
}

.timeline p { color: var(--ink-soft); font-size: 0.95rem; margin-top: 4px; }

.value-strip {
  background: var(--white);
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-card);
  padding: 36px 40px;
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 30px;
  margin-top: 56px;
}

.value-strip .value h3 {
  font-size: 1.02rem;
  display: flex;
  align-items: center;
  gap: 10px;
}

.value-strip .value p { font-size: 0.9rem; color: var(--ink-soft); margin-top: 8px; }

/* ---------------- Responsive ---------------- */

@media (max-width: 960px) {
  .stats { grid-template-columns: repeat(2, 1fr); }
  .split, .about-grid { grid-template-columns: 1fr; gap: 40px; }
  .cards { grid-template-columns: 1fr; }
  .footer-grid { grid-template-columns: 1fr; gap: 30px; }
  .value-strip { grid-template-columns: 1fr; }
  .app-feature { grid-template-columns: 1fr; gap: 32px; }
  .app-phone { max-width: 260px; margin: 0 auto; transform: none; }
  .contact-cards { grid-template-columns: 1fr; }
}

@media (max-width: 720px) {
  .main-nav {
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    background: var(--cream);
    border-bottom: 1px solid var(--line);
    flex-direction: column;
    gap: 0;
    display: none;
    padding: 10px 0 16px;
  }
  .main-nav.open { display: flex; }
  .main-nav a { padding: 12px 24px; width: 100%; text-align: center; }
  .nav-toggle {
    display: block;
    background: none;
    border: 1px solid var(--line);
    border-radius: 10px;
    padding: 8px 12px;
    font-size: 1.2rem;
    cursor: pointer;
    color: var(--ink);
  }
  .header-cta { display: none; }
  .hero { padding: 60px 0 56px; }
  .section { padding: 60px 0; }
  .cta-band { padding: 40px 28px; }
}
