*{box-sizing:border-box;}
html{scroll-behavior:smooth;}
body{
  margin:0;
  background:var(--paper);
  color:var(--ink);
  font-family:var(--font-body);
  line-height:1.6;
  -webkit-font-smoothing:antialiased;
}
h1,h2,h3,.wordmark{font-family:var(--font-display);}
a{color:inherit;}
img,svg{display:block; max-width:100%;}
.wrap{max-width:var(--maxw); margin:0 auto; padding:0 28px;}
.eyebrow{
  font-family:var(--font-body); font-weight:700; letter-spacing:.14em;
  text-transform:uppercase; font-size:.72rem; color:var(--brass-deep);
}
::selection{background:var(--brass-tint); color:var(--ink);}
:focus-visible{outline:2px solid var(--brass-deep); outline-offset:3px; border-radius:2px;}

/* ---------- dot / hoshi motif ---------- */
.dot{
  display:inline-block; width:6px; height:6px; border-radius:50%;
  background:var(--brass); margin-right:10px; flex:0 0 auto; transform:translateY(-1px);
}
li.dotted{list-style:none; display:flex; align-items:flex-start; gap:2px; margin-bottom:10px;}

/* ---------- nav ---------- */
header{
  position:sticky; top:0; z-index:50;
  background:rgba(250,245,234,.9); backdrop-filter:blur(10px);
  border-bottom:1px solid var(--line);
}
.navbar{display:flex; align-items:center; justify-content:space-between; padding:16px 28px; gap:18px;}
.brand{display:flex; align-items:center; gap:10px; text-decoration:none; flex:0 0 auto;}
.brand-logo{width:32px; height:32px; object-fit:contain; display:block;}
.brand .wordmark{font-size:1.05rem; font-weight:700; letter-spacing:.04em; color:var(--ink);}
.navbar-nav{flex:1 1 auto; min-width:0;}
.links{display:flex; gap:28px; list-style:none; margin:0; padding:0; flex-wrap:wrap;}
.links a{
  text-decoration:none; font-size:.88rem; font-weight:600; color:var(--ink-soft);
  padding:6px 2px; border-bottom:1px solid transparent; transition:color .2s, border-color .2s;
  white-space:nowrap;
}
.links a:hover, .links a.active{color:var(--ink); border-color:var(--brass);}
.links a.active{color:var(--brass-deep);}
.nav-right{display:flex; align-items:center; gap:18px; flex:0 0 auto;}
.langsw{display:flex; gap:2px; background:var(--paper-alt); border:1px solid var(--line); border-radius:999px; padding:3px;}
.langsw button{
  font-family:var(--font-body); font-weight:700; font-size:.72rem; letter-spacing:.05em;
  background:transparent; border:none; color:var(--ink-soft); padding:6px 12px;
  border-radius:999px; cursor:pointer; transition:background .2s, color .2s;
}
.langsw button.active{background:var(--brass); color:#fff;}
.langsw button:hover:not(.active){color:var(--ink);}
.navtoggle{display:none; background:var(--card); border:1px solid var(--line); color:var(--ink); border-radius:8px; width:38px; height:38px; cursor:pointer;}

/* ---------- hero ---------- */
.hero{position:relative; padding:88px 0 70px; overflow:hidden; background-size:cover; background-position:center;}
.hero::before{
  content:""; position:absolute; inset:0; z-index:-1;
  background:
    radial-gradient(ellipse 900px 500px at 15% 0%, rgba(169,119,40,.10), transparent 60%),
    repeating-linear-gradient(90deg, rgba(222,205,160,.55) 0 1px, transparent 1px 90px);
}
.hero.has-bg::before{
  background:
    linear-gradient(100deg, rgba(20,15,9,.86) 0%, rgba(20,15,9,.62) 45%, rgba(20,15,9,.28) 100%);
}
.hero.has-bg .eyebrow{color:var(--brass-tint);}
.hero.has-bg h1{color:#fff;}
.hero.has-bg p.subhead{color:rgba(255,255,255,.82);}
.hero.has-bg .btn-ghost{background:rgba(255,255,255,.92);}
.hero-grid{display:grid; grid-template-columns:1.05fr .95fr; gap:48px; align-items:center;}
.hero h1{
  font-size:clamp(2.1rem, 4.2vw, 3.35rem); line-height:1.12; font-weight:700;
  margin:14px 0 20px; color:var(--ink); max-width:12ch;
}
.hero p.subhead{color:var(--ink-soft); font-size:1.05rem; max-width:46ch; margin-bottom:32px;}
.cta-row{display:flex; gap:16px; flex-wrap:wrap;}
.btn{
  font-family:var(--font-body); font-weight:700; font-size:.92rem; text-decoration:none;
  padding:14px 26px; border-radius:6px; display:inline-block; cursor:pointer; border:1px solid transparent;
  transition:transform .18s ease, box-shadow .18s ease, background .18s ease;
}
.btn-primary{background:var(--brass); color:#fff;}
.btn-primary:hover{background:var(--brass-deep); transform:translateY(-1px); box-shadow:0 10px 22px rgba(140,94,27,.22);}
.btn-ghost{background:var(--card); color:var(--ink); border-color:var(--line);}
.btn-ghost:hover{border-color:var(--brass); color:var(--brass-deep);}

.board-wrap{position:relative;}
.board-caption{
  text-align:center; font-size:.78rem; color:var(--ink-faint);
  margin-top:14px; letter-spacing:.03em; font-style:italic;
}
.stone-move{transform-origin:center; opacity:0; animation:stoneIn .5s ease forwards;}
.stone-move:nth-of-type(1){animation-delay:.15s;}
.stone-move:nth-of-type(2){animation-delay:.45s;}
.stone-move:nth-of-type(3){animation-delay:.75s;}
.stone-move:nth-of-type(4){animation-delay:1.05s;}
.stone-move:nth-of-type(5){animation-delay:1.35s;}
.stone-move:nth-of-type(6){animation-delay:1.65s;}
@keyframes stoneIn{
  0%{opacity:0; transform:scale(.3);}
  70%{opacity:1; transform:scale(1.12);}
  100%{opacity:1; transform:scale(1);}
}
@media (prefers-reduced-motion: reduce){
  .stone-move{animation:none; opacity:1; transform:none;}
  html{scroll-behavior:auto;}
}

/* ---------- generic section ---------- */
section{padding:86px 0;}
section.alt{background:var(--paper-alt); border-top:1px solid var(--line); border-bottom:1px solid var(--line);}
.section-head{max-width:640px; margin-bottom:44px;}
.section-head h2{font-size:clamp(1.6rem, 3vw, 2.2rem); margin:10px 0 12px; color:var(--ink);}
.section-head p{color:var(--ink-soft); font-size:1rem;}

.reveal{opacity:0; transform:translateY(18px); transition:opacity .6s ease, transform .6s ease;}
.reveal.in-view{opacity:1; transform:none;}
@media (prefers-reduced-motion: reduce){ .reveal{opacity:1; transform:none;} }

/* ---------- about ---------- */
.about-grid{display:grid; grid-template-columns:1.3fr .9fr; gap:56px; align-items:start;}
.about-grid p{color:var(--ink-soft); font-size:1rem; max-width:56ch;}
.stats{display:grid; grid-template-columns:1fr; gap:0; border-left:1px solid var(--line);}
.stat{padding:14px 0 14px 26px; border-bottom:1px solid var(--line);}
.stat:last-child{border-bottom:none;}
.stat .num{font-family:var(--font-display); font-size:2rem; color:var(--brass-deep); font-weight:700; display:block;}
.stat .label{font-size:.82rem; color:var(--ink-soft); text-transform:uppercase; letter-spacing:.06em;}

/* ---------- levels ---------- */
.cards3{display:grid; grid-template-columns:repeat(3, 1fr); gap:24px;}
.card{
  background:var(--card); border:1px solid var(--line); border-radius:10px;
  padding:28px 24px; box-shadow:0 1px 2px rgba(36,27,16,.04);
  transition:transform .2s ease, border-color .2s ease, box-shadow .2s ease;
}
.card:hover{transform:translateY(-4px); border-color:var(--brass); box-shadow:0 14px 26px rgba(36,27,16,.08);}
.card .rank{
  display:inline-flex; align-items:center; gap:10px; font-family:var(--font-display);
  font-weight:700; font-size:1.1rem; color:var(--brass-deep); margin-bottom:14px;
}
.rank .stone-icon{width:20px; height:20px; border-radius:50%; flex:0 0 auto; border:1px solid var(--line);}
.card h3{margin:0 0 10px; font-size:1.15rem; color:var(--ink);}
.card p{margin:0; color:var(--ink-soft); font-size:.92rem;}

/* ---------- schedule ---------- */
.sched-grid{display:grid; grid-template-columns:repeat(3, 1fr); gap:1px; background:var(--line); border:1px solid var(--line); border-radius:10px; overflow:hidden;}
.sched-cell{background:var(--card); padding:26px 24px;}
.sched-cell .day{font-family:var(--font-display); font-weight:700; font-size:1.15rem; color:var(--ink); margin-bottom:4px;}
.sched-cell .time{font-size:.82rem; color:var(--brass-deep); font-weight:700; letter-spacing:.03em; margin-bottom:12px; display:block;}
.sched-cell p{margin:0; font-size:.9rem; color:var(--ink-soft);}
.sched-note{margin-top:24px; font-size:.9rem; color:var(--ink-soft); display:flex; align-items:center;}

/* ---------- news ---------- */
.news-list{display:flex; flex-direction:column;}
.news-row{
  display:grid; grid-template-columns:150px 1fr; gap:24px; padding:22px 0;
  border-bottom:1px solid var(--line); align-items:baseline;
}
.news-row:first-child{border-top:1px solid var(--line);}
.news-date{font-family:var(--font-display); font-weight:700; color:var(--brass-deep); font-size:.95rem;}
.news-row h3{margin:0 0 6px; font-size:1.05rem; color:var(--ink);}
.news-row p{margin:0; color:var(--ink-soft); font-size:.92rem;}
.news-empty{color:var(--ink-faint); font-style:italic;}
.lang-block{display:none;}
html[lang="ru"] .lang-block-ru{display:block;}
html[lang="en"] .lang-block-en{display:block;}
html[lang="kk"] .lang-block-kk{display:block;}

/* ---------- contacts ---------- */
.contact-grid{display:grid; grid-template-columns:1fr 1fr; gap:56px;}
.contact-list dt{font-size:.76rem; text-transform:uppercase; letter-spacing:.08em; color:var(--ink-faint); margin-top:20px;}
.contact-list dt:first-child{margin-top:0;}
.contact-list dd{margin:4px 0 0; font-size:1.05rem; color:var(--ink); font-family:var(--font-display);}
.board-mini{background:var(--card); border:1px solid var(--line); border-radius:10px; padding:24px; box-shadow:0 1px 2px rgba(36,27,16,.04);}

/* ---------- footer ---------- */
footer{padding:38px 0; border-top:1px solid var(--line);}
.foot-row{display:flex; justify-content:space-between; align-items:center; flex-wrap:wrap; gap:14px;}
footer p{margin:0; font-size:.82rem; color:var(--ink-faint);}
footer .admin-link{font-size:.78rem; color:var(--ink-faint); text-decoration:none; border-bottom:1px dotted var(--line);}
footer .admin-link:hover{color:var(--brass-deep);}

/* ---------- responsive ---------- */
/* ---------- hero photo slider ---------- */
.hero-slider{
  position:relative; border-radius:14px; overflow:hidden; aspect-ratio:4/3.3;
  background:var(--paper-alt); border:1px solid var(--line); box-shadow:0 18px 40px rgba(36,27,16,.14);
}
.hero-slider-track{display:flex; height:100%; transition:transform .5s cubic-bezier(.65,0,.35,1);}
.hero-slide{flex:0 0 100%; margin:0; position:relative; height:100%;}
.hero-slide img{width:100%; height:100%; object-fit:cover; object-position:center; display:block;}
.hero-slide .slide-caption{
  position:absolute; left:0; right:0; bottom:0; margin:0; text-align:left;
  padding:34px 20px 16px; font-style:normal; color:#fff; font-size:.86rem;
  background:linear-gradient(0deg, rgba(15,11,6,.72), rgba(15,11,6,0));
}
.slider-arrow{
  position:absolute; top:50%; transform:translateY(-50%); z-index:5;
  width:38px; height:38px; border-radius:50%; border:none; cursor:pointer;
  background:rgba(250,245,234,.88); color:var(--ink); font-size:1.3rem; line-height:1;
  display:flex; align-items:center; justify-content:center; transition:background .2s;
}
.slider-arrow:hover{background:#fff;}
.slider-prev{left:12px;} .slider-next{right:12px;}
.slider-dots{position:absolute; bottom:12px; left:0; right:0; display:flex; justify-content:center; gap:8px; z-index:5;}
.slider-dot{width:8px; height:8px; border-radius:50%; border:1px solid rgba(255,255,255,.8); background:rgba(255,255,255,.35); padding:0; cursor:pointer;}
.slider-dot.active{background:#fff;}

/* ---------- teaser cards (news / tournaments summaries on homepage) ---------- */
.teaser-grid{display:grid; grid-template-columns:repeat(3, 1fr); gap:22px;}
.teaser-card{
  display:block; background:var(--card); border:1px solid var(--line); border-radius:10px; overflow:hidden;
  text-decoration:none; color:inherit; transition:transform .2s ease, box-shadow .2s ease, border-color .2s ease;
}
.teaser-card:hover{transform:translateY(-4px); border-color:var(--brass); box-shadow:0 14px 26px rgba(36,27,16,.1);}
.teaser-thumb{aspect-ratio:16/10; background:var(--paper-alt); display:flex; align-items:center; justify-content:center; overflow:hidden;}
.teaser-thumb img{width:100%; height:100%; object-fit:cover;}
.teaser-thumb-fallback{font-family:var(--font-display); font-weight:700; font-size:1.6rem; color:var(--line);}
.teaser-body{padding:18px 20px 20px;}
.teaser-body .news-date{font-size:.78rem; margin-bottom:6px;}
.teaser-body h3{margin:0; font-size:1.02rem; color:var(--ink);}
.teaser-more{margin-top:30px;}

/* ---------- page hero (news / tournaments / contacts sub-pages) ---------- */
.page-hero{padding:52px 0 34px;}
.page-hero h1{font-size:clamp(1.7rem, 3.4vw, 2.4rem); margin:10px 0 12px; color:var(--ink);}
.page-hero .subhead{color:var(--ink-soft); max-width:60ch; margin:0;}
.breadcrumb{margin:0 0 18px;}
.breadcrumb a{font-size:.84rem; color:var(--ink-faint); text-decoration:none; border-bottom:1px dotted var(--line);}
.breadcrumb a:hover{color:var(--brass-deep);}

/* ---------- post list (full news / tournaments pages) ---------- */
.post-list{display:flex; flex-direction:column; gap:34px;}
.post-card{
  display:grid; grid-template-columns:260px 1fr; gap:0; background:var(--card);
  border:1px solid var(--line); border-radius:12px; overflow:hidden; scroll-margin-top:100px;
  box-shadow:0 1px 2px rgba(36,27,16,.04);
}
.post-cover{background:var(--paper-alt);}
.post-cover img{width:100%; height:100%; object-fit:cover; min-height:200px;}
.post-body{padding:26px 28px;}
.post-body .news-date{font-size:.85rem; margin-bottom:8px;}
.post-body h2{margin:0 0 10px; font-size:1.25rem; color:var(--ink);}
.post-body p{margin:0; color:var(--ink-soft);}
.post-place{font-size:.86rem; color:var(--brass-deep); font-weight:700; margin-bottom:8px;}
.post-gallery{display:flex; flex-wrap:wrap; gap:10px; margin-top:18px;}
.post-gallery-item{display:block; width:88px; height:88px; border-radius:8px; overflow:hidden; border:1px solid var(--line);}
.post-gallery-item img{width:100%; height:100%; object-fit:cover; display:block; transition:transform .25s ease;}
.post-gallery-item:hover img{transform:scale(1.08);}

/* ---------- contacts page ---------- */
.contact-grid-full{grid-template-columns:1.2fr .8fr; align-items:start; margin-bottom:36px;}
.map-embed{border-radius:12px; overflow:hidden; border:1px solid var(--line); box-shadow:0 1px 2px rgba(36,27,16,.04);}
.map-embed iframe{display:block; width:100%;}

@media (max-width:900px){
  .hero-grid{grid-template-columns:1fr;}
  .hero-slider{
    order:-1;
    width:100vw; max-width:100vw;
    margin-left:calc(50% - 50vw); margin-right:calc(50% - 50vw);
    margin-bottom:22px;
    border-radius:0; border-left:none; border-right:none; box-shadow:none;
    aspect-ratio:4/3.4;
  }
  .about-grid, .contact-grid{grid-template-columns:1fr;}
  .cards3{grid-template-columns:1fr;}
  .sched-grid{grid-template-columns:1fr;}
  .teaser-grid{grid-template-columns:1fr 1fr;}
  .post-card{grid-template-columns:1fr;}
  .post-cover img{min-height:180px;}
}
@media (max-width:600px){
  .hero-slider{aspect-ratio:1/1.05;}
}
@media (max-width:420px){
  .hero-slider{aspect-ratio:3/4;}
}
@media (orientation:landscape) and (max-width:900px) and (max-height:520px){
  .hero-slider{aspect-ratio:16/7;}
}
@media (max-width:560px){
  .teaser-grid{grid-template-columns:1fr;}
}
@media (max-width:720px){
  .navbar{flex-wrap:wrap; justify-content:flex-start;}
  .navbar-nav{order:3; flex:1 1 100%; position:relative;}
  .links{
    position:absolute; top:8px; left:0; right:0; z-index:60;
    background:var(--card); border:1px solid var(--line); border-radius:12px;
    flex-direction:column; gap:0; padding:6px;
    box-shadow:0 16px 32px rgba(36,27,16,.16);
    max-height:0; overflow:hidden; opacity:0; pointer-events:none;
    transition:max-height .25s ease, opacity .2s ease;
  }
  .links.open{max-height:400px; opacity:1; pointer-events:auto;}
  .links a{padding:13px 14px; border-bottom:1px solid var(--line-soft); width:100%; border-radius:8px;}
  .links li:last-child a{border-bottom:none;}
  .links a:hover, .links a.active{background:var(--paper-alt); border-color:var(--line-soft);}
  .navtoggle{display:block; order:1;}
  .nav-right{order:2; margin-left:auto;}
  .news-row{grid-template-columns:1fr;}
}
