/* ==========================================================================
   LedgerLoop — Design System
   Brand: deep forest green + warm off-white, "loop/sync" motif throughout
   ========================================================================== */

:root {
  /* Color tokens */
  --ink:          #12201A;
  --ink-soft:     #45564D;
  --forest:       #0B5D3B;
  --forest-deep:  #0e0e0f;
  --forest-tint:  #E6EFE9;
  --loop:         #1FA971;
  --loop-soft:    #DFF3E9;
  --sand:         #C9A227;
  --cream:        #FBFBF9;
  --mist:         #F1F5F2;
  --line:         rgba(11, 93, 59, 0.14);
  --shadow-sm:    0 2px 10px rgba(7, 56, 35, 0.06);
  --shadow-md:    0 12px 32px rgba(7, 56, 35, 0.10);
  --shadow-lg:    0 24px 64px rgba(7, 56, 35, 0.16);

  /* Type tokens */
  --font-display: 'Sora', sans-serif;
  --font-body:    'Inter', sans-serif;
  --font-mono:    'JetBrains Mono', monospace;

  /* Layout tokens */
  --radius-sm: 10px;
  --radius-md: 16px;
  --radius-lg: 28px;
  --radius-pill: 999px;
  --container-max: 1180px;
  --orbit-radius: 160px;
}

/* ---------- Reset / base ---------- */
*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  font-family: var(--font-body);
  color: var(--ink);
  background: var(--cream);
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}
img, svg { max-width: 100%; display: block; }
a { color: inherit; text-decoration: none; }
ul { list-style: none; margin: 0; padding: 0; }
button { font-family: inherit; cursor: pointer; }
.container-xl {
  width: 100%;
  max-width: var(--container-max);
  margin: 0 auto;
  padding: 0 24px;
}
section { position: relative; }
::selection { background: var(--loop-soft); color: var(--forest-deep); }

/* ---------- Typography ---------- */
h1, h2, h3, h4, .display {
  font-family: var(--font-display);
  color: var(--forest-deep);
  line-height: 1.15;
  margin: 0 0 .6em;
  letter-spacing: -0.01em;
}
h1 { font-size: clamp(2.1rem, 4vw + 1rem, 3.4rem); font-weight: 800; }
h2 { font-size: clamp(1.6rem, 2.4vw + 1rem, 2.3rem); font-weight: 700; }
h3 { font-size: 1.25rem; font-weight: 700; }
p { line-height: 1.75; color: var(--ink-soft); margin: 0 0 1em; }
.lede { font-size: 1.1rem; color: var(--ink-soft); }

.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: .5em;
  font-family: var(--font-mono);
  font-size: .74rem;
  letter-spacing: .12em;
  text-transform: uppercase;
  color: var(--forest);
  background: var(--loop-soft);
  border: 1px solid var(--line);
  padding: .4em .9em;
  border-radius: var(--radius-pill);
  margin-bottom: 1em;
}
.eyebrow::before {
  content: "";
  width: 6px; height: 6px; border-radius: 50%;
  background: var(--loop);
  flex: none;
}

.section-head { max-width: 640px; margin: 0 auto 3rem; text-align: center; }
.section-head.left { margin: 0 0 3rem; text-align: left; }

/* ---------- Buttons ---------- */
.btn-loop, .btn-loop-outline, .btn-loop-ghost {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: .5em;
  font-family: var(--font-display);
  font-weight: 600;
  font-size: .95rem;
  padding: .85em 1.7em;
  border-radius: var(--radius-pill);
  border: 1.5px solid transparent;
  transition: transform .18s ease, box-shadow .18s ease, background .18s ease, color .18s ease;
  white-space: nowrap;
}
.btn-loop {
  background: var(--forest);
  color: #fff;
  box-shadow: var(--shadow-sm);
}
.btn-loop:hover { background: var(--forest-deep); transform: translateY(-2px); box-shadow: var(--shadow-md); color:#fff; }
.btn-loop-outline {
  background: transparent;
  color: var(--forest);
  border-color: var(--forest);
}
.btn-loop-outline:hover { background: var(--forest); color: #fff; transform: translateY(-2px); }
.btn-loop-ghost {
  background: var(--mist);
  color: var(--forest-deep);
  border-color: transparent;
}
.btn-loop-ghost:hover { background: var(--loop-soft); }
.btn-sm { padding: .6em 1.2em; font-size: .85rem; }
.btn-block-mobile { width: 100%; }

/* ---------- Navbar ---------- */
.site-header {
  position: sticky;
  top: 0;
  z-index: 999;
  background: rgba(251, 251, 249, 0.92);
  backdrop-filter: saturate(180%) blur(10px);
  border-bottom: 1px solid var(--line);
}
.navbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 14px 24px;
  max-width: var(--container-max);
  margin: 0 auto;
  gap: 20px;
}
.brand {
  display: flex;
  align-items: center;
  gap: .6em;
  font-family: var(--font-display);
  font-weight: 800;
  font-size: 1.2rem;
  color: var(--forest-deep);
  flex: none;
}
.brand-mark {
  width: 40px; height: 40px;
  border-radius: 12px;
  background: linear-gradient(155deg, var(--forest), var(--forest-deep));
  display: grid;
  place-items: center;
  flex: none;
}
.brand-mark svg { width: 22px; height: 22px; }

.nav-links {
  display: flex;
  align-items: center;
  gap: 6px;
  margin: 0 auto;
}
.nav-links a {
  font-family: var(--font-display);
  font-size: .93rem;
  font-weight: 600;
  color: var(--ink);
  padding: 10px 14px;
  border-radius: var(--radius-pill);
  transition: background .15s ease, color .15s ease;
}
.nav-links a:hover { background: var(--mist); color: var(--forest); }
.nav-links a.active { color: var(--forest); background: var(--loop-soft); }

.nav-actions { display: flex; align-items: center; gap: 10px; flex: none; }
.nav-phone {
  display: flex; align-items: center; gap: .5em;
  background: var(--forest);
  color: #fff;
  padding: .7em 1.3em;
  border-radius: var(--radius-pill);
  font-family: var(--font-mono);
  font-size: .85rem;
  font-weight: 500;
}
.nav-phone i { color: var(--loop-soft); }

.nav-toggle {
  display: none;
  flex-direction: column;
  gap: 5px;
  background: none;
  border: none;
  padding: 8px;
}
.nav-toggle span { width: 24px; height: 2px; background: var(--forest-deep); border-radius: 2px; transition: transform .2s ease, opacity .2s ease; }
.nav-toggle.open span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.nav-toggle.open span:nth-child(2) { opacity: 0; }
.nav-toggle.open span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

/* ---------- Hero ---------- */
.hero {
  padding: clamp(3rem, 6vw, 6rem) 0 clamp(2.5rem, 5vw, 4rem);
  overflow: hidden;
}
.hero-grid {
  max-width: var(--container-max);
  margin: 0 auto;
  padding: 0 24px;
  display: grid;
  grid-template-columns: 1.05fr .95fr;
  align-items: center;
  gap: 3rem;
}
.hero-quote {
  position: relative;
  padding-left: 1.6rem;
  border-left: 3px solid var(--loop-soft);
}
.hero-quote .mark {
  font-family: var(--font-display);
  font-size: 3.4rem;
  color: var(--loop);
  line-height: 1;
  display: block;
  margin-bottom: .1em;
}
.hero-actions { display: flex; gap: 14px; margin-top: 1.8rem; flex-wrap: wrap; }
.hero-stats {
  display: flex;
  gap: 2rem;
  margin-top: 2.6rem;
  padding-top: 1.6rem;
  border-top: 1px solid var(--line);
  flex-wrap: wrap;
}
.hero-stats .stat b {
  display: block;
  font-family: var(--font-mono);
  font-size: 1.5rem;
  color: var(--forest-deep);
}
.hero-stats .stat span {
  font-size: .8rem;
  color: var(--ink-soft);
}

/* ---------- Orbit graphic (signature element) ---------- */
.orbit-wrap {
  position: relative;
  width: 100%;
  max-width: 420px;
  aspect-ratio: 1 / 1;
  margin: 0 auto;
  --r: var(--orbit-radius);
}
.orbit-ring {
  position: absolute;
  top: 50%; left: 50%;
  border-radius: 50%;
  border: 2px dashed var(--line);
  transform: translate(-50%, -50%);
}
.ring-outer { width: calc(var(--r) * 2 + 60px); height: calc(var(--r) * 2 + 60px); border-color: rgba(11,93,59,.28); animation: spin 46s linear infinite; }
.ring-inner { width: calc(var(--r) * 2 - 60px); height: calc(var(--r) * 2 - 60px); border-color: rgba(31,169,113,.4); animation: spin-rev 32s linear infinite; }
@keyframes spin { to { transform: translate(-50%, -50%) rotate(360deg); } }
@keyframes spin-rev { to { transform: translate(-50%, -50%) rotate(-360deg); } }

.orbit-core {
  position: absolute; top: 50%; left: 50%;
  width: 108px; height: 108px;
  transform: translate(-50%, -50%);
  border-radius: 50%;
  background: linear-gradient(155deg, var(--forest), var(--forest-deep));
  display: grid; place-items: center;
  box-shadow: var(--shadow-lg);
}
.orbit-core svg { width: 52px; height: 52px; }

.orbit-node {
  position: absolute;
  top: 50%; left: 50%;
  width: 58px; height: 58px;
  margin: -29px;
  transform: rotate(var(--angle)) translate(var(--r)) rotate(calc(-1 * var(--angle)));
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 50%;
  display: grid; place-items: center;
  box-shadow: var(--shadow-sm);
}
.orbit-node i { font-size: 1.25rem; color: var(--forest); }

/* Mini orbit (used on About/Contact) */
.orbit-wrap.mini { max-width: 300px; --orbit-radius: 96px; }
.orbit-wrap.mini .orbit-core { width: 78px; height: 78px; }
.orbit-wrap.mini .orbit-core svg { width: 36px; height: 36px; }
.orbit-wrap.mini .orbit-node { width: 44px; height: 44px; margin: -22px; }
.orbit-wrap.mini .orbit-node i { font-size: 1rem; }

/* ---------- Alt sections / cards ---------- */
.section { padding: clamp(3rem, 6vw, 5.5rem) 0; }
.section.alt { background: var(--mist); }
.section.dark {
  background: linear-gradient(155deg, var(--forest-deep), var(--forest));
  color: #fff;
}
.section.dark h2, .section.dark h3 { color: #fff; }
.section.dark p { color: rgba(255,255,255,.82); }

.grid { display: grid; gap: 1.6rem; }
.grid-3 { grid-template-columns: repeat(3, 1fr); }
.grid-4 { grid-template-columns: repeat(4, 1fr); }
.grid-2 { grid-template-columns: repeat(2, 1fr); }

.card {
  background: #fff;
  border: 1px solid var(--line);
  border-radius: var(--radius-md);
  padding: 2rem 1.7rem;
  transition: transform .2s ease, box-shadow .2s ease;
}
.card:hover { transform: translateY(-4px); box-shadow: var(--shadow-md); }
.card .icon-badge {
  width: 52px; height: 52px;
  border-radius: var(--radius-sm);
  background: var(--loop-soft);
  color: var(--forest);
  display: grid; place-items: center;
  font-size: 1.35rem;
  margin-bottom: 1.1rem;
}
.card h3 { margin-bottom: .5em; }
.card p { margin-bottom: 0; font-size: .95rem; }

/* Numbered process (legit sequence use) */
.process-step { position: relative; padding-left: 3.4rem; }
.process-step .num {
  position: absolute; left: 0; top: 0;
  width: 2.6rem; height: 2.6rem;
  border-radius: 50%;
  background: var(--forest);
  color: #fff;
  font-family: var(--font-mono);
  font-weight: 500;
  display: grid; place-items: center;
}

/* CTA banner */
.cta-banner {
  border-radius: var(--radius-lg);
  padding: clamp(2.4rem, 5vw, 3.6rem);
  background: linear-gradient(155deg, var(--forest-deep), var(--forest));
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 2rem;
  flex-wrap: wrap;
}
.cta-banner h2 { color: #fff; margin-bottom: .3em; }
.cta-banner p { color: rgba(255,255,255,.82); margin-bottom: 0; max-width: 520px; }

/* ---------- Page header (inner pages) ---------- */
.page-header {
  padding: clamp(3rem, 6vw, 4.5rem) 0 clamp(2rem, 4vw, 3rem);
  background: var(--mist);
  border-bottom: 1px solid var(--line);
  text-align: center;
}
.breadcrumb {
  font-family: var(--font-mono);
  font-size: .82rem;
  color: var(--ink-soft);
}
.breadcrumb a { color: var(--forest); }

/* ---------- Legal content (privacy / terms) ---------- */
.legal-wrap { max-width: 800px; margin: 0 auto; }
.legal-updated {
  font-family: var(--font-mono);
  font-size: .82rem;
  color: var(--ink-soft);
  margin-bottom: 2.4rem;
}
.legal-wrap h2 {
  margin-top: 2.4rem;
  padding-top: 1.6rem;
  border-top: 1px solid var(--line);
  font-size: 1.3rem;
}
.legal-wrap h2:first-of-type { border-top: none; padding-top: 0; margin-top: 1rem; }
.legal-wrap ul { margin: 0 0 1em; padding-left: 1.3em; list-style: disc; }
.legal-wrap li { margin-bottom: .5em; line-height: 1.7; color: var(--ink-soft); }
.legal-toc {
  background: #fff;
  border: 1px solid var(--line);
  border-radius: var(--radius-md);
  padding: 1.6rem 1.8rem;
  margin-bottom: 2.6rem;
}
.legal-toc h3 { font-size: 1rem; margin-bottom: .8em; }
.legal-toc ol { list-style: decimal; padding-left: 1.2em; }
.legal-toc li { margin-bottom: .4em; }
.legal-toc a { color: var(--forest); font-weight: 600; }
.legal-toc a:hover { text-decoration: underline; }

/* ---------- Contact page ---------- */
.contact-grid { display: grid; grid-template-columns: .9fr 1.1fr; gap: 2.5rem; align-items: start; }
.contact-info-card {
  display: flex; gap: 1rem; align-items: flex-start;
  padding: 1.4rem 0;
  border-bottom: 1px solid var(--line);
}
.contact-info-card:last-child { border-bottom: none; }
.contact-info-card .icon-badge { margin-bottom: 0; flex: none; }
.contact-info-card h3 { font-size: 1rem; margin-bottom: .2em; }
.contact-info-card p { margin-bottom: 0; font-size: .92rem; }

.form-card {
  background: #fff;
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  padding: clamp(1.6rem, 3vw, 2.6rem);
  box-shadow: var(--shadow-sm);
}
.form-row { display: grid; grid-template-columns: 1fr 1fr; gap: 1.2rem; }
.field { margin-bottom: 1.2rem; }
.field label {
  display: block;
  font-family: var(--font-display);
  font-weight: 600;
  font-size: .88rem;
  margin-bottom: .5em;
  color: var(--forest-deep);
}
.field input, .field select, .field textarea {
  width: 100%;
  padding: .85em 1em;
  border: 1.5px solid var(--line);
  border-radius: var(--radius-sm);
  font-family: var(--font-body);
  font-size: .95rem;
  background: var(--cream);
  color: var(--ink);
  transition: border-color .15s ease, background .15s ease;
}
.field input:focus, .field select:focus, .field textarea:focus {
  outline: none;
  border-color: var(--forest);
  background: #fff;
}
.field textarea { resize: vertical; min-height: 120px; }
.field.invalid input, .field.invalid textarea, .field.invalid select { border-color: #C0392B; }
.field .err { color: #C0392B; font-size: .78rem; display: none; margin-top: .35em; }
.field.invalid .err { display: block; }
.form-success {
  display: none;
  align-items: center;
  gap: .8em;
  background: var(--loop-soft);
  border: 1px solid var(--loop);
  color: var(--forest-deep);
  padding: 1rem 1.2rem;
  border-radius: var(--radius-sm);
  margin-bottom: 1.4rem;
  font-size: .92rem;
}
.form-success.show { display: flex; }
.map-embed {
  border-radius: var(--radius-md);
  overflow: hidden;
  border: 1px solid var(--line);
  margin-top: 1.6rem;
}
.map-embed iframe { width: 100%; height: 260px; border: 0; filter: grayscale(.15); }

/* ---------- Footer ---------- */
.site-footer { background: var(--forest-deep); color: rgba(255,255,255,.78); padding: 3.6rem 0 0; }
.footer-grid {
  display: grid;
  grid-template-columns: 1.4fr 1fr 1fr 1.2fr;
  gap: 2.4rem;
  padding-bottom: 2.6rem;
  border-bottom: 1px solid rgba(255,255,255,.12);
}
.footer-brand .brand { color: #fff; }
.footer-brand p { color: rgba(255,255,255,.65); font-size: .92rem; max-width: 280px; }
.footer-social { display: flex; gap: 10px; margin-top: 1.2rem; }
.footer-social a {
  width: 38px; height: 38px; border-radius: 50%;
  background: rgba(255,255,255,.08);
  display: grid; place-items: center;
  transition: background .15s ease;
}
.footer-social a:hover { background: var(--loop); }
.footer-col h4 {
  color: #fff; font-family: var(--font-display);
  font-size: .92rem; letter-spacing: .04em; text-transform: uppercase;
  margin-bottom: 1.1rem;
}
.footer-col a, .footer-col p { display: block; color: rgba(255,255,255,.68); font-size: .92rem; margin-bottom: .7em; }
.footer-col a:hover { color: #fff; }
.footer-bottom {
  display: flex; justify-content: space-between; align-items: center;
  padding: 1.4rem 0; font-size: .82rem; color: rgba(255,255,255,.55);
  flex-wrap: wrap; gap: 10px;
}
.footer-bottom a { color: rgba(255,255,255,.55); }
.footer-bottom a:hover { color: #fff; }

/* ---------- Floating widgets ---------- */
.floating-help {
  position: fixed;
  right: 22px; bottom: 22px;
  z-index: 900;
  display: flex; align-items: center; gap: .6em;
  background: var(--forest);
  color: #fff;
  padding: .9em 1.3em;
  border-radius: var(--radius-pill);
  box-shadow: var(--shadow-lg);
  font-family: var(--font-display);
  font-weight: 600;
  font-size: .9rem;
  border: none;
  transition: transform .18s ease, background .18s ease;
}
.floating-help:hover { background: var(--forest-deep); transform: translateY(-3px); }

.back-to-top {
  position: fixed;
  right: 22px; bottom: 92px;
  z-index: 900;
  width: 44px; height: 44px;
  border-radius: 50%;
  background: #fff;
  border: 1px solid var(--line);
  color: var(--forest);
  display: grid; place-items: center;
  box-shadow: var(--shadow-md);
  opacity: 0; pointer-events: none;
  transform: translateY(10px);
  transition: opacity .2s ease, transform .2s ease;
}
.back-to-top.show { opacity: 1; pointer-events: auto; transform: translateY(0); }

/* ---------- Reveal-on-scroll ---------- */
.reveal { opacity: 0; transform: translateY(18px); transition: opacity .6s ease, transform .6s ease; }
.reveal.in { opacity: 1; transform: translateY(0); }

/* ---------- Utilities ---------- */
.text-center { text-align: center; }
.mt-0 { margin-top: 0; }
.mb-0 { margin-bottom: 0; }
.flex-center { display: flex; align-items: center; justify-content: center; }

@media (prefers-reduced-motion: reduce) {
  .ring-outer, .ring-inner { animation: none; }
  .reveal { transition: none; opacity: 1; transform: none; }
}

/* ==========================================================================
   Responsive
   ========================================================================== */
@media (max-width: 1024px) {
  .hero-grid { grid-template-columns: 1fr; }
  .orbit-wrap { max-width: 340px; margin-top: 2rem; --orbit-radius: 120px; }
  .grid-4 { grid-template-columns: repeat(2, 1fr); }
  .grid-3 { grid-template-columns: repeat(2, 1fr); }
  .contact-grid { grid-template-columns: 1fr; }
  .footer-grid { grid-template-columns: 1fr 1fr; }
}

@media (max-width: 860px) {
  .nav-links {
    position: absolute;
    top: 100%; left: 0; right: 0;
    background: #fff;
    flex-direction: column;
    align-items: stretch;
    padding: 10px 20px 18px;
    border-bottom: 1px solid var(--line);
    box-shadow: var(--shadow-md);
    max-height: 0;
    overflow: hidden;
    transition: max-height .25s ease;
  }
  .nav-links.open { max-height: 400px; }
  .nav-links a { padding: 12px 14px; }
  .nav-toggle { display: flex; }
  .nav-phone span.full { display: none; }
}

@media (max-width: 700px) {
  .grid-3, .grid-4, .grid-2 { grid-template-columns: 1fr; }
  .form-row { grid-template-columns: 1fr; }
  .cta-banner { flex-direction: column; text-align: center; }
  .cta-banner p { max-width: none; }
  .footer-grid { grid-template-columns: 1fr; }
  .hero-stats { gap: 1.4rem; }
  .floating-help span.full { display: none; }
  .floating-help { padding: .9em; }
}

@media (max-width: 480px) {
  .orbit-wrap { max-width: 260px; --orbit-radius: 88px; }
  .orbit-core { width: 78px; height: 78px; }
  .orbit-core svg { width: 34px; height: 34px; }
  .orbit-node { width: 44px; height: 44px; margin: -22px; }
  h1 { font-size: 1.9rem; }
}
/*  */

