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

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: var(--font-body);
  font-size: 16px;
  line-height: 1.7;
  -webkit-font-smoothing: antialiased;
}

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

h1, h2, h3, h4, h5, h6 {
  font-family: var(--font-heading);
  margin: 0 0 0.5em;
  line-height: 1.1;
  letter-spacing: -0.02em;
  text-transform: uppercase;
}

p {
  margin: 0 0 1em;
}

a {
  color: inherit;
}

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

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation: none !important;
    transition: none !important;
  }
  html {
    scroll-behavior: auto;
  }
}

:root {
  --bg: #0B0716;
  --surface: #14102A;
  --jade: #0C3B3F;
  --wine: #4A1220;
  --indigo: #241A4F;
  --green: #B6FF3C;
  --orange: #FF6B2C;
  --text: #F5F2FF;
  --muted: #A99FC7;
  --border: rgba(182, 255, 60, 0.25);
  --font-heading: "Noto Sans SC", sans-serif;
  --font-body: "Noto Sans SC", "HarmonyOS Sans SC", "PingFang SC", "Microsoft YaHei", sans-serif;
}

.skip-link {
  position: absolute;
  left: -999px;
  top: 0;
  background: var(--green);
  color: #0A0A0A;
  padding: 0.75rem 1.5rem;
  font-weight: 900;
  z-index: 1200;
  text-decoration: none;
}

.skip-link:focus {
  left: 0;
}

.progress-bar {
  position: fixed;
  top: 0;
  left: 0;
  height: 3px;
  width: 0;
  background: linear-gradient(90deg, var(--green), var(--orange));
  z-index: 1100;
}

.frame-rail {
  position: fixed;
  left: 0;
  top: 0;
  bottom: 0;
  width: 2.2rem;
  background: var(--surface);
  border-right: 1px solid var(--border);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 100;
}

.frame-rail span {
  writing-mode: vertical-rl;
  transform: rotate(180deg);
  text-transform: uppercase;
  letter-spacing: 0.28em;
  font-size: 0.62rem;
  color: var(--muted);
}

.page-header {
  position: relative;
  background: var(--bg);
  border-bottom: 1px solid var(--border);
  z-index: 100;
}

.frame-nav {
  max-width: 1480px;
  margin: 0 auto;
  padding: 0.9rem 1.5rem 0.9rem 3.2rem;
  display: flex;
  align-items: center;
  gap: 1rem;
}

.brand {
  display: inline-flex;
  flex-direction: column;
  line-height: 1.1;
  text-decoration: none;
  color: var(--text);
  flex-shrink: 0;
}

.brand strong {
  font-size: 1.7rem;
  font-weight: 900;
  letter-spacing: -0.02em;
}

.brand span {
  font-size: 0.65rem;
  color: var(--muted);
  text-transform: uppercase;
  letter-spacing: 0.14em;
}

.site-nav {
  margin-right: auto;
}

.site-nav ul {
  display: flex;
  gap: 1.6rem;
  list-style: none;
  margin: 0;
  padding: 0;
}

.site-nav a {
  font-size: 0.82rem;
  font-weight: 700;
  color: var(--muted);
  text-decoration: none;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  padding: 0.25rem 0;
  position: relative;
  display: inline-block;
}

.site-nav a::after {
  content: "";
  position: absolute;
  left: 0;
  bottom: 0;
  height: 2px;
  width: 0;
  background: var(--green);
  transition: width 0.2s ease;
}

.site-nav a:hover::after,
.site-nav a:focus-visible::after {
  width: 100%;
}

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

.site-nav a[aria-current="page"]::after {
  width: 100%;
}

.frame-tools {
  display: flex;
  gap: 0.5rem;
  align-items: center;
  flex-shrink: 0;
}

.tool-icon {
  width: 2.4rem;
  height: 2.4rem;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: var(--muted);
  border: 1px solid var(--border);
  border-radius: 0.15rem;
  text-decoration: none;
  transition: background 0.2s, color 0.2s, border-color 0.2s;
}

.tool-icon:hover,
.tool-icon:focus-visible {
  background: var(--green);
  color: #0A0A0A;
  border-color: var(--green);
}

.tool-icon svg {
  width: 1.2rem;
  height: 1.2rem;
  fill: none;
  stroke: currentColor;
  stroke-width: 2;
}

.nav-toggle {
  display: none;
  background: none;
  border: 1px solid var(--border);
  border-radius: 0.15rem;
  width: 2.6rem;
  height: 2.6rem;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 4px;
  cursor: pointer;
  flex-shrink: 0;
}

.nav-toggle span {
  display: block;
  width: 1.1rem;
  height: 2px;
  background: var(--green);
  transition: transform 0.2s, opacity 0.2s;
}

.nav-toggle[aria-expanded="true"] span:nth-child(1) {
  transform: translateY(6px) rotate(45deg);
}

.nav-toggle[aria-expanded="true"] span:nth-child(2) {
  opacity: 0;
}

.nav-toggle[aria-expanded="true"] span:nth-child(3) {
  transform: translateY(-6px) rotate(-45deg);
}

.page-footer {
  background: var(--bg);
  border-top: 1px solid var(--border);
  padding: 3rem 1.5rem 1.5rem;
  margin-top: 4rem;
  position: relative;
}

.footer-grid {
  max-width: 1480px;
  margin: 0 auto;
  display: grid;
  grid-template-columns: 1.6fr 1fr 0.8fr 1.2fr;
  gap: 2rem;
}

.footer-brand,
.footer-nav,
.footer-legal,
.footer-contact {
  min-width: 0;
}

.page-footer h2 {
  font-size: 0.72rem;
  font-weight: 900;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--green);
  margin: 0 0 0.8rem;
}

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

.page-footer li {
  margin-bottom: 0.4rem;
  font-size: 0.85rem;
  color: var(--muted);
}

.page-footer a {
  color: var(--muted);
  text-decoration: none;
}

.page-footer a:hover,
.page-footer a:focus-visible {
  color: var(--green);
}

.footer-brand p {
  font-size: 0.82rem;
  color: var(--muted);
  margin-top: 1rem;
  max-width: 30rem;
}

.footer-contact li {
  padding-left: 1rem;
  position: relative;
}

.footer-contact li::before {
  content: "/";
  position: absolute;
  left: 0;
  color: var(--orange);
}

.footer-bottom {
  max-width: 1480px;
  margin: 2rem auto 0;
  padding-top: 1.2rem;
  border-top: 1px solid rgba(245, 242, 255, 0.1);
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem 2rem;
  font-size: 0.75rem;
  color: var(--muted);
}

.back-top {
  position: fixed;
  right: 1.2rem;
  bottom: 1.2rem;
  width: 3rem;
  height: 3rem;
  padding: 0;
  background: var(--green);
  color: #0A0A0A;
  border: none;
  font-weight: 900;
  font-size: 1.4rem;
  cursor: pointer;
  clip-path: polygon(100% 0, 100% calc(100% - 0.45rem), calc(100% - 0.45rem) 100%, 0 100%, 0 0);
  z-index: 1000;
  line-height: 1;
}

.back-top:hover,
.back-top:focus-visible {
  background: var(--orange);
}

.container {
  max-width: 1480px;
  margin: 0 auto;
  padding-left: 1.5rem;
  padding-right: 1.5rem;
}

.container-narrow {
  max-width: 880px;
  margin: 0 auto;
  padding-left: 1.5rem;
  padding-right: 1.5rem;
}

.breadcrumb {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem;
  list-style: none;
  margin: 0 0 2rem;
  padding: 0;
  font-size: 0.85rem;
  color: var(--muted);
}

.breadcrumb li + li::before {
  content: "/";
  margin-right: 0.4rem;
  color: var(--muted);
}

.breadcrumb a {
  color: var(--muted);
  text-decoration: none;
}

.breadcrumb a:hover,
.breadcrumb a:focus-visible {
  color: var(--green);
}

.breadcrumb [aria-current="page"] {
  color: var(--text);
}

.btn {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.8rem 1.6rem;
  font-family: var(--font-heading);
  font-weight: 900;
  font-size: 0.85rem;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  border: none;
  cursor: pointer;
  text-decoration: none;
  border-radius: 0.15rem;
  transition: background 0.2s, color 0.2s, transform 0.2s;
}

.btn-primary {
  background: var(--green);
  color: #0A0A0A;
  clip-path: polygon(100% 0, 100% calc(100% - 0.6rem), calc(100% - 0.6rem) 100%, 0 100%, 0 0);
}

.btn-primary:hover,
.btn-primary:focus-visible {
  background: var(--orange);
  color: #0A0A0A;
  transform: translateY(-2px);
}

.btn-outline {
  background: transparent;
  color: var(--text);
  border: 1px solid var(--border);
}

.btn-outline:hover,
.btn-outline:focus-visible {
  border-color: var(--green);
  color: var(--green);
}

.tag {
  display: inline-block;
  padding: 0.2rem 0.6rem;
  background: rgba(182, 255, 60, 0.15);
  color: var(--green);
  font-size: 0.7rem;
  font-weight: 900;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  border-left: 2px solid var(--green);
}

.tag-orange {
  background: rgba(255, 107, 44, 0.15);
  color: var(--orange);
  border-left-color: var(--orange);
}

.eyebrow {
  display: block;
  font-size: 0.75rem;
  font-weight: 700;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--green);
  margin-bottom: 0.5rem;
}

.section-title {
  font-size: clamp(2rem, 4vw, 3.2rem);
  font-weight: 900;
  text-transform: uppercase;
  letter-spacing: -0.02em;
  margin: 0 0 1rem;
  line-height: 1;
}

.display-title {
  font-size: clamp(3rem, 8vw, 7.5rem);
  font-weight: 900;
  text-transform: uppercase;
  letter-spacing: -0.03em;
  line-height: 0.92;
  margin: 0;
  font-style: italic;
}

.media-frame {
  position: relative;
  background: var(--surface);
  border: 1px solid var(--border);
  aspect-ratio: 16 / 9;
  overflow: hidden;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--muted);
}

.media-frame::after {
  content: "MG·IMAGE";
  font-size: 0.7rem;
  letter-spacing: 0.2em;
  text-transform: uppercase;
}

.card {
  background: var(--surface);
  border: 1px solid var(--border);
  padding: 1.5rem;
  border-radius: 0.15rem;
}

.card h2,
.card h3,
.card h4 {
  margin-top: 0;
}

.grid {
  display: grid;
  grid-template-columns: repeat(12, 1fr);
  gap: 1.5rem;
}

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

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

.section-jade {
  background: var(--jade);
}

.section-wine {
  background: var(--wine);
}

.section-indigo {
  background: var(--indigo);
}

@media (max-width: 1024px) {
  .footer-grid {
    grid-template-columns: 1fr 1fr;
  }
  .grid-3 {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (max-width: 900px) {
  .frame-rail {
    display: none;
  }
  .frame-nav {
    padding-left: 1rem;
    padding-right: 1rem;
    flex-wrap: wrap;
    position: relative;
  }
  .brand {
    order: 0;
  }
  .frame-tools {
    order: 1;
    margin-left: auto;
  }
  .nav-toggle {
    order: 2;
    display: flex;
  }
  .site-nav {
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    background: var(--surface);
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.3s ease;
    z-index: 200;
    border-bottom: 0;
    margin-right: 0;
  }
  .site-nav[data-open] {
    max-height: 80vh;
    overflow: auto;
    border-bottom: 1px solid var(--border);
    box-shadow: 0 1rem 2rem rgba(0, 0, 0, 0.4);
  }
  .site-nav ul {
    flex-direction: column;
    gap: 0;
    padding: 0.5rem;
  }
  .site-nav a {
    display: block;
    padding: 0.8rem 1rem;
    border-left: 3px solid transparent;
  }
  .site-nav a[aria-current="page"] {
    border-left-color: var(--green);
  }
}

@media (max-width: 600px) {
  .footer-grid {
    grid-template-columns: 1fr;
  }
  .grid-3,
  .grid-2 {
    grid-template-columns: 1fr;
  }
  .footer-bottom {
    flex-direction: column;
    gap: 0.25rem;
  }
}
