/* ==========================================================================
   snate.art — personal project hub stylesheet
   Same design system as audiofin-site. No frameworks, no external assets,
   no JavaScript. All styles live here (strict CSP: style-src 'self').
   ==========================================================================

   Contents
   --------
   1. Design tokens (custom properties)
   2. Reset & base
   3. Typography
   4. Layout helpers
   5. Header & navigation (CSS-only mobile menu)
   6. Hero
   7. Section chrome (eyebrows, headings)
   8. Project grid
   9. About
   10. Footer
   11. Accessibility & motion
   ========================================================================== */


/* 1. Design tokens
   ========================================================================== */

:root {
  /* Color */
  --bg:            #0a0c13;
  --bg-raised:     #10131d;
  --card:          #12151f;
  --card-hover:    #161a27;
  --border:        rgba(255, 255, 255, 0.08);
  --border-strong: rgba(255, 255, 255, 0.14);

  --text:          #e9ebf3;
  --text-muted:    #a2a9bd;
  --text-faint:    #78809a;

  --accent-1:      #7c5cff;
  --accent-2:      #4a90e2;
  --accent-soft:   #a795ff;              /* readable accent on dark */
  --gradient:      linear-gradient(135deg, var(--accent-1), var(--accent-2));

  /* Spacing scale */
  --space-1: 0.25rem;
  --space-2: 0.5rem;
  --space-3: 0.75rem;
  --space-4: 1rem;
  --space-5: 1.5rem;
  --space-6: 2rem;
  --space-7: 3rem;
  --space-8: 4.5rem;
  --space-9: 7rem;

  /* Shape & effects */
  --radius-sm: 10px;
  --radius-md: 16px;
  --radius-lg: 24px;
  --shadow-card: 0 1px 2px rgba(0, 0, 0, 0.4), 0 12px 32px rgba(0, 0, 0, 0.35);
  --glow: 0 0 60px rgba(124, 92, 255, 0.25);

  /* Type */
  --font-sans: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto,
               "Helvetica Neue", Arial, sans-serif;

  /* Layout */
  --container: 68rem;
  --header-h: 4rem;
}


/* 2. Reset & base
   ========================================================================== */

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

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

body {
  margin: 0;
  font-family: var(--font-sans);
  font-size: 1.0625rem;
  line-height: 1.65;
  color: var(--text);
  background-color: var(--bg);
  /* Soft ambient glows behind the whole page */
  background-image:
    radial-gradient(56rem 32rem at 85% -6rem, rgba(124, 92, 255, 0.14), transparent 60%),
    radial-gradient(48rem 30rem at 0% 22rem, rgba(74, 144, 226, 0.10), transparent 60%);
  background-repeat: no-repeat;
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
}

img,
svg,
video {
  max-width: 100%;
  height: auto;
}

svg {
  display: block;
}

/* Anchored sections land below the sticky header */
section[id],
[id] {
  scroll-margin-top: calc(var(--header-h) + 1.5rem);
}


/* 3. Typography
   ========================================================================== */

h1,
h2,
h3 {
  margin: 0;
  line-height: 1.15;
  letter-spacing: -0.02em;
  font-weight: 700;
  text-wrap: balance;
}

h1 {
  font-size: clamp(2.5rem, 6.5vw, 3.75rem);
  letter-spacing: -0.03em;
}

h2 {
  font-size: clamp(1.75rem, 4vw, 2.375rem);
}

h3 {
  font-size: 1.125rem;
}

p {
  margin: 0;
}

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

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

.muted {
  color: var(--text-muted);
}


/* 4. Layout helpers
   ========================================================================== */

.container {
  width: 100%;
  max-width: var(--container);
  margin-inline: auto;
  padding-inline: var(--space-5);
}

.section {
  padding-block: var(--space-8);
}

@media (min-width: 48em) {
  .section {
    padding-block: var(--space-9);
  }
}


/* 5. Header & navigation
   ========================================================================== */

.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: rgba(10, 12, 19, 0.8);
  -webkit-backdrop-filter: saturate(140%) blur(14px);
  backdrop-filter: saturate(140%) blur(14px);
  border-bottom: 1px solid var(--border);
}

.nav {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--space-4);
  min-height: var(--header-h);
  position: relative;
}

/* Brand (logo + wordmark) */
.brand {
  display: inline-flex;
  align-items: center;
  gap: 0.65rem;
  color: var(--text);
  font-weight: 700;
  font-size: 1.125rem;
  letter-spacing: -0.01em;
}

.brand:hover {
  text-decoration: none;
}

/* Logo mark — inline SVG gradient rounded square */
.logo-mark {
  width: 2.1rem;
  height: 2.1rem;
  border-radius: 0.55rem;
  flex: none;
  box-shadow: 0 2px 10px rgba(124, 92, 255, 0.35);
}

/* Nav links */
.nav-links {
  display: flex;
  align-items: center;
  gap: var(--space-5);
  list-style: none;
  margin: 0;
  padding: 0;
}

.nav-links a {
  color: var(--text-muted);
  font-size: 0.95rem;
  font-weight: 500;
  padding: 0.35rem 0.15rem;
}

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

/* Mobile toggle (CSS-only checkbox pattern) */
.nav-toggle {
  position: absolute;
  width: 1px;
  height: 1px;
  opacity: 0;
  pointer-events: none;
}

.nav-burger {
  display: none;
  flex-direction: column;
  justify-content: center;
  gap: 5px;
  width: 2.5rem;
  height: 2.5rem;
  padding: 0.5rem;
  border-radius: var(--radius-sm);
  cursor: pointer;
}

.nav-burger:hover {
  background: rgba(255, 255, 255, 0.06);
}

.nav-burger span {
  display: block;
  height: 2px;
  border-radius: 2px;
  background: var(--text);
  transition: transform 0.25s ease, opacity 0.2s ease;
}

/* Show ring on the burger when the (hidden) checkbox is keyboard-focused */
.nav-toggle:focus-visible ~ .nav-burger {
  outline: 2px solid var(--accent-soft);
  outline-offset: 2px;
}

@media (max-width: 47.99em) {
  .nav-burger {
    display: flex;
  }

  .nav-links {
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    flex-direction: column;
    align-items: stretch;
    gap: 0;
    padding: var(--space-2) var(--space-3) var(--space-3);
    background: rgba(12, 14, 22, 0.97);
    border-bottom: 1px solid var(--border);
    box-shadow: 0 24px 40px rgba(0, 0, 0, 0.45);

    /* Collapsed by default */
    visibility: hidden;
    opacity: 0;
    transform: translateY(-0.5rem);
    transition: opacity 0.2s ease, transform 0.2s ease, visibility 0.2s;
  }

  .nav-toggle:checked ~ .nav-links {
    visibility: visible;
    opacity: 1;
    transform: translateY(0);
  }

  .nav-links a {
    display: block;
    padding: 0.85rem var(--space-3);
    border-radius: var(--radius-sm);
    font-size: 1.05rem;
  }

  .nav-links a:hover {
    background: rgba(255, 255, 255, 0.05);
  }

  /* Burger morphs into an X when open */
  .nav-toggle:checked ~ .nav-burger span:nth-child(1) {
    transform: translateY(7px) rotate(45deg);
  }

  .nav-toggle:checked ~ .nav-burger span:nth-child(2) {
    opacity: 0;
  }

  .nav-toggle:checked ~ .nav-burger span:nth-child(3) {
    transform: translateY(-7px) rotate(-45deg);
  }
}


/* 6. Hero
   ========================================================================== */

.hero {
  padding-block: var(--space-8);
  text-align: center;
}

@media (min-width: 48em) {
  .hero {
    padding-block: var(--space-9);
  }
}

.hero-inner {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: var(--space-5);
  max-width: 44rem;
  margin-inline: auto;
}

/* Gradient wash on part of the headline */
.gradient-text {
  background: var(--gradient);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

.hero-tagline {
  font-size: clamp(1.15rem, 2.5vw, 1.35rem);
  color: var(--text-muted);
  max-width: 36rem;
  text-wrap: balance;
}


/* 7. Section chrome
   ========================================================================== */

.section-head {
  max-width: 40rem;
  margin: 0 auto var(--space-7);
  text-align: center;
  display: flex;
  flex-direction: column;
  gap: var(--space-3);
}

.eyebrow {
  font-size: 0.82rem;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--accent-soft);
}

.section-head p {
  color: var(--text-muted);
}


/* 8. Project grid
   ========================================================================== */

.feature-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(15.5rem, 1fr));
  gap: var(--space-4);
  max-width: 44rem;
  margin-inline: auto;
}

.feature-card {
  display: flex;
  flex-direction: column;
  gap: var(--space-3);
  padding: var(--space-5);
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-card);
  transition: transform 0.2s ease, border-color 0.2s ease, background-color 0.2s ease;
}

.feature-card:hover {
  transform: translateY(-3px);
  border-color: rgba(124, 92, 255, 0.35);
  background: var(--card-hover);
}

.feature-card p {
  color: var(--text-muted);
  font-size: 0.97rem;
}

/* Project app-icon mark — a small gradient rounded square (inline SVG) */
.project-icon {
  width: 2.75rem;
  height: 2.75rem;
  border-radius: 0.8rem;
  flex: none;
  box-shadow: 0 2px 10px rgba(124, 92, 255, 0.35);
}

/* Title + platform pill on one line */
.card-title-row {
  display: flex;
  align-items: center;
  gap: var(--space-3);
}

.pill {
  display: inline-flex;
  align-items: center;
  padding: 0.15rem 0.6rem;
  border-radius: 999px;
  border: 1px solid rgba(124, 92, 255, 0.4);
  background: rgba(124, 92, 255, 0.1);
  color: var(--accent-soft);
  font-size: 0.72rem;
  font-weight: 600;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

/* "Free" — the prominent price indicator: filled with the brand gradient */
.pill--free {
  border-color: transparent;
  background: var(--gradient);
  color: #fff;
}

/* Keep the title + its badges together, wrapping gracefully on narrow cards */
.card-title-row {
  flex-wrap: wrap;
  row-gap: var(--space-2);
}

/* Feature chips under a card's description (short key points) */
.card-tags {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-2);
}

.tag {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  padding: 0.2rem 0.65rem;
  border-radius: 999px;
  border: 1px solid var(--border-strong);
  background: rgba(255, 255, 255, 0.03);
  color: var(--text-muted);
  font-size: 0.8rem;
  font-weight: 500;
}

/* Small gradient dot marker — a quiet on-brand touch */
.tag::before {
  content: "";
  width: 0.4rem;
  height: 0.4rem;
  border-radius: 999px;
  background: var(--gradient);
  flex: none;
}

/* "Visit →" link pinned to the card's bottom edge */
.card-link {
  margin-top: auto;
  align-self: flex-start;
  padding-top: var(--space-2);
  font-size: 0.95rem;
  font-weight: 600;
}

/* Placeholder card — deliberately quiet, clearly intentional */
.feature-card--placeholder {
  justify-content: center;
  align-items: center;
  text-align: center;
  background: transparent;
  border: 1px dashed var(--border-strong);
  box-shadow: none;
}

.feature-card--placeholder:hover {
  transform: none;
  background: rgba(255, 255, 255, 0.015);
  border-color: var(--border-strong);
}

.feature-card--placeholder h3 {
  color: var(--text-faint);
  font-weight: 600;
}

.feature-card--placeholder p {
  color: var(--text-faint);
}


/* 9. About
   ========================================================================== */

.about {
  border-block: 1px solid var(--border);
  background: rgba(255, 255, 255, 0.015);
}

/* Three principles as quiet cards in the same family as .feature-card:
   a gradient icon chip, a bold label, one muted line. Not interactive,
   so no hover lift — deliberately still. */
.principles {
  list-style: none;
  margin: 0;
  margin-inline: auto;
  padding: 0;
  max-width: 56rem;
  display: grid;
  gap: var(--space-4);
  text-align: left;
}

/* Mobile-first: a compact row — icon chip on the left, label + line
   stacked beside it, so the stack reads as designed, not as a bare list. */
.principle {
  display: grid;
  grid-template-columns: auto 1fr;
  column-gap: var(--space-4);
  row-gap: var(--space-1);
  align-items: start;
  padding: var(--space-5);
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-card);
}

/* Gradient icon chip — same treatment as the brand mark / project icons */
.principle-icon {
  grid-row: 1 / span 2;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 2.6rem;
  height: 2.6rem;
  border-radius: var(--radius-sm);
  background: var(--gradient);
  color: #fff;
  box-shadow: 0 2px 10px rgba(124, 92, 255, 0.35);
}

.principle-icon svg {
  width: 1.3rem;
  height: 1.3rem;
}

.principle h3 {
  font-size: 1.05rem;
}

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

/* Desktop: three balanced columns, icon chip leading each card */
@media (min-width: 48em) {
  .principles {
    grid-template-columns: repeat(3, 1fr);
  }

  .principle {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: var(--space-3);
  }
}


/* 9b. 404 / error page
   ========================================================================== */

.error-code {
  font-size: clamp(3.5rem, 12vw, 6rem);
  font-weight: 700;
  line-height: 1;
  letter-spacing: -0.03em;
}

.btn-home {
  display: inline-flex;
  align-items: center;
  padding: 0.7rem 1.4rem;
  border-radius: 999px;
  background: var(--gradient);
  color: #fff;
  font-weight: 600;
  box-shadow: var(--glow);
}

.btn-home:hover {
  text-decoration: none;
  transform: translateY(-1px);
}


/* 10. Footer
   ========================================================================== */

.site-footer {
  border-top: 1px solid var(--border);
  padding-block: var(--space-6);
  margin-top: var(--space-8);
}

.footer-inner {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: var(--space-4);
  font-size: 0.9rem;
  color: var(--text-faint);
}

.footer-links {
  display: flex;
  align-items: center;
  gap: var(--space-5);
  list-style: none;
  margin: 0;
  padding: 0;
}

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

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


/* 11. Accessibility & motion
   ========================================================================== */

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

/* Skip link for keyboard users */
.skip-link {
  position: absolute;
  left: 1rem;
  top: -3.5rem;
  z-index: 100;
  padding: 0.6rem 1rem;
  border-radius: var(--radius-sm);
  background: var(--gradient);
  color: #fff;
  font-weight: 600;
  transition: top 0.2s ease;
}

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

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

  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    transition-duration: 0.01ms !important;
  }
}
