@import url("fonts.css");

/* Peritus Design System tokens */
:root {
  --pine-950:#0A201D;--pine-900:#0E2B27;--pine-800:#133A34;--pine-700:#1B4D45;--pine-600:#26665B;--pine-500:#3A8273;--pine-400:#6AA597;--pine-300:#A3C8BE;--pine-200:#CFE3DC;--pine-100:#E7F1ED;--pine-50:#F3F8F6;
  --paper-0:#FFFFFF;--paper-50:#FAF8F4;--paper-100:#F3F0E9;--paper-200:#E7E2D7;--paper-300:#D3CCBD;--paper-400:#A9A192;--paper-500:#7D766A;--paper-600:#5B554B;--paper-700:#3F3A33;--paper-800:#2A2621;--paper-900:#1A1814;
  --brass-100:#F5EAD3;--brass-300:#E0C58E;--brass-500:#B8893A;--brass-700:#7A5619;
  --red-on-brand:#F4B4AA;
  --surface-page:var(--paper-50);--surface-card:var(--paper-0);--surface-sunken:var(--paper-100);--surface-inverse:var(--pine-900);--surface-brand:var(--pine-800);
  --text-strong:var(--paper-900);--text-body:var(--paper-800);--text-muted:var(--paper-600);--text-on-brand:var(--paper-50);--text-brand:var(--pine-700);--text-link:var(--pine-600);--text-accent:var(--brass-700);
  --border-subtle:var(--paper-200);--border-default:var(--paper-300);--border-on-brand:rgba(243,248,246,.16);
  --font-display:"Newsreader","Iowan Old Style",Georgia,serif;
  --font-sans:"Hanken Grotesk","Segoe UI",system-ui,sans-serif;
  --radius-sm:4px;--radius-md:6px;
  --shadow-focus:0 0 0 3px rgba(58,130,115,.28);--shadow-focus-on-brand:0 0 0 3px rgba(224,197,142,.6);
  --ease:cubic-bezier(.2,0,0,1);--dur-fast:120ms;
  --gx:clamp(20px, 3.2vw, 40px);--content-max:1040px;
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
body { margin: 0; background: var(--surface-page); color: var(--text-body); font-family: var(--font-sans); font-size: 16px; line-height: 1.55; -webkit-font-smoothing: antialiased; }
a { color: var(--text-link); text-decoration-thickness: 1px; text-underline-offset: 3px; }
a:hover { color: var(--pine-800); }
:focus-visible { outline: none; box-shadow: var(--shadow-focus); border-radius: 2px; }
::selection { background: var(--pine-200); color: var(--pine-950); }
img, svg { display: block; }
.num { font-variant-numeric: tabular-nums lining-nums; }
.visually-hidden { position: absolute !important; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.todo { background: var(--brass-100); color: var(--brass-700); padding: 0 4px; border-radius: 2px; font-weight: 600; }

/* Layout */
.layout { display: flex; flex-wrap: wrap; align-items: flex-start; min-height: 100vh; }
.layout-main { flex: 999 1 640px; min-width: 0; }
.wrap { max-width: var(--content-max); padding: 80px var(--gx); }
.split { display: flex; flex-wrap: wrap; gap: 32px 56px; }
.split > :first-child { flex: 1 1 280px; min-width: 0; }
.split > :last-child { flex: 2 1 480px; min-width: 0; }
.band-sunken { background: var(--surface-sunken); }
.rule-top { border-top: 1px solid var(--border-subtle); }

/* Type */
.eyebrow { margin: 0; font-size: 12px; letter-spacing: .12em; text-transform: uppercase; font-weight: 600; color: var(--text-accent); }
.h1 { margin: 0; max-width: 860px; font-family: var(--font-display); font-weight: 400; font-size: clamp(42px, 5.2vw, 72px); line-height: 1.04; letter-spacing: -0.02em; color: var(--text-strong); }
.h2 { margin: 0; font-family: var(--font-display); font-weight: 400; font-size: clamp(32px, 3.4vw, 40px); line-height: 1.1; letter-spacing: -0.01em; color: var(--text-strong); }
.h3 { margin: 0; font-family: var(--font-display); font-weight: 400; font-size: 22px; line-height: 1.25; color: var(--text-strong); }
.h2 i, .h1 i { color: var(--text-brand); }
.lead { margin: 0; max-width: 640px; font-size: 18px; line-height: 1.6; color: var(--text-muted); text-wrap: pretty; }
.muted { color: var(--text-muted); }
.small { font-size: 14px; }
.stack { display: flex; flex-direction: column; gap: 12px; }
.stack-lg { display: flex; flex-direction: column; gap: 28px; }
b, strong { font-weight: 600; color: var(--text-strong); }

/* Buttons */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 10px; height: 48px; padding: 0 24px; border: 1px solid transparent; border-radius: var(--radius-sm); font-family: var(--font-sans); font-size: 16px; font-weight: 600; letter-spacing: .005em; text-decoration: none; white-space: nowrap; cursor: pointer; transition: background var(--dur-fast) var(--ease), border-color var(--dur-fast) var(--ease); }
.btn-primary { background: var(--pine-800); color: var(--paper-50); }
.btn-primary:hover { background: var(--pine-700); color: var(--paper-50); }
.btn-primary:active { background: var(--pine-900); }
.btn-secondary { background: var(--paper-0); border-color: var(--border-default); color: var(--text-strong); }
.btn-secondary:hover { background: var(--paper-100); color: var(--text-strong); }
.btn-inverse { background: var(--paper-50); color: var(--pine-900); }
.btn-inverse:hover { background: var(--paper-0); color: var(--pine-900); }
.btn-ghost-on-brand { height: 40px; padding: 0 18px; font-size: 15px; background: transparent; border-color: rgba(243,248,246,.32); color: var(--paper-50); }
.btn-ghost-on-brand:hover { background: rgba(243,248,246,.08); color: var(--paper-50); }
.btn[disabled] { opacity: .6; cursor: progress; }
.btn-row { display: flex; flex-wrap: wrap; gap: 12px; }

/* Header */
.site-header { position: sticky; top: 0; z-index: 10; background: rgba(250,248,244,.92); -webkit-backdrop-filter: blur(8px); backdrop-filter: blur(8px); border-bottom: 1px solid var(--border-subtle); }
.site-header-inner { min-height: 72px; padding: 14px var(--gx); display: flex; flex-wrap: wrap; align-items: center; gap: 12px 40px; }
.wordmark { font-family: var(--font-display); font-size: 28px; letter-spacing: -0.01em; line-height: 1; color: var(--pine-800); text-decoration: none; }
.wordmark:hover { color: var(--pine-800); }
.site-nav { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 28px; flex: 1 1 auto; }
.site-nav a { font-size: 15px; font-weight: 500; color: var(--text-muted); text-decoration: none; }
.site-nav a:hover, .site-nav a[aria-current="page"] { color: var(--text-strong); }

/* Hero */
.hero { padding-top: 88px; padding-bottom: 88px; }
.insurer { display: flex; flex-wrap: wrap; align-items: center; gap: 12px 20px; padding-top: 20px; border-top: 1px solid var(--border-subtle); }
.insurer p { margin: 0; flex: 1 1 280px; min-width: 0; font-size: 14px; color: var(--text-muted); }
.logo-slot { flex: none; width: 140px; height: 44px; border: 1px dashed var(--border-default); border-radius: var(--radius-sm); display: flex; align-items: center; justify-content: center; font-size: 12px; color: var(--text-muted); }

/* Cards & lists */
.cards { display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: 16px; }
.card { background: var(--surface-card); border: 1px solid var(--border-subtle); border-radius: var(--radius-md); padding: 24px; display: flex; flex-direction: column; gap: 14px; }
.card p { margin: 0; font-size: 15px; color: var(--text-muted); }
.icon { flex: none; color: var(--pine-700); }
.checklist { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); column-gap: 32px; border-top: 2px solid var(--pine-800); }
.checklist li { display: flex; gap: 12px; align-items: flex-start; padding: 14px 0; border-bottom: 1px solid var(--border-subtle); }
.checklist .icon { margin-top: 3px; }
.steps { list-style: none; margin: 0; padding: 0; border-top: 2px solid var(--pine-800); }
.steps li { display: flex; align-items: baseline; gap: 24px; padding: 22px 0; border-bottom: 1px solid var(--border-default); }
.steps .n { flex: none; width: 48px; font-family: var(--font-display); font-size: 32px; line-height: 1; color: var(--brass-500); }
.steps .t { font-size: 18px; font-weight: 600; color: var(--text-strong); }
.steps p { margin: 6px 0 0; color: var(--text-muted); }

/* Table */
.table-box { overflow-x: auto; background: var(--surface-card); border: 1px solid var(--border-subtle); border-radius: var(--radius-md); }
.compare { width: 100%; min-width: 600px; border-collapse: collapse; table-layout: fixed; font-size: 15px; }
.compare th, .compare td { padding: 14px 16px; text-align: center; vertical-align: middle; border-bottom: 1px solid var(--border-subtle); }
.compare th[scope="row"], .compare thead th:first-child { text-align: left; padding-left: 24px; font-weight: 500; color: var(--text-strong); }
.compare thead th { vertical-align: bottom; padding-top: 20px; padding-bottom: 16px; border-bottom: 2px solid var(--pine-800); }
.compare thead th:first-child { font-size: 13px; font-weight: 600; color: var(--text-muted); }
.compare .pkg { display: block; font-family: var(--font-display); font-weight: 400; font-size: 22px; line-height: 1.2; color: var(--text-strong); }
.compare .min { display: block; font-size: 12px; font-weight: 500; color: var(--text-muted); }
.compare .hl { background: var(--pine-50); }
.compare .none { color: var(--text-muted); }
.compare tbody tr:last-child th, .compare tbody tr:last-child td { border-bottom: 0; padding-top: 16px; padding-bottom: 16px; }
.compare .fig { font-family: var(--font-display); font-size: 20px; color: var(--text-strong); }
.notes { display: flex; flex-wrap: wrap; gap: 16px 56px; font-size: 14px; color: var(--text-muted); }
.notes p { margin: 0; flex: 1 1 320px; min-width: 0; }

/* Cost */
.calc { background: var(--surface-card); border: 1px solid var(--border-subtle); border-radius: var(--radius-md); padding: 28px; display: flex; flex-direction: column; gap: 22px; }
.bar-row { display: flex; flex-direction: column; gap: 8px; }
.bar-label { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 4px 12px; font-size: 15px; }
.bar { height: 12px; background: var(--paper-100); border-radius: 2px; }
.bar > span { display: block; height: 100%; border-radius: 2px; }
.delta { display: flex; align-items: baseline; gap: 16px; padding-top: 20px; border-top: 1px solid var(--border-subtle); }
.delta .big { flex: none; font-family: var(--font-display); font-size: 40px; line-height: 1; color: var(--text-brand); }
.delta span:last-child { font-size: 15px; color: var(--text-muted); }

.signature { align-self: stretch; padding-top: 20px; border-top: 2px solid var(--pine-800); display: flex; flex-direction: column; gap: 2px; }
.signature .name { font-family: var(--font-display); font-size: 24px; color: var(--text-strong); }
.signature .meta { display: flex; flex-wrap: wrap; gap: 4px 20px; padding-top: 8px; font-size: 15px; color: var(--text-muted); }

/* Sidebar form */
.sidebar { flex: 1 1 480px; min-width: 0; max-width: 100%; position: sticky; top: 0; height: 100vh; overflow-y: auto; background: var(--surface-brand); color: var(--text-on-brand); }
.sidebar-inner { min-height: 100%; padding: 48px clamp(20px, 4vw, 56px); display: flex; flex-direction: column; }
.sidebar-content { margin: auto 0; display: flex; flex-direction: column; gap: 24px; }
.sidebar :focus-visible { box-shadow: var(--shadow-focus-on-brand); }
.sidebar .eyebrow { color: var(--brass-300); }
.sidebar h2 { margin: 0; font-family: var(--font-display); font-weight: 400; font-size: 32px; line-height: 1.15; color: var(--paper-50); }
.sidebar p { margin: 0; font-size: 15px; color: var(--pine-200); }
.sidebar a { color: var(--paper-50); }
.sidebar a:hover { color: var(--brass-300); }
.sidebar b { color: var(--paper-50); }
.form { display: flex; flex-direction: column; gap: 18px; }
.field { display: flex; flex-direction: column; gap: 6px; }
.field label { font-size: 14px; font-weight: 600; color: var(--paper-50); }
.field input { width: 100%; height: 44px; padding: 0 12px; border: 2px solid transparent; border-radius: var(--radius-sm); background: var(--paper-0); font-family: var(--font-sans); font-size: 16px; color: var(--text-strong); }
.field input::placeholder { color: var(--paper-500); }
.field input:focus { outline: none; box-shadow: var(--shadow-focus-on-brand); }
.field input[aria-invalid="true"] { border-color: var(--red-on-brand); }
.error { font-size: 13px; color: var(--red-on-brand); }
.error:empty { display: none; }
.consent { display: flex; gap: 10px; align-items: flex-start; font-size: 13px; line-height: 1.5; color: var(--pine-200); cursor: pointer; }
.consent input { flex: none; width: 18px; height: 18px; margin: 1px 0 0; accent-color: var(--brass-300); }
.form .btn { width: 100%; }
.form-status { font-size: 14px; color: var(--red-on-brand); }
.form-status:empty { display: none; }
.trust { display: flex; gap: 10px; align-items: flex-start; padding-top: 18px; border-top: 1px solid var(--border-on-brand); font-size: 13px; color: var(--pine-300); }
.trust .icon { color: var(--brass-300); margin-top: 2px; }
.success { display: flex; flex-direction: column; gap: 16px; }
.success-icon { width: 44px; height: 44px; border-radius: 999px; background: rgba(243,248,246,.1); display: flex; align-items: center; justify-content: center; color: var(--brass-300); }
.sidebar-contact { display: flex; flex-direction: column; gap: 2px; padding-top: 18px; border-top: 1px solid var(--border-on-brand); font-size: 13px; color: var(--pine-300); }
.sidebar-contact .name { font-family: var(--font-display); font-size: 18px; color: var(--paper-50); }
[hidden] { display: none !important; }

/* Footer */
.site-footer { background: var(--surface-inverse); color: var(--pine-200); }
.site-footer a { color: var(--pine-200); }
.site-footer a:hover { color: var(--paper-50); }
.footer-top { padding: 56px var(--gx) 40px; display: flex; flex-wrap: wrap; gap: 32px 56px; }
.footer-top > :first-child { flex: 1 1 280px; min-width: 0; display: flex; flex-direction: column; gap: 12px; }
.footer-top p { margin: 0; font-size: 15px; line-height: 1.6; }
.footer-top .wordmark { font-size: 32px; color: var(--paper-50); }
.footer-legal { flex: 2 1 480px; min-width: 0; max-width: 820px; }
.footer-bottom { padding: 20px var(--gx) 32px; border-top: 1px solid var(--border-on-brand); display: flex; flex-wrap: wrap; justify-content: space-between; gap: 12px 24px; font-size: 13px; color: var(--pine-300); }
.footer-bottom nav { display: flex; gap: 20px; }

/* Legal pages */
.doc { max-width: 760px; padding: 72px var(--gx) 96px; }
.doc h1 { margin: 12px 0 8px; font-family: var(--font-display); font-weight: 400; font-size: clamp(36px, 4.4vw, 52px); line-height: 1.08; letter-spacing: -0.015em; color: var(--text-strong); }
.doc .updated { margin: 0 0 40px; font-size: 14px; color: var(--text-muted); }
.doc h2 { margin: 48px 0 12px; padding-top: 20px; border-top: 1px solid var(--border-subtle); font-family: var(--font-display); font-weight: 400; font-size: 26px; line-height: 1.2; color: var(--text-strong); }
.doc h3 { margin: 28px 0 8px; font-size: 17px; font-weight: 600; color: var(--text-strong); }
.doc p, .doc li { font-size: 16px; line-height: 1.65; }
.doc ul { padding-left: 20px; }
.doc li + li { margin-top: 6px; }
.doc dl { display: grid; grid-template-columns: minmax(150px, 220px) 1fr; gap: 0; margin: 0; border-top: 2px solid var(--pine-800); }
.doc dt, .doc dd { margin: 0; padding: 12px 0; border-bottom: 1px solid var(--border-subtle); }
.doc dt { font-weight: 600; color: var(--text-strong); padding-right: 16px; }
.doc .callout { margin: 24px 0; padding: 16px 20px; background: var(--surface-sunken); border-radius: var(--radius-md); font-size: 15px; }
@media (max-width: 560px) {
  .doc dl { grid-template-columns: 1fr; }
  .doc dt { padding-bottom: 0; border-bottom: 0; }
  .doc dd { padding-top: 2px; }
}

/* Copy helpers */
.subtitle { margin: 0; max-width: 720px; font-family: var(--font-display); font-size: clamp(22px, 2.4vw, 28px); line-height: 1.3; color: var(--text-brand); }
.features { list-style: none; margin: 0; padding: 0; border-top: 2px solid var(--pine-800); }
.features li { display: flex; gap: 18px; align-items: flex-start; padding: 22px 0; border-bottom: 1px solid var(--border-default); }
.features .icon { margin-top: 2px; }
.features .t { margin: 0; font-size: 18px; font-weight: 600; line-height: 1.35; color: var(--text-strong); }
.features p { margin: 6px 0 0; color: var(--text-muted); }
.subhead { margin: 0; font-size: 18px; font-weight: 600; color: var(--text-strong); }
.body-l { margin: 0; font-size: 17px; line-height: 1.6; }
.fineprint { margin: 0; font-size: 13px; line-height: 1.5; color: var(--text-muted); }
.insurer-logo { flex: none; width: auto; height: 40px; }
.footer-legal { display: flex; flex-direction: column; gap: 10px; }
.footer-legal p { font-size: 13px; color: var(--pine-300); }
.footer-title { margin: 0; font-size: 12px; letter-spacing: .12em; text-transform: uppercase; font-weight: 600; color: var(--brass-300); }

/* Responsive */
.btn-sm { height: 36px; padding: 0 14px; font-size: 14px; }
.header-cta { display: none; }
.scroll-hint { display: none; margin: -16px 0 -20px; align-items: center; gap: 6px; font-size: 13px; color: var(--text-muted); }
.sidebar { height: 100dvh; transition: flex-basis 320ms var(--ease), box-shadow 320ms var(--ease); }
.sidebar-close { display: none; position: absolute; top: 20px; right: 20px; z-index: 1; width: 40px; height: 40px; align-items: center; justify-content: center; border: 1px solid transparent; border-radius: var(--radius-sm); background: transparent; color: var(--pine-200); cursor: pointer; }
.sidebar-close:hover { background: rgba(243,248,246,.08); color: var(--paper-50); }
.field input { scroll-margin-top: 140px; }
.sidebar { scroll-margin-top: 64px; }
@media (min-width: 1120px) {
  /* "Kérek … számítást" click: the sticky form widens instead of scrolling */
  .sidebar { position: sticky; }
  .sidebar.is-expanded { flex-basis: clamp(480px, calc(100vw - 680px), 640px); box-shadow: inset 4px 0 0 var(--brass-300), -24px 0 48px -24px rgba(14,43,39,.35); }
  .sidebar.is-expanded .sidebar-close { display: inline-flex; }
}
.table-box { -webkit-overflow-scrolling: touch; }
.compare th[scope="row"], .compare thead th:first-child { position: sticky; left: 0; z-index: 1; background: var(--surface-card); }
.signature .meta, .sidebar-contact, .footer-top p { overflow-wrap: anywhere; }

/* Tablet & phone: the form becomes a full-width green section above the footer */
@media (max-width: 1119px) {
  .sidebar { position: static; height: auto; overflow: visible; flex-basis: 100%; }
  .sidebar-inner { padding-top: 64px; padding-bottom: 64px; }
  .sidebar-content { width: 100%; max-width: 560px; }
  .header-cta { display: inline-flex; margin-left: auto; }
}

/* Phone */
@media (max-width: 719px) {
  .site-header-inner { min-height: 0; padding-top: 12px; padding-bottom: 12px; gap: 10px 16px; }
  .wordmark { font-size: 26px; }
  .site-nav { order: 3; flex: 1 1 100%; flex-wrap: nowrap; gap: 24px; overflow-x: auto; margin: 0 calc(var(--gx) * -1) -12px; padding: 0 var(--gx) 12px; scrollbar-width: none; -webkit-overflow-scrolling: touch; }
  .site-nav::-webkit-scrollbar { display: none; }
  .site-nav a { flex: none; font-size: 14px; }
  .wrap { padding-top: 56px; padding-bottom: 56px; }
  .hero { padding-top: 44px; padding-bottom: 56px; }
  .stack-lg { gap: 22px; }
  .lead { font-size: 17px; }
  .split { gap: 24px; }
  .card { padding: 20px; }
  .calc { padding: 20px; }
  .steps li { gap: 16px; }
  .steps .n { width: 36px; font-size: 26px; }
  .scroll-hint { display: flex; }
  .compare { font-size: 14px; min-width: 520px; }
  .compare th, .compare td { padding: 12px 10px; }
  .compare th[scope="row"], .compare thead th:first-child { padding-left: 16px; }
  .compare .pkg { font-size: 19px; }
  .compare .fig { font-size: 17px; }
  .insurer-logo { height: 34px; }
  .sidebar-inner { padding-top: 48px; padding-bottom: 48px; }
  .sidebar h2 { font-size: 28px; }
  .footer-top { padding-top: 44px; padding-bottom: 32px; }
  .doc { padding-top: 44px; padding-bottom: 64px; }
  .doc h2 { margin-top: 36px; font-size: 23px; }
}

@media (max-width: 479px) {
  .btn-row .btn { flex: 1 1 100%; }
  .btn { white-space: normal; text-align: center; }
}
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  * { transition: none !important; }
}

/* Költség: bér vs. biztosítás példa */
.example-box { border-radius: var(--radius-sm); }
.compare.example { min-width: 0; }
.compare.example th, .compare.example td { position: static; }
.compare.example .pkg { font-size: 18px; }
.compare.example .fig { display: block; font-size: 22px; }
.compare.example td { vertical-align: top; }
.delta b { font-size: 16px; line-height: 1.5; }
