/* Loop Network — shared styles. Server-rendered HTML + HTMX, no framework.
   Tokens, type and components mirror the deployed loopnetwork.ai design
   (oklch palette, Manrope + Plus Jakarta Sans). */

:root{
  --bg: oklch(0.99 0.004 250);
  --surface: #fff;
  --card: oklch(0.97 0.008 250);
  --input: oklch(0.98 0.004 250);
  --ink: oklch(0.16 0.03 260);
  --muted: oklch(0.4 0.02 260);
  --muted2: oklch(0.45 0.02 260);
  --small: oklch(0.5 0.02 260);
  --line: oklch(0.92 0.008 255);
  --line-2: oklch(0.89 0.01 255);
  --accent: oklch(0.5 0.22 265);
  --accent-strong: oklch(0.42 0.2 265);
  --accent-tint: oklch(0.5 0.22 265 / .1);
  --accent-tint12: oklch(0.5 0.22 265 / .12);
  --navy: oklch(0.2 0.05 262);
  --navy-inner: oklch(0.22 0.03 260);
  --darkest: oklch(0.16 0.03 260);
  --on-dark: oklch(0.85 0.02 260);
  --on-dark-2: oklch(0.78 0.03 260);
  --green: oklch(0.78 0.14 165);
  --green-bg: oklch(0.85 0.12 165);
  --green-tx: oklch(0.3 0.1 165);
  --amber: oklch(0.82 0.12 75);
  --viz-indigo: oklch(0.62 0.2 265);
  --sans: "Manrope", system-ui, -apple-system, Segoe UI, Roboto, sans-serif;
  --display: "Plus Jakarta Sans", var(--sans);
  --maxw: 1240px;
}
*{ box-sizing:border-box; }
html{ background:var(--bg); scroll-behavior:smooth; }
body{ margin:0; background:var(--bg); color:var(--ink); font-family:var(--sans);
  font-size:16px; line-height:1.6; -webkit-font-smoothing:antialiased; }
img{ max-width:100%; }
a{ color:inherit; text-decoration:none; -webkit-tap-highlight-color:transparent; }
h1,h2,h3{ font-family:var(--display); font-weight:800; letter-spacing:-.6px; line-height:1.12; text-wrap:balance; margin:0; }
/* Home page mirrors the reference design (Home.dc.html), which has no global line-height, box-sizing or heading defaults. */
body.home, body.dc{ line-height:normal; font-family:'Manrope',sans-serif; }
body.home *, body.home *::before, body.home *::after, body.dc *, body.dc *::before, body.dc *::after{ box-sizing:content-box; }
body.dc :where(input,textarea,select){ font-family:'Manrope',sans-serif; } /* the design's global rule for form controls */
body.home :where(h1,h2,h3), body.dc :where(h1,h2,h3){ letter-spacing:normal; line-height:normal; text-wrap:wrap; }
.tnum{ font-variant-numeric:tabular-nums; }

/* page fade-in: the page is visible by default and the fade is pure CSS, so a slow, blocked or failed script can never leave a blank page */
@keyframes loop-fade{ from{ opacity:0; } to{ opacity:1; } }
body{ animation:loop-fade .3s cubic-bezier(.16,1,.3,1); }
@media (prefers-reduced-motion:reduce){ body{ animation:none; } html{ scroll-behavior:auto; } }

.wrap{ max-width:var(--maxw); margin:0 auto; padding-inline:clamp(20px,4vw,48px); }
.section{ padding-block:clamp(56px,10vw,96px); }
.narrow{ max-width:900px; margin-inline:auto; }
.center{ text-align:center; }
.eyebrow{ font-size:12.5px; font-weight:800; letter-spacing:1.6px; text-transform:uppercase; color:var(--accent); }
.eyebrow.pill{ display:inline-block; background:var(--accent-tint); border-radius:999px; padding:7px 14px; }
.lead{ font-size:18px; color:var(--muted); line-height:1.6; text-wrap:pretty; }
.muted{ color:var(--muted); }
.small{ font-size:13px; }

/* buttons */
.btn{ display:inline-flex; align-items:center; justify-content:center; gap:8px; font-family:var(--display);
  font-weight:700; cursor:pointer; border:none; border-radius:12px; font-size:16px; padding:16px 28px;
  transition:transform .12s ease, background .12s ease, box-shadow .12s ease; }
.btn-primary{ background:var(--accent); color:#fff; box-shadow:0 4px 12px oklch(0.5 0.22 265 / .18); }
.btn-primary:hover{ background:var(--accent-strong); transform:translateY(-1px); }
.btn-sm{ padding:12px 24px; font-size:16px; border-radius:12px; box-shadow:none; }
.btn.nav-cta{ font-family:var(--display); font-size:16px; font-weight:700; }
.btn.hero-cta{ font-family:var(--display); font-size:16px; font-weight:700; padding:16px 32px; } /* same font as the nav button */
.btn-ghost{ background:transparent; color:var(--ink); border-bottom:2px solid var(--ink); border-radius:0; padding:6px 2px; }
.btn-ondark{ background:#fff; color:var(--navy); font-weight:700; padding:12px 20px; border-radius:10px; box-shadow:none; }
.btn-ondark:hover{ transform:translateY(-1px); }

/* nav */
header.nav{ position:sticky; top:0; z-index:50; background:transparent;
  border-bottom:1px solid transparent; transition:border-color .2s ease, background-color .2s ease; }
header.nav.scrolled, header.nav:has(.mnav.open){ background:#fff; } /* white once the page has scrolled, or while the phone menu is open */
header.nav.scrolled{ border-bottom-color:oklch(0.9 0.01 255); } /* the thin line appears only once the page has scrolled */
.nav-in{ max-width:var(--maxw); margin:0 auto; padding:16px clamp(20px,4vw,48px); display:flex; align-items:center; gap:16px; }
.logo{ display:flex; align-items:center; gap:8px; }
.logo img{ width:26px; height:26px; display:block; }
header.nav .logo img{ width:auto; height:36px; } /* full lockup (3:1), not the square icon */
.logo .wm{ font-family:var(--display); font-weight:800; font-size:19px; letter-spacing:1px; color:var(--ink); }
nav.links{ display:flex; gap:clamp(16px,2.5vw,32px); flex:1; justify-content:center; } /* centred in the space between logo and button */
nav.links a{ font-size:15px; font-weight:600; color:var(--ink); }
nav.links a:hover, nav.links a.active{ color:var(--accent); }
.nav-spacer{ flex:0; }
.hamburger{ display:none; align-items:center; justify-content:center; width:44px; height:44px; background:none; border:none; cursor:pointer; padding:0; color:var(--ink); }
.mnav{ display:none; }
.mnav.open{ display:block; }
.mnav nav{ display:flex; flex-direction:column; gap:2px; padding-bottom:14px; }
.mnav a{ padding:10px 0; font-weight:600; }
.mnav a.btn{ font-weight:700; } /* the menu button keeps the button font weight (Plus Jakarta Sans 700) */

/* hero + generic */
.hero-grid{ display:grid; grid-template-columns:1.05fr .95fr; gap:56px; align-items:center; }
.hero h1{ font-size:clamp(34px,6vw,52px); letter-spacing:-1.2px; margin:16px 0 18px; }

/* The animated POS simulation: four screens crossfade inside the terminal.
   Positioning + opacity are set inline on each screen and driven inline by JS,
   so the simulation holds even if this stylesheet fails to load; this rule only
   marks them non-interactive. */
.hero-scr{ pointer-events:none; }
.hero-dots{ display:flex; gap:8px; justify-content:center; }
.hero-dots i{ width:7px; height:7px; border-radius:50%; background:var(--line-2); transition:background .3s; }
.hero-dots i.on{ background:var(--accent); }
@media (prefers-reduced-motion:reduce){ .hero-scr{ transition:none; } }
.cta-row{ display:flex; flex-wrap:wrap; gap:16px 22px; align-items:center; margin-top:26px; }
/* Home hero spacing, matched to the reference design (Home.dc.html) */
.home-hero{ padding-block:clamp(48px,10vw,88px) 64px; }
.home-hero .hero-grid{ grid-template-columns:repeat(auto-fit,minmax(min(100%,300px),1fr)); gap:clamp(32px,6vw,56px); }
.home-hero .eyebrow.pill{ padding:8px 16px; margin-bottom:24px; border-radius:8px; }
.home-hero h1{ line-height:1.08; letter-spacing:-1.3px; margin:0 0 24px; text-wrap:pretty; }
.home-hero .lead{ max-width:520px; margin:0 0 32px; color:#4F5661; }
.home-hero .cta-row{ gap:16px 24px; margin-top:0; }
.home-hero .btn-ghost{ font-family:var(--display); font-size:16px; font-weight:700; padding:0; }
.section-head{ max-width:720px; }
.section-head.center{ margin-inline:auto; }
.section-head h2{ font-size:clamp(26px,5.2vw,36px); margin:14px 0 12px; }

.grid{ display:grid; gap:24px; }
.cols-3{ grid-template-columns:repeat(auto-fit,minmax(min(100%,260px),1fr)); }
.cols-4{ grid-template-columns:repeat(auto-fit,minmax(min(100%,220px),1fr)); }
.stats{ grid-template-columns:repeat(auto-fit,minmax(min(100%,150px),1fr)); text-align:center; gap:24px; }

.card{ background:var(--card); border:1px solid var(--line); border-radius:18px; padding:28px; }
.card h3{ font-size:20px; margin:14px 0 8px; }
.card p{ margin:0; color:var(--muted2); font-size:15px; }
.itile{ width:44px; height:44px; border-radius:12px; background:var(--accent-tint12); color:var(--accent);
  display:grid; place-items:center; font-family:var(--display); font-weight:800; }
.stepnum{ font-family:var(--display); font-weight:800; font-size:15px; color:var(--accent); }
.stat .num{ font-family:var(--display); font-weight:800; font-size:clamp(34px,5vw,46px); color:var(--accent); line-height:1; }
.stat .lbl{ color:var(--muted); font-size:14.5px; margin-top:8px; }

.band-dark{ background:var(--navy); color:#fff; }
.band-darkest{ background:var(--darkest); color:#fff; }
.band-gray{ background:var(--card); }
.band-dark .lead, .band-darkest .lead{ color:var(--on-dark); }
.band-dark .card, .band-darkest .card{ background:var(--navy-inner); border-color:oklch(1 0 0 / .08); color:#fff; }
.band-dark .card p, .band-darkest .card p{ color:var(--on-dark); }

.step-row{ display:flex; gap:16px; align-items:flex-start; padding:16px 0; border-bottom:1px solid oklch(1 0 0 / .1); }
.step-row:last-child{ border-bottom:none; }
.step-row .n{ flex:none; width:38px; height:38px; border-radius:10px; background:oklch(0.5 0.22 265 / .22);
  color:#fff; display:grid; place-items:center; font-family:var(--display); font-weight:800; }
.badges{ display:flex; flex-wrap:wrap; gap:12px; justify-content:center; }
.badge{ font-weight:700; font-size:12.5px; letter-spacing:1.2px; text-transform:uppercase; color:var(--on-dark);
  border:1px solid oklch(1 0 0 / .18); border-radius:999px; padding:9px 16px; }

/* forms */
.field{ display:flex; flex-direction:column; gap:8px; font-size:13px; font-weight:700; color:oklch(0.3 0.02 260); min-width:0; }
.in, .field input, .field select{ height:48px; box-sizing:border-box; width:100%; border-radius:12px;
  border:1px solid var(--line-2); background:#fff; font-size:15px; font-family:inherit; color:var(--ink);
  outline:none; padding:0 14px; }
.field select{ appearance:none; -webkit-appearance:none; padding-right:40px; cursor:pointer; }
.field input:focus, .field select:focus{ border-color:var(--accent); box-shadow:0 0 0 3px var(--accent-tint); }
.affix-box{ display:flex; align-items:stretch; height:48px; border:1px solid var(--line-2); border-radius:12px; background:#fff; overflow:hidden; }
.affix-box .affix{ display:flex; align-items:center; padding:0 12px; background:oklch(0.97 0.006 255);
  border-right:1px solid var(--line-2); font-size:14px; font-weight:700; color:var(--muted); }
.affix-box input{ flex:1; min-width:0; border:none; background:transparent; padding:0 14px; font-size:15px; font-family:inherit; outline:none; color:var(--ink); height:auto; }
.consent{ display:flex; gap:10px; align-items:flex-start; font-size:13px; line-height:1.5; color:var(--muted2); cursor:pointer; }
.consent input{ margin:1px 0 0; width:17px; height:17px; accent-color:var(--accent); flex:none; }
.form-err{ font-size:13.5px; font-weight:700; color:oklch(0.55 0.2 25); }
.form-ok{ display:none; background:var(--green-bg); color:var(--green-tx); border-radius:12px; padding:16px; font-weight:700; text-align:center; }

/* footer */
footer{ border-top:1px solid var(--line); }
.foot-grid{ display:grid; grid-template-columns:1.4fr repeat(3,minmax(140px,1fr)); gap:40px; padding-block:56px; }
.foot-brand p{ color:var(--muted); font-size:14.5px; max-width:34ch; margin:14px 0 0; }
.foot-col h4{ font-family:var(--sans); font-size:12.5px; font-weight:800; letter-spacing:1.4px; text-transform:uppercase; color:var(--small); margin:0 0 14px; }
.foot-col a{ display:block; color:var(--ink); font-size:14.5px; margin-bottom:10px; font-weight:500; }
.foot-col a:hover{ color:var(--accent); }
.foot-bottom{ border-top:1px solid var(--line); padding-block:20px; color:var(--small); font-size:12.5px; }

@media (max-width:1080px){ nav.links{ display:none; } .nav-cta{ display:none; } .nav-spacer{ flex:1; } .hamburger{ display:inline-flex; } }
@media (max-width:900px){ .hero-grid{ grid-template-columns:1fr; gap:40px; } .foot-grid{ grid-template-columns:1fr 1fr; } }
@media (max-width:600px){ .foot-grid{ grid-template-columns:1fr; } }

.emi-opt:hover, .sc-opt:hover{ background:oklch(0.5 0.22 265 / 0.08); }

[data-modal-card]:focus-visible,[data-modal-close]:focus-visible{ outline:2px solid #2351DE; outline-offset:2px; }
.skip-link{ position:absolute; left:16px; top:-64px; z-index:100; background:#fff; color:#060D1A; font-weight:700; padding:12px 24px; border-radius:12px; border:1px solid #E1E5EA; }
.skip-link:focus{ top:16px; outline:2px solid #2351DE; outline-offset:2px; }


#emi-btn:focus-visible, #sc-btn:focus-visible, .emi-opt:focus-visible, .sc-opt:focus-visible, .emi-field:focus-within{ outline:2px solid #2351DE; outline-offset:2px; }
/* No browser up/down arrows on any number field (Loop Score income and age, EMI rate and term) */
input[type=number]::-webkit-inner-spin-button, input[type=number]::-webkit-outer-spin-button{ -webkit-appearance:none; margin:0; }
input[type=number]{ -moz-appearance:textfield; appearance:textfield; }

/* thin Loop Blue bar along the top while a page is on its way (app.js, barStart) */
#loop-bar{ position:fixed; top:0; left:0; height:2px; width:0; background:#2351DE; z-index:200; pointer-events:none; opacity:0; }
