/* Стилі лендінгу ФОП Волоховський О. І.
   Без зовнішніх ресурсів: системні шрифти, жодних data:-URI (сумісно з CSP). */

/* ---------- Токени: світла тема ---------- */
:root {
  --bg: #f7f6f2;
  --bg-alt: #efede6;
  --surface: #ffffff;
  --text: #1b1d21;
  --muted: #5b5f66;
  --line: #dcd9d0;
  --accent: #0d6b5e;          /* глибокий зелено-бірюзовий */
  --accent-hover: #09564b;
  --accent-contrast: #ffffff;
  --accent-soft: #e1efeb;

  --font-sans: system-ui, -apple-system, "Segoe UI", Roboto, "Noto Sans", "Helvetica Neue", Arial, sans-serif;
  --font-serif: "Iowan Old Style", "Palatino Linotype", Palatino, "Noto Serif", Georgia, "Times New Roman", serif;
  --font-mono: ui-monospace, "SFMono-Regular", "JetBrains Mono", "DejaVu Sans Mono", Menlo, Consolas, monospace;

  --radius: 10px;
  --wrap: 68rem;
  --gutter: 1rem;

  color-scheme: light;
}

/* ---------- Токени: темна тема ---------- */
@media (prefers-color-scheme: dark) {
  :root {
    --bg: #14161a;
    --bg-alt: #1a1d22;
    --surface: #1e2127;
    --text: #e9e7e1;
    --muted: #a3a7ae;
    --line: #2f333a;
    --accent: #5cc4b0;
    --accent-hover: #7fd5c4;
    --accent-contrast: #0c1715;
    --accent-soft: #1b2e2a;
    color-scheme: dark;
  }
}

/* ---------- База ---------- */
*,
*::before,
*::after { box-sizing: border-box; }

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

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
}

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: var(--font-sans);
  font-size: 1rem;
  line-height: 1.6;
  overflow-wrap: break-word;
}

h1, h2, h3 {
  line-height: 1.2;
  margin: 0 0 0.75rem;
}

h1, h2 {
  font-family: var(--font-serif);
  font-weight: 600;
  letter-spacing: -0.01em;
}

p { margin: 0 0 1rem; }

a {
  color: var(--accent);
  text-underline-offset: 0.18em;
  text-decoration-thickness: 1px;
}

a:hover { color: var(--accent-hover); }

a:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 3px;
  border-radius: 3px;
}

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

.muted { color: var(--muted); }
.small { font-size: 0.8em; font-family: var(--font-sans); font-weight: 400; }

/* Посилання «перейти до змісту» видно лише при фокусі */
.skip {
  position: absolute;
  left: -9999px;
  top: 0;
}
.skip:focus {
  left: var(--gutter);
  top: 0.5rem;
  z-index: 10;
  padding: 0.5rem 0.75rem;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
}

/* ---------- Шапка ---------- */
.site-header {
  position: sticky;
  top: 0;
  z-index: 5;
  background: var(--bg);
  border-bottom: 1px solid var(--line);
}

.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
  min-height: 3.5rem;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 0.6rem;
  color: var(--text);
  text-decoration: none;
  font-weight: 600;
  min-width: 0;
}

.brand:hover { color: var(--text); }

.brand-mark {
  display: inline-grid;
  place-items: center;
  flex: none;
  width: 2rem;
  height: 2rem;
  border-radius: 6px;
  background: var(--accent);
  color: var(--accent-contrast);
  font-family: var(--font-serif);
  font-size: 0.85rem;
  letter-spacing: 0.02em;
}

/* На вузьких екранах ховаємо текст бренду, щоб вмістилось меню */
.brand-text { display: none; }

.nav {
  display: flex;
  gap: 0.25rem;
  margin: 0;
  padding: 0;
  list-style: none;
}

.nav a {
  display: block;
  padding: 0.45rem 0.55rem;
  color: var(--muted);
  text-decoration: none;
  font-size: 0.95rem;
  border-radius: 6px;
}

.nav a:hover {
  color: var(--text);
  background: var(--bg-alt);
}

@media (min-width: 30rem) {
  .brand-text { display: inline; }
}

/* ---------- Вступ ---------- */
.hero {
  padding: 3rem 0 2.5rem;
  scroll-margin-top: 4rem;
}

.eyebrow {
  margin-bottom: 0.75rem;
  color: var(--accent);
  font-size: 0.8rem;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.hero h1 {
  font-size: clamp(2rem, 7vw, 3.75rem);
  max-width: 18ch;
  margin-bottom: 1.25rem;
}

.lead {
  max-width: 38rem;
  font-size: 1.125rem;
  color: var(--muted);
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 1rem 1.5rem;
  margin-top: 1.75rem;
}

.btn {
  display: inline-block;
  padding: 0.7rem 1.2rem;
  background: var(--accent);
  color: var(--accent-contrast);
  border-radius: var(--radius);
  font-weight: 600;
  text-decoration: none;
}

.btn:hover {
  background: var(--accent-hover);
  color: var(--accent-contrast);
}

.link-arrow {
  font-weight: 600;
  text-decoration: none;
}

.link-arrow::after { content: " →"; }
.link-arrow:hover { text-decoration: underline; }

/* ---------- Секції ---------- */
.section {
  padding: 3rem 0;
  border-top: 1px solid var(--line);
  scroll-margin-top: 3.5rem;
}

.section-alt { background: var(--bg-alt); }

.section h2 {
  font-size: clamp(1.5rem, 4.5vw, 2.25rem);
  margin-bottom: 1.5rem;
}

/* ---------- Картки напрямів ---------- */
.cards {
  display: grid;
  gap: 1rem;
}

.card {
  display: flex;
  flex-direction: column;
  padding: 1.5rem;
  background: var(--surface);
  border: 1px solid var(--line);
  border-top: 3px solid var(--accent);
  border-radius: var(--radius);
}

.card h3 { font-size: 1.25rem; }

.card-tag {
  margin-bottom: 0.5rem;
  color: var(--muted);
  font-size: 0.8rem;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.card-codes {
  margin: auto 0 0;
  padding-top: 0.75rem;
  border-top: 1px dashed var(--line);
  color: var(--muted);
  font-family: var(--font-mono);
  font-size: 0.85rem;
}

@media (min-width: 48rem) {
  .cards { grid-template-columns: 1fr 1fr; gap: 1.5rem; }
  .card { padding: 2rem; }
}

/* ---------- Перелік КВЕД ---------- */
.kved-group + .kved-group { margin-top: 2rem; }

.kved-group h3 {
  font-size: 1.05rem;
  margin-bottom: 0.5rem;
}

.kved {
  margin: 0;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
}

.kved-row {
  display: grid;
  grid-template-columns: 4rem 1fr;
  gap: 0.75rem;
  padding: 0.85rem 1rem;
}

.kved-row + .kved-row { border-top: 1px solid var(--line); }

.kved dt {
  font-family: var(--font-mono);
  font-weight: 600;
  color: var(--accent);
}

.kved dd { margin: 0; }

@media (min-width: 48rem) {
  .kved-row {
    grid-template-columns: 5.5rem 1fr;
    padding: 1rem 1.5rem;
  }
}

/* ---------- Контакти ---------- */
.email {
  font-family: var(--font-serif);
  font-size: clamp(1.25rem, 5vw, 2rem);
}

/* ---------- Футер ---------- */
.site-footer {
  padding: 1.5rem 0;
  border-top: 1px solid var(--line);
  color: var(--muted);
  font-size: 0.9rem;
}

.site-footer p { margin: 0; }

@media (min-width: 48rem) {
  :root { --gutter: 2rem; }
  .hero { padding: 5rem 0 4rem; }
  .section { padding: 4.5rem 0; }
}
