/* ==========================================================================
   InboxHarbor — landing page
   --------------------------------------------------------------------------
   The console stylesheet (app.css) is deliberately kept lean; everything
   marketing lives here so the two never fight over a rule.

   Design system
   -------------
   Style      Bento grid over a dark editorial hero. The product is large —
              344 endpoints, 141 tables — so the page has to *show* density,
              not describe it.
   Palette    Deep green-black surfaces, one brand green, one warm CTA.
   Type       System stack only. This product is self-hosted: a visitor on a
              locked-down network must still get a correctly rendered page,
              and no request should leave the server for a font.
   Motion     Transform/opacity only, 150–300ms, and never without
              prefers-reduced-motion.
   ========================================================================== */

:root {
  --lh-ink: #08130f;
  --lh-ink-2: #0d1f19;
  --lh-ink-3: #132b23;
  --lh-brand: #3fbf8f;
  --lh-brand-dim: #2e9a71;
  --lh-brand-ink: #0b6b4c;
  --lh-cta: #f97316;
  --lh-cta-ink: #7c2d12;
  --lh-bg: #f7faf9;
  --lh-surface: #ffffff;
  --lh-surface-2: #eef4f1;
  --lh-text: #0c1a15;
  --lh-text-2: #46584f;
  --lh-muted: #6b8078;
  --lh-line: #dfe8e4;
  --lh-line-dark: #1e3a30;
  --lh-radius: 16px;
  --lh-radius-sm: 10px;
  --lh-shadow: 0 18px 44px rgba(8, 19, 15, .10);
  --lh-shadow-lg: 0 32px 80px rgba(8, 19, 15, .22);
  --lh-max: 1180px;
  --lh-font: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto,
             "Helvetica Neue", Arial, "Noto Sans", sans-serif;
  --lh-mono: ui-monospace, SFMono-Regular, "SF Mono", Menlo, Consolas, monospace;
}

/* --- reset --------------------------------------------------------------- */
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
body {
  margin: 0;
  background: var(--lh-bg);
  color: var(--lh-text);
  font-family: var(--lh-font);
  font-size: 16px;
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}
img, svg, canvas { display: block; max-width: 100%; }
a { color: var(--lh-brand-ink); text-decoration: none; }
a:hover { text-decoration: underline; }
h1, h2, h3, h4 { margin: 0 0 .5rem; line-height: 1.15; letter-spacing: -.022em; font-weight: 700; }
h1 { font-size: clamp(2.1rem, 5.4vw, 3.5rem); }
h2 { font-size: clamp(1.5rem, 3.2vw, 2.15rem); }
h3 { font-size: 1.06rem; }
p { margin: 0 0 1rem; }
ul { margin: 0; padding: 0; list-style: none; }
code, .mono { font-family: var(--lh-mono); font-size: .9em; }
:focus-visible { outline: 2px solid var(--lh-brand); outline-offset: 3px; border-radius: 6px; }

.wrap { width: 100%; max-width: var(--lh-max); margin: 0 auto; padding: 0 1.25rem; }
.muted { color: var(--lh-muted); }
.center { text-align: center; }
.mono-tag {
  display: inline-block; padding: .16rem .5rem; border-radius: 6px;
  background: var(--lh-surface-2); border: 1px solid var(--lh-line);
  font-family: var(--lh-mono); font-size: .78rem; color: var(--lh-text-2);
}

/* --- buttons ------------------------------------------------------------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: .5rem;
  min-height: 48px; padding: .7rem 1.3rem;
  border-radius: 11px; border: 1px solid transparent;
  font: inherit; font-weight: 650; cursor: pointer;
  transition: transform .18s ease, background-color .18s ease, border-color .18s ease;
}
.btn:hover { text-decoration: none; }
.btn:active { transform: translateY(1px); }
.btn-primary { background: var(--lh-brand); color: #04211a; }
.btn-primary:hover { background: #4fd39e; }
.btn-cta { background: var(--lh-cta); color: #fff; }
.btn-cta:hover { background: #fb8b3c; }
.btn-ghost { background: transparent; border-color: var(--lh-line); color: var(--lh-text); }
.btn-ghost:hover { background: var(--lh-surface-2); }
.btn-ghost-dark { background: transparent; border-color: var(--lh-line-dark); color: #d9e8e2; }
.btn-ghost-dark:hover { background: var(--lh-ink-3); }
.btn-lg { min-height: 54px; padding: .85rem 1.6rem; font-size: 1.02rem; }

/* --- skip link ----------------------------------------------------------- */
.skip {
  position: absolute; left: -9999px; top: 0; z-index: 60;
  padding: .7rem 1rem; border-radius: 0 0 10px 0;
  background: var(--lh-brand); color: #04211a; font-weight: 650;
}
.skip:focus { left: 0; }

/* --- header -------------------------------------------------------------- */
.site-header {
  position: sticky; top: 0; z-index: 40;
  background: rgba(8, 19, 15, .82);
  backdrop-filter: saturate(140%) blur(12px);
  -webkit-backdrop-filter: saturate(140%) blur(12px);
  border-bottom: 1px solid rgba(255, 255, 255, .07);
}
.site-header .wrap {
  display: flex; align-items: center; gap: 1.4rem; min-height: 68px;
}
.brand { display: flex; align-items: center; gap: .6rem; color: #fff; font-weight: 750; letter-spacing: -.02em; }
.brand:hover { text-decoration: none; }
.brand svg { width: 30px; height: 30px; }
.site-nav { display: flex; gap: .2rem; margin-left: auto; }
.site-nav a {
  padding: .45rem .7rem; border-radius: 8px;
  color: #a9c0b7; font-size: .92rem; font-weight: 550;
}
.site-nav a:hover { background: rgba(255, 255, 255, .06); color: #fff; text-decoration: none; }
.header-actions { display: flex; align-items: center; gap: .55rem; }
.header-actions .btn { min-height: 40px; padding: .45rem .9rem; font-size: .9rem; }
.nav-toggle { display: none; }

/* --- hero ---------------------------------------------------------------- */
.hero {
  position: relative;
  background: var(--lh-ink);
  color: #e8f4ef;
  padding: clamp(3rem, 8vw, 6rem) 0 clamp(3rem, 7vw, 5rem);
  overflow: hidden;
}
.hero::before {
  /* A soft aurora mesh: two radial washes, no image request. */
  content: "";
  position: absolute; inset: -30% -10% auto -10%; height: 120%;
  background:
    radial-gradient(48% 42% at 18% 18%, rgba(63, 191, 143, .22), transparent 70%),
    radial-gradient(42% 40% at 82% 12%, rgba(56, 130, 255, .16), transparent 72%);
  pointer-events: none;
}
.hero::after {
  /* The dot grid, drawn in CSS so it costs nothing. */
  content: "";
  position: absolute; inset: 0;
  background-image: radial-gradient(rgba(255, 255, 255, .07) 1px, transparent 1px);
  background-size: 26px 26px;
  mask-image: radial-gradient(70% 60% at 50% 30%, #000, transparent 80%);
  -webkit-mask-image: radial-gradient(70% 60% at 50% 30%, #000, transparent 80%);
  pointer-events: none;
}
.hero .wrap { position: relative; z-index: 2; }
.hero-grid {
  display: grid; grid-template-columns: 1.06fr .94fr; gap: clamp(2rem, 5vw, 3.5rem);
  align-items: center;
}
.eyebrow {
  display: inline-flex; align-items: center; gap: .45rem;
  padding: .3rem .75rem; border-radius: 999px;
  background: rgba(63, 191, 143, .12); border: 1px solid rgba(63, 191, 143, .3);
  color: var(--lh-brand); font-size: .78rem; font-weight: 650;
  letter-spacing: .04em; text-transform: uppercase;
}
.eyebrow svg { width: 14px; height: 14px; }
.hero h1 { margin: 1.1rem 0 .9rem; color: #fff; }
.hero h1 em { font-style: normal; color: var(--lh-brand); }
.hero-lede { font-size: clamp(1rem, 1.6vw, 1.16rem); color: #a9c0b7; max-width: 56ch; }
.hero-actions { display: flex; flex-wrap: wrap; gap: .7rem; margin: 1.8rem 0 1.2rem; }
.hero-trust {
  display: flex; flex-wrap: wrap; gap: .5rem 1.3rem;
  color: #7e968c; font-size: .85rem;
}
.hero-trust li { display: flex; align-items: center; gap: .4rem; }
.hero-trust svg { width: 15px; height: 15px; color: var(--lh-brand); flex: none; }

/* the canvas panel */
.hero-visual { position: relative; }
.hero-panel {
  position: relative;
  border-radius: 20px;
  border: 1px solid rgba(255, 255, 255, .1);
  background: linear-gradient(180deg, rgba(19, 43, 35, .92), rgba(8, 19, 15, .92));
  box-shadow: var(--lh-shadow-lg);
  padding: 1rem;
  overflow: hidden;
}
.hero-panel canvas { width: 100%; height: 260px; border-radius: 12px; }
.hero-panel figcaption {
  display: flex; align-items: center; justify-content: space-between; gap: .6rem;
  padding: .7rem .3rem .1rem; color: #7e968c; font-size: .8rem;
}
.live-dot {
  display: inline-flex; align-items: center; gap: .4rem;
  color: var(--lh-brand); font-weight: 600;
}
.live-dot::before {
  content: ""; width: 7px; height: 7px; border-radius: 50%;
  background: var(--lh-brand);
  box-shadow: 0 0 0 0 rgba(63, 191, 143, .6);
  animation: pulse 2.4s infinite;
}
@keyframes pulse {
  0%   { box-shadow: 0 0 0 0 rgba(63, 191, 143, .55); }
  70%  { box-shadow: 0 0 0 9px rgba(63, 191, 143, 0); }
  100% { box-shadow: 0 0 0 0 rgba(63, 191, 143, 0); }
}

/* --- stat strip ---------------------------------------------------------- */
.stats { background: var(--lh-ink-2); color: #e8f4ef; padding: 2.2rem 0; border-top: 1px solid rgba(255,255,255,.06); }
.stats .wrap {
  display: grid; gap: 1.4rem;
  grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
}
.stat-num {
  font-size: clamp(1.7rem, 3.4vw, 2.4rem); font-weight: 750; letter-spacing: -.03em;
  color: #fff; line-height: 1.1;
}
.stat-label { color: #8fa79c; font-size: .84rem; }

/* --- sections ------------------------------------------------------------ */
.section { padding: clamp(3.2rem, 7vw, 5.5rem) 0; }
.section-dark { background: var(--lh-ink); color: #dbeae4; }
.section-dark h2, .section-dark h3 { color: #fff; }
.section-head { max-width: 62ch; margin: 0 0 2.4rem; }
.section-head.center { margin-inline: auto; text-align: center; }
.section-head .kicker {
  display: block; color: var(--lh-brand-ink); font-weight: 700; font-size: .8rem;
  text-transform: uppercase; letter-spacing: .12em; margin-bottom: .5rem;
}
.section-dark .section-head .kicker { color: var(--lh-brand); }
.section-head p { color: var(--lh-text-2); font-size: 1.03rem; }
.section-dark .section-head p { color: #9db5ab; }

/* --- bento grid ---------------------------------------------------------- */
.bento {
  display: grid; gap: 1rem;
  grid-template-columns: repeat(4, 1fr);
  grid-auto-rows: minmax(180px, auto);
}
.bento > article {
  position: relative;
  background: var(--lh-surface);
  border: 1px solid var(--lh-line);
  border-radius: var(--lh-radius);
  padding: 1.4rem 1.3rem;
  transition: border-color .2s ease, transform .2s ease;
}
.bento > article:hover { border-color: #b9d8cb; transform: translateY(-2px); }
.bento > article h3 { margin-bottom: .4rem; }
.bento > article p { margin: 0; color: var(--lh-muted); font-size: .92rem; }
.bento .icon {
  width: 38px; height: 38px; border-radius: 10px;
  display: grid; place-items: center; margin-bottom: .9rem;
  background: #e9f7f1; color: var(--lh-brand-ink);
}
.bento .icon svg { width: 20px; height: 20px; }
.bento .wide { grid-column: span 2; }
.bento .tall { grid-row: span 2; }
.bento .feature-list { margin-top: .8rem; display: grid; gap: .35rem; }
.bento .feature-list li {
  display: flex; gap: .45rem; align-items: flex-start;
  font-size: .87rem; color: var(--lh-text-2);
}
.bento .feature-list svg { width: 15px; height: 15px; color: var(--lh-brand-ink); flex: none; margin-top: .22rem; }

/* --- channels ------------------------------------------------------------ */
.channels {
  display: grid; gap: .7rem;
  grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
}
.channel {
  display: flex; align-items: center; gap: .6rem;
  padding: .8rem .9rem;
  background: var(--lh-surface); border: 1px solid var(--lh-line);
  border-radius: var(--lh-radius-sm);
  font-size: .9rem; font-weight: 550;
}
.channel svg { width: 20px; height: 20px; color: var(--lh-brand-ink); flex: none; }
.channel .count { margin-left: auto; color: var(--lh-muted); font-size: .78rem; font-weight: 500; }

/* --- steps --------------------------------------------------------------- */
.steps { display: grid; gap: 1.1rem; grid-template-columns: repeat(3, 1fr); counter-reset: step; }
.step {
  background: var(--lh-surface); border: 1px solid var(--lh-line);
  border-radius: var(--lh-radius); padding: 1.5rem 1.4rem;
}
.step::before {
  counter-increment: step; content: counter(step);
  display: grid; place-items: center;
  width: 34px; height: 34px; border-radius: 50%;
  background: var(--lh-brand-ink); color: #fff;
  font-weight: 750; font-size: .95rem; margin-bottom: .9rem;
}
.step h3 { margin-bottom: .35rem; }
.step p { margin: 0; color: var(--lh-muted); font-size: .93rem; }
.step code { display: block; margin-top: .8rem; }

/* --- comparison table ---------------------------------------------------- */
.compare-wrap { overflow-x: auto; border: 1px solid var(--lh-line); border-radius: var(--lh-radius); background: var(--lh-surface); }
.compare { width: 100%; border-collapse: collapse; min-width: 620px; }
.compare th, .compare td { padding: .8rem 1rem; text-align: left; border-bottom: 1px solid var(--lh-line); font-size: .92rem; }
.compare thead th { font-size: .76rem; text-transform: uppercase; letter-spacing: .07em; color: var(--lh-muted); background: var(--lh-surface-2); }
.compare tbody tr:last-child td { border-bottom: 0; }
.compare td:first-child { font-weight: 600; }
.compare .yes { color: var(--lh-brand-ink); font-weight: 700; }
.compare .no { color: #b6c2bd; }
.compare .ours { background: rgba(63, 191, 143, .07); }

/* --- pricing ------------------------------------------------------------- */
.plans { display: grid; gap: 1rem; grid-template-columns: repeat(4, 1fr); align-items: start; }
.plan {
  position: relative; display: flex; flex-direction: column;
  background: var(--lh-surface); border: 1px solid var(--lh-line);
  border-radius: var(--lh-radius); padding: 1.5rem 1.35rem;
}
.plan.featured {
  border-color: var(--lh-brand);
  box-shadow: 0 18px 44px rgba(63, 191, 143, .16);
  transform: translateY(-6px);
}
.plan-badge {
  position: absolute; top: -11px; left: 50%; transform: translateX(-50%);
  padding: .16rem .65rem; border-radius: 999px;
  background: var(--lh-brand); color: #04211a;
  font-size: .7rem; font-weight: 750; text-transform: uppercase; letter-spacing: .06em;
}
.plan h3 { margin-bottom: .2rem; }
.plan .plan-sub { color: var(--lh-muted); font-size: .86rem; min-height: 2.6em; margin-bottom: .8rem; }
.plan .price { display: flex; align-items: baseline; gap: .3rem; margin-bottom: .2rem; }
.plan .price .amount { font-size: 2.2rem; font-weight: 780; letter-spacing: -.035em; }
.plan .price .once { color: var(--lh-muted); font-size: .84rem; }
.plan .price-note { color: var(--lh-muted); font-size: .8rem; margin-bottom: 1rem; }
.plan ul { display: grid; gap: .45rem; margin-bottom: 1.2rem; flex: 1; }
.plan ul li { display: flex; gap: .5rem; align-items: flex-start; font-size: .88rem; color: var(--lh-text-2); }
.plan ul svg { width: 16px; height: 16px; color: var(--lh-brand-ink); flex: none; margin-top: .2rem; }
.plan .btn { width: 100%; }
.price-note-inline { color: var(--lh-muted); font-size: .84rem; }

/* --- specs --------------------------------------------------------------- */
.specs { display: grid; gap: 1rem; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); }
.spec {
  background: var(--lh-surface); border: 1px solid var(--lh-line);
  border-radius: var(--lh-radius); padding: 1.2rem 1.2rem;
}
.spec dt { font-size: .76rem; text-transform: uppercase; letter-spacing: .07em; color: var(--lh-muted); }
.spec dd { margin: .3rem 0 0; font-weight: 600; }

/* --- faq ----------------------------------------------------------------- */
.faq { display: grid; gap: .6rem; max-width: 820px; margin: 0 auto; }
.faq details {
  background: var(--lh-surface); border: 1px solid var(--lh-line);
  border-radius: var(--lh-radius-sm); padding: .95rem 1.1rem;
}
.faq summary {
  cursor: pointer; font-weight: 600; list-style: none;
  display: flex; justify-content: space-between; gap: 1rem; align-items: center;
}
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after {
  content: "+"; color: var(--lh-brand-ink); font-size: 1.3rem; font-weight: 400; line-height: 1;
  transition: transform .2s ease;
}
.faq details[open] summary::after { content: "−"; }
.faq details p { margin: .7rem 0 0; color: var(--lh-text-2); font-size: .93rem; }

/* --- final cta ----------------------------------------------------------- */
.final-cta {
  background: var(--lh-ink); color: #dbeae4;
  padding: clamp(3rem, 7vw, 5rem) 0;
  text-align: center;
}
.final-cta h2 { color: #fff; }
.final-cta p { color: #9db5ab; max-width: 54ch; margin-inline: auto; }
.final-cta .hero-actions { justify-content: center; }

/* --- footer -------------------------------------------------------------- */
.site-footer {
  background: var(--lh-ink-2); color: #8fa79c;
  padding: 2.6rem 0; font-size: .88rem;
}
.site-footer .wrap { display: flex; flex-wrap: wrap; gap: 1.2rem; justify-content: space-between; align-items: center; }
.site-footer nav { display: flex; gap: 1.2rem; flex-wrap: wrap; }
.site-footer a { color: #a9c0b7; }
.site-footer .brand { color: #fff; }

/* --- scroll reveal ------------------------------------------------------- */
/* The reveal is progressive enhancement: without JavaScript the content is
   simply there. Only once the script has marked the document does the
   animation hide anything — so a script error can never blank the page. */
.has-reveal .reveal {
  opacity: 0;
  transform: translateY(14px);
  transition: opacity .5s ease, transform .5s ease;
}
.has-reveal .reveal.in { opacity: 1; transform: none; }

/* --- responsive ---------------------------------------------------------- */
@media (max-width: 1000px) {
  .hero-grid { grid-template-columns: 1fr; }
  .bento { grid-template-columns: repeat(2, 1fr); }
  .plans { grid-template-columns: repeat(2, 1fr); }
  .steps { grid-template-columns: 1fr; }
}
@media (max-width: 720px) {
  .site-nav { display: none; }
  .nav-toggle {
    display: inline-flex; align-items: center; justify-content: center;
    width: 44px; height: 44px; border-radius: 10px;
    background: rgba(255, 255, 255, .07); border: 1px solid rgba(255, 255, 255, .12);
    color: #fff; cursor: pointer; margin-left: auto;
  }
  .header-actions .btn-ghost { display: none; }
  .site-header.open .site-nav {
    display: flex; position: absolute; top: 100%; left: 0; right: 0;
    flex-direction: column; background: var(--lh-ink-2);
    border-bottom: 1px solid rgba(255, 255, 255, .1); padding: .6rem;
  }
  .bento { grid-template-columns: 1fr; }
  .bento .wide { grid-column: span 1; }
  .plans { grid-template-columns: 1fr; }
  .plan.featured { transform: none; }
  .site-footer .wrap { flex-direction: column; align-items: flex-start; }
}

/* --- motion + print ------------------------------------------------------ */
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after {
    animation-duration: .01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: .01ms !important;
  }
  .has-reveal .reveal { opacity: 1; transform: none; }
}
@media print {
  .site-header, .hero-visual, .final-cta { display: none; }
  body { background: #fff; color: #000; }
  .has-reveal .reveal { opacity: 1; transform: none; }
}
