/* ESCRIME fencing site. Theme: cold steel neutrals + single blue accent, radius 0 everywhere. */

:root {
  --bg: #F4F5F6;
  --surface: #FBFBFC;
  --ink: #16181D;
  --ink-2: #4E545E;
  --line: #DDE0E5;
  --accent: #1D4ED8;
  --on-accent: #FFFFFF;
  --shadow: 0 14px 34px rgba(22, 24, 29, 0.10);
}
@media (prefers-color-scheme: dark) {
  :root {
    --bg: #121417;
    --surface: #1A1D21;
    --ink: #E9EBEE;
    --ink-2: #9AA1AB;
    --line: #2A2E35;
    --accent: #5B7CFA;
    --on-accent: #0D0F12;
    --shadow: 0 14px 34px rgba(0, 0, 0, 0.45);
  }
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }

body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: "Helvetica Neue", Arial, "Hiragino Kaku Gothic ProN",
    "Yu Gothic UI", "Noto Sans JP", "Meiryo", sans-serif;
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
}

img { display: block; max-width: 100%; height: auto; }
a { color: inherit; }
button { font: inherit; cursor: pointer; }

.wrap {
  max-width: 1240px;
  margin: 0 auto;
  padding-left: clamp(16px, 4vw, 40px);
  padding-right: clamp(16px, 4vw, 40px);
}

/* ---------- nav ---------- */
.nav {
  position: sticky; top: 0; z-index: 20;
  background: var(--bg);
  border-bottom: 1px solid var(--line);
}
.nav-inner {
  max-width: 1240px; margin: 0 auto;
  height: 64px;
  padding: 0 clamp(16px, 4vw, 40px);
  display: flex; align-items: center; gap: 28px;
}
.brand {
  font-size: 20px; font-weight: 800; letter-spacing: 0.14em;
  text-decoration: none; text-transform: uppercase;
}
.nav-links { display: flex; gap: 22px; margin-left: auto; }
.nav-links a {
  text-decoration: none; font-size: 14px; letter-spacing: 0.04em;
  color: var(--ink-2); padding: 6px 2px; border-bottom: 2px solid transparent;
}
.nav-links a:hover { color: var(--ink); border-bottom-color: var(--accent); }
.nav-tools { display: flex; align-items: center; gap: 12px; }
.cur-select, .converter select, .converter input {
  background: var(--surface); color: var(--ink);
  border: 1px solid var(--line); border-radius: 0;
  padding: 7px 8px; font-size: 13px;
}
.cur-select:focus-visible, select:focus-visible, input:focus-visible, button:focus-visible, a:focus-visible {
  outline: 2px solid var(--accent); outline-offset: 2px;
}
.lang-toggle { display: flex; border: 1px solid var(--line); }
.lang-btn {
  background: transparent; color: var(--ink-2); border: 0;
  padding: 7px 10px; font-size: 12px; font-weight: 700; letter-spacing: 0.08em;
}
.lang-btn.is-active { background: var(--ink); color: var(--bg); }

/* ---------- hero ---------- */
.hero { border-bottom: 1px solid var(--line); }
.hero-grid {
  display: grid; grid-template-columns: minmax(0, 7fr) minmax(0, 5fr);
  gap: clamp(24px, 5vw, 64px); align-items: center;
  padding-top: clamp(40px, 7vw, 88px);
  padding-bottom: clamp(40px, 7vw, 88px);
}
.hero-title {
  margin: 0 0 18px;
  font-size: clamp(34px, 5.2vw, 62px);
  line-height: 1.15; font-weight: 800; letter-spacing: -0.01em;
}
.hero-sub { margin: 0 0 30px; color: var(--ink-2); font-size: clamp(15px, 1.4vw, 18px); max-width: 42ch; }
.hero-media img { width: 100%; aspect-ratio: 1536 / 952; object-fit: cover; }

/* ---------- buttons ---------- */
.btn {
  display: inline-block; text-decoration: none;
  padding: 13px 26px; font-size: 14px; font-weight: 700; letter-spacing: 0.05em;
  border: 1px solid transparent; border-radius: 0;
  transition: transform 0.15s ease, box-shadow 0.15s ease;
}
.btn:active { transform: translateY(1px) scale(0.99); }
.btn-accent { background: var(--accent); color: var(--on-accent); }
.btn-accent:hover { box-shadow: var(--shadow); }
.btn-ghost { background: transparent; color: var(--ink); border-color: var(--line); }
.btn-ghost:hover { border-color: var(--ink); }

/* ---------- sections ---------- */
.section { padding: clamp(56px, 9vw, 110px) 0; }
.section-tint { background: var(--surface); border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); }
.sec-title { margin: 0 0 26px; font-size: clamp(22px, 3vw, 34px); font-weight: 800; letter-spacing: 0.01em; }

/* ---------- products ---------- */
.filters {
  display: flex; margin: -6px 0 34px;
  border: 1px solid var(--line); background: var(--surface);
  overflow-x: auto; -webkit-overflow-scrolling: touch;
}
.chip {
  flex: 1 1 0;
  background: transparent; color: var(--ink-2);
  border: 0; border-right: 1px solid var(--line);
  padding: 15px 10px; text-align: center;
  font-size: 16px; font-weight: 700; letter-spacing: 0.06em; white-space: nowrap;
  position: relative;
  transition: color 0.15s ease, background 0.15s ease;
}
.chip:last-child { border-right: 0; }
.chip:hover { color: var(--ink); }
.chip.is-active { background: var(--accent); color: var(--on-accent); }
.chip-n { font-weight: 400; font-size: 13px; opacity: 0.7; margin-left: 8px; }

.grid {
  display: grid; grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: clamp(14px, 2vw, 24px);
}
.pcard {
  background: var(--surface); border: 1px solid var(--line);
  padding: 0; text-align: left; width: 100%;
  display: flex; flex-direction: column; gap: 0;
  transition: transform 0.18s ease, box-shadow 0.18s ease;
  color: var(--ink);
}
.pcard:hover { transform: translateY(-3px); box-shadow: var(--shadow); }
.pcard figure { margin: 0; overflow: hidden; }
.pcard img { width: 100%; aspect-ratio: 4 / 3; object-fit: cover; }
.pcard-body { padding: 16px 18px 18px; display: flex; flex-direction: column; gap: 6px; flex: 1; }
.pcard-cat { font-size: 11px; font-weight: 800; letter-spacing: 0.14em; text-transform: uppercase; color: var(--accent); margin: 0; }
.pcard-name { margin: 0; font-size: 16px; font-weight: 700; line-height: 1.4; }
.pcard-price { margin: auto 0 0; font-size: 15px; font-weight: 700; color: var(--accent); }
.empty { color: var(--ink-2); }

/* ---------- currency converter ---------- */
.cur-grid { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: clamp(24px, 5vw, 64px); align-items: start; }
.cur-sub { color: var(--ink-2); margin: 0 0 14px; max-width: 46ch; }
.cur-note { font-size: 13px; color: var(--ink-2); margin: 0; border-left: 2px solid var(--accent); padding-left: 12px; }
.converter { border: 1px solid var(--line); background: var(--bg); padding: clamp(18px, 3vw, 28px); }
.conv-row { display: grid; grid-template-columns: 1.4fr 1fr 1fr; gap: 12px; }
.conv-label { display: flex; flex-direction: column; gap: 6px; font-size: 12px; font-weight: 700; letter-spacing: 0.08em; text-transform: uppercase; color: var(--ink-2); }
.conv-out { margin-top: 22px; padding-top: 18px; border-top: 1px solid var(--line); display: flex; flex-direction: column; gap: 6px; }
.conv-result { font-size: clamp(26px, 3.4vw, 40px); font-weight: 800; line-height: 1.2; }
.conv-rate { font-size: 13px; color: var(--ink-2); }

/* ---------- about ---------- */
.about-grid { display: grid; grid-template-columns: minmax(0, 5fr) minmax(0, 7fr); gap: clamp(24px, 5vw, 64px); align-items: center; }
.about-media img { width: 100%; aspect-ratio: 1536 / 952; object-fit: cover; }
.about-body { color: var(--ink-2); margin: 0 0 20px; max-width: 56ch; }
.about-points { margin: 0; padding: 0; list-style: none; display: grid; gap: 10px; }
.about-points li { border-top: 1px solid var(--line); padding-top: 10px; font-size: 15px; }
.about-points li:last-child { border-bottom: 1px solid var(--line); padding-bottom: 10px; }

/* ---------- footer ---------- */
.footer { border-top: 1px solid var(--line); background: var(--surface); }
.footer-grid {
  display: grid; grid-template-columns: 1fr auto auto; gap: 24px; align-items: end;
  padding-top: 40px; padding-bottom: 40px;
}
.footer-brand { margin: 0; font-weight: 800; letter-spacing: 0.14em; text-transform: uppercase; }
.footer-tag { margin: 4px 0 0; color: var(--ink-2); font-size: 13px; }
.footer-social { display: flex; gap: 18px; }
.footer-social a { text-decoration: none; font-size: 14px; font-weight: 700; border-bottom: 1px solid var(--line); padding-bottom: 2px; }
.footer-social a:hover { border-bottom-color: var(--accent); color: var(--accent); }
.footer-copy { margin: 0; font-size: 12px; color: var(--ink-2); }

/* ---------- modal ---------- */
.modal { position: fixed; inset: 0; z-index: 40; }
.modal-backdrop { position: absolute; inset: 0; background: rgba(12, 14, 17, 0.55); }
.modal-box {
  position: relative; z-index: 1;
  width: min(920px, calc(100vw - 32px));
  max-height: calc(100vh - 48px); max-height: calc(100dvh - 48px);
  margin: max(24px, 5dvh) auto; overflow: auto;
  background: var(--bg); border: 1px solid var(--line);
}
.modal-x {
  position: absolute; top: 10px; right: 10px; z-index: 2;
  background: var(--bg); border: 1px solid var(--line);
  font-size: 20px; line-height: 1; width: 36px; height: 36px;
}
.modal-grid { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); }
.modal-media img { width: 100%; height: 100%; object-fit: cover; min-height: 320px; }
.modal-info { padding: clamp(20px, 3vw, 36px); }
.modal-cat { margin: 0 0 8px; font-size: 11px; font-weight: 700; letter-spacing: 0.12em; text-transform: uppercase; color: var(--ink-2); }
.modal-info h3 { margin: 0 0 14px; font-size: clamp(20px, 2.4vw, 28px); line-height: 1.35; }
.modal-price { margin: 0; font-size: 22px; font-weight: 800; color: var(--accent); }
.modal-ref { margin: 4px 0 16px; font-size: 13px; color: var(--ink-2); }
.modal-desc { margin: 0 0 24px; color: var(--ink-2); font-size: 15px; }
.modal-ctas { display: flex; flex-wrap: wrap; gap: 12px; }

/* ---------- reveal motion ---------- */
.rv { opacity: 0; transform: translateY(18px); transition: opacity 0.6s cubic-bezier(0.16, 1, 0.3, 1), transform 0.6s cubic-bezier(0.16, 1, 0.3, 1); }
.rv.in { opacity: 1; transform: none; }
@media (prefers-reduced-motion: reduce) {
  .rv { opacity: 1; transform: none; transition: none; }
  .pcard, .btn { transition: none; }
}

/* ---------- responsive ---------- */
@media (max-width: 1023px) {
  .grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .hero-grid { grid-template-columns: 1fr; }
  .hero-media { order: -1; }
  .cur-grid, .about-grid { grid-template-columns: 1fr; }
  .about-grid .about-media { order: -1; }
  .modal-grid { grid-template-columns: 1fr; }
  .modal-media img { min-height: 0; aspect-ratio: 4 / 3; }
}
@media (max-width: 640px) {
  .grid { grid-template-columns: 1fr; }
  .nav-links { display: none; }
  .nav-tools { margin-left: auto; }
  .footer-grid { grid-template-columns: 1fr; align-items: start; }
  .conv-row { grid-template-columns: 1fr; }
  .hero-title br { display: none; }
  .chip { flex: 0 0 auto; padding: 13px 24px; }
}
