/* InvoTrack — site styles. Colours match the app (slate header, teal money). */
:root {
  --ink: #16232b;
  --slate: #1f2d36;
  --slate-2: #263842;
  --teal: #0f9d8a;
  --teal-strong: #0b7f70;
  --teal-soft: #e3f4f1;
  --mint: #7fd8c9;
  --bg: #f5f7f7;
  --card: #ffffff;
  --line: #e2e8ea;
  --muted: #5d6f78;
  --radius: 18px;
  --shadow: 0 1px 2px rgba(22, 35, 43, .06), 0 8px 24px rgba(22, 35, 43, .06);
  --max: 1120px;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  font-family: "Manrope", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  color: var(--ink);
  background: var(--bg);
  line-height: 1.6;
  font-size: 16px;
}
img { max-width: 100%; display: block; }
a { color: var(--teal-strong); }
h1, h2, h3 { line-height: 1.15; letter-spacing: -0.02em; margin: 0 0 .5em; }
h1 { font-size: clamp(2.1rem, 5vw, 3.4rem); font-weight: 800; }
h2 { font-size: clamp(1.6rem, 3.4vw, 2.3rem); font-weight: 800; }
h3 { font-size: 1.12rem; font-weight: 700; }
p { margin: 0 0 1em; }

.wrap { max-width: var(--max); margin: 0 auto; padding: 0 20px; }
.eyebrow {
  display: inline-block; font-size: .78rem; font-weight: 700; letter-spacing: .08em;
  text-transform: uppercase; color: var(--teal-strong); margin-bottom: .8rem;
}
.lede { font-size: 1.12rem; color: var(--muted); max-width: 40em; }
.skip { position: absolute; left: -999px; }
.skip:focus { left: 12px; top: 12px; z-index: 99; background: #fff; padding: 8px 12px; border-radius: 8px; }

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: .5rem;
  padding: .85rem 1.3rem; border-radius: 12px; font-weight: 700; font-size: .98rem;
  text-decoration: none; border: 1.5px solid transparent; cursor: pointer;
  transition: transform .15s ease, background .15s ease, border-color .15s ease;
}
.btn:hover { transform: translateY(-1px); }
.btn svg { width: 20px; height: 20px; flex: none; }
.btn-primary { background: var(--teal); color: #fff; }
.btn-primary:hover { background: var(--teal-strong); }
.btn-ghost { border-color: rgba(255, 255, 255, .35); color: #fff; }
.btn-ghost:hover { border-color: #fff; }
.btn-outline { border-color: var(--line); color: var(--ink); background: #fff; }
.btn-outline:hover { border-color: var(--teal); }
.btn[aria-disabled="true"] { opacity: .6; pointer-events: none; }

/* ---------- Header ---------- */
.site-header {
  position: sticky; top: 0; z-index: 20; background: var(--slate);
  border-bottom: 1px solid rgba(255, 255, 255, .06);
}
.nav { display: flex; align-items: center; justify-content: space-between; height: 64px; }
.brand { display: flex; align-items: center; gap: .6rem; color: #fff; text-decoration: none; font-weight: 800; font-size: 1.15rem; }
.brand img { width: 34px; height: 34px; }
.nav-links { display: flex; gap: 1.6rem; align-items: center; }
.nav-links a { color: #cfdade; text-decoration: none; font-weight: 600; font-size: .95rem; }
.nav-links a:hover { color: #fff; }
.nav-links .btn { padding: .55rem 1rem; color: #fff; }
.menu-btn { display: none; background: none; border: 0; color: #fff; padding: 8px; cursor: pointer; }
.menu-btn svg { width: 26px; height: 26px; }

@media (max-width: 820px) {
  .menu-btn { display: block; }
  .nav-links {
    display: none; position: absolute; top: 64px; left: 0; right: 0; flex-direction: column;
    align-items: stretch; gap: 0; background: var(--slate); padding: 8px 20px 20px;
  }
  .nav-links.open { display: flex; }
  .nav-links a { padding: 12px 0; border-bottom: 1px solid rgba(255, 255, 255, .06); }
  .nav-links .btn { margin-top: 12px; border-bottom: 0; }
}

/* ---------- Hero ---------- */
.hero { background: var(--slate); color: #fff; padding: 64px 0 0; overflow: hidden; }
.hero-grid { display: grid; grid-template-columns: 1.1fr .9fr; gap: 40px; align-items: end; }
.hero .eyebrow { color: var(--mint); }
.hero p.lede { color: #b9c8ce; }
.hero-cta { display: flex; flex-wrap: wrap; gap: 12px; margin: 28px 0 22px; }
.hero-points { list-style: none; padding: 0; margin: 0 0 56px; display: flex; flex-wrap: wrap; gap: 10px 22px; color: #cfdade; font-size: .93rem; }
.hero-points li::before { content: "✓"; color: var(--mint); font-weight: 800; margin-right: .45rem; }
.hero-phones { position: relative; height: 460px; }
.phone {
  position: absolute; width: 250px; border-radius: 28px; overflow: hidden; background: #fff;
  border: 6px solid #0e171d; box-shadow: 0 30px 60px rgba(0, 0, 0, .35);
}
.phone img { width: 100%; height: auto; aspect-ratio: 540 / 836; object-fit: cover; object-position: top; }
.phone.p1 { left: 4%; bottom: -30px; z-index: 2; }
.phone.p2 { left: 46%; bottom: -80px; transform: rotate(4deg); opacity: .96; }

@media (max-width: 900px) {
  .hero { padding-top: 44px; }
  .hero-grid { grid-template-columns: 1fr; }
  .hero-points { margin-bottom: 28px; }
  .hero-phones { height: 270px; }
  .phone { width: 180px; border-radius: 22px; border-width: 5px; }
  .phone.p1 { left: calc(50% - 170px); bottom: -30px; }
  .phone.p2 { left: calc(50% - 10px); bottom: -80px; }
}

/* ---------- Sections ---------- */
section { padding: 84px 0; }
.section-head { max-width: 680px; margin-bottom: 44px; }
.section-head.center { margin-left: auto; margin-right: auto; text-align: center; }
.section-head.center .lede { margin: 0 auto; }

/* Features */
.feature-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 18px; }
.feature {
  background: var(--card); border-radius: var(--radius); padding: 24px; box-shadow: var(--shadow);
}
.feature .ic {
  width: 46px; height: 46px; border-radius: 12px; display: grid; place-items: center;
  background: var(--teal-soft); color: var(--teal-strong); margin-bottom: 14px;
}
.feature .ic svg { width: 24px; height: 24px; }
.feature p { color: var(--muted); margin: 0; font-size: .96rem; }
.ic.violet { background: #ebeafd; color: #5b54c9; }
.ic.coral { background: #fdebe5; color: #d0532b; }
.ic.slate { background: #e8eef0; color: #3d5562; }
@media (max-width: 900px) { .feature-grid { grid-template-columns: 1fr 1fr; } }
@media (max-width: 600px) { .feature-grid { grid-template-columns: 1fr; } }

/* Invoice types strip */
.types { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 26px; }
.types span {
  background: #fff; border: 1px solid var(--line); border-radius: 999px; padding: 6px 14px;
  font-size: .9rem; font-weight: 600;
}

/* Showcase rows */
.showcase { background: #fff; }
.show-row { display: grid; grid-template-columns: 1fr 1fr; gap: 56px; align-items: center; }
.show-row + .show-row { margin-top: 80px; }
.show-row.flip .show-text { order: 2; }
.show-img { display: flex; justify-content: center; }
.show-img .phone { position: static; width: 270px; box-shadow: 0 24px 50px rgba(22, 35, 43, .18); }
.checks { list-style: none; padding: 0; margin: 18px 0 0; }
.checks li { padding-left: 1.7rem; position: relative; margin-bottom: .6rem; color: var(--muted); }
.checks li::before {
  content: ""; position: absolute; left: 0; top: .35em; width: 1.05rem; height: 1.05rem; border-radius: 50%;
  background: var(--teal-soft) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%230b7f70' stroke-width='3.5' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M5 12l5 5L19 8'/%3E%3C/svg%3E") center/62% no-repeat;
}
.checks li strong { color: var(--ink); }
@media (max-width: 860px) {
  .show-row { grid-template-columns: 1fr; gap: 32px; }
  .show-row.flip .show-text { order: 0; }
  .show-img .phone { width: 230px; }
}

/* Steps */
.steps { display: grid; grid-template-columns: repeat(3, 1fr); gap: 18px; counter-reset: step; }
.step { background: #fff; border-radius: var(--radius); padding: 26px; box-shadow: var(--shadow); }
.step::before {
  counter-increment: step; content: counter(step);
  display: grid; place-items: center; width: 34px; height: 34px; border-radius: 50%;
  background: var(--slate); color: #fff; font-weight: 800; margin-bottom: 14px;
}
.step p { color: var(--muted); margin: 0; }
@media (max-width: 760px) { .steps { grid-template-columns: 1fr; } }

/* Pricing */
.pricing { background: var(--slate); color: #fff; }
.pricing .lede { color: #b9c8ce; }
.pricing .eyebrow { color: var(--mint); }
.plans { display: grid; grid-template-columns: repeat(3, 1fr); gap: 18px; align-items: stretch; }
.plan {
  background: var(--slate-2); border: 1px solid rgba(255, 255, 255, .08); border-radius: var(--radius);
  padding: 28px; display: flex; flex-direction: column;
}
.plan.featured { background: #fff; color: var(--ink); border-color: transparent; position: relative; }
.plan .tag {
  position: absolute; top: -12px; left: 28px; background: var(--teal); color: #fff;
  font-size: .75rem; font-weight: 800; padding: 4px 10px; border-radius: 999px; letter-spacing: .04em;
}
.plan h3 { margin-bottom: .2rem; }
.plan .note { color: #9fb1b8; font-size: .9rem; margin-bottom: 18px; }
.plan.featured .note { color: var(--muted); }
.price { font-size: 2.4rem; font-weight: 800; letter-spacing: -0.03em; line-height: 1; }
.price small { font-size: .95rem; font-weight: 600; color: #9fb1b8; letter-spacing: 0; }
.plan.featured .price small { color: var(--muted); }
.price.ask { font-size: 1.5rem; }
.plan ul { list-style: none; padding: 0; margin: 22px 0 26px; flex: 1; }
.plan li { padding: 6px 0 6px 1.6rem; position: relative; font-size: .95rem; }
.plan li::before { content: "✓"; position: absolute; left: 0; color: var(--mint); font-weight: 800; }
.plan.featured li::before { color: var(--teal); }
.plan .btn { width: 100%; }
.plan:not(.featured) .btn { background: transparent; border-color: rgba(255, 255, 255, .3); color: #fff; }
.plan:not(.featured) .btn:hover { border-color: #fff; }
.price-foot { margin-top: 26px; text-align: center; color: #9fb1b8; font-size: .9rem; }
@media (max-width: 860px) { .plans { grid-template-columns: 1fr; max-width: 440px; margin: 0 auto; } }

/* FAQ */
.faq { max-width: 780px; margin: 0 auto; }
.faq details {
  background: #fff; border-radius: 14px; padding: 4px 20px; margin-bottom: 10px; box-shadow: var(--shadow);
}
.faq summary {
  cursor: pointer; list-style: none; padding: 16px 0; font-weight: 700; display: flex;
  justify-content: space-between; gap: 16px;
}
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after { content: "+"; font-size: 1.4rem; line-height: 1; color: var(--teal-strong); }
.faq details[open] summary::after { content: "–"; }
.faq details p { color: var(--muted); padding-bottom: 6px; }

/* Contact */
.contact-card {
  background: #fff; border-radius: 24px; padding: 44px; box-shadow: var(--shadow);
  display: grid; grid-template-columns: 1.2fr 1fr; gap: 32px; align-items: center;
}
.contact-actions { display: flex; flex-direction: column; gap: 12px; }
.contact-actions .btn { justify-content: flex-start; }
@media (max-width: 760px) { .contact-card { grid-template-columns: 1fr; padding: 28px; } }

/* Footer */
.site-footer { background: var(--slate); color: #9fb1b8; padding: 48px 0 32px; font-size: .92rem; }
.foot-grid { display: grid; grid-template-columns: 1.4fr 1fr 1fr; gap: 28px; }
.site-footer h4 { color: #fff; font-size: .95rem; margin: 0 0 .8rem; }
.site-footer ul { list-style: none; padding: 0; margin: 0; }
.site-footer li { margin-bottom: .45rem; }
.site-footer a { color: #cfdade; text-decoration: none; }
.site-footer a:hover { color: #fff; }
.foot-bottom { border-top: 1px solid rgba(255, 255, 255, .08); margin-top: 32px; padding-top: 20px; }
@media (max-width: 700px) { .foot-grid { grid-template-columns: 1fr 1fr; } .foot-grid > :first-child { grid-column: 1 / -1; } }

/* ---------- Legal pages ---------- */
.legal-hero { background: var(--slate); color: #fff; padding: 52px 0 40px; }
.legal-hero p { color: #b9c8ce; margin: 0; }
.legal { padding: 48px 0 72px; }
.legal article {
  background: #fff; border-radius: var(--radius); box-shadow: var(--shadow);
  padding: clamp(24px, 5vw, 52px); max-width: 820px; margin: 0 auto;
}
.legal h2 { font-size: 1.35rem; margin-top: 2rem; }
.legal h2:first-child { margin-top: 0; }
.legal li { margin-bottom: .4rem; }
.legal table { width: 100%; border-collapse: collapse; margin: 1rem 0 1.4rem; font-size: .95rem; }
.legal th, .legal td { text-align: left; padding: 10px 12px; border-bottom: 1px solid var(--line); vertical-align: top; }
.legal th { background: var(--bg); }
.table-scroll { overflow-x: auto; }
.callout { background: var(--teal-soft); border-radius: 12px; padding: 16px 18px; margin: 1.2rem 0; }
.callout p:last-child { margin: 0; }

:focus-visible { outline: 3px solid var(--mint); outline-offset: 2px; border-radius: 6px; }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } .btn { transition: none; } }
