/* KaniPOS homepage — receipt-led design */
.kp2 {
  --ink: #0b2b29;
  --ink-soft: #46625f;
  --paper: #ffffff;
  --wash: #eef6f5;
  --rule: #d3e3e1;
  --teal: #0d9488;
  --teal-deep: #0f766e;
  --pay: #f97316;
  --display: 'Bricolage Grotesque', 'Public Sans', system-ui, sans-serif;
  --body: 'Public Sans', system-ui, sans-serif;
  --mono: 'JetBrains Mono', ui-monospace, Menlo, monospace;
  font-family: var(--body);
  color: var(--ink);
  background: var(--paper);
}
html.dark .kp2 {
  --ink: #e6f2f0;
  --ink-soft: #9fb9b6;
  --paper: #071a19;
  --wash: #0c2523;
  --rule: #1d3b38;
}
.kp2 *, .kp2 *::before, .kp2 *::after { box-sizing: border-box; }
.kp2 a { color: inherit; }
.kp2 :focus-visible { outline: 3px solid var(--pay); outline-offset: 3px; border-radius: 6px; }
.kp2-wrap { width: min(1120px, calc(100% - 40px)); margin: 0 auto; }

.kp2 h1, .kp2 h2, .kp2 h3 { font-family: var(--display); color: var(--ink); margin: 0; letter-spacing: -0.02em; }
.kp2 h1 { font-size: clamp(2.4rem, 5.6vw, 4.25rem); line-height: 1.02; font-weight: 800; font-variation-settings: 'wdth' 85; }
.kp2 h2 { font-size: clamp(1.75rem, 3.4vw, 2.6rem); line-height: 1.08; font-weight: 750; }
.kp2 h3 { font-size: 1.2rem; line-height: 1.25; font-weight: 700; }
.kp2 p { margin: 0; line-height: 1.6; max-width: 62ch; }
.kp2 .lede { font-size: 1.15rem; color: var(--ink-soft); }

.kp2-btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; min-height: 48px; padding: 0 22px; border-radius: 999px; font-weight: 700; font-size: 1rem; text-decoration: none; border: 2px solid transparent; cursor: pointer; }
.kp2-btn-main { background: var(--teal); color: #fff !important; }
.kp2-btn-main:hover { background: var(--teal-deep); }
.kp2-btn-line { border-color: var(--ink); color: var(--ink); background: transparent; }
.kp2-btn-line:hover { background: var(--ink); color: var(--paper) !important; }

/* Hero */
.kp2-hero { padding: 56px 0 72px; background: var(--wash); border-bottom: 1px solid var(--rule); overflow: hidden; }
.kp2-hero-grid { display: grid; grid-template-columns: 1.1fr 0.9fr; gap: 56px; align-items: center; }
.kp2-hero-copy .lede { margin-top: 20px; }
.kp2-hero-actions { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 30px; }
.kp2-hero-note { margin-top: 18px; font-size: 0.92rem; color: var(--ink-soft); }

.kp2-till { position: relative; justify-self: center; width: min(360px, 100%); }
.kp2-slot { height: 18px; border-radius: 10px 10px 0 0; background: var(--ink); position: relative; z-index: 2; }
.kp2-receipt {
  position: relative; z-index: 1; margin: -6px 14px 0; padding: 22px 20px 26px; background: #fff; color: #1c2b2a;
  font-family: var(--mono); font-size: 13px; line-height: 1.55;
  box-shadow: 0 18px 40px -18px rgba(11, 43, 41, 0.45);
  -webkit-mask: radial-gradient(circle 7px at 50% 100%, transparent 6.5px, #000 7px) bottom / 16px 100% repeat-x;
          mask: radial-gradient(circle 7px at 50% 100%, transparent 6.5px, #000 7px) bottom / 16px 100% repeat-x;
  animation: kp2-print 1.1s cubic-bezier(.2,.7,.2,1) both .2s;
}
@keyframes kp2-print { from { transform: translateY(-70%); clip-path: inset(70% 0 0 0); } to { transform: none; clip-path: inset(0 0 0 0); } }
.kp2-receipt .c { text-align: center; }
.kp2-receipt .b { font-weight: 700; }
.kp2-receipt .rule { border-top: 1px dashed #9db3b0; margin: 10px 0; }
.kp2-receipt .row { display: flex; justify-content: space-between; gap: 12px; }
.kp2-receipt .total { font-size: 16px; font-weight: 800; }
.kp2-receipt .muted { color: #5b6f6d; }
.kp2-receipt .empty { color: #8aa09d; text-align: center; padding: 6px 0; }
.kp2-qr { display: block; width: 104px; height: 104px; margin: 10px auto 4px; image-rendering: pixelated; }
.kp2-paynow { display: inline-block; margin-top: 2px; padding: 1px 8px; border-radius: 4px; background: #7b1fa2; color: #fff; font-weight: 700; font-size: 11px; letter-spacing: .02em; }

.kp2-menu { display: flex; flex-wrap: wrap; justify-content: center; gap: 8px; margin-top: 18px; }
.kp2-menu button { font: 600 0.95rem var(--body); color: var(--ink); background: var(--paper); border: 1.5px solid var(--rule); border-radius: 999px; padding: 9px 14px; cursor: pointer; }
.kp2-menu button:hover { border-color: var(--teal); }
.kp2-menu button:active { transform: scale(.97); }
.kp2-menu .clear { border-style: dashed; color: var(--ink-soft); }
.kp2-menu-hint { text-align: center; font-size: 0.85rem; color: var(--ink-soft); margin-top: 10px; }

/* Receipt anatomy (features) */
.kp2-sec { padding: 88px 0; }
.kp2-sec-head { max-width: 640px; margin-bottom: 44px; }
.kp2-sec-head p { margin-top: 14px; color: var(--ink-soft); font-size: 1.05rem; }
.kp2-anatomy { display: grid; gap: 0; border-top: 1px solid var(--rule); }
.kp2-part { display: grid; grid-template-columns: 300px 1fr; gap: 40px; align-items: center; padding: 26px 0; border-bottom: 1px solid var(--rule); }
.kp2-frag { font-family: var(--mono); font-size: 13px; line-height: 1.55; background: #fff; color: #1c2b2a; padding: 14px 16px; border: 1px solid var(--rule); border-left: 4px solid var(--teal); }
.kp2-frag .row { display: flex; justify-content: space-between; gap: 10px; }
.kp2-frag mark { background: #ccfbf1; color: inherit; padding: 0 3px; }
.kp2-part p { color: var(--ink-soft); margin-top: 6px; }

/* Two businesses */
.kp2-biz { display: grid; grid-template-columns: 1fr 1fr; gap: 56px; align-items: center; padding: 40px 0; }
.kp2-biz + .kp2-biz { border-top: 1px solid var(--rule); }
.kp2-biz.flip .kp2-biz-img { order: 2; }
.kp2-biz-img img { width: 100%; display: block; border-radius: 14px; border: 1px solid var(--rule); box-shadow: 0 30px 60px -36px rgba(11,43,41,.55); }
.kp2-biz ul { margin: 18px 0 26px; padding: 0; list-style: none; }
.kp2-biz li { padding: 8px 0 8px 26px; position: relative; color: var(--ink-soft); }
.kp2-biz li::before { content: ''; position: absolute; left: 0; top: 16px; width: 12px; height: 2px; background: var(--teal); }

/* Steps — a real sequence, so numbered */
.kp2-steps { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(3, 1fr); gap: 32px; counter-reset: kp2step; }
.kp2-steps li { counter-increment: kp2step; border-top: 3px solid var(--ink); padding-top: 18px; }
.kp2-steps li::before { content: counter(kp2step); display: block; font-family: var(--display); font-weight: 800; font-size: 2.6rem; line-height: 1; color: var(--teal); margin-bottom: 10px; }
.kp2-steps p { color: var(--ink-soft); margin-top: 6px; }

/* FAQ */
.kp2-faq { max-width: 760px; }
.kp2-faq details { border-bottom: 1px solid var(--rule); }
.kp2-faq summary { cursor: pointer; list-style: none; padding: 20px 36px 20px 0; position: relative; font-weight: 700; font-size: 1.08rem; }
.kp2-faq summary::-webkit-details-marker { display: none; }
.kp2-faq summary::after { content: '+'; position: absolute; right: 4px; top: 16px; font-size: 1.5rem; font-weight: 400; color: var(--teal); }
.kp2-faq details[open] summary::after { content: '–'; }
.kp2-faq details p { color: var(--ink-soft); padding: 0 0 22px; }

/* Closing band */
.kp2-close { background: var(--ink); color: #e6f2f0; padding: 72px 0; }
html.dark .kp2-close { background: #0d3532; }
.kp2-close h2 { color: #fff; }
.kp2-close p { color: #b9d3d0; margin-top: 12px; }
.kp2-close .kp2-btn-line { border-color: #e6f2f0; color: #e6f2f0; }
.kp2-close .kp2-btn-line:hover { background: #e6f2f0; color: var(--ink) !important; }
.kp2-close-grid { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: center; gap: 28px; }

/* Site header on kp2 pages: flat, no glow */
body:has(.kp2) .nav-cta .btn-p { background: var(--kp2-teal, #0d9488); box-shadow: none; border-radius: 999px; }
body:has(.kp2) .nav-cta .btn-p:hover { background: #0f766e; }

/* Inner page hero */
.kp2-page-hero { padding: 64px 0 40px; border-bottom: 1px solid var(--rule); }
.kp2-page-hero h1 { font-size: clamp(2.2rem, 4.6vw, 3.6rem); max-width: 16ch; }
.kp2-page-hero .lede { max-width: 58ch; margin-top: 20px; }

/* Role / screen switcher */
.kp2-switch { display: grid; grid-template-columns: minmax(260px, 340px) 1fr; gap: 40px; align-items: start; }
.kp2-switch-list { border-top: 1px solid var(--rule); }
.kp2-switch-item { border-bottom: 1px solid var(--rule); padding: 16px 0 16px 18px; border-left: 3px solid transparent; }
.kp2-switch-item.on { border-left-color: var(--teal); background: var(--wash); }
.kp2-switch-item button { all: unset; cursor: pointer; font-family: var(--display); font-weight: 700; font-size: 1.15rem; color: var(--ink); display: block; width: 100%; }
.kp2-switch-item button:focus-visible { outline: 3px solid var(--pay); outline-offset: 4px; border-radius: 4px; }
.kp2-switch-item p, .kp2-switch-item a { display: none; }
.kp2-switch-item.on p { display: block; color: var(--ink-soft); margin: 8px 0 10px; font-size: .97rem; }
.kp2-switch-item.on a { display: inline-block; color: var(--teal-deep); font-weight: 700; text-underline-offset: 3px; }
.kp2-switch-view { position: sticky; top: 90px; }
.kp2-switch-view figure { margin: 0; border: 1px solid var(--rule); border-radius: 14px; overflow: hidden; background: var(--wash); }
.kp2-switch-view img { display: block; width: 100%; height: auto; }

.kp2-checks { list-style: none; padding: 0; margin: 0; display: grid; grid-template-columns: repeat(2, 1fr); gap: 14px 40px; }
.kp2-checks li { padding-left: 28px; position: relative; color: var(--ink-soft); }
.kp2-checks li::before { content: ''; position: absolute; left: 0; top: .5em; width: 14px; height: 8px; border-left: 3px solid var(--teal); border-bottom: 3px solid var(--teal); transform: rotate(-45deg); }
.kp2-checks b { color: var(--ink); }

/* Pricing (shared renderer) restyled */
.kp2-pricing .sec-h .chip { display: none; }
.kp2-pricing .sec-h h2 { font-size: clamp(2.2rem, 4.6vw, 3.4rem); }
.kp2-pricing .p-card { background: var(--paper); border: 2px solid var(--ink); border-radius: 14px; box-shadow: none; }
.kp2-pricing .p-name { font-family: var(--display); color: var(--ink); }
.kp2-pricing .p-amt { font-family: var(--display); color: var(--ink); }
.kp2-pricing .p-cta, .kp2-pricing .p-cta.teal { background: var(--teal); color: #fff; border-radius: 999px; box-shadow: none; background-image: none; }
.kp2-pricing .p-cta:hover { background: var(--teal-deep); }
.kp2-pricing .p-bill-btn.active { background: var(--ink); color: var(--paper); }
.kp2-pricing .p-custom { background: var(--wash); border: 1px solid var(--rule); background-image: none; box-shadow: none; }
.kp2-pricing .p-custom-tag, .kp2-pricing .p-bill-btn, .kp2-pricing .p-badge { text-transform: none !important; letter-spacing: 0 !important; font-size: .8rem !important; }
.kp2-pricing .p-badge { background: var(--ink) !important; }
.kp2-pricing .p-card:hover { transform: none; }
.kp2-pricing .p-card.popular { border-color: var(--teal); border-width: 3px; }
.kp2-pricing .p-card.enterprise { background: var(--wash); border: 2px dashed var(--teal); }
.kp2-pricing .p-cta.purple, .kp2-pricing .p-cta.ghost { background: var(--ink); color: #fff; border: 0; }
.kp2-pricing .p-cta { font-size: .95rem; letter-spacing: 0; padding: 14px 16px; }
.kp2-pricing .p-check, .kp2-pricing .p-cur { color: var(--teal-deep); }
.kp2-pricing .p-bill-btn.active { box-shadow: none; }

@media (max-width: 900px) {
  .kp2-switch { grid-template-columns: 1fr; gap: 24px; }
  .kp2-switch-view { position: static; order: -1; }
  .kp2-checks { grid-template-columns: 1fr; }
  .kp2-hero-grid, .kp2-biz { grid-template-columns: 1fr; gap: 36px; }
  .kp2-biz.flip .kp2-biz-img { order: 0; }
  .kp2-part { grid-template-columns: 1fr; gap: 14px; }
  .kp2-steps { grid-template-columns: 1fr; }
  .kp2-sec { padding: 64px 0; }
  .kp2-hero { padding-top: 36px; }
}

/* Legal pages (privacy, terms) */
.kp2-legal { max-width: 46rem; padding-top: 56px; padding-bottom: 80px; }
.kp2-legal h1 { font-size: clamp(2.2rem, 5vw, 3.2rem); margin-bottom: 10px; }
.kp2-legal h2 { font-size: 1.35rem; margin: 2.4rem 0 .6rem; scroll-margin-top: 90px; }
.kp2-legal p, .kp2-legal li { color: var(--ink-soft); line-height: 1.7; }
.kp2-legal ul { padding-left: 1.25rem; margin: .4rem 0; }
.kp2-legal li { margin: .35rem 0; }
.kp2-legal a { color: var(--teal-deep); text-underline-offset: 3px; }
.kp2-legal code { font-size: .9em; background: var(--wash); padding: 1px 5px; border-radius: 4px; }
.kp2-legal-meta { font-size: .92rem; color: var(--ink-soft); margin-bottom: 1.6rem; }
.kp2-legal-toc { display: flex; flex-wrap: wrap; gap: 8px 18px; padding: 16px 0; margin: 1.6rem 0; border-top: 1px solid var(--rule); border-bottom: 1px solid var(--rule); }
.kp2-legal-toc a { font-weight: 600; font-size: .95rem; text-decoration: none; }
.kp2-legal-toc a:hover { text-decoration: underline; }
.kp2-legal-table { width: 100%; border-collapse: collapse; margin: .8rem 0; font-size: .95rem; }
.kp2-legal-table th, .kp2-legal-table td { text-align: left; padding: 10px 12px 10px 0; border-bottom: 1px solid var(--rule); vertical-align: top; color: var(--ink-soft); }
.kp2-legal-table th { color: var(--ink); font-weight: 700; }
@media (max-width: 600px) { .kp2-legal-table { display: block; overflow-x: auto; } }

@media (prefers-reduced-motion: reduce) {
  .kp2-receipt { animation: none; }
}
