/* ==========================================================================
   Пропър Адванст Солюшънс — site.css
   Мастилена основа със светли ленти. Един визуален свят.
   Ink ground with light paper bands. One visual world.
   ========================================================================== */

:root {
  --ink:        oklch(0.16 0.012 264);
  --ink-2:      oklch(0.21 0.014 264);
  --ink-3:      oklch(0.27 0.016 264);

  --paper:      oklch(0.97 0.004 264);
  --paper-2:    oklch(0.99 0.002 264);
  --paper-line: oklch(0.88 0.008 264);
  --paper-text: oklch(0.42 0.02  264);

  --line:       oklch(0.32 0.018 264);
  --line-soft:  oklch(0.26 0.014 264);

  --text:       oklch(0.96 0.004 264);
  --text-dim:   oklch(0.72 0.016 264);
  --text-dimmer:oklch(0.58 0.018 264);

  --brand:        oklch(0.62 0.17 264);
  --brand-bright: oklch(0.72 0.16 264);
  --brand-ink:    oklch(0.30 0.10 264);

  --good: oklch(0.72 0.15 155);
  --warn: oklch(0.78 0.14 75);
  --bad:  oklch(0.68 0.19 25);

  --gut:  clamp(1.25rem, 4vw, 2.5rem);
  --maxw: 1180px;

  --sans: "Inter", system-ui, -apple-system, "Segoe UI", Arial, sans-serif;
  --mono: "Geist Mono", ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;

  /* Повърхности, които се сменят заедно с лентата. */
  /* Surfaces that swap with the band. */
  --surface:   var(--ink-2);
  --surface-2: var(--ink-3);
  --field-bg:  var(--ink-2);

  --nav-h: 7.6rem;

  color-scheme: dark;
}

/* --------------------------------------------------------------- reset -- */
*, *::before, *::after { box-sizing: border-box; }

html { -webkit-text-size-adjust: 100%; }

@media (prefers-reduced-motion: no-preference) {
  html { scroll-behavior: smooth; }
}

body {
  margin: 0;
  background: var(--ink);
  color: var(--text);
  font-family: var(--sans);
  font-size: 1rem;
  line-height: 1.62;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

img { max-width: 100%; height: auto; display: block; }

/* --------------------------------------------------------------- layout -- */
.wrap {
  max-width: var(--maxw);
  margin: 0 auto;
  padding-inline: var(--gut);
}

section { padding-block: clamp(3.25rem, 7vw, 6rem); scroll-margin-top: var(--nav-h); }

/* Светлата лента предефинира токените, за да се обърне всичко наведнъж. */
/* The paper band redefines the tokens so everything flips at once. */
.band-paper {
  background: var(--paper);
  color: var(--ink);
  --text:       var(--ink);
  --text-dim:   var(--paper-text);
  --text-dimmer:oklch(0.55 0.015 264);
  --line:       var(--paper-line);
  --line-soft:  oklch(0.92 0.006 264);
  --brand-bright: var(--brand-ink);
  --surface:    var(--paper-2);
  --surface-2:  var(--paper);
  --field-bg:   var(--paper-2);
}
.band-paper p { color: var(--paper-text); }

/* --------------------------------------------------------------- type --- */
h1, h2, h3 { margin: 0; font-weight: 600; color: var(--text); }

h1 {
  font-size: clamp(2.3rem, 6vw, 4.2rem);
  line-height: 1.03;
  font-weight: 620;
  letter-spacing: -0.022em;
  text-wrap: balance;
  overflow-wrap: break-word;
}
h2 {
  font-size: clamp(1.6rem, 3.4vw, 2.45rem);
  line-height: 1.13;
  font-weight: 600;
  letter-spacing: -0.022em;
  text-wrap: balance;
  overflow-wrap: break-word;
}
h3 {
  font-size: 1.06rem;
  line-height: 1.3;
  letter-spacing: -0.012em;
}

p { margin: 0; line-height: 1.62; color: var(--text-dim); }

.lead {
  font-size: clamp(1.02rem, 1.7vw, 1.25rem);
  line-height: 1.55;
  max-width: 62ch;
}

h1 em { font-style: normal; color: var(--brand-bright); }

.mono {
  font-family: var(--mono);
  font-variant-numeric: tabular-nums;
  font-feature-settings: "tnum" 1;
}

a { color: inherit; }

.sec-head { max-width: 62ch; }
h2 + .lead { margin-top: 1rem; }

/* Подписът на сайта: малък моно етикет с избледняваща черта. */
/* The signature detail: a small mono label with a fading rule. */
.eyebrow {
  font-family: var(--mono);
  font-size: 0.6875rem;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--brand-bright);
  display: flex;
  align-items: center;
  gap: 0.6rem;
  margin: 0 0 1.1rem;
  font-weight: 500;
}
.eyebrow::after {
  content: "";
  flex: 1;
  height: 1px;
  background: linear-gradient(90deg, var(--line) 0%, transparent 100%);
}

/* ----------------------------------------------------------- focus/a11y -- */
a:focus-visible,
button:focus-visible,
input:focus-visible,
textarea:focus-visible {
  outline: 2px solid var(--brand-bright);
  outline-offset: 3px;
  border-radius: 3px;
}

.skip {
  position: absolute;
  left: -9999px;
  top: 0;
  background: var(--brand);
  color: oklch(0.99 0 0);
  padding: 0.75rem 1.1rem;
  z-index: 200;
}
.skip:focus { left: 0.5rem; top: 0.5rem; }

/* ------------------------------------------------------------- buttons -- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  min-height: 44px;
  padding: 0.7rem 1.25rem;
  border-radius: 6px;
  border: 1px solid transparent;
  font: inherit;
  font-size: 0.95rem;
  font-weight: 500;
  letter-spacing: -0.005em;
  text-decoration: none;
  cursor: pointer;
  transition: background-color 0.18s ease, border-color 0.18s ease, color 0.18s ease;
}
.btn-primary {
  background: var(--brand);
  color: oklch(0.99 0 0);
  border-color: var(--brand);
}
.btn-primary:hover { background: var(--brand-bright); border-color: var(--brand-bright); }

.btn-ghost {
  background: transparent;
  color: var(--text);
  border-color: var(--line);
}
.btn-ghost:hover { border-color: var(--brand-bright); color: var(--brand-bright); }

.btn-row { display: flex; flex-wrap: wrap; gap: 0.75rem; margin-top: 1.9rem; }

/* ----------------------------------------------------------------- nav -- */
.nav-outer {
  position: sticky;
  top: 0;
  z-index: 100;
  background: var(--ink);
  background: color-mix(in oklab, var(--ink) 88%, transparent);
  border-bottom: 1px solid var(--line-soft);
}
@supports (backdrop-filter: blur(8px)) {
  .nav-outer { backdrop-filter: blur(10px); }
}

.nav {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.3rem 1.4rem;
  padding-block: 0.55rem;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 0.6rem;
  text-decoration: none;
  min-height: 44px;
}
.brand img { height: 28px; width: 28px; }

/* На телефон стои само знакът — името остава за екранните четци. */
/* On a phone only the mark shows — the name stays for screen readers. */
.brand-name {
  position: absolute;
  width: 1px; height: 1px;
  margin: -1px; padding: 0;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
}

.nav-links {
  order: 3;
  width: 100%;
  display: flex;
  align-items: center;
  gap: 0.35rem;
  border-top: 1px solid var(--line-soft);
  margin-top: 0.15rem;
}
.nav-links a {
  display: inline-flex;
  align-items: center;
  min-height: 44px;
  padding: 0 0.65rem;
  font-size: 0.9rem;
  color: var(--text-dim);
  text-decoration: none;
  border-radius: 5px;
}
.nav-links a:hover { color: var(--text); }

.nav-actions {
  margin-left: auto;
  display: flex;
  align-items: center;
  gap: 0.4rem;
}

.lang {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 44px;
  min-height: 44px;
  padding: 0 0.65rem;
  font-family: var(--mono);
  font-size: 0.75rem;
  font-weight: 500;
  letter-spacing: 0.08em;
  color: var(--text-dim);
  text-decoration: none;
  border: 1px solid var(--line-soft);
  border-radius: 6px;
}
.lang:hover { color: var(--brand-bright); border-color: var(--brand-bright); }

.nav .btn { padding-inline: 0.95rem; font-size: 0.875rem; }

@media (min-width: 900px) {
  :root { --nav-h: 4.6rem; }
  .nav { gap: 1.4rem; }
  .nav-links { order: 0; width: auto; border-top: 0; margin-top: 0; }
  .brand img { height: 30px; width: 30px; }
  .brand-name {
    position: static;
    width: auto; height: auto;
    margin: 0; overflow: visible; clip: auto;
    white-space: normal;
    font-size: 0.95rem;
    font-weight: 600;
    letter-spacing: -0.01em;
    color: var(--text);
    line-height: 1.15;
  }
}

/* ---------------------------------------------------------------- hero -- */
.hero { padding-block: clamp(2.75rem, 6vw, 5.5rem) clamp(3rem, 6vw, 5.5rem); }

.hero-grid {
  display: grid;
  gap: clamp(2.25rem, 5vw, 3.5rem);
  align-items: center;
}
@media (min-width: 960px) {
  .hero-grid { grid-template-columns: minmax(0, 1.08fr) minmax(0, 0.92fr); }
}

.hero h1 { margin-bottom: 1.35rem; }

/* --------------------------------------------------------------- panel -- */
.panel {
  background: var(--surface);
  border: 1px solid var(--line-soft);
  border-radius: 10px;
  overflow: hidden;
}
.panel-head {
  padding: 0.85rem 1.15rem;
  border-bottom: 1px solid var(--line-soft);
}
.panel-kicker {
  font-family: var(--mono);
  font-size: 0.6875rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--brand-bright);
  font-weight: 500;
}

/* Четирите направления, изброени. / The four service lines, listed. */
.lines { list-style: none; margin: 0; padding: 0; }
.lines li {
  display: flex;
  align-items: baseline;
  gap: 0.9rem;
  padding: 0.95rem 1.15rem;
}
.lines li + li { border-top: 1px solid var(--line-soft); }
.lines-n {
  font-family: var(--mono);
  font-variant-numeric: tabular-nums;
  font-size: 0.75rem;
  color: var(--text-dimmer);
  font-weight: 500;
}
.lines-t {
  font-size: 1.02rem;
  font-weight: 500;
  color: var(--text);
  letter-spacing: -0.011em;
}

/* --------------------------------------------------------------- cards -- */
.cards {
  display: grid;
  gap: 1px;
  background: var(--line-soft);
  border: 1px solid var(--line-soft);
  border-radius: 10px;
  overflow: hidden;
  margin-top: 2.4rem;
}
@media (min-width: 640px)  { .cards-4 { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (min-width: 1000px) { .cards-4 { grid-template-columns: repeat(4, minmax(0, 1fr)); } }

.card {
  background: var(--surface);
  padding: 1.6rem 1.35rem;
  display: grid;
  gap: 0.55rem;
  align-content: start;
}
.card-n {
  font-family: var(--mono);
  font-size: 0.6875rem;
  letter-spacing: 0.14em;
  color: var(--text-dimmer);
  font-weight: 500;
}
.card p { font-size: 0.92rem; line-height: 1.55; }

/* --------------------------------------------------------------- about -- */
.about-grid { display: grid; gap: clamp(1.5rem, 4vw, 3.5rem); align-items: start; }
@media (min-width: 860px) {
  .about-grid { grid-template-columns: minmax(0, 0.72fr) minmax(0, 1.28fr); }
  .about-grid .lead { max-width: 68ch; }
}

/* ------------------------------------------------------------- contact -- */
.contact-grid {
  display: grid;
  gap: clamp(2.25rem, 5vw, 3.5rem);
  align-items: start;
}
@media (min-width: 940px) {
  .contact-grid { grid-template-columns: minmax(0, 0.85fr) minmax(0, 1.15fr); }
}

.direct { margin-top: 2.2rem; display: grid; gap: 0.75rem; }
.direct h3 { font-size: 0.98rem; }
.direct-line { display: grid; gap: 0.15rem; }
.direct-l {
  font-family: var(--mono);
  font-size: 0.65rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--text-dimmer);
}
.direct-v {
  font-size: 1.02rem;
  color: var(--text);
  text-decoration: none;
  border-bottom: 1px solid var(--line);
  justify-self: start;
  min-height: 44px;
  display: inline-flex;
  align-items: center;
  word-break: break-word;
}
.direct-v:hover { color: var(--brand-bright); border-color: var(--brand-bright); }

.form { display: grid; gap: 1rem; }
.field { display: grid; gap: 0.4rem; }
.field label {
  font-family: var(--mono);
  font-size: 0.65rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--text-dimmer);
}
.field label .opt { text-transform: none; letter-spacing: 0.02em; }
.field input,
.field textarea {
  font: inherit;
  font-size: 1rem;
  min-height: 44px;
  padding: 0.65rem 0.85rem;
  color: var(--text);
  background: var(--field-bg);
  border: 1px solid var(--line);
  border-radius: 6px;
  width: 100%;
}
.field textarea { min-height: 8.5rem; resize: vertical; line-height: 1.55; }
.field input::placeholder,
.field textarea::placeholder { color: var(--text-dimmer); }
.field input:hover,
.field textarea:hover { border-color: var(--brand-ink); }
.field input:focus,
.field textarea:focus { border-color: var(--brand-bright); }

.field-pair { display: grid; gap: 1rem; }
@media (min-width: 560px) { .field-pair { grid-template-columns: 1fr 1fr; } }

.form-foot {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.75rem 1.25rem;
  margin-top: 0.35rem;
}
.form-note { font-size: 0.8rem; color: var(--text-dimmer); line-height: 1.5; }

.hp { position: absolute; left: -9999px; width: 1px; height: 1px; overflow: hidden; }

.alert {
  border: 1px solid var(--bad);
  border-left-width: 3px;
  border-radius: 6px;
  padding: 0.85rem 1rem;
  font-size: 0.9rem;
  color: var(--text);
  background: color-mix(in oklab, var(--bad) 12%, transparent);
}

/* -------------------------------------------------------------- footer -- */
.foot {
  border-top: 1px solid var(--line-soft);
  padding-block: clamp(2.5rem, 5vw, 3.5rem) 2rem;
  background: var(--ink);
}
.foot-grid { display: grid; gap: 2rem; grid-template-columns: 1fr; }
@media (min-width: 720px) { .foot-grid { grid-template-columns: 1.6fr 1fr 1fr; } }

.foot-t {
  font-family: var(--mono);
  font-size: 0.65rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--text-dimmer);
  margin-bottom: 0.9rem;
}
.foot ul { list-style: none; margin: 0; padding: 0; display: grid; gap: 0.15rem; }
.foot a {
  color: var(--text-dim);
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  min-height: 44px;
  word-break: break-word;
}
.foot a:hover { color: var(--brand-bright); }
.foot-tag { font-size: 0.9rem; max-width: 34ch; margin-top: 0.9rem; }
.foot-brand { display: inline-flex; align-items: center; gap: 0.6rem; }
.foot-brand img { height: 34px; width: 34px; }
.foot-brand span { font-weight: 600; color: var(--text); letter-spacing: -0.01em; }
.foot-legal {
  margin-top: 2.5rem;
  padding-top: 1.4rem;
  border-top: 1px solid var(--line-soft);
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem 1.5rem;
  font-size: 0.8rem;
  color: var(--text-dimmer);
}

/* --------------------------------------------------------------- small -- */
.mini { min-height: 70svh; display: grid; align-content: center; padding-block: 4rem; }

/* -------------------------------------------------------------- motion -- */
/* И двете предпазни условия са задължителни: браузър без scroll-driven
   анимации трябва да покаже завършеното състояние, а не празна страница. */
/* Both guards are required: a browser without scroll-driven animation must
   show the finished state, never a page parked at opacity 0. */
@media (prefers-reduced-motion: no-preference) {
  @supports (animation-timeline: view()) {
    .reveal {
      animation: reveal linear both;
      animation-timeline: view();
      animation-range: entry 6% cover 24%;
    }
    @keyframes reveal {
      from { opacity: 0; transform: translateY(16px); }
      to   { opacity: 1; transform: none; }
    }
  }
}

@media print {
  .nav-outer, .btn-row, .form { display: none; }
  body { background: #fff; color: #000; }
}
