:root {
  --paper: #fbf7ef;
  --surface: #f4ede1;
  --line: #d7cbbb;
  --accent: #8d6f49;
  --green: #263d35;
  --ink: #26221d;
  --muted: #766b5d;
  --white: #fffdf8;
  --shadow: 0 18px 46px rgba(61, 47, 31, 0.08);
}

* {
  box-sizing: border-box;
}

html {
  min-width: 320px;
  color: var(--ink);
  background: var(--paper);
  scroll-behavior: smooth;
}

body {
  min-height: 100vh;
  margin: 0;
  overflow-x: hidden;
  color: var(--ink);
  background: var(--paper);
  font-family: "Noto Serif SC", "Songti SC", serif;
}

body::before {
  position: fixed;
  inset: 0;
  z-index: -1;
  pointer-events: none;
  content: "";
  background: linear-gradient(180deg, rgba(255, 253, 248, 0.88), rgba(244, 237, 225, 0.44));
}

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

.eyebrow,
.hero__badges,
.analysis-card__index,
.sample-card span,
.qr-ticket__caption,
footer {
  font-family: "Courier Prime", "Noto Serif SC", monospace;
}

main {
  overflow: hidden;
}

.hero,
.features {
  padding-inline: clamp(18px, 5.4vw, 78px);
}

.hero {
  position: relative;
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: clamp(30px, 6vw, 86px);
  align-items: center;
  min-height: 36vh;
  padding-top: clamp(42px, 5.8vw, 68px);
  padding-bottom: clamp(18px, 3.2vw, 38px);
}

.hero::before,
.hero::after {
  position: absolute;
  pointer-events: none;
  content: "";
}

.hero::before {
  top: 20%;
  right: clamp(18px, 5.4vw, 78px);
  width: min(34vw, 440px);
  height: 1px;
  background: var(--line);
}

.hero::after {
  right: clamp(18px, 5.4vw, 78px);
  bottom: clamp(46px, 7vw, 96px);
  width: min(42vw, 620px);
  height: 1px;
  background: var(--line);
}

.hero__copy {
  position: relative;
  z-index: 2;
  min-width: 0;
  max-width: 760px;
}

.eyebrow {
  margin: 0 0 18px;
  overflow-wrap: anywhere;
  color: var(--accent);
  font-size: 0.82rem;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
}

h1,
h2,
h3 {
  margin: 0;
  font-family: "Playfair Display", "Noto Serif SC", serif;
  letter-spacing: 0;
}

h1 {
  max-width: 6em;
  overflow-wrap: anywhere;
  color: var(--green);
  font-size: clamp(2.45rem, 4.8vw, 4.45rem);
  line-height: 1.02;
  text-wrap: balance;
}

.lead,
.analysis-card p {
  color: var(--muted);
  line-height: 1.82;
}

.lead {
  max-width: 620px;
  margin: 26px 0 0;
  overflow-wrap: anywhere;
  font-size: clamp(1rem, 1.35vw, 1.16rem);
}

.hero__badges {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 18px;
}

.hero__badges span {
  border: 1px solid var(--line);
  border-radius: 999px;
  padding: 7px 10px;
  color: var(--green);
  background: rgba(255, 253, 248, 0.7);
  font-size: 0.78rem;
  font-weight: 700;
  line-height: 1.2;
}

.features {
  padding-top: clamp(10px, 2vw, 24px);
  padding-bottom: clamp(58px, 9vw, 112px);
}

.features {
  background: var(--white);
}

.feature-cluster {
  display: grid;
  gap: 18px;
}

.feature-cluster + .feature-cluster {
  margin-top: 18px;
}

.feature-cluster--hero {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.feature-cluster--support {
  grid-template-columns: repeat(4, minmax(0, 1fr));
}

.analysis-card,
.qr-ticket {
  border: 1px solid var(--line);
  box-shadow: var(--shadow);
}

.analysis-card {
  width: 100%;
  border-radius: 8px;
  padding: clamp(16px, 2.2vw, 24px);
  background: var(--surface);
}

.analysis-card--featured {
  background: var(--white);
}

.analysis-card:nth-child(3n + 1) {
  background: var(--white);
}

.analysis-card:nth-child(3n + 2) {
  background: rgba(38, 61, 53, 0.05);
}

.analysis-card__index {
  display: inline-block;
  margin-bottom: 28px;
  border-bottom: 1px solid var(--line);
  color: var(--accent);
  font-size: 0.82rem;
  font-weight: 700;
}

.analysis-card h3 {
  font-size: clamp(1.28rem, 2vw, 1.76rem);
  line-height: 1.16;
}

.analysis-card--featured h3 {
  font-size: clamp(1.58rem, 2.8vw, 2.7rem);
}

.analysis-card p {
  margin: 12px 0 0;
}

.sample-stack {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 10px;
  margin-top: 20px;
}

.sample-stack__placeholder {
  padding: 28px 16px;
  font-size: 13px;
  color: var(--ink-soft, #8a7467);
  text-align: center;
  opacity: 0.7;
}

.sample-stack--triple {
  grid-template-columns: minmax(0, 1fr);
}

.sample-stack--split {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.sample-stack--style-set,
.sample-stack--photo-set {
  display: flex;
  grid-template-columns: none;
  gap: 12px;
  padding-bottom: 8px;
  overflow-x: auto;
  justify-content: safe center;
  scroll-snap-type: x proximity;
  scrollbar-color: var(--line) transparent;
}

.sample-stack--style-set {
  --sample-rail-size: clamp(150px, 12vw, 188px);
}

.sample-stack--photo-set {
  --sample-rail-size: clamp(150px, 12vw, 188px);
}

.sample-stack--style-set .sample-card,
.sample-stack--photo-set .sample-card {
  flex: 0 0 var(--sample-rail-size);
  scroll-snap-align: start;
}

.sample-card {
  min-width: 0;
}

.sample-card__image {
  display: block;
  width: 100%;
  aspect-ratio: 1024 / 1536;
  border: 1px solid rgba(38, 61, 53, 0.18);
  border-radius: 6px;
  background: var(--white);
  cursor: zoom-in;
  object-fit: cover;
  object-position: center top;
}

.sample-card__image:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 3px;
}

.sample-card span {
  display: block;
  margin-top: 8px;
  color: var(--green);
  font-size: 0.76rem;
  font-weight: 700;
  line-height: 1.35;
}

.image-lightbox {
  width: min(94vw, 940px);
  max-height: 94vh;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 14px;
  background: var(--white);
  box-shadow: 0 28px 80px rgba(38, 34, 29, 0.28);
}

.image-lightbox::backdrop {
  background: rgba(38, 34, 29, 0.62);
}

.image-lightbox__close {
  position: absolute;
  top: 10px;
  right: 10px;
  display: grid;
  width: 34px;
  height: 34px;
  place-items: center;
  border: 1px solid var(--line);
  border-radius: 50%;
  color: var(--green);
  background: rgba(255, 253, 248, 0.9);
  cursor: pointer;
  font: 700 1.25rem/1 "Courier Prime", "Noto Serif SC", monospace;
}

.image-lightbox figure {
  margin: 0;
}

.image-lightbox__image {
  display: block;
  width: 100%;
  max-height: 84vh;
  border-radius: 6px;
  object-fit: contain;
}

.image-lightbox figcaption {
  margin-top: 10px;
  color: var(--green);
  font-family: "Courier Prime", "Noto Serif SC", monospace;
  font-size: 0.82rem;
  font-weight: 700;
  text-align: center;
}

.qr-ticket {
  position: fixed;
  right: clamp(14px, 2.4vw, 34px);
  top: clamp(16px, 3vw, 28px);
  z-index: 30;
  width: clamp(136px, 12vw, 184px);
  border-radius: 8px;
  padding: 10px;
  background: var(--white);
}

.qr-ticket__image {
  display: block;
  width: 100%;
  max-width: 152px;
  margin: 0 auto;
  aspect-ratio: 1;
  border: 1px solid var(--line);
  background: #ffffff;
  object-fit: contain;
}

.qr-ticket__caption {
  display: grid;
  gap: 6px;
  padding-top: 12px;
  color: var(--green);
  text-align: center;
}

.qr-ticket__caption span {
  font-weight: 700;
}

.qr-ticket__caption small {
  color: rgba(40, 68, 58, 0.72);
  line-height: 1.5;
}

footer {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 18px;
  border-top: 1px solid var(--line);
  padding: 24px clamp(18px, 5.4vw, 78px);
  color: var(--green);
  background: var(--paper);
  font-size: 0.86rem;
  font-weight: 700;
}

footer a {
  text-decoration: none;
}

footer a:hover,
footer a:focus-visible {
  text-decoration: underline;
  text-underline-offset: 4px;
}

@media (max-width: 1120px) {
  .hero {
    grid-template-columns: 1fr;
  }

  .feature-cluster--hero,
  .feature-cluster--support {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

}

@media (max-width: 720px) {
  body {
    background-size: 32px 32px, 32px 32px, auto;
  }

  .hero,
  .features {
    padding-inline: 16px;
  }

  .hero {
    display: block;
    min-height: auto;
    padding-top: 36px;
    padding-bottom: 16px;
    overflow: hidden;
  }

  .hero::before,
  .hero::after {
    display: none;
  }

  h1 {
    font-size: clamp(2.05rem, 10vw, 3rem);
    line-height: 1.02;
  }

  .lead {
    max-width: 100%;
    margin-top: 20px;
    font-size: 0.98rem;
    word-break: break-all;
  }

  .eyebrow {
    max-width: 100%;
    font-size: 0.68rem;
    letter-spacing: 0.05em;
  }

  .features {
    padding-top: 12px;
    padding-bottom: 48px;
  }

  .feature-cluster--hero,
  .feature-cluster--support {
    grid-template-columns: 1fr;
  }

  .analysis-card {
    min-height: 0;
  }

  .analysis-card__index {
    margin-bottom: 18px;
  }

  .sample-stack--split {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .sample-stack--style-set {
    --sample-rail-size: min(58vw, 176px);
  }

  .sample-stack--photo-set {
    --sample-rail-size: min(58vw, 176px);
  }

  .image-lightbox {
    width: calc(100vw - 16px);
    padding: 10px;
  }

  .qr-ticket {
    position: fixed;
    top: auto;
    right: 10px;
    bottom: 14px;
    z-index: 18;
    width: 112px;
    max-width: none;
    margin: 0;
    transform: none;
  }

  .qr-ticket__caption {
    gap: 2px;
    padding-top: 8px;
    font-size: 0.68rem;
  }

  .qr-ticket__caption small {
    display: none;
  }

  footer {
    flex-direction: column;
    align-items: center;
    padding: 22px 16px 28px;
  }
}
