/* ===== Reset & Variables ===== */
:root {
  --paper: #F5F0E6;
  --night: #0C1B33;
  --ink: #1A1C24;
  --red: #FF3D2E;
  --yellow: #FFC53D;
  --paper-light: #FFF9F0;
  --gray: #667085;
  --char: #2E3440;
  --gradient: linear-gradient(135deg, #FF3D2E 0%, #FFC53D 100%);
  --gold: #B9904B;
  --container: 1180px;
  --space: 8px;
  --font-heading: "Arial Black", "Roboto Condensed", "Noto Sans SC", sans-serif;
  --font-body: "Noto Sans SC", "Source Han Sans SC", "PingFang SC", sans-serif;
  --font-data: "Roboto Mono", "SFMono-Regular", Consolas, monospace;
}

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

html {
  scroll-behavior: smooth;
  scroll-padding-top: 0;
}

body {
  font-family: var(--font-body);
  font-size: 16px;
  line-height: 1.75;
  color: var(--ink);
  background: var(--paper);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

img {
  max-width: 100%;
  display: block;
}

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

ul, ol {
  list-style: none;
}

button {
  font-family: inherit;
  font-size: inherit;
  cursor: pointer;
  border: none;
  background: none;
  color: inherit;
}

h1, h2, h3, h4 {
  font-family: var(--font-heading);
  font-style: italic;
  font-weight: 900;
  line-height: 1.15;
  text-wrap: balance;
}

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

::selection {
  background: var(--red);
  color: #fff;
}

/* ===== Container ===== */
.container {
  width: 100%;
  max-width: var(--container);
  margin: 0 auto;
  padding-left: 24px;
  padding-right: 24px;
}

/* ===== Skip Link ===== */
.skip-link {
  position: fixed;
  top: 12px;
  left: 12px;
  z-index: 9999;
  background: var(--gradient);
  color: #fff;
  font-weight: 700;
  padding: 10px 18px;
  border-radius: 4px;
  transform: translateY(-250%);
  transition: transform 160ms ease;
}

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

/* ===== Header ===== */
.site-header {
  position: relative;
  z-index: 50;
  background: var(--night);
  color: var(--paper-light);
}

.yb-header {
  background: var(--night);
  border-bottom: 1px solid rgba(255, 255, 255, 0.1);
  font-size: 13px;
  letter-spacing: 0.08em;
}

.yb-header__inner {
  display: flex;
  align-items: center;
  gap: 12px;
  min-height: 34px;
  padding-top: 6px;
  padding-bottom: 6px;
}

.yb-header__brand {
  color: var(--yellow);
  font-weight: 700;
  letter-spacing: 0.04em;
  white-space: nowrap;
}

.yb-header__divider {
  width: 1px;
  height: 14px;
  background: rgba(255, 255, 255, 0.3);
  flex: none;
}

.yb-header__product {
  color: var(--paper-light);
  font-family: var(--font-data);
  font-size: 12px;
  letter-spacing: 0.12em;
}

.yb-header__slogan {
  display: none;
  margin-left: auto;
  color: rgba(255, 255, 255, 0.6);
  letter-spacing: 0.1em;
  font-size: 12px;
}

.yn-header {
  background: var(--night);
  position: relative;
}

.yn-header::before {
  content: "";
  position: absolute;
  inset: 0;
  background: var(--gradient);
  opacity: 0.6;
  z-index: 0;
  clip-path: polygon(0 0, 4% 0, 0 100%);
}

.yn-header::after {
  content: "";
  position: absolute;
  top: 0;
  bottom: 0;
  left: 0;
  width: 4px;
  background: var(--gradient);
  z-index: 0;
}

.yn-header__inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  flex-wrap: wrap;
  min-height: 76px;
  padding-top: 8px;
  padding-bottom: 8px;
  position: relative;
  z-index: 1;
}

.yn-header__logo {
  display: inline-flex;
  align-items: baseline;
  gap: 4px;
  color: #fff;
  flex: none;
}

.yn-header__logo-mark {
  font-family: var(--font-heading);
  font-style: italic;
  font-weight: 900;
  font-size: 28px;
  line-height: 1;
  color: var(--yellow);
}

.yn-header__logo-sub {
  font-family: var(--font-heading);
  font-style: italic;
  font-weight: 900;
  font-size: 22px;
  line-height: 1;
  color: var(--red);
}

.yn-header__nav {
  order: 3;
  width: 100%;
  display: none;
  background: var(--night);
  border-top: 1px solid rgba(255, 255, 255, 0.12);
  padding: 10px 0 16px;
}

.nav-toggle {
  display: inline-flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  gap: 5px;
  width: 44px;
  height: 44px;
  border: 1px solid rgba(255, 255, 255, 0.25);
  border-radius: 6px;
  background: transparent;
  color: #fff;
  position: relative;
  z-index: 2;
}

.nav-toggle__line {
  display: block;
  width: 22px;
  height: 2px;
  background: #fff;
  transition: transform 180ms ease, opacity 180ms ease;
}

[data-open] .nav-toggle__line:nth-child(1) {
  transform: translateY(7px) rotate(45deg);
}

[data-open] .nav-toggle__line:nth-child(2) {
  opacity: 0;
}

[data-open] .nav-toggle__line:nth-child(3) {
  transform: translateY(-7px) rotate(-45deg);
}

.nav-primary {
  display: flex;
  flex-direction: column;
}

.nav-primary a {
  display: block;
  padding: 14px 0;
  color: var(--paper-light);
  font-weight: 600;
  font-size: 16px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.09);
  position: relative;
}

.nav-primary a:hover {
  color: var(--yellow);
}

.nav-primary a[aria-current="page"] {
  color: var(--yellow);
}

.nav-primary a[aria-current="page"]::before {
  content: "";
  position: absolute;
  left: -8px;
  top: 8px;
  bottom: 8px;
  width: 3px;
  background: var(--red);
}

.yn-header__actions {
  display: flex;
  align-items: center;
  gap: 12px;
}

/* ===== Buttons ===== */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  font-family: var(--font-heading);
  font-style: italic;
  font-weight: 900;
  font-size: 15px;
  line-height: 1;
  padding: 14px 24px;
  background: var(--paper-light);
  color: var(--ink);
  border: 2px solid var(--ink);
  border-radius: 4px;
  transition: transform 0.2s ease, box-shadow 0.2s ease, background 0.2s ease, color 0.2s ease;
}

.btn:hover {
  transform: translateY(-4px);
  box-shadow: 4px 4px 0 var(--ink);
}

.btn-primary {
  background: var(--gradient);
  color: #fff;
  border-color: transparent;
  box-shadow: 0 2px 0 rgba(0, 0, 0, 0.08);
}

.btn-primary:hover {
  transform: translateY(-4px);
  box-shadow: 4px 4px 0 rgba(0, 0, 0, 0.35);
}

.btn-small {
  font-size: 13px;
  padding: 10px 18px;
}

/* ===== Footer ===== */
.site-footer {
  background: var(--night);
  color: var(--paper-light);
  position: relative;
  margin-top: 80px;
}

.site-footer .red-line {
  height: 4px;
  background: var(--gradient);
}

.site-footer__inner {
  display: grid;
  grid-template-columns: 1fr;
  gap: 32px;
  padding-top: 48px;
  padding-bottom: 24px;
}

.footer-brand {
  max-width: 360px;
}

.footer-brand__logo {
  font-family: var(--font-heading);
  font-style: italic;
  font-weight: 900;
  font-size: 28px;
  color: var(--yellow);
  letter-spacing: 0.02em;
}

.footer-brand__product {
  font-family: var(--font-data);
  color: var(--red);
  letter-spacing: 0.18em;
  font-size: 14px;
  margin-top: 6px;
}

.footer-brand__slogan {
  margin-top: 12px;
  font-size: 15px;
  color: rgba(255, 255, 255, 0.85);
  letter-spacing: 0.06em;
  border-left: 3px solid var(--red);
  padding-left: 12px;
}

.footer-brand__trust {
  margin-top: 14px;
  font-size: 13px;
  line-height: 1.6;
  color: rgba(255, 255, 255, 0.55);
}

.footer-nav {
  display: grid;
  grid-template-columns: 1fr;
  gap: 24px;
}

.footer-nav__title {
  font-family: var(--font-heading);
  font-style: italic;
  font-weight: 900;
  font-size: 16px;
  color: var(--yellow);
  margin-bottom: 12px;
  letter-spacing: 0.08em;
}

.footer-nav__group ul {
  display: grid;
  gap: 6px;
}

.footer-nav__group a {
  color: rgba(255, 255, 255, 0.78);
  font-size: 15px;
  transition: color 0.2s ease, padding-left 0.2s ease;
}

.footer-nav__group a:hover {
  color: var(--yellow);
  padding-left: 4px;
}

.footer-contact__list {
  display: grid;
  gap: 8px;
  font-size: 14px;
}

.footer-contact__list li {
  display: flex;
  flex-wrap: wrap;
  gap: 6px 10px;
}

.footer-contact__list span {
  color: rgba(255, 255, 255, 0.5);
  font-family: var(--font-data);
  font-size: 12px;
  letter-spacing: 0.08em;
  min-width: 48px;
  text-transform: uppercase;
}

.footer-contact__list a {
  color: var(--paper-light);
}

.footer-contact__list a:hover {
  color: var(--yellow);
}

.footer-bottom {
  border-top: 1px solid rgba(255, 255, 255, 0.12);
  padding-top: 16px;
  padding-bottom: 24px;
  display: flex;
  flex-wrap: wrap;
  gap: 8px 20px;
  justify-content: space-between;
  font-size: 13px;
  color: rgba(255, 255, 255, 0.5);
  letter-spacing: 0.04em;
}

/* ===== Common Typography ===== */
.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-family: var(--font-data);
  color: var(--red);
  font-size: 13px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  font-weight: 700;
}

.eyebrow::before {
  content: "";
  width: 18px;
  height: 2px;
  background: var(--red);
  flex: none;
}

.section-head {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  align-items: end;
  gap: 16px;
  margin: 56px 0 24px;
}

.section-head h2 {
  font-size: clamp(30px, 4vw, 42px);
  letter-spacing: -0.02em;
}

.section-head p {
  max-width: 440px;
  color: var(--gray);
  font-size: 15px;
}

/* ===== Panels & Cards ===== */
.panel-dark {
  background: var(--night);
  color: var(--paper-light);
  padding: 40px 32px;
  border-radius: 2px;
  position: relative;
  overflow: hidden;
}

.panel-dark::before {
  content: "";
  position: absolute;
  top: 0;
  right: 0;
  width: 120px;
  height: 120px;
  background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='40' height='40' viewBox='0 0 40 40'%3E%3Cpath d='M0 0h40L0 40z' fill='%23FF3D2E' opacity='0.35'/%3E%3C/svg%3E");
  background-size: 20px 20px;
}

.panel-title {
  font-size: 24px;
  color: var(--yellow);
  margin-bottom: 16px;
  position: relative;
  z-index: 1;
}

.data-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 20px;
  position: relative;
  z-index: 1;
}

.data-number {
  font-family: var(--font-data);
  font-weight: 700;
  font-size: clamp(28px, 4vw, 42px);
  font-feature-settings: "tnum" 1;
  color: #fff;
  line-height: 1.1;
}

.data-number strong {
  color: var(--yellow);
}

.data-label {
  color: rgba(255, 255, 255, 0.6);
  font-size: 13px;
  letter-spacing: 0.08em;
  margin-top: 4px;
}

/* ===== Theme Band ===== */
.theme-band {
  background: var(--paper-light);
  border: 1px solid var(--gold);
  border-radius: 2px;
  padding: 28px 24px;
  position: relative;
  box-shadow: 6px 6px 0 rgba(0, 0, 0, 0.04);
}

.theme-band::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 4px;
  background: var(--gradient);
}

.theme-band h3 {
  font-size: 20px;
  margin-bottom: 8px;
}

.theme-band p {
  color: var(--gray);
  font-size: 14px;
  line-height: 1.6;
}

/* ===== Tag / Stamp ===== */
.stamp-tag {
  display: inline-block;
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.06em;
  padding: 4px 10px;
  border: 1px solid var(--gold);
  color: var(--ink);
  background: var(--paper-light);
  border-radius: 2px;
  white-space: nowrap;
}

.stamp-tag--red {
  background: var(--red);
  border-color: var(--red);
  color: #fff;
}

.stamp-tag--yellow {
  background: var(--yellow);
  border-color: var(--yellow);
  color: var(--ink);
}

/* ===== Tables ===== */
.table-wrap {
  overflow-x: auto;
  background: var(--paper-light);
  border: 1px solid var(--gold);
  border-radius: 2px;
}

.table-wrap table {
  width: 100%;
  border-collapse: collapse;
  min-width: 560px;
}

.table-wrap th,
.table-wrap td {
  padding: 12px 16px;
  text-align: left;
  font-size: 15px;
  border-bottom: 1px solid rgba(0, 0, 0, 0.07);
}

.table-wrap th {
  font-family: var(--font-heading);
  font-style: italic;
  font-weight: 900;
  font-size: 14px;
  color: var(--night);
  background: rgba(255, 197, 61, 0.18);
  letter-spacing: 0.04em;
}

.table-wrap tr:hover td {
  background: rgba(255, 61, 46, 0.06);
}

/* ===== FAQ ===== */
.faq-item {
  background: var(--paper-light);
  border: 1px solid var(--gold);
  border-left: 4px solid var(--red);
  border-radius: 2px;
  margin-bottom: 12px;
}

.faq-item[data-open] {
  box-shadow: 4px 4px 0 rgba(0, 0, 0, 0.06);
}

.faq-item button {
  width: 100%;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 16px;
  text-align: left;
  padding: 16px 18px;
  font-weight: 600;
  font-size: 15px;
}

.faq-item button::after {
  content: "+";
  font-family: var(--font-data);
  font-size: 22px;
  color: var(--red);
  flex: none;
}

.faq-item[data-open] button::after {
  content: "–";
}

.faq-panel {
  max-height: 0;
  overflow: hidden;
  transition: max-height 0.22s ease;
}

.faq-panel__inner {
  padding: 0 18px 18px;
  color: var(--gray);
  font-size: 14px;
  line-height: 1.8;
}

/* ===== Filter Bar ===== */
.filter-bar {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 20px;
}

.filter-bar button {
  font-family: var(--font-data);
  font-size: 13px;
  letter-spacing: 0.06em;
  padding: 8px 14px;
  border: 1px solid var(--gold);
  border-radius: 2px;
  background: var(--paper-light);
  color: var(--ink);
  transition: background 0.2s ease, color 0.2s ease, border-color 0.2s ease;
}

.filter-bar button[data-active] {
  background: var(--night);
  color: var(--yellow);
  border-color: var(--night);
}

.filter-bar button:hover:not([data-active]) {
  border-color: var(--red);
  color: var(--red);
}

/* ===== Grid ===== */
.grid-2,
.grid-3,
.grid-4 {
  display: grid;
  gap: 20px;
}

/* ===== Image frame ===== */
.img-frame {
  position: relative;
  overflow: hidden;
  border-radius: 2px;
  background: var(--night);
}

.img-frame--4-3 {
  aspect-ratio: 4 / 3;
}

.img-frame--16-9 {
  aspect-ratio: 16 / 9;
}

.img-frame--skew {
  transform: skewX(-3deg);
}

.img-frame--skew > * {
  transform: skewX(3deg);
}

.img-frame img,
.img-frame__placeholder {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.img-frame__placeholder {
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--yellow);
  font-family: var(--font-data);
  font-size: 13px;
  letter-spacing: 0.1em;
  background: linear-gradient(135deg, var(--night), #1e3554);
  text-transform: uppercase;
}

/* ===== Back to top ===== */
.back-to-top {
  position: fixed;
  right: 24px;
  bottom: 24px;
  z-index: 80;
  width: 44px;
  height: 44px;
  border-radius: 4px;
  background: var(--gradient);
  color: #fff;
  font-size: 20px;
  font-family: var(--font-data);
  box-shadow: 0 4px 14px rgba(0, 0, 0, 0.25);
  opacity: 0;
  pointer-events: none;
  transform: translateY(10px);
  transition: opacity 0.2s ease, transform 0.2s ease;
}

.back-to-top[data-visible] {
  opacity: 1;
  pointer-events: auto;
  transform: translateY(0);
}

/* ===== Progress bar ===== */
.progress-bar {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  height: 3px;
  z-index: 100;
  background: var(--night);
  transform: scaleX(0);
  transform-origin: 0 50%;
  pointer-events: none;
}

/* ===== Dark panel extra ===== */
.dark-zone {
  background: var(--night);
  color: var(--paper-light);
}

/* ===== Responsive ===== */
@media (min-width: 768px) {
  .container {
    padding-left: 32px;
    padding-right: 32px;
  }

  .yb-header__slogan {
    display: block;
  }

  .grid-2 {
    grid-template-columns: repeat(2, 1fr);
  }

  .grid-3 {
    grid-template-columns: repeat(3, 1fr);
  }

  .footer-nav {
    grid-template-columns: repeat(2, 1fr);
  }

  .site-footer__inner {
    grid-template-columns: 1fr 1fr;
    gap: 40px;
  }
}

@media (min-width: 1024px) {
  .nav-toggle {
    display: none;
  }

  .yn-header__inner {
    flex-wrap: nowrap;
    min-height: 80px;
  }

  .yn-header__nav {
    display: block !important;
    order: unset;
    width: auto;
    border: none;
    padding: 0;
  }

  .nav-primary {
    flex-direction: row;
    align-items: center;
    gap: 28px;
  }

  .nav-primary a {
    padding: 10px 0;
    border-bottom: none;
    font-size: 15px;
    letter-spacing: 0.02em;
  }

  .nav-primary a::before {
    content: "";
    position: absolute;
    left: 0;
    right: 0;
    bottom: 0;
    top: auto;
    width: auto;
    height: 3px;
    background: var(--red);
    transform: scaleX(0);
    transform-origin: 0 50%;
    transition: transform 0.2s ease;
  }

  .nav-primary a:hover::before {
    transform: scaleX(1);
  }

  .nav-primary a[aria-current="page"]::before {
    transform: scaleX(1);
  }

  .grid-4 {
    grid-template-columns: repeat(4, 1fr);
  }

  .site-footer__inner {
    grid-template-columns: 1.2fr 1fr 1fr;
  }
}

@media (min-width: 1200px) {
  .grid-3 {
    grid-template-columns: repeat(3, 1fr);
  }
}

/* ===== Reduced Motion ===== */
@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }

  *,
  *::before,
  *::after {
    animation: none !important;
    transition: none !important;
  }

  .skip-link {
    transition: none;
  }

  .back-to-top {
    transform: none;
  }
}
