/* ═══════════════════════════════════════════════════════════════
   ZORA OS — Public Site
   Editorial structure + visual warmth + terminal precision
   ═══════════════════════════════════════════════════════════════ */

/* Fonts loaded via <link> tags in HTML head for performance */

/* ── Tokens ────────────────────────────────────────────────── */
:root {
  --bg:          #06060c;
  --bg-surface:  #0b0b15;
  --bg-raised:   #111122;

  --text-1:      #e2e4f0;
  --text-2:      #8a8db0;
  --text-3:      #4e5070;

  --accent:      #8b78ff;
  --accent-hover:#9d8dff;
  --accent-sub:  rgba(139, 120, 255, 0.10);
  --accent-glow: rgba(139, 120, 255, 0.20);

  --rule:        rgba(255, 255, 255, 0.06);
  --rule-strong: rgba(255, 255, 255, 0.10);

  --font-display: 'Inter', system-ui, sans-serif;
  --font-body:    'Satoshi', system-ui, sans-serif;
  --mono:         'JetBrains Mono', 'SF Mono', monospace;

  --max-w:  880px;
  --ease:   cubic-bezier(0.16, 1, 0.3, 1);
}


/* ── Reset ─────────────────────────────────────────────────── */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

html {
  scroll-behavior: smooth;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

body {
  background: var(--bg);
  color: var(--text-1);
  font-family: var(--font-body);
  font-size: 15px;
  line-height: 1.6;
  overflow-x: hidden;
}

a { color: var(--text-2); text-decoration: none; transition: color 0.15s; }
a:hover { color: var(--text-1); }
img { max-width: 100%; display: block; }
button { font-family: inherit; cursor: pointer; border: none; background: none; }


/* ── Skip link ─────────────────────────────────────────────── */
.skip-link {
  position: absolute;
  left: -9999px;
  top: auto;
  width: 1px;
  height: 1px;
  overflow: hidden;
  padding: 0.5rem 1rem;
  background: var(--accent);
  color: #fff;
  font-size: 14px;
  font-weight: 600;
  border-radius: 0 0 8px 8px;
  z-index: 200;
}

.skip-link:focus {
  position: fixed;
  left: 1rem;
  top: 0;
  width: auto;
  height: auto;
  overflow: visible;
  color: #fff;
}


/* ── Shared ────────────────────────────────────────────────── */
.wrap {
  max-width: var(--max-w);
  margin: 0 auto;
  padding: 0 2rem;
}

.rule {
  height: 1px;
  background: linear-gradient(90deg, transparent, var(--rule-strong), transparent);
  max-width: var(--max-w);
  margin: 0 auto;
}

.mono-label {
  font-family: var(--mono);
  font-size: 11px;
  font-weight: 500;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--accent);
}

section { padding: 3.5rem 0; }


/* ── Nav ───────────────────────────────────────────────────── */
.nav {
  position: fixed;
  inset: 0 0 auto;
  z-index: 100;
  padding: 1.1rem 0;
  transition: background 0.3s, border-color 0.3s;
  border-bottom: 1px solid transparent;
}

.nav--scrolled {
  background: rgba(6, 6, 12, 0.88);
  backdrop-filter: blur(16px) saturate(160%);
  -webkit-backdrop-filter: blur(16px) saturate(160%);
  border-bottom-color: var(--rule);
}

.nav__inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  max-width: var(--max-w);
  margin: 0 auto;
  padding: 0 2rem;
}

.nav__logo {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  color: var(--text-1);
}

.nav__mark {
  width: 30px;
  height: 30px;
  border-radius: 8px;
  background: linear-gradient(135deg, var(--accent), #6b5cd4);
  display: grid;
  place-items: center;
  font-weight: 700;
  font-size: 14px;
  color: #fff;
  box-shadow: 0 2px 10px var(--accent-glow);
}

.nav__wordmark {
  font-family: var(--font-display);
  font-weight: 600;
  font-size: 15px;
  letter-spacing: -0.01em;
}

.nav__wordmark span {
  color: var(--text-3);
  font-weight: 400;
}

.nav__links {
  display: flex;
  align-items: center;
  gap: 2rem;
  list-style: none;
}

.nav__links a {
  font-size: .9rem;
  font-weight: 500;
  color: var(--text-2);
}

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

.nav__mobile-toggle {
  display: none;
  flex-direction: column;
  gap: 4px;
  padding: 0.4rem;
}

.nav__mobile-toggle span {
  display: block;
  width: 18px;
  height: 1.5px;
  background: var(--text-2);
}

.nav__mobile-menu {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(6, 6, 12, 0.97);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  z-index: 99;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 2.5rem;
}

.nav__mobile-menu--open { display: flex; }
.nav__mobile-menu a { font-size: 1.25rem; color: var(--text-2); font-weight: 500; }
.nav__mobile-menu a:hover { color: var(--text-1); }


/* ── Hero ──────────────────────────────────────────────────── */
.hero {
  padding: 8rem 0 3.5rem;
  position: relative;
  overflow: hidden;
}

/* subtle atmosphere — restrained, not a blob */
.hero__atmosphere {
  position: absolute;
  inset: 0;
  pointer-events: none;
}

.hero__atmosphere::before {
  content: '';
  position: absolute;
  width: 700px;
  height: 700px;
  top: -180px;
  right: -120px;
  background: radial-gradient(circle, var(--accent-glow) 0%, transparent 70%);
  filter: blur(100px);
  opacity: 0.5;
}

.hero__atmosphere::after {
  content: '';
  position: absolute;
  width: 500px;
  height: 500px;
  bottom: -200px;
  left: -100px;
  background: radial-gradient(circle, rgba(0, 140, 255, 0.08) 0%, transparent 70%);
  filter: blur(80px);
}

/* dot grid — subtle structure */
.hero__grid {
  position: absolute;
  inset: 0;
  background-image: radial-gradient(circle, rgba(255,255,255,0.03) 1px, transparent 1px);
  background-size: 40px 40px;
  mask-image: radial-gradient(ellipse 55% 55% at 70% 35%, black, transparent);
  -webkit-mask-image: radial-gradient(ellipse 55% 55% at 70% 35%, black, transparent);
  pointer-events: none;
}

.hero__inner {
  position: relative;
  z-index: 1;
  max-width: 640px;
  margin: 0 auto;
  text-align: center;
}

.hero__copy { position: relative; }

.hero__title {
  font-family: var(--font-display);
  font-size: clamp(2.5rem, 7vw, 3.75rem);
  font-weight: 800;
  line-height: 1;
  letter-spacing: -0.03em;
  color: var(--text-1);
  margin-top: 0.75rem;
  margin-bottom: 1.5rem;
}

.hero__title em {
  font-style: normal;
  background: linear-gradient(135deg, var(--accent), #b4a0ff);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.hero__sub {
  font-size: 1.05rem;
  line-height: 1.7;
  color: var(--text-2);
  margin-bottom: 2.25rem;
}

/* install command — terminal prompt */
.hero__cmd {
  display: inline-flex;
  align-items: center;
  gap: 0.75rem;
  padding: 0.65rem 0.65rem 0.65rem 1.1rem;
  background: var(--bg-surface);
  border: 1px solid var(--rule-strong);
  border-radius: 10px;
  font-family: var(--mono);
  font-size: 13px;
  color: var(--text-1);
  margin: 0 auto 1.75rem;
  transition: border-color 0.3s, box-shadow 0.3s;
}

.hero__cmd:hover {
  border-color: rgba(139, 120, 255, 0.2);
  box-shadow: 0 0 24px var(--accent-sub);
}

.hero__cmd-dollar {
  color: var(--accent);
  user-select: none;
}

.hero__cmd code { user-select: all; }

.hero__cmd-copy {
  width: 32px;
  height: 32px;
  border-radius: 6px;
  display: grid;
  place-items: center;
  color: var(--text-3);
  border: 1px solid var(--rule);
  transition: all 0.15s;
  flex-shrink: 0;
}

.hero__cmd-copy:hover {
  color: var(--accent);
  border-color: rgba(139, 120, 255, 0.25);
  background: var(--accent-sub);
}

.hero__cmd-copy svg { width: 14px; height: 14px; }

.hero__meta {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 1.25rem;
  font-family: var(--mono);
  font-size: 11px;
  color: var(--text-3);
}

.hero__meta a { color: var(--text-3); }
.hero__meta a:hover { color: var(--accent); }
.hero__meta-sep { opacity: 0.3; }


/* ── Layers motif ──────────────────────────────────────────── */
.layers {
  position: relative;
  width: 100%;
  height: 320px;
  margin-top: 0.5rem;
}

.layer {
  position: absolute;
  left: 0;
  right: 0;
  border: 1px solid var(--rule-strong);
  border-radius: 10px;
  background: var(--bg-surface);
  transition: transform 0.6s var(--ease), border-color 0.6s var(--ease);
}

.layer:hover {
  border-color: rgba(139, 120, 255, 0.15);
}

.layer__label {
  position: absolute;
  top: 10px;
  left: 14px;
  font-family: var(--mono);
  font-size: 10px;
  font-weight: 500;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--text-3);
}

.layer__detail {
  position: absolute;
  top: 10px;
  right: 14px;
  font-family: var(--mono);
  font-size: 10px;
  color: var(--text-3);
  opacity: 0.5;
}

.layer--4 { bottom: 0;    height: 100%; background: var(--bg); border-color: var(--rule); }
.layer--3 { bottom: 14px; height: calc(100% - 36px); }
.layer--2 { bottom: 28px; height: calc(100% - 72px); }
.layer--1 {
  bottom: 42px;
  height: calc(100% - 108px);
  border-color: rgba(139, 120, 255, 0.18);
  background: linear-gradient(180deg, rgba(139, 120, 255, 0.04) 0%, var(--bg-surface) 100%);
}

.layer--1 .layer__label { color: var(--accent); opacity: 0.8; }


/* ── Philosophy ────────────────────────────────────────────── */
.philosophy {
  padding: 4.5rem 0;
}

.philosophy__text {
  max-width: 660px;
  margin: 0 auto;
  text-align: center;
}

.philosophy__headline {
  font-family: var(--font-display);
  font-size: clamp(1.3rem, 3vw, 1.6rem);
  font-weight: 700;
  line-height: 1.3;
  color: var(--text-1);
  margin-bottom: 1.25rem;
}

.philosophy__headline em {
  font-style: normal;
  color: var(--accent);
}

.philosophy__body {
  font-size: 1rem;
  line-height: 1.7;
  color: var(--text-2);
}


/* ── Capabilities ──────────────────────────────────────────── */
.capabilities__header { margin-bottom: 2rem; }

.capabilities__title {
  font-family: var(--font-display);
  font-size: 1.4rem;
  font-weight: 700;
  line-height: 1.15;
  color: var(--text-1);
  margin-top: 0.75rem;
}

.capabilities__list {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1px;
  background: var(--rule);
  border: 1px solid var(--rule);
  border-radius: 16px;
  overflow: hidden;
}

.cap {
  padding: 2rem 2.25rem;
  background: var(--bg-surface);
  transition: background 0.3s;
}

.cap:hover {
  background: var(--bg-raised);
}

.cap__num {
  font-family: var(--mono);
  font-size: 11px;
  color: var(--accent);
  margin-bottom: 0.75rem;
  opacity: 0.6;
}

.cap__title {
  font-family: var(--font-display);
  font-size: 1rem;
  font-weight: 600;
  color: var(--text-1);
  margin-bottom: 0.5rem;
  letter-spacing: -0.01em;
}

.cap__text {
  font-size: .85rem;
  line-height: 1.6;
  color: var(--text-2);
}


/* ── Showcase ──────────────────────────────────────────────── */
.showcase__header { margin-bottom: 2.5rem; }

.showcase__title {
  font-family: var(--font-display);
  font-size: 1.4rem;
  font-weight: 700;
  line-height: 1.15;
  color: var(--text-1);
  margin-top: 0.75rem;
}

.showcase__frame {
  border: 1px solid var(--rule-strong);
  border-radius: 14px;
  overflow: hidden;
  background: var(--bg-surface);
  box-shadow: 0 4px 48px rgba(0, 0, 0, 0.4), 0 0 80px var(--accent-sub);
}

.showcase__bar {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 0.65rem 1rem;
  border-bottom: 1px solid var(--rule);
}

.showcase__dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--bg-raised);
}

.showcase__bar-title {
  font-family: var(--mono);
  font-size: 11px;
  color: var(--text-3);
  margin-left: 0.75rem;
}

.showcase__frame img {
  width: 100%;
  display: block;
  transition: opacity 0.25s;
}

.showcase__tabs {
  display: flex;
  gap: 2px;
  margin-top: 1.5rem;
}

.showcase__tab {
  padding: 0.5rem 1.25rem;
  font-size: 12px;
  font-weight: 500;
  font-family: var(--mono);
  color: var(--text-3);
  border-radius: 6px;
  transition: all 0.15s;
}

.showcase__tab:hover { color: var(--text-2); background: var(--bg-surface); }

.showcase__tab--active {
  color: var(--accent);
  background: var(--accent-sub);
}


/* ── Architecture ──────────────────────────────────────────── */
.arch__header { margin-bottom: 2rem; }

.arch__title {
  font-family: var(--font-display);
  font-size: 1.4rem;
  font-weight: 700;
  line-height: 1.15;
  color: var(--text-1);
  margin-top: 0.75rem;
}

.arch__grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 3.5rem;
  align-items: start;
}

.arch__diagram-wrap {
  padding: 1.75rem;
  background: var(--bg-surface);
  border: 1px solid var(--rule);
  border-radius: 12px;
  overflow-x: auto;
}

.arch__diagram {
  font-family: var(--mono);
  font-size: 11px;
  line-height: 1.9;
  color: var(--text-2);
  white-space: pre;
}

.arch__diagram .hl  { color: var(--text-1); }
.arch__diagram .hl2 { color: var(--accent); opacity: 0.75; }
.arch__diagram .dim { color: var(--text-3); }

.arch__points {
  display: flex;
  flex-direction: column;
  gap: 2.25rem;
}

.arch__point {
  padding-left: 1.25rem;
  border-left: 2px solid var(--rule);
  transition: border-color 0.3s;
}

.arch__point:hover { border-left-color: var(--accent); }

.arch__point-num {
  font-family: var(--mono);
  font-size: 11px;
  color: var(--accent);
  margin-bottom: 0.3rem;
  opacity: 0.6;
}

.arch__point-title {
  font-family: var(--font-display);
  font-size: 1rem;
  font-weight: 600;
  color: var(--text-1);
  margin-bottom: 0.4rem;
}

.arch__point-text {
  font-size: .85rem;
  line-height: 1.65;
  color: var(--text-2);
}


/* ── Diary / Memory ────────────────────────────────────────── */
.diary__header { margin-bottom: 2rem; }

.diary__title {
  font-family: var(--font-display);
  font-size: 1.4rem;
  font-weight: 700;
  line-height: 1.15;
  color: var(--text-1);
  margin-top: 0.75rem;
}

.diary__grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1.5rem;
}

.diary__card {
  background: var(--bg-surface);
  border: 1px solid var(--rule);
  border-radius: 12px;
  overflow: hidden;
  transition: border-color 0.3s;
}

.diary__card:hover { border-color: var(--rule-strong); }

.diary__card-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0.6rem 1rem;
  border-bottom: 1px solid var(--rule);
  background: var(--bg-raised);
}

.diary__card-title {
  font-family: var(--mono);
  font-size: 11px;
  font-weight: 500;
  color: var(--accent);
  text-transform: uppercase;
  letter-spacing: 0.06em;
  opacity: 0.75;
}

.diary__card-date {
  font-family: var(--mono);
  font-size: 10px;
  color: var(--text-3);
}

.diary__card-body {
  padding: 1.25rem;
}

.diary__entry {
  padding: 0.75rem 0;
  border-bottom: 1px solid var(--rule);
  font-size: 13px;
  line-height: 1.6;
  color: var(--text-2);
}

.diary__entry:last-child { border-bottom: none; padding-bottom: 0; }
.diary__entry:first-child { padding-top: 0; }

.diary__time {
  font-family: var(--mono);
  font-size: 11px;
  color: var(--accent);
  margin-bottom: 0.2rem;
  opacity: 0.55;
}

.diary__prose {
  padding: 1.25rem;
  font-size: .9rem;
  line-height: 1.7;
  color: var(--text-2);
}

.diary__prose p { margin-bottom: 0.9rem; }
.diary__prose p:last-child { margin-bottom: 0; }
.diary__prose strong { color: var(--text-1); font-weight: 600; }


/* ── Install ───────────────────────────────────────────────── */
.install {
  padding: 3.5rem 0;
  position: relative;
}

.install__glow {
  position: absolute;
  width: 500px;
  height: 500px;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  background: radial-gradient(circle, var(--accent-glow) 0%, transparent 70%);
  filter: blur(80px);
  opacity: 0.25;
  pointer-events: none;
}

.install__inner {
  position: relative;
  max-width: 560px;
  margin: 0 auto;
  text-align: center;
}

.install__title {
  font-family: var(--font-display);
  font-size: 1.4rem;
  font-weight: 700;
  line-height: 1.15;
  color: var(--text-1);
  margin: 0.75rem 0 0.75rem;
}

.install__sub {
  font-size: .95rem;
  color: var(--text-2);
  line-height: 1.65;
  margin-bottom: 2.25rem;
}

.install__cmd {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  padding: 0.85rem 0.85rem 0.85rem 1.25rem;
  background: var(--bg-surface);
  border: 1px solid var(--rule-strong);
  border-radius: 10px;
  font-family: var(--mono);
  font-size: 13px;
  color: var(--text-1);
  margin-bottom: 2rem;
  text-align: left;
  transition: border-color 0.3s, box-shadow 0.3s;
}

.install__cmd:hover {
  border-color: rgba(139, 120, 255, 0.2);
  box-shadow: 0 0 32px var(--accent-sub);
}

.install__cmd-dollar {
  color: var(--accent);
  user-select: none;
}

.install__cmd code {
  flex: 1;
  user-select: all;
}

.install__cmd-copy {
  width: 34px;
  height: 34px;
  border-radius: 7px;
  display: grid;
  place-items: center;
  color: var(--text-3);
  border: 1px solid var(--rule);
  transition: all 0.15s;
  flex-shrink: 0;
}

.install__cmd-copy:hover {
  color: var(--accent);
  border-color: rgba(139, 120, 255, 0.25);
  background: var(--accent-sub);
}

.install__cmd-copy svg { width: 14px; height: 14px; }

.install__links {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 1.75rem;
  margin-bottom: 1.75rem;
}

.install__link {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  font-size: 13px;
  font-weight: 500;
  color: var(--text-3);
  transition: color 0.15s;
}

.install__link:hover { color: var(--accent); }
.install__link svg { width: 16px; height: 16px; }

.install__req {
  font-family: var(--mono);
  font-size: 11px;
  color: var(--text-3);
}


/* ── Footer ────────────────────────────────────────────────── */
.footer {
  padding: 2.5rem 0 1.5rem;
  border-top: 1px solid var(--rule);
}

.footer__inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.footer__left {
  display: flex;
  align-items: center;
  gap: 0.6rem;
}

.footer__mark {
  width: 22px;
  height: 22px;
  border-radius: 5px;
  background: linear-gradient(135deg, var(--accent), #6b5cd4);
  display: grid;
  place-items: center;
  font-weight: 700;
  font-size: 10px;
  color: #fff;
}

.footer__copy {
  font-size: 12px;
  color: var(--text-3);
}

.footer__links {
  display: flex;
  gap: 1.5rem;
}

.footer__links a {
  font-size: 12px;
  color: var(--text-3);
}

.footer__links a:hover { color: var(--text-2); }

.footer__bottom {
  text-align: center;
  margin-top: 1.5rem;
  padding-top: 1rem;
  border-top: 1px solid var(--rule);
  font-size: 11px;
  color: var(--text-3);
  opacity: 0.5;
}


/* ── Scroll Reveal ─────────────────────────────────────────── */
.reveal {
  opacity: 0;
  transform: translateY(20px);
  transition: opacity 0.7s var(--ease), transform 0.7s var(--ease);
}

.reveal--visible {
  opacity: 1;
  transform: translateY(0);
}

.reveal--d1 { transition-delay: 80ms; }
.reveal--d2 { transition-delay: 160ms; }
.reveal--d3 { transition-delay: 240ms; }
.reveal--d4 { transition-delay: 320ms; }
.reveal--d5 { transition-delay: 400ms; }
.reveal--d6 { transition-delay: 480ms; }


/* ── Toast ─────────────────────────────────────────────────── */
.toast {
  position: fixed;
  bottom: 2rem;
  left: 50%;
  transform: translateX(-50%) translateY(12px);
  padding: 0.5rem 1.25rem;
  background: var(--accent);
  color: #fff;
  font-family: var(--mono);
  font-size: 12px;
  font-weight: 500;
  border-radius: 8px;
  pointer-events: none;
  opacity: 0;
  transition: all 0.3s var(--ease);
  z-index: 200;
}

.toast--show {
  opacity: 1;
  transform: translateX(-50%) translateY(0);
}


/* ── Responsive ────────────────────────────────────────────── */
@media (max-width: 960px) {

  .capabilities__list { grid-template-columns: 1fr; }

  .arch__grid { grid-template-columns: 1fr; gap: 2rem; }
  .diary__grid { grid-template-columns: 1fr; }
}

@media (max-width: 640px) {
  .wrap { padding: 0 1.25rem; }
  section { padding: 3.5rem 0; }

  .nav__links { display: none; }
  .nav__mobile-toggle { display: flex; }

  .hero { padding: 7rem 0 3.5rem; }
  .hero__title { font-size: 2.25rem; }

  .hero__cmd {
    flex-wrap: wrap;
    font-size: 12px;
    gap: 0.4rem;
    padding: 0.6rem;
  }

  .hero__meta { flex-wrap: wrap; gap: 0.75rem; }

  .cap { padding: 1.5rem; }

  .install__links { flex-direction: column; gap: 0.75rem; }
  .install__cmd { font-size: 12px; }

  .footer__inner { flex-direction: column; gap: 1rem; text-align: center; }
}
