:root {
  --ink: #12150f;
  --ink-soft: #2a2f24;
  --forest: #1a2218;
  --forest-deep: #0d120c;
  --leaf: #3d4a32;
  --gold: #c6a46a;
  --gold-bright: #e0c48a;
  --gold-dim: #8a7348;
  --ivory: #f3eee4;
  --ivory-dim: #e6dfd1;
  --paper: #f7f3ea;
  --mist: #cfc8b8;
  --line: rgba(198, 164, 106, 0.28);
  --shadow: 0 24px 60px rgba(8, 10, 6, 0.28);
  --serif: "Cormorant Garamond", "Noto Serif Sinhala", Georgia, serif;
  --sans: "Source Sans 3", "Noto Sans Sinhala", system-ui, sans-serif;
}

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

html { scroll-behavior: smooth; }

body {
  font-family: var(--sans);
  color: var(--ink);
  background: var(--paper);
  line-height: 1.7;
  font-size: 17px;
}

img { max-width: 100%; display: block; }
a { color: inherit; text-decoration: none; }
button { font: inherit; cursor: pointer; border: 0; background: none; }

.wrap {
  width: min(1120px, calc(100% - 40px));
  margin: 0 auto;
}

.eyebrow {
  font-family: var(--sans);
  letter-spacing: 0.22em;
  text-transform: uppercase;
  font-size: 0.72rem;
  color: var(--gold-dim);
  font-weight: 600;
}

h1, h2, h3, .serif { font-family: var(--serif); font-weight: 500; }

/* Header */
.site-header {
  position: sticky;
  top: 0;
  z-index: 40;
  background: rgba(13, 18, 12, 0.88);
  backdrop-filter: blur(16px);
  border-bottom: 1px solid rgba(198, 164, 106, 0.16);
}

.nav {
  display: flex;
  align-items: center;
  justify-content: space-between;
  min-height: 74px;
  gap: 20px;
}

.brand {
  display: flex;
  align-items: center;
  gap: 12px;
  color: var(--ivory);
}

.brand-mark {
  width: 34px;
  height: 34px;
  color: var(--gold);
}

.brand-name {
  font-family: var(--serif);
  font-size: 1.35rem;
  letter-spacing: 0.16em;
  text-transform: uppercase;
}

.brand-sub {
  display: block;
  font-family: var(--sans);
  font-size: 0.68rem;
  letter-spacing: 0.18em;
  color: var(--mist);
  margin-top: 1px;
}

.nav-links {
  display: flex;
  align-items: center;
  gap: 26px;
  list-style: none;
}

.nav-links a {
  color: var(--ivory-dim);
  font-size: 0.86rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.nav-links a:hover,
.nav-links a.active { color: var(--gold-bright); }

.menu-toggle {
  display: none;
  width: 42px;
  height: 42px;
  color: var(--ivory);
}

/* Hero */
.hero {
  position: relative;
  min-height: 92vh;
  display: grid;
  place-items: end start;
  color: var(--ivory);
  overflow: hidden;
  background: var(--forest-deep);
}

.hero img {
  position: absolute;
  inset: -4%;
  width: 108%;
  height: 108%;
  object-fit: cover;
  animation: drift 48s ease-in-out infinite alternate;
}

@keyframes drift {
  from { transform: scale(1) translate3d(0, 0, 0); }
  to { transform: scale(1.06) translate3d(-1.5%, -1%, 0); }
}

.hero-copy {
  position: relative;
  z-index: 2;
  padding: 0 0 88px;
  max-width: 760px;
  animation: rise 1.4s ease both;
}

@keyframes rise {
  from { opacity: 0; transform: translateY(18px); }
  to { opacity: 1; transform: none; }
}

.brand img.logo {
  animation: turn 90s linear infinite;
}

@keyframes turn {
  to { transform: rotate(360deg); }
}

.hero::after {
  content: "";
  position: absolute;
  inset: 0;
  background:
    linear-gradient(180deg, rgba(8,10,6,0.18) 0%, rgba(8,10,6,0.55) 48%, rgba(8,10,6,0.92) 100%);
}

.hero-copy {
  position: relative;
  z-index: 2;
  padding: 0 0 88px;
  max-width: 760px;
}

.hero h1 {
  font-size: clamp(3rem, 8vw, 6.4rem);
  line-height: 0.92;
  letter-spacing: 0.04em;
  margin: 14px 0 18px;
}

.hero p {
  max-width: 38rem;
  color: var(--ivory-dim);
  font-size: 1.12rem;
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 14px;
  margin-top: 32px;
}

/* Buttons */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 48px;
  padding: 0 22px;
  border: 1px solid var(--gold);
  color: var(--gold-bright);
  letter-spacing: 0.14em;
  text-transform: uppercase;
  font-size: 0.78rem;
  transition: 0.25s ease;
}

.btn:hover { background: var(--gold); color: var(--forest-deep); }
.btn.solid { background: var(--gold); color: var(--forest-deep); }
.btn.solid:hover { background: var(--gold-bright); }
.btn.dark {
  border-color: var(--ink);
  color: var(--ink);
}
.btn.dark:hover { background: var(--ink); color: var(--ivory); }

/* Sections */
.section { padding: 92px 0; }
.section.alt { background: #efe8da; }
.section.dark {
  background: var(--forest-deep);
  color: var(--ivory);
}

.section-head {
  max-width: 680px;
  margin-bottom: 48px;
}

.section-head h2 {
  font-size: clamp(2.1rem, 4vw, 3.4rem);
  line-height: 1.05;
  margin: 10px 0 16px;
}

.lede { font-size: 1.12rem; color: var(--ink-soft); }
.section.dark .lede { color: var(--mist); }

/* Cards / grids */
.grid-3, .grid-2, .grid-4 {
  display: grid;
  gap: 22px;
}
.grid-3 { grid-template-columns: repeat(3, 1fr); }
.grid-2 { grid-template-columns: repeat(2, 1fr); }
.grid-4 { grid-template-columns: repeat(4, 1fr); }

.card {
  background: #fffdf8;
  border: 1px solid rgba(42, 47, 36, 0.08);
  padding: 28px 26px;
  box-shadow: 0 10px 30px rgba(18, 21, 15, 0.04);
}

.card h3 {
  font-size: 1.7rem;
  margin: 8px 0 10px;
}

.card p { color: var(--ink-soft); }

.dark-card {
  background: rgba(255,255,255,0.03);
  border: 1px solid var(--line);
  padding: 28px 26px;
}

.player iframe {
  width: 100%;
  height: 150px;
  border: 0;
  margin-top: 12px;
  background: #111;
}
.reading-head img { width: min(280px, 70%); margin: 22px 0; }
.reading-head h1 { font-size: clamp(2.4rem, 5vw, 4rem); line-height: 0.95; margin: 8px 0; }
.reading-head .sub { font-family: var(--serif); font-style: italic; font-size: 1.4rem; }
.reading-body { max-width: 760px; padding-bottom: 80px; }
.reading-body h1, .reading-body h2 { font-size: 2rem; margin: 1.6em 0 0.4em; }
.reading-body p { margin: 0.8em 0; }
.reading-body em { font-family: var(--serif); }
.book img { width: 100%; border: 1px solid rgba(42, 47, 36, 0.08); }
.book h3 { font-size: 1.55rem; margin: 14px 0 4px; }
.book p { color: var(--ink-soft); }

.figure img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

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

.split.reverse { grid-template-columns: 0.95fr 1.05fr; }
.split .figure { min-height: 420px; }

.quote {
  font-family: var(--serif);
  font-size: clamp(1.5rem, 3vw, 2.15rem);
  line-height: 1.35;
  font-style: italic;
}

.meta { color: var(--gold-dim); font-size: 0.86rem; letter-spacing: 0.04em; }

.list {
  list-style: none;
  display: grid;
  gap: 16px;
}

.list li {
  padding-top: 16px;
  border-top: 1px solid var(--line);
}

.list a:hover h3 { color: var(--gold-dim); }

.pill {
  display: inline-block;
  border: 1px solid var(--line);
  padding: 4px 10px;
  font-size: 0.72rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--gold-dim);
  margin-bottom: 8px;
}

/* Page hero */
.page-hero {
  background: var(--forest-deep);
  color: var(--ivory);
  padding: 92px 0 72px;
}

.page-hero h1 {
  font-size: clamp(2.6rem, 6vw, 4.8rem);
  line-height: 0.95;
  margin: 12px 0 18px;
}

.page-hero p { max-width: 40rem; color: var(--mist); }

/* Form */
form { display: grid; gap: 14px; max-width: 560px; }
label { font-size: 0.82rem; letter-spacing: 0.08em; text-transform: uppercase; color: var(--gold-dim); }
input, textarea, select {
  width: 100%;
  border: 1px solid rgba(42,47,36,0.18);
  background: #fffdf8;
  padding: 14px 14px;
  font: inherit;
  color: var(--ink);
}
textarea { min-height: 140px; resize: vertical; }

.note {
  font-size: 0.92rem;
  color: var(--ink-soft);
  max-width: 40rem;
}

.sit-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 22px;
}

.sit-card {
  background: #fffdf8;
  border: 1px solid rgba(42, 47, 36, 0.08);
  padding: 28px 26px;
}

.sit-card .time {
  font-family: var(--serif);
  font-size: 2rem;
  line-height: 1;
  margin: 8px 0 18px;
}

.sit-meta {
  display: grid;
  gap: 6px;
  margin: 16px 0 22px;
  color: var(--ink-soft);
  font-size: 0.95rem;
}

.sit-meta strong { color: var(--ink); letter-spacing: 0.04em; }

.brand img.logo {
  width: 34px;
  height: 34px;
  object-fit: contain;
  border-radius: 50%;
}

/* Footer */
.site-footer {
  background: var(--forest-deep);
  color: var(--mist);
  padding: 56px 0 28px;
  border-top: 1px solid var(--line);
}

.foot-grid {
  display: grid;
  grid-template-columns: 1.4fr 1fr 1fr;
  gap: 32px;
  margin-bottom: 40px;
}

.site-footer h3 {
  color: var(--ivory);
  font-size: 1.3rem;
  margin-bottom: 12px;
}

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

.copyright {
  border-top: 1px solid rgba(198,164,106,0.14);
  padding-top: 18px;
  font-size: 0.82rem;
}

/* Utilities */
.mt-8 { margin-top: 8px; }
.mt-16 { margin-top: 16px; }
.mt-28 { margin-top: 28px; }
.gold { color: var(--gold); }

.reveal {
  opacity: 0;
  transform: translateY(16px);
  transition: opacity 0.9s ease, transform 0.9s ease;
}
.reveal.in { opacity: 1; transform: none; }

@media (prefers-reduced-motion: reduce) {
  .hero img, .hero-copy, .brand img.logo, .reveal {
    animation: none;
    opacity: 1;
    transform: none;
    transition: none;
  }
}

@media (max-width: 900px) {
  .grid-3, .grid-4, .grid-2, .split, .split.reverse, .foot-grid, .books {
    grid-template-columns: 1fr;
  }
  .menu-toggle { display: grid; place-items: center; }
  .nav-links {
    display: none;
    position: absolute;
    inset: 74px 0 auto;
    background: rgba(13,18,12,0.97);
    flex-direction: column;
    align-items: flex-start;
    padding: 24px 22px 32px;
    gap: 18px;
  }
  .nav-links.open { display: flex; }
  .hero { min-height: 84vh; }
  .section { padding: 68px 0; }
  .split .figure { min-height: 280px; }
  .sit-grid { grid-template-columns: 1fr; }
}
