@import url('https://fonts.googleapis.com/css2?family=Karla:wght@300;400;500;600;700&family=Playfair+Display+SC:wght@400;700&display=swap');

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

:root {
  --ink: #2B1B2E;
  --ink-deep: #1E1022;
  --amber: #E8A33D;
  --cream: #F7F1E6;
  --dim: rgba(247, 241, 230, 0.76);
  --faint: rgba(247, 241, 230, 0.52);
  --line: rgba(247, 241, 230, 0.16);
  --glass: rgba(247, 241, 230, 0.055);
  --display: 'Playfair Display SC', "Songti SC", Georgia, serif;
  --text: 'Karla', system-ui, -apple-system, "Segoe UI", "Noto Sans SC", "PingFang SC", sans-serif;
  --pad: clamp(20px, 5vw, 56px);
}

html {
  background: var(--ink-deep);
  scroll-behavior: smooth;
  -webkit-text-size-adjust: 100%;
  overflow-x: hidden;
}

body {
  margin: 0;
  min-height: 100%;
  font-family: var(--text);
  font-size: 1.0625rem;
  font-weight: 400;
  line-height: 1.75;
  color: var(--cream);
  background:
    radial-gradient(130% 70% at 50% -10%, #3d2844 0%, rgba(61, 40, 68, 0) 60%),
    linear-gradient(180deg, #2B1B2E 0%, #251630 52%, #1E1022 100%);
  overflow-x: hidden;
}

img { max-width: 100%; height: auto; }

a { color: var(--amber); text-decoration-thickness: 1px; text-underline-offset: 3px; }

a:focus-visible,
summary:focus-visible {
  outline: 2px solid var(--amber);
  outline-offset: 3px;
  border-radius: 4px;
}

h1, h2, h3, h4 { font-family: var(--display); font-weight: 400; line-height: 1.18; }

/* ---------- fixed depth backdrop ---------- */
.backdrop {
  position: fixed;
  inset: -12%;
  z-index: -1;
  pointer-events: none;
  overflow: hidden;
}

.backdrop span {
  position: absolute;
  display: block;
  border-radius: 50%;
  filter: blur(70px);
  will-change: transform;
}

.backdrop .b1 {
  width: 46vmax; height: 46vmax; top: -12%; left: -14%;
  background: radial-gradient(circle, rgba(232, 163, 61, 0.28), transparent 66%);
  opacity: 0.75;
}
.backdrop .b2 {
  width: 40vmax; height: 40vmax; top: 34%; right: -18%;
  background: radial-gradient(circle, rgba(247, 241, 230, 0.16), transparent 68%);
}
.backdrop .b3 {
  width: 54vmax; height: 54vmax; bottom: -18%; left: 12%;
  background: radial-gradient(circle, rgba(124, 74, 148, 0.45), transparent 70%);
}
.backdrop .b4 {
  width: 26vmax; height: 26vmax; top: 8%; right: 24%;
  background: radial-gradient(circle, rgba(232, 163, 61, 0.16), transparent 70%);
}

.progress {
  position: fixed;
  inset: 0 0 auto 0;
  height: 3px;
  z-index: 70;
  background: linear-gradient(90deg, var(--amber), rgba(232, 163, 61, 0.35));
  transform: scaleX(0);
  transform-origin: 0 50%;
  will-change: transform;
}

/* ---------- header ---------- */
.topbar {
  position: sticky;
  top: 0;
  z-index: 60;
  background: rgba(30, 16, 34, 0.82);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  border-bottom: 1px solid var(--line);
}

.brandline,
.navdetails {
  max-width: 1180px;
  margin: 0 auto;
  padding-inline: var(--pad);
}

.brandline {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  padding-top: 8px;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  min-height: 44px;
  color: var(--cream);
  text-decoration: none;
}

.brand .mark {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 32px;
  height: 32px;
  border-radius: 4px;
  object-fit: cover;
  border: 1px solid rgba(232, 163, 61, 0.55);
  background: rgba(232, 163, 61, 0.12);
}

.brand .mark-txt {
  font-family: var(--display);
  font-size: 1rem;
  color: var(--amber);
}

.brandtext {
  font-family: var(--display);
  font-size: 1.02rem;
  letter-spacing: 0.03em;
  line-height: 1.3;
}

.ping {
  display: inline-flex;
  align-items: center;
  min-height: 44px;
  padding: 0 14px;
  font-size: 0.95rem;
  letter-spacing: 0.04em;
  color: var(--amber);
  text-decoration: none;
  border: 1px solid rgba(232, 163, 61, 0.42);
  border-radius: 4px;
  background: rgba(232, 163, 61, 0.08);
}

.navdetails {
  position: relative;
  padding-bottom: 8px;
  padding-top: 4px;
}

.navdetails > summary {
  display: inline-flex;
  align-items: center;
  gap: 9px;
  min-height: 44px;
  padding: 0 14px;
  font-size: 0.95rem;
  letter-spacing: 0.06em;
  color: var(--cream);
  list-style: none;
  cursor: pointer;
  border: 1px solid var(--line);
  border-radius: 4px;
  background: rgba(247, 241, 230, 0.04);
}

.navdetails > summary::-webkit-details-marker { display: none; }

.bars {
  display: block;
  width: 16px;
  height: 2px;
  background: var(--amber);
  box-shadow: 0 -5px 0 var(--amber), 0 5px 0 var(--amber);
}

.navdetails[open] > summary { border-color: rgba(232, 163, 61, 0.55); }

.navmenu {
  margin: 0;
  padding: 8px 0 4px;
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.navmenu a {
  display: flex;
  align-items: center;
  min-height: 44px;
  padding: 0 12px;
  color: var(--dim);
  text-decoration: none;
  font-size: 1rem;
  border-radius: 4px;
  border-left: 2px solid transparent;
}

.navmenu a:hover {
  color: var(--cream);
  background: rgba(247, 241, 230, 0.06);
  border-left-color: var(--amber);
}

/* ---------- hero ---------- */
.hero {
  position: relative;
  isolation: isolate;
  display: grid;
  place-items: center;
  min-height: 45vh;
  padding: clamp(30px, 7vw, 66px) var(--pad);
  text-align: center;
  overflow: clip;
}

.depth {
  position: absolute;
  inset: -22% -10%;
  margin: 0;
  z-index: -1;
  overflow: hidden;
}

.depth span {
  position: absolute;
  display: block;
  border-radius: 50%;
  filter: blur(48px);
  will-change: transform;
}

.depth .l1 {
  width: min(74vw, 520px); aspect-ratio: 1; left: -12%; top: 4%;
  background: radial-gradient(circle, rgba(232, 163, 61, 0.55), transparent 66%);
  opacity: 0.6;
}
.depth .l2 {
  width: min(58vw, 400px); aspect-ratio: 1; right: -10%; top: -16%;
  background: radial-gradient(circle, rgba(247, 241, 230, 0.26), transparent 66%);
  opacity: 0.7;
}
.depth .l3 {
  width: min(86vw, 620px); aspect-ratio: 1; left: 16%; bottom: -34%;
  background: radial-gradient(circle, rgba(126, 76, 152, 0.8), transparent 70%);
  opacity: 0.75;
}

.badge {
  position: relative;
  display: block;
  width: max-content;
  margin: 0 auto 14px;
  padding: 5px 15px;
  font-size: 0.86rem;
  letter-spacing: 0.22em;
  color: var(--amber);
  border: 1px solid rgba(232, 163, 61, 0.5);
  border-radius: 999px;
  background: rgba(232, 163, 61, 0.1);
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
  rotate: -2.5deg;
}

.hero h1 {
  margin: 0;
  max-width: 19ch;
  font-size: clamp(2rem, 7.4vw, 4.1rem);
  line-height: 1.1;
  letter-spacing: 0.01em;
  color: var(--cream);
  text-shadow: 0 18px 46px rgba(20, 8, 24, 0.7);
}

/* ---------- stage / content ---------- */
.stage {
  max-width: 1180px;
  margin: 0 auto;
  padding: 10px var(--pad) clamp(48px, 8vw, 88px);
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 30px;
}

.content { min-width: 0; }

.content > div {
  position: relative;
  margin: 0 0 26px;
  padding: clamp(22px, 4vw, 44px);
  border: 1px solid var(--line);
  border-radius: 4px;
  background: var(--glass);
  backdrop-filter: blur(9px);
  -webkit-backdrop-filter: blur(9px);
  box-shadow: 0 24px 60px -34px rgba(12, 4, 16, 0.95);
  scroll-margin-top: 128px;
}

.content > div::before {
  content: "";
  position: absolute;
  inset: 0 auto auto 0;
  width: 54px;
  height: 2px;
  background: linear-gradient(90deg, var(--amber), rgba(232, 163, 61, 0));
}

.content > div:last-child { margin-bottom: 0; }

.content [id] { scroll-margin-top: 128px; }

.content h2 {
  margin: 0 0 0.55rem;
  font-size: clamp(1.42rem, 3.6vw, 2.05rem);
  color: var(--cream);
}

.content h3 {
  margin: 1.5rem 0 0.4rem;
  font-size: clamp(1.14rem, 2.6vw, 1.4rem);
  color: var(--amber);
}

hr {
  border: 0;
  height: 1px;
  max-width: 130px;
  margin: 0.85rem 0 1.35rem;
  background: linear-gradient(90deg, var(--amber), rgba(232, 163, 61, 0));
}

.content p {
  margin: 0 0 1.05rem;
  color: var(--dim);
}

.content p:last-child { margin-bottom: 0; }

.content ul,
.content ol { margin: 0 0 1.1rem; padding-left: 1.25rem; color: var(--dim); }
.content li { margin-bottom: 0.45rem; }

.content strong { color: var(--cream); font-weight: 600; }

.content blockquote {
  margin: 0 0 1.1rem;
  padding: 2px 0 2px 16px;
  border-left: 2px solid var(--amber);
  color: var(--cream);
}

.content figure { margin: 0 0 1.1rem; }

.content img {
  display: block;
  border-radius: 4px;
  border: 1px solid var(--line);
}

/* ---------- aside ---------- */
.toc {
  align-self: start;
  padding: 18px 16px 14px;
  border: 1px solid var(--line);
  border-radius: 4px;
  background: rgba(247, 241, 230, 0.05);
  backdrop-filter: blur(9px);
  -webkit-backdrop-filter: blur(9px);
}

.toc h2 {
  margin: 0;
  font-size: 1rem;
  letter-spacing: 0.24em;
  color: var(--amber);
  font-family: var(--text);
  font-weight: 600;
}

.toc hr { margin: 0.55rem 0 0.5rem; max-width: none; }

.toc ul { margin: 0; padding: 0; list-style: none; }

.toc a {
  display: flex;
  align-items: center;
  min-height: 40px;
  padding: 0 8px;
  font-size: 0.95rem;
  color: var(--dim);
  text-decoration: none;
  border-left: 2px solid transparent;
  border-radius: 3px;
}

.toc a:hover { color: var(--cream); background: rgba(247, 241, 230, 0.06); }

.toc a.on {
  color: var(--amber);
  border-left-color: var(--amber);
  background: rgba(232, 163, 61, 0.1);
}

/* ---------- footer ---------- */
.foot {
  max-width: 1180px;
  margin: 0 auto;
  padding: clamp(36px, 7vw, 64px) var(--pad) 40px;
  display: grid;
  grid-template-columns: 1fr;
  gap: 10px 32px;
  border-top: 1px solid var(--line);
}

.foot-brand {
  margin: 0;
  font-family: var(--display);
  font-size: 1.3rem;
  line-height: 1.35;
  color: var(--cream);
}

.foot-links {
  margin: 0;
  display: flex;
  flex-wrap: wrap;
  gap: 0 16px;
}

.foot-links a {
  display: inline-flex;
  align-items: center;
  min-height: 44px;
  font-size: 0.96rem;
  color: var(--faint);
  text-decoration: none;
}

.foot-links a:hover { color: var(--amber); }

.foot-cta { margin: 6px 0 0; }

.foot-cta a {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  min-height: 48px;
  font-family: var(--display);
  font-size: clamp(1.3rem, 3.4vw, 1.7rem);
  color: var(--amber);
  text-decoration: none;
  border-bottom: 1px solid rgba(232, 163, 61, 0.45);
}

.foot small {
  grid-column: 1 / -1;
  margin-top: 18px;
  padding-top: 14px;
  border-top: 1px solid var(--line);
  font-size: 0.95rem;
  color: var(--faint);
}

/* ---------- reveal ---------- */
.js .hero h1,
.js .hero .badge,
.js .content > div,
.js .toc {
  opacity: 0;
  transform: translateY(20px);
  transition: opacity 0.7s ease, transform 0.7s cubic-bezier(0.2, 0.7, 0.3, 1);
}

.js .hero h1.in,
.js .hero .badge.in,
.js .content > div.in,
.js .toc.in {
  opacity: 1;
  transform: none;
}

/* ---------- breakpoints ---------- */
@media (min-width: 780px) {
  .foot { grid-template-columns: 1.1fr 1.7fr 0.8fr; align-items: start; }
}

@media (min-width: 900px) {
  .navdetails {
    padding-top: 0;
    padding-bottom: 10px;
  }

  .navdetails > summary { display: none; }

  .navmenu {
    display: flex !important;
    flex-direction: row;
    flex-wrap: wrap;
    gap: 2px 4px;
    padding: 0;
  }

  .navmenu a {
    min-height: 42px;
    padding: 0 12px;
    font-size: 0.94rem;
    letter-spacing: 0.05em;
    border-left: 0;
    border-bottom: 2px solid transparent;
    border-radius: 3px 3px 0 0;
  }

  .navmenu a:hover { border-left-color: transparent; border-bottom-color: var(--amber); }

  .stage {
    grid-template-columns: minmax(0, 1fr) 236px;
    gap: 40px;
    padding-top: 24px;
  }

  .toc { position: sticky; top: 116px; }
}

@media (min-width: 1100px) {
  .brandtext { font-size: 1.12rem; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }

  .js .hero h1,
  .js .hero .badge,
  .js .content > div,
  .js .toc {
    opacity: 1;
    transform: none;
    transition: none;
  }

  .progress { transition: none; }
}

button[aria-expanded]{min-width:44px;min-height:44px}
