/* Note Systems, homepage components */

.wrap {
  width: 100%;
  max-width: var(--max);
  margin: 0 auto;
  padding-left: var(--gutter);
  padding-right: var(--gutter);
}

.skip-link {
  position: absolute;
  top: -100px;
  left: 16px;
  z-index: 100;
  padding: 10px 14px;
  background: var(--surface-2);
  border: 1px solid var(--line-strong);
  border-radius: var(--r-md);
  color: var(--text-1);
  font-weight: 500;
}

.skip-link:focus {
  top: 12px;
}

/* ---------- Header ---------- */
.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  border-bottom: 1px solid transparent;
  transition: border-color 500ms var(--ease);
}

/* The blur sits on a backdrop layer of its own: an element that carries backdrop-filter clips anything that
   overflows it in WebKit, which would hide a menu dropping below the header. */
.site-header::before {
  content: '';
  position: absolute;
  inset: 0;
  z-index: -1;
  background: rgba(10, 11, 13, 0.82);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
}

.site-header.is-scrolled {
  border-bottom-color: var(--line);
}

.header-inner {
  display: flex;
  align-items: center;
  gap: 32px;
  height: 64px;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  color: var(--text-1);
}

.brand-mark {
  flex: none;
}

.brand-word {
  font-family: var(--font-display);
  font-size: 18px;
  letter-spacing: -0.02em;
  line-height: 1;
  white-space: nowrap;
}

.brand-word b {
  font-weight: 700;
}

.brand-word span {
  font-weight: 500;
  color: var(--text-2);
}

.site-nav {
  display: flex;
  gap: 28px;
  margin-left: auto;
}

.site-nav a {
  font-size: 14px;
  font-weight: 500;
  color: var(--text-2);
  transition: color 400ms var(--ease);
}

.site-nav a:hover {
  color: var(--text-1);
}

.header-cta {
  flex: none;
}

/* ---------- Use Note menu (header) ---------- */
:root {
  --morpho-blue: #2973FF;
  --morpho-blue-2: #5792FF;
  --morpho-blue-3: #C4DAFF;
  --morpho-glow: rgba(41, 115, 255, 0.55);
  --morpho-glow-soft: rgba(41, 115, 255, 0.14);
  --lz-glow: rgba(242, 243, 245, 0.55);
  --lz-glow-soft: rgba(242, 243, 245, 0.12);
  --rh-green: #00C805;
  --rh-green-3: #CFFFD2;
  --rh-glow: rgba(0, 200, 5, 0.55);
  --rh-glow-soft: rgba(0, 200, 5, 0.12);
}
.usenote { position: relative; }
.usenote__btn { display: inline-flex; align-items: center; gap: 8px; white-space: nowrap; }
.usenote__chev { flex: none; transition: transform 300ms var(--ease); }
.usenote__btn[aria-expanded="true"] .usenote__chev { transform: rotate(180deg); }
.usenote__panel {
  position: absolute; top: calc(100% + 8px); right: 0; z-index: 60;
  width: 200px; max-width: calc(100vw - 32px);
  padding: 6px; background: var(--surface-2); border: 1px solid var(--line-strong); border-radius: var(--r-lg);
  box-shadow: var(--shadow-1);
  animation: usenote-in 220ms var(--ease) both;
}
.usenote__panel[hidden] { display: none !important; }
@keyframes usenote-in { from { opacity: 0; transform: translateY(-4px); } to { opacity: 1; transform: none; } }
@media (prefers-reduced-motion: reduce) { .usenote__panel { animation: none; } }
.usenote__item {
  position: relative; display: flex; align-items: center; min-height: 40px; padding: 0 12px 0 18px;
  border-radius: var(--r-md); color: var(--text-1); text-decoration: none;
  transition: background-color 300ms var(--ease), text-shadow 300ms var(--ease);
}
.usenote__item::before { content: ''; position: absolute; left: 7px; top: 11px; bottom: 11px; width: 2px; border-radius: 2px; background: var(--line-strong); transition: box-shadow 300ms var(--ease), background-color 300ms var(--ease); }
.usenote__item:hover, .usenote__item:focus-visible { background: var(--surface-3, #1C2026); outline: none; }
.usenote__item:focus-visible { box-shadow: 0 0 0 2px var(--brass) inset; }
.usenote__title { font-family: var(--font-display); font-size: 15px; font-weight: 600; letter-spacing: -0.01em; }
.usenote__item--notes::before { background: var(--brass); }
.usenote__item--credit::before { background: var(--morpho-blue-2); box-shadow: 0 0 10px 1px var(--morpho-glow); }
.usenote__item--credit:hover { background: var(--morpho-glow-soft); }
.usenote__item--credit:hover .usenote__title, .usenote__item--credit:focus-visible .usenote__title { color: var(--morpho-blue-3); text-shadow: 0 0 14px var(--morpho-glow); }
.usenote__item--omnichain::before { background: #FFFFFF; box-shadow: 0 0 10px 1px var(--lz-glow); }
.usenote__item--omnichain:hover { background: var(--lz-glow-soft); }
.usenote__item--omnichain:hover .usenote__title, .usenote__item--omnichain:focus-visible .usenote__title { color: #FFFFFF; text-shadow: 0 0 14px var(--lz-glow); }
.usenote__item--build::before { background: var(--rh-green); box-shadow: 0 0 10px 1px var(--rh-glow); }
.usenote__item--build:hover { background: var(--rh-glow-soft); }
.usenote__item--build:hover .usenote__title, .usenote__item--build:focus-visible .usenote__title { color: var(--rh-green-3); text-shadow: 0 0 14px var(--rh-glow); }

@media (max-width: 720px) {
  .usenote__item { min-height: 44px; }
}

@media (max-width: 720px) {
  .site-nav {
    display: none;
  }

  .header-cta {
    margin-left: auto;
  }
}

/* ---------- Hero ---------- */
.hero {
  position: relative;
  isolation: isolate;
  min-height: clamp(600px, 88svh, 900px);
  display: flex;
  align-items: center;
  overflow: hidden;
  margin-top: -64px;
  padding-top: 64px;
}

.hero-scene {
  position: absolute;
  inset: 0;
  z-index: -1;
  background: var(--bg);
}

.hero-canvas,
.hero-fallback {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
}

.hero-canvas {
  opacity: 0;
  transition: opacity 1200ms var(--ease);
}

.hero-scene.is-ready .hero-canvas {
  opacity: 1;
}

.hero-scene.is-ready .hero-fallback {
  opacity: 0;
  transition: opacity 1200ms var(--ease);
}

.hero-scene.is-fallback .hero-canvas {
  display: none;
}

/* Fade the scene into the page at the bottom edge */
.hero-scene::after {
  content: "";
  position: absolute;
  inset: auto 0 0 0;
  height: 32%;
  background: linear-gradient(to bottom, rgba(10, 11, 13, 0), var(--bg));
  pointer-events: none;
}

.hero-inner {
  position: relative;
  padding-top: clamp(48px, 8vh, 96px);
  padding-bottom: clamp(64px, 10vh, 120px);
}

.hero-eyebrow {
  margin-bottom: 24px;
}

.hero .t-hero {
  max-width: 14ch;
}

.hero-sub {
  max-width: 52ch;
  margin-top: 28px;
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 40px;
}

@media (max-width: 720px) {
  .hero {
    align-items: flex-end;
    min-height: clamp(560px, 88svh, 760px);
  }

  .hero-eyebrow {
    margin-bottom: 20px;
  }

  .hero-sub {
    margin-top: 20px;
  }

  .hero-actions {
    margin-top: 32px;
  }

  .hero-actions .btn {
    flex: 1 1 auto;
  }
}

/* ---------- Sections ---------- */
.section {
  padding-top: var(--section);
  padding-bottom: var(--section);
}

.section + .section {
  border-top: 1px solid var(--line);
}

.section-tight {
  padding-top: 0;
  padding-bottom: calc(var(--section) * 0.85);
  border-top: 0 !important;
}

.section-head {
  max-width: 720px;
  margin-bottom: clamp(40px, 5vw, 64px);
}

.section-head .t-h2,
.desk-copy .t-h2,
.security .t-h2 {
  margin-top: 16px;
}

.section-intro {
  margin-top: 20px;
  max-width: 56ch;
}

.footnote {
  color: var(--text-2);
  max-width: 64ch;
}

.svg-label {
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.04em;
}

/* ---------- Panes (How a note works) ---------- */
.panes {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 16px;
}

.pane {
  display: flex;
  flex-direction: column;
  overflow: hidden;
}

.payoff {
  border-bottom: 1px solid var(--line);
  padding: 20px 20px 12px;
  background: var(--surface-1);
}

.payoff svg {
  width: 100%;
  height: auto;
  aspect-ratio: 320 / 180;
}

.pane-body {
  padding: 24px 24px 28px;
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.pane-num {
  font-size: clamp(36px, 3.4vw, 48px);
  line-height: 1;
  color: var(--text-1);
  display: flex;
  align-items: baseline;
  gap: 10px;
  flex-wrap: wrap;
}

.pane-num .mono {
  font-weight: 500;
}

.pane-unit {
  font-family: var(--font-body);
  font-size: 14px;
  font-weight: 500;
  letter-spacing: 0;
  color: var(--text-2);
}

.panes + .footnote {
  margin-top: 24px;
}

@media (max-width: 960px) {
  .panes {
    grid-template-columns: 1fr;
    max-width: 560px;
  }
}

/* ---------- Legs ---------- */
.legs {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 16px;
}

.leg {
  padding: 32px;
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.leg-head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 16px;
}

.leg-name {
  letter-spacing: 0.04em;
  font-size: 24px;
}

.leg-for {
  color: var(--text-1);
  margin-top: -6px;
}

.leg-copy {
  max-width: 44ch;
}

.leg-facts {
  margin: 12px 0 0;
  border-top: 1px solid var(--line);
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.leg-facts div {
  padding: 16px 12px 0 0;
  min-width: 0;
}

.leg-facts dt {
  font-family: var(--font-body);
  font-size: 12px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--text-2);
  font-weight: 500;
}

.leg-facts dd {
  margin: 8px 0 0;
  font-size: 14px;
  color: var(--text-1);
}

@media (max-width: 800px) {
  .legs {
    grid-template-columns: 1fr;
  }

  .leg {
    padding: 28px 24px;
  }

  .leg-facts dd {
    font-size: 13px;
  }
}

/* ---------- Desk ---------- */
.desk {
  display: grid;
  grid-template-columns: minmax(0, 5fr) minmax(0, 6fr);
  gap: clamp(40px, 6vw, 96px);
  align-items: start;
}

.desk-copy .link {
  display: inline-block;
  margin-top: 28px;
}

.stats {
  margin: 0;
  display: grid;
  grid-template-columns: 1fr;
  border-top: 1px solid var(--line);
}

.stat {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: baseline;
  gap: 24px;
  padding: 28px 0;
  border-bottom: 1px solid var(--line);
}

.stat-value {
  margin: 0;
  font-size: clamp(32px, 3.2vw, 44px);
  font-weight: 500;
  line-height: 1;
  color: var(--text-1);
  display: flex;
  align-items: baseline;
  gap: 10px;
  justify-content: flex-end;
}

.stat-unit {
  font-size: 14px;
  color: var(--text-2);
}

.desk-foot {
  grid-column: 2;
  margin-top: -8px;
}

@media (max-width: 880px) {
  .desk {
    grid-template-columns: 1fr;
  }

  .desk-foot {
    grid-column: 1;
    margin-top: 0;
  }
}

/* ---------- NOTE cards ---------- */
.cards-4 {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 16px;
}

.mini {
  padding: 28px 24px 32px;
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.mini .t-h3 {
  font-size: 20px;
  margin-top: 8px;
}

@media (max-width: 1080px) {
  .cards-4 {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 600px) {
  .cards-4 {
    grid-template-columns: 1fr;
  }
}

/* ---------- Security ---------- */
.security {
  display: grid;
  grid-template-columns: minmax(0, 5fr) minmax(0, 6fr);
  gap: clamp(40px, 6vw, 96px);
  align-items: start;
}

.security .link {
  display: inline-block;
  margin-top: 28px;
}

.sec-list {
  border-top: 1px solid var(--line);
}

.sec-list li {
  display: grid;
  grid-template-columns: 32px 176px minmax(0, 1fr);
  gap: 16px;
  align-items: baseline;
  padding: 18px 0;
  border-bottom: 1px solid var(--line);
}

.sec-idx {
  font-size: 12px;
  color: var(--text-2);
}

.sec-name {
  font-weight: 600;
  color: var(--text-1);
}

@media (max-width: 880px) {
  .security {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 600px) {
  .sec-list li {
    grid-template-columns: 32px minmax(0, 1fr);
  }

  .sec-list li .t-body {
    grid-column: 2;
  }
}

/* ---------- Security programme ---------- */
.section-tight#programme {
  padding-top: calc(var(--section) * 0.55);
}

.programme-head {
  margin-bottom: clamp(32px, 4vw, 48px);
}

.cards-3 {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 16px;
}

.card-link {
  color: inherit;
  height: 100%;
}

.card-link .t-h3 .mono {
  font-variant-numeric: tabular-nums;
}

.card-cta {
  margin-top: auto;
  padding-top: 10px;
  align-self: flex-start;
  font-size: 14px;
  font-weight: 500;
  color: var(--text-1);
  border-bottom: 1px solid var(--line-strong);
  transition: border-color 400ms var(--ease);
}

.card-link:hover .card-cta {
  border-color: var(--text-1);
}

@media (max-width: 880px) {
  .cards-3 {
    grid-template-columns: 1fr;
  }
}

/* ---------- Footer ---------- */
.site-footer {
  border-top: 1px solid var(--line);
  padding: 56px 0 40px;
}

.footer-inner {
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 24px 48px;
  align-items: center;
}

.footer-brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  color: var(--text-1);
}

.footer-brand .brand-word {
  font-size: 16px;
}

.footer-links {
  display: flex;
  flex-wrap: wrap;
  gap: 24px;
  justify-self: end;
  font-size: 14px;
  font-weight: 500;
}

.footer-links a {
  color: var(--text-2);
  transition: color 400ms var(--ease);
}

.footer-links a:hover {
  color: var(--text-1);
}

.footer-soon {
  color: var(--text-2);
  opacity: 0.8;
  display: inline-flex;
  gap: 6px;
  align-items: baseline;
}

.footer-soon .t-label {
  color: var(--text-2);
}

.footer-rule {
  grid-column: 1 / -1;
  width: 100%;
  height: 1px;
  margin: 16px 0 0;
  border: 0;
  background: var(--line);
}

.footer-inner .powered { grid-column: 1 / -1; padding: 14px 0 4px; }

/* "Powered by" strip. Ivory marks at reduced opacity per BRAND.md; hover lifts to full. Tokens from the host site. */
.powered { display: flex; align-items: center; flex-wrap: wrap; gap: 14px 22px; color: var(--text-2, #9AA0A8); }
.powered__label { font-size: 11px; letter-spacing: 0.08em; text-transform: uppercase; color: var(--text-3, #7A828C); }
.powered__item { display: inline-flex; align-items: center; height: 15px; color: var(--text-1, #F2F3F5); opacity: 0.55; transition: opacity 400ms cubic-bezier(0.22, 1, 0.36, 1); }
.powered__item:hover, .powered__item:focus-visible { opacity: 1; }
.powered__item:focus-visible { outline: 2px solid var(--brass, #C9A96E); outline-offset: 6px; border-radius: 2px; }
.powered__logo { height: 100%; width: auto; display: block; }
@media (max-width: 480px) { .powered { gap: 10px 16px; } .powered__item { height: 13px; } }
.powered .sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0,0,0,0); white-space: nowrap; border: 0; }

.footer-risk {
  grid-column: 1 / -1;
  max-width: 78ch;
}

.footer-copy {
  grid-column: 1 / -1;
  color: var(--text-2);
}

@media (max-width: 720px) {
  .footer-inner {
    grid-template-columns: 1fr;
    align-items: start;
  }

  .footer-links {
    justify-self: start;
  }
}

.hide-sm {
  display: inline;
}

@media (max-width: 720px) {
  .hide-sm {
    display: none;
  }
}
