/* Public site (search-engine facing pages). Standalone on purpose: no web fonts, no scripts, small. */
:root {
  color-scheme: light;
  --red: #e2001a;
  --red-dark: #b3001b;
  --red-soft: #f8dde1;
  --bg: #fdf8f6;
  --alt: #faf0ec;
  --card: #ffffff;
  --border: #f1e2dd;
  --border-strong: #e9cec7;
  --text: #211e1c;
  --text-soft: #4a423c;
  --muted: #7d726a;
  --code-bg: #f3ddd6;
  --radius: 16px;
  --shadow: 0 1px 2px rgba(120, 40, 30, 0.05), 0 10px 26px rgba(120, 40, 30, 0.07);
}

:root[data-theme="dark"] {
  color-scheme: dark;
  --red: #ff3b52;
  --red-dark: #ff6b7d;
  --red-soft: rgba(255, 59, 82, 0.16);
  --bg: #16130f;
  --alt: #201b16;
  --card: #201b16;
  --border: #392f24;
  --border-strong: #4c4030;
  --text: #f1e7d9;
  --text-soft: #e6dac4;
  --muted: #a1907a;
  --code-bg: #332a1e;
  --shadow: 0 1px 2px rgba(0, 0, 0, 0.35), 0 10px 26px rgba(0, 0, 0, 0.3);
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, "Noto Sans", sans-serif;
  font-size: 16px;
  line-height: 1.6;
}
a { color: var(--red); text-decoration: none; }
a:hover { text-decoration: underline; }
img { max-width: 100%; height: auto; }
h1, h2, h3 { line-height: 1.2; letter-spacing: -0.01em; margin: 0 0 12px; }
h1 { font-size: clamp(28px, 4.4vw, 46px); }
h2 { font-size: clamp(22px, 3vw, 30px); margin-top: 0; }
h3 { font-size: 17px; }
p { margin: 0 0 14px; }
code { background: var(--code-bg); padding: 1px 6px; border-radius: 5px; font-size: 0.92em; }
.muted { color: var(--muted); }
.small { font-size: 13.5px; }
.sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.skip { position: absolute; left: -999px; top: 8px; background: var(--red); color: #fff; padding: 8px 14px; border-radius: 8px; z-index: 100; }
.skip:focus { left: 8px; }
:focus-visible { outline: 3px solid rgba(226, 0, 26, 0.45); outline-offset: 2px; }

.wrap { max-width: 1120px; margin: 0 auto; padding: 0 20px; }
.wrap.narrow { max-width: 820px; }

/* Header */
.site-header { position: sticky; top: 0; z-index: 50; background: var(--bg); border-bottom: 1px solid var(--border); }
.bar { display: flex; align-items: center; gap: 18px; height: 64px; }
.logo { display: inline-flex; align-items: center; gap: 10px; font-weight: 700; font-size: 22px; letter-spacing: -0.02em; color: var(--text); }
.logo:hover { text-decoration: none; }
.logo b { color: var(--red); font-weight: 700; }
.nav { margin-left: auto; display: flex; align-items: center; gap: 22px; }
.nav a { color: var(--text-soft); font-weight: 500; }
.nav a:hover { color: var(--red); text-decoration: none; }
.nav .lang { border: 1px solid var(--border-strong); border-radius: 8px; padding: 2px 9px; font-size: 13px; font-weight: 600; }
.nav .btn { color: #fff; }
.theme-toggle { display: inline-flex; align-items: center; gap: 2px; }
.theme-toggle a {
  display: flex; align-items: center; justify-content: center;
  width: 26px; height: 26px; border-radius: 999px; color: var(--muted);
  transition: background-color 0.12s ease, color 0.12s ease;
}
.theme-toggle a svg { width: 15px; height: 15px; }
.theme-toggle a:hover { background: var(--red-soft); text-decoration: none; }
.theme-toggle a.active { background: var(--red-soft); color: var(--red-dark); }
.nav-toggle, .burger { display: none; }

/* Buttons */
.btn {
  display: inline-block; background: var(--red); color: #fff; border: 1px solid var(--red); border-radius: 999px;
  padding: 10px 22px; font-weight: 600; font-size: 15px; cursor: pointer; text-align: center;
  box-shadow: 0 4px 14px rgba(226, 0, 26, 0.22); transition: background 0.15s, transform 0.15s;
}
.btn:hover { background: var(--red-dark); border-color: var(--red-dark); text-decoration: none; transform: translateY(-1px); }
.btn-sm { padding: 7px 16px; font-size: 14px; box-shadow: none; }
.btn-lg { padding: 13px 28px; font-size: 16px; }
.btn-ghost { background: transparent; color: var(--red); box-shadow: none; }
.btn-ghost:hover { background: var(--red-soft); color: var(--red-dark); }

/* Hero */
.hero { padding: 72px 0 60px; background: radial-gradient(1200px 400px at 80% -10%, var(--red-soft), transparent 70%), linear-gradient(180deg, var(--alt), var(--bg)); }
.hero h1 { max-width: 880px; }
.hero-grid { display: flex; align-items: flex-start; justify-content: space-between; gap: 40px; }
.hero-main { flex: 1 1 auto; min-width: 0; }
.contact-card {
  flex: 0 0 280px; background: var(--card); border: 1px solid var(--border); border-radius: var(--radius);
  box-shadow: var(--shadow); padding: 22px;
}
.contact-card h2 { font-size: 17px; margin-bottom: 4px; }
.contact-card p { margin-bottom: 16px; }
.contact-row {
  display: flex; align-items: center; gap: 12px; padding: 10px 12px; margin: 0 -12px; border-radius: 12px;
  color: var(--text); transition: background-color 0.12s ease;
}
.contact-row:hover { background: var(--alt); text-decoration: none; }
.contact-row + .contact-row { margin-top: 2px; }
.contact-icon {
  flex: none; width: 38px; height: 38px; border-radius: 50%; background: var(--red-soft); color: var(--red);
  display: flex; align-items: center; justify-content: center;
}
.contact-icon svg { width: 18px; height: 18px; }
.contact-row strong { display: block; font-size: 14.5px; }
.contact-row small { display: block; color: var(--muted); font-size: 13px; }
.lead { font-size: clamp(17px, 2vw, 20px); color: var(--text-soft); max-width: 720px; margin-bottom: 26px; }
.lead-sm { font-size: 17px; color: var(--text-soft); max-width: 820px; }
.cta { display: flex; flex-wrap: wrap; gap: 12px; }
.cta-row { display: flex; flex-wrap: wrap; gap: 12px; margin: 26px 0 8px; }

/* Sections */
.section { padding: 56px 0; }
.section.alt { background: var(--alt); }
.section-sm { margin-top: 34px; }
.more { margin-top: 18px; font-weight: 600; }
.page-title { margin-top: 8px; }
main > .wrap { padding-top: 6px; padding-bottom: 48px; }
.group { margin: 30px 0; }
.group h2 { font-size: 22px; }

/* Grids and cards */
.grid { display: grid; gap: 16px; }
.grid-3 { grid-template-columns: repeat(3, 1fr); }
.grid-4 { grid-template-columns: repeat(4, 1fr); }
.card, .tile, .band, .post-card {
  background: var(--card); border: 1px solid var(--border); border-radius: var(--radius); box-shadow: var(--shadow);
}
.card { padding: 22px; }
.card h3 { margin-bottom: 8px; }
.card p { margin: 0; color: var(--text-soft); }
.tile { display: flex; flex-direction: column; gap: 4px; padding: 18px 20px; color: var(--text); transition: transform 0.15s, border-color 0.15s; }
.tile:hover { text-decoration: none; transform: translateY(-2px); border-color: var(--border-strong); }
.tile strong { font-size: 17px; }
.tile span { color: var(--red-dark); font-weight: 600; font-size: 14.5px; }
.tile small { color: var(--muted); }
.band { display: flex; align-items: center; justify-content: space-between; gap: 24px; padding: 30px; }
.band p { margin: 0; color: var(--text-soft); max-width: 640px; }
.final { text-align: center; }
.final p { color: var(--text-soft); }

.steps { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(4, 1fr); gap: 16px; }
.steps li { display: flex; gap: 14px; align-items: flex-start; }
.steps h3 { margin-bottom: 4px; }
.steps p { margin: 0; color: var(--text-soft); font-size: 15px; }
.step-num { flex: none; width: 36px; height: 36px; border-radius: 50%; background: var(--red); color: #fff; display: grid; place-items: center; font-weight: 700; }

/* FAQ / details */
.qa { background: var(--card); border: 1px solid var(--border); border-radius: 12px; margin: 0 0 10px; padding: 0 18px; }
.qa summary { cursor: pointer; font-weight: 600; padding: 15px 0; list-style: none; position: relative; padding-right: 26px; }
.qa summary::-webkit-details-marker { display: none; }
.qa summary::after { content: "+"; position: absolute; right: 2px; top: 12px; font-size: 22px; color: var(--red); line-height: 1; }
.qa[open] summary::after { content: "−"; }
.qa p { color: var(--text-soft); padding-bottom: 6px; }

/* Breadcrumbs, chips, badges */
.crumbs { font-size: 14px; color: var(--muted); padding-top: 18px; }
.crumbs a { color: var(--muted); }
.crumbs span { margin: 0 3px; }
.chips { display: flex; flex-wrap: wrap; gap: 8px; margin: 14px 0 22px; }
.chip { background: var(--card); border: 1px solid var(--border); border-radius: 999px; padding: 4px 14px; font-size: 14px; color: var(--text-soft); }
.badge { display: inline-block; background: var(--red-soft); color: var(--red-dark); border-radius: 999px; padding: 1px 10px; font-size: 12.5px; font-weight: 600; margin: 1px 3px 1px 0; }
.linklist { padding-left: 20px; }

/* Full-catalog filter controls (services.ejs) */
.catalog-controls { display: flex; gap: 10px; flex-wrap: wrap; margin: 4px 0 18px; }
.catalog-controls select, .catalog-controls input {
  font: inherit; color: var(--text); background: var(--card); border: 1px solid var(--border-strong);
  border-radius: 10px; padding: 9px 14px; height: 42px;
}
.catalog-controls select { flex: 0 0 auto; min-width: 200px; }
.catalog-controls input { flex: 1 1 240px; min-width: 0; }
.catalog-controls select:focus, .catalog-controls input:focus { outline: none; border-color: var(--red); }
.catalog-empty { padding: 18px 16px; margin: 0; }

/* Tables */
.table-wrap { overflow-x: auto; background: var(--card); border: 1px solid var(--border); border-radius: var(--radius); box-shadow: var(--shadow); }
.tbl { width: 100%; border-collapse: collapse; min-width: 640px; }
.tbl th, .tbl td { padding: 12px 16px; text-align: left; border-bottom: 1px solid var(--border); vertical-align: top; }
.tbl th { font-size: 13px; text-transform: uppercase; letter-spacing: 0.04em; color: var(--muted); background: var(--alt); }
.tbl tr:last-child td { border-bottom: none; }
.tbl .num { text-align: right; white-space: nowrap; }
.tbl .cat-row th {
  text-transform: none; letter-spacing: normal; font-size: 15px; font-weight: 700;
  background: var(--red-soft); color: var(--red-dark); padding: 10px 16px;
}
.tbl .cat-row th a { color: inherit; }
.svc-desc { margin-top: 6px; font-size: 14px; }
.svc-desc summary { cursor: pointer; color: var(--red); }
.svc-desc p { color: var(--text-soft); margin: 6px 0 0; white-space: pre-wrap; }

pre.code { background: #211e1c; color: #f3e9de; padding: 16px 18px; border-radius: 12px; overflow-x: auto; font-size: 14px; line-height: 1.5; margin: 0 0 16px; }
pre.code code { background: none; padding: 0; color: inherit; }
.code-reveal { margin: 0 0 16px; }
.code-reveal summary { cursor: pointer; list-style: none; display: inline-block; }
.code-reveal summary::-webkit-details-marker { display: none; }
.code-reveal[open] summary { margin-bottom: 14px; }
.code-reveal pre.code { margin: 0; }

/* Blog / long text */
.prose { font-size: 17px; }
.prose h2 { margin-top: 30px; font-size: 25px; }
.prose h3 { margin-top: 22px; font-size: 20px; }
.prose ul, .prose ol { padding-left: 24px; margin: 0 0 16px; }
.prose blockquote { margin: 0 0 16px; padding: 4px 18px; border-left: 4px solid var(--red-soft); color: var(--text-soft); }
.prose hr { border: 0; border-top: 1px solid var(--border); margin: 26px 0; }
.post-card { padding: 22px; margin: 0 0 16px; }
.post-card h2 { font-size: 22px; margin-bottom: 4px; }
.post-card h2 a { color: var(--text); }

/* Footer */
.site-footer { background: var(--alt); border-top: 1px solid var(--border); padding: 44px 0 28px; margin-top: 30px; }
.foot-grid { display: grid; grid-template-columns: 1.2fr 1fr 1fr 1fr; gap: 28px; }
.site-footer h3 { font-size: 14px; text-transform: uppercase; letter-spacing: 0.05em; color: var(--muted); margin-bottom: 12px; }
.site-footer ul { list-style: none; padding: 0; margin: 0; }
.site-footer li { margin: 0 0 7px; }
.site-footer li a { color: var(--text-soft); }
.site-footer li a:hover { color: var(--red); }
.disclaimer { margin: 30px 0 6px; color: var(--muted); font-size: 13px; max-width: 900px; }
.copy { margin: 0; color: var(--muted); font-size: 13px; }

/* Mobile */
@media (max-width: 900px) {
  .grid-3 { grid-template-columns: repeat(2, 1fr); }
  .grid-4 { grid-template-columns: repeat(2, 1fr); }
  .steps { grid-template-columns: repeat(2, 1fr); }
  .foot-grid { grid-template-columns: 1fr 1fr; }
  .band { flex-direction: column; align-items: flex-start; }
  .hero-grid { flex-direction: column; }
  .contact-card { flex-basis: auto; width: 100%; max-width: 360px; }
}
@media (max-width: 720px) {
  .burger { display: inline-flex; margin-left: auto; width: 42px; height: 42px; align-items: center; justify-content: center; cursor: pointer; border-radius: 10px; }
  .burger span, .burger span::before, .burger span::after { display: block; width: 22px; height: 2px; background: var(--text); border-radius: 2px; position: relative; content: ""; }
  .burger span::before { position: absolute; top: -7px; }
  .burger span::after { position: absolute; top: 7px; }
  .nav { display: none; position: absolute; left: 0; right: 0; top: 64px; flex-direction: column; align-items: stretch; gap: 0; background: var(--bg); border-bottom: 1px solid var(--border); padding: 8px 20px 18px; margin: 0; }
  .nav a { padding: 12px 0; border-bottom: 1px solid var(--border); }
  .nav .btn { margin-top: 12px; border-bottom: 1px solid var(--red); }
  .nav .lang { align-self: flex-start; margin: 10px 0 0; }
  .theme-toggle { align-self: flex-start; margin: 4px 0 0; }
  .theme-toggle a { padding: 0; border-bottom: none; }
  .nav-toggle:checked ~ .nav { display: flex; }
  .nav-toggle { display: block; position: absolute; opacity: 0; width: 1px; height: 1px; }
  .nav-toggle:focus-visible ~ .burger { outline: 3px solid rgba(226, 0, 26, 0.45); }
  .hero { padding: 44px 0 40px; }
  .section { padding: 40px 0; }
  .grid-3, .grid-4, .steps { grid-template-columns: 1fr; }
  .foot-grid { grid-template-columns: 1fr; }
}
@media (prefers-reduced-motion: reduce) { * { transition: none !important; scroll-behavior: auto !important; } }
