/* ==========================================================================
   Avagram — shared stylesheet
   A dark "message space in the air" theme with holographic accents.
   ========================================================================== */

:root {
  --ink: #070b18;
  --ink-raised: #0d1428;
  --ink-card: rgba(20, 29, 54, 0.72);
  --line: rgba(150, 180, 255, 0.16);
  --line-strong: rgba(150, 180, 255, 0.3);
  --text: #e8ecff;
  --text-muted: #9aa6c8;
  --cyan: #4de1ff;
  --violet: #8b7cff;
  --pink: #ff7ad9;
  --hologram-gradient: linear-gradient(120deg, var(--cyan), var(--violet) 55%, var(--pink));
  --radius: 16px;
  --shell: 1120px;
  --font-sans: "Inter", "Segoe UI", system-ui, -apple-system, "Helvetica Neue", Arial, sans-serif;
  --font-display: "Inter", "Segoe UI", system-ui, -apple-system, sans-serif;
}

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

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  background: var(--ink);
  color: var(--text);
  font-family: var(--font-sans);
  font-size: 1rem;
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

img {
  max-width: 100%;
  height: auto;
  display: block;
}

a {
  color: var(--cyan);
  text-decoration-thickness: 1px;
  text-underline-offset: 3px;
}

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

h1,
h2,
h3 {
  font-family: var(--font-display);
  line-height: 1.15;
  letter-spacing: -0.02em;
  margin: 0 0 0.5em;
  font-weight: 700;
}

h1 {
  font-size: clamp(2.2rem, 5vw, 3.75rem);
}

h2 {
  font-size: clamp(1.65rem, 3vw, 2.4rem);
}

h3 {
  font-size: 1.2rem;
}

p {
  margin: 0 0 1em;
}

ul,
ol {
  margin: 0 0 1em;
  padding-left: 1.25em;
}

li + li {
  margin-top: 0.55em;
}

strong {
  color: #ffffff;
  font-weight: 600;
}

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

.skip-link {
  position: absolute;
  top: -60px;
  left: 1rem;
  z-index: 100;
  padding: 0.75rem 1.25rem;
  background: var(--cyan);
  color: var(--ink);
  font-weight: 700;
  border-radius: 10px;
  transition: top 0.15s ease;
}

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

.shell {
  width: min(100% - 2.5rem, var(--shell));
  margin-inline: auto;
}

/* ---------- Header ------------------------------------------------------ */

.site-header {
  position: sticky;
  top: 0;
  z-index: 40;
  backdrop-filter: blur(14px);
  background: rgba(7, 11, 24, 0.72);
  border-bottom: 1px solid var(--line);
}

.header-inner {
  display: flex;
  align-items: center;
  gap: 2rem;
  min-height: 72px;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 0.6rem;
  color: var(--text);
  text-decoration: none;
  font-weight: 700;
  letter-spacing: -0.01em;
}

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

.brand-mark {
  width: 34px;
  height: 34px;
  flex: none;
}

.brand-word {
  font-size: 1.25rem;
  background: var(--hologram-gradient);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

.site-nav {
  display: flex;
  gap: 1.6rem;
  margin-left: auto;
}

.site-nav a {
  color: var(--text-muted);
  text-decoration: none;
  font-size: 0.95rem;
}

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

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

.button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  padding: 0.8rem 1.5rem;
  border-radius: 999px;
  border: 1px solid transparent;
  background: var(--hologram-gradient);
  color: #071020;
  font-weight: 700;
  font-size: 0.98rem;
  text-decoration: none;
  transition: transform 0.15s ease, box-shadow 0.2s ease, filter 0.2s ease;
  box-shadow: 0 6px 28px rgba(77, 225, 255, 0.18);
}

.button:hover {
  color: #071020;
  transform: translateY(-2px);
  filter: brightness(1.06);
  box-shadow: 0 10px 34px rgba(139, 124, 255, 0.28);
}

.button-small {
  padding: 0.55rem 1.15rem;
  font-size: 0.9rem;
}

.button-ghost {
  background: transparent;
  border-color: var(--line-strong);
  color: var(--text);
  box-shadow: none;
}

.button-ghost:hover {
  color: var(--text);
  border-color: var(--cyan);
  background: rgba(77, 225, 255, 0.06);
  box-shadow: none;
}

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

.aurora {
  position: absolute;
  inset: 0 0 auto;
  height: 780px;
  overflow: hidden;
  pointer-events: none;
  z-index: -1;
}

.aurora-blob {
  position: absolute;
  border-radius: 50%;
  filter: blur(90px);
  opacity: 0.35;
}

.aurora-blob-1 {
  width: 520px;
  height: 520px;
  top: -140px;
  left: -120px;
  background: radial-gradient(circle, rgba(77, 225, 255, 0.55), transparent 65%);
}

.aurora-blob-2 {
  width: 620px;
  height: 620px;
  top: -220px;
  right: -160px;
  background: radial-gradient(circle, rgba(139, 124, 255, 0.55), transparent 65%);
}

.aurora-blob-3 {
  width: 460px;
  height: 460px;
  top: 340px;
  left: 40%;
  background: radial-gradient(circle, rgba(255, 122, 217, 0.3), transparent 65%);
}

.hero {
  padding: clamp(3.5rem, 9vw, 7rem) 0 clamp(3rem, 6vw, 5rem);
}

.hero-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.05fr) minmax(0, 0.95fr);
  align-items: center;
  gap: clamp(2rem, 5vw, 4rem);
}

.eyebrow {
  margin: 0 0 1rem;
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--cyan);
}

.hero h1 {
  margin-bottom: 1.1rem;
}

.lede {
  font-size: clamp(1.02rem, 1.6vw, 1.15rem);
  color: var(--text-muted);
  max-width: 56ch;
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.9rem;
  margin: 1.8rem 0 2.4rem;
}

.hero-stats {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 1rem;
  margin: 0;
  padding-top: 1.6rem;
  border-top: 1px solid var(--line);
  max-width: 520px;
}

.hero-stats dt {
  font-size: 0.78rem;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  color: var(--text-muted);
}

.hero-stats dd {
  margin: 0.2rem 0 0;
  font-weight: 600;
  font-size: 0.98rem;
}

.hero-art img {
  width: 100%;
  height: auto;
  animation: hover-drift 7s ease-in-out infinite;
}

@keyframes hover-drift {
  0%,
  100% {
    transform: translateY(0);
  }
  50% {
    transform: translateY(-14px);
  }
}

/* ---------- Sections ---------------------------------------------------- */

.section {
  padding: clamp(3rem, 7vw, 5.5rem) 0;
}

.section-alt {
  background:
    linear-gradient(180deg, rgba(13, 20, 40, 0) 0%, rgba(13, 20, 40, 0.7) 12%, rgba(13, 20, 40, 0.7) 88%, rgba(13, 20, 40, 0) 100%);
  border-block: 1px solid var(--line);
}

.section-head {
  max-width: 680px;
  margin-bottom: clamp(2rem, 4vw, 3rem);
}

.section-lede {
  color: var(--text-muted);
  font-size: 1.05rem;
}

/* Steps */
.steps {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 1.5rem;
}

.step {
  background: var(--ink-card);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 1.25rem 1.4rem 1.6rem;
  transition: border-color 0.2s ease, transform 0.2s ease;
}

.step:hover {
  border-color: var(--line-strong);
  transform: translateY(-4px);
}

.step img {
  width: 100%;
  border-radius: 12px;
  margin-bottom: 1.2rem;
  background: rgba(8, 13, 28, 0.55);
}

.step p {
  color: var(--text-muted);
  margin: 0;
}

/* Spaces */
.spaces-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  gap: clamp(2rem, 5vw, 4rem);
  align-items: center;
}

.check-list {
  list-style: none;
  padding: 0;
}

.check-list li {
  position: relative;
  padding-left: 1.75rem;
  color: var(--text-muted);
}

.check-list li::before {
  content: "";
  position: absolute;
  left: 0;
  top: 0.45em;
  width: 0.7rem;
  height: 0.7rem;
  border-radius: 50%;
  background: var(--hologram-gradient);
  box-shadow: 0 0 12px rgba(77, 225, 255, 0.5);
}

.space-cards {
  display: grid;
  gap: 1rem;
}

.space-card {
  background: var(--ink-card);
  border: 1px solid var(--line);
  border-left: 3px solid transparent;
  border-image: var(--hologram-gradient) 1;
  border-radius: 12px;
  padding: 1.1rem 1.3rem;
  backdrop-filter: blur(6px);
}

.space-card-tilt {
  transform: translateX(1.25rem) rotate(-0.6deg);
}

.space-tag {
  display: inline-block;
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--violet);
  margin-bottom: 0.35rem;
}

.space-title {
  font-weight: 600;
  margin-bottom: 0.35rem;
}

.space-meta {
  margin: 0;
  font-size: 0.85rem;
  color: var(--text-muted);
}

/* Anatomy of an avagram */
.anatomy-grid {
  display: grid;
  grid-template-columns: minmax(0, 0.85fr) minmax(0, 1.15fr);
  gap: clamp(2rem, 5vw, 4rem);
  align-items: center;
}

.anatomy-art img {
  width: 100%;
  border-radius: var(--radius);
  border: 1px solid var(--line);
}

.anatomy-copy h2 {
  margin-bottom: 0.75rem;
}

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

.anatomy-note {
  margin-top: 1.4rem;
  padding-left: 1rem;
  border-left: 2px solid var(--violet);
  font-size: 0.95rem;
}

/* Principles */
.principles {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 1.5rem;
}

.principle {
  padding: 1.6rem;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: linear-gradient(160deg, rgba(20, 29, 54, 0.75), rgba(13, 20, 40, 0.35));
}

.principle h3 {
  color: #ffffff;
}

.principle p {
  color: var(--text-muted);
  margin: 0;
}

/* Callout */
.callout-section {
  padding: 0 0 clamp(3.5rem, 7vw, 6rem);
}

.callout {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 2rem;
  padding: clamp(1.75rem, 4vw, 2.75rem);
  border-radius: 22px;
  border: 1px solid var(--line-strong);
  background:
    radial-gradient(120% 160% at 0% 0%, rgba(77, 225, 255, 0.14), transparent 55%),
    radial-gradient(120% 160% at 100% 100%, rgba(255, 122, 217, 0.12), transparent 55%),
    var(--ink-raised);
}

.callout h2 {
  margin-bottom: 0.4rem;
  font-size: clamp(1.4rem, 2.6vw, 2rem);
}

.callout p {
  margin: 0;
  color: var(--text-muted);
  max-width: 60ch;
}

/* ---------- Legal / privacy page --------------------------------------- */

.legal-main {
  padding: clamp(2.5rem, 6vw, 4.5rem) 0;
}

.legal-shell {
  display: flex;
  justify-content: center;
}

.legal {
  width: 100%;
  max-width: 760px;
}

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

.legal-header h1 {
  margin-bottom: 0.35rem;
}

.legal-meta {
  color: var(--text-muted);
  font-size: 0.9rem;
}

.legal-summary {
  font-size: 1.05rem;
  color: var(--text-muted);
  margin-top: 1.25rem;
}

.legal-toc {
  background: var(--ink-card);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 1.4rem 1.6rem;
  margin-bottom: 2.5rem;
}

.legal-toc h2 {
  font-size: 0.8rem;
  text-transform: uppercase;
  letter-spacing: 0.14em;
  color: var(--text-muted);
  margin-bottom: 0.75rem;
}

.legal-toc ol {
  columns: 2;
  column-gap: 2rem;
  margin: 0;
  font-size: 0.95rem;
}

.legal-toc li {
  break-inside: avoid;
  margin-top: 0;
  margin-bottom: 0.45rem;
}

.legal-toc a {
  color: var(--text);
  text-decoration: none;
}

.legal-toc a:hover {
  color: var(--cyan);
  text-decoration: underline;
}

.legal section {
  margin-bottom: 2.75rem;
  scroll-margin-top: 90px;
}

.legal section h2 {
  font-size: clamp(1.3rem, 2.4vw, 1.65rem);
  margin-bottom: 0.9rem;
}

.legal section h3 {
  font-size: 1.05rem;
  margin-top: 1.5rem;
  color: #ffffff;
}

.legal p,
.legal li {
  color: #c3cbe6;
}

.legal ul {
  padding-left: 1.2em;
}

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

.legal-back {
  border-top: 1px solid var(--line);
  padding-top: 1.5rem;
  font-weight: 600;
}

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

.not-found {
  text-align: center;
  padding: clamp(4rem, 12vw, 9rem) 0;
}

.not-found h1 {
  font-size: clamp(1.9rem, 4vw, 2.8rem);
}

.not-found p {
  color: var(--text-muted);
  max-width: 48ch;
  margin-inline: auto;
}

.not-found .button {
  margin-top: 1rem;
}

/* ---------- Footer ------------------------------------------------------ */

.site-footer {
  border-top: 1px solid var(--line);
  padding: 2.75rem 0;
  background: rgba(6, 9, 20, 0.8);
}

.footer-inner {
  display: grid;
  grid-template-columns: 1.2fr auto;
  gap: 2rem;
  align-items: start;
}

.footer-tagline {
  color: var(--text-muted);
  font-size: 0.9rem;
  margin: 0.75rem 0 0;
}

.footer-nav {
  display: flex;
  gap: 1.5rem;
  justify-content: flex-end;
}

.footer-nav a {
  color: var(--text-muted);
  text-decoration: none;
  font-size: 0.92rem;
}

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

.footer-legal {
  grid-column: 1 / -1;
  margin: 0;
  padding-top: 1.5rem;
  border-top: 1px solid var(--line);
  color: var(--text-muted);
  font-size: 0.82rem;
}

/* ---------- Responsive -------------------------------------------------- */

@media (max-width: 900px) {
  .hero-grid,
  .spaces-grid,
  .anatomy-grid {
    grid-template-columns: 1fr;
  }

  .anatomy-art {
    max-width: 460px;
  }

  .hero-art {
    order: -1;
    max-width: 520px;
  }

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

  .space-card-tilt {
    transform: none;
  }

  .site-nav {
    display: none;
  }

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

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

  .hero-stats {
    grid-template-columns: 1fr;
    gap: 0.75rem;
  }

  .footer-inner {
    grid-template-columns: 1fr;
  }

  .footer-nav {
    justify-content: flex-start;
    flex-wrap: wrap;
  }

  .legal-toc ol {
    columns: 1;
  }

  .header-inner {
    min-height: 64px;
    gap: 1rem;
  }

  .button-small {
    margin-left: auto;
  }
}

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

  *,
  *::before,
  *::after {
    animation-duration: 0.001ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.001ms !important;
  }
}
