:root {
  color-scheme: dark;
  --ink-black: #070605;
  --charcoal: #15110f;
  --charcoal-soft: #1f1915;
  --ember: #d78f3e;
  --ember-soft: rgba(215, 143, 62, 0.18);
  --gold: #f0c07a;
  --warm-ivory: #f3e7d6;
  --parchment: #e6d4b8;
  --text: #f5ead8;
  --muted: #c2af98;
  --line: rgba(241, 212, 170, 0.14);
  --line-strong: rgba(241, 212, 170, 0.28);
  --shadow-deep: 0 34px 90px rgba(0, 0, 0, 0.38);
  --radius-xl: 34px;
  --radius-lg: 26px;
  --radius-md: 18px;
  --radius-pill: 999px;
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  min-height: 100vh;
  color: var(--text);
  font-family: "Cormorant Garamond", serif;
  background:
    radial-gradient(circle at 14% 10%, rgba(215, 143, 62, 0.16), transparent 24%),
    radial-gradient(circle at 88% 22%, rgba(244, 230, 206, 0.07), transparent 20%),
    linear-gradient(180deg, #060505 0%, #100d0c 50%, #090807 100%);
  overflow-x: hidden;
}

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

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

button,
input {
  font: inherit;
}

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

input {
  width: 100%;
  padding: 14px 16px;
  border-radius: var(--radius-md);
  border: 1px solid rgba(241, 212, 170, 0.16);
  background: rgba(255, 255, 255, 0.05);
  color: var(--text);
}

.atmosphere,
.grain-layer {
  position: fixed;
  inset: 0;
  pointer-events: none;
}

.atmosphere-flame {
  background:
    radial-gradient(circle at 8% 14%, rgba(215, 143, 62, 0.16), transparent 22%),
    radial-gradient(circle at 78% 18%, rgba(215, 143, 62, 0.08), transparent 18%);
}

.atmosphere-bird {
  background:
    radial-gradient(circle at 82% 58%, rgba(235, 223, 203, 0.09), transparent 20%),
    radial-gradient(circle at 24% 76%, rgba(121, 109, 95, 0.11), transparent 24%);
}

.grain-layer {
  opacity: 0.12;
  background-image:
    linear-gradient(rgba(255, 255, 255, 0.05) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255, 255, 255, 0.04) 1px, transparent 1px);
  background-size: 3px 3px, 3px 3px;
  mix-blend-mode: soft-light;
}

.page-shell {
  position: relative;
  z-index: 1;
  width: min(1320px, calc(100% - 28px));
  margin: 0 auto;
  padding: 28px 0 60px;
}

.topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  padding: 18px 22px;
  border: 1px solid var(--line);
  border-radius: var(--radius-xl);
  background: linear-gradient(180deg, rgba(18, 15, 14, 0.92), rgba(9, 8, 8, 0.92));
  box-shadow: var(--shadow-deep);
  backdrop-filter: blur(18px);
}

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

.brand-mark {
  width: 54px;
  height: 54px;
  object-fit: contain;
  filter: drop-shadow(0 0 22px rgba(215, 143, 62, 0.28));
}

.brand-wordmark,
.brand-parent {
  display: block;
}

.brand-wordmark {
  font-size: 2rem;
  letter-spacing: 0.08em;
  line-height: 0.95;
}

.brand-parent {
  color: var(--muted);
  font-family: "Manrope", sans-serif;
  font-size: 0.72rem;
  letter-spacing: 0.18em;
  text-transform: uppercase;
}

.topbar-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 14px;
  align-items: center;
  justify-content: flex-end;
  font-family: "Manrope", sans-serif;
  font-size: 0.92rem;
}

.pill-link,
.primary-button,
.ghost-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 12px 18px;
  border-radius: var(--radius-pill);
  border: 1px solid transparent;
  font-family: "Manrope", sans-serif;
  font-size: 0.92rem;
  font-weight: 700;
}

.pill-link,
.primary-button {
  color: #1a120c;
  background: linear-gradient(135deg, #f0c07a 0%, #d78f3e 100%);
  box-shadow: 0 14px 28px rgba(215, 143, 62, 0.2);
}

.ghost-button {
  color: var(--text);
  background: rgba(255, 255, 255, 0.04);
  border-color: var(--line);
}

.helper-copy {
  margin: 0;
  color: var(--muted);
  line-height: 1.6;
}

main {
  display: grid;
  gap: 20px;
  margin-top: 20px;
}

.hero,
.feature-band,
.library-section,
.membership-section,
.connect-section {
  border: 1px solid var(--line);
  border-radius: var(--radius-xl);
  background: linear-gradient(180deg, rgba(18, 15, 14, 0.93), rgba(8, 7, 7, 0.93));
  box-shadow: var(--shadow-deep);
}

.hero {
  display: grid;
  grid-template-columns: minmax(0, 1.04fr) minmax(360px, 0.96fr);
  gap: 28px;
  padding: 34px;
  align-items: start;
  background:
    radial-gradient(circle at top left, rgba(215, 143, 62, 0.16), transparent 30%),
    linear-gradient(180deg, rgba(18, 14, 12, 0.95), rgba(8, 7, 7, 0.95));
}

.hero-copy {
  display: grid;
  align-content: start;
  gap: 18px;
  padding-top: 10px;
}

.hero-sigil {
  position: relative;
  width: 132px;
  height: 160px;
  margin-bottom: 4px;
}

.hero-sigil-flame {
  width: 100%;
  height: 100%;
  object-fit: contain;
  filter: drop-shadow(0 0 34px rgba(215, 143, 62, 0.22));
}

.hero-embers {
  position: absolute;
  inset: 0;
}

.hero-embers span,
.feature-mark-embers span {
  position: absolute;
  width: 7px;
  height: 7px;
  border-radius: 999px;
  background: rgba(240, 192, 122, 0.92);
  box-shadow: 0 0 14px rgba(215, 143, 62, 0.46);
  animation: ember-float 3.6s ease-in-out infinite;
}

.hero-embers span:nth-child(1) {
  left: 68%;
  top: 16%;
}

.hero-embers span:nth-child(2) {
  left: 76%;
  top: 34%;
  animation-delay: 0.7s;
}

.hero-embers span:nth-child(3) {
  left: 58%;
  top: 48%;
  animation-delay: 1.4s;
}

.hero-embers span:nth-child(4) {
  left: 86%;
  top: 58%;
  animation-delay: 2s;
}

.eyebrow,
.screen-kicker {
  margin: 0 0 10px;
  color: var(--muted);
  letter-spacing: 0.24em;
  text-transform: uppercase;
  font-family: "Manrope", sans-serif;
  font-size: 0.72rem;
}

h1,
h2,
h3,
h4,
p {
  margin-top: 0;
}

h1 {
  margin-bottom: 0;
  font-size: clamp(3rem, 6vw, 5.4rem);
  line-height: 0.95;
  font-weight: 500;
  max-width: 11ch;
}

h2,
h3 {
  margin-bottom: 14px;
  font-size: clamp(2.1rem, 4vw, 3.2rem);
  line-height: 0.98;
  font-weight: 500;
}

h4 {
  margin-bottom: 10px;
  font-size: 1.8rem;
  line-height: 1.02;
  font-weight: 500;
}

.hero-text,
.feature-card p,
.login-card p,
.library-story-card li,
.membership-card p,
.connect-card p {
  color: var(--muted);
  line-height: 1.68;
}

.hero-text {
  max-width: 58ch;
  margin-bottom: 0;
}

.hero-actions,
.hero-proof,
.connect-columns,
.feature-grid,
.membership-grid {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
}

.hero-proof span,
.member-badge,
.library-meta,
.feature-card,
.membership-card,
.hero-card,
.login-card,
.library-story-card {
  border: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.03);
  border-radius: 24px;
}

.hero-proof span {
  padding: 10px 14px;
  font-family: "Manrope", sans-serif;
  font-size: 0.82rem;
  color: var(--warm-ivory);
}

.hero-visual {
  display: grid;
  gap: 18px;
  align-content: start;
}

.hero-card {
  padding: 18px;
}

.hero-card-row {
  display: flex;
  align-items: center;
  gap: 14px;
}

.hero-card-row strong,
.library-card-top strong,
.connect-columns strong {
  display: block;
  color: var(--warm-ivory);
  font-size: 1.18rem;
}

.hero-card-row span {
  color: var(--muted);
}

.hero-card-mark {
  width: 52px;
  height: 52px;
  object-fit: contain;
}

.hero-bird-wash {
  position: relative;
  min-height: 120px;
  margin: 4px 0 -10px;
  overflow: hidden;
  border-radius: 28px;
  border: 1px solid rgba(241, 212, 170, 0.08);
  background:
    radial-gradient(circle at left, rgba(255, 255, 255, 0.05), transparent 35%),
    linear-gradient(180deg, rgba(18, 15, 14, 0.72), rgba(12, 10, 10, 0.38));
}

.hero-bird-mark {
  position: absolute;
  right: -26px;
  top: -12px;
  width: 240px;
  opacity: 0.22;
  filter: drop-shadow(0 18px 28px rgba(0, 0, 0, 0.36));
}

.framed-mockup {
  position: relative;
}

.framed-mockup::before {
  content: "";
  position: absolute;
  inset: -12px;
  border-radius: 34px;
  border: 1px solid rgba(241, 212, 170, 0.08);
  background: radial-gradient(circle at top left, rgba(215, 143, 62, 0.08), transparent 38%);
  z-index: 0;
}

.framed-mockup > * {
  position: relative;
  z-index: 1;
}

.device-window {
  padding: 18px;
  border-radius: 28px;
  background: linear-gradient(180deg, rgba(31, 25, 21, 0.98), rgba(12, 10, 10, 0.98));
  border: 1px solid rgba(241, 212, 170, 0.12);
  box-shadow: inset 0 1px rgba(255, 255, 255, 0.03);
}

.window-chrome {
  display: flex;
  gap: 8px;
  margin-bottom: 16px;
}

.window-chrome span {
  width: 10px;
  height: 10px;
  border-radius: 999px;
  background: rgba(244, 232, 212, 0.2);
}

.window-screen {
  padding: 20px;
  border-radius: 24px;
  background:
    radial-gradient(circle at top right, rgba(215, 143, 62, 0.12), transparent 28%),
    linear-gradient(180deg, rgba(19, 16, 15, 0.95), rgba(10, 9, 9, 0.95));
}

.member-header,
.library-card-top,
.library-layout,
.library-story-header {
  display: flex;
  justify-content: space-between;
  gap: 14px;
  align-items: flex-start;
}

.member-badge {
  padding: 9px 12px;
  color: var(--warm-ivory);
  font-family: "Manrope", sans-serif;
  font-size: 0.78rem;
}

.member-grid {
  display: grid;
  grid-template-columns: 220px minmax(0, 1fr);
  gap: 16px;
}

.member-sidebar,
.member-main,
.feature-grid,
.membership-grid {
  display: grid;
  gap: 14px;
}

.member-panel,
.library-card {
  padding: 16px;
  border-radius: 22px;
  border: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.03);
}

.library-card-feature {
  background:
    radial-gradient(circle at top left, rgba(215, 143, 62, 0.16), transparent 34%),
    rgba(255, 255, 255, 0.03);
}

.shelf-list,
.pack-list,
.story-points {
  margin: 0;
  padding-left: 18px;
  color: var(--muted);
}

.shelf-list li,
.pack-list li,
.story-points li {
  margin-bottom: 10px;
}

.shelf-list li.is-active {
  color: var(--warm-ivory);
}

.library-meta {
  display: inline-flex;
  margin: 0 0 10px;
  padding: 7px 12px;
  font-family: "Manrope", sans-serif;
  font-size: 0.74rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--warm-ivory);
}

.section-heading {
  padding: 30px 30px 0;
  max-width: 760px;
}

.feature-grid,
.membership-grid {
  grid-template-columns: repeat(3, minmax(0, 1fr));
  padding: 24px 30px 30px;
}

.feature-card,
.membership-card {
  padding: 22px;
  display: grid;
  align-content: start;
  gap: 10px;
  position: relative;
  overflow: hidden;
}

.feature-mark {
  width: 52px;
  height: 52px;
  display: grid;
  place-items: center;
  margin-bottom: 8px;
  border-radius: 18px;
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid rgba(241, 212, 170, 0.12);
}

.feature-mark img {
  width: 80%;
  height: 80%;
  object-fit: contain;
}

.feature-mark-bird img {
  width: 92%;
  height: 92%;
}

.feature-mark-embers {
  position: relative;
}

.feature-mark-embers span:nth-child(1) {
  left: 15px;
  top: 16px;
}

.feature-mark-embers span:nth-child(2) {
  left: 24px;
  top: 28px;
  animation-delay: 0.8s;
}

.feature-mark-embers span:nth-child(3) {
  left: 34px;
  top: 18px;
  animation-delay: 1.6s;
}

.library-layout {
  padding: 24px 30px 30px;
  gap: 18px;
}

.login-card,
.library-story-card,
.connect-card {
  padding: 24px;
  position: relative;
  overflow: hidden;
}

.login-card,
.library-story-card {
  display: grid;
  align-content: start;
  gap: 14px;
}

.library-layout {
  display: grid;
  grid-template-columns: minmax(0, 0.9fr) minmax(0, 1.1fr);
}

.login-form {
  display: grid;
  gap: 14px;
}

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

.login-form label span {
  display: block;
  margin-bottom: 8px;
  color: var(--warm-ivory);
  font-family: "Manrope", sans-serif;
  font-size: 0.86rem;
}

.story-bird {
  width: 78px;
  height: 78px;
  object-fit: contain;
}

.card-halo {
  position: absolute;
  inset: auto -40px -40px auto;
  width: 180px;
  height: 180px;
  border-radius: 999px;
  pointer-events: none;
}

.card-halo-flame {
  background: radial-gradient(circle, rgba(215, 143, 62, 0.12), transparent 68%);
}

.card-halo-bird {
  background: radial-gradient(circle, rgba(84, 72, 61, 0.12), transparent 68%);
}

.connect-card {
  margin: 0 30px 30px;
}

.connect-card h3 {
  margin-bottom: 18px;
}

.membership-accent {
  width: 100%;
  height: 4px;
  border-radius: 999px;
  margin-bottom: 8px;
  background: linear-gradient(90deg, rgba(240, 192, 122, 0.9), rgba(215, 143, 62, 0.22));
}

.membership-accent-soft {
  background: linear-gradient(90deg, rgba(240, 192, 122, 0.7), rgba(241, 212, 170, 0.16));
}

.membership-accent-bird {
  background: linear-gradient(90deg, rgba(160, 143, 124, 0.8), rgba(241, 212, 170, 0.14));
}

.connect-columns {
  justify-content: space-between;
}

.connect-columns > div {
  flex: 1 1 220px;
}

.reader-shell {
  display: grid;
  gap: 18px;
  padding: 0 30px 30px;
}

.reader-header,
.reader-layout,
.reader-detail-top {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  align-items: flex-start;
}

.reader-meta {
  display: grid;
  gap: 6px;
  min-width: 220px;
  padding: 14px 16px;
  border-radius: 22px;
  border: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.03);
  color: var(--muted);
  font-family: "Manrope", sans-serif;
  font-size: 0.8rem;
}

.reader-controls {
  display: grid;
  gap: 12px;
}

.reader-filter-row,
.reader-chip-row {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.reader-filter,
.reader-chip {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 9px 14px;
  border-radius: var(--radius-pill);
  border: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.04);
  color: var(--warm-ivory);
  font-family: "Manrope", sans-serif;
  font-size: 0.8rem;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.reader-filter {
  cursor: pointer;
}

.reader-filter.is-active,
.reader-chip-favorite {
  background: rgba(215, 143, 62, 0.12);
  border-color: rgba(215, 143, 62, 0.28);
}

.reader-layout {
  align-items: stretch;
}

.reader-list,
.reader-detail {
  min-height: 520px;
  border-radius: 28px;
  border: 1px solid var(--line);
}

.reader-list {
  flex: 0 0 360px;
  display: grid;
  gap: 12px;
  align-content: start;
  padding: 16px;
  background: rgba(255, 255, 255, 0.03);
}

.reader-detail {
  flex: 1 1 auto;
  padding: 24px;
  background:
    radial-gradient(circle at top left, rgba(255, 255, 255, 0.3), transparent 26%),
    linear-gradient(180deg, #eadcc6 0%, #ddc8aa 100%);
  color: #2f231b;
}

.reader-item {
  cursor: pointer;
  width: 100%;
  display: grid;
  gap: 10px;
  padding: 16px;
  text-align: left;
  border: 1px solid var(--line);
  border-radius: 22px;
  background:
    radial-gradient(circle at top right, rgba(255, 255, 255, 0.05), transparent 28%),
    linear-gradient(180deg, rgba(22, 18, 17, 0.94), rgba(9, 8, 8, 0.94));
  color: var(--text);
}

.reader-item.is-active {
  border-color: rgba(241, 212, 170, 0.28);
  background:
    radial-gradient(circle at top right, rgba(215, 143, 62, 0.1), transparent 30%),
    linear-gradient(180deg, rgba(24, 20, 19, 0.96), rgba(10, 9, 9, 0.96));
}

.reader-item-top strong {
  display: block;
  font-size: 1.18rem;
}

.reader-item-top span,
.reader-item-shelves,
.reader-item-preview,
.reader-detail-dates,
.reader-detail-shelves {
  color: var(--muted);
}

.reader-item-top span,
.reader-detail-dates {
  font-family: "Manrope", sans-serif;
  font-size: 0.8rem;
}

.reader-item-shelves,
.reader-item-preview,
.reader-detail-shelves,
.reader-detail-prompt,
.reader-detail-body,
.reader-list-empty p,
.reader-empty p {
  margin: 0;
  line-height: 1.68;
}

.reader-detail-top h4,
.reader-detail-body,
.reader-detail-prompt {
  color: #2b211c;
}

.reader-detail-dates {
  display: grid;
  gap: 6px;
}

.reader-chip-row-detail {
  margin: 18px 0 16px;
}

.reader-detail-shelves {
  margin-bottom: 16px;
  font-family: "Manrope", sans-serif;
  font-size: 0.84rem;
  color: #56463a;
}

.reader-detail-prompt {
  margin-bottom: 18px;
  font-size: 1.16rem;
}

.reader-detail-body {
  white-space: pre-wrap;
  font-size: 1.08rem;
}

.reader-list-empty,
.reader-empty {
  min-height: 100%;
  display: grid;
  place-items: center;
  text-align: center;
}

.reader-empty-bird {
  width: 160px;
  opacity: 0.86;
}

@media (max-width: 980px) {
  .hero,
  .library-layout,
  .member-grid,
  .feature-grid,
  .membership-grid {
    grid-template-columns: 1fr;
  }

  .topbar,
  .member-header,
  .library-card-top,
  .library-story-header,
  .connect-columns,
  .reader-header,
  .reader-detail-top {
    flex-direction: column;
  }

  .topbar {
    align-items: flex-start;
  }

  .topbar-actions {
    width: 100%;
    justify-content: flex-start;
  }

  h1 {
    max-width: 13ch;
  }

  .hero-bird-mark {
    right: -8px;
    width: 210px;
  }

  .reader-list,
  .reader-detail {
    min-height: 0;
  }

  .reader-list {
    flex-basis: auto;
  }
}

@media (max-width: 760px) {
  .page-shell {
    width: min(100%, calc(100% - 18px));
    padding-top: 18px;
  }

  .topbar {
    padding: 18px;
  }

  .hero,
  .feature-grid,
  .library-layout,
  .membership-grid,
  .connect-card,
  .reader-shell {
    padding-left: 20px;
    padding-right: 20px;
  }

  .hero,
  .feature-grid,
  .membership-grid {
    padding-top: 24px;
    padding-bottom: 24px;
  }

  .topbar-actions,
  .hero-actions,
  .hero-proof,
  .library-open-form {
    display: grid;
  }

  .section-heading {
    padding: 24px 20px 0;
  }

  .brand-lockup {
    align-items: center;
  }

  .brand-wordmark {
    font-size: 1.7rem;
  }

  .hero-sigil {
    width: 104px;
    height: 128px;
  }

  .hero-bird-wash {
    min-height: 92px;
  }

  .hero-bird-mark {
    width: 170px;
    top: -6px;
  }

  h1 {
    max-width: none;
    font-size: clamp(2.5rem, 13vw, 4.1rem);
  }

  .pill-link,
  .primary-button,
  .ghost-button,
  .reader-filter {
    width: 100%;
  }
}

@keyframes ember-float {
  0%,
  100% {
    transform: translateY(0) scale(1);
    opacity: 0.72;
  }

  50% {
    transform: translateY(-9px) scale(1.08);
    opacity: 1;
  }
}
