/* mandate.sinisterswiss.ch — static site styles
   Brand: CREST — slate #0F172A tile, gold #C9A227. Same design system as
   sinisterswiss.ch (shared theme cookie), cooler palette. */

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

:root {
  --bg: #0b0e14;
  --bg-glow: rgba(201, 162, 39, 0.07);
  --text: #e8eaed;
  --muted: #9aa0ab;
  --faint: #666d7a;
  --gold: #c9a227;
  --gold-strong: #e0bc4a;
  /* primary button fill — a brighter, more saturated gold than the text
     --gold so the dark label keeps strong contrast on it */
  --btn-gold: #c9a227;
  --btn-gold-hover: #e0bc4a;
  --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(201, 162, 39, 0.45);
  --nav-bg: rgba(11, 14, 20, 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: #f4f3ef;
  --bg-glow: rgba(150, 118, 24, 0.09);
  --text: #1c2027;
  --muted: #5d6470;
  --faint: #94989f;
  --gold: #8f7112;
  --gold-strong: #755a0e;
  /* brighter fill than the text --gold (which is tuned to read as text on a
     light background); the dark label needs a lighter gold behind it */
  --btn-gold: #c9a227;
  --btn-gold-hover: #d6b23c;
  --card: rgba(255, 255, 255, 0.55);
  --card-hover: rgba(255, 255, 255, 0.85);
  --border: rgba(28, 32, 39, 0.12);
  --border-strong: rgba(143, 113, 18, 0.5);
  --nav-bg: rgba(244, 243, 239, 0.7);
  --shadow: 0 12px 40px rgba(60, 50, 10, 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;
}

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

code {
  font-family: var(--font-mono);
  font-size: 0.875em;
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: 6px;
  padding: 0.1em 0.4em;
}

strong {
  color: var(--text);
}

/* ---------- 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;
  font-weight: 600;
  color: var(--text);
  letter-spacing: 0.02em;
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
}

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

.wordmark-logo {
  border-radius: 5px;
}

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

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

.crest {
  width: min(16rem, 50vw);
  filter: drop-shadow(0 24px 48px rgba(201, 162, 39, 0.22));
  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-2 {
  grid-template-columns: repeat(2, 1fr);
}

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

.pillars {
  margin-top: 2.5rem;
}

/* ---------- features ---------- */

.features-intro {
  margin-top: 0.5rem;
}

.features-grid {
  margin-top: 2.5rem;
}

.feature {
  display: flex;
  flex-direction: column;
  gap: 0.8rem;
  padding: 1.25rem 1.5rem;
}

.feature-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 40px;
  height: 40px;
  border-radius: 10px;
  background: var(--card-hover);
  border: 1px solid var(--border);
  color: var(--gold);
  flex-shrink: 0;
}

.feature-icon svg {
  width: 20px;
  height: 20px;
}

.feature h3 {
  margin: 0;
  font-size: 1.02rem;
}

.feature p {
  margin: 0;
  font-size: 0.9rem;
}

/* ---------- tour (screenshots) ---------- */

.tour-grid {
  margin-top: 0.5rem;
}

.shot {
  margin: 0;
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: 14px;
  overflow: hidden;
  transition: border-color 0.2s ease, transform 0.2s ease;
}

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

.shot img {
  width: 100%;
  aspect-ratio: 16 / 10;
  object-fit: cover;
  object-position: top left;
}

.shot figcaption {
  padding: 0.9rem 1.1rem;
  font-size: 0.875rem;
  color: var(--muted);
  border-top: 1px solid var(--border);
}

/* ---------- tour: lightbox ---------- */

.shot-trigger {
  position: relative;
  display: block;
  width: 100%;
  padding: 0;
  border: 0;
  background: none;
  cursor: zoom-in;
}

.shot-trigger img {
  transition: transform 0.25s ease;
}

.shot-trigger:hover img,
.shot-trigger:focus-visible img {
  transform: scale(1.015);
}

/* "expand" affordance, top-right of the image */
.shot-trigger::after {
  content: "";
  position: absolute;
  top: 0.6rem;
  right: 0.6rem;
  width: 30px;
  height: 30px;
  border-radius: 8px;
  border: 1px solid var(--border-strong);
  background-color: rgba(11, 14, 20, 0.55);
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23C9A227' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M8 3H5a2 2 0 0 0-2 2v3m18 0V5a2 2 0 0 0-2-2h-3m0 18h3a2 2 0 0 0 2-2v-3M3 16v3a2 2 0 0 0 2 2h3'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: center;
  background-size: 14px 14px;
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
  opacity: 0;
  transition: opacity 0.15s ease;
}

.shot:hover .shot-trigger::after,
.shot-trigger:focus-visible::after {
  opacity: 1;
}

.lightbox {
  position: fixed;
  inset: 0;
  z-index: 100;
  display: none;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 1rem;
}

.lightbox.open {
  display: flex;
}

body.lightbox-open {
  overflow: hidden;
}

.lightbox-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(5, 7, 10, 0.86);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
}

.lightbox-stage {
  position: relative;
  z-index: 1;
  flex: 1;
  min-height: 0;
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  touch-action: pan-y;
}

.lightbox-img {
  max-width: min(92vw, 1600px);
  max-height: calc(100vh - 11rem);
  width: auto;
  height: auto;
  border-radius: 12px;
  border: 1px solid var(--border-strong);
  box-shadow: var(--shadow);
  background: #0b0e14;
  transition: opacity 0.15s ease;
}

.lightbox-img.lb-loading {
  opacity: 0.35;
}

.lightbox-footer {
  position: relative;
  z-index: 1;
  display: flex;
  align-items: baseline;
  justify-content: center;
  gap: 1rem;
  flex-wrap: wrap;
  width: 100%;
  padding: 0.9rem 3.5rem 1rem;
  text-align: center;
  background: var(--bg);
  border-top: 1px solid var(--border);
}

.lightbox-caption {
  margin: 0;
  color: var(--text);
  font-size: 1rem;
  line-height: 1.5;
  max-width: 46rem;
}

.lightbox-counter {
  font-family: var(--font-mono);
  font-size: 0.8rem;
  color: var(--muted);
}

.lightbox-close,
.lightbox-nav {
  position: absolute;
  z-index: 2;
  display: flex;
  align-items: center;
  justify-content: center;
  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;
}

.lightbox-close:hover,
.lightbox-nav:hover {
  color: var(--gold);
  border-color: var(--border-strong);
}

.lightbox-close {
  top: 0.9rem;
  right: 0.9rem;
  width: 40px;
  height: 40px;
}

.lightbox-nav {
  top: 50%;
  transform: translateY(-50%);
  width: 44px;
  height: 44px;
}

.lightbox-prev {
  left: 0.9rem;
}

.lightbox-next {
  right: 0.9rem;
}

.lightbox.open .lightbox-stage,
.lightbox.open .lightbox-footer {
  animation: lb-fade 0.18s ease;
}

@keyframes lb-fade {
  from {
    opacity: 0;
    transform: translateY(6px);
  }
  to {
    opacity: 1;
    transform: none;
  }
}

@media (max-width: 560px) {
  .lightbox-nav {
    width: 38px;
    height: 38px;
  }

  .lightbox-prev {
    left: 0.5rem;
  }

  .lightbox-next {
    right: 0.5rem;
  }

  .lightbox-footer {
    padding: 0.9rem 1rem 1rem;
  }
}

/* ---------- pricing ---------- */

.pricing-grid {
  margin-top: 2.5rem;
}

.plan {
  display: flex;
  flex-direction: column;
}

.plan h3 {
  font-family: var(--font-mono);
  font-size: 0.95rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--gold);
  margin: 0 0 1rem;
}

.price {
  font-size: 2.2rem;
  font-weight: 650;
  color: var(--text);
  margin: 0;
  line-height: 1.1;
}

.price span {
  font-size: 0.95rem;
  font-weight: 400;
  color: var(--muted);
}

.price-sub {
  font-size: 0.9rem;
  color: var(--faint);
  margin: 0.25rem 0 1.25rem;
}

.plan-list {
  list-style: none;
  margin: 0;
  padding: 0;
  border-top: 1px solid var(--border);
}

.plan-list li {
  padding: 0.55rem 0;
  color: var(--muted);
  font-size: 0.95rem;
  border-bottom: 1px solid var(--border);
}

.plan-list li:last-child {
  border-bottom: none;
}

.plan-list li::before {
  content: "—";
  color: var(--gold);
  margin-right: 0.6rem;
}

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

  .crest {
    width: min(12rem, 45vw);
  }

  .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-2 {
    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;
  }

  .crest {
    animation: none;
  }

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

  .btn,
  .card,
  .shot,
  .shot-trigger img,
  .lightbox-img {
    transition: none;
  }

  .lightbox.open .lightbox-stage,
  .lightbox.open .lightbox-footer {
    animation: none;
  }
}
