/* ============================================================
   Satoshi Pendant — landing page
   Theme palettes are ported verbatim from the app (src/App.css):
   neo / wood / garden CSS variable blocks.
   ============================================================ */

* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

/* ---- themes (exact values from the app) ---- */
html[data-theme="neo"] {
  --bg1: #0f0f1a;
  --bg2: #0a0a0f;
  --panel: #1a1a2e;
  --border: #2a2a4a;
  --text: #c8c8e8;
  /* lightened from the app's #4a4a6a for readability on large text blocks */
  --muted: #8484ac;
  --accent: #00f5d4;
  --accent2: #ff2d78;
  --good: #39ff14;
  --warn: #ffb700;
}

html[data-theme="wood"] {
  /* Kyoto wood: warm paper + charcoal, vermilion accent, no scanlines. */
  --bg1: #2b2118;
  --bg2: #201812;
  --panel: #382c1f;
  --border: #54432f;
  --text: #ede0d4;
  --muted: #9c8b73;
  --accent: #e07a5f;
  --accent2: #bc4749;
  --good: #a3b18a;
  --warn: #e9c46a;
}

html[data-theme="garden"] {
  /* Rose garden: dusk mauve, rose accent, vines on the perimeter. */
  --bg1: #241a20;
  --bg2: #1a1216;
  --panel: #332430;
  --border: #523a48;
  --text: #f3e4ea;
  --muted: #a07f92;
  --accent: #ff8fab;
  --accent2: #c9184a;
  --good: #95d5b2;
  --warn: #ffd60a;
}

html {
  scroll-behavior: smooth;
}

body {
  font-family: "SF Mono", ui-monospace, "JetBrains Mono", Menlo, monospace;
  background: linear-gradient(160deg, var(--bg1) 0%, var(--bg2) 100%);
  background-attachment: fixed;
  color: var(--text);
  min-height: 100vh;
  transition: background 0.45s ease, color 0.45s ease;
}

/* smooth theme crossfade on everything that shows theme colors */
.nav, .card, .pendant, .panel, .feed, .btn, .section, .footer,
.swatch, h1, h2, h3, p, .kicker, .logo, .honest, .accent-line {
  transition: background-color 0.45s ease, color 0.45s ease,
    border-color 0.45s ease, box-shadow 0.45s ease;
}

/* ---- per-theme background texture (mirrors the app's .scanlines) ---- */
body::before {
  content: "";
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 1;
}

html[data-theme="neo"] body::before {
  background: repeating-linear-gradient(
    0deg,
    transparent,
    transparent 2px,
    rgba(0, 0, 0, 0.15) 2px,
    rgba(0, 0, 0, 0.15) 4px
  );
}

html[data-theme="wood"] body::before {
  /* paper grain instead of CRT scanlines */
  background: repeating-linear-gradient(
    90deg,
    transparent,
    transparent 26px,
    rgba(0, 0, 0, 0.08) 26px,
    rgba(0, 0, 0, 0.08) 27px
  );
}

html[data-theme="garden"] body::before {
  background: none;
}

body > * {
  position: relative;
  z-index: 2;
}

::selection {
  background: var(--accent);
  color: var(--bg2);
}

/* ============ navbar ============ */
.nav {
  position: sticky;
  top: 0;
  z-index: 10;
  background: color-mix(in srgb, var(--bg2) 82%, transparent);
  backdrop-filter: blur(8px);
  border-bottom: 1px solid var(--border);
}

.nav-inner {
  max-width: 1060px;
  margin: 0 auto;
  padding: 12px 24px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}

.logo {
  font-size: 13px;
  letter-spacing: 0.3em;
  color: var(--accent);
  text-shadow: 0 0 12px color-mix(in srgb, var(--accent) 50%, transparent);
}

.theme-row {
  display: flex;
  gap: 8px;
}

.swatch {
  width: 40px;
  height: 40px;
  padding: 0;
  border-radius: 9px;
  border: 1px solid var(--border);
  background: var(--panel);
  cursor: pointer;
  display: grid;
  place-items: center;
  overflow: hidden;
}

.swatch canvas {
  display: block;
  border-radius: 8px;
  image-rendering: pixelated;
}

.swatch:hover {
  border-color: var(--muted);
}

.swatch.active {
  border-color: var(--accent);
  box-shadow:
    0 0 0 2px color-mix(in srgb, var(--accent) 45%, transparent),
    0 0 14px color-mix(in srgb, var(--accent) 35%, transparent);
}

/* ============ layout ============ */
.hero,
.section {
  max-width: 1060px;
  margin: 0 auto;
  padding: 64px 24px;
}

/* ============ hero ============ */
.hero {
  display: flex;
  align-items: center;
  gap: 56px;
  padding-top: 84px;
  flex-wrap: wrap;
}

.hero-copy {
  flex: 1 1 420px;
}

.kicker {
  font-size: 11px;
  letter-spacing: 0.25em;
  text-transform: uppercase;
  color: var(--muted);
  margin-bottom: 16px;
}

h1 {
  font-size: clamp(28px, 4.4vw, 44px);
  line-height: 1.2;
  letter-spacing: 0.02em;
  margin-bottom: 18px;
}

.accent {
  color: var(--accent);
  text-shadow: 0 0 18px color-mix(in srgb, var(--accent) 45%, transparent);
}

.sub {
  font-size: 15px;
  line-height: 1.7;
  color: var(--muted);
  max-width: 52ch;
  margin-bottom: 28px;
}

.hero-btns,
.dl-btns {
  display: flex;
  gap: 14px;
  flex-wrap: wrap;
}

/* ---- buttons (ported from the app's .primary) ---- */
.btn {
  font: inherit;
  font-size: 12px;
  letter-spacing: 0.18em;
  text-decoration: none;
  text-transform: uppercase;
  padding: 12px 22px;
  background: color-mix(in srgb, var(--accent) 10%, transparent);
  color: var(--accent);
  border: 1px solid var(--accent);
  border-radius: 8px;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 8px;
}

.btn:hover {
  background: color-mix(in srgb, var(--accent) 22%, transparent);
  box-shadow: 0 0 16px color-mix(in srgb, var(--accent) 32%, transparent);
}

.btn-big {
  font-size: 13px;
  padding: 14px 26px;
}

.btn-ghost {
  background: transparent;
  color: var(--muted);
  border-color: var(--border);
  text-transform: none;
  letter-spacing: 0.08em;
}

.btn-ghost:hover {
  color: var(--accent);
  border-color: var(--accent);
  background: color-mix(in srgb, var(--accent) 6%, transparent);
  box-shadow: none;
}

.ext {
  font-size: 10px;
  color: var(--muted);
  letter-spacing: 0.05em;
}

/* ============ pendant widget mock ============ */
.pendant {
  flex: 0 0 300px;
  margin: 0 auto;
  width: 300px;
  display: flex;
  flex-direction: column;
  gap: 10px;
  padding: 14px 16px 16px;
  position: relative;
  background: linear-gradient(160deg, var(--bg1) 0%, var(--bg2) 100%);
  border: 1px solid var(--border);
  border-radius: 14px;
  box-shadow:
    inset 0 0 30px color-mix(in srgb, var(--accent) 4%, transparent),
    0 18px 50px rgba(0, 0, 0, 0.45);
}

.accent-line {
  position: absolute;
  top: 0;
  left: 20%;
  right: 20%;
  height: 2px;
  background: linear-gradient(90deg, transparent, var(--accent), transparent);
}

/* wood theme gets the app's carved wooden frame */
.pendant-frame {
  position: absolute;
  inset: 0;
  pointer-events: none;
  border-radius: 14px;
  opacity: 0;
  transition: opacity 0.45s ease;
}

html[data-theme="wood"] .pendant-frame {
  opacity: 1;
  border: 6px solid #7f5539;
  box-shadow:
    inset 0 0 0 1px #3d2b1f,
    inset 0 0 0 2px #9c6644;
}

html[data-theme="wood"] .pendant-frame::before {
  content: "";
  position: absolute;
  inset: -6px;
  border-radius: 14px;
  background:
    radial-gradient(circle at 9px 9px, #3d2b1f 2px, transparent 2.5px),
    radial-gradient(circle at calc(100% - 9px) 9px, #3d2b1f 2px, transparent 2.5px),
    radial-gradient(circle at 9px calc(100% - 9px), #3d2b1f 2px, transparent 2.5px),
    radial-gradient(circle at calc(100% - 9px) calc(100% - 9px), #3d2b1f 2px, transparent 2.5px);
}

/* garden theme gets the dashed vine perimeter */
html[data-theme="garden"] .pendant-frame {
  opacity: 1;
  inset: 4px;
  border: 1px dashed color-mix(in srgb, #6a994e 55%, transparent);
  border-radius: 11px;
}

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

.led {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 9px;
  letter-spacing: 0.25em;
  color: var(--good);
}

.dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--good);
  box-shadow: 0 0 6px var(--good);
  animation: blink 1.2s infinite;
}

.pendant-x {
  font-size: 10px;
  color: var(--muted);
  letter-spacing: 0.2em;
}

.stage {
  position: relative;
  height: 130px;
  display: flex;
  align-items: flex-end;
  justify-content: center;
  gap: 2px;
}

.stage canvas {
  image-rendering: pixelated;
}

.spr-char {
  animation: bob 0.9s steps(2, end) infinite;
}

.spr-pick {
  position: absolute;
  left: 50%;
  bottom: 46px;
  margin-left: 22px;
  transform-origin: 50% 85%;
  animation: swing 0.9s ease-in infinite;
}

.spr-ore {
  margin-left: 10px;
}

.spr-spark {
  position: absolute;
  right: 34px;
  bottom: 40px;
  opacity: 0;
  animation: spark 0.9s linear infinite;
}

/* stats panel + feed, ported look from the app */
.panel {
  background: var(--panel);
  border: 1px solid var(--border);
  border-radius: 7px;
  padding: 8px 10px;
}

.panel-row {
  display: flex;
  justify-content: space-between;
  margin-bottom: 5px;
}

.panel-label {
  font-size: 8px;
  letter-spacing: 0.2em;
  color: var(--muted);
}

.panel-value {
  font-size: 10px;
  color: var(--accent);
}

.bar {
  height: 3px;
  background: var(--border);
  border-radius: 2px;
  overflow: hidden;
}

.bar-fill {
  height: 100%;
  width: 62%;
  background: linear-gradient(90deg, var(--accent), var(--accent2));
  border-radius: 2px;
  animation: fill-wobble 3.2s ease-in-out infinite;
}

.feed {
  background: var(--bg1);
  border: 1px solid var(--border);
  border-radius: 6px;
  padding: 7px 10px;
  display: flex;
  flex-direction: column;
  gap: 3px;
}

.feed-label {
  font-size: 7px;
  letter-spacing: 0.2em;
  color: var(--muted);
}

.feed-line {
  font-size: 9px;
  color: color-mix(in srgb, var(--accent) 65%, var(--muted));
  letter-spacing: 0.04em;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

/* ============ sections ============ */
.section h2 {
  font-size: 20px;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--accent);
  margin-bottom: 28px;
  text-shadow: 0 0 14px color-mix(in srgb, var(--accent) 35%, transparent);
}

.steps {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 16px;
}

.card {
  background: var(--panel);
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 20px;
}

html[data-theme="garden"] .card {
  border-style: dashed;
  border-color: color-mix(in srgb, #6a994e 55%, var(--border));
}

.step-num {
  font-size: 11px;
  color: var(--accent2);
  letter-spacing: 0.2em;
}

.card h3 {
  font-size: 14px;
  margin: 10px 0 10px;
  letter-spacing: 0.06em;
}

.card p {
  font-size: 12px;
  line-height: 1.7;
  color: var(--muted);
}

/* ---- honest section ---- */
.honest {
  max-width: 760px;
}

.honest p {
  font-size: 14px;
  line-height: 1.8;
  color: var(--text);
  margin-bottom: 18px;
}

.big-honest {
  font-size: 19px !important;
  color: var(--warn) !important;
}

.honest strong {
  color: var(--warn);
}

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

.muted-note {
  color: var(--muted) !important;
  font-size: 12.5px !important;
}

/* ---- open source ---- */
.opensource {
  max-width: 760px;
}

.opensource p {
  font-size: 14px;
  line-height: 1.8;
  color: var(--muted);
  margin-bottom: 22px;
}

/* ---- download ---- */
.download {
  text-align: center;
  padding-bottom: 80px;
}

.download p {
  color: var(--muted);
  font-size: 13px;
  margin-bottom: 26px;
}

.download .dl-btns {
  justify-content: center;
}

/* ---- thanks page ---- */
.thanks {
  max-width: 680px;
  min-height: calc(100vh - 180px);
  padding-top: 90px;
}

.thanks p {
  font-size: 14px;
  line-height: 1.8;
  margin-bottom: 18px;
}

.thanks-title {
  font-size: clamp(28px, 4vw, 40px);
  margin-bottom: 14px;
}

.thanks-sub {
  color: var(--muted);
}

.install {
  margin: 34px 0;
}

.install h3 {
  font-size: 12px;
  letter-spacing: 0.25em;
  text-transform: uppercase;
  color: var(--accent);
  margin-bottom: 14px;
}

.install ol {
  padding-left: 22px;
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.install li {
  font-size: 13px;
  line-height: 1.8;
}

.install code {
  font: inherit;
  font-size: 12px;
  background: var(--panel);
  border: 1px solid var(--border);
  border-radius: 5px;
  padding: 1px 7px;
  white-space: nowrap;
}

.install strong {
  color: var(--warn);
}

.thanks-rule {
  border: none;
  border-top: 1px solid var(--border);
  margin: 30px 0;
}

.inline-link {
  color: var(--accent);
}

/* ---- footer ---- */
.footer {
  text-align: center;
  padding: 26px 24px 34px;
  border-top: 1px solid var(--border);
  font-size: 10px;
  letter-spacing: 0.15em;
  color: var(--muted);
}

/* ============ animations (from the app) ============ */
@keyframes bob {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-3px); }
}

@keyframes swing {
  0%, 38% { transform: rotate(-72deg); }
  55%, 68% { transform: rotate(78deg); }
  100% { transform: rotate(-72deg); }
}

@keyframes spark {
  0%, 53% { opacity: 0; }
  57%, 70% { opacity: 1; }
  76%, 100% { opacity: 0; }
}

@keyframes blink {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.2; }
}

@keyframes fill-wobble {
  0%, 100% { width: 58%; }
  50% { width: 67%; }
}

/* ============ small screens ============ */
@media (max-width: 720px) {
  .hero {
    padding-top: 48px;
    gap: 40px;
  }

  .logo {
    font-size: 11px;
    letter-spacing: 0.2em;
  }

  .swatch {
    width: 34px;
    height: 34px;
  }
}
