/* Mehen lander, lapis and gold. Palette and fonts: packages/brand/tokens/lapis.css */

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  background: var(--midnight);
  color: var(--bone);
  font-family: var(--sans);
  font-size: 16px;
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}
img, svg { display: block; max-width: 100%; }
a { color: inherit; text-decoration: none; }
h1, h2, h3, h4 { margin: 0; font-weight: 500; }
p, ul, ol, figure, pre { margin: 0; }
ul, ol { padding: 0; list-style: none; }
code { font-family: var(--mono); font-size: 0.92em; }
button { font: inherit; color: inherit; background: none; border: 0; cursor: pointer; }
.sprite { position: absolute; width: 0; height: 0; overflow: hidden; }
.wrap { width: min(var(--wrap), calc(100% - 48px)); margin: 0 auto; }
.muted { color: var(--mute); }

/* Background layers */
#stars { position: fixed; inset: 0; z-index: 0; width: 100%; height: 100%; pointer-events: none; }
#gold { position: absolute; top: 0; left: 0; z-index: 1; pointer-events: none; overflow: visible; }
#gold path { fill: none; stroke-linecap: round; stroke-linejoin: round; }
#gold-hero { stroke: var(--gold); stroke-width: 1.4; }
#gold-margin { stroke: var(--gold); stroke-width: 1.1; opacity: 0.8; }
#gold-head path { fill: var(--gold); stroke: none; }
#gold-head circle { fill: var(--midnight); }
#gold-head, #gold-sun { opacity: 0; transition: opacity 0.5s ease; }
#gold-head.on, #gold-sun.on { opacity: 1; }
#gold-sun { fill: var(--apricot); transform-box: fill-box; transform-origin: center; }
.nav, main, .footer { position: relative; z-index: 2; }

.bloom { position: absolute; border-radius: 50%; filter: blur(80px); pointer-events: none; z-index: 0; will-change: transform; }
.bloom-faience { width: 520px; height: 520px; right: -120px; top: 40px; background: rgba(108, 207, 198, 0.16); animation: drift 36s ease-in-out infinite alternate; }
.bloom-apricot { width: 420px; height: 420px; left: -140px; bottom: -80px; background: rgba(242, 166, 90, 0.14); animation: drift 44s ease-in-out infinite alternate-reverse; }
.bloom-lapis { width: 640px; height: 640px; left: 50%; top: 10%; margin-left: -320px; background: rgba(42, 75, 143, 0.3); animation: drift 50s ease-in-out infinite alternate; }
.bloom-faience-2 { width: 480px; height: 480px; right: -160px; bottom: 0; background: rgba(108, 207, 198, 0.1); animation: drift 40s ease-in-out infinite alternate-reverse; }
@keyframes drift { from { transform: translate3d(0, 0, 0) scale(1); } to { transform: translate3d(40px, 30px, 0) scale(1.08); } }

/* The underworld plate as atmosphere */
.plate {
  position: absolute; inset: -8% -4%; z-index: 0; pointer-events: none;
  background: url(art/underworld.webp) center 55% / cover no-repeat;
  opacity: 0.3;
  filter: blur(2px) saturate(0.85);
  -webkit-mask-image: radial-gradient(ellipse 58% 62% at 50% 48%, #000 0%, rgba(0, 0, 0, 0.6) 40%, transparent 72%);
  mask-image: radial-gradient(ellipse 58% 62% at 50% 48%, #000 0%, rgba(0, 0, 0, 0.6) 40%, transparent 72%);
  animation: plate-drift 48s ease-in-out infinite alternate;
  will-change: transform;
}
.plate::after {
  content: ""; position: absolute; inset: 0;
  background: var(--lapis); mix-blend-mode: color; opacity: 0.55;
}
.plate-faint { opacity: 0.12; }
@keyframes plate-drift { from { transform: scale(1) translate3d(0, 0, 0); } to { transform: scale(1.06) translate3d(-1.5%, 1%, 0); } }

/* Type */
.eyebrow { font-family: var(--mono); font-size: 12px; letter-spacing: 0.14em; text-transform: uppercase; color: var(--gold); }
h1 {
  font-family: var(--serif);
  font-variation-settings: "opsz" 144, "SOFT" 100, "WONK" 1;
  font-size: clamp(44px, 5.6vw, 76px);
  line-height: 1.0;
  letter-spacing: -0.025em;
  margin: 40px 0 36px;
}
.section h2, .cta h2 {
  font-family: var(--serif);
  font-variation-settings: "opsz" 96, "SOFT" 80, "WONK" 1;
  font-size: clamp(32px, 3.8vw, 50px);
  line-height: 1.04;
  letter-spacing: -0.015em;
}
.sub { font-family: var(--serif); font-variation-settings: "opsz" 24, "SOFT" 60; font-size: clamp(19px, 2vw, 24px); line-height: 1.3; color: var(--bone); max-width: 30ch; }
.lede { font-size: 17px; color: var(--grey); max-width: 560px; }
.hero-copy .lede { margin-top: 14px; }
.section-head { display: grid; gap: 14px; margin-bottom: 44px; max-width: 720px; }

/* Buttons */
.btn { display: inline-flex; align-items: center; gap: 8px; height: 40px; padding: 0 18px; border-radius: 10px; font-size: 14px; font-weight: 500; white-space: nowrap; transition: transform 0.2s ease, background 0.2s ease, border-color 0.2s ease; }
.btn:hover { transform: translateY(-1px); }
.btn-lg { height: 46px; padding: 0 22px; font-size: 15px; }
.btn-sm { height: 32px; padding: 0 12px; font-size: 12.5px; border-radius: 8px; }
.btn-gold { background: var(--gold); color: var(--midnight); }
.btn-gold:hover { background: #e4b556; }
.btn-ghost { border: 1px solid rgba(251, 247, 238, 0.18); color: var(--bone); }
.btn-ghost:hover { border-color: rgba(251, 247, 238, 0.4); }
.btn-ink { background: var(--ink); color: var(--bone); }
.btn-ghost-ink { border: 1px solid rgba(28, 25, 21, 0.18); color: var(--ink); }

/* Nav */
.nav { padding: 20px 0; }
.nav-in { display: flex; align-items: center; gap: 32px; }
.lockup { display: inline-flex; align-items: center; gap: 9px; color: var(--gold); --sun: var(--apricot); --bg: var(--midnight); }
.lockup .mark { width: 28px; height: 28px; }
.wordmark { font-family: var(--serif); font-variation-settings: "opsz" 36, "SOFT" 100; font-weight: 500; font-size: 24px; letter-spacing: -0.03em; color: var(--bone); line-height: 1; }
.links { display: flex; gap: 26px; font-size: 14px; color: var(--grey); margin-left: 12px; }
.links a:hover { color: var(--bone); }
.nav-cta { margin-left: auto; display: flex; gap: 10px; }

/* Hero */
.hero { position: relative; overflow: visible; overflow-x: clip; padding: 72px 0 96px; }
.hero-in { position: relative; z-index: 1; display: grid; grid-template-columns: 1.05fr 0.95fr; gap: 56px; align-items: center; }
.hero-copy { max-width: 560px; }
.hero-actions { display: flex; gap: 12px; flex-wrap: wrap; margin-top: 28px; }
.install { margin-top: 22px; display: inline-flex; align-items: center; gap: 14px; padding: 8px 8px 8px 16px; border: 1px solid var(--line); background: rgba(24, 34, 58, 0.7); border-radius: 10px; font-family: var(--mono); font-size: 13px; color: var(--grey); backdrop-filter: blur(6px); }
.install .p { color: var(--faience); }
.copy { display: inline-flex; align-items: center; gap: 6px; height: 30px; padding: 0 10px; border-radius: 7px; background: rgba(251, 247, 238, 0.06); font-family: var(--sans); font-size: 12.5px; color: var(--bone); }
.copy svg { width: 14px; height: 14px; }
.copy:hover { background: rgba(251, 247, 238, 0.12); }
.copy.done { color: var(--faience); }

/* Terminals */
.term { border-radius: 14px; overflow: hidden; background: var(--midnight-3); border: 1px solid var(--line); box-shadow: 0 30px 70px rgba(0, 0, 0, 0.45); }
.term figcaption { display: flex; align-items: center; gap: 12px; height: 38px; padding: 0 14px; font-family: var(--mono); font-size: 11.5px; color: var(--mute); background: rgba(24, 34, 58, 0.6); border-bottom: 1px solid var(--line); }
.dots { display: inline-flex; gap: 6px; }
.dots i { width: 10px; height: 10px; border-radius: 50%; background: rgba(251, 247, 238, 0.16); }
.term pre { padding: 18px 20px 22px; font-family: var(--mono); font-size: 12.4px; line-height: 1.7; color: var(--grey); overflow-x: auto; }
.term .p { color: var(--faience); }
.term .m { color: var(--gold); }
.term .ph, .frag-code .ph { color: var(--faience); background: rgba(108, 207, 198, 0.1); padding: 1px 5px; border-radius: 3px; }
.term .ok { color: var(--faience); }
.term .hold { color: var(--gold); }
.term .no { color: var(--ember-soft); }
.term .c { color: var(--mute); font-style: italic; }
.term .k { color: var(--bone); }
.term .s { color: #e8c979; }
.hero-term pre { min-height: 258px; }
.hero-term code[data-type] .cursor { display: inline-block; width: 7px; height: 13px; background: var(--faience); vertical-align: -2px; animation: blink 1s steps(2) infinite; }
@keyframes blink { to { opacity: 0; } }

/* Sections */
.section { position: relative; padding: 96px 0; }
.section .wrap { position: relative; z-index: 1; }
.card { background: var(--midnight-2); border: 1px solid var(--line); border-radius: var(--radius); padding: 26px; }

/* Problem */
.leaks { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 14px; }
.leaks li { display: grid; gap: 8px; padding: 18px 18px 20px; border: 1px solid var(--line); border-radius: 12px; background: rgba(24, 34, 58, 0.5); }
.leaks code { color: var(--apricot); font-size: 13px; }
.leaks span { font-size: 13.5px; color: var(--grey); }

/* Steps */
.steps { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 20px; }
.step { display: grid; gap: 10px; align-content: start; }
.step .num { font-family: var(--mono); font-size: 12px; color: var(--gold); letter-spacing: 0.1em; }
.step h3 { font-family: var(--serif); font-variation-settings: "opsz" 36, "SOFT" 60; font-size: 26px; }
.step p { font-size: 14.5px; color: var(--grey); }
.step code { color: var(--faience); }
.frag { margin-top: 14px; background: var(--midnight-3); border: 1px solid var(--line); border-radius: 10px; padding: 14px; font-size: 12.5px; display: grid; gap: 10px; }
.frag-head { display: flex; align-items: center; gap: 8px; font-family: var(--mono); font-size: 11px; letter-spacing: 0.08em; text-transform: uppercase; color: var(--mute); }
.glyph { width: 14px; height: 14px; color: var(--gold); --sun: var(--apricot); flex: none; }
.eyebrow .glyph { display: inline-block; vertical-align: -2px; margin-right: 8px; }
.frag-row { display: flex; justify-content: space-between; gap: 10px; font-family: var(--mono); color: var(--bone); }
.frag-row em { font-style: normal; color: var(--mute); }
.frag-field { display: grid; gap: 4px; }
.frag-field .label { font-size: 11px; color: var(--mute); }
.frag-field .input { font-family: var(--mono); padding: 8px 10px; border-radius: 6px; background: rgba(251, 247, 238, 0.05); border: 1px solid var(--line); color: var(--bone); }
.frag-field .input i { font-style: normal; color: var(--mute); }
.frag-code { font-family: var(--mono); font-size: 12px; line-height: 1.7; color: var(--grey); overflow-x: auto; }
.frag-foot { font-size: 12px; color: var(--mute); }
.frag-foot code { color: var(--grey); }
.frag-btns { display: flex; gap: 8px; }

/* Approval */
.approve-grid { display: grid; grid-template-columns: 0.9fr 1.1fr; gap: 56px; align-items: center; }
.approve-grid .section-head { margin-bottom: 0; }
.ticks { display: grid; gap: 10px; margin-top: 8px; font-size: 14.5px; color: var(--grey); }
.ticks li { display: flex; gap: 10px; align-items: flex-start; }
.ticks .glyph { margin-top: 4px; }
.approval { background: var(--bone); color: var(--ink); border-radius: 18px; padding: 26px 28px; box-shadow: 0 40px 90px rgba(0, 0, 0, 0.5), 0 0 0 1px rgba(251, 247, 238, 0.15); display: grid; gap: 18px; }
.approval-head { display: flex; justify-content: space-between; align-items: center; }
.approval-badge { display: inline-flex; align-items: center; gap: 8px; font-family: var(--mono); font-size: 11.5px; letter-spacing: 0.08em; text-transform: uppercase; color: var(--ink-2); }
.approval-badge .glyph { color: var(--teal); --sun: var(--ember); width: 16px; height: 16px; }
.approval-id { font-family: var(--mono); font-size: 12px; color: var(--ink-2); opacity: 0.7; }
.approval-title { font-family: var(--serif); font-variation-settings: "opsz" 36, "SOFT" 60; font-weight: 500; font-size: 24px; line-height: 1.25; }
.approval-title .method { font-family: var(--mono); font-size: 0.72em; padding: 2px 6px; border-radius: 5px; background: var(--ink); color: var(--bone); vertical-align: middle; }
.approval-title .host { color: var(--teal); }
.approval-meta { display: grid; grid-template-columns: 1fr 1fr; gap: 12px 20px; margin: 0; font-size: 13.5px; }
.approval-meta dt { font-family: var(--mono); font-size: 11px; letter-spacing: 0.08em; text-transform: uppercase; color: var(--ink-2); opacity: 0.7; margin-bottom: 3px; }
.approval-meta dd { margin: 0; color: var(--ink); }
.chip { display: inline-block; font-family: var(--mono); font-size: 11.5px; padding: 2px 8px; border-radius: 999px; }
.chip-teal { background: rgba(31, 111, 115, 0.12); color: var(--teal-deep); }
.chip-ember { background: rgba(212, 80, 43, 0.12); color: #a63c1f; }
.approval-body { background: var(--cream); border: 1px solid rgba(28, 25, 21, 0.1); border-radius: 10px; overflow: hidden; }
.code-head { display: flex; justify-content: space-between; padding: 8px 14px; font-family: var(--mono); font-size: 11px; color: var(--ink-2); border-bottom: 1px solid rgba(28, 25, 21, 0.08); }
.approval .code { padding: 12px 14px; font-family: var(--mono); font-size: 12.5px; line-height: 1.7; color: var(--ink); overflow-x: auto; }
.approval .code .k { color: var(--teal-deep); }
.approval .code .v { color: var(--ink); }
.approval .code .n { color: var(--ember); }
.approval-actions { display: flex; align-items: center; gap: 10px; }
.approval-expiry { margin-left: auto; font-family: var(--mono); font-size: 12px; color: var(--ink-2); }

/* Vault app */
.app { border-radius: var(--radius); overflow: hidden; background: var(--midnight-3); border: 1px solid var(--line); box-shadow: 0 30px 70px rgba(0, 0, 0, 0.45); }
.app-bar { display: flex; align-items: center; gap: 16px; height: 42px; padding: 0 16px; background: rgba(24, 34, 58, 0.6); border-bottom: 1px solid var(--line); font-family: var(--mono); font-size: 12px; color: var(--mute); }
.app-bar .url { margin: 0 auto; padding: 4px 14px; border-radius: 6px; background: rgba(251, 247, 238, 0.05); }
.app-body { padding: 22px 24px 26px; }
.app-head { display: flex; justify-content: space-between; align-items: center; margin-bottom: 12px; }
.app-head h3 { font-size: 15px; font-weight: 500; display: flex; align-items: center; gap: 10px; }
.app-btn { font-size: 12.5px; padding: 6px 12px; border-radius: 8px; background: var(--gold); color: var(--midnight); font-weight: 500; }
.log-head { margin-top: 28px; }
.live { display: inline-flex; align-items: center; gap: 6px; font-family: var(--mono); font-size: 11px; letter-spacing: 0.08em; text-transform: uppercase; color: var(--faience); }
.live i { width: 7px; height: 7px; border-radius: 50%; background: var(--faience); box-shadow: 0 0 10px var(--faience); animation: pulse 2.4s ease-in-out infinite; }
@keyframes pulse { 50% { opacity: 0.4; } }
.app table { width: 100%; border-collapse: collapse; font-size: 13px; }
.app th { text-align: left; font-family: var(--mono); font-size: 11px; letter-spacing: 0.08em; text-transform: uppercase; color: var(--mute); font-weight: 400; padding: 8px 10px; border-bottom: 1px solid var(--line); }
.app td { padding: 11px 10px; border-bottom: 1px solid var(--line); vertical-align: top; color: var(--grey); }
.app td b { color: var(--bone); font-weight: 500; }
.app td code { font-size: 12px; color: var(--grey); background: rgba(251, 247, 238, 0.05); padding: 1px 6px; border-radius: 4px; white-space: nowrap; }
.app td code.needs { color: var(--gold); }
.pill { font-family: var(--mono); font-size: 11px; padding: 2px 8px; border-radius: 999px; border: 1px solid rgba(108, 207, 198, 0.4); color: var(--faience); }
.log td:first-child { font-family: var(--mono); font-size: 12px; color: var(--mute); white-space: nowrap; }
.log td:nth-child(4) { font-family: var(--mono); font-size: 12px; }
.d { font-weight: 500; }
.d.ok { color: var(--faience); }
.d.hold { color: var(--gold); }
.d.no { color: var(--ember-soft); }
.log small { display: block; font-size: 12px; color: var(--mute); margin-top: 2px; }
.log tr.new { animation: slide-in 0.6s ease-out; }
@keyframes slide-in { from { opacity: 0; transform: translateY(-8px); } }

/* CLI */
.code-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 22px; }

/* Features */
.features { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 16px; }
.features li { display: grid; gap: 8px; align-content: start; padding: 22px; }
.ico { width: 22px; height: 22px; fill: none; stroke: var(--faience); stroke-width: 1.6; stroke-linecap: round; stroke-linejoin: round; margin-bottom: 6px; }
.features h3 { font-size: 16px; font-weight: 500; }
.features p { font-size: 14px; color: var(--grey); }
.features code { color: var(--faience); }

/* Works with */
.works { padding-top: 40px; }
.chips { display: flex; flex-wrap: wrap; gap: 10px; }
.chips li { padding: 9px 16px; border-radius: 999px; border: 1px solid var(--line); background: rgba(24, 34, 58, 0.6); font-size: 14px; color: var(--bone); }
.chips code { color: var(--faience); }

/* Closing */
.cta { overflow: hidden; padding: 120px 0; }
.cta-in { text-align: center; display: grid; justify-items: center; gap: 18px; }
.stack { display: grid; justify-items: center; gap: 14px; color: var(--gold); --sun: var(--apricot); --bg: var(--midnight); margin-bottom: 10px; }
.mark-lg { width: 72px; height: 72px; }
.wordmark-lg { font-family: var(--serif); font-variation-settings: "opsz" 144, "SOFT" 100, "WONK" 1; font-weight: 500; font-size: 64px; letter-spacing: -0.03em; line-height: 0.9; color: var(--bone); }
.cta .lede { text-align: center; }
.cta .hero-actions { justify-content: center; margin-top: 8px; }
.myth { margin-top: 28px; font-family: var(--serif); font-style: italic; font-variation-settings: "opsz" 24, "SOFT" 60; font-size: 16px; color: var(--mute); }

/* Footer */
.footer { border-top: 1px solid var(--line); padding: 36px 0 48px; }
.footer-in { display: flex; justify-content: space-between; align-items: center; gap: 24px; flex-wrap: wrap; }
.footer-brand { display: flex; align-items: center; gap: 22px; font-size: 13px; }
.footer-links { display: flex; gap: 22px; font-size: 14px; color: var(--grey); }
.footer-links a:hover { color: var(--bone); }

/* Reveals */
.reveal { opacity: 0; transform: translateY(14px); transition: opacity 0.7s ease, transform 0.7s ease; }
.reveal.in { opacity: 1; transform: none; }

/* Phone */
@media (max-width: 900px) {
  .hero-in, .approve-grid, .code-grid { grid-template-columns: 1fr; }
  .leaks { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .steps, .features { grid-template-columns: 1fr; }
  .links { display: none; }
  .section { padding: 64px 0; }
  .hero { padding: 40px 0 64px; }
  .approval { padding: 20px; }
  .approval-meta { grid-template-columns: 1fr; }
  .approval-actions { flex-wrap: wrap; }
  .approval-expiry { margin-left: 0; width: 100%; }
  .app-body { padding: 14px; }
  .app table, .app thead, .app tbody, .app tr, .app td { display: block; }
  .app thead { display: none; }
  .app tr { padding: 10px 0; border-bottom: 1px solid var(--line); }
  .app td { padding: 2px 0; border: 0; }
  .app td code { white-space: normal; }
  .term pre { font-size: 11.5px; padding: 14px; }
  .install { width: 100%; font-size: 11px; gap: 8px; padding-left: 12px; }
  .install code { white-space: nowrap; }
  h1 { margin-top: 26px; }
  .wordmark-lg { font-size: 48px; }
  .footer-brand { flex-wrap: wrap; gap: 12px; }
}
@media (max-width: 480px) {
  .leaks { grid-template-columns: 1fr; }
  .nav-cta .btn-ghost { display: none; }
}

/* Reduced motion */
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .bloom, .plate, .live i, .hero-term .cursor { animation: none; }
  .reveal { opacity: 1; transform: none; transition: none; }
  .log tr.new { animation: none; }
  .btn { transition: none; }
}
