/* =========================================================
   Cobyx Garage — style.css
   Тъмна тема, mobile-first. Cobyx палитра.
   ========================================================= */

:root {
  --bg:            #0A0A0F;
  --bg-elev:       #111018;
  --bg-card:       #14121d;
  --midnight:      #2A0F3D;
  --accent:        #7A3FF2;
  --accent-2:      #FF2E9A;
  --text:          #ECEAF2;
  --text-dim:      #A9A4BC;
  --border:        rgba(122, 63, 242, 0.22);
  --border-soft:   rgba(255, 255, 255, 0.08);
  --gradient:      linear-gradient(135deg, #7A3FF2 0%, #FF2E9A 100%);
  --gradient-soft: linear-gradient(135deg, rgba(122,63,242,0.16), rgba(255,46,154,0.12));
  --shadow:        0 18px 50px -20px rgba(122, 63, 242, 0.45);
  --radius:        14px;
  --radius-sm:     10px;
  --maxw:          1160px;
  --font-head:     "Oswald", "Arial Narrow", "Segoe UI", system-ui, sans-serif;
  --font-body:     "Inter", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
}

/* ---------- Reset ---------- */
*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: var(--font-body);
  font-size: 17px;
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}
img { max-width: 100%; height: auto; display: block; }
[hidden] { display: none !important; }
a { color: var(--accent-2); text-decoration: none; }
a:hover { text-decoration: underline; }
h1, h2, h3, h4 {
  font-family: var(--font-head);
  font-weight: 600;
  line-height: 1.12;
  letter-spacing: 0.01em;
  margin: 0 0 .5em;
  text-transform: uppercase;
  overflow-wrap: break-word;
  word-wrap: break-word;
}
h1 { font-size: clamp(2rem, 6vw, 3.4rem); }
h2 { font-size: clamp(1.6rem, 4.4vw, 2.4rem); }
h3 { font-size: clamp(1.15rem, 3vw, 1.4rem); text-transform: none; letter-spacing: 0; }
p  { margin: 0 0 1rem; }
ul, ol { padding-left: 1.2rem; }
li { margin-bottom: .4rem; }

/* ---------- Utilities ---------- */
.container { width: 100%; max-width: var(--maxw); margin-inline: auto; padding-inline: 20px; }
.section { padding: 72px 0; }
.section--tight { padding: 56px 0; }
.eyebrow {
  font-family: var(--font-head);
  text-transform: uppercase;
  letter-spacing: .22em;
  font-size: .8rem;
  color: var(--accent-2);
  margin-bottom: .8rem;
}
.text-dim { color: var(--text-dim); }
.center { text-align: center; }
.stack > * + * { margin-top: 1rem; }
.gradient-text {
  background: var(--gradient);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}
.skip-link {
  position: absolute; left: -9999px; top: 0; z-index: 999;
  background: var(--accent); color: #fff; padding: 10px 16px; border-radius: 0 0 8px 0;
}
.skip-link:focus { left: 0; }

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: .5rem;
  min-height: 48px; padding: 12px 22px;
  font-family: var(--font-head);
  font-size: 1rem; letter-spacing: .06em; text-transform: uppercase;
  border-radius: 999px; border: 1px solid transparent;
  cursor: pointer; text-decoration: none; transition: transform .15s ease, box-shadow .2s ease, background .2s ease;
  white-space: nowrap;
}
.btn:hover { text-decoration: none; transform: translateY(-2px); }
.btn-primary { background: var(--gradient); color: #fff; box-shadow: var(--shadow); }
.btn-primary:hover { box-shadow: 0 22px 60px -18px rgba(255, 46, 154, 0.55); }
.btn-ghost { background: transparent; color: var(--text); border-color: var(--border); }
.btn-ghost:hover { border-color: var(--accent-2); background: rgba(255,255,255,0.03); }
.btn-block { width: 100%; }

/* ---------- Header ---------- */
.site-header {
  position: sticky; top: 0; z-index: 100;
  background: rgba(10, 10, 15, 0.82);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--border-soft);
}
.site-header .container {
  display: flex; align-items: center; justify-content: space-between;
  min-height: 68px; gap: 16px;
}
.brand { display: inline-flex; align-items: center; gap: 10px; }
.brand img { height: 30px; width: auto; }
.brand:hover { text-decoration: none; }
.nav-toggle {
  display: inline-flex; flex-direction: column; justify-content: center; gap: 5px;
  width: 48px; height: 48px; padding: 12px;
  background: transparent; border: 1px solid var(--border); border-radius: 10px; cursor: pointer;
}
.nav-toggle span { display: block; height: 2px; background: var(--text); border-radius: 2px; transition: transform .2s ease, opacity .2s ease; }
.nav-toggle[aria-expanded="true"] span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.nav-toggle[aria-expanded="true"] span:nth-child(2) { opacity: 0; }
.nav-toggle[aria-expanded="true"] span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

.main-nav {
  position: fixed; inset: 68px 0 auto 0;
  background: var(--bg-elev);
  border-bottom: 1px solid var(--border);
  padding: 12px 20px 22px;
  display: none;
}
.main-nav.open { display: block; }
.main-nav ul { list-style: none; margin: 0; padding: 0; }
.main-nav li { margin: 0; }
.main-nav a {
  display: block; padding: 14px 6px; color: var(--text); font-family: var(--font-head);
  text-transform: uppercase; letter-spacing: .08em; font-size: 1.05rem;
  border-bottom: 1px solid var(--border-soft);
}
.main-nav a:hover, .main-nav a[aria-current="page"] { color: var(--accent-2); text-decoration: none; }
.main-nav .btn { margin-top: 16px; }

/* ---------- Hero ---------- */
.hero { position: relative; overflow: hidden; border-bottom: 1px solid var(--border-soft); }
.hero canvas#hero-fx {
  position: absolute; inset: 0; width: 100%; height: 100%;
  z-index: 0; opacity: .9;
}
.hero::after {
  content: ""; position: absolute; inset: 0; z-index: 1;
  background: radial-gradient(120% 80% at 15% 0%, rgba(122,63,242,0.28), transparent 60%),
              radial-gradient(100% 90% at 100% 100%, rgba(255,46,154,0.20), transparent 55%);
  pointer-events: none;
}
.hero .container { position: relative; z-index: 2; padding-top: 72px; padding-bottom: 84px; }
.hero h1 { max-width: 16ch; }
.hero p.lead { font-size: 1.15rem; color: var(--text-dim); max-width: 46ch; }
.hero .btn-row { display: flex; flex-wrap: wrap; gap: 14px; margin-top: 28px; }

/* ---------- Generic page header ---------- */
.page-head { background: var(--gradient-soft); border-bottom: 1px solid var(--border-soft); }
.page-head .container { padding-top: 48px; padding-bottom: 48px; }
.page-head p { color: var(--text-dim); max-width: 60ch; margin-bottom: 0; }

/* ---------- Breadcrumbs ---------- */
.crumbs { font-size: .9rem; color: var(--text-dim); margin-bottom: 14px; }
.crumbs a { color: var(--text-dim); }
.crumbs a:hover { color: var(--accent-2); }

/* ---------- Cards / grids ---------- */
.grid { display: grid; gap: 28px; }
.grid.cols-2 { grid-template-columns: 1fr; }
.grid.cols-3 { grid-template-columns: 1fr; }

.card {
  background: var(--bg-card);
  border: 1px solid var(--border-soft);
  border-radius: var(--radius);
  padding: 28px;
  transition: transform .18s ease, border-color .2s ease, box-shadow .2s ease;
}
.card:hover { transform: translateY(-4px); border-color: var(--border); box-shadow: var(--shadow); }
.card h3 { margin-bottom: .35em; }
.card p { color: var(--text-dim); margin-bottom: 1rem; font-size: .98rem; }
.card .card-link {
  font-family: var(--font-head); text-transform: uppercase; letter-spacing: .08em;
  font-size: .85rem; color: var(--accent-2);
}
.card .icon, .service-card .icon {
  width: 50px; height: 50px; border-radius: 13px; margin-bottom: 20px;
  display: grid; place-items: center;
  background: var(--gradient-soft); border: 1px solid var(--border);
}
.card .icon svg, .service-card .icon svg {
  width: 26px; height: 26px; stroke: var(--accent-2); fill: none;
  stroke-width: 1.7; stroke-linecap: round; stroke-linejoin: round;
}

/* ---------- Service cards (цял клик) ---------- */
.service-card {
  display: flex; flex-direction: column;
  background: var(--bg-card); border: 1px solid var(--border-soft);
  border-radius: var(--radius); padding: 28px;
  text-decoration: none; color: inherit;
  transition: transform .18s ease, border-color .2s ease, box-shadow .2s ease;
}
.service-card:hover {
  transform: translateY(-4px); border-color: var(--border);
  box-shadow: var(--shadow); text-decoration: none;
}
.service-card h2, .service-card h3 { margin-bottom: .5em; font-size: 1.2rem; text-transform: none; letter-spacing: 0; }
.service-card p { color: var(--text-dim); font-size: .98rem; margin-bottom: 1.2rem; flex: 1; }
.service-card .sc-arrow {
  align-self: flex-start; color: var(--accent-2);
  font-family: var(--font-head); font-size: 1.25rem; line-height: 1;
  transition: transform .18s ease;
}
.service-card:hover .sc-arrow { transform: translateX(5px); }

.pf-card { padding: 0; overflow: hidden; }
.pf-card .pf-thumb { position: relative; display: block; border-bottom: 1px solid var(--border-soft); }
.pf-card .pf-thumb img { width: 100%; aspect-ratio: 4 / 3; object-fit: cover; }
.pf-card h2 { margin: 22px 22px 0; font-size: 1.2rem; text-transform: none; letter-spacing: 0; }
.pf-card p { margin: .4rem 22px 0; flex: 0; }
.pf-card .sc-arrow { margin: 12px 22px 22px; }
.crumb-back {
  font-family: var(--font-head); text-transform: uppercase;
  letter-spacing: .06em; font-size: .85rem; color: var(--text-dim);
}
.crumb-back:hover { color: var(--accent-2); }

/* ---------- Проекти ---------- */
.proj-status {
  position: absolute; bottom: 10px; left: 10px;
  font-family: var(--font-head); text-transform: uppercase; letter-spacing: .06em;
  font-size: .7rem; padding: 4px 10px; border-radius: 999px;
  background: var(--gradient); color: #fff;
}
.timeline { position: relative; display: flex; flex-direction: column; gap: 36px; }
.timeline-step { position: relative; padding-left: 56px; }
.timeline-step:not(:last-child)::before {
  content: ""; position: absolute; left: 17px; top: 38px; bottom: -36px; width: 2px;
  background: var(--gradient); opacity: .45;
}
.timeline-num {
  position: absolute; left: 0; top: 0; width: 36px; height: 36px; border-radius: 50%;
  background: var(--gradient); color: #fff; box-shadow: var(--shadow);
  display: flex; align-items: center; justify-content: center;
  font-family: var(--font-head); font-weight: 600; font-size: 1rem;
}
.timeline-card {
  display: flex; flex-direction: column; margin: 0;
  background: var(--bg-card); border: 1px solid var(--border-soft);
  border-radius: var(--radius); overflow: hidden; cursor: zoom-in;
  transition: border-color .2s ease, box-shadow .2s ease;
}
.timeline-card:hover { border-color: var(--border); box-shadow: var(--shadow); }
.timeline-card img { width: 100%; aspect-ratio: 4 / 3; object-fit: cover; display: block; }
.timeline-card figcaption { padding: 16px 18px; }
.timeline-label {
  display: block; font-family: var(--font-head); text-transform: uppercase;
  letter-spacing: .03em; font-size: 1.05rem; margin-bottom: 6px; color: var(--text);
}
.timeline-text { display: block; color: var(--text-dim); font-size: .95rem; }
@media (min-width: 720px) {
  .timeline-card { flex-direction: row; }
  .timeline-card img { width: 320px; flex: none; height: auto; }
  .timeline-card figcaption { flex: 1; display: flex; flex-direction: column; justify-content: center; }
}
.timeline-card--pending {
  cursor: default; border-style: dashed; border-color: var(--border);
  flex-direction: row; align-items: center; background: transparent;
  min-height: 96px; padding: 20px 22px;
}
.timeline-card--pending:hover { box-shadow: none; }
.timeline-pending-icon {
  font-family: var(--font-head); font-size: 1.8rem; color: var(--accent-2);
  margin-right: 18px; letter-spacing: .1em;
}
.timeline-pending-body { display: flex; flex-direction: column; }
.timeline-card--pending .timeline-label { color: var(--text-dim); }

/* ---------- Feature list ---------- */
.checks { list-style: none; padding: 0; }
.checks li { position: relative; padding-left: 30px; margin-bottom: 1rem; color: var(--text-dim); }
.checks li::before {
  content: ""; position: absolute; left: 0; top: .45em;
  width: 14px; height: 14px; border-radius: 50%;
  background: var(--gradient);
}

/* ---------- Portfolio ---------- */
.filters { display: flex; flex-wrap: wrap; gap: 10px; margin-bottom: 24px; }
.filters button {
  font-family: var(--font-head); text-transform: uppercase; letter-spacing: .06em;
  font-size: .8rem; padding: 8px 14px; min-height: 40px;
  background: transparent; color: var(--text-dim);
  border: 1px solid var(--border-soft); border-radius: 999px; cursor: pointer;
}
.filters button.active, .filters button:hover { color: #fff; border-color: var(--accent-2); }

.portfolio-grid { display: grid; gap: 24px; grid-template-columns: 1fr; }
.shot {
  position: relative; margin: 0; border-radius: var(--radius); overflow: hidden;
  border: 1px solid var(--border-soft); background: var(--bg-card); cursor: zoom-in;
}
.shot img { width: 100%; aspect-ratio: 4 / 3; object-fit: cover; }
a.shot { display: block; cursor: pointer; text-decoration: none; color: inherit; }
a.shot:hover { text-decoration: none; border-color: var(--border); }
.shot figcaption {
  padding: 14px 16px; font-size: .9rem; color: var(--text-dim);
  border-top: 1px solid var(--border-soft);
}
.shot .tag {
  position: absolute; top: 10px; left: 10px;
  font-family: var(--font-head); text-transform: uppercase; letter-spacing: .06em;
  font-size: .7rem; padding: 4px 10px; border-radius: 999px;
  background: rgba(10,10,15,0.7); color: #fff; border: 1px solid var(--border);
}

/* ---------- Lightbox ---------- */
.lightbox {
  position: fixed; inset: 0; z-index: 200;
  background: rgba(5, 4, 10, 0.92);
  display: none; align-items: center; justify-content: center; padding: 24px;
}
.lightbox.open { display: flex; }
.lightbox img { max-width: 100%; max-height: 82vh; border-radius: 10px; }
.lightbox .lb-caption { position: absolute; bottom: 18px; left: 0; right: 0; text-align: center; color: var(--text-dim); font-size: .9rem; }
.lightbox button {
  position: absolute; background: transparent; border: 1px solid var(--border);
  color: #fff; width: 48px; height: 48px; border-radius: 50%; font-size: 1.4rem; cursor: pointer;
}
.lb-close { top: 18px; right: 18px; }
.lb-prev { left: 12px; top: 50%; transform: translateY(-50%); }
.lb-next { right: 12px; top: 50%; transform: translateY(-50%); }

/* ---------- FAQ ---------- */
.faq-item {
  border: 1px solid var(--border-soft); border-radius: var(--radius-sm);
  background: var(--bg-card); margin-bottom: 16px; padding: 4px 20px;
}
.faq-item summary {
  cursor: pointer; list-style: none; padding: 16px 0;
  font-family: var(--font-head); font-size: 1.05rem; letter-spacing: .01em;
  display: flex; justify-content: space-between; gap: 16px; align-items: center;
}
.faq-item summary::-webkit-details-marker { display: none; }
.faq-item summary::after { content: "+"; color: var(--accent-2); font-size: 1.4rem; line-height: 1; }
.faq-item[open] summary::after { content: "–"; }
.faq-item .faq-body { padding: 0 0 18px; color: var(--text-dim); }

/* ---------- Forms ---------- */
.form-card {
  background: var(--bg-card); border: 1px solid var(--border-soft);
  border-radius: var(--radius); padding: 24px;
}
.form-card h2 { font-size: clamp(1.15rem, 3vw, 1.4rem); text-transform: none; letter-spacing: 0; }
.field { margin-bottom: 18px; }
.field label { display: block; font-family: var(--font-head); letter-spacing: .04em; margin-bottom: 8px; font-size: .95rem; }
.field input, .field select, .field textarea {
  width: 100%; padding: 13px 14px; min-height: 48px;
  background: var(--bg-elev); color: var(--text);
  border: 1px solid var(--border-soft); border-radius: 10px;
  font-family: var(--font-body); font-size: 1rem;
}
.field textarea { min-height: 130px; resize: vertical; }
.field input:focus, .field select:focus, .field textarea:focus {
  outline: none; border-color: var(--accent-2); box-shadow: 0 0 0 3px rgba(255,46,154,0.15);
}
.hp-field { position: absolute; left: -9999px; width: 1px; height: 1px; overflow: hidden; }
.form-note { font-size: .85rem; color: var(--text-dim); }
.form-status { margin-top: 14px; padding: 14px 16px; border-radius: 10px; display: none; }
.form-status.ok  { display: block; background: rgba(122,63,242,0.15); border: 1px solid var(--border); }
.form-status.err { display: block; background: rgba(255,46,154,0.12); border: 1px solid rgba(255,46,154,0.4); }

/* ---------- Contact meta ---------- */
.contact-lines { list-style: none; padding: 0; }
.contact-lines li { margin-bottom: 14px; color: var(--text-dim); }
.contact-lines strong { color: var(--text); font-family: var(--font-head); letter-spacing: .04em; display: block; }

/* ---------- CTA band ---------- */
.cta-band { background: var(--gradient-soft); border-top: 1px solid var(--border-soft); border-bottom: 1px solid var(--border-soft); }
.cta-band .container { padding: 48px 20px; text-align: center; }
.cta-band h2 { margin-bottom: .4em; }
.cta-band p { color: var(--text-dim); max-width: 50ch; margin-inline: auto; }

/* ---------- Footer ---------- */
.site-footer { background: var(--bg-elev); border-top: 1px solid var(--border-soft); padding: 56px 0 28px; margin-top: 24px; }
.footer-grid { display: grid; gap: 36px; grid-template-columns: 1fr; }
.site-footer h3 { font-size: .95rem; letter-spacing: .12em; color: var(--text-dim); text-transform: uppercase; }
.site-footer ul { list-style: none; padding: 0; margin: 0; }
.site-footer li { margin-bottom: 8px; }
.site-footer a { color: var(--text); }
.site-footer a:hover { color: var(--accent-2); }
.footer-brand img { height: 30px; width: auto; margin-bottom: 12px; }
.footer-motto {
  font-family: var(--font-head); text-transform: uppercase;
  letter-spacing: .04em; font-size: 1.05rem; margin-bottom: 10px;
}
.footer-loc { font-size: .82rem; }
.footer-loc strong { color: var(--text); }
.footer-bottom {
  margin-top: 32px; padding-top: 18px; border-top: 1px solid var(--border-soft);
  font-size: .85rem; color: var(--text-dim);
  display: flex; flex-wrap: wrap; gap: 8px 20px; justify-content: space-between;
}
.contact-links a { display: inline-flex; align-items: center; gap: 9px; }
.contact-links .cico { width: 20px; height: 20px; flex: none; }
.visually-hidden {
  position: absolute !important; width: 1px; height: 1px;
  padding: 0; margin: -1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0;
}

/* ---------- Cookie banner ---------- */
.cookie-banner {
  position: fixed; left: 12px; right: 12px; bottom: 12px; z-index: 300;
  background: var(--bg-elev); border: 1px solid var(--border);
  border-radius: var(--radius); padding: 18px; box-shadow: var(--shadow);
  display: none;
}
.cookie-banner.show { display: block; }
.cookie-banner p { font-size: .9rem; color: var(--text-dim); margin-bottom: 14px; }
.cookie-banner .cookie-actions { display: flex; flex-wrap: wrap; gap: 10px; }
.cookie-banner .btn { min-height: 44px; font-size: .85rem; }

/* ---------- Modal (Свържи се) ---------- */
body.modal-open { overflow: hidden; }
.modal {
  position: fixed; inset: 0; z-index: 400;
  display: flex; align-items: flex-start; justify-content: center;
  padding: 24px 16px; overflow-y: auto;
  animation: modal-fade .16s ease;
}
@keyframes modal-fade { from { opacity: 0; } to { opacity: 1; } }
.modal__backdrop {
  position: fixed; inset: 0;
  background: rgba(5, 4, 10, 0.75); backdrop-filter: blur(4px);
}
.modal__dialog {
  position: relative; z-index: 1;
  width: 100%; max-width: 560px; margin: auto;
  background: var(--bg-elev); border: 1px solid var(--border);
  border-radius: var(--radius); padding: 30px 24px 24px;
  box-shadow: var(--shadow);
}
.modal__dialog h2 { margin-bottom: .2em; }
.modal__dialog > p { color: var(--text-dim); margin-bottom: 4px; }
.modal__close {
  position: absolute; top: 10px; right: 10px;
  width: 44px; height: 44px; border-radius: 50%;
  background: transparent; border: 1px solid var(--border-soft);
  color: var(--text); font-size: 1.6rem; line-height: 1; cursor: pointer;
}
.modal__close:hover { border-color: var(--accent-2); }
.modal .contact-form.form-card {
  background: transparent; border: 0; padding: 0; margin-top: 16px;
}

/* ---------- Motion / a11y ---------- */
:focus-visible { outline: 2px solid var(--accent-2); outline-offset: 2px; }
@media (prefers-reduced-motion: reduce) {
  * { animation-duration: .001ms !important; transition-duration: .001ms !important; scroll-behavior: auto !important; }
  .hero canvas#hero-fx { display: none; }
}

/* =========================================================
   Tablet / Desktop
   ========================================================= */
@media (min-width: 720px) {
  .grid.cols-2 { grid-template-columns: 1fr 1fr; }
  .portfolio-grid { grid-template-columns: 1fr 1fr; }
  .footer-grid { grid-template-columns: 2fr 1fr 1fr; }
  .hero .container { padding-top: 96px; padding-bottom: 120px; }
}

@media (min-width: 960px) {
  body { font-size: 18px; }
  .nav-toggle { display: none; }
  .main-nav {
    position: static; display: flex; align-items: center; gap: 8px;
    background: transparent; border: 0; padding: 0; inset: auto;
  }
  .main-nav ul { display: flex; align-items: center; gap: 4px; }
  .main-nav a { border: 0; padding: 10px 14px; font-size: .95rem; }
  .main-nav .btn { margin: 0 0 0 10px; }
  .grid.cols-3 { grid-template-columns: repeat(3, 1fr); }
  .portfolio-grid { grid-template-columns: repeat(3, 1fr); }
  .section { padding: 100px 0; }
  .two-col { display: grid; grid-template-columns: 1.15fr .85fr; gap: 64px; align-items: start; }
}
