/* ==========================================================================
   Zurland — shared site stylesheet
   Dark studio theme: charcoal base, warm yellow leads, red supports.
   Every page on zurland.net loads this one file.
   ========================================================================== */

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

:root {
  --bg: #121214;
  --bg-alt: #17171a;
  --surface: #1b1b1f;
  --surface-raised: #212127;
  --line: #2c2c33;
  --line-strong: #3a3a42;

  --text: #ececee;
  --text-muted: #a4a4ad;
  --text-dim: #75757e;

  --yellow: #f5c518;
  --yellow-bright: #ffd43d;
  --yellow-ghost: rgba(245, 197, 24, 0.08);
  --red: #e5484d;
  --red-ghost: rgba(229, 72, 77, 0.1);

  --ink-on-yellow: #121214;

  --font-display: "Chakra Petch", "Segoe UI", system-ui, sans-serif;
  --font-body: "Inter", "Segoe UI", system-ui, sans-serif;

  --wrap-max: 68rem;
  --radius: 4px;
  --header-h: 4rem;
}

/* ---- Reset & base ---------------------------------------------------- */

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

html {
  -webkit-text-size-adjust: 100%;
}

@media (prefers-reduced-motion: no-preference) {
  html {
    scroll-behavior: smooth;
  }
}

body {
  margin: 0;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  background-color: var(--bg);
  color: var(--text);
  font-family: var(--font-body);
  font-size: 1rem;
  line-height: 1.65;
}

main {
  flex: 1 0 auto;
}

h1,
h2,
h3,
h4 {
  font-family: var(--font-display);
  font-weight: 700;
  line-height: 1.15;
  margin: 0 0 0.6em;
  color: var(--text);
}

p {
  margin: 0 0 1em;
}

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

a {
  color: var(--yellow);
  text-decoration: none;
  transition: color 0.15s ease;
}

a:hover {
  color: var(--red);
}

::selection {
  background: var(--yellow);
  color: var(--ink-on-yellow);
}

:focus-visible {
  outline: 2px solid var(--yellow);
  outline-offset: 2px;
}

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

/* ---- Layout ----------------------------------------------------------- */

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

.section {
  padding: 4rem 0;
  scroll-margin-top: calc(var(--header-h) + 1rem);
}

.section--alt {
  background: var(--bg-alt);
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
}

/* ---- Kickers & section headings ---------------------------------------- */

.kicker {
  display: block;
  margin: 0 0 0.75rem;
  font-family: var(--font-display);
  font-size: 0.8rem;
  font-weight: 600;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--yellow);
}

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

.section-head h2 {
  font-size: clamp(1.75rem, 4.5vw, 2.5rem);
  letter-spacing: 0.02em;
  margin-bottom: 0;
}

/* ---- Header (shared shell — identical on every page) ------------------- */

.site-header {
  position: sticky;
  top: 0;
  z-index: 20;
  background: rgba(18, 18, 20, 0.9);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--line);
}

.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  height: var(--header-h);
}

.wordmark {
  font-family: var(--font-display);
  font-size: 1.2rem;
  font-weight: 700;
  letter-spacing: 0.14em;
  color: var(--text);
}

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

.cursor {
  color: var(--yellow);
}

@media (prefers-reduced-motion: no-preference) {
  .cursor {
    animation: blink 1.2s steps(1, end) infinite;
  }
}

@keyframes blink {
  50% {
    opacity: 0;
  }
}

.site-nav {
  display: flex;
  align-items: center;
  gap: 1.5rem;
}

.site-nav a {
  font-family: var(--font-display);
  font-size: 0.8rem;
  font-weight: 600;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--text-muted);
}

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

/* ---- Buttons ------------------------------------------------------------ */

.btn {
  display: inline-block;
  padding: 0.85rem 1.75rem;
  background: var(--yellow);
  color: var(--ink-on-yellow);
  font-family: var(--font-display);
  font-size: 0.85rem;
  font-weight: 700;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  border: 1px solid var(--yellow);
  border-radius: var(--radius);
  transition: background-color 0.15s ease, border-color 0.15s ease,
    transform 0.15s ease;
}

.btn:hover {
  background: var(--yellow-bright);
  border-color: var(--yellow-bright);
  color: var(--ink-on-yellow);
  transform: translateY(-2px);
}

/* ---- Hero ---------------------------------------------------------------- */

.hero {
  position: relative;
  padding: clamp(4.5rem, 12vw, 8rem) 0 clamp(3.5rem, 9vw, 6rem);
  overflow: hidden;
}

.hero::before {
  content: "";
  position: absolute;
  inset: 0;
  background: radial-gradient(
      42rem 20rem at 18% -10%,
      rgba(245, 197, 24, 0.07),
      transparent 70%
    ),
    radial-gradient(
      30rem 16rem at 90% 110%,
      rgba(229, 72, 77, 0.05),
      transparent 70%
    );
  pointer-events: none;
}

.hero .wrap {
  position: relative;
}

.hero-title {
  font-size: clamp(3rem, 12vw, 6.25rem);
  letter-spacing: 0.06em;
  margin-bottom: 0.35em;
}

.hero-tagline {
  max-width: 34rem;
  font-size: clamp(1.05rem, 2.4vw, 1.25rem);
  color: var(--text-muted);
  margin-bottom: 2.25rem;
}

/* ---- Project cards (reusable pattern) ------------------------------------- */

.card-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 1.25rem;
}

.card {
  display: flex;
  flex-direction: column;
  gap: 0.9rem;
  padding: 1.75rem;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  transition: border-color 0.2s ease, background-color 0.2s ease,
    transform 0.2s ease;
}

.card:hover {
  border-color: rgba(245, 197, 24, 0.45);
  background: var(--surface-raised);
  transform: translateY(-3px);
}

.card-title {
  font-size: 1.5rem;
  letter-spacing: 0.03em;
  margin: 0;
}

.card-desc {
  color: var(--text-muted);
  margin: 0;
}

.card-link {
  margin-top: auto;
  padding-top: 0.5rem;
  font-family: var(--font-display);
  font-size: 0.82rem;
  font-weight: 600;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--yellow);
}

.card-link:hover {
  color: var(--red);
}

.card-link .arrow {
  display: inline-block;
  transition: transform 0.15s ease;
}

.card-link:hover .arrow {
  transform: translateX(4px);
}

/* Status badges: yellow = live, red = in development */

.badge {
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  padding: 0.3rem 0.65rem;
  font-family: var(--font-display);
  font-size: 0.7rem;
  font-weight: 600;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  border: 1px solid;
  border-radius: 2px;
}

.badge::before {
  content: "";
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: currentColor;
}

.badge--live {
  color: var(--yellow);
  border-color: rgba(245, 197, 24, 0.4);
  background: var(--yellow-ghost);
}

.badge--dev {
  color: var(--red);
  border-color: rgba(229, 72, 77, 0.4);
  background: var(--red-ghost);
}

@media (prefers-reduced-motion: no-preference) {
  .badge--dev::before {
    animation: pulse 1.6s ease-in-out infinite;
  }
}

@keyframes pulse {
  50% {
    opacity: 0.25;
  }
}

/* Redaction bar for unannounced titles */

.redacted {
  display: inline-block;
  width: 7ch;
  height: 0.85em;
  vertical-align: baseline;
  transform: translateY(0.08em);
  background: repeating-linear-gradient(
    -45deg,
    var(--line-strong),
    var(--line-strong) 6px,
    var(--surface-raised) 6px,
    var(--surface-raised) 12px
  );
  border-radius: 2px;
}

/* ---- About ------------------------------------------------------------------ */

.about-copy {
  max-width: 42rem;
  font-size: 1.1rem;
  color: var(--text-muted);
  margin-bottom: 0;
}

/* ---- Legal / interior pages --------------------------------------------------- */

.page-head {
  padding: clamp(3rem, 8vw, 5rem) 0 2.5rem;
  border-bottom: 1px solid var(--line);
  margin-bottom: 2.5rem;
}

.page-head h1 {
  font-size: clamp(2.25rem, 7vw, 3.5rem);
  letter-spacing: 0.03em;
  margin-bottom: 0.4em;
}

.page-meta {
  font-family: var(--font-display);
  font-size: 0.78rem;
  font-weight: 500;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--text-dim);
  margin: 0;
}

.legal {
  max-width: 46rem;
  padding-bottom: 4.5rem;
  color: var(--text-muted);
}

.legal h2 {
  font-size: 1.3rem;
  letter-spacing: 0.02em;
  margin: 2.5em 0 0.75em;
  padding-left: 0.85rem;
  border-left: 3px solid var(--yellow);
}

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

.legal a {
  text-decoration: underline;
  text-underline-offset: 3px;
}

.legal ul {
  margin: 0 0 1.25em;
  padding-left: 1.35rem;
}

.legal li {
  margin: 0.45em 0;
}

.legal li::marker {
  color: var(--yellow);
}

/* ---- Footer (shared shell — identical on every page) ---------------------------- */

.site-footer {
  flex-shrink: 0;
  border-top: 1px solid var(--line);
  background: var(--bg-alt);
  padding: 2rem 0;
}

.footer-inner {
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.footer-copy {
  margin: 0;
  font-size: 0.85rem;
  color: var(--text-dim);
}

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

.footer-links a {
  font-family: var(--font-display);
  font-size: 0.78rem;
  font-weight: 600;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--text-muted);
}

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

/* ---- Breakpoints ------------------------------------------------------------------ */

@media (min-width: 45rem) {
  .wrap {
    padding-inline: 2rem;
  }

  .section {
    padding: 5.5rem 0;
  }

  .card-grid {
    grid-template-columns: repeat(2, 1fr);
    gap: 1.5rem;
  }

  .card {
    padding: 2rem;
  }

  .footer-inner {
    flex-direction: row;
    align-items: center;
    justify-content: space-between;
  }
}

@media (min-width: 70rem) {
  .site-nav {
    gap: 2rem;
  }
}

/* Single-card layout — used while only one project is public; later in source than the 2-col media-query rule, so it wins at all widths */
.card-grid--single {
  grid-template-columns: 1fr;
  max-width: 640px;
}
