/* ==========================================================================
   lr-components.css — shared components for new-style markup.

   Loaded after lr-core.css by the homepage and the case studies (anything that uses
   .nav / .btn / .tag / footer / .reveal). NOT loaded on legacy pages, whose Webflow
   class names (.btn, .hero, .role, …) would collide; those use lr-legacy.css.

   Page-specific components (work cards, accordions, case-study sections, …) stay in
   the page's own <style>. If a second page needs one, promote it here.
   ========================================================================== */

/* ==========================================================================
   Sections
   ========================================================================== */
section { padding: 128px 0; scroll-margin-top: 64px; }
section + section { padding-top: 0; }
.section-head { max-width: var(--read); margin-bottom: 32px; }
.section-head h2 { font-size: 44px; line-height: 48px; margin-bottom: 16px; }
.section-head p { font-size: 17px; line-height: 32px; color: var(--text-3); }
.section-head p + p { margin-top: 16px; }

/* ==========================================================================
   Nav — in-page links centred on desktop, a dropdown on mobile
   ========================================================================== */
.nav {
  position: fixed; top: 0; left: 0; right: 0; z-index: 50; height: 64px;
  display: flex; align-items: center;
  background: rgba(8, 9, 10, 0.55);
  -webkit-backdrop-filter: blur(16px) saturate(170%); backdrop-filter: blur(16px) saturate(170%);
  box-shadow: 0 1px 0 rgba(255, 255, 255, 0.06);
}
.nav .wrap { position: relative; display: flex; align-items: center; height: 32px; }
.logo { display: flex; align-items: center; gap: 16px; height: 32px; color: var(--text); font-family: var(--font-display); font-weight: 600; font-size: 15px; letter-spacing: -0.01em; }
.logo-mark { flex: none; width: 16px; height: 16px; background: url("../images/monogram.svg") center / contain no-repeat; }
.nav-links { position: absolute; left: 50%; top: 0; transform: translateX(-50%); display: flex; }
.nav-toggle { display: none; }
.nav-links a {
  display: inline-flex; align-items: center; justify-content: center; height: 32px; padding: 0 12px;
  font-size: 14px; color: var(--text-3); border-radius: 6px; transition: color .15s, background .15s;
}
.nav-links a:hover, .nav-links a.on { color: var(--text); background: var(--surface-2); }
.nav-right { margin-left: auto; display: flex; gap: 8px; }
/* Email + LinkedIn icon links (nav, all pages) */
.icon-link { position: relative; display: grid; place-items: center; width: 32px; height: 32px; border-radius: 6px; color: var(--text-3); background: transparent; transition: color .15s, background .15s; }
.icon-link:hover { color: var(--text); background: var(--surface-2); }

/* ==========================================================================
   UI elements
   ========================================================================== */
.btn, .tag, .pill, .kbd, .switch, .icon { flex-shrink: 0; }
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  height: 32px; padding: 0 12px; border-radius: 6px; border: 0;
  font: 500 14px/16px var(--font-body); letter-spacing: -0.005em;
  cursor: pointer; transition: background .15s, box-shadow .15s, color .15s; white-space: nowrap;
}
.btn-lg { height: 48px; padding: 0 20px; font-size: 15px; border-radius: 8px; }
.btn-primary { background: #f7f8f8; color: #08090a; }
.btn-primary:hover { background: #fff; box-shadow: 0 0 0 4px rgba(255,255,255,0.08); }
.btn-secondary { background: var(--surface-2); color: var(--text); --bc: var(--border-strong); }
.btn-secondary:hover { background: var(--surface-3); --bc: rgba(255,255,255,.24); }
.btn-ghost { background: transparent; color: var(--text-3); }
.btn-ghost:hover { color: var(--text); background: var(--surface-2); }
.btn .arrow { transition: transform .15s; }
.btn:hover .arrow { transform: translateX(2px); }
.tag {
  display: inline-flex; align-items: center; justify-content: center; height: 16px; padding: 0 6px; border-radius: 4px;
  font: 10.5px/16px var(--font-mono); color: var(--text-3); background: var(--surface-2); white-space: nowrap;
}
.tag.in, .tag.done { color: var(--accent-2); background: var(--accent-soft); --bc: rgba(124,132,240,.45); }
.tag.done { color: var(--green); background: var(--green-soft); --bc: rgba(125,255,176,.3); }
.tag.out, .tag.unk { color: var(--amber); background: var(--amber-soft); --bc: rgba(255,207,112,.3); }
.tag.later { color: var(--text-3); }
.pulse-dot { width: 6px; height: 6px; border-radius: 50%; background: var(--accent-2); box-shadow: 0 0 8px var(--accent-2); animation: pulse 2s infinite; }
@keyframes pulse { 50% { opacity: .35; } }
.icon { width: 32px; height: 32px; border-radius: 8px; display: grid; place-items: center; background: var(--surface-2); color: var(--accent-2); --bc: var(--border-strong); }
.link-u { color: var(--text); background: linear-gradient(currentColor, currentColor) 0 100% / 0 1px no-repeat; transition: background-size .25s; }
.link-u:hover { background-size: 100% 1px; }
.ilabel { display: block; font: 12px/16px var(--font-mono); letter-spacing: .04em; text-transform: uppercase; color: var(--accent-2); margin-bottom: 16px; }
.big-stat .u { color: var(--accent-2); }

/* ==========================================================================
   Hero (base; each page sets its own h1 scale)
   ========================================================================== */
.hero { padding: 192px 0 128px; }

/* ==========================================================================
   Footer (base; each page supplies its own columns / wordmark)
   ========================================================================== */
footer { padding-top: 64px; position: relative; }
footer::before { content: ""; position: absolute; left: 0; right: 0; top: 0; height: 1px; background: var(--border); }

/* ==========================================================================
   Tweaks panel (design-exploration tool; hidden in production, see end of file)
   ========================================================================== */
.tweaks-toggle { position: fixed; right: 16px; bottom: 16px; z-index: 60; background: rgba(14,15,17,.75) !important; -webkit-backdrop-filter: blur(12px); backdrop-filter: blur(12px); }
.tweaks {
  position: fixed; right: 16px; bottom: 64px; z-index: 60; width: 304px;
  max-height: calc(100vh - 128px); overflow: auto;
  background: rgba(14, 15, 17, 0.75);
  -webkit-backdrop-filter: blur(20px) saturate(170%); backdrop-filter: blur(20px) saturate(170%);
  border: 1px solid var(--border-strong); border-radius: 12px; box-shadow: 0 20px 60px rgba(0,0,0,.6);
  transform-origin: 100% 100%; transition: opacity .2s, transform .2s; line-height: 1.4;
}
.tweaks.hidden { opacity: 0; transform: scale(.96) translateY(6px); pointer-events: none; }
.tw-sec { padding: 12px 16px; border-bottom: 1px solid var(--border); }
.tw-sec:last-child { border-bottom: 0; }
.tw-title { font: 10.5px var(--font-mono); text-transform: uppercase; letter-spacing: .08em; color: var(--text-4); margin-bottom: 10px; }
.tw-row { display: grid; grid-template-columns: 1fr auto; align-items: center; gap: 4px 10px; margin-bottom: 10px; font-size: 12.5px; color: var(--text-3); }
.tw-row:last-child { margin-bottom: 0; }
.tw-row output { font: 11px var(--font-mono); color: var(--text-2); }
.tw-row input[type=range] { grid-column: span 2; width: 100%; accent-color: #c7ccff; height: 14px; }
.tw-row select { grid-column: span 2; width: 100%; height: 32px; border-radius: 7px; padding: 0 8px; background: rgba(0,0,0,.35); color: var(--text); border: 1px solid var(--border-strong); font: 13px var(--font-body); }
.tw-check { display: flex; align-items: center; justify-content: space-between; font-size: 12.5px; color: var(--text-3); margin-bottom: 10px; cursor: pointer; }
.tw-check:last-child { margin-bottom: 0; }
.tw-hint { font-size: 11.5px; color: var(--text-4); line-height: 1.5; margin: 6px 0 0; }

/* Reveal (one-cell translate, settles on-grid) */
.reveal { opacity: 0; transform: translateY(16px); transition: opacity .8s cubic-bezier(.2,.7,.2,1), transform .8s cubic-bezier(.2,.7,.2,1); }
.reveal.in { opacity: 1; transform: none; }

/* ==========================================================================
   Responsive — nav collapses to a dropdown under 768px
   ========================================================================== */
@media (max-width: 767px) {
  .nav-right { margin-left: 8px; gap: 0; }
  .nav-toggle {
    display: inline-flex; align-items: center; gap: 8px; margin-left: auto; height: 32px; padding: 0 12px; border: 0; border-radius: 6px;
    background: var(--surface-2); color: var(--text); font: 500 14px/16px var(--font-body); cursor: pointer;
  }
  .nav-toggle svg { color: var(--text-3); transition: transform .2s; }
  .nav.open .nav-toggle svg { transform: rotate(180deg); }
  .nav-links {
    left: auto; right: 0; top: 48px; transform: translateY(-8px); flex-direction: column; min-width: 208px; padding: 8px;
    background: rgba(14, 15, 17, 0.92); -webkit-backdrop-filter: blur(20px) saturate(170%); backdrop-filter: blur(20px) saturate(170%);
    border: 1px solid var(--border-strong); border-radius: 12px; box-shadow: 0 20px 60px rgba(0,0,0,.6);
    opacity: 0; visibility: hidden; transition: opacity .15s, transform .15s, visibility 0s .15s;
  }
  .nav.open .nav-links { opacity: 1; visibility: visible; transform: none; transition: opacity .15s, transform .15s; }
  .nav-links a { width: 100% !important; justify-content: flex-start; height: 48px; padding: 0 16px; font-size: 15px; }
  .hero { padding-top: 128px; }
}
@media (prefers-reduced-motion: reduce) {
  .reveal { opacity: 1; transform: none; }
}
.tweaks-toggle, .tweaks { display: none !important; }
