/* ============================================================
   KAS.CSS — Камінь і Сталь custom utilities
   All custom classes extracted from HTML inline <style> blocks
   + light theme + mobile menu state from src/style.css
============================================================ */

/* ── Reset & base ── */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: auto; }
html.lenis, html.lenis body { height: auto; }
.lenis.lenis-smooth { scroll-behavior: auto !important; }
.lenis.lenis-smooth [data-lenis-prevent] { overscroll-behavior: contain; }
.lenis.lenis-stopped { overflow: hidden; }
body { background-color: #07080F; color: #F0F0F8; font-family: 'Inter', sans-serif; overflow-x: hidden; -webkit-font-smoothing: antialiased; }

:focus-visible { outline: 2px solid #D08B2E; outline-offset: 3px; border-radius: 2px; }

/* ── Gradient utilities ── */
.g-text {
  background: linear-gradient(135deg, #D08B2E 0%, #A05B18 50%, #F2C240 100%);
  -webkit-background-clip: text; -webkit-text-fill-color: transparent; background-clip: text;
}
.g-bg { background: linear-gradient(135deg, #D08B2E 0%, #A05B18 50%, #F2C240 100%); }

.g-border { position: relative; border: 1px solid rgba(255,255,255,0.07); transition: border-color 0.3s; }
.g-border:hover { border-color: rgba(160,91,24,0.4); }

/* ── Buttons ── */
.btn-p {
  display: inline-flex; align-items: center; gap: 8px;
  padding: 13px 26px;
  background: linear-gradient(135deg, #D08B2E 0%, #A05B18 60%, #F2C240 100%);
  color: #fff; font-family: 'Space Grotesk', sans-serif; font-weight: 600;
  font-size: 14px; letter-spacing: 0.03em;
  border-radius: 2px; text-decoration: none;
  transition: opacity 0.2s, transform 0.2s;
  position: relative; overflow: hidden; cursor: pointer;
}
.btn-p::after {
  content: '';
  position: absolute; top: 0; left: -100%; width: 65%; height: 100%;
  background: linear-gradient(105deg, transparent 30%, rgba(255,230,160,.32) 50%, transparent 70%);
  transform: skewX(-18deg);
  transition: left 0.5s ease;
  pointer-events: none;
}
.btn-p:hover { opacity: .95; transform: translateY(-1px); }
.btn-p:hover::after { left: 145%; }

.btn-o {
  display: inline-flex; align-items: center; gap: 8px;
  padding: 12px 26px;
  border: 1px solid rgba(255,255,255,0.18); color: #F0F0F8;
  font-family: 'Space Grotesk', sans-serif; font-weight: 500;
  font-size: 14px; letter-spacing: 0.03em;
  border-radius: 2px; text-decoration: none;
  transition: border-color 0.2s, background 0.2s, transform 0.2s; cursor: pointer;
}
.btn-o:hover { border-color: #A05B18; background: rgba(160,91,24,0.12); transform: translateY(-1px); }

/* ── Section tag ── */
.s-tag {
  display: inline-block; font-family: 'Space Grotesk', sans-serif;
  font-size: 11px; font-weight: 600; letter-spacing: 0.16em;
  text-transform: uppercase; color: #D08B2E;
  background: rgba(208,139,46,0.1); border: 1px solid rgba(208,139,46,0.25);
  border-radius: 999px; padding: 0.25rem 0.9rem;
}

/* ── Nav link ── */
.nav-l {
  font-family: 'Space Grotesk', sans-serif; font-size: 14px;
  font-weight: 500; color: #8B8BA8; text-decoration: none;
  transition: color 0.2s; position: relative; letter-spacing: 0.06em;
}
.nav-l:hover, .nav-l[aria-current] { color: #F0F0F8; }
.nav-l::after {
  content: ''; position: absolute; bottom: -2px; left: 0;
  width: 0; height: 1px;
  background: linear-gradient(90deg, #D08B2E, #F2C240);
  transition: width 0.3s;
}
.nav-l:hover::after { width: 100%; }

/* ── Hero kinetic ── */
.h-line { overflow: hidden; display: block; }
.h-inner { display: block; }

/* ── Reveal base ── */
.rv { opacity: 0; transform: translateY(52px); }

/* ── Project card ── */
.p-card { overflow: hidden; display: block; border-radius: 2px; text-decoration: none; }
.p-card-img { transition: transform 0.7s cubic-bezier(.25,.46,.45,.94); width:100%; height:100%; object-fit:cover; }
.p-card:hover .p-card-img { transform: scale(1.05); }

/* ── Counter ── */
.c-num {
  font-family: 'Space Grotesk', sans-serif;
  font-size: clamp(2.8rem, 6vw, 5rem);
  font-weight: 700; line-height: 1;
}

/* ── Orb glow ── */
.orb { position: absolute; border-radius: 50%; filter: blur(90px); pointer-events: none; z-index: 0; }

/* ── Swiper overrides ── */
.swiper-pagination-bullet { background: #8B8BA8; opacity: 1; width: 6px; height: 6px; }
.swiper-pagination-bullet-active { background: #D08B2E; width: 24px; border-radius: 4px; transition: width 0.3s; }

/* ── Grid bg ── */
.grid-bg {
  background-image:
    linear-gradient(rgba(255,255,255,0.02) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255,255,255,0.02) 1px, transparent 1px);
  background-size: 64px 64px;
}

/* ── Scrollbar ── */
::-webkit-scrollbar { width: 6px; }
::-webkit-scrollbar-track { background: #07080F; }
::-webkit-scrollbar-thumb { background: #1E2235; border-radius: 3px; }
::-webkit-scrollbar-thumb:hover { background: #D08B2E; }

/* ── Event card ── */
.event-card { background:#0D0F1C; border:1px solid rgba(255,255,255,.06); border-radius:1rem; overflow:hidden; transition:border-color .3s,transform .3s; }
.event-card:hover { border-color:rgba(208,139,46,.4); transform:translateY(-4px); }

/* ── Filter button ── */
.f-btn { font-family:'Space Grotesk',sans-serif; font-size:.8rem; font-weight:600; letter-spacing:.08em; text-transform:uppercase; padding:.45rem 1.1rem; border-radius:999px; border:1px solid rgba(255,255,255,.1); color:#8B8BA8; transition:all .25s; cursor:pointer; background:transparent; }
.f-btn:hover { border-color:rgba(208,139,46,.5); color:#F0F0F8; }
.f-btn.active { background:linear-gradient(135deg,#D08B2E,#A05B18); border-color:transparent; color:#fff; }

/* ── Month / day labels ── */
.month-label { font-family:'Space Grotesk',sans-serif; font-size:.65rem; font-weight:700; letter-spacing:.15em; text-transform:uppercase; color:#8B8BA8; }
.day-num { font-family:'Space Grotesk',sans-serif; font-size:2rem; font-weight:700; line-height:1; }

/* ── Form fields ── */
.field-label { display:block; font-family:'Space Grotesk',sans-serif; font-size:.75rem; font-weight:600; letter-spacing:.1em; text-transform:uppercase; color:#8B8BA8; margin-bottom:.5rem; }
.field-input { width:100%; background:#0D0F1C; border:1px solid rgba(255,255,255,.1); border-radius:.5rem; padding:.875rem 1rem; font-family:'Inter',sans-serif; font-size:.9rem; color:#F0F0F8; transition:border-color .2s,box-shadow .2s; outline:none; line-height:1.5; -webkit-appearance:none; appearance:none; }
.field-input::placeholder { color:#8B8BA8; }
.field-input:focus { border-color:rgba(208,139,46,.6); box-shadow:0 0 0 3px rgba(208,139,46,.15); }
select.field-input { background-image:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' fill='none' stroke='%238B8BA8' stroke-width='2' viewBox='0 0 24 24'%3E%3Cpath stroke-linecap='round' stroke-linejoin='round' d='M19 9l-7 7-7-7'/%3E%3C/svg%3E"); background-repeat:no-repeat; background-position:right 1rem center; padding-right:2.75rem; cursor:pointer; }
.form-row { margin-bottom: 2.25rem; }

/* ── Contact icon chip ── */
.contact-item { display:flex; align-items:flex-start; gap:1rem; padding:1.25rem 0; border-bottom:1px solid rgba(255,255,255,.06); }
.contact-item:last-child { border-bottom:none; }
.contact-icon { width:2.5rem; height:2.5rem; border-radius:.6rem; display:flex; align-items:center; justify-content:center; background:rgba(208,139,46,.1); border:1px solid rgba(208,139,46,.2); flex-shrink:0; }

/* ── Modal ── */
.modal-overlay { position:fixed; inset:0; z-index:100; display:flex; align-items:center; justify-content:center; padding:1rem; }
.modal-backdrop { position:absolute; inset:0; background:rgba(7,8,15,.85); backdrop-filter:blur(8px); }
.modal-panel { position:relative; z-index:10; background:#0D0F1C; border:1px solid rgba(255,255,255,.08); border-radius:1.25rem; width:100%; max-width:540px; max-height:90vh; overflow-y:auto; padding:2.5rem; box-shadow:0 24px 80px rgba(0,0,0,.6); }

/* ── Event detail info card ── */
.info-card { background:#0D0F1C; border:1px solid rgba(255,255,255,.08); border-radius:1rem; padding:1.75rem; position:sticky; top:100px; }
.info-row { display:flex; align-items:flex-start; gap:.75rem; padding:.9rem 0; border-bottom:1px solid rgba(255,255,255,.06); }
.info-row:last-child { border-bottom:none; }
.info-icon { width:1rem; height:1rem; flex-shrink:0; margin-top:.1rem; color:#D08B2E; }

/* ── Blog / article prose ── */
.prose p { margin-bottom:1.5rem; line-height:1.85; color:#C8C8D8; font-size:1.0625rem; }
.prose h2 { font-family:'Space Grotesk',sans-serif; font-size:1.5rem; font-weight:700; margin:2.8rem 0 1.1rem; color:#F0F0F8; }
.prose h3 { font-family:'Space Grotesk',sans-serif; font-size:1.15rem; font-weight:600; margin:2rem 0 .75rem; color:#F0F0F8; }
.prose blockquote { border-left:2px solid #A05B18; padding:1rem 1.5rem; margin:2rem 0; color:#8B8BA8; font-style:italic; font-size:1.1rem; line-height:1.7; background:rgba(160,91,24,.05); border-radius:0 2px 2px 0; }
.prose ul { padding-left:0; margin-bottom:1.5rem; list-style:none; }
.prose ul li { padding-left:1.5rem; position:relative; margin-bottom:.6rem; color:#C8C8D8; line-height:1.7; }
.prose ul li::before { content:'\2192'; position:absolute; left:0; color:#A05B18; font-family:'Space Grotesk',sans-serif; }

/* ── 404 page ── */
.num-404 {
  font-family: 'Space Grotesk', sans-serif;
  font-weight: 700;
  font-size: clamp(8rem, 25vw, 20rem);
  line-height: 1;
  letter-spacing: -.04em;
  background: linear-gradient(135deg, rgba(208,139,46,.15) 0%, rgba(160,91,24,.15) 50%, rgba(242,194,64,.08) 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  user-select: none;
  pointer-events: none;
}

/* ── Keyframes ── */
@keyframes fadeUp { 0%{opacity:0;transform:translateY(24px)} 100%{opacity:1;transform:translateY(0)} }
.fu1 { animation: fadeUp .7s ease-out .1s both; }
.fu2 { animation: fadeUp .7s ease-out .25s both; }
.fu3 { animation: fadeUp .7s ease-out .4s both; }
.fu4 { animation: fadeUp .7s ease-out .55s both; }
.fu5 { animation: fadeUp .7s ease-out .7s both; }

@keyframes drift1 { 0%,100%{transform:translate(0,0)} 50%{transform:translate(30px,-40px)} }
@keyframes drift2 { 0%,100%{transform:translate(0,0)} 50%{transform:translate(-25px,35px)} }
.drift-1 { animation: drift1 12s ease-in-out infinite; }
.drift-2 { animation: drift2 15s ease-in-out infinite; }

@keyframes checkIn { 0%{stroke-dashoffset:40;opacity:0} 100%{stroke-dashoffset:0;opacity:1} }
@keyframes circleIn { 0%{transform:scale(.5);opacity:0} 60%{transform:scale(1.08)} 100%{transform:scale(1);opacity:1} }
.check-circle { animation: circleIn .6s cubic-bezier(.34,1.56,.64,1) .2s both; }
.check-svg { stroke-dasharray:40; stroke-dashoffset:40; animation: checkIn .5s ease-out .7s both; }
.fade-up-1 { animation: fadeUp .7s ease-out .9s both; }
.fade-up-2 { animation: fadeUp .7s ease-out 1.05s both; }
.fade-up-3 { animation: fadeUp .7s ease-out 1.2s both; }
.fade-up-4 { animation: fadeUp .7s ease-out 1.35s both; }

/* ── Reduced motion ── */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: 0.01ms !important; transition-duration: 0.01ms !important; }
  .rv { opacity: 1 !important; transform: none !important; }
  .h-inner { transform: none !important; }
  .fu1, .fu2, .fu3, .fu4, .fu5 { animation: none; opacity: 1; }
  .drift-1, .drift-2 { animation: none; }
  .check-circle, .check-svg, .fade-up-1, .fade-up-2, .fade-up-3, .fade-up-4 { animation: none; opacity: 1; }
}

/* ============================================================
   LIGHT THEME  —  html.light
============================================================ */
html.light body { background-color: #F5F2EC !important; color: #1C1A16 !important; }
html.light .bg-space    { background-color: #F5F2EC !important; }
html.light .bg-surface  { background-color: #EDE9E1 !important; }
html.light .bg-surface2 { background-color: #E2DDD5 !important; }
html.light .bg-steel    { background-color: #D0CCC5 !important; }
html.light .text-primary { color: #1C1A16 !important; }
html.light .text-muted   { color: #6B6660 !important; }
html.light .text-white   { color: #1C1A16 !important; }
html.light [class*="bg-[#07080F]"]  { background-color: #F5F2EC !important; }
html.light [class*="bg-[#0D0F1C]"]  { background-color: #EDE9E1 !important; }
html.light [class*="bg-[#13162A]"]  { background-color: #E2DDD5 !important; }
html.light [class*="bg-[#1E2235]"]  { background-color: #D0CCC5 !important; }
html.light [class*="bg-[#191d33]"]  { background-color: #DDD8D0 !important; }
html.light [class*="border-white/"] { border-color: rgba(0,0,0,0.09) !important; }
html.light [class*="border-white"]  { border-color: rgba(0,0,0,0.09) !important; }
html.light .bg-white\/8  { background-color: rgba(0,0,0,0.08) !important; }
html.light [class*="from-[#07080F]"] { --tw-gradient-from: rgba(245,242,236,0.9) var(--tw-gradient-from-position) !important; }
html.light [class*="via-[#07080F]"]  { --tw-gradient-via:  rgba(245,242,236,0.6) var(--tw-gradient-via-position)  !important; }
html.light [class*="to-[#07080F]"]   { --tw-gradient-to:   #F5F2EC              var(--tw-gradient-to-position)   !important; }
html.light #site-header [class*="bg-[#07080F]/90"],
html.light #site-header [style*="bg-[#07080F]/90"] { background-color: rgba(245,242,236,0.94) !important; }
html.light .nav-l               { color: #6B6660 !important; }
html.light .nav-l:hover,
html.light .nav-l[aria-current] { color: #1C1A16 !important; }
html.light .btn-o { border-color: rgba(160,91,24,0.45) !important; color: #1C1A16 !important; }
html.light .btn-o:hover { background: rgba(160,91,24,0.09) !important; border-color: #A05B18 !important; }
html.light .s-tag { color: #A05B18 !important; }
html.light .g-border { border-color: rgba(160,91,24,0.18) !important; }
html.light .g-border:hover { border-color: rgba(160,91,24,0.38) !important; }
html.light .field-input { background: #EDE9E1 !important; border-color: rgba(0,0,0,0.12) !important; color: #1C1A16 !important; }
html.light .field-input::placeholder { color: #6B6660 !important; }
html.light .field-input:focus { border-color: rgba(160,91,24,0.65) !important; box-shadow: 0 0 0 3px rgba(160,91,24,0.12) !important; }
html.light .contact-icon { background: rgba(160,91,24,0.08) !important; border-color: rgba(160,91,24,0.18) !important; }
html.light .bg-space.rounded-xl { background-color: #F5F2EC !important; }
html.light #site-header .bg-white   { background-color: #1C1A16 !important; }
html.light #site-header .bg-primary { background-color: #1C1A16 !important; }
html.light #mob-menu, html.light #mobile-menu { background-color: #F5F2EC !important; }
html.light #mob-menu a:hover { color: #A05B18 !important; }
html.light #mobile-menu a:hover { color: #A05B18 !important; }
html.light .grid-bg {
  background-image:
    linear-gradient(rgba(0,0,0,0.04) 1px, transparent 1px),
    linear-gradient(90deg, rgba(0,0,0,0.04) 1px, transparent 1px) !important;
}
html.light #site-footer { background-color: #EDE9E1 !important; }
html.light .swiper-pagination-bullet        { background: #9E9890 !important; }
html.light .swiper-pagination-bullet-active { background: #A05B18 !important; }
html.light ::-webkit-scrollbar-track { background: #F5F2EC !important; }
html.light ::-webkit-scrollbar-thumb { background: #D0CCC5 !important; }
html.light ::-webkit-scrollbar-thumb:hover { background: #A05B18 !important; }
html.light :focus-visible { outline-color: #A05B18 !important; }
html.light .event-card { background: #EDE9E1 !important; border-color: rgba(0,0,0,0.08) !important; color: #1C1A16 !important; }
html.light .event-card:hover { background: #E4DFD7 !important; border-color: rgba(160,91,24,0.4) !important; }
html.light .event-card [class*="border-white/"] { border-color: rgba(0,0,0,0.09) !important; }
html.light .event-card [class*="border-white"]  { border-color: rgba(0,0,0,0.09) !important; }
html.light .f-btn { border-color: rgba(0,0,0,0.15) !important; color: #6B6660 !important; }
html.light .f-btn:hover { border-color: rgba(160,91,24,0.55) !important; color: #1C1A16 !important; }
html.light .f-btn.active { color: #fff !important; border-color: transparent !important; }
html.light .month-label { color: #6B6660 !important; }
html.light .event-card .text-primary { color: #1C1A16 !important; }
html.light .p-card [class*="from-[#07080F]"] { --tw-gradient-from: rgba(5,3,1,0.88) var(--tw-gradient-from-position) !important; }
html.light .p-card [class*="via-[#07080F]"]  { --tw-gradient-via:  rgba(5,3,1,0.30) var(--tw-gradient-via-position) !important; }
html.light .p-card .text-white { color: #F2EDE8 !important; }
html.light .p-card .text-muted  { color: rgba(240,232,218,0.72) !important; }

/* ============================================================
   MOBILE MENU OPEN STATE  —  body.menu-open
============================================================ */
body.menu-open { overflow: hidden !important; touch-action: none; }

#site-header button[aria-expanded="true"] span:nth-child(1) {
  transform: translateY(7px) rotate(45deg) !important;
  opacity: 1 !important;
}
#site-header button[aria-expanded="true"] span:nth-child(2) {
  opacity: 0 !important;
  transform: scaleX(0) !important;
}
#site-header button[aria-expanded="true"] span:nth-child(3) {
  transform: translateY(-7px) rotate(-45deg) !important;
  opacity: 1 !important;
}

body.menu-open #site-header > div:first-child {
  background-color: #07080F !important;
  backdrop-filter: blur(20px) !important;
  border-bottom: 1px solid rgba(255,255,255,0.06) !important;
}
html.light body.menu-open #site-header > div:first-child {
  background-color: #F5F2EC !important;
  border-bottom: 1px solid rgba(0,0,0,0.08) !important;
  backdrop-filter: none !important;
}

body.menu-open main,
body.menu-open #site-footer {
  filter: blur(6px) brightness(0.75) !important;
  pointer-events: none !important;
  user-select: none !important;
  transition: filter 0.25s ease;
}
