/* Mytharyn site. Colours are tokens so a light theme is one block below. */
:root {
  --bg: #0f1420;
  --bg-alt: #151c2c;
  --surface: #1c2538;
  --border: #2c3852;
  --text: #e8ecf4;
  --muted: #9aa6bf;
  --accent: #6cd66c;
  --accent-ink: #0c1a0c;
  --accent-2: #f4c542;
  --shadow: 0 4px 0 #0008;
  --radius: 6px;
  --pixel: 'Press Start 2P', ui-monospace, monospace;
  --sans: 'Inter', system-ui, -apple-system, 'Segoe UI', sans-serif;
  color-scheme: dark;
}

@media (prefers-color-scheme: light) {
  :root {
    --bg: #f6f3ea;
    --bg-alt: #ece6d6;
    --surface: #ffffff;
    --border: #d6cdb6;
    --text: #1d2233;
    --muted: #5b6275;
    --accent: #2f9e44;
    --accent-ink: #ffffff;
    --accent-2: #b7791f;
    --shadow: 0 4px 0 #0002;
    color-scheme: light;
  }
}

*, *::before, *::after { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font: 16px/1.6 var(--sans);
  -webkit-font-smoothing: antialiased;
}

img { max-width: 100%; }

a { color: var(--accent); }

.container {
  width: 100%;
  max-width: 1120px;
  margin: 0 auto;
  padding: 0 16px;
}

h1, h2, h3 {
  font-family: var(--pixel);
  font-weight: 400;
  line-height: 1.35;
  margin: 0 0 16px;
}

h1 { font-size: clamp(28px, 6vw, 52px); color: var(--accent); text-shadow: 3px 3px 0 #0006; }
h2 { font-size: clamp(18px, 3.2vw, 26px); }
h3 { font-size: 13px; }

/* Header */
.site-header {
  position: sticky;
  top: 0;
  z-index: 10;
  background: color-mix(in srgb, var(--bg) 88%, transparent);
  backdrop-filter: blur(8px);
  border-bottom: 1px solid var(--border);
}

.header-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  min-height: 60px;
  flex-wrap: wrap;
}

.wordmark {
  display: flex;
  align-items: center;
  gap: 10px;
  color: var(--text);
  text-decoration: none;
  font-family: var(--pixel);
  font-size: 14px;
}

.wordmark img { image-rendering: pixelated; }

.site-nav { display: flex; gap: 20px; flex-wrap: wrap; }

.site-nav a {
  color: var(--muted);
  text-decoration: none;
  font-weight: 600;
  font-size: 15px;
}

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

/* Buttons */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 12px 20px;
  border-radius: var(--radius);
  border: 2px solid transparent;
  font-weight: 700;
  font-size: 15px;
  text-decoration: none;
  transition: transform .08s ease, box-shadow .08s ease;
}

.btn:active { transform: translateY(2px); }

.btn-primary {
  background: var(--accent);
  color: var(--accent-ink);
  box-shadow: var(--shadow);
}

.btn-primary:hover { filter: brightness(1.08); }

.btn-ghost {
  color: var(--text);
  border-color: var(--border);
  background: var(--surface);
}

.btn-ghost:hover { border-color: var(--accent); }

.btn[aria-disabled="true"] {
  background: var(--surface);
  color: var(--muted);
  border-color: var(--border);
  box-shadow: none;
  cursor: not-allowed;
}

.actions { display: flex; gap: 12px; flex-wrap: wrap; margin: 24px 0 12px; }

/* Hero */
.hero {
  padding: 72px 0 64px;
  background:
    linear-gradient(180deg, transparent 60%, var(--bg) 100%),
    repeating-linear-gradient(0deg, transparent 0 31px, color-mix(in srgb, var(--border) 45%, transparent) 31px 32px),
    repeating-linear-gradient(90deg, transparent 0 31px, color-mix(in srgb, var(--border) 45%, transparent) 31px 32px);
}

.hero-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 40px;
  align-items: center;
}

@media (min-width: 900px) {
  .hero-grid { grid-template-columns: 1fr 1.1fr; }
}

.eyebrow {
  margin: 0 0 12px;
  color: var(--accent-2);
  font-weight: 700;
  font-size: 13px;
  letter-spacing: .08em;
  text-transform: uppercase;
}

.lead { font-size: 19px; color: var(--muted); max-width: 34em; margin: 0; }

.hero-meta { color: var(--muted); font-size: 14px; margin: 0; }

/* Screenshot frames: show the image, or a placeholder when it's missing. */
.shot {
  margin: 0;
  position: relative;
  aspect-ratio: 16 / 10;
  border: 3px solid var(--border);
  border-radius: var(--radius);
  background: var(--surface);
  overflow: hidden;
  box-shadow: var(--shadow);
}

.shot img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
  image-rendering: pixelated;
}

.shot figcaption {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  padding: 8px 12px;
  font-size: 13px;
  font-weight: 600;
  color: #fff;
  background: linear-gradient(transparent, #000a);
}

.shot.missing img { display: none; }

.shot.missing {
  background:
    repeating-conic-gradient(color-mix(in srgb, var(--accent) 12%, var(--surface)) 0 25%, var(--surface) 0 50%) 0 0 / 32px 32px;
}

.shot.missing::before {
  content: 'Screenshot coming soon';
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  font-family: var(--pixel);
  font-size: 11px;
  color: var(--muted);
}

.shot-hero.missing figcaption { display: none; }

/* Sections */
.section { padding: 72px 0; }

.section-alt { background: var(--bg-alt); }

.section-lead { color: var(--muted); font-size: 17px; max-width: 40em; margin: 0 0 32px; }

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

.feature {
  background: var(--surface);
  border: 2px solid var(--border);
  border-radius: var(--radius);
  padding: 20px;
}

.feature h3 { color: var(--accent-2); }

.feature p { margin: 0; color: var(--muted); }

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

.create-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 40px;
  align-items: center;
}

@media (min-width: 900px) {
  .create-grid { grid-template-columns: 1.1fr 1fr; }
}

.checklist { list-style: none; padding: 0; margin: 0; display: grid; gap: 10px; }

.checklist li { padding-left: 28px; position: relative; color: var(--muted); }

.checklist li strong { color: var(--text); }

.checklist li::before {
  content: '';
  position: absolute;
  left: 4px;
  top: .5em;
  width: 10px;
  height: 10px;
  background: var(--accent);
  box-shadow: 2px 2px 0 #0006;
}

.code-card {
  margin: 0;
  padding: 20px;
  background: #0b0f18;
  color: #d6deeb;
  border: 3px solid var(--border);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  font: 13px/1.6 ui-monospace, 'SF Mono', Menlo, Consolas, monospace;
  overflow-x: auto;
  min-width: 0;
}

.code-card .k { color: #c792ea; }
.code-card .f { color: #82aaff; }
.code-card .s { color: #c3e88d; }
.code-card .c { color: #6b7a99; }

/* Downloads */
.download-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 16px;
}

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

.download-card {
  background: var(--surface);
  border: 2px solid var(--border);
  border-radius: var(--radius);
  padding: 24px;
}

.download-card p { color: var(--muted); margin: 0 0 20px; }

.download-buttons {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
  gap: 12px;
}

.dl { flex-direction: column; gap: 2px; padding: 14px 16px; }

.dl-os { font-size: 16px; }

.dl-meta { font-size: 12px; font-weight: 600; opacity: .8; }

.notice {
  background: color-mix(in srgb, var(--accent-2) 18%, var(--surface));
  border: 2px solid var(--accent-2);
  border-radius: var(--radius);
  padding: 12px 16px;
  margin: 0 0 24px;
}

.install-notes {
  margin-top: 24px;
  background: var(--surface);
  border: 2px solid var(--border);
  border-radius: var(--radius);
  padding: 16px 20px;
  color: var(--muted);
}

.install-notes summary { cursor: pointer; font-weight: 700; color: var(--text); }

.install-notes li { margin-bottom: 8px; }

.install-notes code { color: var(--text); }

/* Footer */
.site-footer { border-top: 1px solid var(--border); padding: 28px 0; color: var(--muted); }

.footer-row { display: flex; justify-content: space-between; gap: 16px; flex-wrap: wrap; }

.footer-row nav { display: flex; gap: 20px; }

.footer-row a { color: var(--muted); }

/* Account nav link */
.site-nav .nav-account {
  color: var(--text);
  border: 2px solid var(--border);
  border-radius: var(--radius);
  padding: 4px 12px;
  margin: -6px 0;
}

.site-nav .nav-account:hover { border-color: var(--accent); }

.site-nav .nav-account.signed-in::before { content: '● '; color: var(--accent); }

/* Sign-in / sign-up */
.auth-section { min-height: calc(100vh - 150px); }

.auth-container { display: flex; justify-content: center; }

.auth-card {
  width: 100%;
  max-width: 420px;
  background: var(--surface);
  border: 2px solid var(--border);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: 32px 24px;
  display: grid;
  gap: 18px;
}

.auth-title { font-size: 20px; color: var(--text); text-shadow: none; margin: 0; }

.auth-sub { margin: -6px 0 0; color: var(--muted); }

.field { display: grid; gap: 6px; }

.field span { font-weight: 600; font-size: 14px; }

.field small { color: var(--muted); font-size: 13px; }

.field input {
  width: 100%;
  padding: 11px 12px;
  font: inherit;
  color: var(--text);
  background: var(--bg);
  border: 2px solid var(--border);
  border-radius: var(--radius);
}

.field input:focus { outline: none; border-color: var(--accent); }

.btn-block { width: 100%; border: 0; cursor: pointer; font-family: inherit; }

.btn:disabled { opacity: .6; cursor: progress; }

button.btn { font-family: inherit; cursor: pointer; }

.form-error {
  margin: 0;
  padding: 12px 14px;
  border: 2px solid #e5484d;
  border-radius: var(--radius);
  background: color-mix(in srgb, #e5484d 14%, var(--surface));
}

.form-error ul { margin: 6px 0 0; padding-left: 20px; }

.auth-switch { margin: 0; text-align: center; color: var(--muted); }

/* Account page */
.account-head {
  display: flex;
  justify-content: space-between;
  align-items: flex-end;
  gap: 16px;
  flex-wrap: wrap;
  margin-bottom: 32px;
}

.account-name { font-size: clamp(22px, 4vw, 34px); margin: 0; overflow-wrap: anywhere; }

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

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

.panel {
  background: var(--surface);
  border: 2px solid var(--border);
  border-radius: var(--radius);
  padding: 24px;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 12px;
}

.panel p { margin: 0; }

.panel-title { font-size: 13px; color: var(--accent-2); margin: 0 0 4px; }

.panel-actions { margin-top: auto; }

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

.profile-list { margin: 0; display: grid; gap: 12px; width: 100%; }

.profile-list div { display: flex; justify-content: space-between; gap: 16px; flex-wrap: wrap; }

.profile-list dt { color: var(--muted); }

.profile-list dd { margin: 0; font-weight: 600; overflow-wrap: anywhere; }

.badge {
  display: inline-block;
  padding: 4px 10px;
  border-radius: var(--radius);
  background: var(--bg);
  border: 2px solid var(--border);
  font-family: var(--pixel);
  font-size: 11px;
}

