/* ============================================================
   MarkOS — UI components
   ============================================================ */

/* ---------- Cards (generic) ---------- */
.card {
  background: #fff;
  border: 1px solid var(--line);
  border-radius: var(--r);
  padding: 28px;
  transition: border-color .2s var(--ease), transform .2s var(--ease), box-shadow .2s var(--ease);
}
.card--hover:hover { transform: translateY(-4px); box-shadow: 0 18px 40px -24px rgba(17,17,17,.28); border-color: var(--ink); }

/* ---------- Product catalog cards (home 5.2) ---------- */
.prodgrid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 0; border: 1px solid var(--line); border-radius: var(--r-lg); overflow: hidden; background: var(--line); }
.prodgrid { gap: 1px; }
.prodcard {
  background: #fff; padding: 30px 26px 26px; display: flex; flex-direction: column;
  position: relative; transition: background .22s var(--ease); min-height: 252px;
}
.prodcard::after { content: ""; position: absolute; left: 0; bottom: 0; height: 3px; width: 0; background: var(--pa, var(--ink)); transition: width .3s var(--ease); }
.prodcard:hover { background: var(--pa-tint, var(--gray-bg)); }
.prodcard:hover::after { width: 100%; }
.prodcard .hex, .prodcard .hexmark { width: 44px; margin-bottom: 20px; color: var(--pa, var(--ink)); }
.prodcard .pc-code { font-size: 12px; font-weight: 700; letter-spacing: .14em; color: var(--pa, var(--gray-text)); text-transform: uppercase; }
.prodcard .pc-name { font-size: 19px; font-weight: 700; margin-top: 3px; letter-spacing: -.01em; }
.prodcard .pc-desc { font-size: 14px; color: var(--gray-text); margin-top: 8px; line-height: 1.45; }
.prodcard .pc-benefit { font-size: 13.5px; margin-top: 14px; display: flex; gap: 8px; align-items: flex-start; color: var(--ink-70); }
.prodcard .pc-benefit svg { width: 15px; height: 15px; color: var(--pa, var(--ink)); flex-shrink: 0; margin-top: 2px; }
.prodcard .pc-more { margin-top: auto; padding-top: 18px; font-size: 14px; font-weight: 600; color: var(--pa, var(--ink)); display: inline-flex; align-items: center; gap: 6px; }
.prodcard .pc-more svg { width: 15px; height: 15px; transition: transform .2s var(--ease); }
.prodcard:hover .pc-more svg { transform: translateX(4px); }

/* ---------- Advantage / feature blocks (5.3) ---------- */
.feat { padding: 4px 0; }
.feat .feat-ico { width: 48px; height: 48px; border: 1px solid var(--line); border-radius: 12px; display: grid; place-items: center; margin-bottom: 20px; color: var(--accent); }
.feat .feat-ico svg { width: 24px; height: 24px; }
.feat h3 { margin-bottom: 10px; }
.feat p { color: var(--gray-text); font-size: 15px; }

/* numbered structural label */
.idx { font-size: 13px; font-weight: 700; color: var(--gray-text); letter-spacing: .04em; font-variant-numeric: tabular-nums; }

/* ---------- Industry tiles (5.4) ---------- */
.industry { position: relative; border: 1px solid var(--line); border-radius: var(--r); padding: 24px; background: #fff; overflow: hidden; transition: .2s var(--ease); }
.industry:hover { border-color: var(--ink); }
.industry h3 { font-size: 18px; }
.industry .ind-eds { display: flex; gap: 6px; margin-top: 16px; flex-wrap: wrap; }
.industry .ind-eds .chip { font-size: 11px; font-weight: 700; letter-spacing: .06em; padding: 4px 9px; border-radius: 6px; color: #fff; }

/* ---------- Integrations (5.5) ---------- */
.intg-grid { display: grid; grid-template-columns: repeat(4,1fr); gap: 1px; background: var(--line); border: 1px solid var(--line); border-radius: var(--r); overflow: hidden; }
.intg-cell { background: #fff; padding: 26px 20px; display: flex; flex-direction: column; gap: 8px; min-height: 110px; justify-content: center; transition: background .18s; }
.intg-cell:hover { background: var(--gray-bg); }
.intg-cell .ic-name { font-weight: 600; font-size: 15px; }
.intg-cell .ic-tag { font-size: 12.5px; color: var(--gray-text); }
.intg-cell .ic-mark { width: 30px; height: 30px; border-radius: 7px; background: var(--gray-bg); display: grid; place-items: center; font-weight: 700; font-size: 13px; color: var(--ink); margin-bottom: 4px; }

/* ---------- Stats (5.6) ---------- */
.stats { display: grid; grid-template-columns: repeat(4,1fr); gap: 0; }
.stat { padding: 8px 28px; border-left: 1px solid rgba(255,255,255,.16); }
.stat:first-child { border-left: 0; padding-left: 0; }
.stat .stat-num { font-size: clamp(2.6rem, 4.5vw, 3.6rem); font-weight: 700; letter-spacing: -.02em; line-height: 1; font-variant-numeric: tabular-nums; }
.stat .stat-lbl { color: rgba(255,255,255,.6); font-size: 14px; margin-top: 12px; }

/* ---------- CTA band ---------- */
.cta-band { background: var(--ink); color: #fff; border-radius: var(--r-lg); padding: clamp(36px, 5vw, 64px); position: relative; overflow: hidden; }
.cta-band .cta-inner { position: relative; z-index: 1; display: grid; grid-template-columns: 1.1fr .9fr; gap: 48px; align-items: center; }
.cta-band h2 { color: #fff; }
.cta-band p { color: rgba(255,255,255,.7); margin-top: 14px; }

/* quick form (compact) */
.quickform { display: grid; gap: 12px; }
.quickform .qf-row { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }

/* ---------- Forms ---------- */
.field { display: flex; flex-direction: column; gap: 7px; }
.field label { font-size: 13px; font-weight: 600; color: var(--ink-70); }
.field label .req { color: var(--accent); }
.input, .select, .textarea {
  width: 100%; padding: 13px 15px; border: 1px solid var(--line); border-radius: var(--r-sm);
  background: #fff; font-size: 15px; color: var(--ink); transition: border-color .15s, box-shadow .15s;
}
.input::placeholder, .textarea::placeholder { color: #a7a7ad; }
.input:focus, .select:focus, .textarea:focus { outline: none; border-color: var(--accent); box-shadow: 0 0 0 3px var(--accent-tint); }
.textarea { resize: vertical; min-height: 120px; }
.select { appearance: none; background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8' viewBox='0 0 12 8'%3E%3Cpath d='M1 1l5 5 5-5' stroke='%236B6B6B' stroke-width='1.6' fill='none' stroke-linecap='round'/%3E%3C/svg%3E"); background-repeat: no-repeat; background-position: right 15px center; padding-right: 40px; }
.field.invalid .input, .field.invalid .select, .field.invalid .textarea { border-color: #d23; box-shadow: 0 0 0 3px rgba(221,51,51,.12); }
.field .err { font-size: 12.5px; color: #d23; display: none; }
.field.invalid .err { display: block; }
.checkbox { display: grid; grid-template-columns: 20px 1fr; gap: 12px; align-items: start; font-size: 13.5px; color: var(--gray-text); line-height: 1.5; cursor: pointer; }
.checkbox input { width: 20px; height: 20px; margin-top: 1px; accent-color: var(--accent); }
.checkbox a { color: var(--accent); border-bottom: 1px solid currentColor; }
.form-note { font-size: 13px; color: var(--gray-text); }
.form-success { display: none; text-align: center; padding: 30px; }
.form-success.show { display: block; }
.form-success .fs-check { width: 64px; height: 64px; border-radius: 50%; background: var(--accent); color: #fff; display: grid; place-items: center; margin: 0 auto 20px; }
.form-card { background: #fff; border: 1px solid var(--line); border-radius: var(--r-lg); padding: clamp(26px, 3vw, 40px); }

/* on dark */
.on-ink .input, .on-ink .select, .on-ink .textarea { background: rgba(255,255,255,.06); border-color: rgba(255,255,255,.18); color: #fff; }
.on-ink .input::placeholder { color: rgba(255,255,255,.4); }
.on-ink .field label { color: rgba(255,255,255,.75); }
.on-ink .checkbox { color: rgba(255,255,255,.6); }

/* ============================================================
   TARIFFS (6.6 / 8)
   ============================================================ */
.tariff-toggle { display: inline-flex; align-items: center; gap: 0; background: var(--gray-bg); border-radius: 999px; padding: 4px; border: 1px solid var(--line); }
.tariff-toggle button { padding: 9px 20px; border-radius: 999px; font-size: 14px; font-weight: 600; color: var(--gray-text); background: transparent; transition: .18s var(--ease); }
.tariff-toggle button.is-active { background: #fff; color: var(--ink); box-shadow: 0 2px 8px -3px rgba(0,0,0,.2); }
.tariff-toggle .save-badge { font-size: 11px; font-weight: 700; color: var(--accent); margin-left: 6px; }

.tariffs { display: grid; grid-template-columns: repeat(4, 1fr); gap: 18px; align-items: start; }
.tariff {
  border: 1px solid var(--line); border-radius: var(--r-lg); padding: 28px 24px; background: #fff;
  display: flex; flex-direction: column; position: relative; transition: .2s var(--ease);
}
.tariff.is-popular { border-color: var(--accent); box-shadow: 0 0 0 1px var(--accent), 0 24px 50px -30px var(--accent); }
.tariff .pop-badge { position: absolute; top: -11px; left: 24px; background: var(--accent); color: var(--accent-ink); font-size: 11px; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; padding: 5px 11px; border-radius: 6px; }
.tariff .t-name { font-size: 15px; font-weight: 700; letter-spacing: .02em; text-transform: uppercase; color: var(--gray-text); }
.tariff.is-popular .t-name { color: var(--accent); }
.tariff .t-price { margin-top: 16px; display: flex; align-items: baseline; gap: 6px; }
.tariff .t-price .amt { font-size: clamp(1.9rem, 3vw, 2.4rem); font-weight: 700; letter-spacing: -.02em; line-height: 1; font-variant-numeric: tabular-nums; }
.tariff .t-price .per { font-size: 13px; color: var(--gray-text); }
.tariff .t-price.byrequest .amt { font-size: 1.7rem; }
.tariff .t-for { font-size: 13px; color: var(--gray-text); margin-top: 8px; min-height: 34px; }
.tariff .t-feats { margin-top: 20px; display: grid; gap: 10px; flex: 1; }
.tariff .t-feats li { display: flex; gap: 9px; font-size: 13.5px; line-height: 1.4; align-items: flex-start; }
.tariff .t-feats svg { width: 16px; height: 16px; color: var(--accent); flex-shrink: 0; margin-top: 1px; }
.tariff .btn { margin-top: 22px; }
.tariff-foot { margin-top: 22px; display: grid; gap: 8px; }
.tariff-foot .tf-line { font-size: 13.5px; color: var(--gray-text); display: flex; gap: 8px; }
.tariff-foot .tf-line strong { color: var(--ink); }
.tariff-foot .tf-line svg { width: 16px; height: 16px; flex-shrink: 0; color: var(--accent); margin-top: 2px; }

/* ---------- Injected-icon sizing safety ---------- */
.feat-ico svg { width: 24px; height: 24px; }
.channel .ch-ico svg { width: 22px; height: 22px; color: var(--ink); }
.fs-check svg { width: 30px; height: 30px; }
.footer-social a svg { width: 18px; height: 18px; }

/* ============================================================
   MODULES (6.3) — accordion groups
   ============================================================ */
.modgroup { border: 1px solid var(--line); border-radius: var(--r); overflow: hidden; }
.modgroup + .modgroup { margin-top: 16px; }
.modgroup-head { display: flex; align-items: center; justify-content: space-between; padding: 18px 22px; background: var(--gray-bg); cursor: pointer; }
.modgroup-head h3 { font-size: 16px; }
.modgroup-head .mg-count { font-size: 12px; color: var(--gray-text); font-weight: 600; }
.modgroup-body { display: grid; grid-template-columns: repeat(3,1fr); gap: 12px; background: #fff; padding: 16px; }
.module {
  background: #fff; border: 1px solid var(--line); border-radius: 10px; padding: 18px;
  transition: background .15s var(--ease), border-color .15s var(--ease);
  display: flex; flex-direction: column; gap: 8px;
}
.module:hover { background: var(--accent-tint); border-color: var(--accent); }
.module .mod-ico { width: 34px; height: 34px; border-radius: 8px; background: var(--accent-tint); color: var(--accent); display: grid; place-items: center; }
.module .mod-ico svg { width: 18px; height: 18px; }
.module .mod-name { font-weight: 600; font-size: 14.5px; }
.module .mod-desc { font-size: 13px; color: var(--gray-text); line-height: 1.45; }

/* ---------- Steps / how it works (6.4) ---------- */
.steps { display: grid; grid-template-columns: repeat(4,1fr); gap: 0; counter-reset: step; }
.step { padding: 0 26px; position: relative; }
.step:not(:last-child)::after { content:""; position:absolute; top: 22px; right: -1px; left: 50%; height: 1px; background: var(--line); }
.step .step-num { width: 46px; height: 46px; border-radius: 50%; border: 1px solid var(--accent); color: var(--accent); display: grid; place-items: center; font-weight: 700; font-size: 17px; background: #fff; position: relative; z-index: 1; }
.step h3 { font-size: 16px; margin: 18px 0 8px; }
.step p { font-size: 14px; color: var(--gray-text); }

/* ============================================================
   FAQ accordion (6.8)
   ============================================================ */
.faq { border-top: 1px solid var(--line); }
.faq-item { border-bottom: 1px solid var(--line); }
.faq-q { width: 100%; text-align: left; background: none; border: 0; padding: 24px 48px 24px 0; font-size: 17px; font-weight: 600; position: relative; display: flex; }
.faq-q::after { content: ""; position: absolute; right: 4px; top: 50%; width: 14px; height: 14px; margin-top: -7px; background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='14' height='14'%3E%3Cpath d='M7 1v12M1 7h12' stroke='%23111' stroke-width='1.6' stroke-linecap='round'/%3E%3C/svg%3E") center/contain no-repeat; transition: transform .25s var(--ease); }
.faq-item.open .faq-q::after { transform: rotate(135deg); }
.faq-a { max-height: 0; overflow: hidden; transition: max-height .3s var(--ease); }
.faq-a-inner { padding: 0 60px 26px 0; color: var(--gray-text); font-size: 15px; line-height: 1.6; }

/* ============================================================
   COMPARE TABLE (extra request)
   ============================================================ */
.cmp-wrap { border: 1px solid var(--line); border-radius: var(--r-lg); overflow: hidden; background: #fff; }
.cmp-scroll { overflow-x: auto; }
table.cmp { border-collapse: collapse; width: 100%; min-width: 920px; }
table.cmp th, table.cmp td { padding: 16px 14px; text-align: center; border-bottom: 1px solid var(--line); border-left: 1px solid var(--line); font-size: 14px; }
table.cmp th:first-child, table.cmp td:first-child { text-align: left; border-left: 0; position: sticky; left: 0; background: #fff; z-index: 2; font-weight: 600; min-width: 220px; }
table.cmp thead th { background: var(--ink); color: #fff; border-color: rgba(255,255,255,.12); position: sticky; top: 0; }
table.cmp thead th:first-child { background: var(--ink); color: #fff; z-index: 3; }
table.cmp thead .ed-hd { display: flex; flex-direction: column; align-items: center; gap: 8px; }
table.cmp thead .ed-hd .dot { width: 30px; display: inline-block; }
table.cmp thead .ed-hd .dot .hexmark { width: 30px; }
table.cmp thead .ed-hd .ed-code { font-weight: 700; letter-spacing: .06em; }
table.cmp thead .ed-hd .ed-pur { font-size: 11px; font-weight: 400; color: rgba(255,255,255,.6); max-width: 13ch; }
table.cmp tbody tr:hover td { background: var(--gray-bg); }
table.cmp tbody tr:hover td:first-child { background: var(--gray-bg); }
table.cmp .cat-row td { background: var(--gray-bg); font-weight: 700; text-align: left; font-size: 12px; letter-spacing: .1em; text-transform: uppercase; color: var(--gray-text); }
table.cmp .yes { color: #fff; }
.cmp-check { width: 22px; height: 22px; border-radius: 6px; display: inline-grid; place-items: center; }
.cmp-check svg { width: 13px; height: 13px; }
.cmp-dash { color: var(--line); font-size: 18px; }

/* ============================================================
   HERO graphics
   ============================================================ */
.hero { padding-block: clamp(56px, 8vw, 104px); position: relative; overflow: hidden; }
.hero-grid { display: grid; grid-template-columns: 1.05fr .95fr; gap: 56px; align-items: center; }
.hero h1 { margin-top: 22px; }
.hero .lead { margin-top: 24px; max-width: 46ch; }
.hero .hero-actions { margin-top: 36px; }
.hero-meta { margin-top: 40px; display: flex; gap: 34px; flex-wrap: wrap; }
.hero-meta .hm { }
.hero-meta .hm .v { font-size: 24px; font-weight: 700; letter-spacing: -.01em; }
.hero-meta .hm .l { font-size: 13px; color: var(--gray-text); margin-top: 2px; }

/* hexfield bg */
.hexfield { position: absolute; inset: 0; pointer-events: none; opacity: .5; }

/* product hero badge */
.prod-hero { padding-block: clamp(48px,6vw,88px); border-bottom: 1px solid var(--line); }
.prod-hero .ph-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 48px; align-items: center; }
.prod-hero .ph-tag { display: inline-flex; align-items: center; gap: 10px; font-size: 13px; font-weight: 600; color: var(--accent); }
.prod-hero .ph-tag .hex, .prod-hero .ph-tag .hexmark { width: 28px; }

/* ============================================================
   MOCK INTERFACES (stylized, brand-styled)
   ============================================================ */
.mock { border: 1px solid var(--line); border-radius: var(--r-lg); background: #fff; overflow: hidden; box-shadow: 0 30px 70px -40px rgba(17,17,17,.4); }
.mock-bar { height: 40px; background: var(--gray-bg); border-bottom: 1px solid var(--line); display: flex; align-items: center; padding: 0 14px; gap: 7px; }
.mock-bar .dot { width: 10px; height: 10px; border-radius: 50%; background: var(--line); }
.mock-bar .mb-title { margin-left: 12px; font-size: 12px; color: var(--gray-text); font-weight: 600; }
.mock-body { padding: 18px; display: grid; gap: 14px; }
.mock-kpis { display: grid; grid-template-columns: repeat(3,1fr); gap: 12px; }
.mk-kpi { border: 1px solid var(--line); border-radius: 10px; padding: 14px; }
.mk-kpi .k-l { font-size: 10px; letter-spacing: .08em; text-transform: uppercase; color: var(--gray-text); }
.mk-kpi .k-v { font-size: 22px; font-weight: 700; margin-top: 6px; font-variant-numeric: tabular-nums; }
.mk-kpi .k-d { font-size: 11px; color: var(--accent); font-weight: 600; margin-top: 2px; }
.mock-chart { border: 1px solid var(--line); border-radius: 10px; padding: 16px; }
.mock-chart .mc-head { display: flex; justify-content: space-between; font-size: 12px; color: var(--gray-text); margin-bottom: 14px; }
.bars { display: flex; align-items: flex-end; gap: 8px; height: 110px; }
.bars .bar { flex: 1; background: var(--accent-tint); border-radius: 5px 5px 0 0; position: relative; }
.bars .bar span { position: absolute; inset: auto 0 0 0; background: var(--accent); border-radius: 5px 5px 0 0; }
.mock-rows { border: 1px solid var(--line); border-radius: 10px; overflow: hidden; }
.mock-rows .mr { display: grid; grid-template-columns: 1fr auto auto; gap: 12px; padding: 11px 14px; border-bottom: 1px solid var(--line); font-size: 12.5px; align-items: center; }
.mock-rows .mr:last-child { border-bottom: 0; }
.mock-rows .mr .pill { font-size: 10px; font-weight: 700; padding: 3px 8px; border-radius: 5px; background: var(--accent-tint); color: var(--accent); }
.mock-rows .mr .swatch { width: 24px; height: 8px; border-radius: 3px; background: var(--gray-bg); }
.mock-side { display: grid; grid-template-columns: 56px 1fr; }
.mock-nav { background: var(--ink); padding: 14px 0; display: grid; gap: 8px; align-content: start; justify-items: center; }
.mock-nav .mn { width: 30px; height: 30px; border-radius: 8px; background: rgba(255,255,255,.1); }
.mock-nav .mn.act { background: var(--accent); }

/* ---------- Reveal helpers / misc ---------- */
.pagehead { padding-block: clamp(56px,7vw,96px) clamp(28px,3vw,44px); border-bottom: 1px solid var(--line); }
.breadcrumb { font-size: 13px; color: var(--gray-text); margin-bottom: 22px; display: flex; gap: 8px; }
.breadcrumb a:hover { color: var(--ink); }
.tag-row { display: flex; gap: 10px; flex-wrap: wrap; }
.tag { font-size: 12px; font-weight: 600; padding: 6px 12px; border: 1px solid var(--line); border-radius: 999px; color: var(--ink-70); }

/* support/docs */
.kb-grid { display: grid; grid-template-columns: repeat(4,1fr); gap: 16px; }
.kb-card { border: 1px solid var(--line); border-radius: var(--r); padding: 22px; transition: .2s var(--ease); }
.kb-card:hover { border-color: var(--ink); transform: translateY(-3px); }
.kb-card .hex, .kb-card .hexmark { width: 34px; margin-bottom: 14px; }
.kb-card h3 { font-size: 16px; }
.kb-card p { font-size: 13px; color: var(--gray-text); margin-top: 6px; }
.channel { display: flex; gap: 16px; align-items: flex-start; padding: 22px; border: 1px solid var(--line); border-radius: var(--r); }
.channel .ch-ico { width: 44px; height: 44px; border-radius: 11px; background: var(--gray-bg); display: grid; place-items: center; flex-shrink: 0; }
.channel h3 { font-size: 16px; }
.channel p { font-size: 14px; color: var(--gray-text); margin-top: 4px; }
.channel .ch-val { font-weight: 600; margin-top: 8px; }

/* legal */
.legal-layout { display: grid; grid-template-columns: 240px 1fr; gap: 48px; align-items: start; }
.legal-nav { position: sticky; top: calc(var(--header-h) + 24px); display: grid; gap: 4px; }
.legal-nav a { padding: 10px 14px; border-radius: 8px; font-size: 14px; color: var(--gray-text); font-weight: 500; }
.legal-nav a.is-active, .legal-nav a:hover { background: var(--gray-bg); color: var(--ink); }
.legal-doc h2 { margin-top: 40px; }
.legal-doc h2:first-child { margin-top: 0; }
.legal-doc h3 { margin-top: 26px; }
.legal-doc p, .legal-doc li { color: var(--ink-70); font-size: 15.5px; margin-top: 12px; line-height: 1.65; }
.legal-doc ul { list-style: disc; padding-left: 22px; }

@media (max-width: 1000px) {
  .prodgrid, .intg-grid, .kb-grid { grid-template-columns: repeat(2,1fr); }
  .tariffs, .stats, .steps, .mock-kpis { grid-template-columns: repeat(2,1fr); }
  .step:not(:last-child)::after { display: none; }
  .hero-grid, .prod-hero .ph-grid, .cta-band .cta-inner { grid-template-columns: 1fr; gap: 36px; }
  .modgroup-body { grid-template-columns: repeat(2,1fr); }
  .legal-layout { grid-template-columns: 1fr; }
  .legal-nav { position: static; display: flex; flex-wrap: wrap; }
}
@media (max-width: 640px) {
  .prodgrid, .intg-grid, .kb-grid, .tariffs, .stats, .modgroup-body, .mock-kpis, .steps { grid-template-columns: 1fr; }
  .stat { border-left: 0; padding: 14px 0; border-top: 1px solid rgba(255,255,255,.16); }
  .stat:first-child { border-top: 0; }
  .quickform .qf-row { grid-template-columns: 1fr; }
}
