/* ---------------------------------------------------
   Agrovin — design tokens (matched to brand logo)
--------------------------------------------------- */
:root{
  --bg:        #f7f8f4;
  --bg-alt:    #dfead0;
  --ink:       #142238;
  --ink-soft:  #4c5a4e;
  --line:      #dbe1d3;
  --navy:      #0e2c58;
  --navy-dk:   #081b39;
  --green:     #5b9c3e;
  --green-dk:  #3f7a2a;
  --gold:      #e8ac13;
  --paper:     #fdfdfb;

  --display: "Unbounded", var(--sans);
  --sans:  "Golos Text", Arial, sans-serif;

  --wrap: 1160px;
}

*, *::before, *::after{ box-sizing: border-box; }
html{ scroll-behavior: smooth; overflow-x: hidden; }
body{ overflow-x: hidden; }
img{ max-width: 100%; }

body{
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: var(--sans);
  font-size: 18px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  transition: opacity .15s ease;
}
body.lang-transitioning{ opacity: 0; }

h1, h2, h3{
  font-family: var(--display);
  font-weight: 700;
  line-height: 1.15;
  margin: 0;
  color: var(--navy);
  letter-spacing: -.01em;
}

em{ font-style: normal; color: var(--green-dk); }

p{ margin: 0 0 1em; color: var(--ink-soft); }
p:last-child{ margin-bottom: 0; }

a{ color: var(--navy); }

.wrap{
  max-width: var(--wrap);
  margin: 0 auto;
  padding: 0 28px;
}

/* subtle paper grain, no imagery required */
.grain{
  position: fixed; inset: 0; pointer-events: none; z-index: 999;
  opacity: .03; mix-blend-mode: multiply;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='120' height='120'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='2' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
}

/* ---------------------------------------------------
   motion: keyframes + scroll-reveal
--------------------------------------------------- */
@keyframes floatY{ 0%,100%{ transform: translateY(0); } 50%{ transform: translateY(-16px); } }
@keyframes floatSlow{ 0%,100%{ transform: translate(0,0) rotate(0deg); } 50%{ transform: translate(14px,-18px) rotate(4deg); } }
@keyframes blobMove{
  0%,100%{ transform: translate(0,0) scale(1); }
  33%{ transform: translate(30px,-24px) scale(1.08); }
  66%{ transform: translate(-24px,18px) scale(.94); }
}
@keyframes popNum{
  from{ opacity: 0; transform: perspective(600px) rotateX(-40deg) translateY(14px); }
  to{ opacity: 1; transform: perspective(600px) rotateX(0) translateY(0); }
}
@keyframes spin3d{
  from{ transform: rotateX(0deg) rotateY(0deg); }
  to{ transform: rotateX(360deg) rotateY(360deg); }
}
@keyframes floatCube{ 0%,100%{ margin-top: 0; } 50%{ margin-top: -14px; } }

/* extruded pseudo-3D typography, always visible (no interaction needed) */
.text-3d{
  text-shadow:
    1px 1px 0 rgba(8,27,57,.35),
    2px 2px 0 rgba(8,27,57,.28),
    3px 3px 0 rgba(8,27,57,.2),
    4px 4px 10px rgba(8,27,57,.28);
}

.reveal{
  opacity: 0; transform: translateY(30px);
  transition: opacity .7s cubic-bezier(.16,.8,.24,1), transform .7s cubic-bezier(.16,.8,.24,1);
  will-change: transform, opacity;
}
.reveal.is-visible{ opacity: 1; transform: translateY(0); }

@media (prefers-reduced-motion: reduce){
  *, *::before, *::after{
    animation-duration: .001ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: .001ms !important;
    scroll-behavior: auto !important;
  }
  .reveal{ opacity: 1 !important; transform: none !important; }
}

/* ---------------------------------------------------
   language toggle
--------------------------------------------------- */
.lang-en{ display: none; }
html[data-lang="en"] .lang-en{ display: inherit; }
html[data-lang="en"] .lang-ua{ display: none; }

/* ---------------------------------------------------
   header
--------------------------------------------------- */
.site-header{
  position: sticky; top: 0; z-index: 50;
  background: rgba(247,248,244,.94);
  backdrop-filter: blur(6px);
  border-bottom: 1px solid var(--line);
  transition: box-shadow .35s ease, height .35s ease;
}
.site-header.is-scrolled{ box-shadow: 0 10px 30px rgba(8,27,57,.09); }
.header-inner{
  display: flex; align-items: center; justify-content: space-between;
  height: 80px;
  transition: height .35s cubic-bezier(.2,.8,.2,1);
}
.site-header.is-scrolled .header-inner{ height: 64px; }
.brand{ display: flex; align-items: center; text-decoration: none; }
.brand-logo{ height: 34px; width: auto; display: block; transition: height .35s cubic-bezier(.2,.8,.2,1), transform .3s ease; }
.brand:hover .brand-logo{ transform: scale(1.04); }
.site-header.is-scrolled .brand-logo{ height: 28px; }

.main-nav{ display: flex; gap: 32px; }
.main-nav a{
  text-decoration: none; color: var(--ink);
  font-size: 15.5px; font-weight: 500; position: relative; padding: 4px 0;
}
.main-nav a::after{
  content: ""; position: absolute; left: 0; right: 0; bottom: -2px;
  height: 2px; background: var(--gold);
  transform: scaleX(0); transform-origin: left;
  transition: transform .25s ease;
}
.main-nav a:hover::after{ transform: scaleX(1); }

.header-actions{ display: flex; align-items: center; gap: 18px; }

.lang-switch{
  border: 1px solid var(--line); background: transparent;
  font-family: var(--sans); font-size: 14px; letter-spacing: .04em;
  padding: 7px 13px; border-radius: 3px; cursor: pointer;
  color: var(--ink-soft);
}
.lang-switch .sep{ margin: 0 4px; opacity: .5; }
.lang-switch .lang-ua-btn, .lang-switch .lang-en-btn{ transition: color .2s ease, font-weight .2s ease; }
.lang-switch span.is-active{ color: var(--navy); font-weight: 700; }

.nav-toggle{
  display: none; flex-direction: column; justify-content: center; gap: 5px;
  width: 30px; height: 30px; background: none; border: none; cursor: pointer;
}
.nav-toggle span{ display: block; height: 2px; background: var(--navy); }

/* ---------------------------------------------------
   hero
--------------------------------------------------- */
.hero{ position: relative; overflow: hidden; padding: 80px 0 70px; border-bottom: 1px solid var(--line); }
.hero-blob{
  position: absolute; z-index: 0; pointer-events: none; border-radius: 50%;
  filter: blur(70px); opacity: .32; animation: blobMove 16s ease-in-out infinite;
}
.hero-blob.b1{ width: 360px; height: 360px; background: var(--green); top: -110px; left: -120px; }
.hero-blob.b2{ width: 280px; height: 280px; background: var(--gold); bottom: -90px; right: -60px; animation-duration: 20s; animation-delay: -6s; }

/* floating rotating 3D cube, decorative, always animating */
.cube3d-wrap{
  position: absolute; top: 26px; right: 6%; z-index: 2;
  width: 74px; height: 74px; perspective: 500px;
  animation: floatCube 6s ease-in-out infinite;
}
.cube3d{
  position: relative; width: 100%; height: 100%;
  transform-style: preserve-3d;
  animation: spin3d 16s linear infinite;
}
.cube3d-face{
  position: absolute; inset: 0;
  border: 1px solid rgba(253,253,251,.5);
  border-radius: 4px;
}
.cube3d-face.front{  background: rgba(91,156,62,.6);  transform: translateZ(37px); }
.cube3d-face.back{   background: rgba(14,44,88,.6);   transform: rotateY(180deg) translateZ(37px); }
.cube3d-face.right{  background: rgba(232,172,19,.55); transform: rotateY(90deg) translateZ(37px); }
.cube3d-face.left{   background: rgba(232,172,19,.55); transform: rotateY(-90deg) translateZ(37px); }
.cube3d-face.top{    background: rgba(253,253,251,.5); transform: rotateX(90deg) translateZ(37px); }
.cube3d-face.bottom{ background: rgba(8,27,57,.6);     transform: rotateX(-90deg) translateZ(37px); }

.hero-grid{
  position: relative; z-index: 1;
  display: grid; grid-template-columns: 1.05fr .95fr; gap: 56px; align-items: center;
}
.eyebrow{
  text-transform: uppercase; letter-spacing: .1em; font-size: 13.5px;
  color: var(--green-dk); font-weight: 700; margin-bottom: 20px;
}
.hero h1{ font-size: 50px; margin-bottom: 24px; }
.hero .lead{ font-size: 20px; max-width: 46ch; }
.hero-actions{ display: flex; gap: 14px; margin-top: 32px; flex-wrap: wrap; }

.btn{
  display: inline-block; padding: 14px 28px; text-decoration: none;
  font: inherit; font-size: 15px; border-radius: 4px; border: 1px solid transparent;
  font-weight: 600; background: none; cursor: pointer;
  transition: opacity .2s ease, background .2s ease, transform .25s cubic-bezier(.2,.8,.2,1), box-shadow .3s ease;
}
.btn-primary{ background: var(--navy); color: var(--paper); box-shadow: 0 8px 18px rgba(8,27,57,.2); }
.btn-primary:hover{ opacity: .95; transform: translateY(-3px); box-shadow: 0 14px 28px rgba(8,27,57,.3); }
.btn-primary:active{ transform: translateY(-1px) scale(.98); }
.btn-ghost{ border-color: var(--navy); color: var(--navy); }
.btn-ghost:hover{ background: var(--navy); color: var(--paper); transform: translateY(-3px); box-shadow: 0 12px 22px rgba(8,27,57,.18); }
.btn-ghost:active{ transform: translateY(-1px) scale(.98); }

.hero-photo{ position: relative; }
.hero-photo::before{ display: none; }
.hero-photo img{
  position: relative; z-index: 1;
  width: 100%; height: 380px; object-fit: cover;
  border-radius: 6px; display: block;
  box-shadow: 0 20px 40px rgba(8,27,57,.18);
}
/* real perspective tilt is a desktop-only bonus (mouse hover, see main.js) —
   phones never get the 3D stack, which is what used to blur/clip the
   badge below on small screens */
@media (hover: hover) and (pointer: fine){
  .hero-photo{ perspective: 1000px; }
  .hero-photo::before{
    display: block; content: ""; position: absolute; inset: 0; border-radius: 8px;
    background: linear-gradient(135deg, var(--gold), var(--green));
    transform: rotateY(-9deg) rotateX(4deg) translate(24px, 28px);
    backface-visibility: hidden;
    z-index: 0; opacity: .55;
  }
  .hero-photo img{
    box-shadow: 12px 26px 46px rgba(8,27,57,.28);
    transform: rotateY(-9deg) rotateX(4deg);
    transition: transform .5s cubic-bezier(.2,.8,.2,1), box-shadow .5s ease;
    backface-visibility: hidden; will-change: transform;
  }
}

.hero-since{
  position: absolute; left: -18px; bottom: -18px; z-index: 2;
  background: linear-gradient(155deg, #163f76 0%, var(--navy) 55%, var(--navy-dk) 100%);
  color: var(--paper);
  padding: 18px 24px; text-align: left; border-radius: 10px;
  max-width: calc(100% - 20px);
  box-shadow:
    inset 0 2px 2px rgba(255,255,255,.2),
    inset 0 -8px 14px rgba(0,0,0,.25),
    0 14px 26px rgba(8,27,57,.35);
}
.hero-since::before{
  content: ""; position: absolute; top: 8%; left: 5%; width: 40%; height: 30%;
  background: rgba(255,255,255,.16); border-radius: 50%; filter: blur(6px);
  pointer-events: none;
}
.since-num{
  display: block; font-family: var(--display); font-size: 26px; font-weight: 700;
  color: var(--gold); line-height: 1;
  text-shadow: 1px 1px 0 rgba(0,0,0,.3), 2px 2px 0 rgba(0,0,0,.22), 3px 3px 6px rgba(0,0,0,.35);
}
.since-label{
  display: block; font-size: 12px; text-transform: uppercase;
  letter-spacing: .07em; color: rgba(253,253,251,.75); margin-top: 7px;
}

/* ---------------------------------------------------
   stats bar
--------------------------------------------------- */
.stats{ background: var(--navy-dk); color: var(--paper); }
.stats-grid{
  display: grid; grid-template-columns: repeat(4, 1fr);
  padding: 44px 28px;
}
.stat{
  text-align: center; border-left: 1px solid rgba(253,253,251,.16);
  padding: 16px 12px; border-radius: 8px;
  transition: transform .4s cubic-bezier(.2,.8,.2,1);
}
.stat:first-child{ border-left: none; }
@media (hover: hover) and (pointer: fine){
  .stat:hover{ transform: perspective(500px) rotateX(10deg) translateY(-4px); }
}
.stat-num{
  display: block; font-family: var(--display); font-size: 40px; font-weight: 700; color: var(--gold);
  opacity: 0;
  text-shadow: 2px 2px 0 rgba(8,27,57,.7), 4px 4px 0 rgba(8,27,57,.45), 6px 6px 14px rgba(0,0,0,.35);
}
.stat-num.is-visible{ opacity: 1; animation: popNum .6s cubic-bezier(.2,.8,.24,1.1) both; }
.stat-label{
  display: block; font-size: 16px; font-weight: 500; margin-top: 12px;
  color: rgba(253,253,251,.92); letter-spacing: .01em; line-height: 1.35;
}

/* ---------------------------------------------------
   sections
--------------------------------------------------- */
.section{ padding: 88px 0; border-bottom: 1px solid var(--line); }
.section-alt{ background: var(--bg-alt); }
.section-grid{
  display: grid; grid-template-columns: 260px 1fr; gap: 60px;
}
.section-head{ display: flex; flex-direction: column; gap: 16px; }
.section-num{
  font-family: var(--display); font-size: 15px; font-weight: 700; color: var(--gold);
  letter-spacing: .06em;
}
.section h2{ font-size: 30px; }
.section-body{ max-width: 68ch; font-size: 19px; }
.section-body p{ font-size: 19px; }

/* timeline */
.timeline{ list-style: none; margin: 0; padding: 0; }
.timeline li{
  display: grid; grid-template-columns: 140px 1fr; gap: 24px;
  padding: 24px 0; border-top: 1px solid var(--line);
  transform: translateY(26px);
  opacity: 0;
  transition: transform .6s cubic-bezier(.16,.8,.24,1), opacity .6s ease;
}
.timeline li.is-visible{ opacity: 1; transform: translateY(0); }
.timeline li:first-child{ border-top: none; padding-top: 0; }
.tl-year{
  font-family: var(--display); font-weight: 700; color: var(--navy); font-size: 16px;
}
.timeline p{ font-size: 18px; }

/* activities */
.activity-list{
  list-style: none; margin: 0; padding: 0;
  display: grid; grid-template-columns: 1fr 1fr; gap: 22px;
}
.activity-list li{
  display: flex; gap: 20px; align-items: flex-start; padding: 28px 26px;
  background: var(--paper); border: 1px solid var(--line); border-radius: 14px;
  box-shadow: 0 4px 14px rgba(20,34,56,.05);
  transform: translateY(26px);
  opacity: 0;
  transition: transform .6s cubic-bezier(.16,.8,.24,1), opacity .6s ease, box-shadow .45s ease, border-color .35s ease;
}
.activity-list li.is-visible{ opacity: 1; transform: translateY(0); }
.activity-list li:hover{
  box-shadow: 0 26px 44px rgba(20,34,56,.16);
  border-color: var(--gold);
}

/* glossy 3D icon tile: gradient fill + bevel shadow + gloss highlight,
   color cycles green / gold / navy. Pure box-shadow/gradient — no
   transforms, so it renders identically (and crisply) on phones. */
.act-num, .contact-icon, .doc-toggle-icon, .doc-icon{
  position: relative;
  display: flex; align-items: center; justify-content: center;
  overflow: hidden;
  box-shadow:
    inset 0 2px 2px rgba(255,255,255,.45),
    inset 0 -6px 9px rgba(0,0,0,.2),
    0 10px 16px -4px rgba(20,34,56,.4),
    0 3px 0 rgba(20,34,56,.15);
}
.act-num::after, .contact-icon::after, .doc-toggle-icon::after, .doc-icon::after{
  content: ""; position: absolute; top: 12%; left: 14%; width: 55%; height: 34%;
  background: rgba(255,255,255,.35); border-radius: 50%; filter: blur(4px);
  pointer-events: none;
}
.act-num svg, .contact-icon svg, .doc-toggle-icon svg, .doc-icon svg{ position: relative; z-index: 1; }
.act-num{ width: 52px; height: 52px; min-width: 52px; border-radius: 15px; }
.act-num svg{ width: 26px; height: 26px; }
.activity-list li:nth-child(6n+1) .act-num{ background: linear-gradient(155deg, #7fc756 0%, var(--green-dk) 100%); }
.activity-list li:nth-child(6n+2) .act-num{ background: linear-gradient(155deg, #f7c948 0%, #b9800a 100%); }
.activity-list li:nth-child(6n+3) .act-num{ background: linear-gradient(155deg, #2f5f9e 0%, var(--navy-dk) 100%); }
.activity-list li:nth-child(6n+4) .act-num{ background: linear-gradient(155deg, #f7c948 0%, #b9800a 100%); }
.activity-list li:nth-child(6n+5) .act-num{ background: linear-gradient(155deg, #7fc756 0%, var(--green-dk) 100%); }
.activity-list li:nth-child(6n+6) .act-num{ background: linear-gradient(155deg, #2f5f9e 0%, var(--navy-dk) 100%); }
.activity-list h3{ font-size: 19px; margin-bottom: 8px; }
.activity-list p{ font-size: 17px; }

/* documents (preview) */
.doc-toggle{
  width: 100%; display: flex; align-items: center; gap: 18px;
  margin-top: 28px; padding: 22px 24px;
  background: var(--paper); border: 1px solid var(--line); border-radius: 16px;
  box-shadow: 0 4px 14px rgba(20,34,56,.05);
  font-family: inherit; text-align: left; cursor: pointer; color: inherit;
  transition: box-shadow .3s ease, border-color .3s ease, transform .3s cubic-bezier(.2,.8,.2,1);
}
@media (hover: hover) and (pointer: fine){
  .doc-toggle:hover{ box-shadow: 0 20px 36px rgba(20,34,56,.14); border-color: var(--gold); transform: translateY(-2px); }
}
.doc-toggle:active{ transform: translateY(0); }
.doc-toggle-icon{ width: 48px; height: 48px; min-width: 48px; border-radius: 14px; background: linear-gradient(155deg, #23508f 0%, var(--navy-dk) 100%); }
.doc-toggle-icon svg{ width: 22px; height: 22px; }
.doc-toggle-text{ flex: 1; display: flex; flex-direction: column; gap: 4px; }
.doc-toggle-text strong{ font-family: var(--display); font-size: 17px; color: var(--navy); }
.doc-toggle-text span:last-child{ font-size: 14.5px; color: var(--ink-soft); }
.doc-toggle-chevron{ width: 20px; height: 20px; min-width: 20px; color: var(--ink-soft); transition: transform .35s cubic-bezier(.2,.8,.2,1); }
.doc-toggle[aria-expanded="true"] .doc-toggle-chevron{ transform: rotate(180deg); }

.doc-catalog-wrap{
  display: grid; grid-template-rows: 0fr;
  transition: grid-template-rows .45s cubic-bezier(.16,.8,.24,1);
}
.doc-catalog-wrap.is-open{ grid-template-rows: 1fr; }
.doc-catalog{ overflow: hidden; min-height: 0; }
.doc-list{ list-style: none; margin: 20px 0 0; padding: 0; display: grid; gap: 12px; }
.doc-list li{
  display: flex; align-items: center; gap: 14px; padding: 14px 16px;
  background: var(--paper); border: 1px solid var(--line); border-radius: 12px;
}
.doc-icon{ width: 40px; height: 40px; min-width: 40px; border-radius: 11px; }
.doc-icon svg{ width: 19px; height: 19px; }
.doc-list li:nth-child(4n+1) .doc-icon{ background: linear-gradient(155deg, #2f5f9e 0%, var(--navy-dk) 100%); }
.doc-list li:nth-child(4n+2) .doc-icon{ background: linear-gradient(155deg, #7fc756 0%, var(--green-dk) 100%); }
.doc-list li:nth-child(4n+3) .doc-icon{ background: linear-gradient(155deg, #f7c948 0%, #b9800a 100%); }
.doc-list li:nth-child(4n+4) .doc-icon{ background: linear-gradient(155deg, #2f5f9e 0%, var(--navy-dk) 100%); }
.doc-name{ flex: 1; font-weight: 600; color: var(--navy); font-size: 15.5px; }
.doc-note{ margin-top: 18px; font-size: 14.5px; }

/* contacts */
.contact-list{ margin: 34px 0 0; display: grid; gap: 20px; }
.contact-list > div{
  display: grid; grid-template-columns: 170px 1fr; gap: 20px;
  padding-bottom: 18px; border-bottom: 1px solid var(--line);
  align-items: center;
}
.contact-list dt{
  display: flex; align-items: center; gap: 12px;
  font-size: 13.5px; text-transform: uppercase; letter-spacing: .05em;
  color: var(--ink-soft); font-weight: 600;
}
.contact-icon{
  width: 34px; height: 34px; min-width: 34px; border-radius: 10px;
  background: linear-gradient(155deg, #23508f 0%, var(--navy-dk) 100%);
}
.contact-icon svg{ width: 17px; height: 17px; }
.contact-list dd{ margin: 0; font-size: 18px; display: flex; align-items: center; flex-wrap: wrap; gap: 14px; }
.contact-list a{ text-decoration: none; border-bottom: 1px solid var(--gold); color: var(--navy); font-weight: 600; }
.contact-messengers{ display: flex; align-items: center; gap: 8px; }
.messenger-icon{
  display: flex; align-items: center; justify-content: center;
  width: 34px; height: 34px; border-radius: 10px; border-bottom: none;
  box-shadow: 0 10px 16px -4px rgba(20,34,56,.35), 0 3px 0 rgba(20,34,56,.12);
  transition: transform .15s ease;
}
.messenger-icon:hover{ transform: translateY(-2px); }
.messenger-icon svg{ width: 18px; height: 18px; }
.messenger-telegram{ background: linear-gradient(155deg, #4fb3e0 0%, #1f8fc4 100%); }
.messenger-whatsapp{ background: linear-gradient(155deg, #3fd06a 0%, #1fa84c 100%); }
.messenger-viber{ background: linear-gradient(155deg, #a077e0 0%, #6f3fbf 100%); }
.doc-download-tag{
  display: inline-block; margin-left: 10px; font-size: 11px;
  text-transform: uppercase; letter-spacing: .05em;
  background: var(--green-dk); color: #fff; font-weight: 700;
  padding: 3px 8px; border-radius: 2px; vertical-align: middle;
  text-decoration: none; transition: opacity .2s ease;
}
.doc-download-tag:hover{ opacity: .85; }

/* ---------------------------------------------------
   footer
--------------------------------------------------- */
.site-footer{
  position: relative; overflow: hidden;
  background: var(--navy-dk); color: rgba(253,253,251,.85); padding: 56px 0 30px;
}
.footer-leaf{
  position: absolute; z-index: 0; pointer-events: none;
  right: -70px; bottom: -70px;
  width: 460px; max-width: 60vw; height: auto;
  opacity: .15;
  animation: floatSlow 11s ease-in-out infinite;
}
.footer-inner{
  position: relative; z-index: 1;
  display: grid; grid-template-columns: 1fr auto; gap: 30px;
  padding-bottom: 30px; border-bottom: 1px solid rgba(253,253,251,.15);
}
.footer-brand{ font-family: var(--display); font-size: 19px; color: var(--paper); }
.footer-logo{ height: 30px; width: auto; display: block; }
.footer-brand p{ font-family: var(--sans); font-size: 14px; color: rgba(253,253,251,.65); margin-top: 12px; }
.footer-nav{ display: flex; flex-wrap: wrap; gap: 12px 24px; align-items: start; }
.footer-nav a{ color: rgba(253,253,251,.85); text-decoration: none; font-size: 14.5px; }
.footer-nav a:hover{ color: var(--gold); }
.footer-copy{ margin: 22px 0 0; font-size: 13.5px; color: rgba(253,253,251,.5); }

/* ---------------------------------------------------
   responsive
--------------------------------------------------- */
@media (max-width: 900px){
  .footer-leaf{ width: 320px; right: -60px; bottom: -50px; }
  .cube3d-wrap{ display: none; }
  .hero-grid{ grid-template-columns: 1fr; }
  .hero-photo{ order: -1; }
  .hero-photo img{ height: 260px; }
  @media (hover: hover) and (pointer: fine){
    .hero-photo img{ transform: rotateY(-6deg) rotateX(2deg); }
    .hero-photo::before{ transform: rotateY(-6deg) rotateX(2deg) translate(14px, 16px); }
  }
  .hero-since{ left: 14px; bottom: -18px; }
  .section-grid{ grid-template-columns: 1fr; gap: 20px; }
  .activity-list{ grid-template-columns: 1fr; }
  .stats-grid{ grid-template-columns: 1fr 1fr; row-gap: 26px; }
  .stat:nth-child(3){ border-left: none; }
  .footer-inner{ grid-template-columns: 1fr; }
}

@media (max-width: 720px){
  body{ font-size: 16px; }
  .wrap{ padding: 0 20px; }
  .header-inner{ height: 68px; }
  .brand-logo{ height: 28px; }
  .header-actions{ gap: 10px; }
  .lang-switch{ padding: 6px 10px; font-size: 13px; }
  .main-nav{
    position: absolute; top: 68px; left: 0; right: 0;
    background: var(--paper); border-bottom: 1px solid var(--line);
    flex-direction: column; padding: 10px 20px 20px; gap: 4px;
    display: flex;
    opacity: 0;
    visibility: hidden;
    transform: translateY(-10px);
    pointer-events: none;
    transition: opacity .22s ease, transform .22s ease, visibility .22s;
    box-shadow: 0 12px 20px rgba(8,27,57,.08);
  }
  .main-nav.is-open{
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
    pointer-events: auto;
  }
  .main-nav a{
    padding: 12px 0; font-size: 16px;
    opacity: 0; transform: translateY(-6px);
    transition: opacity .2s ease, transform .2s ease;
  }
  .main-nav.is-open a{ opacity: 1; transform: translateY(0); }
  .main-nav.is-open a:nth-child(1){ transition-delay: .04s; }
  .main-nav.is-open a:nth-child(2){ transition-delay: .08s; }
  .main-nav.is-open a:nth-child(3){ transition-delay: .12s; }
  .main-nav.is-open a:nth-child(4){ transition-delay: .16s; }
  .main-nav.is-open a:nth-child(5){ transition-delay: .2s; }
  .main-nav.is-open a:nth-child(6){ transition-delay: .24s; }

  .nav-toggle{ display: flex; }
  .nav-toggle span{ transition: transform .25s ease, opacity .2s ease; }
  .nav-toggle.is-active span:nth-child(1){ transform: translateY(7px) rotate(45deg); }
  .nav-toggle.is-active span:nth-child(2){ opacity: 0; }
  .nav-toggle.is-active span:nth-child(3){ transform: translateY(-7px) rotate(-45deg); }
  .hero h1{ font-size: 34px; }
  .hero .lead{ font-size: 17px; }
  .hero{ padding: 36px 0 36px; }
  .hero-actions{ flex-direction: column; align-items: stretch; }
  .hero-actions .btn{ text-align: center; }
  .hero-photo img{ height: 220px; }
  .stat-num{ font-size: 32px; }
  .stats-grid{ padding: 32px 20px; }
  .section{ padding: 48px 0; }
  .section h2{ font-size: 25px; }
  .section-body, .section-body p{ font-size: 16px; }
  .activity-list h3{ font-size: 17px; }
  .activity-list p{ font-size: 15.5px; }
  .contact-list > div{ grid-template-columns: 1fr; gap: 6px; }
  .timeline li{ grid-template-columns: 1fr; gap: 6px; }
  .footer-inner{ text-align: left; }
  .doc-toggle{ padding: 18px; gap: 14px; }
  .doc-toggle-text strong{ font-size: 16px; }
  .doc-list li{ flex-wrap: wrap; }
  .doc-name{ min-width: 60%; }
}

@media (max-width: 400px){
  .wrap{ padding: 0 16px; }
  .hero h1{ font-size: 28px; }
  .hero-since{ padding: 12px 16px; left: 10px; }
  .since-num{ font-size: 20px; }
  .stats-grid{ grid-template-columns: 1fr 1fr; padding: 24px 16px; }
  .stat-num{ font-size: 28px; }
  .stat-label{ font-size: 14px; }
}

/* ---------------------------------------------------
   Membership application modal
--------------------------------------------------- */
body.modal-open{ overflow: hidden; }

.modal-overlay{
  position: fixed; inset: 0; z-index: 100;
  background: rgba(8,27,57,.55);
  backdrop-filter: blur(4px);
  display: flex; align-items: center; justify-content: center;
  padding: 24px;
}
.modal-overlay[hidden]{ display: none; }

.modal{
  position: relative;
  width: 100%; max-width: 560px; max-height: calc(100vh - 48px);
  overflow-y: auto;
  background: var(--paper);
  border-radius: 16px;
  box-shadow: 0 30px 60px rgba(8,27,57,.35);
  padding: 40px;
}
.modal-close{
  position: absolute; top: 18px; right: 18px;
  width: 36px; height: 36px; border-radius: 50%;
  border: 1px solid var(--line); background: var(--bg);
  color: var(--ink); cursor: pointer; padding: 0;
  display: flex; align-items: center; justify-content: center;
  transition: background .2s ease, border-color .2s ease, transform .2s ease;
}
.modal-close:hover{ background: var(--navy); border-color: var(--navy); color: var(--paper); transform: rotate(90deg); }
.modal-close svg{ width: 16px; height: 16px; }

.modal-body h3{ font-size: 24px; margin-bottom: 12px; padding-right: 32px; }
.modal-body > p{ margin-bottom: 24px; }

.form-field{ display: block; margin-bottom: 18px; font-size: 14px; font-weight: 600; color: var(--ink); }
.form-field-label{ display: block; margin-bottom: 6px; }
.form-field input, .form-field select{
  width: 100%; padding: 12px 14px; font: inherit; font-size: 16px; font-weight: 400;
  color: var(--ink); background: var(--bg);
  border: 1px solid var(--line); border-radius: 8px;
  transition: border-color .2s ease, box-shadow .2s ease;
}
.form-field input:focus, .form-field select:focus{
  outline: none; border-color: var(--navy); box-shadow: 0 0 0 3px rgba(14,44,88,.12);
}
.form-hint{ font-size: 13.5px; color: var(--ink-soft); margin-bottom: 20px; }
#joinFormError{ color: #b3261e; }
.form-submit{ width: 100%; text-align: center; border: none; cursor: pointer; }
.form-submit:disabled{ opacity: .6; cursor: default; }

.form-success p{ margin-bottom: 20px; }
.form-success .btn{ width: 100%; text-align: center; cursor: pointer; background: none; }

@media (max-width: 480px){
  .modal{ padding: 28px 22px; border-radius: 12px; }
  .modal-body h3{ font-size: 20px; }
}
