/* TaleTellers - site styles. No external fonts, images or scripts. */

:root {
  --ink: #0b0a12;
  --ink-2: #110f1c;
  --surface: #17142a;
  --surface-2: #1e1a35;
  --line: #2c2650;
  --text: #f1eadc;
  --muted: #b9b0c9;
  --amber: #f2b45a;
  --amber-2: #ffd58f;
  --ember: #e8743b;
  --teal: #6ad8c7;
  --violet: #8f7cf0;
  --radius: 14px;
  --max: 72rem;
  --gutter: clamp(1rem, 4vw, 2rem);
  --serif: "Iowan Old Style", "Palatino Linotype", Palatino, "Book Antiqua", "URW Palladio L", Georgia, serif;
  --sans: system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  --mono: ui-monospace, "Cascadia Mono", "Segoe UI Mono", Consolas, Menlo, monospace;
  color-scheme: dark;
}

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

html {
  scroll-behavior: smooth;
  scroll-padding-top: 5rem;
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
}

body {
  margin: 0;
  background:
    radial-gradient(60rem 40rem at 85% -10%, rgba(143, 124, 240, 0.16), transparent 60%),
    radial-gradient(50rem 30rem at -10% 30%, rgba(232, 116, 59, 0.08), transparent 60%),
    var(--ink);
  color: var(--text);
  font-family: var(--sans);
  font-size: 1.0625rem;
  line-height: 1.65;
  overflow-wrap: anywhere;
}

img, svg { display: block; max-width: 100%; }

a { color: var(--amber-2); text-underline-offset: 0.2em; text-decoration-thickness: 1px; }
a:hover { color: #fff; }

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

.skip-link {
  position: absolute;
  left: 1rem;
  top: -4rem;
  z-index: 100;
  padding: 0.6rem 1rem;
  background: var(--amber);
  color: var(--ink);
  font-weight: 700;
  border-radius: 8px;
  text-decoration: none;
}
.skip-link:focus { top: 1rem; color: var(--ink); }

.visually-hidden {
  position: absolute !important;
  width: 1px; height: 1px;
  padding: 0; margin: -1px;
  overflow: hidden; clip: rect(0 0 0 0);
  white-space: nowrap; border: 0;
}

.wrap {
  width: 100%;
  max-width: var(--max);
  margin-inline: auto;
  padding-inline: var(--gutter);
}

/* TODO placeholders: deliberately loud so nothing ships by accident. */
.todo {
  display: inline-block;
  padding: 0 0.4em;
  border: 1px dashed var(--amber);
  border-radius: 4px;
  color: var(--amber-2);
  background: rgba(242, 180, 90, 0.08);
  font-family: var(--mono);
  font-size: 0.85em;
  line-height: 1.6;
}

/* ---------- Header ---------- */
.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: rgba(11, 10, 18, 0.82);
  -webkit-backdrop-filter: blur(10px);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid rgba(44, 38, 80, 0.7);
}
.site-header .wrap {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
  min-height: 3.75rem;
  padding-block: 0.5rem;
}
.brand {
  display: inline-flex;
  align-items: center;
  gap: 0.55rem;
  color: var(--text);
  text-decoration: none;
  font-family: var(--serif);
  font-weight: 700;
  font-size: 1.2rem;
  letter-spacing: 0.01em;
  white-space: nowrap;
}
.brand svg { width: 1.75rem; height: 1.75rem; flex: none; }
.brand:hover { color: var(--amber-2); }

.site-nav { max-width: 100%; }
.site-nav ul {
  display: flex;
  flex-wrap: wrap;
  gap: 0.15rem;
  margin: 0;
  padding: 0;
  list-style: none;
}
.site-nav a {
  display: block;
  min-height: 2.75rem;
  padding: 0.45rem 0.6rem;
  border-radius: 8px;
  color: var(--muted);
  text-decoration: none;
  font-size: 0.95rem;
  font-weight: 600;
}
.site-nav a:hover { color: var(--text); background: var(--surface); }

@media (max-width: 400px) {
  .brand { font-size: 1.05rem; gap: 0.4rem; }
  .brand svg { width: 1.5rem; height: 1.5rem; }
  .site-nav a { padding: 0.4rem 0.45rem; font-size: 0.875rem; }
}

/* A wrapped mobile header must not cover anchor targets or keyboard focus. */
@media (max-width: 899px) {
  html { scroll-padding-top: 1rem; }
  .site-header { position: static; }
}

/* ---------- Hero ---------- */
.hero {
  position: relative;
  padding-block: clamp(2.5rem, 7vw, 5.5rem) clamp(2.5rem, 6vw, 4.5rem);
  overflow: hidden;
}
.hero::before {
  /* pixel starfield */
  content: "";
  position: absolute;
  inset: 0;
  z-index: -1;
  background-image:
    radial-gradient(1.5px 1.5px at 12% 18%, rgba(255, 255, 255, 0.7), transparent 60%),
    radial-gradient(1.5px 1.5px at 28% 8%, rgba(255, 255, 255, 0.5), transparent 60%),
    radial-gradient(1px 1px at 46% 26%, rgba(255, 255, 255, 0.6), transparent 60%),
    radial-gradient(1.5px 1.5px at 64% 12%, rgba(255, 213, 143, 0.7), transparent 60%),
    radial-gradient(1px 1px at 78% 30%, rgba(255, 255, 255, 0.5), transparent 60%),
    radial-gradient(1.5px 1.5px at 92% 6%, rgba(255, 255, 255, 0.6), transparent 60%),
    radial-gradient(1px 1px at 8% 52%, rgba(255, 255, 255, 0.4), transparent 60%),
    radial-gradient(1px 1px at 38% 60%, rgba(255, 255, 255, 0.35), transparent 60%);
}
.hero .wrap {
  display: grid;
  gap: clamp(2rem, 5vw, 3rem);
  align-items: center;
}
@media (min-width: 900px) {
  .hero .wrap { grid-template-columns: 1.05fr 1fr; }
}

.eyebrow {
  margin: 0 0 1rem;
  color: var(--teal);
  font-family: var(--mono);
  font-size: 0.8rem;
  font-weight: 600;
  letter-spacing: 0.14em;
  text-transform: uppercase;
}

@media (max-width: 400px) {
  .eyebrow { letter-spacing: 0.08em; font-size: 0.75rem; }
}

.hero h1 {
  margin: 0;
  font-family: var(--serif);
  font-weight: 700;
  font-size: clamp(2.35rem, 8.5vw, 4.4rem);
  line-height: 1.04;
  letter-spacing: -0.015em;
  text-wrap: balance;
}
.hero h1 em {
  font-style: italic;
  color: var(--amber);
  background: linear-gradient(100deg, var(--amber-2), var(--amber) 45%, var(--ember));
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
}
.lead {
  margin: 1.25rem 0 0;
  max-width: 34rem;
  color: var(--muted);
  font-size: clamp(1.05rem, 2.6vw, 1.2rem);
}

.actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
  margin-top: 2rem;
}
.btn {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  min-height: 3rem;
  padding: 0.7rem 1.3rem;
  border-radius: 10px;
  font-weight: 700;
  text-decoration: none;
  transition: transform 0.15s ease, background-color 0.15s ease, color 0.15s ease;
}
.btn-primary {
  background: var(--amber);
  color: #1a1206;
  box-shadow: 0 0 0 1px rgba(255, 213, 143, 0.4) inset, 0 10px 30px -10px rgba(242, 180, 90, 0.6);
}
.btn-primary:hover { background: var(--amber-2); color: #1a1206; transform: translateY(-2px); }
.btn-ghost {
  color: var(--text);
  border: 1px solid var(--line);
  background: rgba(23, 20, 42, 0.6);
}
.btn-ghost:hover { color: #fff; border-color: var(--violet); transform: translateY(-2px); }

.stats {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 0.5rem;
  margin: 2.5rem 0 0;
  padding: 0;
  max-width: 34rem;
}
.stats div {
  padding: 0.75rem 0.5rem 0.7rem 0.85rem;
  border-left: 2px solid var(--line);
}
.stats dt {
  color: var(--muted);
  font-size: 0.78rem;
  line-height: 1.3;
}
.stats dd {
  order: -1;
  margin: 0 0 0.2rem;
  font-family: var(--serif);
  font-size: clamp(1.35rem, 5vw, 1.75rem);
  font-weight: 700;
  line-height: 1.1;
  color: var(--text);
}
.stats div { display: flex; flex-direction: column; }
.stats div:first-child { border-color: var(--amber); }

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

/* Hero art */
.hero-art {
  position: relative;
  max-width: 36rem;
  width: 100%;
  margin-inline: auto;
}
.hero-art::before {
  content: "";
  position: absolute;
  inset: 25% 5% 0;
  background: radial-gradient(closest-side, rgba(242, 180, 90, 0.35), transparent);
  filter: blur(20px);
  z-index: -1;
}
.hero-art svg { width: 100%; height: auto; overflow: visible; }

/* Static decorative artwork avoids continuous motion and animation paint work. */
.mote { opacity: 0; }

/* ---------- Sections ---------- */
.section {
  padding-block: clamp(3.5rem, 9vw, 6.5rem);
}
.section + .section { border-top: 1px solid rgba(44, 38, 80, 0.55); }

.chapter {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  margin: 0 0 0.75rem;
  color: var(--amber);
  font-family: var(--mono);
  font-size: 0.8rem;
  font-weight: 600;
  letter-spacing: 0.16em;
  text-transform: uppercase;
}
.chapter::after {
  content: "";
  flex: 1;
  max-width: 8rem;
  height: 1px;
  background: linear-gradient(90deg, var(--amber), transparent);
}
.section h2 {
  margin: 0;
  font-family: var(--serif);
  font-size: clamp(1.9rem, 6vw, 3rem);
  line-height: 1.1;
  letter-spacing: -0.01em;
  text-wrap: balance;
}
.section-intro {
  max-width: 40rem;
  margin: 1rem 0 0;
  color: var(--muted);
}

/* ---------- Projects ---------- */
.cards {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(min(100%, 19rem), 1fr));
  gap: 1.25rem;
  margin: 2.5rem 0 0;
  padding: 0;
  list-style: none;
}
.card {
  position: relative;
  display: flex;
  flex-direction: column;
  background: linear-gradient(180deg, var(--surface), var(--ink-2));
  border: 1px solid var(--line);
  border-radius: var(--radius);
  overflow: hidden;
  transition: transform 0.2s ease, border-color 0.2s ease, box-shadow 0.2s ease;
}
.card:hover, .card:focus-within {
  transform: translateY(-4px);
  border-color: rgba(242, 180, 90, 0.55);
  box-shadow: 0 20px 40px -24px rgba(242, 180, 90, 0.45);
}
.card-cover {
  position: relative;
  display: grid;
  place-items: center;
  height: 9.5rem;
  background:
    repeating-linear-gradient(0deg, rgba(255, 255, 255, 0.04) 0 1px, transparent 1px 16px),
    repeating-linear-gradient(90deg, rgba(255, 255, 255, 0.04) 0 1px, transparent 1px 16px),
    var(--cover, linear-gradient(135deg, #2a2347, #141024));
  border-bottom: 1px solid var(--line);
}
.card-cover svg {
  width: 5.5rem;
  height: 5.5rem;
  shape-rendering: crispEdges;
  filter: drop-shadow(0 6px 0 rgba(0, 0, 0, 0.35));
}
.cover-hyguns { --cover: radial-gradient(circle at 50% 60%, #7a2a1c, #2a1020 70%); }
.cover-stone { --cover: radial-gradient(circle at 50% 60%, #4d5466, #1b1d29 70%); }
.cover-wool { --cover: radial-gradient(circle at 50% 60%, #6b3a5e, #221530 70%); }
.cover-slabs { --cover: radial-gradient(circle at 50% 60%, #6a5332, #221a12 70%); }
.cover-logos { display: flex; justify-content: center; align-items: center; }
.cover-logos img {
  height: 8.75rem;
  width: auto;
  filter: drop-shadow(0 6px 0 rgba(0, 0, 0, 0.35));
}
.cover-server { --cover: radial-gradient(circle at 50% 60%, #34307a, #141236 70%); }
.cover-tools { --cover: radial-gradient(circle at 50% 60%, #1f5a58, #0f1f26 70%); }

.badge {
  position: absolute;
  top: 0.75rem;
  left: 0.75rem;
  padding: 0.15rem 0.55rem;
  border-radius: 999px;
  font-family: var(--mono);
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  background: rgba(11, 10, 18, 0.75);
  border: 1px solid rgba(255, 255, 255, 0.15);
  color: var(--text);
}
.badge-live { color: #b7f5e9; border-color: rgba(106, 216, 199, 0.5); }
.badge-soon { color: var(--amber-2); border-color: rgba(242, 180, 90, 0.5); }

.card-body {
  display: flex;
  flex-direction: column;
  flex: 1;
  padding: 1.25rem 1.25rem 1.4rem;
}
.card-meta {
  margin: 0 0 0.35rem;
  color: var(--teal);
  font-family: var(--mono);
  font-size: 0.75rem;
  font-weight: 600;
  letter-spacing: 0.1em;
  text-transform: uppercase;
}
.card h3 {
  margin: 0;
  font-family: var(--serif);
  font-size: 1.5rem;
  line-height: 1.2;
}
.card p.desc {
  margin: 0.6rem 0 0;
  color: var(--muted);
  font-size: 0.98rem;
}
.downloads {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem 1.25rem;
  margin: 1rem 0 0;
  padding: 0;
  list-style: none;
  font-size: 0.9rem;
  color: var(--muted);
}
.downloads strong {
  color: var(--text);
  font-family: var(--serif);
  font-size: 1.2rem;
  margin-right: 0.25rem;
}
.card-link {
  margin-top: auto;
  padding-top: 1.1rem;
}
.card-link a {
  font-weight: 700;
  text-decoration: none;
}
.card-link a:hover { text-decoration: underline; }
.card-link a::after { content: " \2192"; }
.card-soon { border-style: dashed; }

.footnote {
  margin: 1.5rem 0 0;
  color: var(--muted);
  font-size: 0.85rem;
}

/* ---------- About ---------- */
.about-grid {
  display: grid;
  gap: clamp(2rem, 5vw, 4rem);
}
@media (min-width: 900px) {
  .about-grid { grid-template-columns: 1.1fr 1fr; align-items: start; }
}
.prose p:not(.chapter) { margin: 1rem 0 0; color: var(--muted); max-width: 38rem; }
.prose p.dropcap { margin-top: 1.5rem; color: var(--text); font-size: 1.15rem; }
.prose p.dropcap::first-letter {
  float: left;
  margin: 0.08em 0.12em 0 0;
  font-family: var(--serif);
  font-size: 3.4em;
  line-height: 0.8;
  color: var(--amber);
}

.worlds {
  display: grid;
  gap: 0.85rem;
  margin: 0;
  padding: 0;
  list-style: none;
}
.worlds li {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  gap: 0.25rem 1rem;
  align-items: center;
  padding: 1rem 1.1rem;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
}
.world-hytale { --glyph: linear-gradient(135deg, #6ad8c7, #2c7f86); }
.world-minecraft { --glyph: linear-gradient(135deg, #8fcf6a, #3f7a35); }
.world-roblox { --glyph: linear-gradient(135deg, #b3a4ff, #5b4bc4); }
.worlds .glyph {
  grid-row: span 2;
  width: 2.75rem;
  height: 2.75rem;
  border-radius: 10px;
  background: var(--glyph, var(--violet));
  box-shadow: inset 0 -6px 0 rgba(0, 0, 0, 0.25), inset 0 2px 0 rgba(255, 255, 255, 0.2);
}
.worlds h3 {
  margin: 0;
  font-size: 1.05rem;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.5rem;
}
.worlds p { margin: 0; color: var(--muted); font-size: 0.95rem; }
.tag {
  font-family: var(--mono);
  font-size: 0.7rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  padding: 0.05rem 0.45rem;
  border-radius: 999px;
  border: 1px solid currentColor;
}
.tag-now { color: var(--teal); }
.tag-ongoing { color: var(--amber-2); }
.tag-next { color: #c4b8ff; }

/* ---------- Contact ---------- */
.contact-card {
  position: relative;
  padding: clamp(1.75rem, 5vw, 3rem);
  border: 1px solid var(--line);
  border-radius: calc(var(--radius) + 6px);
  background:
    radial-gradient(30rem 16rem at 100% 0%, rgba(232, 116, 59, 0.18), transparent 70%),
    radial-gradient(24rem 16rem at 0% 100%, rgba(143, 124, 240, 0.16), transparent 70%),
    var(--surface);
  overflow: hidden;
}
.contact-list {
  display: grid;
  gap: 0.9rem;
  margin: 2rem 0 0;
  padding: 0;
  list-style: none;
}
.contact-list li {
  display: flex;
  flex-wrap: wrap;
  gap: 0.25rem 1rem;
  align-items: baseline;
}
.contact-list .label {
  min-width: 6rem;
  color: var(--muted);
  font-family: var(--mono);
  font-size: 0.8rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
}

/* ---------- Footer ---------- */
.site-footer {
  padding-block: 2.5rem 3rem;
  border-top: 1px solid var(--line);
  background: var(--ink-2);
  color: var(--muted);
  font-size: 0.88rem;
}
.site-footer .wrap { display: grid; gap: 1rem; }
.site-footer p { margin: 0; }
.legal { line-height: 1.9; }
.disclaimer { font-size: 0.8rem; opacity: 0.9; }
.footer-links a { display: inline-block; padding-block: 0.5rem; }

/* ---------- Privacy page ---------- */
.prose h1 {
  margin: 0;
  font-family: var(--serif);
  font-size: clamp(1.9rem, 6vw, 3rem);
  line-height: 1.1;
  letter-spacing: -0.01em;
}
.prose h2 { margin: 2rem 0 0; font-size: 1.3rem; }
.prose .section-intro { margin-top: 1rem; }

/* ---------- Motion preferences ---------- */
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
  .mote { display: none; }
  .card:hover, .card:focus-within, .btn:hover { transform: none; }
}

@media (forced-colors: active) {
  .hero h1 em { -webkit-text-fill-color: currentColor; background: none; }
  .todo { border-style: dashed; }
}
