:root {
  --paper: #f5e6c8;
  --paper-2: #fdf6e8;
  --caramel: #d4a574;
  --caramel-2: #a97b46;
  --ink: #262117;
  --ink-2: #4b4131;
  --line: rgba(38, 33, 23, 0.24);
  --glass: rgba(255, 252, 243, 0.52);
}

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

html {
  scroll-behavior: smooth;
  -webkit-text-size-adjust: 100%;
}

body {
  margin: 0;
  padding: 0 0 calc(92px + env(safe-area-inset-bottom));
  background: var(--paper);
  color: var(--ink);
  font-family: "Space Mono", ui-monospace, Menlo, "PingFang SC", "Microsoft YaHei", monospace;
  font-size: 17px;
  line-height: 1.75;
  overflow-x: hidden;
}

body::before {
  content: "";
  position: fixed;
  inset: 0;
  z-index: -1;
  pointer-events: none;
  background:
    radial-gradient(58% 42% at 88% 0, rgba(212, 165, 116, 0.55), rgba(212, 165, 116, 0) 72%),
    radial-gradient(46% 36% at 4% 46%, rgba(255, 252, 243, 0.85), rgba(255, 252, 243, 0) 62%),
    linear-gradient(165deg, #f8edd6, #f3e2c1 58%, #eed7ad);
}

body::after {
  content: "";
  position: fixed;
  inset: 0;
  z-index: 9;
  pointer-events: none;
  opacity: 0.26;
  mix-blend-mode: multiply;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='170' height='170'%3E%3Cfilter id='g'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.75' numOctaves='3' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='170' height='170' filter='url(%23g)'/%3E%3C/svg%3E");
  background-size: 170px 170px;
}

a {
  color: var(--ink);
}

:focus-visible {
  outline: 3px solid var(--caramel-2);
  outline-offset: 2px;
}

.main {
  max-width: 1120px;
  margin: 0 auto;
  padding: 0 18px;
}

.hero {
  position: relative;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: flex-end;
  text-align: right;
  min-height: 45vh;
  padding: 22px 0 20px;
  border-bottom: 2px solid var(--ink);
  overflow: hidden;
}

.hero::after {
  content: "";
  position: absolute;
  inset: 0;
  z-index: 3;
  pointer-events: none;
  background: repeating-linear-gradient(0deg, rgba(38, 33, 23, 0.07) 0 1px, rgba(38, 33, 23, 0) 1px 4px);
  animation: track 7s linear infinite;
}

@keyframes track {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-3px) skewX(0.4deg); }
}

.hero-copy {
  position: relative;
  z-index: 4;
  max-width: min(560px, 92%);
}

.hero h1 {
  margin: 0;
  font-size: clamp(27px, 6.8vw, 52px);
  line-height: 1.16;
  letter-spacing: -0.01em;
  text-shadow: 3px 3px 0 rgba(253, 246, 232, 0.95);
}

.rule {
  display: block;
  width: 88px;
  height: 4px;
  margin: 14px 0 0 auto;
  background: var(--ink);
  box-shadow: 0 6px 0 -2px var(--caramel);
}

.shots {
  position: absolute;
  left: 0;
  top: 50%;
  z-index: 1;
  width: 56%;
  height: 86%;
  transform: translateY(-50%);
}

.shots img {
  position: absolute;
  object-fit: cover;
  background: var(--paper-2);
  border: 6px solid var(--paper-2);
  box-shadow: 0 12px 26px rgba(38, 33, 23, 0.28);
  filter: sepia(0.34) contrast(1.06) saturate(0.82);
}

.shot-a {
  width: 62%;
  height: 64%;
  left: 0;
  top: 4%;
  transform: rotate(-2.6deg);
}

.shot-b {
  width: 50%;
  height: 54%;
  left: 34%;
  bottom: 2%;
  transform: rotate(2deg);
}

.film {
  counter-reset: sec;
  padding: 30px 0 8px;
}

.film > section {
  counter-increment: sec;
  position: relative;
  margin: 0 0 24px;
  padding: 20px 18px 24px;
  background: var(--glass);
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
  border: 1px solid var(--line);
  border-left: 5px solid var(--caramel);
  box-shadow: 7px 7px 0 rgba(38, 33, 23, 0.09);
}

.film > section:nth-child(odd) {
  margin-right: clamp(0px, 3.5%, 52px);
}

.film > section:nth-child(even) {
  margin-left: clamp(0px, 3.5%, 52px);
}

.film > section[id] {
  scroll-margin-top: 16px;
}

.film h2 {
  margin: 0 0 12px;
  font-size: clamp(20px, 3.4vw, 28px);
  line-height: 1.34;
  letter-spacing: 0.005em;
}

.film h2::before {
  content: counter(sec, decimal-leading-zero);
  display: inline-block;
  margin-right: 0.6em;
  color: var(--caramel-2);
  font-size: 0.78em;
  vertical-align: 0.12em;
  letter-spacing: 0.06em;
}

.film h2 + hr {
  width: 62px;
  margin: 0 0 16px;
  border: 0;
  border-top: 2px solid var(--ink);
}

.film h3 {
  margin: 22px 0 10px;
  font-size: 19px;
  line-height: 1.4;
}

.film p {
  margin: 0 0 14px;
}

.film ul,
.film ol {
  margin: 0 0 16px;
  padding-left: 24px;
}

.film li {
  margin: 6px 0;
}

.film strong {
  font-weight: 700;
  background: linear-gradient(transparent 62%, rgba(212, 165, 116, 0.8) 62%);
}

.film a {
  text-decoration: underline;
  text-decoration-color: var(--caramel);
  text-decoration-thickness: 2px;
  text-underline-offset: 3px;
}

.film a:hover {
  background: var(--caramel);
}

.film img {
  max-width: 100%;
  height: auto;
  border: 5px solid var(--paper-2);
  box-shadow: 0 10px 20px rgba(38, 33, 23, 0.2);
  filter: sepia(0.24) contrast(1.03) saturate(0.85);
}

.film blockquote {
  margin: 0 0 16px;
  padding: 10px 16px;
  border-left: 4px solid var(--caramel);
  background: rgba(255, 252, 243, 0.55);
}

.film table {
  width: 100%;
  border-collapse: collapse;
  font-size: 16px;
}

.film th,
.film td {
  border: 1px solid var(--line);
  padding: 8px 10px;
  text-align: left;
}

.site-foot {
  margin-top: 40px;
  padding: 24px 0 8px;
  border-top: 3px double var(--ink);
  background: linear-gradient(180deg, rgba(212, 165, 116, 0), rgba(212, 165, 116, 0.3));
}

.foot-in {
  max-width: 1120px;
  margin: 0 auto;
  padding: 0 18px;
}

.site-foot h2 {
  margin: 0 0 8px;
  font-size: 20px;
  letter-spacing: 0.14em;
}

.site-foot > .foot-in > hr {
  margin: 0 0 18px;
  border: 0;
  border-top: 1px solid var(--ink);
}

.foot-cols {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 16px;
}

.foot-cols dl {
  margin: 0;
}

.foot-cols dt {
  margin-bottom: 4px;
  font-size: 16px;
  font-weight: 700;
  letter-spacing: 0.04em;
  color: var(--ink-2);
  border-bottom: 1px solid var(--line);
  padding-bottom: 6px;
}

.foot-cols dd {
  margin: 0;
}

.foot-cols a {
  display: flex;
  align-items: center;
  min-height: 44px;
  padding: 6px 0;
  text-decoration: none;
  border-bottom: 1px dashed transparent;
  line-height: 1.4;
}

.foot-cols a:hover {
  border-bottom-color: var(--ink);
  background: rgba(212, 165, 116, 0.35);
}

.copy {
  margin: 18px 0 0;
  padding: 12px 0 22px;
  border-top: 1px dashed var(--line);
  font-size: 16px;
  letter-spacing: 0.08em;
  color: var(--ink-2);
}

.panel {
  position: fixed;
  inset: 0;
  z-index: 60;
  display: flex;
  justify-content: flex-end;
  pointer-events: none;
  background: rgba(38, 33, 23, 0);
  transition: background 0.3s ease;
}

body.menu-open .panel {
  pointer-events: auto;
  background: rgba(38, 33, 23, 0.58);
}

.menu {
  display: block;
  width: min(400px, 100%);
  height: 100%;
  padding: 20px 20px 40px;
  overflow-y: auto;
  background: var(--ink);
  color: var(--paper);
  border-left: 3px solid var(--caramel);
  transform: translateX(101%);
  transition: transform 0.36s cubic-bezier(0.2, 0.8, 0.2, 1);
}

body.menu-open .menu {
  transform: none;
}

.menu h2 {
  margin: 0 0 8px;
  font-size: 19px;
  letter-spacing: 0.22em;
  color: var(--paper);
}

.menu hr {
  margin: 0 0 14px;
  border: 0;
  border-top: 1px solid var(--caramel);
}

.panel-close {
  display: inline-flex;
  align-items: center;
  min-height: 44px;
  margin-bottom: 14px;
  padding: 8px 16px;
  font: inherit;
  font-size: 16px;
  color: var(--paper);
  background: transparent;
  border: 1px solid rgba(245, 230, 200, 0.45);
  cursor: pointer;
}

.panel-close:hover {
  background: rgba(245, 230, 200, 0.16);
}

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

.menu li + li {
  border-top: 1px dashed rgba(245, 230, 200, 0.3);
}

.menu a {
  display: flex;
  align-items: center;
  min-height: 50px;
  padding: 8px 2px;
  color: var(--paper);
  font-size: 17px;
  text-decoration: none;
}

.menu a:hover {
  color: var(--ink);
  background: var(--caramel);
  padding-left: 12px;
}

.dock {
  position: fixed;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: 40;
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 14px calc(10px + env(safe-area-inset-bottom));
  background: rgba(38, 33, 23, 0.94);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  border-top: 2px solid var(--caramel);
  color: var(--paper);
}

.dock .mark {
  display: flex;
  align-items: center;
  justify-content: center;
  min-width: 46px;
  min-height: 46px;
  text-decoration: none;
  color: var(--paper);
  border: 1px solid rgba(245, 230, 200, 0.4);
}

.mark img {
  display: block;
  width: 32px;
  height: 32px;
  object-fit: contain;
}

.mark-txt {
  font-size: 17px;
  font-weight: 700;
  letter-spacing: 0.06em;
}

.menu-btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  min-height: 46px;
  padding: 10px 18px;
  font: inherit;
  font-size: 16px;
  letter-spacing: 0.14em;
  color: var(--paper);
  background: transparent;
  border: 1px solid rgba(245, 230, 200, 0.5);
  cursor: pointer;
}

.menu-btn::before {
  content: "";
  width: 16px;
  height: 2px;
  background: var(--paper);
  box-shadow: 0 -5px 0 var(--paper), 0 5px 0 var(--paper);
}

.menu-btn:hover {
  background: rgba(245, 230, 200, 0.18);
}

.cta {
  display: inline-flex;
  align-items: center;
  margin-left: auto;
  min-height: 46px;
  padding: 10px 18px;
  font-size: 16px;
  font-weight: 700;
  letter-spacing: 0.1em;
  color: var(--ink);
  background: var(--caramel);
  text-decoration: none;
}

.cta:hover {
  background: var(--paper);
}

.rv {
  opacity: 0;
  transform: translateY(14px);
  transition: opacity 0.6s ease, transform 0.6s ease;
}

.rv.in {
  opacity: 1;
  transform: none;
}

@media (min-width: 900px) {
  .dock {
    left: 50%;
    right: auto;
    bottom: 16px;
    transform: translateX(-50%);
    max-width: 560px;
    border: 2px solid var(--ink);
    box-shadow: 0 10px 28px rgba(38, 33, 23, 0.32);
  }
}

@media (max-width: 680px) {
  body {
    font-size: 16px;
  }

  .hero {
    min-height: 0;
    padding: 16px 0 18px;
  }

  .hero-copy {
    max-width: 100%;
  }

  .shots {
    position: relative;
    top: auto;
    left: auto;
    order: 2;
    width: 100%;
    height: 152px;
    margin-top: 18px;
    transform: none;
  }

  .shot-a {
    width: 54%;
    height: 92%;
    top: 0;
  }

  .shot-b {
    width: 44%;
    height: 78%;
    left: auto;
    right: 2%;
    bottom: 0;
  }

  .film > div {
    padding: 16px 14px 20px;
  }

  .film > div:nth-child(odd),
  .film > div:nth-child(even) {
    margin-left: 0;
    margin-right: 0;
  }

  .foot-cols {
    grid-template-columns: minmax(0, 1fr);
    gap: 10px;
  }

  .dock {
    gap: 8px;
    padding-left: 12px;
    padding-right: 12px;
  }

  .menu-btn {
    padding: 10px 12px;
    letter-spacing: 0.08em;
  }

  .cta {
    padding: 10px 14px;
  }
}

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

  .hero::after {
    animation: none;
  }

  .rv {
    opacity: 1;
    transform: none;
    transition: none;
  }
}

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