/*
Theme Name: Cosmology of Light
Theme URI: https://cosmologyoflight.com
Author: Pravir Malik
Description: A custom theme for the Cosmology of Light archive, books, videos, workshops, and retreats.
Version: 0.1.0
Text Domain: cosmology-light
*/

:root {
  --ink: #181725;
  --text: #353245;
  --muted: #686275;
  --paper: #fbfaf6;
  --soft: #f1eee8;
  --line: #d9d1c5;
  --blue: #45acd0;
  --blue-deep: #12647d;
  --gold: #b88a3f;
  --rose: #8f4f6b;
  --green: #437d66;
  --white: #fff;
  --shadow: 0 18px 50px rgba(24, 23, 37, 0.12);
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  background: var(--paper);
  color: var(--text);
  font-family: "Inter", "Avenir Next", Avenir, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  font-size: 17px;
  line-height: 1.65;
  letter-spacing: 0;
}

a {
  color: var(--blue-deep);
  text-decoration-thickness: 1px;
  text-underline-offset: 0.18em;
}

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

.site-header {
  position: sticky;
  top: 0;
  z-index: 20;
  border-bottom: 1px solid rgba(217, 209, 197, 0.75);
  background: rgba(251, 250, 246, 0.94);
  backdrop-filter: blur(18px);
}

.nav-wrap {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  width: min(1180px, calc(100% - 36px));
  min-height: 76px;
  margin: 0 auto;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  color: var(--ink);
  font-family: Georgia, "Times New Roman", serif;
  font-size: 22px;
  line-height: 1;
  text-decoration: none;
  white-space: nowrap;
}

.brand img {
  width: 44px;
  height: 44px;
  object-fit: contain;
}

.site-nav {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 18px;
  flex-wrap: wrap;
  font-size: 14px;
}

.site-nav a {
  color: var(--ink);
  text-decoration: none;
}

.site-nav a:hover {
  color: var(--blue-deep);
}

.hero {
  display: grid;
  grid-template-columns: minmax(0, 1.05fr) minmax(280px, 0.95fr);
  gap: clamp(32px, 5vw, 72px);
  align-items: center;
  width: min(1180px, calc(100% - 36px));
  min-height: calc(100vh - 76px);
  margin: 0 auto;
  padding: clamp(48px, 8vw, 92px) 0;
}

.eyebrow {
  margin: 0 0 14px;
  color: var(--gold);
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.16em;
  text-transform: uppercase;
}

h1,
h2,
h3 {
  margin: 0;
  color: var(--ink);
  font-family: Georgia, "Times New Roman", serif;
  font-weight: 500;
  line-height: 1.08;
}

h1 {
  max-width: 820px;
  font-size: clamp(48px, 8vw, 96px);
  overflow-wrap: anywhere;
}

h2 {
  font-size: clamp(34px, 5vw, 58px);
}

h3 {
  font-size: 24px;
}

.lede {
  max-width: 720px;
  margin: 24px 0 0;
  color: var(--text);
  font-size: clamp(19px, 2.1vw, 24px);
  line-height: 1.55;
}

.hero-actions,
.button-row {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 32px;
}

.button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  max-width: 100%;
  min-height: 44px;
  padding: 10px 18px;
  border: 1px solid var(--ink);
  border-radius: 6px;
  background: var(--ink);
  color: var(--white);
  font-weight: 700;
  line-height: 1.2;
  text-align: center;
  text-decoration: none;
  white-space: normal;
}

.button.secondary {
  background: transparent;
  color: var(--ink);
}

.hero-orbit {
  position: relative;
  display: grid;
  place-items: center;
  min-height: 500px;
}

.burst-field {
  position: absolute;
  inset: 7%;
  border: 1px solid rgba(184, 138, 63, 0.32);
  border-radius: 999px;
}

.burst-field::before,
.burst-field::after {
  position: absolute;
  inset: 11%;
  border: 1px solid rgba(69, 172, 208, 0.26);
  border-radius: 999px;
  content: "";
}

.burst-field::after {
  inset: 24%;
  border-color: rgba(67, 125, 102, 0.26);
}

.hero-logo {
  position: relative;
  width: min(310px, 62vw);
  padding: 46px;
  border-radius: 50%;
  background: var(--white);
  box-shadow: var(--shadow);
}

.section {
  padding: clamp(56px, 8vw, 96px) 0;
  border-top: 1px solid rgba(217, 209, 197, 0.72);
}

.section.alt {
  background: var(--soft);
}

.section-inner {
  width: min(1180px, calc(100% - 36px));
  margin: 0 auto;
}

.section-head {
  display: grid;
  grid-template-columns: minmax(0, 0.8fr) minmax(260px, 0.8fr);
  gap: 32px;
  align-items: end;
  margin-bottom: 34px;
}

.section-head p {
  margin: 0;
  color: var(--muted);
}

.grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 18px;
}

.grid.two {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.card {
  min-height: 100%;
  padding: 24px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--white);
}

.card p {
  margin: 12px 0 0;
  color: var(--muted);
}

.card .meta {
  margin-bottom: 12px;
  color: var(--gold);
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.link-card {
  color: inherit;
  text-decoration: none;
}

.link-card:hover {
  border-color: var(--blue);
}

.books-list {
  display: grid;
  gap: 14px;
}

.book-row {
  display: grid;
  grid-template-columns: 42px minmax(0, 1fr) auto;
  gap: 18px;
  align-items: start;
  padding: 18px 0;
  border-top: 1px solid var(--line);
}

.book-number {
  color: var(--gold);
  font-family: Georgia, "Times New Roman", serif;
  font-size: 28px;
  line-height: 1;
}

.book-row h3 {
  font-size: 22px;
}

.book-row p {
  margin: 8px 0 0;
  color: var(--muted);
}

.video-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 18px;
}

.video-frame {
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #000;
  aspect-ratio: 16 / 9;
}

.video-frame iframe {
  width: 100%;
  height: 100%;
  border: 0;
}

.retreat-band {
  display: grid;
  grid-template-columns: minmax(0, 0.8fr) minmax(300px, 1fr);
  gap: 34px;
  align-items: center;
}

.retreat-images {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px;
}

.retreat-images img {
  border: 1px solid var(--line);
  border-radius: 8px;
  box-shadow: 0 12px 36px rgba(24, 23, 37, 0.14);
}

.archive-tools {
  display: grid;
  grid-template-columns: minmax(220px, 0.65fr) minmax(220px, 0.65fr) minmax(280px, 1fr);
  gap: 12px;
  margin: 0 0 24px;
}

.archive-tools input,
.archive-tools select {
  width: 100%;
  min-height: 44px;
  border: 1px solid var(--line);
  border-radius: 6px;
  background: var(--white);
  color: var(--text);
  font: inherit;
  padding: 8px 12px;
}

.topic-row {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.topic {
  display: inline-flex;
  padding: 7px 10px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: var(--white);
  color: var(--text);
  font-size: 14px;
}

.footer {
  padding: 42px 0;
  background: var(--ink);
  color: rgba(255, 255, 255, 0.78);
}

.footer-inner {
  display: flex;
  justify-content: space-between;
  gap: 24px;
  width: min(1180px, calc(100% - 36px));
  margin: 0 auto;
}

.footer a {
  color: var(--white);
}

.page-shell {
  width: min(980px, calc(100% - 36px));
  margin: 0 auto;
  padding: clamp(54px, 8vw, 92px) 0;
}

.page-shell h1 {
  font-size: clamp(42px, 7vw, 76px);
}

.page-content {
  margin-top: 28px;
}

@media (max-width: 880px) {
  .nav-wrap,
  .footer-inner {
    align-items: flex-start;
    flex-direction: column;
  }

  .site-nav {
    justify-content: flex-start;
  }

  .hero,
  .section-head,
  .retreat-band {
    grid-template-columns: 1fr;
  }

  .hero {
    min-height: 0;
  }

  .hero-orbit {
    min-height: 360px;
  }

  .grid,
  .grid.two,
  .video-grid,
  .archive-tools {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 620px) {
  body {
    overflow-x: hidden;
  }

  .nav-wrap,
  .hero,
  .section-inner,
  .page-shell,
  .footer-inner {
    width: min(1180px, calc(100% - 32px));
  }

  .hero {
    overflow: hidden;
  }

  .hero > * {
    min-width: 0;
    max-width: 100%;
  }

  .hero > div:first-child {
    width: 100%;
    max-width: 330px;
  }

  .brand {
    font-size: 20px;
  }

  .site-nav {
    gap: 12px;
    font-size: 13px;
  }

  h1 {
    max-width: 100%;
    font-size: 38px;
    line-height: 1.05;
    word-break: normal;
  }

  .page-shell h1 {
    font-size: 40px;
  }

  .lede {
    max-width: 100%;
    font-size: 19px;
  }

  .hero-orbit {
    justify-self: start;
    width: 100%;
    max-width: 330px;
    min-height: 330px;
    overflow: hidden;
  }

  .hero-logo {
    width: min(280px, 72vw);
    padding: 38px;
  }

  .hero-actions .button,
  .button-row .button {
    flex: 1 1 100%;
  }

  .hero-actions,
  .button-row {
    max-width: 330px;
  }

  .book-row {
    grid-template-columns: 34px minmax(0, 1fr);
  }

  .book-row .button {
    grid-column: 2;
    width: max-content;
  }

  .retreat-images {
    grid-template-columns: 1fr;
  }
}
