/*
Theme Name: єКафедра Landing
Theme URI: https://ekafedra.com.ua
Description: Односторінковий лендінг для демоверсії CRM «єКафедра». Форма доступу відправляється на демо-застосунок (demo.ekafedra.com.ua) через API.
Author: єКафедра
Version: 1.0.0
Requires at least: 6.0
Requires PHP: 8.0
Text Domain: ekafedra-landing
*/

:root {
  --bg: #faf7f1; --surface: #ffffff; --surface-2: #f5efe4; --ink: #241f17;
  --muted: #6f6553; --faint: #9a8f7b; --line: #e8e0d1; --line-strong: #d9cfbb;
  --accent: #b45309; --accent-2: #f59e0b; --accent-soft: #f7ecd8; --on-accent: #ffffff;
  --s-draft: #6f6553; --s-review: #2563eb; --s-ok: #15803d; --s-fix: #b91c1c;
  --ok-bg: #ecfdf3; --ok-line: #a7e3bf;
  --shadow: 0 1px 2px rgba(40,30,10,.04), 0 6px 20px rgba(40,30,10,.05);
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; scroll-padding-top: 78px; }
body {
  margin: 0; background: var(--bg); color: var(--ink);
  font-family: "Manrope", ui-sans-serif, system-ui, "Segoe UI", Roboto, sans-serif;
  font-size: 17px; line-height: 1.6; -webkit-font-smoothing: antialiased;
}
.wrap { max-width: 1060px; margin: 0 auto; padding: 0 24px; }
h1, h2, h3 { font-family: "Spectral", Georgia, "Times New Roman", serif; font-weight: 600; text-wrap: balance; line-height: 1.15; margin: 0; }
p { margin: 0; }
a { color: var(--accent); }
img { max-width: 100%; }
.eyebrow { font-size: 12.5px; font-weight: 700; letter-spacing: .14em; text-transform: uppercase; color: var(--accent); margin: 0 0 14px; }

.btn { font: inherit; font-weight: 600; font-size: 15px; border-radius: 999px; padding: 11px 22px; cursor: pointer; display: inline-flex; align-items: center; gap: 8px; text-decoration: none; border: 1px solid transparent; transition: transform .05s ease, box-shadow .15s ease, background .15s ease; }
.btn-primary {background: linear-gradient(150deg, #f59e0b, #d97706); color: #fff; /*box-shadow: 0 2px 10px rgba(217,119,6,.3); */}
.btn-primary:hover { /*box-shadow: 0 4px 16px rgba(217,119,6,.42); */}
.btn-primary:active { transform: translateY(1px); }
.btn-primary[disabled] { opacity: .6; cursor: default; }
.btn-ghost { background: var(--surface); color: var(--ink); border-color: var(--line-strong); }
.btn-ghost:hover { border-color: var(--accent); color: var(--accent); }
.btn-lg { font-size: 16.5px; padding: 14px 28px; }

.navbar { position: sticky; top: 0; z-index: 30; background: color-mix(in srgb, var(--bg) 88%, transparent); backdrop-filter: saturate(1.4) blur(10px); border-bottom: 1px solid var(--line); }
.navbar .row { display: flex; align-items: center; gap: 18px; padding-top: 13px; padding-bottom: 13px; }
.brand { display: flex; align-items: center; gap: 12px; text-decoration: none; color: var(--ink); }
.brand-logo { height: 32px; width: auto; display: block; }
.nav { display: flex; align-items: center; gap: 4px; margin-left: 8px; }
.nav a { color: var(--muted); text-decoration: none; font-size: 14.5px; font-weight: 600; padding: 8px 12px; border-radius: 9px; }
.nav a:hover { color: var(--ink); background: var(--surface-2); }
.nav a.active { color: var(--accent); background: var(--accent-soft); }
.spacer { flex: 1; }
.actions { display: flex; align-items: center; gap: 10px; }

header.hero-wrap { border-bottom: 1px solid var(--line); background: linear-gradient(180deg, var(--surface-2), transparent); }
.hero { padding: 54px 0 46px; }
.hero h1 { font-size: clamp(32px, 5.2vw, 52px); letter-spacing: -0.01em; }
.hero .lede { font-size: clamp(18px, 2.3vw, 21px); color: var(--muted); max-width: 48ch; margin-top: 18px; }
.hero-cta { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 28px; }
.inst { margin-top: 20px; font-size: 14px; color: var(--faint); display: inline-flex; align-items: center; gap: 8px; }
.dot { width: 7px; height: 7px; border-radius: 50%; background: var(--s-ok); box-shadow: 0 0 0 3px color-mix(in srgb, var(--s-ok) 22%, transparent); }
.stats { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 30px; }
.stat { background: var(--surface); border: 1px solid var(--line); border-radius: 12px; padding: 12px 18px; display: flex; align-items: baseline; gap: 9px; box-shadow: var(--shadow); }
.stat b { font-family: "Spectral", serif; font-size: 24px; color: var(--accent); font-variant-numeric: tabular-nums; }
.stat span { font-size: 13.5px; color: var(--muted); }

section { padding: 44px 0; border-top: 1px solid var(--line); }
.section-head { max-width: 64ch; margin-bottom: 30px; }
.section-head h2 { font-size: clamp(24px, 3.4vw, 31px); }
.section-head p { color: var(--muted); margin-top: 12px; }
.prose { max-width: 68ch; font-size: 18px; }
.prose p + p { margin-top: 16px; }
.prose b { color: var(--ink); font-weight: 700; }

.roles { display: grid; grid-template-columns: repeat(2, 1fr); gap: 16px; }
.role { background: var(--surface); border: 1px solid var(--line); border-radius: 16px; padding: 22px 22px 24px; box-shadow: var(--shadow); display: flex; flex-direction: column; }
.role h3 { font-size: 20px; }
.scope { align-self: flex-start; margin-top: 12px; font-size: 12px; font-weight: 600; letter-spacing: .03em; color: var(--accent); background: var(--accent-soft); border-radius: 999px; padding: 4px 11px; }
.role ul { list-style: none; margin: 16px 0 0; padding: 0; display: flex; flex-direction: column; gap: 9px; }
.role li { position: relative; padding-left: 22px; font-size: 15px; color: var(--muted); }
.role li::before { content: ""; position: absolute; left: 3px; top: 9px; width: 6px; height: 6px; border-radius: 50%; background: var(--accent-2); }
.role .plus { font-size: 14px; color: var(--faint); font-style: italic; font-family: "Spectral", serif; margin-top: 14px; }

.modules { display: grid; grid-template-columns: repeat(3, 1fr); gap: 14px; }
.mod { background: var(--surface); border: 1px solid var(--line); border-radius: 14px; padding: 18px 18px 20px; box-shadow: var(--shadow); }
.mod h3 { font-family: "Manrope", sans-serif; font-size: 16px; font-weight: 700; }
.mod p { font-size: 14px; color: var(--muted); margin-top: 9px; line-height: 1.5; }

.flow { display: flex; align-items: stretch; flex-wrap: wrap; gap: 10px; }
.step { flex: 1 1 150px; background: var(--surface); border: 1px solid var(--line); border-radius: 13px; padding: 16px 16px 18px; box-shadow: var(--shadow); border-left: 4px solid var(--sc, var(--line-strong)); }
.step .st { font-size: 12px; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; color: var(--faint); }
.step h3 { font-family: "Manrope", sans-serif; font-size: 16px; font-weight: 700; color: var(--sc, var(--ink)); margin-top: 6px; }
.step p { font-size: 13.5px; color: var(--muted); margin-top: 7px; line-height: 1.45; }

.demo { background: var(--surface-2); border-top: 1px solid var(--line); }
.demo-grid { display: grid; grid-template-columns: 1.05fr 1fr; gap: 30px; align-items: start; }
.demo-card { background: var(--surface); border: 1px solid var(--line); border-radius: 18px; padding: 26px; box-shadow: var(--shadow); }
.field { margin-bottom: 15px; }
.field label { display: block; font-size: 13.5px; font-weight: 600; color: var(--muted); margin-bottom: 6px; }
.field .req { color: var(--accent); }
.field input, .field select, .field textarea { width: 100%; font: inherit; font-size: 15px; color: var(--ink); background: var(--bg); border: 1px solid var(--line-strong); border-radius: 10px; padding: 11px 13px; }
.field input:focus, .field select:focus, .field textarea:focus { outline: 2px solid var(--accent); outline-offset: 1px; border-color: var(--accent); }
.field .err { color: var(--s-fix); font-size: 13px; margin-top: 5px; }
.hp { position: absolute; left: -9999px; width: 1px; height: 1px; overflow: hidden; }
.fine { font-size: 13px; color: var(--faint); margin-top: 14px; }
.form-alert { display: none; margin-top: 12px; font-size: 14px; padding: 11px 14px; border-radius: 10px; }
.form-alert.show { display: block; }
.form-alert.err { color: var(--s-fix); background: #fdecec; border: 1px solid #f3c6c6; }
.why { list-style: none; margin: 18px 0 0; padding: 0; display: flex; flex-direction: column; gap: 13px; }
.why li { position: relative; padding-left: 30px; font-size: 15px; color: var(--muted); }
.why li svg { position: absolute; left: 0; top: 1px; width: 20px; height: 20px; color: var(--accent); }

.contact-box { margin-top: 26px; background: var(--surface); border: 1px solid var(--line); border-radius: 16px; padding: 20px 22px; box-shadow: var(--shadow); }
.contact-box .ct { font-family: "Spectral", serif; font-weight: 600; font-size: 17px; color: var(--ink); margin-bottom: 4px; }
.contact-box .cs { font-size: 13.5px; color: var(--muted); margin-bottom: 14px; }
.contact-link { display: inline-flex; align-items: center; gap: 9px; font-size: 15.5px; font-weight: 600; color: var(--ink); text-decoration: none; padding: 9px 0; }
.contact-link + .contact-link { border-top: 1px solid var(--line); }
.contact-link:hover { color: var(--accent); }
.contact-link svg { width: 18px; height: 18px; color: var(--accent); flex: none; }

.creds { border: 1px solid var(--ok-line); background: var(--ok-bg); border-radius: 16px; padding: 22px; }
.creds .ok { display: inline-flex; align-items: center; gap: 8px; font-weight: 700; color: var(--s-ok); font-size: 15px; }
.cred { background: var(--surface); border: 1px solid var(--line); border-radius: 12px; padding: 14px 16px; margin-top: 14px; }
.cred .role-name { font-weight: 700; font-size: 15px; }
.cred .kv { display: flex; flex-wrap: wrap; gap: 6px 18px; margin-top: 8px; font-size: 14.5px; }
.cred .kv code { font-family: ui-monospace, "SFMono-Regular", Consolas, monospace; background: var(--surface-2); border: 1px solid var(--line); border-radius: 6px; padding: 2px 8px; color: var(--ink); }
.cred .kv span { color: var(--faint); }

footer.site-footer { border-top: 1px solid var(--line); padding: 30px 0 50px; color: var(--faint); font-size: 14px; }
footer.site-footer .frow { display: flex; align-items: center; flex-wrap: wrap; gap: 11px; }
.footer-logo { height: 28px; }
.mark { width: 30px; height: 30px; border-radius: 8px; flex: none; background: linear-gradient(150deg, #fbbf24, #d97706); display: grid; place-items: center; color: #fff; font-family: "Spectral", serif; font-weight: 600; font-size: 16px; }
.footer-contact { display: flex; flex-wrap: wrap; gap: 8px 22px; margin-top: 8px; }
.footer-contact a { color: var(--muted); text-decoration: none; font-weight: 600; }
.footer-contact a:hover { color: var(--accent); }

@media (max-width: 900px) { .nav { display: none; } }
@media (max-width: 820px) { .roles, .demo-grid { grid-template-columns: 1fr; } .modules { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 640px) {
  .wrap { padding-left: 20px; padding-right: 20px; }
  /* header wraps: logo on top, both buttons side-by-side below */
  .navbar .row { flex-wrap: wrap; gap: 10px; padding: 20px 10px;}
  .spacer { display: none; }
  .brand { flex: 1 1 auto; }
  .brand-logo { height: 28px; }
  .actions { flex: 1 1 100%; gap: 8px; }
  .actions .btn { flex: 1 1 auto; justify-content: center; padding: 9px 12px; font-size: 13.5px; }
}
@media (max-width: 540px) { body { font-size: 16px; } .modules { grid-template-columns: 1fr; } }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } * { transition: none !important; } }
