/* =========================================================
   MORA AGENT Design System
   Norse-utility identity for Robinhood Chain
   ========================================================= */

:root{
  /* Surfaces */
  --bg: #0d120f;
  --bg-elevated: #131a16;
  --surface: #19211c;
  --surface-2: #212b24;
  --line: #2a352d;
  --line-strong: #3a473c;

  /* Text */
  --text: #edf1ea;
  --text-muted: #9caa9e;
  --text-faint: #6b7a6e;

  /* Brand */
  --lime: #a1f137;
  --lime-dim: #86cf2c;
  --lime-ink: #0d1408;
  --bronze: #c08a4e;
  --bronze-dim: #9c6f3d;

  /* Type */
  --font-display: 'Space Grotesk', 'Arial Narrow', sans-serif;
  --font-body: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
  --font-mono: 'JetBrains Mono', 'Courier New', monospace;

  /* Rhythm */
  --radius-sm: 4px;
  --radius-md: 8px;
  --radius-lg: 14px;
  --max-w: 1180px;
  --gutter: clamp(20px, 5vw, 64px);
}

*,*::before,*::after{ box-sizing: border-box; }
html{ scroll-behavior: smooth; }
@media (prefers-reduced-motion: reduce){
  html{ scroll-behavior: auto; }
  *,*::before,*::after{ animation-duration: 0.001ms !important; animation-iteration-count: 1 !important; transition-duration: 0.001ms !important; }
}

body{
  margin:0;
  background: var(--bg);
  color: var(--text);
  font-family: var(--font-body);
  font-size: 16px;
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

img{ max-width:100%; display:block; }
a{ color: inherit; text-decoration: none; }
button{ font-family: inherit; cursor:pointer; }
ul{ margin:0; padding:0; list-style:none; }
h1,h2,h3,h4{ margin:0; font-family: var(--font-display); font-weight:600; letter-spacing:-0.01em; }
p{ margin:0; }

:focus-visible{
  outline: 2px solid var(--lime);
  outline-offset: 3px;
  border-radius: 2px;
}

.container{
  max-width: var(--max-w);
  margin: 0 auto;
  padding-left: var(--gutter);
  padding-right: var(--gutter);
}

.eyebrow{
  display:inline-flex;
  align-items:center;
  gap:8px;
  font-family: var(--font-mono);
  font-size: 12px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--bronze);
}
/* Belt-buckle style label, referencing Mora's nameplate */
.plate-label{
  display:inline-block;
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--text-muted);
  border: 1px solid var(--line-strong);
  border-radius: var(--radius-sm);
  padding: 4px 10px;
  background: var(--surface);
}

/* ============ NAVBAR ============ */
.navbar{
  position: sticky;
  top:0;
  z-index: 100;
  background: rgba(13,18,15,0.88);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--line);
}
.navbar .container{
  display:flex;
  align-items:center;
  justify-content:space-between;
  height: 72px;
}
.brand{
  display:flex;
  align-items:center;
  gap:10px;
  font-family: var(--font-display);
  font-weight:700;
  font-size: 18px;
  letter-spacing: -0.01em;
}
.brand img{ width:32px; height:32px; border-radius: 6px; }
.brand > span{ display:flex; flex-direction:column; line-height:1.15; }
.brand .brand-sub{
  display:block;
  font-family: var(--font-mono);
  font-size: 9px;
  letter-spacing: 0.16em;
  color: var(--text-faint);
  font-weight: 500;
  margin-top: 2px;
}
.nav-links{
  display:flex;
  align-items:center;
  gap: 36px;
}
.nav-links a{
  font-size: 14px;
  color: var(--text-muted);
  transition: color 0.15s ease;
  position:relative;
}
.nav-links a:hover{ color: var(--text); }
.nav-links a.active{ color: var(--lime); }

.hamburger{
  display:none;
  width: 40px; height:40px;
  align-items:center; justify-content:center;
  background:none; border:1px solid var(--line-strong);
  border-radius: var(--radius-sm);
  color: var(--text);
}
.hamburger span{ display:block; width:18px; height:2px; background:currentColor; position:relative; }
.hamburger span::before,.hamburger span::after{
  content:""; position:absolute; left:0; width:18px; height:2px; background:currentColor;
}
.hamburger span::before{ top:-6px; }
.hamburger span::after{ top:6px; }

.mobile-drawer{
  display:none;
  position:fixed; inset:72px 0 0 0;
  background: var(--bg);
  z-index: 99;
  padding: 24px var(--gutter);
  border-top: 1px solid var(--line);
}
.mobile-drawer.open{ display:block; }
.mobile-drawer a{
  display:block;
  padding: 16px 0;
  border-bottom: 1px solid var(--line);
  font-size: 17px;
  color: var(--text);
}
.mobile-drawer .drawer-actions{
  display:flex; flex-direction:column; gap:12px; margin-top:24px;
}

@media (max-width: 860px){
  .nav-links{ display:none; }
  .hamburger{ display:flex; }
}

/* ============ BUTTONS ============ */
.btn{
  display:inline-flex;
  align-items:center;
  justify-content:center;
  gap:8px;
  padding: 13px 24px;
  border-radius: var(--radius-sm);
  font-size: 14px;
  font-weight:600;
  border: 1px solid transparent;
  transition: transform 0.15s ease, background 0.15s ease, border-color 0.15s ease;
  white-space: nowrap;
}
.btn:active{ transform: translateY(1px); }
.btn-primary{
  background: var(--lime);
  color: var(--lime-ink);
}
.btn-primary:hover{ background: var(--lime-dim); }
.btn-outline{
  background: transparent;
  border-color: var(--line-strong);
  color: var(--text);
}
.btn-outline:hover{ border-color: var(--bronze); color: var(--bronze); }
.btn-block{ width:100%; }

/* ============ HERO ============ */
.hero{
  position: relative;
  min-height: clamp(640px, 92vh, 860px);
  display: flex;
  align-items: center;
  overflow: hidden;
  border-bottom: 1px solid var(--line);
}
.hero-bg{
  position: absolute;
  inset: 0;
  background-image: url('../img/hero-forge.jpg');
  background-size: cover;
  background-position: center 25%;
}
.hero-bg::after{
  content: "";
  position: absolute;
  inset: 0;
  background:
    radial-gradient(ellipse 70% 60% at 75% 40%, rgba(161,241,55,0.08) 0%, transparent 60%),
    linear-gradient(105deg, rgba(13,18,15,0.97) 0%, rgba(13,18,15,0.92) 38%, rgba(13,18,15,0.72) 58%, rgba(13,18,15,0.45) 100%),
    linear-gradient(0deg, rgba(13,18,15,0.95) 0%, rgba(13,18,15,0) 35%);
}
.hero-glow{
  position: absolute;
  width: 520px;
  height: 520px;
  top: 10%;
  right: 8%;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(161,241,55,0.12) 0%, transparent 68%);
  filter: blur(40px);
  pointer-events: none;
  animation: hero-pulse 6s ease-in-out infinite;
}
.hero-runes{
  position: absolute;
  right: var(--gutter);
  bottom: 48px;
  font-family: var(--font-mono);
  font-size: 13px;
  letter-spacing: 0.35em;
  color: rgba(192,138,78,0.25);
  pointer-events: none;
  z-index: 1;
}
@keyframes hero-pulse{
  0%, 100%{ opacity: 0.6; transform: scale(1); }
  50%{ opacity: 1; transform: scale(1.06); }
}

.hero-grid{
  position: relative;
  z-index: 2;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: clamp(32px, 5vw, 72px);
  align-items: center;
  padding-top: clamp(48px, 8vh, 96px);
  padding-bottom: clamp(48px, 8vh, 96px);
}
.hero-copy{
  max-width: 560px;
}
.hero h1{
  font-size: clamp(38px, 5.2vw, 62px);
  line-height: 1.05;
  margin-top: 0;
  color: var(--text);
}
.hero h1 em{
  font-style: normal;
  color: var(--lime);
  display: block;
}
.hero p.lead{
  margin-top: 22px;
  font-size: clamp(16px, 1.8vw, 18px);
  color: var(--text-muted);
  max-width: 460px;
  line-height: 1.65;
}
.hero-actions{
  display: flex;
  gap: 14px;
  margin-top: 34px;
  flex-wrap: wrap;
}
/* Hero visual panel */
.hero-visual{
  position: relative;
  justify-self: end;
  width: 100%;
  max-width: 420px;
  display: flex;
  flex-direction: column;
  gap: 14px;
}
.hero-floats{
  position: relative;
}
.hero-frame{
  position: relative;
  border-radius: var(--radius-lg);
  overflow: hidden;
  border: 1px solid var(--line-strong);
  box-shadow:
    0 24px 64px rgba(0,0,0,0.45),
    0 0 0 1px rgba(161,241,55,0.06) inset;
}
.hero-frame img{
  width: 100%;
  aspect-ratio: 4 / 5;
  object-fit: cover;
  object-position: center top;
}
.hero-frame-glow{
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, transparent 50%, rgba(13,18,15,0.85) 100%);
  pointer-events: none;
}
.hero-float{
  background: rgba(25,33,28,0.92);
  border: 1px solid var(--line-strong);
  border-radius: var(--radius-md);
  padding: 10px 14px;
  backdrop-filter: blur(10px);
  box-shadow: 0 8px 24px rgba(0,0,0,0.3);
  font-family: var(--font-mono);
  font-size: 12.5px;
  color: var(--lime);
  font-weight: 500;
  letter-spacing: 0.01em;
  white-space: nowrap;
}
@media (min-width: 961px){
  .hero-floats{
    position: absolute;
    inset: 0;
    pointer-events: none;
  }
  .hero-float{
    position: absolute;
    animation: float-drift 5s ease-in-out infinite;
  }
  .hero-float--top{
    top: 12%;
    left: -12%;
    animation-delay: 0s;
  }
  .hero-float--mid{
    bottom: 28%;
    right: -8%;
    animation-delay: 1.5s;
  }
}
@keyframes float-drift{
  0%, 100%{ transform: translateY(0); }
  50%{ transform: translateY(-6px); }
}
.hero-bubble{
  display: flex;
  gap: 10px;
  align-items: flex-start;
  background: var(--surface);
  border: 1px solid var(--line-strong);
  border-radius: var(--radius-md);
  padding: 12px 14px;
  box-shadow: 0 12px 32px rgba(0,0,0,0.35);
}
@media (min-width: 961px){
  .hero-bubble{
    position: absolute;
    bottom: -16px;
    left: -24px;
    right: 24px;
    animation: float-drift 6s ease-in-out infinite;
    animation-delay: 0.8s;
  }
}
.hero-bubble img{
  width: 28px;
  height: 28px;
  border-radius: 50%;
  border: 1px solid var(--line);
  flex-shrink: 0;
}
.hero-bubble p{
  font-size: 12.5px;
  color: var(--text-muted);
  line-height: 1.45;
}

@media (max-width: 960px){
  .hero{
    min-height: auto;
    overflow: visible;
  }
  .hero-grid{
    grid-template-columns: 1fr;
    gap: 40px;
    padding-top: 40px;
    padding-bottom: 48px;
  }
  .hero-copy{
    max-width: none;
    text-align: left;
  }
  .hero p.lead{ max-width: none; }
  .hero-visual{
    justify-self: stretch;
    max-width: none;
    width: 100%;
  }
  .hero h1 em{ display: inline; }
  .hero-runes{ display: none; }
  .hero-glow{ display: none; }
  .hero-floats{
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
  }
  .hero-float{
    flex: 1 1 auto;
    white-space: normal;
    text-align: center;
  }
}
@media (max-width: 560px){
  .hero-grid{
    gap: 32px;
    padding-top: 32px;
    padding-bottom: 40px;
  }
  .hero h1{
    font-size: clamp(32px, 8.5vw, 42px);
    line-height: 1.12;
  }
  .hero-actions{
    flex-direction: column;
    gap: 10px;
    margin-top: 28px;
  }
  .hero-actions .btn{
    width: 100%;
    justify-content: center;
  }
  .hero-floats{
    flex-direction: column;
  }
  .hero-float{
    width: 100%;
    text-align: left;
    font-size: 12px;
  }
  .cta-band{
    padding: 32px 24px;
    flex-direction: column;
    align-items: stretch;
    text-align: center;
  }
  .cta-band .actions{
    flex-direction: column;
    width: 100%;
  }
  .cta-band .actions .btn{
    width: 100%;
  }
}

/* ============ SECTIONS ============ */
section{ padding: clamp(72px, 10vw, 104px) 0; }
.section-head{
  max-width: 640px;
  margin-bottom: 56px;
}
#product .section-head,
#how-it-works .section-head{
  text-align: center;
  margin-left: auto;
  margin-right: auto;
}
.section-head h2{
  font-size: clamp(28px, 3.4vw, 38px);
  margin-top: 14px;
  color: var(--text);
}
.section-head p{
  margin-top: 16px;
  color: var(--text-muted);
  font-size: 16px;
}
.section-alt{ background: var(--bg-elevated); border-top:1px solid var(--line); border-bottom:1px solid var(--line); }

/* Rune divider - signature element referencing the headband runes */
.rune-divider{
  display:flex;
  align-items:center;
  gap:6px;
  margin: 0 0 8px;
  color: var(--bronze-dim);
  font-family: var(--font-mono);
  font-size: 13px;
  letter-spacing: 0.2em;
}

/* Cards */
.grid-3{
  display:grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 24px;
}
.grid-2{
  display:grid;
  grid-template-columns: 1fr 1fr;
  gap: 24px;
}
@media (max-width: 900px){
  .grid-3{ grid-template-columns: 1fr; }
  .grid-2{ grid-template-columns: 1fr; }
}

.card{
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  padding: 28px;
  transition: border-color 0.2s ease, transform 0.2s ease, box-shadow 0.2s ease;
}
.card:hover{
  border-color: var(--line-strong);
  transform: translateY(-2px);
  box-shadow: 0 12px 32px rgba(0,0,0,0.2);
}
#product .card{
  border-top: 2px solid transparent;
}
#product .card:hover{
  border-top-color: var(--lime);
}
.card .card-icon{
  width: 40px; height:40px;
  border-radius: var(--radius-sm);
  background: var(--surface-2);
  border: 1px solid var(--line-strong);
  display:flex; align-items:center; justify-content:center;
  color: var(--lime);
  margin-bottom: 20px;
}
.card h3{
  font-size: 18px;
  color: var(--text);
  margin-bottom: 10px;
}
.card p{
  color: var(--text-muted);
  font-size: 14.5px;
}
.card .tag{
  display:inline-block;
  margin-top:16px;
  font-family: var(--font-mono);
  font-size: 10.5px;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--bronze);
  border: 1px solid var(--bronze-dim);
  border-radius: 20px;
  padding: 3px 10px;
}

/* Steps (real sequence, numbering justified) */
.steps{
  display:grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 32px;
  counter-reset: step;
}
@media (max-width: 900px){ .steps{ grid-template-columns:1fr; } }
.step{
  position:relative;
  padding-top: 44px;
  border-top: 1px solid var(--line-strong);
}
.step::before{
  counter-increment: step;
  content: counter(step, decimal-leading-zero);
  position:absolute;
  top:-1px; left:0;
  font-family: var(--font-mono);
  font-size: 12px;
  color: var(--lime);
  background: var(--bg);
  padding-right: 10px;
}
.step h3{ font-size:17px; margin-bottom:10px; }
.step p{ color: var(--text-muted); font-size:14.5px; }

/* Chat preview mock */
.chat-mock{
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  overflow:hidden;
}
.chat-mock-head{
  display:flex; align-items:center; gap:12px;
  padding: 16px 20px;
  border-bottom: 1px solid var(--line);
  background: var(--surface-2);
}
.chat-mock-head img{ width:34px; height:34px; border-radius:50%; border:1px solid var(--line-strong); }
.chat-mock-head .name{ font-size:14px; font-weight:600; }
.chat-mock-head .status{ font-size:11px; color: var(--text-faint); font-family: var(--font-mono); }
.chat-mock-body{ padding: 24px; display:flex; flex-direction:column; gap:14px; }
.bubble{
  max-width: 78%;
  padding: 12px 16px;
  border-radius: var(--radius-md);
  font-size: 14px;
  line-height:1.5;
}
.bubble.agent{
  background: var(--surface-2);
  border: 1px solid var(--line);
  align-self:flex-start;
  border-bottom-left-radius: 2px;
}
.bubble.user{
  background: var(--lime);
  color: var(--lime-ink);
  align-self:flex-end;
  border-bottom-right-radius: 2px;
  font-weight: 500;
}
.chip-row{
  display:flex; flex-wrap:wrap; gap:10px;
  padding: 0 24px 24px;
}
.chip{
  font-size:12.5px;
  padding: 8px 14px;
  border: 1px solid var(--line-strong);
  border-radius: 20px;
  color: var(--text-muted);
  background: var(--bg-elevated);
}

/* About / character section */
.about-split{
  display:grid;
  grid-template-columns: 380px 1fr;
  gap: 56px;
  align-items:center;
}
@media (max-width: 900px){ .about-split{ grid-template-columns:1fr; } }
.about-portrait{
  border-radius: var(--radius-lg);
  overflow:hidden;
  border: 1px solid var(--line-strong);
  position:relative;
}
.about-portrait::after{
  content:"";
  position:absolute; inset:0;
  box-shadow: inset 0 -60px 60px -20px rgba(13,18,15,0.7);
}
.about-copy h2{ font-size: clamp(26px,3vw,34px); margin-bottom:18px; }
.about-copy p{ color: var(--text-muted); margin-bottom:14px; font-size:15.5px; }
.about-stats{
  display:flex; gap:28px; margin-top:24px; flex-wrap:wrap;
}
.about-stats div b{ display:block; font-family: var(--font-mono); color: var(--bronze); font-size:13px; }
.about-stats div span{ font-size:12px; color: var(--text-faint); }

/* CTA band */
.cta-band{
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  padding: 56px;
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap: 32px;
  flex-wrap: wrap;
}
.cta-band h2{ font-size: clamp(24px,3vw,30px); max-width:440px; }
.cta-band .actions{ display:flex; gap:14px; flex-wrap:wrap; }

/* Footer */
footer{
  border-top: 1px solid var(--line);
  padding: 56px 0 32px;
}
.footer-top{
  display:flex;
  justify-content:space-between;
  gap: 40px;
  flex-wrap: wrap;
  padding-bottom: 40px;
}
.footer-brand .brand{ margin-bottom: 12px; }
.footer-brand p{ color: var(--text-faint); font-size:13.5px; max-width: 300px; }
.footer-cols{ display:flex; gap:64px; flex-wrap:wrap; }
.footer-col h4{
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--text-faint);
  margin-bottom: 16px;
  font-weight: 500;
}
.footer-col a{
  display:block;
  font-size: 14px;
  color: var(--text-muted);
  margin-bottom: 12px;
}
.footer-col a:hover{ color: var(--lime); }
.footer-bottom{
  border-top: 1px solid var(--line);
  padding-top: 24px;
  display:flex;
  justify-content:space-between;
  flex-wrap: wrap;
  gap: 12px;
  font-size: 12.5px;
  color: var(--text-faint);
  font-family: var(--font-mono);
}

/* ============ APP PAGE ============ */
.app-shell{
  max-width: 880px;
  margin: 0 auto;
  padding: 40px var(--gutter) 100px;
}
.app-header{
  text-align:center;
  margin-bottom: 32px;
}
.app-header img{
  width: 64px; height:64px; border-radius:50%;
  margin: 0 auto 16px;
  border: 1px solid var(--line-strong);
}
.app-header h1{ font-size: 24px; }
.app-header p{ color: var(--text-muted); font-size:14px; margin-top:8px; }

.mode-badge{
  display:inline-flex; align-items:center; gap:8px;
  margin-top: 14px;
  padding: 6px 14px;
  border-radius: 20px;
  border: 1px solid var(--line-strong);
  background: var(--surface);
  font-family: var(--font-mono);
  font-size: 11.5px;
  color: var(--text-muted);
}
.mode-badge .dot{ width:7px; height:7px; border-radius:50%; background: var(--lime); }

.chat-window{
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  display:flex;
  flex-direction:column;
  height: 560px;
}
.chat-log{
  flex:1;
  overflow-y:auto;
  padding: 28px;
  display:flex;
  flex-direction:column;
  gap: 16px;
}
.chat-log::-webkit-scrollbar{ width:8px; }
.chat-log::-webkit-scrollbar-thumb{ background: var(--line-strong); border-radius: 4px; }

.chat-templates{
  padding: 0 20px 16px;
  display:flex;
  gap:10px;
  flex-wrap:wrap;
  border-top: 1px solid var(--line);
  padding-top: 16px;
}
.template-btn{
  font-size:13px;
  padding: 9px 14px;
  border-radius: var(--radius-sm);
  border: 1px solid var(--line-strong);
  background: var(--bg-elevated);
  color: var(--text-muted);
  transition: border-color 0.15s ease, color 0.15s ease;
}
.template-btn:hover{ border-color: var(--lime); color: var(--text); }

.chat-input-row{
  display:flex;
  gap: 10px;
  padding: 16px 20px;
  border-top: 1px solid var(--line);
}
.chat-input-row input{
  flex:1;
  background: var(--bg-elevated);
  border: 1px solid var(--line-strong);
  border-radius: var(--radius-sm);
  padding: 12px 14px;
  color: var(--text);
  font-size: 14px;
  font-family: var(--font-body);
}
.chat-input-row input::placeholder{ color: var(--text-faint); }
.chat-input-row button{
  background: var(--lime);
  color: var(--lime-ink);
  border:none;
  border-radius: var(--radius-sm);
  padding: 0 20px;
  font-weight:600;
  font-size:14px;
}
.chat-input-row button:hover{ background: var(--lime-dim); }

.typing-indicator{
  display:flex; gap:4px; align-items:center;
  padding: 12px 16px;
}
.typing-indicator span{
  width:6px; height:6px; border-radius:50%;
  background: var(--text-faint);
  animation: blink 1.2s infinite ease-in-out;
}
.typing-indicator span:nth-child(2){ animation-delay: 0.2s; }
.typing-indicator span:nth-child(3){ animation-delay: 0.4s; }
@keyframes blink{ 0%,80%,100%{ opacity:0.3; } 40%{ opacity:1; } }

.app-footnote{
  text-align:center;
  margin-top: 20px;
  font-size: 12.5px;
  color: var(--text-faint);
}
.app-footnote a{ color: var(--bronze); }

/* ============ 404 ============ */
.error-page{
  min-height: 70vh;
  display:flex;
  flex-direction:column;
  align-items:center;
  justify-content:center;
  text-align:center;
  padding: 40px var(--gutter);
}
.error-page .code{
  font-family: var(--font-mono);
  font-size: 14px;
  color: var(--bronze);
  letter-spacing: 0.14em;
}
.error-page h1{ font-size: clamp(32px,5vw,48px); margin-top:16px; }
.error-page p{ color: var(--text-muted); margin-top: 14px; max-width: 420px; }
.error-page .actions{ display:flex; gap:14px; margin-top: 28px; }
