/* ====== Fonts (local TTF) ====== */
@font-face {
  font-family: "Inter";
  src: url("../fonts/Inter-Regular.ttf") format("truetype");
  font-weight: 400;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: "Playfair";
  src: url("../fonts/PlayfairDisplay-Regular.ttf") format("truetype");
  font-weight: 400;
  font-style: normal;
  font-display: swap;
}

/* ====== CSS Reset (minimal) ====== */
* { box-sizing: border-box; }
html, body { margin: 0; padding: 0; }
img { display: block; height: auto; max-width: 100%; }
ul,ol { margin: 0; padding: 0; list-style: none; }
a { color: inherit; text-decoration: none; }
button { font: inherit; border: 0; background: none; cursor: pointer; }

/* ====== Theme ====== */
:root{
  --bg: #0f1012;               /* deep charcoal */
  --bg-soft: #131417;
  --ink: #f2f3f5;              /* near-white text */
  --muted: #c9ccd2;
  --brand: #d6a97b;            /* warm amber accent */
  --brand-2: #9bb6a7;          /* sage accent */
  --card: #1a1c21;
  --line: #262930;
  --shadow: 0 10px 30px rgba(0,0,0,.25);
}

/* Pleasant, calm background with subtle texture */
body{
  font-family: Inter, system-ui, -apple-system, Segoe UI, Roboto, sans-serif;
  color: var(--ink);
  background:
    radial-gradient(1200px 800px at 10% -10%, rgba(214,169,123,.08), transparent 60%),
    radial-gradient(800px 600px at 110% 20%, rgba(155,182,167,.07), transparent 60%),
    radial-gradient(600px 500px at 50% 120%, rgba(255,255,255,.03), transparent 60%),
    linear-gradient(180deg, var(--bg), var(--bg-soft));
  min-height: 100dvh;
}

/* ====== Utilities ====== */
.visually-title{
  position: absolute;
  width: 1px; height: 1px; clip: rect(0 0 0 0);
  clip-path: inset(50%); overflow: hidden; white-space: nowrap;
}

/* Cap images to 350px width everywhere per requirement */
.cap-img{ max-width: 350px; border-radius: 16px; }

/* Reveal animation base */
.reveal{ opacity: 0; transform: translateY(18px) scale(.98); }
.reveal.is-in{ opacity: 1; transform: none; transition: transform .7s cubic-bezier(.2,.8,.2,1), opacity .6s ease; }

/* ====== Header (fixed) ====== */
.site-head{
  position: fixed; inset: 0 0 auto 0;
  height: 64px; z-index: 40;
  background: color-mix(in srgb, var(--bg-soft) 82%, transparent);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--line);
}
.site-head.shrink{ height: 56px; transition: height .25s ease; }

.head-wrap{
  max-width: 1200px; margin: 0 auto; height: 100%;
  padding: 0 16px; display: flex; align-items: center; justify-content: space-between;
}

.brand{ display:flex; align-items:center; gap:10px; font-weight:600; letter-spacing:.2px; }
.brand-mark{
  display:grid; place-items:center; inline-size:32px; block-size:32px; border-radius:9px;
  background: linear-gradient(120deg, var(--brand), var(--brand-2));
  color:#111; font-weight:700;
  box-shadow: var(--shadow);
}
.brand-text{ font-family: Playfair, serif; font-size: 18px; }

/* Nav */
.nav .menu{
  display:flex; gap: 20px; align-items:center;
  background: transparent;
}
.nav a{
  padding: 8px 10px; border-radius: 10px; color: var(--muted);
  transition: transform .2s ease, background .2s ease, color .2s ease;
}
.nav a:hover{ color: var(--ink); background: #20232a; transform: translateY(-1px); }

/* Burger for small screens */
.burger{ display:none; width:44px; height:44px; position:relative; }
.burger span{
  position:absolute; left:10px; right:10px; height:2px; background: var(--ink);
  transform-origin: center; transition: transform .2s ease, opacity .2s ease; border-radius:2px;
}
.burger span:nth-child(1){ top:14px; }
.burger span:nth-child(2){ top:21px; }
.burger span:nth-child(3){ top:28px; }
.burger[aria-expanded="true"] span:nth-child(1){ transform: translateY(7px) rotate(45deg); }
.burger[aria-expanded="true"] span:nth-child(2){ opacity: 0; }
.burger[aria-expanded="true"] span:nth-child(3){ transform: translateY(-7px) rotate(-45deg); }

/* Mobile menu panel */
@media (max-width: 920px){
  .burger{ display:block; }
  .nav .menu{
    position: fixed; top:64px; right:0; bottom:0; width: min(88vw, 360px);
    background: #14161a; border-left: 1px solid var(--line); box-shadow: var(--shadow);
    padding: 20px; flex-direction: column; gap: 14px; transform: translateX(100%); transition: transform .25s ease;
  }
  .nav .menu.open{ transform: translateX(0); }
}

/* ====== Footer ====== */
.site-foot{
  margin-top: 80px; border-top: 1px solid var(--line); background: #0f1115;
}
.foot-wrap{
  max-width: 1200px; margin: 0 auto; padding: 28px 16px;
  display: grid; grid-template-columns: 1.1fr .9fr .9fr; gap: 20px;
}
.foot-brand p{ color: var(--muted); margin-top: 6px; }
.foot-cols{ display: contents; }
.foot-list a{ color: var(--muted); display:block; padding:6px 0; }
.foot-list a:hover{ color: var(--ink); }
.foot-addr{ display:flex; flex-direction:column; gap:6px; color: var(--muted); }
.backtotop{
  position: fixed; right: 16px; bottom: 16px; width: 44px; height: 44px;
  border-radius: 12px; background: linear-gradient(120deg, var(--brand), var(--brand-2));
  color:#111; display:grid; place-items:center; box-shadow: var(--shadow);
  opacity: 0; pointer-events: none; transform: translateY(10px); transition: opacity .2s ease, transform .2s ease;
}
.backtotop.show{ opacity: 1; pointer-events: auto; transform: none; }

/* ====== Global Responsive ====== */
@media (max-width: 1200px){
  .head-wrap{ padding: 0 12px; }
  .foot-wrap{ grid-template-columns: 1fr 1fr; }
}
@media (max-width: 860px){
  .foot-wrap{ grid-template-columns: 1fr; }
}
@media (max-width: 560px){
  .brand-text{ font-size: 16px; }
}
/* ===== New footer (TuneForge-format) ===== */
.footer{
  border-top: 1px solid var(--line);
  background: #0f1115;
  color: var(--ink);
}
.footer .container{
  max-width: 1200px;
  margin: 0 auto;
  padding: 28px 16px;
}
.footer-container{
  display: grid;
  grid-template-columns: 1.2fr .8fr;
  gap: 20px;
}
.footer-column a{
  color: var(--muted);
  display: inline-block;
  padding: 4px 0;
  transition: color .2s ease, transform .2s ease;
}
.footer-column a:hover{ color: var(--ink); transform: translateY(-1px); }

.footer-brand{
  font-family: Playfair, serif;
  font-size: 18px;
  margin: 0 0 6px;
}

.footer-links{
  display: grid;
  align-content: start;
  gap: 6px;
}

@media (max-width: 860px){
  .footer-container{ grid-template-columns: 1fr; }
}

/* scroll-in animation */
.animate-on-scroll{ opacity: 0; transform: translateY(10px); }
.animate-on-scroll.is-in{ opacity: 1; transform: none; transition: opacity .35s ease, transform .35s ease; }
/* === Burger menu contrast fix === */
.nav .scrim{
  position: fixed; inset: 0;
  background: rgba(0,0,0,.55);   /* затемняем фон страницы */
  opacity: 0; pointer-events: none;
  transition: opacity .25s ease;
}
.nav[aria-expanded="true"] .scrim{ opacity: 1; pointer-events: auto; }

/* выпадающее меню */
.nav .menu{
  position: fixed; top: 60px;    /* ниже фикс-хедера */
  left: 0; right: 0;
  max-width: 720px; margin: 0 auto;
  background: rgba(18, 20, 25, .96);    /* плотный, почти непрозрачный */
  backdrop-filter: saturate(140%) blur(8px);
  border: 1px solid rgba(255,255,255,.08);
  box-shadow: 0 18px 48px rgba(0,0,0,.45), 0 0 0 1px rgba(255,255,255,.03) inset;
  border-radius: 14px;
  transform: translateY(-8px); opacity: 0; pointer-events: none;
  transition: transform .22s ease, opacity .22s ease;
  padding: 8px;
  z-index: 60;
}
.nav[aria-expanded="true"] .menu{ transform: none; opacity: 1; pointer-events: auto; }

.nav .menu li a{
  display: block; padding: 12px 14px; border-radius: 10px;
  color: #e7eaee; text-shadow: 0 1px 0 rgba(0,0,0,.35);
  transition: background .18s ease, transform .18s ease;
}
.nav .menu li a:hover{
  background: rgba(255,255,255,.06);
  transform: translateY(-1px);
}

/* тонкий верхний разделитель у меню, чтобы не сливалось с хедером */
.nav .menu::before{
  content:""; position:absolute; left:0; right:0; top:-1px; height:10px;
  background: linear-gradient(to bottom, rgba(0,0,0,.55), rgba(0,0,0,0));
  border-top-left-radius: 14px; border-top-right-radius: 14px;
}

/* мобильный режим — меню как выезжающий ящик */
@media (max-width: 640px){
  .nav .menu{
    left: 8px; right: 8px; max-width: none;
    background: rgba(14,16,20,.98);
  }
}

/* блокируем прокрутку подложки при открытом меню */
body.nav-open{ overflow: hidden; }
/* === Desktop nav always visible; mobile uses burger === */
@media (min-width: 880px){
  .nav .burger{ display: none; }           /* скрываем бургер */
  .nav .scrim{ display: none !important; } /* гасим подложку */

  .nav .menu{
    position: static;       /* снимаем fixed */
    left: auto; right: auto; top: auto;
    max-height: none; max-width: none; margin: 0; padding: 0;

    display: flex; gap: 18px; align-items: center; /* горизонтальный список */
    background: transparent; border: 0; box-shadow: none;
    opacity: 1 !important; transform: none !important; pointer-events: auto !important;
  }
  .nav .menu li{ border: 0; }
  .nav .menu li a{
    padding: 8px 10px; border-radius: 8px;
    color: #e9edf2; background: transparent;
    text-shadow: none;
  }
  .nav .menu li a:hover{ background: rgba(255,255,255,.08); transform: none; }
}

/* фикс-хедер: гарантируем поверх контента */
.site-head{ z-index: 1100; }
