:root {
  --paper: #efe6d8;
  --paper-2: #f7f2e8;
  --ink: #172028;
  --ink-soft: #3d4a52;
  --line: #d9cebc;
  --sea: #12343a;
  --sea-2: #1b4a52;
  --copper: #b8612f;
  --copper-2: #e4b08a;
  --foam: #fbf7f1;
  --header: 76px;
  --fs: 1;
  color-scheme: light;
}

html[data-font="sm"] { --fs: 0.875; }
html[data-font="lg"] { --fs: 1.25; }

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
html:not([data-ready]) body > :not(noscript) { visibility: hidden; }

body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: "Segoe UI", "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", "Microsoft JhengHei", "Yu Gothic UI", "Meiryo", "Malgun Gothic", sans-serif;
  font-size: calc(17px * var(--fs));
  line-height: 1.6;
}

.noscript {
  margin: 24px;
  padding: 16px 18px;
  background: #fff;
}

a { color: inherit; }
button, input, select { font: inherit; color: inherit; }
:focus-visible { outline: 2px solid var(--copper); outline-offset: 3px; }

.wrap {
  width: min(1480px, calc(100% - clamp(28px, 5vw, 96px)));
  margin: 0 auto;
}

.site-header {
  position: sticky;
  top: 0;
  z-index: 10;
  min-height: var(--header);
  display: flex;
  align-items: center;
  background: rgba(239, 230, 216, 0.92);
  border-bottom: 1px solid var(--line);
  backdrop-filter: blur(10px);
}

.header-inner {
  width: min(1480px, calc(100% - clamp(28px, 5vw, 96px)));
  margin: 0 auto;
  display: flex;
  align-items: center;
  gap: 24px;
  padding: 14px 0;
  flex-wrap: wrap;
}

.brand {
  display: flex;
  align-items: center;
  gap: 12px;
  text-decoration: none;
  margin-right: auto;
}
.mark {
  width: 42px;
  height: 42px;
  display: grid;
  place-items: center;
  background: var(--sea);
  color: var(--copper-2);
  font-weight: 650;
  letter-spacing: 0;
}
.brand-name { display: flex; flex-direction: column; line-height: 1.2; }
.brand-name strong { font-size: calc(16px * var(--fs)); font-weight: 650; }
.brand-name span { font-size: calc(13px * var(--fs)); color: var(--ink-soft); letter-spacing: 0.02em; }

.nav { display: flex; gap: 8px 18px; flex-wrap: wrap; }
.nav a { text-decoration: none; font-size: calc(15px * var(--fs)); }
.nav a:hover { color: var(--copper); }

.langs { display: flex; gap: 6px; flex-wrap: wrap; }
.langs a {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border: 1px solid var(--line);
  background: transparent;
  min-width: 40px;
  min-height: 36px;
  padding: 4px 8px;
  text-decoration: none;
}
.langs a[aria-pressed="true"] {
  background: var(--sea);
  color: #f6f1e8;
  border-color: var(--sea);
}

.fonts { display: flex; gap: 6px; }
.fonts button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 40px;
  min-height: 36px;
  padding: 4px 8px;
  border: 1px solid var(--line);
  background: transparent;
  cursor: pointer;
  line-height: 1;
}
.fonts button[data-size="sm"] { font-size: 13px; }
.fonts button[data-size="md"] { font-size: 16px; }
.fonts button[data-size="lg"] { font-size: 19px; }
.fonts button[aria-pressed="true"] {
  background: var(--sea);
  color: #f6f1e8;
  border-color: var(--sea);
}

.hero-stage {
  position: relative;
  isolation: isolate;
  min-height: calc(100svh - var(--header));
  overflow: hidden;
  background: #1d78b4;
  color: #f7f2e8;
}

.hero-video {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  z-index: 0;
  pointer-events: none;
  transform: scale(1.55) translate(16%, 2%);
  filter: saturate(1.25) brightness(1.12);
}

.hero-veil {
  position: absolute;
  inset: 0;
  z-index: 1;
  pointer-events: none;
  background:
    linear-gradient(105deg, rgba(8, 42, 82, 0.58) 0%, rgba(12, 78, 140, 0.22) 46%, rgba(20, 120, 186, 0.04) 100%),
    linear-gradient(180deg, rgba(255, 255, 255, 0.06) 0%, rgba(8, 48, 90, 0.08) 100%);
}

.hero-stage .wrap { position: relative; z-index: 2; }

.hero {
  min-height: calc(100svh - var(--header));
  display: grid;
  grid-template-columns: minmax(0, 1.15fr) minmax(320px, 0.85fr);
  gap: clamp(28px, 4vw, 72px);
  align-items: end;
  padding: clamp(36px, 6vh, 80px) 0 clamp(36px, 6vh, 72px);
}

.hero-stage h1 { color: #f7f2e8; }
.hero-stage .lead { color: rgba(247, 242, 232, 0.86); }
.hero-stage .kicker { color: var(--copper-2); }
.hero-stage .btn {
  background: var(--copper);
  border-color: var(--copper);
  color: #fff;
}
.hero-stage .btn.ghost {
  background: transparent;
  color: #f6f1e8;
  border-color: rgba(246, 241, 232, 0.72);
}
.hero-stage .btn:hover,
.hero-stage .btn.ghost:hover {
  background: #f6f1e8;
  border-color: #f6f1e8;
  color: var(--sea);
}

.kicker {
  margin: 0 0 16px;
  color: var(--copper);
  font-size: calc(14px * var(--fs));
  letter-spacing: 0.14em;
  text-transform: uppercase;
}
h1 {
  margin: 0;
  max-width: 12em;
  font-size: calc(clamp(40px, 5.4vw, 84px) * var(--fs));
  line-height: 1.08;
  font-weight: 650;
  letter-spacing: -0.03em;
}
.lead {
  max-width: 38rem;
  margin: 22px 0 0;
  font-size: calc(18px * var(--fs));
  color: var(--ink-soft);
}
.hero-actions { display: flex; gap: 12px; flex-wrap: wrap; margin-top: 28px; }

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 48px;
  padding: 0 18px;
  text-decoration: none;
  border: 1px solid var(--ink);
  background: var(--ink);
  color: #f6f1e8;
  cursor: pointer;
}
.btn.ghost { background: transparent; color: var(--ink); }
.btn:hover { background: var(--copper); border-color: var(--copper); color: #fff; }

.sheet {
  background: rgba(18, 52, 58, 0.78);
  color: #f4efe6;
  border: 1px solid rgba(228, 176, 138, 0.28);
  backdrop-filter: blur(10px);
  padding: clamp(22px, 3vw, 36px);
  display: flex;
  flex-direction: column;
  gap: 18px;
  min-height: 420px;
}
.sheet-kicker {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  font-size: calc(13px * var(--fs));
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--copper-2);
}
.sheet dl { margin: 0; display: grid; gap: 0; }
.sheet dl div {
  display: grid;
  grid-template-columns: minmax(4.5em, 8em) minmax(0, 1fr);
  gap: 12px;
  padding: 12px 0;
  border-top: 1px solid rgba(244, 239, 230, 0.16);
}
.sheet dt { color: rgba(244, 239, 230, 0.62); }
.sheet dd { margin: 0; font-size: calc(18px * var(--fs)); }
.sheet-note { margin: 0; color: rgba(244, 239, 230, 0.78); }

.section { padding: clamp(64px, 9vh, 112px) 0; }
.section h2 {
  margin: 0 0 12px;
  font-size: calc(clamp(32px, 4vw, 56px) * var(--fs));
  line-height: 1.1;
  letter-spacing: -0.03em;
  font-weight: 650;
}
.section-lead { max-width: 42rem; margin: 0 0 32px; color: var(--ink-soft); }

.cards {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
}
.card {
  background: var(--foam);
  border-top: 3px solid var(--copper);
  padding: 22px 22px 26px;
  min-height: 180px;
}
.card .code { margin: 0; color: var(--copper); font-size: calc(13px * var(--fs)); letter-spacing: 0.12em; }
.card h3 { margin: 8px 0; font-size: calc(24px * var(--fs)); line-height: 1.3; font-weight: 650; }
.card p { margin: 0; color: var(--ink-soft); }

.support-title { margin: 36px 0 14px; font-size: calc(20px * var(--fs)); }
.support {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 12px;
}
.support article {
  padding: 16px;
  background: transparent;
  border: 1px solid var(--line);
}
.support h3 { margin: 0 0 8px; font-size: calc(18px * var(--fs)); }
.support p { margin: 0; color: var(--ink-soft); font-size: calc(15px * var(--fs)); }

.band {
  background: var(--sea);
  color: #f4efe6;
}
.band .section-lead,
.band p { color: rgba(244, 239, 230, 0.8); }
.lane-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 28px;
}
.lane-grid h3 { margin: 0 0 8px; font-size: calc(28px * var(--fs)); }
.chips { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 16px; }
.chip {
  border: 1px solid rgba(244, 239, 230, 0.28);
  padding: 6px 12px;
  font-size: calc(15px * var(--fs));
}

.order-grid {
  display: grid;
  grid-template-columns: 0.9fr 1.1fr;
  gap: 28px;
  align-items: start;
}
.checklist { margin: 0; padding: 0; list-style: none; display: grid; gap: 8px; }
.checklist li {
  padding: 12px 14px;
  background: var(--foam);
  border-left: 3px solid var(--sea);
}
.template {
  background: var(--foam);
  padding: 20px;
  border: 1px solid var(--line);
}
.template h3 { margin: 0 0 12px; font-size: calc(20px * var(--fs)); }
.template pre {
  margin: 0 0 16px;
  white-space: pre-wrap;
  font-family: inherit;
  font-size: calc(15px * var(--fs));
  line-height: 1.7;
}
.about-grid {
  display: grid;
  grid-template-columns: 1.3fr 0.7fr;
  gap: 32px;
}
.about-grid p { margin: 0 0 14px; }
.facts { display: grid; gap: 12px; align-content: start; }
.facts div { padding-bottom: 12px; border-bottom: 1px solid var(--line); }
.facts span { display: block; color: var(--ink-soft); font-size: calc(14px * var(--fs)); }
.facts strong { font-weight: 650; }

.site-footer {
  background: var(--ink);
  color: #f4efe6;
  padding: 36px 0 42px;
}
.footer-inner { display: grid; gap: 8px; }
.footer-inner p { margin: 0; }
.muted { color: rgba(244, 239, 230, 0.72); }

@media (max-width: 980px) {
  .hero, .cards, .lane-grid, .order-grid, .about-grid { grid-template-columns: 1fr; }
  .support { grid-template-columns: 1fr 1fr; }
  .hero { align-items: start; }
  h1 { max-width: none; }
  .hero-veil {
    background:
      linear-gradient(180deg, rgba(8, 42, 82, 0.62) 0%, rgba(10, 70, 128, 0.32) 62%, rgba(14, 96, 160, 0.16) 100%);
  }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .hero-video { display: none; }
}

@media (max-width: 640px) {
  .support { grid-template-columns: 1fr; }
  .header-inner { gap: 12px; }
  body { font-size: calc(16px * var(--fs)); }
}

@media (min-width: 1600px) {
  .hero { align-items: center; }
}
