/* ============================================================================
   NanoLeap standalone brand stylesheet — for the legacy tool/calculator pages
   (the Astro site has its own bundled styles). Token-driven, flat 2D, no gold.
   Styles semantic elements automatically so a page just needs:
     <link rel="stylesheet" href="/brand.css">  (after removing its old fonts/styles)
   Matches REDESIGN_DECISIONS.md D7 (Syne / DM Sans / JetBrains Mono).
   ========================================================================== */
:root {
  --cream: #FDFBF7; --cream-deep: #F5F1E8; --white: #FFFFFF;
  --navy: #1A1A2E; --navy-deep: #0F0F1F; --navy-soft: #2D3548;
  --ink: #1F2937; --ink-2: #4B5563; --ink-3: #6B7280;
  --blue: #1B4F8C; --blue-bright: #4A90E2; --blue-light: #6FA8E5; --blue-bg: #EBF3FB;
  --green: #1E8A5E; --green-bright: #2ECF87; --green-bg: #E8F5EF;
  --red: #C0392B; --red-bg: #FEF0EE;
  --line: #E5E7EB; --line-strong: #D1D5DB;
  --font-display: "Syne", ui-sans-serif, system-ui, sans-serif;
  --font-sans: "DM Sans", ui-sans-serif, system-ui, -apple-system, sans-serif;
  --font-mono: "JetBrains Mono", ui-monospace, "SF Mono", Menlo, monospace;
  --ease: cubic-bezier(0.22, 1, 0.36, 1);
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
body {
  margin: 0; background: var(--cream); color: var(--ink);
  font-family: var(--font-sans); font-size: 1.0625rem; line-height: 1.6;
  -webkit-font-smoothing: antialiased; text-rendering: optimizeLegibility;
}
h1, h2, h3, h4, h5, h6 {
  font-family: var(--font-display); color: var(--navy); font-weight: 700;
  letter-spacing: -0.02em; line-height: 1.1; margin: 0 0 0.5em;
}
h1 { font-size: clamp(2rem, 5vw, 3rem); font-weight: 800; }
h2 { font-size: clamp(1.5rem, 3vw, 2.1rem); }
h3 { font-size: 1.3rem; }
p { margin: 0 0 1rem; }
a { color: var(--blue); text-decoration: none; }
a:hover { color: var(--blue-bright); }
strong, b { color: var(--navy-soft); font-weight: 600; }
hr { border: 0; border-top: 1px solid var(--line); margin: 1.5rem 0; }
img, svg { max-width: 100%; }
::selection { background: var(--green-bright); color: var(--navy-deep); }
:focus-visible { outline: 2px solid var(--blue-bright); outline-offset: 2px; }
@media (prefers-reduced-motion: reduce) { * { transition: none !important; animation: none !important; } }

/* layout */
.nl-container { width: 100%; max-width: 1100px; margin-inline: auto; padding-inline: clamp(1.1rem, 4vw, 2rem); }
.nl-section { padding-block: clamp(2.5rem, 6vw, 4.5rem); }
.nl-eyebrow { font-family: var(--font-mono); font-weight: 600; font-size: 0.72rem; letter-spacing: 0.14em; text-transform: uppercase; color: var(--blue); }
.nl-mint { position: relative; padding-left: 1.4rem; }
.nl-mint::before { content: ""; position: absolute; left: 0; top: 0.15em; bottom: 0.15em; width: 4px; background: var(--green-bright); border-radius: 2px; }

/* nav */
.nl-nav { position: sticky; top: 0; z-index: 60; background: var(--cream); border-bottom: 1px solid var(--line); }
.nl-nav-in { display: flex; align-items: center; gap: 1.2rem; height: 64px; }
.nl-brand { display: inline-flex; align-items: center; gap: 0.55rem; }
.nl-mark { width: 28px; height: 28px; background: var(--navy); border-radius: 5px; padding: 3px; display: grid; grid-template-columns: 1fr 1fr; grid-template-rows: 1fr 1fr; gap: 1.5px; flex: none; }
.nl-mark span { border-radius: 1px; display: block; }
.nl-mark span:nth-child(1) { background: #1B4F8C; } .nl-mark span:nth-child(2) { background: #4A90E2; }
.nl-mark span:nth-child(3) { background: #6FA8E5; } .nl-mark span:nth-child(4) { background: #2D4F8A; }
.nl-word { font-family: var(--font-display); font-weight: 800; font-size: 1.28rem; letter-spacing: -0.03em; color: var(--navy-deep); }
.nl-nav-links { display: flex; align-items: center; gap: 0.3rem; margin-left: auto; }
.nl-nav-links a { font-weight: 500; font-size: 0.92rem; color: var(--navy-soft); padding: 0.5rem 0.7rem; border-radius: 6px; }
.nl-nav-links a:hover { color: var(--navy-deep); background: var(--cream-deep); }
@media (max-width: 760px) { .nl-nav-links a:not(.nl-btn) { display: none; } }

/* buttons */
.nl-btn { display: inline-flex; align-items: center; justify-content: center; gap: 0.5rem; font-family: var(--font-sans); font-weight: 600; font-size: 0.95rem; line-height: 1; padding: 0.85rem 1.4rem; border: 1.5px solid transparent; border-radius: 6px; cursor: pointer; transition: transform 0.14s var(--ease), background 0.16s, border-color 0.16s, color 0.16s; text-decoration: none; }
.nl-btn:active { transform: translateY(1px); }
.nl-btn-primary { background: var(--navy); color: #fff; border-color: var(--navy); }
.nl-btn-primary:hover { background: var(--navy-deep); color: #fff; }
.nl-btn-wa { background: var(--green); color: #fff; border-color: var(--green); }
.nl-btn-wa:hover { background: var(--green-bright); color: var(--navy-deep); }
.nl-btn-ghost { background: transparent; color: var(--navy); border-color: var(--line-strong); }
.nl-btn-ghost:hover { border-color: var(--navy); background: #fff; color: var(--navy); }
.nl-btn-sm { padding: 0.55rem 0.95rem; font-size: 0.85rem; }

/* surfaces */
.nl-card { background: #fff; border: 1px solid var(--line); border-radius: 10px; padding: 1.5rem; }
.nl-tag { display: inline-flex; align-items: center; gap: 0.4rem; font-family: var(--font-mono); font-size: 0.72rem; font-weight: 500; color: var(--navy-soft); background: var(--cream-deep); border: 1px solid var(--line); border-radius: 5px; padding: 0.35rem 0.6rem; }

/* forms */
label { font-weight: 600; font-size: 0.9rem; color: var(--navy-soft); display: block; margin-bottom: 0.35rem; }
input[type=text], input[type=number], input[type=email], input[type=tel], input[type=search], input[type=date], select, textarea {
  width: 100%; font-family: var(--font-sans); font-size: 0.98rem; color: var(--ink);
  background: #fff; border: 1.5px solid var(--line-strong); border-radius: 7px; padding: 0.7rem 0.85rem;
}
input:focus, select:focus, textarea:focus { outline: none; border-color: var(--blue-bright); }

/* tables — financial-document style */
table { width: 100%; border-collapse: collapse; font-size: 0.95rem; }
th, td { text-align: left; padding: 0.7rem 0.85rem; border-bottom: 1px solid var(--line); }
thead th { font-family: var(--font-mono); font-size: 0.72rem; letter-spacing: 0.06em; text-transform: uppercase; color: var(--ink-3); background: var(--cream-deep); }
tbody tr:hover { background: var(--cream-deep); }
td.num, th.num, .nl-num { font-family: var(--font-mono); text-align: right; }

/* callouts */
.nl-callout { border: 1px solid var(--line); border-left-width: 3px; border-radius: 8px; padding: 1rem 1.15rem; background: #fff; margin: 1rem 0; }
.nl-callout .nl-label { font-family: var(--font-mono); font-size: 0.7rem; font-weight: 600; letter-spacing: 0.12em; text-transform: uppercase; display: block; margin-bottom: 0.3rem; }
.nl-callout-info { border-left-color: var(--blue-bright); background: var(--blue-bg); } .nl-callout-info .nl-label { color: var(--blue); }
.nl-callout-warn { border-left-color: var(--red); background: var(--red-bg); } .nl-callout-warn .nl-label { color: var(--red); }
.nl-callout-tip  { border-left-color: var(--green-bright); background: var(--green-bg); } .nl-callout-tip .nl-label { color: var(--green); }

/* footer */
.nl-footer { background: var(--navy-deep); color: #c9cedb; padding: 2.6rem 0 1.6rem; margin-top: 3rem; }
.nl-footer a { color: #c9cedb; } .nl-footer a:hover { color: #fff; }
.nl-footer .nl-word { color: var(--cream); }
.nl-foot-promise { font-family: var(--font-display); font-weight: 600; font-size: 1.15rem; color: #fff; margin: 0.9rem 0; }
.nl-foot-contact { font-family: var(--font-mono); font-size: 0.82rem; display: flex; flex-wrap: wrap; gap: 0.5rem; align-items: center; color: #e6e9f0; }
.nl-foot-contact a { color: #e6e9f0; } .nl-foot-contact a:hover { color: var(--green-bright); }
.nl-foot-rule { border: 0; border-top: 1px solid rgba(255,255,255,0.1); margin: 1.6rem 0 1.2rem; }
.nl-foot-legal { font-size: 0.8rem; color: #8b93a7; }
