/* sinisterswiss.ch — static site styles */

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

:root {
  --bg: #0a0c10;
  --bg-glow: rgba(230, 180, 85, 0.07);
  --text: #e9e6df;
  --muted: #a09c92;
  --faint: #6d6a62;
  --gold: #e6b455;
  --gold-strong: #f1c40f;
  --btn-gold: #e6b455;
  --btn-gold-hover: #f1c40f;
  --card: rgba(255, 255, 255, 0.04);
  --card-hover: rgba(255, 255, 255, 0.07);
  --border: rgba(255, 255, 255, 0.09);
  --border-strong: rgba(230, 180, 85, 0.45);
  --nav-bg: rgba(10, 12, 16, 0.6);
  --shadow: 0 12px 40px rgba(0, 0, 0, 0.35);
  --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;
}

:root[data-theme="light"] {
  --bg: #f5f2ea;
  --bg-glow: rgba(176, 125, 30, 0.09);
  --text: #211e18;
  --muted: #6b675c;
  --faint: #98948a;
  --gold: #a9741a;
  --gold-strong: #8f6212;
  --btn-gold: #c9a227;
  --btn-gold-hover: #d6b23c;
  --card: rgba(255, 255, 255, 0.55);
  --card-hover: rgba(255, 255, 255, 0.85);
  --border: rgba(33, 30, 24, 0.12);
  --border-strong: rgba(169, 116, 26, 0.5);
  --nav-bg: rgba(245, 242, 234, 0.7);
  --shadow: 0 12px 40px rgba(80, 60, 20, 0.12);
}

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

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

html {
  scroll-behavior: smooth;
}

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;
}

/* soft gold glow behind the hero */
body::before {
  content: "";
  position: fixed;
  inset: 0;
  background:
    radial-gradient(60rem 30rem at 85% -5%, var(--bg-glow), transparent 70%),
    radial-gradient(40rem 25rem at -10% 40%, var(--bg-glow), transparent 70%);
  pointer-events: none;
  z-index: -1;
}

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

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

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

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

/* ---------- layout ---------- */

.section {
  max-width: 62rem;
  margin: 0 auto;
  padding: 4.5rem 1.5rem 1rem;
}

.section-title {
  font-size: 1.15rem;
  font-weight: 600;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--gold);
  margin: 0 0 1.75rem;
  font-family: var(--font-mono);
}

.prose {
  max-width: 46rem;
}

.prose p {
  margin: 0 0 1.1rem;
  color: var(--muted);
}

.prose p:last-child {
  margin-bottom: 0;
}

.footnote {
  color: var(--faint);
  font-size: 0.875rem;
  margin-top: 1.5rem;
}

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

.nav {
  position: sticky;
  top: 0;
  z-index: 10;
  background: var(--nav-bg);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  border-bottom: 1px solid var(--border);
}

.nav-inner {
  max-width: 62rem;
  margin: 0 auto;
  padding: 0.8rem 1.5rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  flex-wrap: wrap;
}

.wordmark {
  font-family: var(--font-mono);
  font-size: 0.95rem;
  color: var(--text);
  letter-spacing: 0.02em;
}

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

.nav-links {
  display: flex;
  align-items: center;
  gap: 1.25rem;
}

.nav-links a {
  color: var(--muted);
  font-size: 0.95rem;
}

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

.theme-toggle {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 34px;
  height: 34px;
  border-radius: 9px;
  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(--gold);
  border-color: var(--border-strong);
}

/* Theme toggle: show the icon for the current *choice* (system/light/dark),
   not the effective theme. data-theme-pref is set by js/theme.js and the
   toggle in 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 {
  display: block;
}

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

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

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

.hero {
  max-width: 62rem;
  margin: 0 auto;
  padding: 6.5rem 1.5rem 3rem;
  display: grid;
  grid-template-columns: 1.2fr 0.8fr;
  gap: 2rem;
  align-items: center;
}

.eyebrow {
  font-family: var(--font-mono);
  color: var(--faint);
  font-size: 0.9rem;
  margin: 0 0 1rem;
}

.hero h1 {
  font-size: clamp(2.6rem, 7vw, 4.2rem);
  line-height: 1.05;
  letter-spacing: -0.02em;
  margin: 0 0 1.25rem;
}

.lede {
  font-size: 1.2rem;
  color: var(--muted);
  max-width: 30rem;
  margin: 0 0 2rem;
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
}

/* inside a section (contact), the preceding prose has no bottom margin */
.section .hero-actions {
  margin-top: 2rem;
}

.btn {
  display: inline-block;
  padding: 0.6rem 1.25rem;
  border-radius: 10px;
  border: 1px solid var(--border);
  background: var(--card);
  color: var(--text);
  font-size: 0.95rem;
  font-weight: 500;
  transition: border-color 0.15s ease, background 0.15s ease, color 0.15s ease, transform 0.15s ease;
}

.btn:hover {
  border-color: var(--border-strong);
  color: var(--gold);
  transform: translateY(-1px);
}

.btn-primary {
  background: var(--btn-gold);
  border-color: var(--btn-gold);
  color: #14100a;
  font-weight: 600;
}

.btn-primary:hover {
  background: var(--btn-gold-hover);
  border-color: var(--btn-gold-hover);
  color: #14100a;
}

.hero-visual {
  display: flex;
  justify-content: center;
}

.cheese {
  width: min(22rem, 60vw);
  filter: drop-shadow(0 24px 48px rgba(230, 180, 85, 0.18));
  animation: float 7s ease-in-out infinite;
}

@keyframes float {
  0%,
  100% {
    transform: translateY(0) rotate(-2deg);
  }
  50% {
    transform: translateY(-16px) rotate(2deg);
  }
}

/* ---------- cards ---------- */

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

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

.card {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: 14px;
  padding: 1.5rem;
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  transition: border-color 0.2s ease, background 0.2s ease, transform 0.2s ease;
}

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

.card h3 {
  margin: 0.25rem 0 0.6rem;
  font-size: 1.15rem;
}

.card p {
  margin: 0 0 0.9rem;
  color: var(--muted);
  font-size: 0.95rem;
}

.card p:last-child {
  margin-bottom: 0;
}

.card-meta {
  font-family: var(--font-mono);
  font-size: 0.78rem;
  color: var(--faint);
  margin: 0;
  letter-spacing: 0.04em;
}

.tags {
  font-family: var(--font-mono);
  font-size: 0.78rem;
  color: var(--gold) !important;
  letter-spacing: 0.02em;
}

/* ---------- domain grid ---------- */

.domain-grid {
  margin-top: 2rem;
  list-style: none;
  padding: 0;
}

.domain-card {
  display: flex;
  flex-direction: column;
  gap: 0.3rem;
  padding: 1.1rem 1.25rem;
  border-radius: 12px;
  border: 1px solid var(--border);
  background: var(--card);
  color: var(--text);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  transition: border-color 0.2s ease, background 0.2s ease, transform 0.2s ease;
}

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

.domain-card:hover .domain-name {
  color: var(--gold);
}

.domain-name {
  font-family: var(--font-mono);
  font-size: 0.95rem;
  font-weight: 600;
}

.domain-name::before {
  content: "";
  display: inline-block;
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--gold);
  margin-right: 0.55rem;
  vertical-align: baseline;
}

.domain-desc {
  color: var(--muted);
  font-size: 0.875rem;
}

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

.footer {
  max-width: 62rem;
  margin: 3rem auto 0;
  padding: 2rem 1.5rem 3rem;
  border-top: 1px solid var(--border);
  text-align: center;
  color: var(--muted);
  font-size: 0.9rem;
}

.footer p {
  margin: 0.2rem 0;
}

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

.notfound {
  max-width: 62rem;
  margin: 0 auto;
  min-height: 70vh;
  padding: 6rem 1.5rem;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  justify-content: center;
}

.notfound h1 {
  font-size: clamp(2rem, 5vw, 3rem);
  margin: 0.5rem 0 1rem;
}

.notfound p {
  color: var(--muted);
  max-width: 30rem;
  margin: 0 0 2rem;
}

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

.reveal {
  opacity: 0;
  transform: translateY(14px);
  transition: opacity 0.5s ease, transform 0.5s ease;
}

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

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

@media (max-width: 880px) {
  .hero {
    grid-template-columns: 1fr;
    padding-top: 4rem;
    text-align: center;
  }

  .hero-visual {
    order: -1;
  }

  .cheese {
    width: min(14rem, 50vw);
  }

  .lede {
    margin-left: auto;
    margin-right: auto;
  }

  .hero-actions {
    justify-content: center;
  }

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

  .section {
    padding-top: 3.5rem;
  }
}

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

  .nav-inner {
    justify-content: center;
  }

  .nav-links {
    gap: 0.9rem;
  }
}

/* ---------- reduced motion ---------- */

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

  .cheese {
    animation: none;
  }

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

  .btn,
  .card,
  .domain-card {
    transition: none;
  }
}
