/* Public site (spec 007): light theme on the brand tokens from brand.css. */
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-padding-top: 88px; }
:root { --radius-lg: 16px; --on-brand: #fff; --cover-end: #015a40; }
[hidden] { display: none !important; }
body { margin: 0; font-family: var(--font); color: var(--text); background: var(--bg); font-size: 16px; line-height: 1.6; }
img, svg { display: block; max-width: 100%; }
a { color: var(--brand); text-decoration: none; }
a:hover { color: var(--brand-900); }
h1, h2, h3 { line-height: 1.2; margin: 0 0 .5em; letter-spacing: -.01em; }
p { margin: 0 0 1em; }
.wrap { width: 100%; max-width: 1160px; margin: 0 auto; padding: 0 24px; }
.muted { color: var(--muted); }
.small { font-size: 14px; }
.lead { font-size: 19px; color: var(--muted); max-width: 680px; }
.eyebrow { font-size: 13px; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; color: var(--brand); margin-bottom: 12px; }
:focus-visible { outline: none; box-shadow: 0 0 0 2px var(--card), 0 0 0 4px var(--brand); }

/* Buttons */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; height: 44px; padding: 0 20px; border: 1px solid var(--brand); border-radius: var(--radius); background: var(--brand); color: var(--on-brand); font: 700 15px/1 var(--font); cursor: pointer; transition: background var(--duration) var(--ease), border-color var(--duration) var(--ease), color var(--duration) var(--ease); }
.btn:hover { background: var(--brand-900); border-color: var(--brand-900); color: var(--on-brand); }
.btn[aria-busy="true"] { opacity: .6; pointer-events: none; }
.btn--lg { height: 52px; padding: 0 28px; font-size: 16px; }
.btn--block { width: 100%; }
.btn--secondary { background: var(--card); color: var(--brand); border-color: var(--line-strong); }
.btn--secondary:hover { background: var(--brand-50); color: var(--brand-900); border-color: var(--brand-200); }
.btn--light { background: var(--card); color: var(--brand-900); border-color: var(--card); }
.btn--light:hover { background: var(--highlight); border-color: var(--highlight); color: var(--brand-900); }
.btn--dark { background: var(--brand-900); border-color: var(--brand-900); }
.btn--dark:hover { background: var(--text); border-color: var(--text); }
.link { font-weight: 700; }
.actions { display: flex; flex-wrap: wrap; gap: 12px; margin: 28px 0 12px; }

/* Header */
.site-header { position: sticky; top: 0; z-index: 10; background: color-mix(in srgb, var(--bg) 88%, transparent); backdrop-filter: saturate(1.4) blur(12px); border-bottom: 1px solid var(--line); }
.site-header-inner { display: flex; align-items: center; gap: 24px; height: 68px; }
.site-brand { display: inline-flex; align-items: center; gap: 10px; font-weight: 700; font-size: 18px; color: var(--text); }
.site-brand:hover { color: var(--text); }
.site-nav { display: flex; align-items: center; gap: 4px; margin-left: auto; }
.site-nav > a { padding: 8px 12px; border-radius: var(--radius); color: var(--text); font-size: 15px; transition: background var(--duration) var(--ease); }
.site-nav > a:hover { background: var(--hover); }
.site-nav > a.active { background: var(--brand-50); color: var(--brand); font-weight: 700; }
.site-langs { display: flex; gap: 2px; margin-left: 12px; padding: 3px; border: 1px solid var(--line); border-radius: var(--radius); background: var(--card); }
.site-langs a { padding: 4px 10px; border-radius: var(--radius-sm); font-size: 13px; font-weight: 700; text-transform: uppercase; color: var(--muted); transition: background var(--duration) var(--ease); }
.site-langs a:hover { background: var(--hover); color: var(--text); }
.site-langs a.active { background: var(--brand); color: var(--on-brand); }
.site-menu-toggle { position: absolute; width: 1px; height: 1px; opacity: 0; pointer-events: none; }
.site-menu-button { display: none; }
.site-menu-toggle:focus-visible + .site-menu-button { box-shadow: 0 0 0 2px var(--card), 0 0 0 4px var(--brand); }

/* Hero */
.hero { padding: 96px 0 72px; border-bottom: 1px solid var(--line); }
.hero-inner { position: relative; }
.display { font-size: clamp(40px, 6.4vw, 76px); line-height: 1.04; letter-spacing: -.03em; max-width: 900px; margin-bottom: 24px; }
.display b { font-weight: 700; }
.display span { font-weight: 400; color: var(--brand); }
.hero-note { display: inline-flex; align-items: center; gap: 8px; font-size: 14px; color: var(--muted); }
.dot { width: 8px; height: 8px; border-radius: 50%; background: var(--brand-500); box-shadow: 0 0 0 4px var(--brand-50); }

/* Sections */
.section { padding-top: 40px; padding-bottom: 40px; }
.section-head { display: flex; flex-wrap: wrap; align-items: baseline; justify-content: space-between; gap: 8px 24px; margin-bottom: 20px; }
.section-head .section-title { margin: 0; }
.section-head p { margin: 0; }
.section-title { font-size: clamp(24px, 3vw, 32px); margin-bottom: 20px; }
.page-head { padding-top: 64px; padding-bottom: 16px; }
.page-head h1 { font-size: clamp(34px, 4.6vw, 52px); letter-spacing: -.02em; }
.empty { padding: 32px; border: 1px dashed var(--line-strong); border-radius: var(--radius-lg); color: var(--muted); text-align: center; background: var(--card); }
.back { display: inline-block; margin: 32px 0 8px; font-weight: 700; }

/* Families: bold coloured tiles */
.families { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 16px; }
.family { position: relative; display: block; min-height: 168px; padding: 24px; border-radius: var(--radius-lg); background: var(--card); color: var(--text); box-shadow: var(--shadow); transition: transform var(--duration) var(--ease); }
.family:hover { color: inherit; transform: translateY(-3px); }
.family h3 { font-size: 20px; }
.family p { color: var(--muted); font-size: 15px; margin: 0; }
.family-count { position: absolute; right: 20px; bottom: 16px; font-size: 40px; font-weight: 700; line-height: 1; }
.family--payments { background: var(--brand); color: var(--on-brand); }
.family--payments p { color: var(--on-brand); }
.family--delivery { background: var(--highlight); color: var(--brand-900); }
.family--delivery p { color: var(--brand-900); }
.family--messaging { background: var(--brand-50); color: var(--brand-900); }
.family--messaging p { color: var(--brand-900); }
.family--sales { background: var(--brand-900); color: var(--on-brand); }
.family--sales p { color: var(--on-brand); }

/* Widget cards */
.widget-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); gap: 20px; }
.widget-card { display: flex; flex-direction: column; overflow: hidden; border: 1px solid var(--line); border-radius: var(--radius-lg); background: var(--card); color: var(--text); transition: transform var(--duration) var(--ease), box-shadow var(--duration) var(--ease); }
.widget-card:hover { color: var(--text); transform: translateY(-3px); box-shadow: var(--shadow-pop); }
.widget-card-body { display: flex; flex: 1; flex-direction: column; padding: 20px 22px 22px; }
.widget-card-body h3 { font-size: 19px; }
.widget-card-body p { color: var(--muted); font-size: 15px; }
.widget-card-foot { margin-top: auto; padding-top: 12px; border-top: 1px solid var(--line); }
.cover { --accent: var(--highlight); position: relative; display: flex; align-items: flex-end; gap: 14px; min-height: 148px; padding: 22px; background: linear-gradient(135deg, var(--brand-500), var(--brand) 55%, var(--cover-end)); color: var(--on-brand); overflow: hidden; }
/* The accent circle stays in the top corner, clear of the title (white on yellow is unreadable). */
.cover::after { content: ""; position: absolute; right: -48px; top: -64px; width: 140px; height: 140px; border-radius: 50%; background: var(--accent); }
.cover-icon { position: relative; z-index: 1; flex: none; width: 56px; height: 56px; }
.cover-icon svg { width: 56px; height: 56px; }
.cover-title { position: relative; z-index: 1; max-width: calc(100% - 90px); font-size: 26px; line-height: 1.1; font-weight: 400; }
.cover-title b { font-weight: 700; }

/* Prices */
.price-list { display: grid; gap: 6px; margin: 0; }
.price-list > div { display: flex; justify-content: space-between; align-items: baseline; gap: 12px; }
.price-list dt { color: var(--muted); font-size: 14px; }
.price-list dd { margin: 0; text-align: right; font-variant-numeric: tabular-nums; }
.price-list b { font-size: 18px; }
.price-uah { display: block; font-size: 13px; color: var(--muted); }
.price-free { font-weight: 700; color: var(--brand); }

/* Steps, scenarios, setup */
.steps { display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 16px; padding: 0; margin: 0; list-style: none; counter-reset: step; }
.steps li { position: relative; padding: 64px 24px 24px; border-radius: var(--radius-lg); background: var(--card); box-shadow: var(--shadow); counter-increment: step; }
.steps li::before { content: counter(step); position: absolute; left: 24px; top: 20px; width: 32px; height: 32px; border-radius: 50%; background: var(--brand-50); color: var(--brand); font-weight: 700; display: grid; place-items: center; }
.steps h3, .scenario h3 { font-size: 18px; }
.steps p, .scenario p { color: var(--muted); margin: 0; }
.scenarios { display: grid; grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); gap: 16px; }
.scenario { padding: 24px; border-radius: var(--radius-lg); background: var(--card); border: 1px solid var(--line); }
.setup { max-width: 760px; padding: 0; margin: 0; list-style: none; counter-reset: setup; }
.setup li { position: relative; padding: 14px 0 14px 52px; border-bottom: 1px solid var(--line); counter-increment: setup; }
.setup li::before { content: counter(setup); position: absolute; left: 0; top: 12px; width: 32px; height: 32px; border-radius: 50%; background: var(--brand); color: var(--on-brand); font-weight: 700; display: grid; place-items: center; font-size: 14px; }

/* Widget page */
.widget-hero { display: grid; grid-template-columns: minmax(0, 1fr) 360px; gap: 40px; align-items: start; padding: 16px 0 24px; }
.widget-hero h1 { font-size: clamp(32px, 4.4vw, 48px); letter-spacing: -.02em; }
.price-box { position: sticky; top: 92px; overflow: hidden; border-radius: var(--radius-lg); background: var(--card); box-shadow: var(--shadow); }
.price-box > :not(.cover) { margin-left: 22px; margin-right: 22px; }
.price-box h2 { margin-top: 20px; font-size: 16px; color: var(--muted); }
.price-box .price-list { margin-bottom: 12px; }
.price-box > :last-child { margin-bottom: 22px; }

/* Panels and banner */
.split { display: grid; grid-template-columns: repeat(auto-fit, minmax(320px, 1fr)); gap: 20px; }
.panel { padding: 32px; border-radius: var(--radius-lg); background: var(--card); border: 1px solid var(--line); }
.panel h2 { font-size: 24px; }
.panel--brand { background: var(--brand-900); color: var(--on-brand); border-color: var(--brand-900); }
.panel--brand p { color: var(--on-brand); }
.banner { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 20px; margin: 40px 0; padding: 32px; border-radius: var(--radius-lg); background: var(--highlight); color: var(--brand-900); }
.split .banner { margin: 0; }
.banner h2 { font-size: 24px; margin-bottom: 6px; }
.banner p { margin: 0; }
.banner--card { background: var(--card); border: 1px solid var(--line); color: var(--text); }

/* Forms */
.form-section { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.2fr); gap: 40px; align-items: start; }
.card { padding: 28px; border-radius: var(--radius-lg); background: var(--card); box-shadow: var(--shadow); }
.form { display: grid; gap: 16px; }
.form h2 { font-size: 20px; margin: 0; }
.form fieldset { display: grid; gap: 16px; margin: 0; padding: 0; border: 0; min-width: 0; }
.field { display: grid; gap: 6px; }
.field-label { font-weight: 700; font-size: 14px; padding: 0; }
.field-label small { font-weight: 400; color: var(--muted); }
.field-hint { font-size: 13px; color: var(--muted); }
.field-hint--bad { color: var(--bad); }
.field input, .field textarea, .field select { width: 100%; min-height: 44px; padding: 10px 14px; border: 1px solid var(--line); border-radius: var(--radius); background: var(--card); font: 15px/1.4 var(--font); color: var(--text); transition: border-color var(--duration) var(--ease), box-shadow var(--duration) var(--ease); }
.field textarea { resize: vertical; }
.field input:hover, .field textarea:hover, .field select:hover { border-color: var(--line-strong); }
.field input:focus, .field textarea:focus, .field select:focus { outline: none; border-color: var(--brand); box-shadow: 0 0 0 3px var(--brand-50); }
.field [aria-invalid="true"] { border-color: var(--bad); }
.choices { display: grid; grid-template-columns: repeat(auto-fit, minmax(180px, 1fr)); gap: 10px; }
.choice { position: relative; }
.choice input { position: absolute; opacity: 0; }
.choice span { display: block; height: 100%; padding: 14px 16px; border: 1px solid var(--line); border-radius: var(--radius); cursor: pointer; transition: border-color var(--duration) var(--ease), background var(--duration) var(--ease); }
.choice span:hover { border-color: var(--line-strong); }
.choice input:checked + span { border-color: var(--brand); background: var(--brand-50); color: var(--brand-900); font-weight: 700; }
.choice input:focus-visible + span { box-shadow: 0 0 0 2px var(--card), 0 0 0 4px var(--brand); }
.quiz-nav { display: flex; flex-wrap: wrap; gap: 10px; justify-content: flex-end; }
.form-consent { font-size: 13px; margin: 0; }
.hp { position: absolute; left: -9999px; width: 1px; height: 1px; overflow: hidden; }
.notice { padding: 12px 16px; border-radius: var(--radius); font-size: 15px; }
.notice--ok { background: var(--brand-50); color: var(--brand); }
.notice--bad { background: var(--bad-50); color: var(--bad); }
.contact-list { display: grid; gap: 8px; font-size: 18px; font-weight: 700; }

/* Pricing table */
.table-card { overflow-x: auto; border-radius: var(--radius-lg); background: var(--card); box-shadow: var(--shadow); margin-bottom: 12px; }
.price-table { width: 100%; border-collapse: collapse; font-variant-numeric: tabular-nums; }
.price-table th, .price-table td { padding: 16px 20px; text-align: left; border-bottom: 1px solid var(--line); }
.price-table thead th { font-size: 13px; color: var(--muted); font-weight: 700; }
.price-table-group th { background: var(--bg); font-size: 13px; text-transform: uppercase; letter-spacing: .06em; color: var(--brand); }
.price-table tr:last-child td { border-bottom: 0; }

/* Legal */
.legal { max-width: 800px; padding-top: 56px; padding-bottom: 56px; }
.legal h1 { font-size: clamp(32px, 4vw, 44px); }
.legal h2 { font-size: 22px; margin-top: 36px; }
.legal h3 { font-size: 17px; margin-top: 20px; }
.legal li { margin-bottom: 6px; }

/* Footer */
.site-footer { margin-top: 64px; padding: 48px 0 24px; background: var(--card); border-top: 1px solid var(--line); }
.site-footer-grid { display: grid; grid-template-columns: 1.4fr repeat(3, 1fr); gap: 32px; }
.site-footer h2 { font-size: 13px; text-transform: uppercase; letter-spacing: .08em; color: var(--muted); margin-bottom: 12px; }
.site-footer-grid > div > a:not(.site-brand) { display: block; color: var(--text); padding: 3px 0; font-size: 15px; }
.site-footer-grid > div > a:not(.site-brand):hover { color: var(--brand); }
.site-footer-grid p { margin-top: 12px; font-size: 15px; }
.site-footer-bottom { margin-top: 32px; padding-top: 20px; border-top: 1px solid var(--line); font-size: 14px; }

/* Consent */
.consent { position: fixed; left: 24px; right: 24px; bottom: 24px; z-index: 20; display: flex; flex-wrap: wrap; align-items: center; gap: 16px; max-width: 760px; margin: 0 auto; padding: 18px 22px; border-radius: var(--radius-lg); background: var(--card); border: 1px solid var(--line); box-shadow: var(--shadow-pop); font-size: 14px; }
.consent[hidden] { display: none; }
.consent p { flex: 1 1 320px; margin: 0; }
.consent-actions { display: flex; gap: 8px; }
.consent .btn { height: 38px; padding: 0 16px; font-size: 14px; }

@media (max-width: 960px) {
    .widget-hero, .form-section { grid-template-columns: 1fr; }
    .price-box { position: static; }
    .site-footer-grid { grid-template-columns: 1fr 1fr; }
}

@media (max-width: 860px) {
    .site-menu-button { display: grid; place-items: center; width: 44px; height: 44px; margin-left: auto; border-radius: var(--radius); cursor: pointer; }
    .site-menu-button span, .site-menu-button span::before, .site-menu-button span::after { display: block; width: 20px; height: 2px; background: var(--text); border-radius: 2px; content: ""; }
    .site-menu-button span { position: relative; }
    .site-menu-button span::before { position: absolute; top: -6px; }
    .site-menu-button span::after { position: absolute; top: 6px; }
    .site-nav { position: absolute; left: 0; right: 0; top: 68px; flex-direction: column; align-items: stretch; gap: 2px; padding: 12px 16px 16px; background: var(--card); border-bottom: 1px solid var(--line); box-shadow: var(--shadow-pop); display: none; }
    .site-menu-toggle:checked ~ .site-nav { display: flex; }
    .site-langs { margin: 8px 0 0; align-self: flex-start; }
}

@media (max-width: 650px) {
    .wrap { padding: 0 16px; }
    .page-head { padding-top: 40px; padding-bottom: 8px; }
    .hero { padding: 56px 0 40px; }
    .lead { font-size: 17px; }
    .widget-grid { grid-template-columns: 1fr; }
    .site-footer-grid { grid-template-columns: 1fr; }
    .card, .panel, .banner { padding: 22px; }
    .consent { left: 12px; right: 12px; bottom: 12px; }
}

@media (prefers-reduced-motion: reduce) {
    *, *::before, *::after { transition: none !important; animation: none !important; }
}
