/* Meaning of The Odyssey
   Palette and mood taken from the film portrait: sun-bleached desert, bone
   cream type, dust, bronze light. Mobile first, one column, built to read. */

:root {
  --ink:        #100C08;
  --ink-2:      #171109;
  --ink-3:      #1E160D;
  --bone:       #F4EADA;
  --bone-dim:   #CFC1AB;
  --bone-faint: #9C8F7C;
  --bronze:     #C79A5B;
  --clay:       #B4744A;
  --line:       rgba(199, 154, 91, 0.20);
  --line-soft:  rgba(199, 154, 91, 0.10);

  --act-1: #C79A5B;
  --act-2: #B4744A;
  --act-3: #6E7F84;
  --act-4: #8A9366;

  --measure: 36rem;
  --pad: 1.375rem;
  --radius: 14px;

  --serif: "Cormorant Garamond", "Iowan Old Style", Georgia, serif;
  --text: "Newsreader", Georgia, "Times New Roman", serif;
}

* { box-sizing: border-box; }

html {
  -webkit-text-size-adjust: 100%;
  scroll-behavior: smooth;
  scroll-padding-top: 5.5rem;
}

body {
  margin: 0;
  background: var(--ink);
  color: var(--bone);
  font-family: var(--text);
  font-size: 1.0625rem;
  line-height: 1.7;
  font-synthesis-weight: none;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

/* grain sits over everything, very faint, gives the sepia film feel */
body::after {
  content: "";
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 60;
  opacity: 0.30;
  mix-blend-mode: overlay;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='140' height='140'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.85' numOctaves='3'/%3E%3C/filter%3E%3Crect width='140' height='140' filter='url(%23n)' opacity='0.42'/%3E%3C/svg%3E");
}

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

a { color: var(--bronze); text-underline-offset: 3px; }

.wrap {
  width: 100%;
  max-width: 40rem;
  margin-inline: auto;
  padding-inline: var(--pad);
}

.sr-only {
  position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px;
  overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0;
}

/* ---------------------------------------------------------------- progress */
#progress {
  position: fixed; top: 0; left: 0; height: 2px; width: 0%;
  background: linear-gradient(90deg, var(--clay), var(--bronze));
  z-index: 50;
  transition: width 0.1s linear;
}

/* -------------------------------------------------------------------- hero */
.hero {
  position: relative;
  min-height: 92svh;
  display: grid;
  align-content: center;
  text-align: center;
  padding: 5rem var(--pad) 7rem;
  overflow: hidden;
}

.hero__sky {
  position: absolute;
  inset: 0;
  z-index: -2;
  background:
    radial-gradient(120% 70% at 50% 8%,  rgba(224, 196, 150, 0.50) 0%, rgba(160, 121, 78, 0.28) 34%, rgba(16, 12, 8, 0) 72%),
    radial-gradient(90%  55% at 50% 96%, rgba(120, 80, 48, 0.34) 0%,  rgba(16, 12, 8, 0) 70%),
    linear-gradient(180deg, #2B1F14 0%, #1A1209 46%, #100C08 100%);
}

/* a horizon band, the desert behind him */
.hero__horizon {
  position: absolute;
  left: -10%; right: -10%;
  top: 63%;
  height: 1px;
  z-index: -1;
  background: linear-gradient(90deg, transparent, rgba(232, 210, 172, 0.28), transparent);
  filter: blur(0.4px);
}

.hero__vignette {
  position: absolute; inset: 0; z-index: -1;
  background: radial-gradient(75% 60% at 50% 45%, transparent 40%, rgba(10, 7, 4, 0.85) 100%);
}

.hero__eyebrow {
  font-size: 0.6875rem;
  letter-spacing: 0.34em;
  text-transform: uppercase;
  color: var(--bone-faint);
  margin: 0 0 1.75rem;
}

.hero h1 {
  font-family: var(--serif);
  font-weight: 500;
  font-size: clamp(3.1rem, 17vw, 6.5rem);
  line-height: 0.94;
  letter-spacing: 0.005em;
  margin: 0;
  color: #FBF3E4;
  text-shadow: 0 2px 40px rgba(0, 0, 0, 0.55);
}

.hero h1 em {
  display: block;
  font-style: normal;
}

/* the four-diamond ornament from the poster */
.ornament {
  display: flex;
  align-items: center;
  gap: 0.9rem;
  margin: 1.9rem auto;
  width: min(20rem, 78%);
  color: var(--bronze);
}
.ornament::before,
.ornament::after {
  content: "";
  flex: 1;
  height: 1px;
  background: linear-gradient(90deg, transparent, currentColor);
  opacity: 0.5;
}
.ornament::after { background: linear-gradient(90deg, currentColor, transparent); }

.hero__lede {
  font-size: 1.0625rem;
  line-height: 1.65;
  color: var(--bone-dim);
  max-width: 26rem;
  margin: 0 auto;
  text-wrap: balance;
}

.hero__meta {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 0.5rem;
  margin: 2.25rem 0 0;
  padding: 0;
  list-style: none;
}

.hero__meta li {
  font-size: 0.6875rem;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--bone-faint);
  border: 1px solid var(--line);
  border-radius: 100px;
  padding: 0.4rem 0.8rem;
}

.scroll-cue {
  position: absolute;
  left: 50%;
  bottom: 2rem;
  transform: translateX(-50%);
  font-size: 0.6875rem;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--bone-faint);
  text-decoration: none;
  display: inline-flex;
  flex-direction: column;
  align-items: center;
  gap: 0.6rem;
}
.scroll-cue span:last-child {
  width: 1px; height: 2.4rem;
  background: linear-gradient(180deg, var(--bronze), transparent);
  animation: drop 2.4s ease-in-out infinite;
}
@keyframes drop {
  0%, 100% { opacity: 0.3; transform: scaleY(0.6); transform-origin: top; }
  50%      { opacity: 1;   transform: scaleY(1);   transform-origin: top; }
}

/* --------------------------------------------------------------- top nav */
.topbar {
  position: sticky;
  top: 0;
  z-index: 40;
  background: rgba(16, 12, 8, 0.95);
  backdrop-filter: blur(18px) saturate(120%);
  -webkit-backdrop-filter: blur(18px) saturate(120%);
  border-bottom: 1px solid var(--line-soft);
  box-shadow: 0 10px 24px rgba(8, 5, 3, 0.55);
}

.topbar__inner {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  padding: 0.6rem var(--pad);
  max-width: 40rem;
  margin-inline: auto;
}

.segmented {
  display: flex;
  flex: 1;
  gap: 0.25rem;
  background: rgba(255, 240, 214, 0.05);
  border: 1px solid var(--line-soft);
  border-radius: 100px;
  padding: 0.2rem;
}

.segmented a {
  flex: 1;
  text-align: center;
  padding: 0.6rem 0.4rem;
  border-radius: 100px;
  font-size: 0.8125rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  text-decoration: none;
  color: var(--bone-dim);
  transition: background 0.25s ease, color 0.25s ease;
  min-height: 44px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.segmented a[aria-current="true"] {
  background: linear-gradient(180deg, rgba(199, 154, 91, 0.30), rgba(199, 154, 91, 0.16));
  color: #FBF3E4;
}

.icon-btn {
  width: 44px; height: 44px;
  flex: 0 0 44px;
  display: grid; place-items: center;
  border-radius: 100px;
  border: 1px solid var(--line-soft);
  background: rgba(255, 240, 214, 0.05);
  color: var(--bone-dim);
  cursor: pointer;
}
.icon-btn:active { transform: scale(0.96); }
.icon-btn[aria-expanded="true"] { color: #FBF3E4; border-color: var(--line); }

.searchbar {
  display: none;
  padding: 0 var(--pad) 0.7rem;
  max-width: 40rem;
  margin-inline: auto;
}
.searchbar.is-open { display: block; }

.searchbar input {
  width: 100%;
  min-height: 46px;
  padding: 0.7rem 1rem;
  border-radius: 12px;
  border: 1px solid var(--line);
  background: rgba(255, 240, 214, 0.06);
  color: var(--bone);
  font-family: var(--text);
  font-size: 1rem;
}
.searchbar input::placeholder { color: var(--bone-faint); }
.searchbar input:focus-visible { outline: 2px solid var(--bronze); outline-offset: 1px; }

.search-count {
  font-size: 0.75rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--bone-faint);
  padding-top: 0.5rem;
}

/* ----------------------------------------------------------------- intro */
.intro {
  padding: 3.5rem 0 1rem;
}
.intro p {
  margin: 0 0 1.1rem;
  color: var(--bone-dim);
}
.intro p:first-child {
  color: var(--bone);
  font-size: 1.1875rem;
  line-height: 1.6;
}
.intro .drop::first-letter {
  font-family: var(--serif);
  font-size: 3.4rem;
  line-height: 0.8;
  float: left;
  padding: 0.35rem 0.55rem 0 0;
  color: var(--bronze);
}

/* --------------------------------------------------------------- section */
.section { padding-block: 1.5rem 2.5rem; }

.section__head {
  padding: 2rem 0 1.25rem;
  border-top: 1px solid var(--line-soft);
}

.section__kicker {
  font-size: 0.6875rem;
  letter-spacing: 0.3em;
  text-transform: uppercase;
  color: var(--bronze);
  margin: 0 0 0.75rem;
}

.section__head h2 {
  font-family: var(--serif);
  font-weight: 500;
  font-size: clamp(2.1rem, 9vw, 3rem);
  line-height: 1.05;
  margin: 0 0 0.75rem;
  color: #FBF3E4;
}

.section__head p {
  margin: 0;
  color: var(--bone-dim);
  max-width: var(--measure);
}

.jumpbar {
  display: flex;
  gap: 0.4rem;
  overflow-x: auto;
  scrollbar-width: none;
  padding: 1.25rem 0 0.25rem;
  margin-inline: calc(var(--pad) * -1);
  padding-inline: var(--pad);
  -webkit-overflow-scrolling: touch;
}
.jumpbar::-webkit-scrollbar { display: none; }
.jumpbar a {
  flex: 0 0 auto;
  font-size: 0.75rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  text-decoration: none;
  color: var(--bone-dim);
  border: 1px solid var(--line);
  border-radius: 100px;
  padding: 0.55rem 0.95rem;
  min-height: 44px;
  display: inline-flex;
  align-items: center;
}

/* ------------------------------------------------------------------- act */
.section__head + .act {
  margin-top: 0.75rem;
  padding-top: 0;
  border-top: 0;
}

.act {
  margin: 3rem 0 1.5rem;
  padding-top: 1.75rem;
  border-top: 1px solid var(--line-soft);
}
.act__numeral {
  font-size: 0.6875rem;
  letter-spacing: 0.3em;
  text-transform: uppercase;
  color: var(--act, var(--bronze));
  margin: 0 0 0.55rem;
}
.act h3 {
  font-family: var(--serif);
  font-weight: 500;
  font-size: 1.7rem;
  line-height: 1.15;
  margin: 0 0 0.4rem;
  color: #FBF3E4;
}
.act p {
  margin: 0;
  color: var(--bone-faint);
  font-size: 0.95rem;
}

/* ------------------------------------------------------------------ card */
.cards { display: grid; gap: 0.875rem; }

.card {
  border: 1px solid var(--line-soft);
  border-radius: var(--radius);
  background:
    linear-gradient(180deg, rgba(255, 240, 214, 0.045), rgba(255, 240, 214, 0.015));
  overflow: hidden;
  transition: border-color 0.3s ease;
}
.card[open] { border-color: var(--line); }

.card > summary {
  list-style: none;
  cursor: pointer;
  display: grid;
  grid-template-columns: 54px 1fr 20px;
  gap: 0.9rem;
  align-items: start;
  padding: 1.05rem 1rem;
  min-height: 56px;
}
.card > summary::-webkit-details-marker { display: none; }
.card > summary:focus-visible { outline: 2px solid var(--bronze); outline-offset: -2px; }

.plate {
  width: 54px; height: 54px;
  border-radius: 10px;
  display: grid;
  place-items: center;
  color: var(--tint, var(--bronze));
  background:
    radial-gradient(120% 120% at 30% 20%, color-mix(in srgb, var(--tint, #C79A5B) 26%, transparent), transparent 70%),
    linear-gradient(160deg, rgba(255, 240, 214, 0.09), rgba(255, 240, 214, 0.02));
  border: 1px solid var(--line-soft);
}
.plate svg { width: 28px; height: 28px; }

.card__title {
  font-family: var(--serif);
  font-size: 1.3rem;
  line-height: 1.2;
  margin: 0.1rem 0 0.3rem;
  color: #FBF3E4;
  font-weight: 500;
}

.card__num {
  font-size: 0.6875rem;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--tint, var(--bronze));
  display: block;
}

.card__essence {
  margin: 0;
  font-size: 0.9375rem;
  line-height: 1.55;
  color: var(--bone-dim);
}

.chev {
  align-self: center;
  color: var(--bone-faint);
  transition: transform 0.3s ease;
}
.card[open] .chev { transform: rotate(180deg); }

.card__body {
  padding: 0.25rem 1rem 1.35rem;
  animation: reveal 0.35s ease both;
}
@keyframes reveal {
  from { opacity: 0; transform: translateY(-4px); }
  to   { opacity: 1; transform: none; }
}

.block { padding-top: 1.15rem; }
.block + .block { border-top: 1px solid var(--line-soft); margin-top: 1.15rem; }

.block h4 {
  font-size: 0.6875rem;
  letter-spacing: 0.24em;
  text-transform: uppercase;
  color: var(--tint, var(--bronze));
  margin: 0 0 0.5rem;
  font-weight: 400;
}

.block p {
  margin: 0;
  max-width: var(--measure);
}

.block--meaning {
  background: linear-gradient(180deg, rgba(199, 154, 91, 0.09), rgba(199, 154, 91, 0.03));
  border: 1px solid var(--line-soft);
  border-radius: 12px;
  padding: 1.1rem 1.05rem 1.2rem;
  margin-top: 1.15rem;
}
.block--meaning + .block { border-top: 0; }
.block--meaning p {
  font-size: 1.09375rem;
  line-height: 1.62;
  color: #FBF3E4;
}

.block--scripture p {
  color: var(--bone-dim);
  font-size: 1rem;
  border-left: 2px solid var(--line);
  padding-left: 0.9rem;
}

/* ------------------------------------------------------------- figures */
.group { margin: 3rem 0 1.25rem; padding-top: 1.75rem; border-top: 1px solid var(--line-soft); }
.group h3 {
  font-family: var(--serif);
  font-weight: 500;
  font-size: 1.7rem;
  margin: 0;
  color: #FBF3E4;
}

.badge {
  display: inline-block;
  font-size: 0.625rem;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  border-radius: 100px;
  padding: 0.2rem 0.55rem;
  border: 1px solid currentColor;
  vertical-align: 2px;
  margin-left: 0.5rem;
}
.badge--cut   { color: #C08A78; }
.badge--added { color: #9FAE7E; }

.card__label {
  font-size: 0.6875rem;
  line-height: 1.5;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--tint, var(--bronze));
  display: block;
  margin-bottom: 0.15rem;
}

/* ------------------------------------------------------------------ misc */
.empty {
  display: none;
  text-align: center;
  color: var(--bone-faint);
  padding: 3rem 0;
}
.empty.is-on { display: block; }

.to-top {
  position: fixed;
  right: 1rem;
  bottom: 1rem;
  width: 48px; height: 48px;
  border-radius: 100px;
  display: grid; place-items: center;
  background: rgba(28, 20, 12, 0.9);
  backdrop-filter: blur(10px);
  border: 1px solid var(--line);
  color: var(--bone-dim);
  z-index: 45;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.3s ease;
  cursor: pointer;
}
.to-top.is-on { opacity: 1; pointer-events: auto; }

footer {
  border-top: 1px solid var(--line-soft);
  padding: 3rem 0 4.5rem;
  color: var(--bone-faint);
  font-size: 0.875rem;
}
footer p { margin: 0 0 0.6rem; max-width: var(--measure); }

/* ----------------------------------------------------------- wider screens */
@media (min-width: 48rem) {
  :root { --pad: 2rem; }
  body { font-size: 1.125rem; }
  .wrap, .topbar__inner, .searchbar { max-width: 46rem; }
  .card > summary { grid-template-columns: 64px 1fr 20px; padding: 1.3rem 1.4rem; }
  .plate { width: 64px; height: 64px; }
  .plate svg { width: 32px; height: 32px; }
  .card__body { padding: 0.25rem 1.4rem 1.6rem; }
  .card__title { font-size: 1.5rem; }
  .act h3, .group h3 { font-size: 2rem; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { animation-duration: 0.001ms !important; transition-duration: 0.001ms !important; }
}
