:root {
  --bg: #0f1113;
  --bg-alt: #16191c;
  --card: #1c2024;
  --line: #2a2f35;
  --text: #eef0f2;
  --muted: #9aa3ab;
  --accent: #f2a541;
  --accent-ink: #1a1206;
  --radius: 14px;
  --wrap: 1120px;
  --font: system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font: 17px/1.65 var(--font);
}
img { max-width: 100%; display: block; }
a { color: var(--accent); text-underline-offset: 3px; }
h1, h2, h3 { line-height: 1.2; margin: 0 0 .6em; letter-spacing: -.01em; }
h1 { font-size: clamp(2rem, 5vw, 3.4rem); }
h2 { font-size: clamp(1.5rem, 3vw, 2.1rem); }
h3 { font-size: 1.2rem; }
p { margin: 0 0 1em; }
.muted { color: var(--muted); }

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

/* Päis */
.site-header {
  position: sticky; top: 0; z-index: 10;
  background: rgba(15, 17, 19, .88);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--line);
}
.header-inner { display: flex; align-items: center; justify-content: space-between; height: 64px; }
.logo { display: flex; align-items: center; gap: 10px; color: var(--text); text-decoration: none; font-weight: 700; font-size: 1.15rem; }
.logo-dot { width: 12px; height: 12px; border-radius: 50%; background: #e5484d; box-shadow: 0 0 0 4px rgba(229, 72, 77, .25); }
.nav { display: flex; gap: 4px; }
.nav a { color: var(--muted); text-decoration: none; padding: 8px 14px; border-radius: 999px; font-weight: 500; }
.nav a:hover { color: var(--text); }
.nav a[aria-current="page"] { color: var(--text); background: var(--card); }
.menu-toggle { display: none; background: none; border: 0; padding: 10px; cursor: pointer; }
.menu-toggle span { display: block; width: 22px; height: 2px; background: var(--text); margin: 5px 0; transition: .2s; }

@media (max-width: 720px) {
  .menu-toggle { display: block; }
  .nav {
    display: none; position: absolute; left: 0; right: 0; top: 64px;
    flex-direction: column; padding: 12px 20px 20px; gap: 2px;
    background: var(--bg); border-bottom: 1px solid var(--line);
  }
  .nav.open { display: flex; }
  .nav a { padding: 12px 14px; font-size: 1.05rem; }
}

/* Nupud */
.btn {
  display: inline-block; padding: 12px 22px; border-radius: 999px;
  background: var(--accent); color: var(--accent-ink);
  font-weight: 600; text-decoration: none; border: 2px solid var(--accent);
}
.btn:hover { filter: brightness(1.08); }
.btn-ghost { background: transparent; color: var(--text); border-color: var(--line); }
.btn-ghost:hover { border-color: var(--muted); }
.cta-actions { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 1.5em; }

/* Esilehe suur pilt */
.hero { position: relative; min-height: min(80vh, 720px); display: flex; align-items: flex-end; overflow: hidden; }
.hero-img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.hero::after {
  content: ""; position: absolute; inset: 0;
  background: linear-gradient(to top, var(--bg) 5%, rgba(15, 17, 19, .55) 50%, rgba(15, 17, 19, .15));
}
.hero-noimg { min-height: auto; background: radial-gradient(circle at 80% 0%, #2b2215, var(--bg) 60%); }
.hero-noimg::after { display: none; }
.hero-text { position: relative; z-index: 1; padding-top: 120px; padding-bottom: 64px; width: 100%; }
.hero-text h1 { max-width: 16em; }
.lead { font-size: 1.15rem; color: #cfd4d9; max-width: 40em; }

/* Lõigud */
.section { padding: 72px 0; }
.section-alt { background: var(--bg-alt); }
.section-intro { color: var(--muted); max-width: 40em; margin-bottom: 2em; }
.page-head { padding: 72px 0 24px; }
.crumbs { margin-bottom: .5em; }
.crumbs a { color: var(--muted); text-decoration: none; }
.crumbs a::after { content: " /"; }
.prose { max-width: 44em; }
.more { margin-top: 1.5em; }
.more a { font-weight: 600; text-decoration: none; }

/* Teenused */
.services { display: grid; grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); gap: 16px; }
.service {
  display: block; padding: 24px; border-radius: var(--radius);
  background: var(--card); border: 1px solid var(--line);
  color: var(--text); text-decoration: none; transition: border-color .2s, transform .2s;
}
.service:hover { border-color: var(--accent); transform: translateY(-2px); }
.service h2, .service h3 { font-size: 1.2rem; }
.service p { color: var(--muted); margin: 0; }
.service .more { display: block; color: var(--accent); font-weight: 600; margin-top: 1em; }

/* Tehtud tööd */
.projects { display: grid; grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); gap: 24px; }
.project { background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; }
.player {
  position: relative; display: block; width: 100%; aspect-ratio: 16 / 9;
  padding: 0; border: 0; margin: 0; background: #000 linear-gradient(135deg, #2b2215, #111); cursor: default;
}
button.player { cursor: pointer; }
.player img { width: 100%; height: 100%; object-fit: cover; }
.play {
  position: absolute; left: 50%; top: 50%; width: 68px; height: 68px; margin: -34px 0 0 -34px;
  border-radius: 50%; background: rgba(15, 17, 19, .75); border: 2px solid rgba(255, 255, 255, .85);
  transition: transform .2s, background .2s;
}
.play::after {
  content: ""; position: absolute; left: 26px; top: 20px;
  border-style: solid; border-width: 13px 0 13px 21px; border-color: transparent transparent transparent #fff;
}
.project[data-embed] { cursor: pointer; transition: border-color .2s; }
.project[data-embed]:hover { border-color: var(--accent); }
.project[data-embed]:hover .play { transform: scale(1.08); background: var(--accent); }

/* Video hüpikaken */
.modal-open { overflow: hidden; }
.video-modal {
  width: min(1200px, 94vw); max-width: none; max-height: none;
  padding: 0; border: 0; background: transparent; color: var(--text); overflow: visible;
}
.video-modal::backdrop { background: rgba(0, 0, 0, .88); }
.video-frame { position: relative; aspect-ratio: 16 / 9; width: min(100%, calc(80vh * 16 / 9)); margin: 0 auto; background: #000; border-radius: 10px; overflow: hidden; }
.video-frame iframe { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; }
.video-title { width: min(100%, calc(80vh * 16 / 9)); margin: 12px auto 0; font-weight: 600; }
.video-close {
  position: absolute; right: 0; top: -48px; width: 40px; height: 40px;
  border: 0; border-radius: 50%; background: rgba(255, 255, 255, .12); color: #fff;
  font-size: 28px; line-height: 1; cursor: pointer;
}
.video-close:hover { background: var(--accent); color: var(--accent-ink); }

.project-body { padding: 18px 20px 6px; }
.project-body h3 { margin-bottom: .2em; }
.project-body .meta { color: var(--muted); font-size: .9rem; }
.project-body p { color: #cfd4d9; font-size: .97rem; }

/* Galerii */
.gallery { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 12px; }
.gallery-item { display: block; padding: 0; border: 0; background: var(--card); aspect-ratio: 4 / 3; overflow: hidden; border-radius: 10px; cursor: zoom-in; }
.gallery-item img { width: 100%; height: 100%; object-fit: cover; transition: transform .3s; }
.gallery-item:hover img { transform: scale(1.04); }
.video-modal.is-image .video-frame { aspect-ratio: auto; background: none; width: auto; max-width: 100%; display: flex; justify-content: center; }
.video-modal.is-image .video-frame img { max-width: 100%; max-height: 78vh; width: auto; height: auto; border-radius: 8px; }
.video-modal.is-image .video-title { width: auto; text-align: center; }
.modal-nav {
  display: none; position: fixed; top: 50%; transform: translateY(-50%);
  width: 52px; height: 52px; border: 0; border-radius: 50%;
  background: rgba(255, 255, 255, .12); color: #fff; font-size: 34px; line-height: 1; cursor: pointer;
}
.modal-nav:hover { background: var(--accent); color: var(--accent-ink); }
.modal-prev { left: 16px; }
.modal-next { right: 16px; }
.video-modal.has-nav .modal-nav { display: block; }
@media (max-width: 600px) {
  .modal-nav { top: auto; bottom: 16px; transform: none; }
}

/* Tehnika */
.gear-cat + .gear-cat { padding-top: 0; }
.gear { display: grid; grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); gap: 20px; }
.gear-item { background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; }
.gear-img { position: relative; aspect-ratio: 4 / 3; background: #fff; }
.gear-img img { width: 100%; height: 100%; object-fit: contain; padding: 12px; }
.gear-body { padding: 16px 18px 6px; }
.gear-body h3 { font-size: 1.1rem; margin-bottom: .4em; }
.gear-body p { color: var(--muted); font-size: .95rem; }
.gear-item.is-sold .gear-img img { opacity: .45; filter: grayscale(1); }
.gear-item.is-sold h3 { color: var(--muted); }
.sold-badge {
  position: absolute; top: 12px; left: 12px; padding: 4px 10px; border-radius: 999px;
  background: #e5484d; color: #fff; font-size: .8rem; font-weight: 700; letter-spacing: .03em; text-transform: uppercase;
}

/* Kontakt */
.cta { padding: 72px 0; border-top: 1px solid var(--line); text-align: center; }
.cta .cta-actions { justify-content: center; }
.cta-text { color: var(--muted); max-width: 36em; margin: 0 auto; }

/* Jalus */
.site-footer { border-top: 1px solid var(--line); padding: 32px 0 40px; font-size: .95rem; }
.footer-inner { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 16px; }
.footer-contact { display: flex; flex-wrap: wrap; gap: 20px; }
.footer-contact a { color: var(--text); text-decoration: none; }
.footer-contact a:hover { color: var(--accent); }
.footer-right { display: flex; flex-direction: column; align-items: flex-end; gap: 12px; }
.footer-yt { display: inline-flex; align-items: center; gap: 8px; color: var(--text); text-decoration: none; font-weight: 600; }
.footer-yt svg { color: #ff0033; }
.footer-yt:hover { color: var(--accent); }
@media (max-width: 600px) { .footer-right { align-items: flex-start; } }
