/* ==========================================================================
   Cheque Management System — cmssl.lk
   Brand: Ledger Teal / Confirm Gold. Fraunces (display), IBM Plex Sans (body),
   IBM Plex Mono (captions / labels).
   ========================================================================== */

:root {
  --teal: #0E6B59;
  --teal-deep: #0B4F42;
  --gold: #D9A441;
  --teal-tint: #CFE8E1;
  --ink: #17201D;
  --paper: #F7F5F0;
  --white: #FFFFFF;

  --ink-soft: #4B564F;
  --hairline: #E1DCD0;

  --font-display: "Fraunces", Georgia, "Times New Roman", serif;
  --font-body: "IBM Plex Sans", -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  --font-mono: "IBM Plex Mono", "SFMono-Regular", Consolas, monospace;

  --radius-card: 20px;
  --radius-badge: 14px;
  --radius-input: 10px;

  --shadow-card: 0 1px 2px rgba(11, 79, 66, 0.06), 0 12px 28px rgba(11, 79, 66, 0.08);
  --shadow-lift: 0 20px 44px rgba(11, 79, 66, 0.16);

  --wrap: 1180px;
}

/* ---------- Reset ---------- */
*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
html, body { overflow-x: hidden; }
body {
  margin: 0;
  font-family: var(--font-body);
  color: var(--ink);
  background: var(--paper);
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
}
h1, h2, h3, h4, p { overflow-wrap: break-word; }
img { max-width: 100%; display: block; }
ul, ol { margin: 0; padding: 0; list-style: none; }
a { color: inherit; text-decoration: none; }
h1, h2, h3, h4 { margin: 0; font-family: var(--font-display); font-weight: 600; color: var(--ink); }
p { margin: 0; }
button { font: inherit; color: inherit; background: none; border: 0; cursor: pointer; }

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { animation-duration: 0.01ms !important; animation-iteration-count: 1 !important; transition-duration: 0.01ms !important; }
}

.skip-link {
  position: absolute;
  left: -9999px;
  top: 0;
  background: var(--teal-deep);
  color: var(--white);
  padding: 12px 18px;
  z-index: 200;
  border-radius: 0 0 var(--radius-input) 0;
}
.skip-link:focus { left: 0; }

:focus-visible {
  outline: 2px solid var(--teal);
  outline-offset: 3px;
}

.wrap {
  max-width: var(--wrap);
  margin-inline: auto;
  padding-inline: 20px;
}
.wrap--narrow { max-width: 760px; }

@media (min-width: 640px) {
  .wrap { padding-inline: 32px; }
}

.section { padding-block: 64px; }
@media (min-width: 1024px) { .section { padding-block: 96px; } }

.section__title {
  font-size: clamp(1.7rem, 1.35rem + 1.6vw, 2.4rem);
  line-height: 1.15;
  margin-bottom: 40px;
}
@media (min-width: 640px) {
  .section__title { max-width: 22ch; }
}

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  white-space: nowrap;
  font-family: var(--font-body);
  font-weight: 600;
  font-size: 0.95rem;
  padding: 12px 22px;
  border-radius: 999px;
  border: 1px solid transparent;
  transition: transform 0.15s cubic-bezier(0.16, 1, 0.3, 1), box-shadow 0.15s ease, background-color 0.15s ease;
}
.btn i { font-size: 1.1em; }
.btn:active { transform: scale(0.97); }

.btn--gold { background: var(--gold); color: var(--ink); }
.btn--gold:hover { background: #cf9636; box-shadow: 0 10px 24px rgba(217, 164, 65, 0.35); }

.btn--teal { background: var(--teal); color: var(--white); }
.btn--teal:hover { background: var(--teal-deep); box-shadow: 0 10px 24px rgba(14, 107, 89, 0.28); }

.btn--ghost { background: transparent; color: var(--teal-deep); border-color: var(--hairline); }
.btn--ghost:hover { border-color: var(--teal); background: var(--teal-tint); }

.btn--outline-light { background: transparent; color: var(--white); border-color: rgba(255,255,255,0.55); }
.btn--outline-light:hover { background: rgba(255,255,255,0.12); border-color: var(--white); }

.btn--lg { padding: 14px 26px; font-size: 1rem; }

/* ---------- Icon badge ---------- */
.icon-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 48px;
  height: 48px;
  border-radius: var(--radius-badge);
  background: var(--teal-tint);
  color: var(--teal-deep);
  font-size: 1.4rem;
  margin-bottom: 16px;
}

/* ---------- Header ---------- */
.site-header {
  position: sticky;
  top: 0;
  z-index: 100;
  background: rgba(247, 245, 240, 0.9);
  backdrop-filter: blur(10px) saturate(140%);
  -webkit-backdrop-filter: blur(10px) saturate(140%);
  border-bottom: 1px solid var(--hairline);
}
.site-header__inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 68px;
}

.brand { display: inline-flex; align-items: center; gap: 10px; }
.brand__mark { border-radius: 8px; }
.brand__word {
  font-family: var(--font-display);
  font-weight: 600;
  font-size: 1.25rem;
  letter-spacing: 0.01em;
}

.nav { display: flex; align-items: center; gap: 32px; }
.nav__list { display: flex; align-items: center; gap: 26px; }
.nav__list a {
  font-size: 0.95rem;
  font-weight: 500;
  color: var(--ink-soft);
  transition: color 0.15s ease;
}
.nav__list a:hover { color: var(--teal-deep); }
.nav__cta { padding: 10px 20px; }

.nav-toggle {
  display: none;
  flex-direction: column;
  justify-content: center;
  gap: 5px;
  width: 40px;
  height: 40px;
  border-radius: var(--radius-input);
}
.nav-toggle span {
  display: block;
  width: 22px;
  height: 2px;
  background: var(--ink);
  border-radius: 2px;
  transition: transform 0.2s ease, opacity 0.2s ease;
}

@media (max-width: 880px) {
  .nav-toggle { display: flex; }
  .nav {
    position: fixed;
    inset: 68px 0 0 0;
    height: calc(100dvh - 68px);
    background: var(--paper);
    flex-direction: column;
    align-items: flex-start;
    justify-content: flex-start;
    padding: 32px 24px;
    gap: 28px;
    transform: translateX(100%);
    transition: transform 0.25s cubic-bezier(0.16, 1, 0.3, 1);
    overflow-y: auto;
  }
  .nav.is-open { transform: translateX(0); }
  .nav__list { flex-direction: column; align-items: flex-start; gap: 20px; width: 100%; }
  .nav__list a { font-size: 1.15rem; }
  .nav__cta { width: 100%; text-align: center; padding: 14px 20px; }

  .nav-toggle[aria-expanded="true"] span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
  .nav-toggle[aria-expanded="true"] span:nth-child(2) { opacity: 0; }
  .nav-toggle[aria-expanded="true"] span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }
}

/* ---------- Hero ---------- */
.hero { padding-block: 48px 64px; overflow: hidden; }
@media (min-width: 1024px) { .hero { padding-block: 72px 96px; } }

.hero__inner {
  display: grid;
  gap: 48px;
  align-items: center;
}
@media (min-width: 960px) {
  .hero__inner { grid-template-columns: 1.05fr 0.95fr; gap: 40px; }
}

.hero__title {
  font-size: clamp(2.1rem, 1.5rem + 2.6vw, 3.4rem);
  line-height: 1.08;
}
@media (min-width: 640px) {
  .hero__title { max-width: 12ch; }
}
.hero__subtitle {
  margin-top: 20px;
  font-size: 1.08rem;
  color: var(--ink-soft);
  max-width: 46ch;
  line-height: 1.6;
}
.hero__actions {
  display: flex;
  flex-wrap: wrap;
  gap: 14px;
  margin-top: 32px;
}

.hero__visual { display: flex; justify-content: center; }

.phone {
  width: min(280px, 72vw);
  filter: drop-shadow(var(--shadow-lift));
}
.phone__frame {
  aspect-ratio: 9 / 19.5;
  background: var(--ink);
  border-radius: 42px;
  padding: 12px;
  position: relative;
}
.phone__notch {
  position: absolute;
  top: 12px;
  left: 50%;
  transform: translateX(-50%);
  width: 40%;
  height: 22px;
  background: var(--ink);
  border-radius: 0 0 16px 16px;
  z-index: 2;
}
.phone__screen {
  width: 100%;
  height: 100%;
  background: var(--teal-tint);
  border-radius: 30px;
  overflow: hidden;
}
.phone__shot {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: top center;
}

/* ---------- Problem ---------- */
.problem { background: var(--white); }
.problem__grid {
  display: grid;
  gap: 20px;
  grid-template-columns: 1fr;
}
@media (min-width: 720px) { .problem__grid { grid-template-columns: repeat(3, 1fr); } }

.problem__card {
  padding: 28px;
  border-radius: var(--radius-card);
  background: var(--paper);
  border: 1px solid var(--hairline);
}
.problem__card h3 { font-size: 1.1rem; margin-bottom: 8px; }
.problem__card p { color: var(--ink-soft); font-size: 0.96rem; }

/* ---------- Features ---------- */
.features__grid {
  display: grid;
  gap: 20px;
  grid-template-columns: 1fr;
}
@media (min-width: 720px) { .features__grid { grid-template-columns: repeat(2, 1fr); } }
@media (min-width: 1024px) { .features__grid { grid-template-columns: repeat(3, 1fr); } }

.feature {
  padding: 28px;
  border-radius: var(--radius-card);
  background: var(--white);
  box-shadow: var(--shadow-card);
}
.feature h3 { font-size: 1.08rem; margin-bottom: 8px; }
.feature p { color: var(--ink-soft); font-size: 0.95rem; }

.feature--wide {
  background: linear-gradient(135deg, var(--teal), var(--teal-deep));
  color: var(--white);
}
.feature--wide .icon-badge { background: rgba(255,255,255,0.16); color: var(--white); }
.feature--wide h3 { color: var(--white); }
.feature--wide p { color: rgba(247,245,240,0.85); }
@media (min-width: 720px) { .feature--wide { grid-column: span 2; } }

/* ---------- How it works ---------- */
.how { background: var(--white); }
.steps {
  display: grid;
  gap: 28px;
  grid-template-columns: 1fr;
}
@media (min-width: 860px) {
  .steps { grid-template-columns: repeat(4, 1fr); gap: 24px; }
}
.step {
  position: relative;
  padding-top: 8px;
}
.step__num {
  display: block;
  font-family: var(--font-mono);
  font-size: 0.85rem;
  color: var(--gold);
  letter-spacing: 0.08em;
  margin-bottom: 10px;
}
.step h3 { font-size: 1.05rem; margin-bottom: 6px; }
.step p { color: var(--ink-soft); font-size: 0.94rem; }

/* ---------- Product tour ---------- */
.tour__track {
  display: flex;
  gap: 18px;
  overflow-x: auto;
  scroll-snap-type: x mandatory;
  padding-bottom: 8px;
  margin: 0 -20px;
  padding-inline: 20px;
  scrollbar-width: thin;
}
@media (min-width: 640px) { .tour__track { margin: 0; padding-inline: 0; } }

.tour__item {
  flex: 0 0 240px;
  scroll-snap-align: start;
}
.tour__shot {
  background: var(--white);
  border: 1px solid var(--hairline);
  border-radius: var(--radius-card);
  overflow: hidden;
  box-shadow: var(--shadow-card);
}
.tour__bar {
  display: flex;
  gap: 6px;
  padding: 10px 14px;
  border-bottom: 1px solid var(--hairline);
}
.tour__bar span {
  width: 8px; height: 8px; border-radius: 50%;
  background: var(--hairline);
}
.tour__shot img {
  display: block;
  width: 100%;
  aspect-ratio: 4 / 5;
  object-fit: cover;
  object-position: top center;
  background: var(--teal-tint);
}
.tour__item figcaption {
  margin-top: 12px;
  font-weight: 600;
  font-size: 0.94rem;
  text-align: center;
}

.video-block { margin-top: 48px; }
.video-block__frame {
  aspect-ratio: 16 / 9;
  max-width: 720px;
  margin-inline: auto;
  border-radius: var(--radius-card);
  background: linear-gradient(135deg, var(--teal), var(--teal-deep));
  color: var(--white);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 12px;
}
.video-block__frame i { font-size: 3rem; }
.video-block__frame p { font-family: var(--font-mono); font-size: 0.8rem; opacity: 0.85; }
.video-block__frame iframe { width: 100%; height: 100%; border: 0; border-radius: var(--radius-card); }

/* ---------- Who it's for ---------- */
.audience { background: var(--white); }
.audience__grid {
  display: grid;
  gap: 20px;
  grid-template-columns: 1fr;
}
@media (min-width: 720px) { .audience__grid { grid-template-columns: repeat(3, 1fr); } }
.audience__card {
  padding: 26px;
  border-radius: var(--radius-card);
  border: 1px solid var(--hairline);
  text-align: left;
}
.audience__card p { font-weight: 600; font-size: 1.02rem; }

/* ---------- Pricing ---------- */
.pricing__intro {
  color: var(--ink-soft);
  max-width: 56ch;
  margin-top: -20px;
  margin-bottom: 40px;
}
.price-card {
  display: flex;
  flex-direction: column;
  gap: 28px;
  max-width: 560px;
  padding: 36px 40px;
  border-radius: var(--radius-card);
  border: 1px solid var(--hairline);
  background: var(--white);
  box-shadow: var(--shadow-card);
}
@media (min-width: 560px) {
  .price-card { flex-direction: row; align-items: center; }
}

.price-card__item {
  display: flex;
  flex-direction: column;
  flex: 1;
}
.price-card__label {
  font-family: var(--font-mono);
  font-size: 0.78rem;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--ink-soft);
}
.price-card__amount {
  font-family: var(--font-display);
  font-weight: 600;
  font-size: 2.1rem;
  color: var(--ink);
  margin-top: 8px;
}
.price-card__unit {
  font-family: var(--font-mono);
  font-size: 0.82rem;
  color: var(--teal-deep);
  margin-top: 4px;
}

.price-card__divider {
  height: 1px;
  width: 100%;
  background: var(--hairline);
}
@media (min-width: 560px) {
  .price-card__divider { height: 64px; width: 1px; }
}

.pricing__footnote {
  margin-top: 28px;
  color: var(--ink-soft);
  font-family: var(--font-mono);
  font-size: 0.85rem;
}
.pricing .btn { margin-top: 20px; }

/* ---------- FAQ ---------- */
.accordion__item {
  border-bottom: 1px solid var(--hairline);
  padding-block: 18px;
}
.accordion__item summary {
  cursor: pointer;
  list-style: none;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  font-weight: 600;
  font-size: 1.02rem;
}
.accordion__item summary::-webkit-details-marker { display: none; }
.accordion__item summary::after {
  content: "+";
  font-family: var(--font-mono);
  font-size: 1.3rem;
  color: var(--teal);
  flex-shrink: 0;
  transition: transform 0.2s ease;
}
.accordion__item[open] summary::after { content: "\2212"; }
.accordion__item p {
  margin-top: 12px;
  color: var(--ink-soft);
  max-width: 62ch;
}

/* ---------- Final CTA ---------- */
.final-cta {
  background: var(--teal-deep);
  color: var(--white);
  padding-block: 72px;
  text-align: center;
}
.final-cta__mark { margin: 0 auto 20px; }
.final-cta h2 {
  color: var(--white);
  font-size: clamp(1.7rem, 1.4rem + 1.4vw, 2.3rem);
  margin-inline: auto;
}
@media (min-width: 640px) {
  .final-cta h2 { max-width: 18ch; }
}
.final-cta__actions {
  display: flex;
  flex-wrap: wrap;
  gap: 14px;
  justify-content: center;
  margin-top: 32px;
}

/* ---------- Footer ---------- */
.site-footer { background: var(--ink); color: rgba(247,245,240,0.85); }
.site-footer__inner {
  display: grid;
  gap: 32px;
  padding-block: 48px;
  grid-template-columns: 1fr;
}
@media (min-width: 780px) {
  .site-footer__inner { grid-template-columns: 1.2fr 1fr 1fr; }
}
.site-footer .brand__word { color: var(--white); }
.site-footer__tagline {
  margin-top: 12px;
  font-family: var(--font-mono);
  font-size: 0.85rem;
  color: var(--teal-tint);
}
.site-footer__nav { display: flex; flex-direction: column; gap: 12px; }
.site-footer__nav a:hover { color: var(--white); }
.site-footer__contact { display: flex; flex-direction: column; gap: 12px; }
.site-footer__contact a { display: inline-flex; align-items: center; gap: 8px; }
.site-footer__contact a:hover { color: var(--white); }

.site-footer__bottom {
  border-top: 1px solid rgba(247,245,240,0.12);
  padding-block: 20px;
  font-family: var(--font-mono);
  font-size: 0.8rem;
  color: rgba(247,245,240,0.55);
}

/* ---------- Scroll reveal ---------- */
[data-reveal] {
  opacity: 0;
  transform: translateY(18px);
  transition: opacity 0.6s cubic-bezier(0.16, 1, 0.3, 1), transform 0.6s cubic-bezier(0.16, 1, 0.3, 1);
}
[data-reveal].in-view { opacity: 1; transform: translateY(0); }
@media (prefers-reduced-motion: reduce) {
  [data-reveal] { opacity: 1; transform: none; }
}
