/* Центр «Нихон Будокай» — стили сайта */

@font-face { font-family: "PT Sans"; font-weight: 400; font-style: normal; font-display: swap; src: url(../fonts/ptsans-400-cyr.woff2) format("woff2"); unicode-range: U+0301, U+0400-045F, U+0490-0491, U+04B0-04B1, U+2116; }
@font-face { font-family: "PT Sans"; font-weight: 400; font-style: normal; font-display: swap; src: url(../fonts/ptsans-400-lat.woff2) format("woff2"); unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD; }
@font-face { font-family: "PT Sans"; font-weight: 400; font-style: italic; font-display: swap; src: url(../fonts/ptsans-400i-cyr.woff2) format("woff2"); unicode-range: U+0301, U+0400-045F, U+0490-0491, U+04B0-04B1, U+2116; }
@font-face { font-family: "PT Sans"; font-weight: 400; font-style: italic; font-display: swap; src: url(../fonts/ptsans-400i-lat.woff2) format("woff2"); unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD; }
@font-face { font-family: "PT Sans"; font-weight: 700; font-style: normal; font-display: swap; src: url(../fonts/ptsans-700-cyr.woff2) format("woff2"); unicode-range: U+0301, U+0400-045F, U+0490-0491, U+04B0-04B1, U+2116; }
@font-face { font-family: "PT Sans"; font-weight: 700; font-style: normal; font-display: swap; src: url(../fonts/ptsans-700-lat.woff2) format("woff2"); unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD; }
@font-face { font-family: "PT Serif"; font-weight: 400; font-display: swap; src: url(../fonts/ptserif-400-cyr.woff2) format("woff2"); unicode-range: U+0301, U+0400-045F, U+0490-0491, U+04B0-04B1, U+2116; }
@font-face { font-family: "PT Serif"; font-weight: 400; font-display: swap; src: url(../fonts/ptserif-400-lat.woff2) format("woff2"); unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD; }
@font-face { font-family: "PT Serif"; font-weight: 700; font-display: swap; src: url(../fonts/ptserif-700-cyr.woff2) format("woff2"); unicode-range: U+0301, U+0400-045F, U+0490-0491, U+04B0-04B1, U+2116; }
@font-face { font-family: "PT Serif"; font-weight: 700; font-display: swap; src: url(../fonts/ptserif-700-lat.woff2) format("woff2"); unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD; }

:root {
  /* Фиолетовое индиго — цвет эмблемы организации (п. 1.7 Устава);
     золото — акцент из знака World MJER Iaido Federation. */
  --indigo: #3a2766;
  --indigo-deep: #241845;
  --indigo-tint: #ece8f4;
  --accent: #a8791c;
  --paper: #f9f8fb;
  --white: #ffffff;
  --text: #1f1a2e;
  --muted: #5a5470;
  --line: #dcd7e6;
  --focus: #e0a100;

  --serif: "PT Serif", Georgia, "Times New Roman", serif;
  --sans: "PT Sans", "Segoe UI", Arial, sans-serif;

  --fs-base: 1.0625rem;
  --lh: 1.6;
  --ls: normal;
  --wrap: 72rem;
  --gutter: clamp(1rem, 4vw, 2rem);
  color-scheme: light;
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  font: 400 var(--fs-base)/var(--lh) var(--sans);
  letter-spacing: var(--ls);
  color: var(--text);
  background: var(--paper);
}
img { max-width: 100%; height: auto; display: block; }
a { color: var(--indigo); text-underline-offset: .18em; }
a:hover { color: var(--accent); }
:focus-visible { outline: 3px solid var(--focus); outline-offset: 2px; }
h1, h2, h3 { font-family: var(--serif); font-weight: 700; line-height: 1.2; color: var(--indigo-deep); }
h1 { font-size: clamp(1.75rem, 3.2vw, 2.5rem); margin: .2em 0 .6em; }
h2 { font-size: clamp(1.35rem, 2.2vw, 1.75rem); margin: 2em 0 .6em; }
h3 { font-size: 1.2rem; margin: 1.6em 0 .4em; }
p, ul, ol { margin: 0 0 1em; }

.wrap { max-width: var(--wrap); margin-inline: auto; padding-inline: var(--gutter); }
.skip { position: absolute; left: -999px; top: 0; background: var(--white); padding: .5em 1em; z-index: 10; }
.skip:focus { left: 1rem; }

/* Шапка */
.site-head { background: var(--white); border-bottom: 1px solid var(--line); }
.head-row { display: flex; align-items: center; justify-content: space-between; gap: 1rem; padding-block: .75rem; flex-wrap: wrap; }
.brand { display: flex; align-items: center; gap: .8rem; text-decoration: none; color: var(--text); }
.brand img { width: 56px; height: 56px; object-fit: cover; border-radius: 4px; }
.brand strong { display: block; font-family: var(--serif); font-size: 1.35rem; color: var(--indigo-deep); line-height: 1.1; }
.brand small { display: block; color: var(--muted); font-size: .9rem; }
.head-tools { display: flex; align-items: center; gap: 1rem; flex-wrap: wrap; }
.head-phone { font-weight: 700; text-decoration: none; color: var(--text); }
.a11y-toggle {
  display: inline-flex; align-items: center; gap: .45rem;
  font: inherit; font-size: .95rem; cursor: pointer;
  background: var(--white); color: var(--indigo); border: 2px solid var(--indigo); border-radius: 4px; padding: .35rem .7rem;
}
.a11y-toggle:hover { background: var(--indigo); color: var(--white); }
.main-nav { background: var(--indigo); }
.main-nav ul { list-style: none; display: flex; flex-wrap: wrap; gap: 0 .25rem; margin: 0 auto; }
.main-nav a { display: block; padding: .7rem .9rem; color: var(--white); text-decoration: none; }
.main-nav a:hover { background: var(--indigo-deep); color: var(--white); }
.main-nav a.is-active { box-shadow: inset 0 -4px 0 var(--accent); }
.main-nav li:first-child a { margin-left: -.9rem; }

/* Главная: первый экран */
.hero { background: var(--white); border-bottom: 1px solid var(--line); }
.hero-grid { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 22rem); gap: clamp(1.5rem, 4vw, 3.5rem); align-items: start; padding-block: clamp(1.5rem, 4vw, 3rem); }
.hero h1 { font-size: clamp(1.45rem, 2.4vw, 2.1rem); line-height: 1.2; margin: 0 0 .6em; max-width: 34em; }
.h1-pre { display: block; font-size: clamp(.95rem, 1.2vw, 1.05rem); font-weight: 400; line-height: 1.4; color: var(--muted); letter-spacing: 0; margin-bottom: .35em; }
.hero-emblem { width: 100%; border-radius: 6px; margin-top: .4rem; }
.hero .lead { font-size: 1.125rem; color: var(--muted); max-width: 38em; margin-bottom: 1.2em; }
.hero-facts { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: .75rem 2rem; margin: 0 0 1.6rem; padding: 0; max-width: 46rem; }
.hero-facts div { border-left: 3px solid var(--indigo); padding-left: .8rem; }
.hero-facts dt { color: var(--muted); font-size: .9rem; }
.hero-facts dd { margin: 0; font-weight: 700; }
.actions { display: flex; flex-wrap: wrap; gap: .75rem; }
.btn { display: inline-block; padding: .7rem 1.2rem; border-radius: 4px; text-decoration: none; font-weight: 700; border: 2px solid var(--indigo); }
.btn-primary { background: var(--indigo); color: var(--white); }
.btn-primary:hover { background: var(--indigo-deep); border-color: var(--indigo-deep); color: var(--white); }
.btn-ghost { color: var(--indigo); background: transparent; }
.btn-ghost:hover { background: var(--indigo-tint); color: var(--indigo-deep); }

.section { padding-block: clamp(2.5rem, 6vw, 4.5rem); }
.section > .wrap > h2:first-child { margin-top: 0; }
.section-alt { background: var(--white); border-block: 1px solid var(--line); }
.prose { max-width: 42rem; }
.two-col { display: grid; grid-template-columns: 1.2fr 1fr; gap: clamp(1.5rem, 4vw, 3rem); align-items: start; }
.two-col figure { margin: 0; }
figcaption { color: var(--muted); font-size: .9rem; margin-top: .4rem; }

/* Направления: чередующиеся ряды фото + текст */
.disciplines { list-style: none; margin: 0; padding: 0; }
.discipline { display: grid; grid-template-columns: 17rem 1fr; gap: 1.5rem 2.5rem; padding-block: 1.8rem; border-top: 1px solid var(--line); }
.discipline:last-child { border-bottom: 1px solid var(--line); }
.discipline img { width: 100%; aspect-ratio: 4 / 3; object-fit: cover; border-radius: 4px; }
.discipline h3 { margin-top: 0; font-size: 1.4rem; }
.discipline p { max-width: 40rem; }
.discipline .aff { color: var(--muted); font-size: .95rem; }

.partners { display: flex; flex-wrap: wrap; gap: 1.5rem 2.5rem; align-items: center; list-style: none; padding: 0; margin: 1.5rem 0 0; }
.partners li { display: flex; align-items: center; gap: .8rem; max-width: 20rem; }
.partners img { width: 72px; height: 72px; object-fit: contain; flex: none; }
.partners span { font-size: .95rem; }

.info-strip { background: var(--indigo); color: var(--white); }
.info-strip .wrap { display: grid; grid-template-columns: 1fr auto; gap: 1.5rem; align-items: center; padding-block: 2rem; }
.info-strip h2 { color: var(--white); margin: 0 0 .3em; }
.info-strip p { margin: 0; max-width: 44rem; color: #e6e0f2; }
.info-strip .btn { background: var(--white); color: var(--indigo-deep); border-color: var(--white); }
.info-strip .btn:hover { background: var(--indigo-tint); }

/* Внутренние страницы */
.page, .sveden { padding-block: 1.5rem 4rem; }
.crumbs ol { list-style: none; display: flex; flex-wrap: wrap; gap: .3rem; padding: 0; margin: 0 0 1rem; font-size: .92rem; color: var(--muted); }
.crumbs li + li::before { content: "/"; margin-right: .3rem; color: var(--line); }
.sveden-grid { display: grid; grid-template-columns: 19rem minmax(0, 1fr); gap: 2.5rem; align-items: start; }
.sveden-nav { position: sticky; top: 1rem; background: var(--white); border: 1px solid var(--line); border-radius: 4px; }
.sveden-nav summary { padding: .7rem 1rem; font-weight: 700; cursor: pointer; }
.sveden-nav ol { margin: 0; padding: 0 0 .5rem; list-style: none; counter-reset: s; }
.sveden-nav a { display: block; padding: .45rem 1rem; text-decoration: none; font-size: .95rem; line-height: 1.35; border-left: 3px solid transparent; }
.sveden-nav a[aria-current="page"] { border-left-color: var(--accent); background: var(--indigo-tint); color: var(--indigo-deep); font-weight: 700; }
.doc { background: var(--white); border: 1px solid var(--line); border-radius: 4px; padding: clamp(1.25rem, 3vw, 2.25rem); min-width: 0; }
.doc h1 { margin-top: 0; }
.doc > h2:first-of-type { margin-top: 1.2em; }
.updated { margin-top: 2.5rem; color: var(--muted); font-size: .9rem; }

/* Таблицы сведений */
.table-scroll { overflow-x: auto; margin: 0 0 1.5rem; }
table { border-collapse: collapse; width: 100%; font-size: .97rem; }
th, td { text-align: left; vertical-align: top; padding: .6rem .75rem; border: 1px solid var(--line); }
th { background: var(--indigo-tint); color: var(--indigo-deep); font-weight: 700; }
table.kv th { width: 36%; }
.doclist { list-style: none; padding: 0; }
.doclist li { padding: .7rem 0; border-bottom: 1px solid var(--line); }
.doclist .meta { display: block; color: var(--muted); font-size: .9rem; }

/* Незаполненные сведения: видно владельцу сайта, понятно посетителю */
.todo { background: #fff5d6; border-left: 4px solid var(--focus); padding: .6rem .9rem; margin: 0 0 1rem; border-radius: 0 4px 4px 0; }
td .todo, li .todo { margin: 0; }
span.todo { display: block; margin-top: .4rem; }
.note { color: var(--muted); font-size: .95rem; }

.sveden-cards { list-style: none; padding: 0; margin: 0; display: grid; grid-template-columns: repeat(auto-fill, minmax(17rem, 1fr)); gap: .75rem; counter-reset: s; }
.sveden-cards a { display: block; height: 100%; padding: .9rem 1rem; background: var(--paper); border: 1px solid var(--line); border-radius: 4px; text-decoration: none; }
.sveden-cards a:hover { border-color: var(--indigo); }

/* Подвал */
.site-foot { background: var(--indigo-deep); color: #dcd5ea; font-size: .95rem; padding-block: 2.5rem; }
.site-foot a { color: var(--white); }
.foot-grid { display: grid; grid-template-columns: 1.5fr 1fr 1fr; gap: 2rem; }
.foot-name { color: var(--white); font-family: var(--serif); }

/* Панель версии для слабовидящих */
.a11y-panel { background: #fff; border-bottom: 2px solid #000; color: #000; }
.a11y-row { display: flex; flex-wrap: wrap; gap: 1rem 1.5rem; align-items: end; padding-block: .8rem; }
.a11y-panel fieldset { border: 0; padding: 0; margin: 0; display: flex; gap: .4rem; flex-wrap: wrap; }
.a11y-panel legend { font-weight: 700; margin-bottom: .3rem; }
.a11y-panel button { font: inherit; font-size: 1rem; padding: .35rem .7rem; border: 2px solid #000; background: #fff; color: #000; cursor: pointer; border-radius: 3px; }
.a11y-panel button[aria-pressed="true"] { background: #000; color: #fff; }
.a11y-panel .sw-wb { background: #000; color: #fff; }
.a11y-panel .sw-blue { background: #9dd1ff; color: #063462; }
.a11y-panel .sw[aria-pressed="true"] { outline: 3px solid var(--focus); }

html.a11y { --serif: Arial, "PT Sans", sans-serif; --sans: Arial, "PT Sans", sans-serif; }
html.a11y[data-fs="1"] { --fs-base: 1.25rem; }
html.a11y[data-fs="2"] { --fs-base: 1.5rem; }
html.a11y[data-fs="3"] { --fs-base: 1.875rem; }
html.a11y[data-ls="2"] { --ls: .08em; --lh: 1.9; }
html.a11y h1 { font-size: 2em; } html.a11y h2 { font-size: 1.6em; } html.a11y h3 { font-size: 1.3em; }
html.a11y[data-img="off"] img { display: none; }
html.a11y[data-scheme="bw"] { --indigo: #000; --indigo-deep: #000; --indigo-tint: #fff; --accent: #000; --paper: #fff; --white: #fff; --text: #000; --muted: #000; --line: #000; }
html.a11y[data-scheme="wb"] { --indigo: #fff; --indigo-deep: #fff; --indigo-tint: #000; --accent: #fff; --paper: #000; --white: #000; --text: #fff; --muted: #fff; --line: #fff; color-scheme: dark; }
html.a11y[data-scheme="blue"] { --indigo: #063462; --indigo-deep: #063462; --indigo-tint: #9dd1ff; --accent: #063462; --paper: #9dd1ff; --white: #9dd1ff; --text: #063462; --muted: #063462; --line: #063462; }
html.a11y .main-nav, html.a11y .info-strip, html.a11y .site-foot { background: var(--paper); color: var(--text); border-block: 2px solid var(--line); }
html.a11y .main-nav a, html.a11y .info-strip h2, html.a11y .info-strip p, html.a11y .site-foot a, html.a11y .foot-name { color: var(--text); }
html.a11y .info-strip .btn { background: var(--paper); color: var(--text); border-color: var(--line); }
html.a11y .todo { background: var(--paper); border-color: var(--line); }
html.a11y .grid-collapse, html.a11y .two-col, html.a11y .discipline, html.a11y .sveden-grid, html.a11y .foot-grid, html.a11y .hero-grid { grid-template-columns: 1fr; }
html.a11y .sveden-nav { position: static; }

@media (max-width: 900px) {
  .sveden-grid { grid-template-columns: 1fr; gap: 1.25rem; }
  .sveden-nav { position: static; }
  .two-col, .foot-grid, .hero-grid { grid-template-columns: minmax(0, 1fr); }
  .hero-emblem { display: none; }
  .hero-facts { grid-template-columns: repeat(auto-fit, minmax(12rem, 1fr)); }
  .info-strip .wrap { grid-template-columns: 1fr; }
}
@media (max-width: 640px) {
  .hero-grid { grid-template-columns: minmax(0, 1fr); }
  .hero-facts { grid-template-columns: 1fr; }
  .discipline { grid-template-columns: 1fr; }
  .main-nav li:first-child a { margin-left: 0; }
  .main-nav ul { padding-inline: calc(var(--gutter) - .6rem); }
  .main-nav a { padding: .55rem .6rem; }
  .brand small { font-size: .82rem; }
}
@media (prefers-reduced-motion: reduce) { * { scroll-behavior: auto !important; transition: none !important; } }
@media print {
  .site-head, .site-foot, .sveden-nav, .a11y-panel, .crumbs { display: none; }
  .doc { border: 0; padding: 0; }
}
