/* ============================================================
   LOOPMERCE - Shared design system
   Light, Apple-inspired. Inter throughout.
   One base; each product owns a cube-face accent color.
   ============================================================ */

:root {
  /* Brand core (from the cube logo) */
  --blue:   #2C7BF0;
  --navy:   #1C3B6E;
  --teal:   #15A98A;

  /* Ink & neutrals */
  --ink:    #0E1020;
  --ink-2:  #111322;
  --muted:  #5A6072;
  --line:   #E7EAF1;
  --line-2: #EEF1F7;

  /* Surfaces */
  --bg:      #FFFFFF;
  --wash:    #F6F8FC;
  --wash-2:  #F0F4FA;
  --card:    #FFFFFF;

  /* Accent - overridden per product page via body class */
  --accent:      var(--blue);
  --accent-ink:  #1D5FCB;      /* darker accent for text/hover */
  --accent-soft: #EAF2FE;      /* chip / fill */
  --accent-wash: #F4F8FE;      /* section wash */

  /* Type */
  --font: "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;

  /* Shape & depth */
  --r-sm: 10px;
  --r:    16px;
  --r-lg: 24px;
  --r-xl: 32px;
  --shadow-sm: 0 1px 2px rgba(16,16,32,.04), 0 2px 8px rgba(16,16,32,.04);
  --shadow:    0 4px 12px rgba(16,16,32,.06), 0 12px 40px rgba(16,16,32,.07);
  --shadow-lg: 0 8px 24px rgba(16,16,32,.08), 0 30px 70px rgba(16,16,32,.10);

  /* Layout */
  --maxw: 1160px;
  --gut:  24px;
}

/* Per-product accent themes ---------------------------------- */
body.theme-rep {
  --accent: var(--navy);
  --accent-ink: #16305A;
  --accent-soft: #E9EEF6;
  --accent-wash: #F4F7FB;
}
body.theme-shipping {
  --accent: var(--blue);
  --accent-ink: #1D5FCB;
  --accent-soft: #EAF2FE;
  --accent-wash: #F4F8FE;
}
body.theme-invoicing {
  --accent: var(--teal);
  --accent-ink: #0E8A72;
  --accent-soft: #E4F5F1;
  --accent-wash: #F3FAF8;
}

/* Reset ------------------------------------------------------ */
*, *::before, *::after { box-sizing: border-box; }
* { margin: 0; padding: 0; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
body {
  font-family: var(--font);
  color: var(--ink);
  background: var(--bg);
  font-size: 17px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}
img { max-width: 100%; display: block; }
a { color: inherit; text-decoration: none; }
button { font-family: inherit; cursor: pointer; border: none; background: none; }
ul { list-style: none; }

/* Typography ------------------------------------------------- */
h1, h2, h3, h4 { color: var(--ink); font-weight: 800; line-height: 1.08; letter-spacing: -0.025em; }
h1 { font-size: clamp(2.4rem, 5.2vw, 4rem); font-weight: 900; }
h2 { font-size: clamp(1.9rem, 3.6vw, 2.9rem); }
h3 { font-size: clamp(1.2rem, 2vw, 1.5rem); letter-spacing: -0.02em; }
p  { color: var(--muted); }
.lead { font-size: clamp(1.1rem, 1.7vw, 1.35rem); color: var(--muted); line-height: 1.5; }

.eyebrow {
  display: inline-flex; align-items: center; gap: 8px;
  font-size: .78rem; font-weight: 700; letter-spacing: .12em;
  text-transform: uppercase; color: var(--accent-ink);
  background: var(--accent-soft);
  padding: 7px 14px; border-radius: 100px;
}

/* Layout helpers -------------------------------------------- */
.wrap { max-width: var(--maxw); margin: 0 auto; padding: 0 var(--gut); }
.section { padding: clamp(64px, 9vw, 120px) 0; }
.section-head { max-width: 720px; margin: 0 auto clamp(40px, 5vw, 64px); text-align: center; }
.section-head .lead { margin-top: 18px; }
.center { text-align: center; }

/* Buttons ---------------------------------------------------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 9px;
  font-weight: 600; font-size: 1rem; letter-spacing: -0.01em;
  padding: 14px 26px; border-radius: 100px;
  transition: transform .18s ease, box-shadow .2s ease, background .2s ease, color .2s ease;
  white-space: nowrap;
}
.btn-primary {
  background: var(--accent); color: #fff;
  box-shadow: 0 6px 18px color-mix(in srgb, var(--accent) 30%, transparent);
}
.btn-primary:hover { transform: translateY(-2px); box-shadow: 0 10px 26px color-mix(in srgb, var(--accent) 38%, transparent); }
.btn-ghost {
  background: #fff; color: var(--ink); border: 1px solid var(--line);
  box-shadow: var(--shadow-sm);
}
.btn-ghost:hover { transform: translateY(-2px); border-color: var(--accent); color: var(--accent-ink); }
.btn-lg { padding: 16px 32px; font-size: 1.05rem; }
.btn-arrow svg { width: 18px; height: 18px; transition: transform .2s ease; }
.btn:hover .btn-arrow svg, .btn.btn-arrow:hover svg { transform: translateX(3px); }

/* Header ----------------------------------------------------- */
.site-header {
  position: sticky; top: 0; z-index: 100;
  background: rgba(255,255,255,.82);
  backdrop-filter: saturate(180%) blur(18px);
  -webkit-backdrop-filter: saturate(180%) blur(18px);
  border-bottom: 1px solid transparent;
  transition: border-color .2s ease, background .2s ease;
}
.site-header.scrolled { border-bottom-color: var(--line); }
.nav { display: flex; align-items: center; justify-content: space-between; height: 72px; }
.nav-logo img { height: 30px; width: auto; }
.nav-links { display: flex; align-items: center; gap: 4px; }
.nav-links a {
  font-size: .95rem; font-weight: 500; color: var(--ink);
  padding: 9px 14px; border-radius: 100px; transition: background .18s ease, color .18s ease;
}
.nav-links a:hover { background: var(--wash); color: var(--accent-ink); }
.nav-cta { display: flex; align-items: center; gap: 10px; }

/* Products dropdown — premium menu (CSS driven; .open toggled by JS, :hover fallback) */
.nav-drop { position: relative; }
.nav-drop-toggle { display: inline-flex; align-items: center; gap: 5px; cursor: pointer; }
.nav-drop-toggle svg { width: 14px; height: 14px; opacity: .6; transition: transform .2s ease; }
.nav-drop:hover .nav-drop-toggle svg,
.nav-drop.open .nav-drop-toggle svg { transform: rotate(180deg); }

.nav-drop-menu {
  position: absolute; top: 100%; left: 0; margin-top: 17px;      /* stronger separation below the nav */
  width: 428px; max-width: calc(100vw - 32px); padding: 10px;
  background: rgba(250,251,254,.96);                              /* near-opaque, subtle cool tint */
  -webkit-backdrop-filter: saturate(180%) blur(28px);
          backdrop-filter: saturate(180%) blur(28px);
  border: 1px solid rgba(219,226,238,.9); border-radius: 22px;
  box-shadow: 0 2px 8px rgba(16,24,48,.08), 0 12px 24px rgba(16,24,48,.10), 0 34px 72px rgba(16,24,48,.22);
  opacity: 0; visibility: hidden; transform: translateY(10px) scale(.975); transform-origin: top left;
  transition: opacity .2s ease, transform .22s cubic-bezier(.2,.7,.2,1), visibility .22s;
  z-index: 50;
}
/* invisible bridge across the gap so hover-intent never breaks */
.nav-drop-menu::before { content: ""; position: absolute; left: 0; right: 0; top: -16px; height: 16px; }
.nav-drop:hover .nav-drop-menu,
.nav-drop.open .nav-drop-menu { opacity: 1; visibility: visible; transform: translateY(0) scale(1); }

.nav-drop-item {
  position: relative; display: flex; gap: 14px; align-items: center;
  padding: 13px 15px 13px 13px; border-radius: 14px; transition: background .16s ease;
}
.nav-drop-item:hover { background: var(--accent-wash); }
.nav-drop-item img {
  box-sizing: border-box; flex: 0 0 auto; width: 42px; height: 42px;
  padding: 9px; border-radius: 12px; object-fit: contain;
  background: var(--dd-soft, var(--wash)); transition: background .16s ease;
}
.nav-drop-item > span { flex: 1 1 auto; min-width: 0; }
.nav-drop-item br { display: none; }
.nav-drop-item .t { display: block; font-weight: 700; font-size: .96rem; color: var(--ink); letter-spacing: -.01em; white-space: normal; overflow-wrap: anywhere; word-break: normal; }
.nav-drop-item .d { display: block; font-size: .82rem; color: var(--muted); line-height: 1.4; margin-top: 3px; white-space: normal; overflow-wrap: anywhere; word-break: normal; }
.nav-drop-item::after {
  content: ""; flex: 0 0 auto; width: 16px; height: 16px; margin-left: 4px; opacity: .4;
  background: no-repeat center / 16px 16px url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%235A6472' stroke-width='2.5' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M9 6l6 6-6 6'/%3E%3C/svg%3E");
  transition: transform .18s ease, opacity .18s ease;
}
.nav-drop-item:hover::after { opacity: .9; transform: translateX(4px); }

/* subtle per-product accent tints */
.nav-drop-item:nth-child(1) { --dd-soft: #E9EEF6; }   /* Customer Rep — dark blue */
.nav-drop-item:nth-child(2) { --dd-soft: #EAF2FE; }   /* Shipping — blue */
.nav-drop-item:nth-child(3) { --dd-soft: #E4F5EF; }   /* Automated Invoicing — green */
.nav-drop-item:nth-child(1):hover img { background: #DDE5F1; }
.nav-drop-item:nth-child(2):hover img { background: #DAE9FD; }
.nav-drop-item:nth-child(3):hover img { background: #D3EEE3; }
.nav-drop-item:focus-visible { outline: 3px solid color-mix(in srgb, var(--blue) 45%, transparent); outline-offset: -2px; }

/* Mobile nav */
.nav-toggle { display: none; width: 42px; height: 42px; border-radius: 10px; align-items: center; justify-content: center; }
.nav-toggle span { display: block; width: 20px; height: 2px; background: var(--ink); position: relative; transition: .2s; }
.nav-toggle span::before, .nav-toggle span::after { content:""; position: absolute; left: 0; width: 20px; height: 2px; background: var(--ink); transition: .2s; }
.nav-toggle span::before { top: -6px; } .nav-toggle span::after { top: 6px; }

/* Hero shared ------------------------------------------------ */
.hero { position: relative; overflow: hidden; padding: clamp(56px, 8vw, 96px) 0 clamp(48px, 7vw, 80px); }
.hero-wash {
  position: absolute; inset: 0; z-index: -1;
  background:
    radial-gradient(60% 55% at 78% -8%, var(--accent-soft) 0%, transparent 60%),
    radial-gradient(50% 50% at 10% 0%, var(--wash-2) 0%, transparent 55%),
    linear-gradient(180deg, var(--wash) 0%, #fff 62%);
}
.hero-dots {
  position: absolute; inset: 0; z-index: -1; opacity: .5;
  background-image: radial-gradient(var(--line) 1px, transparent 1px);
  background-size: 26px 26px;
  -webkit-mask-image: radial-gradient(70% 60% at 50% 0%, #000 0%, transparent 75%);
          mask-image: radial-gradient(70% 60% at 50% 0%, #000 0%, transparent 75%);
}
.hero h1 { margin: 22px 0 20px; }
.hero .lead { max-width: 620px; }
.hero-actions { display: flex; flex-wrap: wrap; gap: 14px; margin-top: 32px; }
.hero-note { margin-top: 18px; font-size: .9rem; color: var(--muted); display: flex; align-items: center; gap: 8px; }

/* Trust strip ------------------------------------------------ */
.trust { border-top: 1px solid var(--line-2); border-bottom: 1px solid var(--line-2); background: #fff; }
.trust-inner { display: flex; align-items: center; justify-content: center; flex-wrap: wrap; gap: 14px 28px; padding: 24px 0; }
.trust-label { font-size: .82rem; font-weight: 600; color: var(--muted); letter-spacing: .02em; }
.mkt-pill {
  display: inline-flex; align-items: center; gap: 8px; font-weight: 700; font-size: .95rem;
  padding: 8px 16px; border-radius: 100px; border: 1px solid var(--line);
}
.mkt-pill .dot { width: 9px; height: 9px; border-radius: 50%; }
.mkt-bm .dot { background: var(--blue); } .mkt-bm { color: var(--navy); }
.mkt-rf .dot { background: var(--teal); } .mkt-rf { color: var(--teal); }
.trust-sub { font-size: .85rem; color: var(--muted); }

/* Cards / feature grid --------------------------------------- */
.grid { display: grid; gap: 22px; }
.g-2 { grid-template-columns: repeat(2, 1fr); }
.g-3 { grid-template-columns: repeat(3, 1fr); }
.card {
  background: var(--card); border: 1px solid var(--line);
  border-radius: var(--r-lg); padding: 30px;
  box-shadow: var(--shadow-sm); transition: transform .2s ease, box-shadow .2s ease, border-color .2s ease;
}
.card:hover { transform: translateY(-3px); box-shadow: var(--shadow); border-color: color-mix(in srgb, var(--accent) 35%, var(--line)); }
.card .ico {
  width: 48px; height: 48px; border-radius: 13px; display: grid; place-items: center;
  background: var(--accent-soft); color: var(--accent-ink); margin-bottom: 18px;
}
.card .ico svg { width: 24px; height: 24px; }
.card h3 { margin-bottom: 9px; }
.card p { font-size: .96rem; }

/* Bullet lists with diamond/check markers -------------------- */
.ticks { display: grid; gap: 12px; margin-top: 8px; }
.ticks li { display: flex; gap: 11px; align-items: flex-start; font-size: .97rem; color: var(--ink-2); }
.ticks li svg { flex: 0 0 auto; width: 20px; height: 20px; margin-top: 1px; color: var(--accent); }

/* Problem section ------------------------------------------- */
.prob { background: var(--wash); }
.prob-list { display: grid; gap: 14px; max-width: 780px; margin: 0 auto; }
.prob-item {
  display: flex; gap: 14px; align-items: flex-start; padding: 20px 24px;
  background: #fff; border: 1px solid var(--line); border-radius: var(--r);
}
.prob-item .x { flex: 0 0 auto; width: 24px; height: 24px; border-radius: 7px; background: #FDECEC; color: #D8493E; display: grid; place-items: center; margin-top: 1px; }
.prob-item .x svg { width: 14px; height: 14px; }
.prob-item p { color: var(--ink-2); font-size: .98rem; }
.prob-line { text-align: center; font-size: clamp(1.15rem,2vw,1.5rem); font-weight: 700; color: var(--ink); letter-spacing: -0.02em; max-width: 760px; margin: 40px auto 0; }
.prob-line span { color: var(--accent-ink); }

/* Steps / how it works -------------------------------------- */
.steps { display: grid; grid-template-columns: repeat(3, 1fr); gap: 22px; counter-reset: step; }
.step { position: relative; background: #fff; border: 1px solid var(--line); border-radius: var(--r-lg); padding: 30px; box-shadow: var(--shadow-sm); }
.step .num {
  width: 40px; height: 40px; border-radius: 11px; display: grid; place-items: center;
  background: var(--accent); color: #fff; font-weight: 800; font-size: 1.05rem; margin-bottom: 18px;
}
.step h3 { margin-bottom: 8px; }
.step p { font-size: .95rem; }

/* Feature rows (alternating) -------------------------------- */
.frow { display: grid; grid-template-columns: 1fr 1fr; gap: clamp(32px, 5vw, 72px); align-items: center; }
.frow + .frow { margin-top: clamp(48px, 6vw, 88px); }
.frow.rev .frow-media { order: 2; }
.frow-media {
  border-radius: var(--r-lg); border: 1px solid var(--line); background: var(--accent-wash);
  box-shadow: var(--shadow); aspect-ratio: 16/11; display: grid; place-items: center; overflow: hidden;
}
.frow-media .ph { color: var(--accent-ink); opacity: .5; font-size: .85rem; font-weight: 600; }
.frow-body h3 { font-size: clamp(1.4rem, 2.4vw, 1.9rem); margin-bottom: 14px; }
.frow-body .lead { font-size: 1.05rem; margin-bottom: 18px; }

/* Callout box ------------------------------------------------ */
.callout {
  background: linear-gradient(135deg, var(--accent) 0%, var(--accent-ink) 100%);
  color: #fff; border-radius: var(--r-xl); padding: clamp(32px, 5vw, 56px);
  position: relative; overflow: hidden;
}
.callout::after {
  content:""; position: absolute; right: -60px; top: -60px; width: 260px; height: 260px;
  background: radial-gradient(circle, rgba(255,255,255,.16), transparent 70%);
}
.callout h3 { color: #fff; font-size: clamp(1.3rem, 2.4vw, 1.9rem); margin-bottom: 12px; max-width: 640px; }
.callout p { color: rgba(255,255,255,.9); max-width: 640px; font-size: 1.05rem; }

/* Pricing ---------------------------------------------------- */
.price-wrap { max-width: 560px; margin: 0 auto; }
.price-card {
  background: #fff; border: 1.5px solid var(--accent); border-radius: var(--r-xl);
  padding: clamp(28px, 4vw, 44px); box-shadow: var(--shadow-lg); position: relative;
}
.price-banner {
  display: inline-flex; align-items: center; gap: 8px; background: var(--accent-soft); color: var(--accent-ink);
  font-weight: 700; font-size: .85rem; padding: 8px 15px; border-radius: 100px; margin-bottom: 20px;
}
.price-amt { display: flex; align-items: baseline; gap: 6px; margin: 6px 0 6px; }
.price-amt .n { font-size: clamp(2.6rem, 6vw, 3.6rem); font-weight: 900; letter-spacing: -0.03em; color: var(--ink); }
.price-amt .per { color: var(--muted); font-weight: 600; font-size: 1.05rem; }
.price-sub { color: var(--muted); margin-bottom: 24px; }
.price-card .ticks { margin: 24px 0; }
.price-value { background: var(--wash); border-radius: var(--r); padding: 18px 20px; font-size: .92rem; color: var(--ink-2); line-height: 1.55; margin-bottom: 24px; }
.price-foot { text-align: center; font-size: .85rem; color: var(--muted); margin-top: 14px; }

/* Stats ------------------------------------------------------ */
.stats { display: grid; grid-template-columns: repeat(4, 1fr); gap: 22px; }
.stat { text-align: center; padding: 28px 18px; background: #fff; border: 1px solid var(--line); border-radius: var(--r-lg); }
.stat .n { font-size: clamp(1.8rem, 3vw, 2.4rem); font-weight: 900; letter-spacing: -0.03em; color: var(--accent-ink); }
.stat .l { font-size: .9rem; color: var(--muted); margin-top: 4px; }

/* FAQ -------------------------------------------------------- */
.faq { max-width: 760px; margin: 0 auto; display: grid; gap: 12px; }
.faq-item { border: 1px solid var(--line); border-radius: var(--r); background: #fff; overflow: hidden; }
.faq-q { width: 100%; text-align: left; display: flex; justify-content: space-between; align-items: center; gap: 16px; padding: 20px 24px; font-weight: 650; font-size: 1.02rem; color: var(--ink); }
.faq-q .chev { flex: 0 0 auto; width: 22px; height: 22px; transition: transform .22s ease; color: var(--muted); }
.faq-item.open .chev { transform: rotate(180deg); }
.faq-a { max-height: 0; overflow: hidden; transition: max-height .28s ease; }
.faq-a-inner { padding: 0 24px 22px; color: var(--muted); font-size: .98rem; }

/* CTA banner ------------------------------------------------- */
.cta-band { text-align: center; }
.cta-inner {
  background: var(--accent-wash); border: 1px solid var(--accent-soft);
  border-radius: var(--r-xl); padding: clamp(40px, 6vw, 72px) clamp(24px, 5vw, 56px);
  position: relative; overflow: hidden;
}
.cta-inner h2 { max-width: 680px; margin: 0 auto 16px; }
.cta-inner .lead { max-width: 560px; margin: 0 auto 28px; }
.cta-inner .hero-actions { justify-content: center; }

/* Footer ----------------------------------------------------- */
.site-footer { background: var(--wash); border-top: 1px solid var(--line); padding: clamp(48px,6vw,72px) 0 32px; }
.foot-grid { display: grid; grid-template-columns: 1.6fr 1fr 1fr 1fr; gap: 40px; }
.foot-brand img { height: 30px; margin-bottom: 16px; }
.foot-brand p { font-size: .92rem; max-width: 280px; }
.foot-col h4 { font-size: .8rem; text-transform: uppercase; letter-spacing: .08em; color: var(--muted); margin-bottom: 16px; font-weight: 700; }
.foot-col ul { display: grid; gap: 11px; }
.foot-col a { font-size: .93rem; color: var(--ink-2); transition: color .16s ease; }
.foot-col a:hover { color: var(--accent-ink); }
.foot-bottom { display: flex; justify-content: space-between; align-items: center; flex-wrap: wrap; gap: 12px; margin-top: 48px; padding-top: 24px; border-top: 1px solid var(--line); }
.foot-bottom p { font-size: .86rem; color: var(--muted); }
.foot-social { display: flex; gap: 10px; }
.foot-social a { width: 36px; height: 36px; border-radius: 50%; background: #fff; border: 1px solid var(--line); display: grid; place-items: center; color: var(--muted); transition: .18s; }
.foot-social a:hover { color: var(--accent-ink); border-color: var(--accent); transform: translateY(-2px); }
.foot-social svg { width: 16px; height: 16px; }

/* Reveal on scroll ------------------------------------------ */
.reveal { opacity: 0; transform: translateY(18px); transition: opacity .6s ease, transform .6s ease; }
.reveal.in { opacity: 1; transform: none; }

/* Responsive ------------------------------------------------- */
@media (max-width: 940px) {
  .g-3, .steps, .stats { grid-template-columns: repeat(2, 1fr); }
  .frow { grid-template-columns: 1fr; }
  .frow.rev .frow-media { order: 0; }
  .foot-grid { grid-template-columns: 1fr 1fr; gap: 32px; }
}
@media (max-width: 680px) {
  body { font-size: 16px; }
  .nav-links, .nav-cta .btn-ghost { display: none; }
  .nav-toggle { display: flex; }
  .nav.open + .nav-mobile { display: block; }
  .g-2, .g-3, .steps, .stats { grid-template-columns: 1fr; }
  .foot-grid { grid-template-columns: 1fr; }
  .hero-actions .btn { width: 100%; }
  .trust-inner { flex-direction: column; gap: 12px; }
}

/* Mobile menu panel */
.nav-mobile { display: none; border-top: 1px solid var(--line); background: #fff; padding: 12px var(--gut) 20px; }
.nav-mobile a { display: block; padding: 12px 8px; font-weight: 500; border-radius: 10px; }
.nav-mobile a:hover { background: var(--wash); }
.nav-mobile .btn { width: 100%; margin-top: 10px; }
@media (max-width: 680px) { .nav-mobile.show { display: block; } }

@media (prefers-reduced-motion: reduce) {
  * { animation: none !important; transition: none !important; scroll-behavior: auto !important; }
  .reveal { opacity: 1; transform: none; }
}

/* Focus visibility */
a:focus-visible, button:focus-visible, .btn:focus-visible {
  outline: 3px solid color-mix(in srgb, var(--accent) 45%, transparent);
  outline-offset: 2px;
}
