:root {
  color-scheme: dark;
  --bg: #050506;
  --bg-soft: #0a0a0b;
  --panel: #101011;
  --panel-strong: #151515;
  --line: rgba(255, 255, 255, 0.13);
  --line-soft: rgba(255, 255, 255, 0.08);
  --text: #f3f0eb;
  --muted: #aaa39a;
  --soft: #d1c9be;
  --accent: #c98f43;
  --accent-soft: rgba(201, 143, 67, 0.16);
  --danger: #b85a4c;
  --shadow: 0 24px 80px rgba(0, 0, 0, 0.55);
  --serif: Georgia, "Times New Roman", serif;
  --sans: "Segoe UI", Arial, sans-serif;
  --gutter: 24px;
  --content: min(1180px, calc(100vw - (var(--gutter) * 2)));
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  overflow-x: clip;
  background:
    radial-gradient(circle at 70% 10%, rgba(201, 143, 67, 0.08), transparent 28rem),
    linear-gradient(180deg, #030303 0%, var(--bg) 48%, #020202 100%);
  color: var(--text);
  font-family: var(--sans);
  line-height: 1.65;
  letter-spacing: 0;
}

body::before {
  content: "";
  position: fixed;
  inset: 0;
  pointer-events: none;
  background-image:
    linear-gradient(rgba(255, 255, 255, 0.018) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255, 255, 255, 0.012) 1px, transparent 1px);
  background-size: 54px 54px;
  opacity: 0.25;
  z-index: -1;
}

a {
  color: inherit;
}

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

main,
section,
article,
aside,
header,
footer,
nav,
form,
div {
  min-width: 0;
}

button,
input,
textarea {
  font: inherit;
}

::selection {
  background: rgba(201, 143, 67, 0.32);
  color: var(--text);
}

.skip-link {
  position: fixed;
  top: 12px;
  left: 12px;
  z-index: 100;
  padding: 10px 14px;
  background: var(--accent);
  color: #080706;
  transform: translateY(-140%);
  transition: transform 160ms ease;
}

.skip-link:focus {
  transform: translateY(0);
}

.site-header {
  position: sticky;
  top: 0;
  z-index: 20;
  display: flex;
  align-items: center;
  justify-content: space-between;
  min-height: 76px;
  padding: 0 max(var(--gutter), calc((100vw - 1180px) / 2));
  background: rgba(5, 5, 6, 0.86);
  border-bottom: 1px solid var(--line-soft);
  backdrop-filter: blur(20px);
}

.brand {
  font-family: var(--serif);
  flex: 0 1 auto;
  font-size: 1.85rem;
  text-decoration: none;
  color: var(--text);
  white-space: nowrap;
}

.site-nav {
  display: flex;
  align-items: center;
  gap: clamp(14px, 2vw, 28px);
}

.site-nav a {
  position: relative;
  color: var(--muted);
  text-decoration: none;
  font-size: 0.96rem;
  white-space: nowrap;
  transition: color 160ms ease;
}

.site-nav a::after {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  bottom: -10px;
  height: 2px;
  background: var(--accent);
  transform: scaleX(0);
  transform-origin: left;
  transition: transform 160ms ease;
}

.site-nav a:hover,
.site-nav a:focus-visible,
.site-nav a.active {
  color: var(--text);
}

.site-nav a.active::after,
.site-nav a:hover::after,
.site-nav a:focus-visible::after {
  transform: scaleX(1);
}

.menu-button {
  display: none;
  width: 48px;
  height: 48px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: transparent;
  color: transparent;
  overflow: hidden;
  align-items: center;
  justify-content: center;
  flex-direction: column;
  gap: 5px;
}

.menu-button span {
  width: 20px;
  height: 2px;
  background: var(--text);
}

.hero {
  position: relative;
  min-height: min(780px, calc(100svh - 200px));
  display: flex;
  align-items: center;
  overflow: hidden;
  border-bottom: 1px solid var(--line);
}

.hero-copy {
  position: relative;
  z-index: 2;
  display: flex;
  flex-direction: column;
  justify-content: center;
  width: var(--content);
  min-height: min(780px, calc(100svh - 200px));
  margin: 0 auto;
  padding: clamp(52px, 7vw, 92px) 0 clamp(56px, 7vw, 94px);
}

h1,
h2,
h3 {
  font-family: var(--serif);
  font-weight: 400;
  line-height: 1.05;
  letter-spacing: 0;
  margin: 0;
}

h1 {
  max-width: min(720px, 100%);
  overflow-wrap: normal;
  text-wrap: balance;
  font-size: 7.2rem;
}

h2 {
  text-wrap: balance;
  font-size: 4.35rem;
}

h3 {
  text-wrap: balance;
  font-size: 2rem;
}

.lead {
  max-width: min(560px, 100%);
  margin: 28px 0 0;
  color: var(--soft);
  font-size: 1.22rem;
  line-height: 1.75;
}

.hero-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 12px 18px;
  margin: 42px 0 34px;
  color: var(--muted);
}

.hero-meta span {
  display: inline-flex;
  align-items: center;
  gap: 12px;
}

.hero-meta span:not(:first-child)::before {
  content: "";
  width: 5px;
  height: 5px;
  border-radius: 50%;
  background: var(--accent);
}

.text-link {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  width: fit-content;
  color: var(--accent);
  text-decoration: none;
  font-weight: 500;
}

.text-link:hover,
.text-link:focus-visible {
  color: #e8bb77;
}

.hero-media {
  position: absolute;
  inset: 0;
  z-index: 1;
  margin: 0;
  overflow: hidden;
  background: #000;
}

.hero-media::after {
  content: "";
  position: absolute;
  inset: 0;
  background:
    linear-gradient(90deg, rgba(5, 5, 6, 0.98) 0%, rgba(5, 5, 6, 0.88) 34%, rgba(5, 5, 6, 0.34) 62%, rgba(5, 5, 6, 0.12) 100%),
    linear-gradient(0deg, rgba(5, 5, 6, 0.28), transparent 42%);
}

.hero-media img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: 72% center;
  filter: saturate(0.92) contrast(1.05);
}

.section {
  width: var(--content);
  margin: 0 auto;
  padding: clamp(70px, 10vw, 128px) 0;
}

.story-index-section {
  padding-top: clamp(34px, 5vw, 72px);
}

.practice-section {
  border-top: 1px solid var(--line-soft);
}

.practice-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: clamp(18px, 4vw, 44px);
}

.practice-card {
  min-height: 340px;
  padding: clamp(28px, 5vw, 54px);
  border: 1px solid var(--line);
  border-radius: 8px;
  background:
    linear-gradient(135deg, rgba(201, 143, 67, 0.09), transparent 42%),
    rgba(255, 255, 255, 0.025);
  box-shadow: var(--shadow);
}

.practice-card h3 {
  max-width: 620px;
  margin-bottom: 24px;
  font-size: 3.4rem;
}

.practice-card p:not(.section-label) {
  max-width: 560px;
  color: var(--soft);
  font-family: var(--serif);
  font-size: 1.16rem;
  line-height: 1.85;
}

.practice-card .text-link {
  margin-top: 24px;
}

.section-heading {
  margin-bottom: 36px;
}

.section-heading p,
.section-label {
  margin: 0 0 14px;
  color: var(--accent);
  font-size: 0.82rem;
  font-weight: 700;
  letter-spacing: 0.16em;
  text-transform: uppercase;
}

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

.story-row {
  display: grid;
  grid-template-columns: 52px minmax(220px, 1.2fr) minmax(180px, 0.9fr) 88px;
  align-items: center;
  gap: 22px;
  min-height: 74px;
  border-bottom: 1px solid var(--line-soft);
  text-decoration: none;
  color: var(--text);
  transition: background 160ms ease, color 160ms ease, transform 160ms ease;
}

.story-row:hover,
.story-row:focus-visible {
  background: rgba(255, 255, 255, 0.035);
  transform: translateX(4px);
}

.story-number {
  color: var(--accent);
  font-family: var(--serif);
  font-size: 1.12rem;
}

.story-title {
  font-family: var(--serif);
  font-size: 1.85rem;
  line-height: 1.25;
}

.story-themes,
.story-time {
  color: var(--muted);
}

.story-time {
  text-align: right;
}

.reading-preview {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 260px;
  gap: clamp(40px, 8vw, 120px);
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
}

.preview-text p:not(.section-label),
.story-content p,
.legal-content p,
.contact-copy p,
.legal-card p {
  color: var(--soft);
  font-family: var(--serif);
  font-size: 1.18rem;
  line-height: 1.9;
}

.preview-text p:not(.section-label) {
  max-width: 760px;
}

.progress-card {
  border-left: 1px solid var(--line);
  padding-left: clamp(28px, 4vw, 56px);
  color: var(--muted);
}

.progress-card p {
  margin: 0 0 14px;
  color: var(--accent);
  font-size: 0.8rem;
  font-weight: 700;
  letter-spacing: 0.14em;
  text-transform: uppercase;
}

.progress-card strong {
  display: block;
  margin-bottom: 42px;
  color: var(--text);
  font-family: var(--serif);
  font-size: 1.7rem;
  font-weight: 400;
}

.fake-progress {
  position: relative;
  width: 2px;
  height: 280px;
  margin: 22px 0 32px 8px;
  background: var(--line);
}

.fake-progress span {
  display: block;
  width: 2px;
  height: 28%;
  background: var(--accent);
}

.contact-strip {
  position: relative;
  display: grid;
  grid-template-columns: minmax(0, 0.74fr) minmax(300px, 0.8fr) minmax(260px, 0.58fr);
  gap: clamp(24px, 4vw, 54px);
  align-items: center;
}

.mail-link {
  display: inline-flex;
  margin-top: 18px;
  color: var(--accent);
  text-decoration: none;
  font-size: 1.1rem;
}

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

.contact-form label {
  display: grid;
  gap: 8px;
  color: var(--muted);
  font-size: 0.92rem;
}

.contact-form input,
.contact-form textarea {
  width: 100%;
  border: 1px solid var(--line);
  border-radius: 6px;
  background: rgba(255, 255, 255, 0.025);
  color: var(--text);
  padding: 14px 15px;
  outline: none;
  resize: vertical;
}

.contact-form input:focus,
.contact-form textarea:focus {
  border-color: var(--accent);
  box-shadow: 0 0 0 3px var(--accent-soft);
}

.contact-form button {
  justify-self: start;
  min-width: 220px;
  min-height: 48px;
  border: 1px solid var(--accent);
  border-radius: 6px;
  background: transparent;
  color: var(--accent);
  cursor: pointer;
  transition: background 160ms ease, color 160ms ease;
}

.contact-form button:hover,
.contact-form button:focus-visible {
  background: var(--accent);
  color: #090806;
}

.contact-image {
  width: 100%;
  aspect-ratio: 4 / 5;
  object-fit: cover;
  border-radius: 8px;
  border: 1px solid var(--line-soft);
  box-shadow: var(--shadow);
}

.page-hero {
  width: var(--content);
  margin: 0 auto;
  padding: clamp(86px, 12vw, 150px) 0 clamp(52px, 8vw, 90px);
  border-bottom: 1px solid var(--line);
}

.page-hero.compact h1 {
  max-width: 900px;
  font-size: 6.3rem;
}

.story-list.large .story-row {
  min-height: 86px;
}

.story-page {
  width: var(--content);
  margin: 0 auto;
  padding-bottom: 84px;
}

.story-hero {
  padding: clamp(70px, 10vw, 140px) 0 clamp(50px, 8vw, 88px);
  border-bottom: 1px solid var(--line);
}

.story-hero h1 {
  max-width: 980px;
  font-size: 6.5rem;
}

.back-link {
  display: inline-flex;
  margin-bottom: 34px;
  color: var(--muted);
  text-decoration: none;
}

.back-link:hover,
.back-link:focus-visible {
  color: var(--accent);
}

.story-layout {
  display: grid;
  grid-template-columns: minmax(0, 780px) 230px;
  gap: clamp(42px, 9vw, 136px);
  align-items: start;
}

.story-content {
  padding-top: 52px;
}

.story-chapter {
  margin-bottom: 58px;
}

.story-chapter h2 {
  margin-bottom: 22px;
  color: var(--text);
  font-size: 2.55rem;
}

.story-content p {
  margin: 0 0 1.45em;
}

.reader-aside {
  position: sticky;
  top: 110px;
  min-height: 420px;
  padding: 52px 0 0 38px;
  border-left: 1px solid var(--line);
}

.reader-aside p {
  margin: 0 0 12px;
  color: var(--accent);
  font-size: 0.76rem;
  font-weight: 700;
  letter-spacing: 0.14em;
  text-transform: uppercase;
}

.reader-aside strong {
  display: block;
  margin: 0 0 34px;
  color: var(--text);
  font-family: var(--serif);
  font-size: 1.25rem;
  font-weight: 400;
}

.reader-line {
  position: relative;
  width: 2px;
  height: 230px;
  margin: 18px 0 22px 8px;
  background: var(--line);
}

.reader-line span {
  position: absolute;
  top: 0;
  left: 50%;
  width: 12px;
  height: 12px;
  border-radius: 50%;
  background: var(--accent);
  transform: translate(-50%, 0);
}

.reading-progress-bar {
  position: fixed;
  top: 0;
  left: 0;
  width: 0;
  height: 3px;
  background: linear-gradient(90deg, var(--accent), #e8bb77);
  z-index: 50;
}

.story-nav {
  display: flex;
  justify-content: space-between;
  gap: 22px;
  padding-top: 42px;
  border-top: 1px solid var(--line);
}

.story-nav a {
  color: var(--accent);
  text-decoration: none;
}

.contact-page-grid {
  display: grid;
  grid-template-columns: minmax(260px, 0.75fr) minmax(320px, 1.1fr);
  gap: clamp(32px, 7vw, 100px);
  align-items: start;
}

.legal-card,
.legal-content {
  border: 1px solid var(--line);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.025);
  box-shadow: var(--shadow);
}

.legal-card {
  padding: clamp(24px, 4vw, 42px);
}

.legal-card h2,
.legal-content h2 {
  margin: 0 0 14px;
  color: var(--text);
  font-family: var(--serif);
  font-size: 2.2rem;
  font-weight: 400;
}

.legal-content {
  max-width: 900px;
  padding: clamp(28px, 5vw, 58px);
}

.legal-content h2:not(:first-child) {
  margin-top: 42px;
}

.legal-content a,
.legal-card a {
  color: var(--accent);
}

.visitor-stats {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 14px;
  margin: 22px 0 16px;
}

.visitor-stat {
  min-height: 150px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  padding: 22px;
  border: 1px solid var(--line-soft);
  border-radius: 8px;
  background:
    linear-gradient(135deg, rgba(201, 143, 67, 0.09), transparent 48%),
    rgba(255, 255, 255, 0.025);
}

.visitor-stat strong {
  color: var(--text);
  font-family: var(--serif);
  font-size: 3rem;
  font-weight: 400;
  line-height: 1;
  overflow-wrap: anywhere;
}

.visitor-stat span {
  color: var(--muted);
  font-size: 0.92rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
}

.stats-note {
  margin-top: 14px;
  color: var(--muted) !important;
  font-family: var(--sans) !important;
  font-size: 0.95rem !important;
  line-height: 1.7 !important;
}

.site-footer {
  display: flex;
  justify-content: space-between;
  gap: 24px;
  padding: 36px max(var(--gutter), calc((100vw - 1180px) / 2));
  border-top: 1px solid var(--line-soft);
  color: var(--muted);
}

.site-footer p {
  margin: 0 0 4px;
}

.site-footer nav {
  display: flex;
  gap: 34px;
}

.site-footer a {
  color: var(--muted);
  text-decoration: none;
}

.site-footer a:hover,
.site-footer a:focus-visible {
  color: var(--accent);
}

:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 4px;
}

@media (min-width: 1600px) {
  :root {
    --content: min(1320px, calc(100vw - (var(--gutter) * 2)));
  }
}

@media (max-width: 1180px) {
  :root {
    --gutter: 22px;
    --content: min(100vw - (var(--gutter) * 2), 860px);
  }

  .site-header {
    min-height: 68px;
    padding: 0 var(--gutter);
    flex-wrap: wrap;
    align-content: center;
  }

  .js .site-header {
    flex-wrap: nowrap;
  }

  .js .menu-button {
    display: flex;
  }

  .site-nav {
    display: flex;
    flex-wrap: wrap;
    flex-basis: 100%;
    gap: 10px 18px;
    padding-bottom: 14px;
  }

  .js .site-nav {
    position: fixed;
    top: 68px;
    left: var(--gutter);
    right: var(--gutter);
    display: none;
    flex-basis: auto;
    flex-direction: column;
    align-items: stretch;
    gap: 0;
    padding: 14px;
    max-height: calc(100svh - 88px);
    overflow: auto;
    background: rgba(10, 10, 11, 0.98);
    border: 1px solid var(--line);
    border-radius: 8px;
    box-shadow: var(--shadow);
  }

  .js .site-nav.open {
    display: flex;
  }

  .site-nav a {
    padding: 14px;
  }

  .site-nav a::after {
    display: none;
  }

  .hero {
    min-height: auto;
    display: block;
  }

  .hero-copy {
    min-height: auto;
    width: var(--content);
    padding: 42px 0 28px;
  }

  h1 {
    font-size: 5.6rem;
  }

  h2,
  .page-hero.compact h1,
  .story-hero h1 {
    font-size: 4.35rem;
  }

  h3,
  .practice-card h3,
  .story-chapter h2 {
    font-size: 2.35rem;
  }

  .lead {
    font-size: 1.16rem;
  }

  .story-title {
    font-size: 1.6rem;
  }

  .hero-media {
    position: relative;
    height: 200px;
  }

  .hero-media img {
    object-position: 58% center;
  }

  .hero-media::after {
    background:
      linear-gradient(90deg, rgba(5, 5, 6, 0.96), rgba(5, 5, 6, 0.2) 54%, transparent),
      linear-gradient(0deg, rgba(5, 5, 6, 0.18), transparent 42%);
  }

  .story-row {
    grid-template-columns: 40px minmax(0, 1fr);
    gap: 8px 14px;
    padding: 18px 0;
  }

  .story-themes,
  .story-time {
    grid-column: 2;
    text-align: left;
  }

  .reading-preview,
  .story-layout,
  .contact-strip,
  .contact-page-grid,
  .practice-grid,
  .visitor-stats {
    grid-template-columns: 1fr;
  }

  .progress-card,
  .reader-aside {
    position: static;
    border-left: 0;
    border-top: 1px solid var(--line);
    padding: 28px 0 0;
  }

  .fake-progress,
  .reader-line {
    width: 100%;
    height: 2px;
    margin-left: 0;
  }

  .fake-progress span {
    width: 28%;
    height: 2px;
  }

  .reader-line span {
    top: 50%;
    left: 0;
    transform: translate(0, -50%);
  }

  .contact-image {
    aspect-ratio: 16 / 9;
  }

  .visitor-stat {
    min-height: 132px;
  }

  .visitor-stat strong {
    font-size: 2.55rem;
  }

  .story-nav,
  .site-footer {
    flex-direction: column;
  }

  .site-footer nav {
    flex-wrap: wrap;
  }
}

@media (max-width: 760px) {
  :root {
    --gutter: 18px;
    --content: calc(100vw - (var(--gutter) * 2));
  }

  .brand {
    font-size: 1.45rem;
  }

  .menu-button {
    width: 46px;
    height: 46px;
  }

  h1 {
    font-size: 4rem;
  }

  h2,
  .page-hero.compact h1,
  .story-hero h1 {
    font-size: 3.4rem;
  }

  h3,
  .practice-card h3,
  .story-chapter h2 {
    font-size: 2rem;
  }

  .lead,
  .preview-text p:not(.section-label),
  .story-content p,
  .legal-content p,
  .contact-copy p,
  .legal-card p,
  .practice-card p:not(.section-label) {
    font-size: 1.06rem;
    line-height: 1.82;
  }

  .section,
  .page-hero {
    padding-top: 58px;
    padding-bottom: 58px;
  }

  .story-hero {
    padding-top: 56px;
    padding-bottom: 48px;
  }

  .story-row {
    grid-template-columns: 34px minmax(0, 1fr);
    column-gap: 12px;
  }

  .story-title {
    font-size: 1.34rem;
  }

  .practice-card,
  .legal-content,
  .legal-card {
    padding: 24px;
  }

  .contact-form input,
  .contact-form textarea {
    padding: 13px;
  }
}

@media (max-width: 560px) {
  :root {
    --gutter: 14px;
    --content: calc(100vw - (var(--gutter) * 2));
  }

  h1 {
    font-size: 3.65rem;
  }

  .page-hero.compact h1,
  .story-hero h1 {
    font-size: 3rem;
  }

  .hero-meta {
    display: grid;
    gap: 6px;
    margin: 28px 0 24px;
  }

  .hero-meta span:not(:first-child)::before {
    display: none;
  }

  .section,
  .page-hero,
  .story-page {
    width: var(--content);
  }

  .contact-form button {
    width: 100%;
  }
}

@media (max-width: 380px) {
  :root {
    --gutter: 12px;
  }

  .brand {
    font-size: 1.28rem;
  }

  h1 {
    font-size: 3rem;
  }

  h2,
  .page-hero.compact h1,
  .story-hero h1 {
    font-size: 2.45rem;
  }

  h3,
  .practice-card h3,
  .story-chapter h2 {
    font-size: 1.75rem;
  }

  .hero-copy {
    padding-top: 34px;
  }

  .hero-media {
    height: 160px;
  }

  .story-title {
    font-size: 1.2rem;
  }

  .story-row {
    grid-template-columns: 28px minmax(0, 1fr);
    gap: 7px 10px;
  }

  .practice-card,
  .legal-content,
  .legal-card {
    padding: 18px;
  }

  .visitor-stat {
    padding: 18px;
  }

  .site-footer nav {
    gap: 18px;
  }
}

@media (max-height: 520px) and (orientation: landscape) {
  .hero {
    min-height: auto;
    display: block;
  }

  .hero-copy {
    min-height: auto;
    padding-top: 28px;
    padding-bottom: 24px;
  }

  .hero-media {
    position: relative;
    height: 150px;
  }
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    scroll-behavior: auto !important;
    transition: none !important;
  }
}
