:root {
  --pearl: #f7f2ea;
  --paper: #fffdf9;
  --brown: #2c241d;
  --muted: #74685d;
  --gold: #c7a66a;
  --line: rgba(44, 36, 29, 0.16);
  --serif: Georgia, "Times New Roman", serif;
  --sans: Inter, ui-sans-serif, system-ui, -apple-system, "Segoe UI", sans-serif;
}

* {
  box-sizing: border-box;
}

html {
  min-width: 320px;
  color-scheme: light;
  background: var(--pearl);
}

body {
  min-height: 100vh;
  margin: 0;
  overflow-x: hidden;
  color: var(--brown);
  background: var(--pearl);
  font-family: var(--sans);
  -webkit-font-smoothing: antialiased;
}

button,
select {
  font: inherit;
}

.skip-link {
  position: fixed;
  top: 8px;
  left: 8px;
  z-index: 10;
  padding: 10px 14px;
  color: var(--paper);
  background: var(--brown);
  transform: translateY(-160%);
}

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

.site-header {
  width: min(1080px, calc(100% - 32px));
  margin: 0 auto;
  padding: clamp(22px, 4vw, 40px) 0 18px;
  border-bottom: 1px solid var(--line);
}

.wordmark {
  display: block;
  width: max-content;
  margin: 0 auto clamp(18px, 3vw, 28px);
  color: var(--brown);
  font-family: var(--serif);
  font-size: clamp(1.35rem, 4vw, 1.8rem);
  letter-spacing: 0.22em;
  line-height: 1;
  text-decoration: none;
}

.guide-controls {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr)) minmax(84px, 1.45fr);
  gap: 5px;
  width: min(100%, 600px);
  margin: 0 auto;
}

.product-tab,
.language-select {
  min-width: 0;
  min-height: 44px;
  border: 1px solid var(--line);
  border-radius: 0;
  color: var(--brown);
  background: transparent;
  font-size: clamp(0.7rem, 2.8vw, 0.8rem);
  letter-spacing: 0.1em;
}

.product-tab {
  padding: 0 6px;
  cursor: pointer;
}

.product-tab:hover {
  border-color: var(--gold);
}

.product-tab.is-active {
  border-color: var(--brown);
  color: var(--paper);
  background: var(--brown);
}

.language-select {
  width: 100%;
  padding: 0 22px 0 8px;
  text-overflow: ellipsis;
  cursor: pointer;
}

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

.guide-main {
  width: min(1080px, calc(100% - 32px));
  min-height: calc(100vh - 250px);
  margin: 0 auto;
  padding: clamp(40px, 8vw, 78px) 0 clamp(44px, 7vw, 72px);
  animation: reveal 420ms ease-out both;
}

.intro {
  margin: 0 auto clamp(28px, 5vw, 44px);
  text-align: center;
}

.ornament {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 88px;
  height: 9px;
  margin: 0 auto 18px;
}

.ornament::before,
.ornament::after {
  width: 34px;
  height: 1px;
  content: "";
  background: var(--gold);
}

.ornament span {
  width: 5px;
  height: 5px;
  margin: 0 7px;
  border: 1px solid var(--gold);
  transform: rotate(45deg);
}

h1 {
  margin: 0;
  font-family: var(--serif);
  font-size: clamp(2rem, 6.5vw, 4.25rem);
  font-weight: 400;
  letter-spacing: 0.06em;
  line-height: 1.08;
}

.intro p {
  margin: 14px 0 0;
  color: var(--muted);
  font-size: clamp(0.92rem, 2.7vw, 1.08rem);
  letter-spacing: 0.045em;
  line-height: 1.5;
}

.video-shell {
  width: min(100%, 960px);
  aspect-ratio: 16 / 9;
  margin: 0 auto;
  padding: 7px;
  border: 1px solid var(--line);
  background: var(--paper);
  box-shadow: 0 18px 45px rgba(44, 36, 29, 0.09);
}

video {
  display: block;
  width: 100%;
  height: 100%;
  background: #17120f;
  object-fit: contain;
}

.video-error {
  margin: 14px auto 0;
  color: #8a2d24;
  font-size: 0.9rem;
  text-align: center;
}

.site-footer {
  width: min(1080px, calc(100% - 32px));
  margin: 0 auto;
  padding: 20px 0 28px;
  border-top: 1px solid var(--line);
  color: var(--muted);
  font-family: var(--serif);
  font-size: 0.76rem;
  letter-spacing: 0.14em;
  text-align: center;
}

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

@keyframes reveal {
  from {
    opacity: 0;
    transform: translateY(7px);
  }

  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@media (max-width: 420px) {
  .site-header,
  .guide-main,
  .site-footer {
    width: calc(100% - 24px);
  }

  .guide-controls {
    gap: 3px;
  }

  .product-tab,
  .language-select {
    letter-spacing: 0.04em;
  }

  .video-shell {
    padding: 4px;
  }
}

@media (prefers-reduced-motion: reduce) {
  .guide-main {
    animation: none;
  }

  *,
  *::before,
  *::after {
    scroll-behavior: auto !important;
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
  }
}
