/* sinisterswiss.studio — static site styles */

/* ---------- tokens ---------- */

:root {
  --bg: #0c0b0f;
  --bg-raised: #131218;
  --glow: rgba(255, 138, 61, 0.08);
  --glow-cool: rgba(96, 128, 230, 0.07);
  --text: #eeeae1;
  --muted: #a7a29a;
  --faint: #6f6b66;
  --accent: #ff8a3d;
  --accent-strong: #ffa462;
  --accent-soft: rgba(255, 138, 61, 0.12);
  --on-accent: #1a0d04;
  --card: rgba(255, 255, 255, 0.035);
  --card-hover: rgba(255, 255, 255, 0.06);
  --border: rgba(255, 255, 255, 0.08);
  --border-strong: rgba(255, 138, 61, 0.45);
  --nav-bg: rgba(12, 11, 15, 0.72);
  --shadow: 0 18px 50px rgba(0, 0, 0, 0.45);
  --mark-top: #ffb169;
  --mark-left: #ff8a3d;
  --mark-right: #c2410c;
  --font-body: system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  --font-mono: ui-monospace, "SF Mono", "Cascadia Code", "JetBrains Mono", Menlo, Consolas, monospace;
  --radius: 16px;
  --max: 72rem;
  color-scheme: dark;
}

:root[data-theme="light"] {
  --bg: #f6f4ef;
  --bg-raised: #ffffff;
  --glow: rgba(234, 108, 30, 0.08);
  --glow-cool: rgba(70, 100, 210, 0.06);
  --text: #18161b;
  --muted: #5d5964;
  --faint: #8d8993;
  --accent: #c2410c;
  --accent-strong: #9a3412;
  --accent-soft: rgba(194, 65, 12, 0.09);
  --on-accent: #ffffff;
  --card: rgba(255, 255, 255, 0.7);
  --card-hover: #ffffff;
  --border: rgba(24, 22, 27, 0.1);
  --border-strong: rgba(194, 65, 12, 0.45);
  --nav-bg: rgba(246, 244, 239, 0.78);
  --shadow: 0 18px 50px rgba(60, 40, 20, 0.12);
  color-scheme: light;
}

/* ---------- reset ---------- */

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

html {
  scroll-behavior: smooth;
  scroll-padding-top: 4.5rem;
}

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: var(--font-body);
  font-size: 1.0625rem;
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  transition: background-color 0.25s ease, color 0.25s ease;
}

body::before {
  content: "";
  position: fixed;
  inset: 0;
  background:
    radial-gradient(55rem 30rem at 90% 55%, var(--glow), transparent 70%),
    radial-gradient(45rem 28rem at 0% 85%, var(--glow-cool), transparent 70%);
  pointer-events: none;
  z-index: -1;
}

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

img {
  height: auto;
}

ul {
  list-style: none;
  margin: 0;
  padding: 0;
}

h1,
h2,
h3 {
  line-height: 1.12;
  letter-spacing: -0.02em;
  margin: 0;
}

p {
  margin: 0;
}

a {
  color: var(--accent);
  text-decoration: none;
}

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

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

.skip-link {
  position: absolute;
  left: 1rem;
  top: -3rem;
  z-index: 100;
  padding: 0.5rem 0.9rem;
  border-radius: 8px;
  background: var(--accent);
  color: var(--on-accent);
  font-weight: 600;
}

.skip-link:focus {
  top: 1rem;
}

/* ---------- nav ---------- */

.nav {
  position: fixed;
  inset: 0 0 auto;
  z-index: 50;
  border-bottom: 1px solid transparent;
  transition: background-color 0.25s ease, border-color 0.25s ease;
}

.nav.scrolled {
  background: var(--nav-bg);
  border-bottom-color: var(--border);
  -webkit-backdrop-filter: saturate(160%) blur(14px);
  backdrop-filter: saturate(160%) blur(14px);
}

.nav-inner {
  max-width: var(--max);
  margin: 0 auto;
  padding: 0.85rem 1.5rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
}

/* Over the hero art the nav is always light; once scrolled it follows the theme. */
.nav:not(.scrolled) {
  --text: #f3efe6;
  --muted: rgba(243, 239, 230, 0.78);
  --border: rgba(255, 255, 255, 0.18);
  --card: rgba(10, 10, 14, 0.25);
  --accent: #ffa462;
}

.wordmark {
  display: inline-flex;
  align-items: center;
  gap: 0.6rem;
  color: var(--text);
  font-weight: 700;
  letter-spacing: -0.01em;
  white-space: nowrap;
}

.wordmark:hover {
  color: var(--text);
}

.mark {
  width: 28px;
  height: 28px;
}

.mark-top {
  fill: var(--mark-top);
}

.mark-left {
  fill: var(--mark-left);
}

.mark-right {
  fill: var(--mark-right);
}

.wordmark-studio {
  color: var(--muted);
  font-weight: 500;
}

.nav-links {
  display: flex;
  align-items: center;
  gap: 1.6rem;
  font-size: 0.94rem;
}

.nav-links a {
  color: var(--muted);
  transition: color 0.15s ease;
}

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

.theme-toggle {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 36px;
  height: 36px;
  border-radius: 10px;
  border: 1px solid var(--border);
  background: var(--card);
  color: var(--muted);
  cursor: pointer;
  transition: color 0.15s ease, border-color 0.15s ease;
}

.theme-toggle:hover {
  color: var(--accent);
  border-color: var(--border-strong);
}

/* Show the icon for the current *choice* (system/light/dark), not the
   effective theme. data-theme-pref is set by js/theme.js and js/main.js;
   data-theme (the effective theme) drives the colors. */
.theme-toggle .icon-system,
.theme-toggle .icon-sun,
.theme-toggle .icon-moon {
  display: none;
}

:root[data-theme-pref="system"] .theme-toggle .icon-system,
:root[data-theme-pref="light"] .theme-toggle .icon-sun,
:root[data-theme-pref="dark"] .theme-toggle .icon-moon {
  display: block;
}

/* ---------- buttons ---------- */

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  padding: 0.78rem 1.3rem;
  border-radius: 12px;
  font-weight: 600;
  font-size: 0.98rem;
  line-height: 1.2;
  border: 1px solid transparent;
  transition: transform 0.15s ease, background-color 0.15s ease, border-color 0.15s ease,
    box-shadow 0.15s ease, color 0.15s ease;
}

.btn:hover {
  transform: translateY(-1px);
}

.btn-primary {
  background: var(--accent);
  color: var(--on-accent);
  box-shadow: 0 8px 26px -10px var(--accent);
}

.btn-primary:hover {
  background: var(--accent-strong);
  color: var(--on-accent);
}

/* On the hero art only: frosted, always light. */
.btn-glass {
  color: #f3efe6;
  background: rgba(255, 255, 255, 0.1);
  border-color: rgba(255, 255, 255, 0.24);
  -webkit-backdrop-filter: blur(8px);
  backdrop-filter: blur(8px);
}

.btn-glass:hover {
  color: #fff;
  background: rgba(255, 255, 255, 0.18);
}

.btn-lg {
  padding: 1rem 1.6rem;
  font-size: 1.05rem;
  overflow-wrap: anywhere;
}

/* ---------- hero ---------- */

.hero {
  position: relative;
  min-height: clamp(36rem, 92vh, 58rem);
  display: flex;
  align-items: flex-end;
  overflow: hidden;
  isolation: isolate;
  background: #0a0d18;
}

.hero-art,
.hero-art img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
}

.hero-art {
  z-index: -2;
}

.hero-art img {
  object-fit: cover;
  object-position: 50% 30%;
  animation: hero-drift 24s ease-in-out infinite alternate;
}

@keyframes hero-drift {
  from {
    transform: scale(1.04);
  }
  to {
    transform: scale(1.1) translateY(-1%);
  }
}

/* Darken the left for the text, then fade the bottom into the page. */
.hero-shade {
  position: absolute;
  inset: 0;
  z-index: -1;
  background:
    linear-gradient(90deg, rgba(6, 7, 12, 0.82) 0%, rgba(6, 7, 12, 0.45) 45%, rgba(6, 7, 12, 0) 75%),
    linear-gradient(180deg, rgba(6, 7, 12, 0.55) 0%, rgba(6, 7, 12, 0) 22%),
    linear-gradient(0deg, var(--bg) 0%, transparent 32%);
}

.hero-inner {
  width: 100%;
  max-width: var(--max);
  margin: 0 auto;
  padding: 8rem 1.5rem clamp(4rem, 10vh, 7rem);
  color: #f3efe6;
}

.hero h1 {
  font-size: clamp(2.6rem, 6.4vw, 5rem);
  font-weight: 800;
  letter-spacing: -0.035em;
  max-width: 13ch;
  text-shadow: 0 2px 30px rgba(0, 0, 0, 0.45);
}

.hero .lede {
  margin-top: 1.25rem;
  max-width: 34rem;
  font-size: clamp(1.05rem, 1.6vw, 1.22rem);
  color: rgba(243, 239, 230, 0.86);
  text-shadow: 0 1px 16px rgba(0, 0, 0, 0.5);
}

.hero .lede strong {
  color: #fff;
  font-weight: 600;
}

.hero-actions {
  margin-top: 2rem;
  display: flex;
  flex-wrap: wrap;
  gap: 0.8rem;
}

/* The light theme fades the hero into a light page: keep the actions on the
   dark part of the art by giving the fade less height. */
:root[data-theme="light"] .hero-shade {
  background:
    linear-gradient(90deg, rgba(6, 7, 12, 0.82) 0%, rgba(6, 7, 12, 0.45) 45%, rgba(6, 7, 12, 0) 75%),
    linear-gradient(180deg, rgba(6, 7, 12, 0.55) 0%, rgba(6, 7, 12, 0) 22%),
    linear-gradient(0deg, var(--bg) 0%, transparent 12%);
}

/* ---------- sections ---------- */

.section {
  max-width: var(--max);
  margin: 0 auto;
  padding: clamp(4.5rem, 9vw, 7rem) 1.5rem 0;
}

.eyebrow {
  font-family: var(--font-mono);
  font-size: 0.8rem;
  font-weight: 600;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--accent);
  margin-bottom: 0.9rem;
}

.eyebrow-on-art {
  color: #ffa462;
}

.section-head h2,
.contact h2 {
  font-size: clamp(2.1rem, 4.6vw, 3.4rem);
  font-weight: 800;
  letter-spacing: -0.03em;
}

.section-head {
  margin-bottom: 2.5rem;
}

.section-lede {
  margin-top: 1.1rem;
  max-width: 40rem;
  font-size: 1.15rem;
  color: var(--muted);
}

.grid {
  display: grid;
  gap: 1rem;
}

.grid-3 {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.grid-4 {
  grid-template-columns: repeat(4, minmax(0, 1fr));
}

/* ---------- Tombwarden ---------- */

.feature {
  display: grid;
  grid-template-columns: minmax(0, 1.15fr) minmax(0, 1fr);
  gap: clamp(1.75rem, 4vw, 3.5rem);
  align-items: center;
}

.feature-art {
  margin: 0;
  position: relative;
}

.feature-art img {
  width: 100%;
  border-radius: var(--radius);
  border: 1px solid var(--border);
  box-shadow: var(--shadow), 0 0 80px -20px rgba(255, 138, 61, 0.35);
}

.pills {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin-bottom: 1.4rem;
}

.pills li {
  padding: 0.3rem 0.75rem;
  border-radius: 999px;
  border: 1px solid var(--border);
  background: var(--card);
  font-size: 0.84rem;
  font-weight: 500;
  color: var(--muted);
}

.feature-lede {
  font-size: 1.3rem;
  line-height: 1.45;
  font-weight: 600;
  letter-spacing: -0.01em;
  margin-bottom: 1rem;
}

.feature-body > p:not(.feature-lede) {
  color: var(--muted);
}

.status {
  margin-top: 1.6rem;
  display: inline-flex;
  align-items: center;
  gap: 0.6rem;
  padding: 0.5rem 0.95rem;
  border-radius: 999px;
  background: var(--accent-soft);
  border: 1px solid var(--border-strong);
  color: var(--accent);
  font-weight: 600;
  font-size: 0.92rem;
}

.status-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--accent);
  box-shadow: 0 0 0 0 var(--accent);
  animation: pulse 2.2s ease-out infinite;
}

@keyframes pulse {
  0% {
    box-shadow: 0 0 0 0 rgba(255, 138, 61, 0.55);
  }
  100% {
    box-shadow: 0 0 0 10px rgba(255, 138, 61, 0);
  }
}

.game-points {
  margin-top: clamp(2.5rem, 5vw, 4rem);
}

.tile {
  padding: 1.4rem 1.3rem 1.5rem;
  border-radius: var(--radius);
  background: var(--card);
  border: 1px solid var(--border);
}

.tile-icon {
  width: 40px;
  height: 40px;
  padding: 9px;
  border-radius: 11px;
  background: var(--accent-soft);
  fill: none;
  stroke: var(--accent);
  stroke-width: 1.8;
  stroke-linecap: round;
  stroke-linejoin: round;
  margin-bottom: 1rem;
}

.tile h3 {
  font-size: 1.05rem;
  margin-bottom: 0.45rem;
}

.tile p {
  font-size: 0.95rem;
  color: var(--muted);
}

/* ---------- Ferrum3D ---------- */

.stats {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  margin: 0 0 1.5rem;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: var(--card);
  overflow: hidden;
}

.stats div {
  padding: 1.1rem 1.3rem;
  border-left: 1px solid var(--border);
}

.stats div:first-child {
  border-left: 0;
}

.stats dt {
  font-family: var(--font-mono);
  font-size: 0.74rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--faint);
}

.stats dd {
  margin: 0.2rem 0 0;
  font-size: 1.12rem;
  font-weight: 700;
}

.card {
  position: relative;
  padding: 1.5rem 1.4rem 1.6rem;
  border-radius: var(--radius);
  background: var(--card);
  border: 1px solid var(--border);
  transition: background-color 0.2s ease, border-color 0.2s ease, transform 0.2s ease;
}

.card:hover {
  background: var(--card-hover);
  border-color: var(--border-strong);
  transform: translateY(-2px);
}

.card-kicker {
  font-family: var(--font-mono);
  font-size: 0.74rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--accent);
  margin-bottom: 0.55rem;
}

.card h3 {
  font-size: 1.12rem;
  margin-bottom: 0.55rem;
}

.card p:last-child {
  font-size: 0.95rem;
  color: var(--muted);
}

.callout {
  margin-top: 1.5rem;
  display: flex;
  align-items: center;
  gap: 1.4rem;
  padding: 1.5rem 1.6rem;
  border-radius: var(--radius);
  border: 1px solid var(--border-strong);
  background:
    linear-gradient(120deg, var(--accent-soft), transparent 60%),
    var(--card);
}

.callout-icon {
  flex: none;
  width: 72px;
  height: 72px;
  border-radius: 16px;
  box-shadow: 0 8px 30px -8px rgba(255, 138, 61, 0.55);
}

.callout h3 {
  font-size: 1.15rem;
  margin-bottom: 0.35rem;
}

.callout p {
  color: var(--muted);
  max-width: 46rem;
}

/* ---------- studio ---------- */

.split {
  display: grid;
  grid-template-columns: minmax(0, 0.9fr) minmax(0, 1.1fr);
  gap: clamp(1.5rem, 5vw, 4rem);
  align-items: start;
}

.split .section-head {
  margin-bottom: 0;
}

.prose p + p {
  margin-top: 1rem;
}

.prose p {
  font-size: 1.12rem;
  color: var(--muted);
}

/* ---------- contact ---------- */

.contact {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 2rem;
  padding: clamp(2rem, 5vw, 3.25rem);
  border-radius: calc(var(--radius) + 6px);
  border: 1px solid var(--border);
  background:
    radial-gradient(40rem 20rem at 100% 0%, var(--accent-soft), transparent 70%),
    var(--bg-raised);
  box-shadow: var(--shadow);
}

.contact p:not(.eyebrow) {
  margin-top: 0.8rem;
  max-width: 30rem;
  color: var(--muted);
}

/* ---------- footer ---------- */

.footer {
  margin-top: clamp(4.5rem, 9vw, 7rem);
  border-top: 1px solid var(--border);
}

.footer-inner {
  max-width: var(--max);
  margin: 0 auto;
  padding: 1.75rem 1.5rem 2.25rem;
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 0.5rem 2rem;
  font-size: 0.9rem;
  color: var(--faint);
}

.footer-links {
  display: flex;
  gap: 1.25rem;
}

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

.footer-links a:hover,
.footer-links a[aria-current="page"] {
  color: var(--accent);
}

/* ---------- legal pages ---------- */

.legal {
  max-width: 46rem;
  margin: 0 auto;
  padding: 8rem 1.5rem 0;
}

.legal-head {
  padding-bottom: 2rem;
  margin-bottom: 2rem;
  border-bottom: 1px solid var(--border);
}

.legal-head h1 {
  font-size: clamp(2.2rem, 5vw, 3.2rem);
  font-weight: 800;
  letter-spacing: -0.03em;
}

.legal-meta {
  margin-top: 0.6rem;
  color: var(--faint);
  font-size: 0.95rem;
}

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

.legal-body strong {
  color: var(--text);
}

.legal-body h2 {
  color: var(--text);
  font-size: 1.3rem;
  margin: 2.5rem 0 0.75rem;
}

.legal-body h3 {
  color: var(--text);
  font-size: 1.05rem;
  margin: 1.5rem 0 0.5rem;
}

.legal-body p + p,
.legal-body ul + p,
.legal-body p + ul {
  margin-top: 0.9rem;
}

.legal-body ul {
  list-style: disc;
  padding-left: 1.4rem;
}

.legal-body li + li {
  margin-top: 0.3rem;
}

.legal-body code {
  font-family: var(--font-mono);
  font-size: 0.88em;
  padding: 0.1em 0.4em;
  border-radius: 6px;
  background: var(--card);
  border: 1px solid var(--border);
  color: var(--text);
}

.legal-caps {
  font-size: 0.95rem;
}

/* ---------- reveal ---------- */

.reveal {
  opacity: 0;
  transform: translateY(18px);
  transition: opacity 0.7s ease, transform 0.7s cubic-bezier(0.2, 0.7, 0.2, 1);
}

.reveal.in {
  opacity: 1;
  transform: none;
}

/* ---------- 404 ---------- */

.notfound {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 1rem;
  padding: 2rem 1.5rem;
  text-align: center;
}

.notfound .mark {
  width: 64px;
  height: 64px;
  margin-bottom: 0.5rem;
}

.notfound h1 {
  font-size: clamp(2.2rem, 6vw, 3.4rem);
  font-weight: 800;
}

.notfound p:not(.eyebrow) {
  color: var(--muted);
  max-width: 28rem;
  margin-bottom: 0.75rem;
}

/* ---------- responsive ---------- */

@media (max-width: 1000px) {
  .grid-3,
  .grid-4 {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .feature,
  .split {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 720px) {
  .nav-links {
    gap: 1rem;
  }

  .nav-links a {
    font-size: 0.9rem;
  }

  .wordmark-text {
    display: none;
  }

  .page-legal .wordmark-text {
    display: inline;
  }

  /* Phones: the art on top fading into the page, the text below it in the
     theme's own colors, so the Jack isn't hidden behind the copy. */
  .hero {
    display: block;
    min-height: 0;
    background: none;
  }

  .hero-art {
    position: relative;
    display: block;
    height: min(26rem, 60vh);
    overflow: hidden;
  }

  .hero-art img {
    object-position: 50% 30%;
  }

  .hero-shade,
  :root[data-theme="light"] .hero-shade {
    bottom: auto;
    height: min(26rem, 60vh);
    background:
      linear-gradient(180deg, rgba(6, 7, 12, 0.6) 0%, rgba(6, 7, 12, 0) 28%, rgba(6, 7, 12, 0) 55%, var(--bg) 100%);
  }

  .hero-inner {
    position: relative;
    margin-top: -3.5rem;
    padding: 0 1.5rem 0.5rem;
    color: var(--text);
  }

  .hero h1,
  .hero .lede {
    text-shadow: none;
  }

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

  .hero .lede strong {
    color: var(--text);
  }

  .eyebrow-on-art {
    color: var(--accent);
  }

  .btn-glass {
    color: var(--text);
    background: var(--card);
    border-color: var(--border);
  }

  .btn-glass:hover {
    color: var(--text);
    background: var(--card-hover);
  }

  .stats {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .stats div:nth-child(3) {
    border-left: 0;
  }

  .stats div:nth-child(n + 3) {
    border-top: 1px solid var(--border);
  }
}

@media (max-width: 560px) {
  .grid-3,
  .grid-4 {
    grid-template-columns: 1fr;
  }

  .callout {
    flex-direction: column;
    align-items: flex-start;
  }

  .contact .btn-lg {
    width: 100%;
  }
}

@media (max-width: 380px) {
  .nav-links {
    gap: 0.75rem;
  }

  .nav-links a {
    font-size: 0.85rem;
  }
}

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }

  .hero-art img,
  .status-dot {
    animation: none;
  }

  .reveal {
    opacity: 1;
    transform: none;
    transition: none;
  }

  .btn:hover,
  .card:hover {
    transform: none;
  }
}
