:root {
  --bg: #0a1014;
  --panel-width: clamp(248px, 23vw, 292px);
  --line: rgba(196, 179, 141, 0.16);
  --text: #eadfc7;
  --text-soft: rgba(234, 223, 199, 0.68);
  --accent: #b89b62;
  --accent-soft: rgba(184, 155, 98, 0.14);
  --oxide: #7d8a73;
  --stamp: rgba(133, 58, 44, 0.18);
  --grid-line: rgba(168, 149, 117, 0.08);
  --glow: rgba(176, 149, 92, 0.08);
  --fs-body: clamp(0.98rem, 0.18vw + 0.94rem, 1.08rem);
  --fs-panel-kicker: clamp(1.05rem, 0.45vw + 0.94rem, 1.32rem);
  --fs-panel-heading: clamp(0.78rem, 0.16vw + 0.74rem, 0.9rem);
  --fs-panel-title: clamp(1.08rem, 0.4vw + 0.98rem, 1.36rem);
  --fs-panel-meta: clamp(0.66rem, 0.18vw + 0.62rem, 0.78rem);
  --fs-badge: clamp(0.6rem, 0.12vw + 0.58rem, 0.68rem);
  --fs-hero: clamp(3.5rem, 4.6vw + 1.2rem, 5.8rem);
  --fs-signal: clamp(0.74rem, 0.2vw + 0.7rem, 0.9rem);
}

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

html,
body {
  min-height: 100%;
}

html {
  background: #0a1014;
}

body {
  margin: 0;
  overflow-x: hidden;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  background:
    radial-gradient(circle at top, rgba(114, 98, 63, 0.08), transparent 34%),
    linear-gradient(180deg, #0d1419 0%, var(--bg) 44%, #090e12 100%);
  color: var(--text);
  font-family: "PT Serif", Georgia, serif;
  font-size: var(--fs-body);
  line-height: 1.45;
}

.site-footer {
  position: relative;
  z-index: 3;
  margin-top: 24px;
  padding: 10px 24px 14px;
  background: rgba(58, 58, 58, 0.92);
  color: #f3f0e7;
}

.site-footer::before {
  content: "";
  display: block;
  width: 100%;
  border-top: 2px dashed rgba(255, 255, 255, 0.82);
  opacity: 0.9;
}

.site-footer__inner {
  padding-top: 10px;
  text-align: center;
  font-family: "Courier New", monospace;
  font-size: clamp(1.1rem, 0.28vw + 1.02rem, 1.4rem);
  line-height: 1.2;
}

body::before {
  content: "";
  position: fixed;
  inset: 0;
  pointer-events: none;
  opacity: 0.18;
  background:
    radial-gradient(circle at 20% 20%, rgba(255, 255, 255, 0.05), transparent 18%),
    radial-gradient(circle at 80% 35%, rgba(255, 255, 255, 0.04), transparent 16%),
    repeating-linear-gradient(
      0deg,
      transparent 0,
      transparent 2px,
      rgba(255, 248, 230, 0.015) 2px,
      rgba(255, 248, 230, 0.015) 3px
    );
  mix-blend-mode: soft-light;
}

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

.landing-shell {
  width: min(100%, 1600px);
  margin: 0;
  padding: 0;
  flex: 1 0 auto;
}

.hero {
  min-height: 100vh;
  position: relative;
  display: grid;
  grid-template-columns: var(--panel-width) minmax(0, 1fr);
  overflow: hidden;
  padding: 0;
}

.hero-main {
  position: absolute;
  inset: 0 0 0 var(--panel-width);
  min-width: 0;
}

.hero-stage {
  position: absolute;
  top: 50vh;
  left: 50%;
  z-index: 6;
  width: 100%;
  display: flex;
  justify-content: center;
  pointer-events: none;
  transition:
    top 2200ms cubic-bezier(0.22, 0.76, 0.2, 1),
    transform 2200ms cubic-bezier(0.22, 0.76, 0.2, 1);
  transform: translate(-50%, -50%);
}

body.is-ready .hero-stage {
  top: 28px;
  transform: translate(-50%, 0);
}

body.is-instant .hero-stage,
body.is-instant .hero-title,
body.is-instant .hero-media,
body.is-instant .mode-panel {
  transition: none;
}

.hero-title {
  position: relative;
  z-index: 1;
  margin: 0;
  color: #f0e5cf;
  font-family: "PT Serif", Georgia, serif;
  font-size: var(--fs-hero);
  font-weight: 700;
  line-height: 0.94;
  letter-spacing: 0.03em;
  white-space: nowrap;
  text-align: center;
  opacity: 0;
  transform: translateY(42px) scale(0.992);
  transition:
    opacity 1350ms ease,
    transform 2050ms cubic-bezier(0.22, 0.76, 0.2, 1);
}

body.is-ready .hero-title {
  opacity: 1;
  transform: translateY(0) scale(1);
}

.hero-media {
  width: 100%;
  height: 100vh;
  padding: 138px 48px 88px;
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  transform: translateY(56px);
  transition:
    opacity 1500ms ease 1200ms,
    transform 1800ms cubic-bezier(0.22, 0.76, 0.2, 1) 1200ms;
}

body.is-ready .hero-media {
  opacity: 1;
  transform: translateY(0);
}

.mode-panel {
  position: relative;
  display: grid;
  align-content: start;
  gap: 18px;
  min-height: 100vh;
  padding: 20px 16px 28px 20px;
  border-right: 1px solid rgba(34, 32, 28, 0.7);
  background:
    url("/assets/media/template-101/paper-left-menu.png") left 84px / 100% auto no-repeat,
    linear-gradient(180deg, #3a3a3a 0%, #303030 100%);
  box-shadow: inset -18px 0 34px rgba(0, 0, 0, 0.18);
  overflow: hidden;
  opacity: 0;
  transform: translateY(22px);
  transition:
    opacity 760ms ease,
    transform 980ms cubic-bezier(0.22, 0.76, 0.2, 1);
}

.mode-panel::before {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
  background:
    radial-gradient(circle at 22% 16%, rgba(214, 196, 146, 0.14), transparent 18%),
    radial-gradient(circle at 78% 82%, rgba(150, 67, 54, 0.1), transparent 18%),
    url("/assets/media/template-101/panel-ornaments.svg?v=site20") center top / cover no-repeat,
    repeating-linear-gradient(
      0deg,
      transparent 0,
      transparent 92px,
      rgba(69, 55, 39, 0.08) 92px,
      rgba(69, 55, 39, 0.08) 93px
    );
  opacity: 0.74;
}

.mode-panel::after {
  content: "";
  position: absolute;
  inset: 78px 10px 16px 10px;
  pointer-events: none;
  border: 1px solid rgba(76, 60, 39, 0.18);
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.05),
    inset 0 -1px 0 rgba(61, 47, 31, 0.12);
  opacity: 0.66;
}

.mode-panel > * {
  position: relative;
  z-index: 1;
}

body.is-ready .mode-panel {
  opacity: 1;
  transform: translateY(0);
}

body.page-text-mode .mode-panel {
  opacity: 1;
  transform: translateY(0);
}

body.page-reference .mode-panel {
  opacity: 1;
  transform: translateY(0);
}

body.page-text-mode .mode-panel,
body.page-reference .mode-panel {
  position: sticky;
  top: 0;
  align-self: start;
  height: 100vh;
  min-height: 100vh;
}

.panel-brand {
  display: flex;
  align-items: center;
  gap: 12px;
  min-height: 58px;
  padding-left: 10px;
  outline: none;
  -webkit-tap-highlight-color: transparent;
}

.panel-brand:hover .panel-brand-copy span,
.panel-brand:focus-visible .panel-brand-copy span {
  color: #f4ead6;
}

.panel-brand img {
  width: 76px;
  height: 76px;
  display: block;
  object-fit: cover;
  border-radius: 50%;
  border: 1px solid rgba(255, 255, 255, 0.22);
  filter: drop-shadow(0 3px 8px rgba(0, 0, 0, 0.22));
}

.panel-brand-copy {
  display: grid;
  gap: 3px;
}

.panel-brand-copy span {
  color: #f1e7d3;
  font-family: "PT Serif", Georgia, serif;
  font-size: clamp(1.34rem, 0.4vw + 1.2rem, 1.62rem);
  font-weight: 700;
  letter-spacing: 0.03em;
  text-transform: uppercase;
  text-shadow: 0 1px 0 rgba(0, 0, 0, 0.18);
}

.panel-brand-copy small {
  color: rgba(238, 226, 199, 0.68);
  font-family: "PT Mono", monospace;
  font-size: 0.72rem;
  letter-spacing: 0.18em;
  text-transform: uppercase;
}

.panel-nav {
  display: grid;
  gap: 2px;
  padding: 18px 2px 0 0;
}

.panel-nav-header {
  display: grid;
  justify-items: start;
  gap: 0;
  margin: 0 0 14px;
  padding: 0 12px 6px 54px;
}

.panel-nav-header img {
  width: 126px;
  height: auto;
  display: block;
  object-fit: contain;
  filter: drop-shadow(0 2px 6px rgba(0, 0, 0, 0.16));
}

.panel-link {
  display: block;
  margin: 0;
  padding: 12px 12px;
  text-align: left;
  color: #221d16;
  font-family: "PT Serif", Georgia, serif;
  font-size: clamp(1.02rem, 0.24vw + 0.98rem, 1.24rem);
  font-weight: 700;
  line-height: 1.1;
  letter-spacing: 0.01em;
  cursor: pointer;
  border-radius: 8px;
  outline: none;
  -webkit-tap-highlight-color: transparent;
  text-wrap: balance;
  text-shadow: 0 1px 0 rgba(255, 248, 230, 0.18);
  transition:
    color 160ms ease,
    background-color 160ms ease,
    transform 160ms ease;
}

.panel-link:hover {
  color: #7b1a14;
  text-decoration: underline;
  text-underline-offset: 0.12em;
  background-color: transparent;
}

.panel-link.is-active {
  color: #15100c;
  text-decoration: underline;
  text-underline-offset: 0.14em;
  background-color: transparent;
}

.panel-link.is-active:hover {
  transform: none;
}

.panel-link:focus,
.panel-link:focus-visible {
  outline: none;
  background-color: transparent;
  box-shadow: none;
}

.panel-link.is-disabled {
  opacity: 0.5;
  cursor: default;
  pointer-events: none;
}

.panel-link.is-disabled:hover {
  background: transparent;
  color: #232323;
  text-decoration: none;
  transform: none;
}

@media (max-width: 900px) {
  .landing-shell {
    width: 100%;
  }

  .hero {
    min-height: 100svh;
    grid-template-columns: 1fr;
  }

  .hero-main {
    position: relative;
    inset: auto;
  }

  .hero-stage {
    top: 50svh;
  }

  body.is-ready .hero-stage {
    top: 18px;
  }

  .hero-title {
    white-space: normal;
    max-width: 10ch;
    line-height: 1;
  }

  .mode-panel {
    position: relative;
    top: auto;
    align-self: auto;
    height: auto;
    min-height: 100svh;
    padding: 18px 16px;
    gap: 14px;
    border-right: none;
    border-bottom: 1px solid var(--line);
    background:
      url("/assets/media/template-101/paper-left-menu.png") left 84px / 100% auto no-repeat,
      linear-gradient(180deg, #3a3a3a 0%, #303030 100%);
  }

  .panel-brand img {
    width: 62px;
    height: 62px;
  }

  .panel-brand {
    padding-left: 0;
  }

  .panel-brand-copy small {
    display: none;
  }

  .panel-nav {
    padding-top: 16px;
  }

  .panel-nav-header img {
    width: 112px;
  }

  .panel-link {
    padding: 10px 12px;
    font-size: 0.94rem;
  }

  .hero-media {
    width: min(100%, 760px);
    height: auto;
    min-height: calc(100svh - 120px);
    margin: 0 auto;
    padding: 124px 18px 96px;
  }
}
