/* Aeoria studio homepage
   Typography-led field system. Dark ink, acid signal, Pixelify Sans + IBM Plex. */

:root {
  --ink: #0b0d10;
  --ink-2: #12161c;
  --ink-3: #1a2029;
  --paper: #e8eaed;
  --muted: #8b929e;
  --line: rgba(232, 234, 237, 0.12);
  --line-strong: rgba(232, 234, 237, 0.22);
  --signal: #c8f54a;
  --signal-dim: rgba(200, 245, 74, 0.14);
  --focus: #c8f54a;
  --font-display: "Pixelify Sans", system-ui, sans-serif;
  --font-body: "IBM Plex Sans", system-ui, sans-serif;
  --space: clamp(1rem, 2.4vw, 2rem);
  --rail: min(1120px, calc(100% - 2 * var(--space)));
  --ease: cubic-bezier(0.22, 1, 0.36, 1);
}

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

html {
  scroll-behavior: smooth;
}

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

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

body {
  margin: 0;
  min-height: 100vh;
  background:
    radial-gradient(1200px 600px at 85% -10%, rgba(200, 245, 74, 0.08), transparent 55%),
    radial-gradient(900px 500px at -10% 30%, rgba(90, 140, 255, 0.06), transparent 50%),
    var(--ink);
  color: var(--paper);
  font-family: var(--font-body);
  font-size: 1.0625rem;
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

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

a {
  color: inherit;
  text-decoration-thickness: 1px;
  text-underline-offset: 0.2em;
}

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

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

.skip {
  position: absolute;
  left: var(--space);
  top: -100px;
  z-index: 100;
  padding: 0.6rem 0.9rem;
  background: var(--signal);
  color: var(--ink);
  font-weight: 600;
  text-decoration: none;
  border-radius: 4px;
}

.skip:focus {
  top: var(--space);
}

/* Header */

.site-header {
  position: sticky;
  top: 0;
  z-index: 40;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  width: var(--rail);
  margin: 0 auto;
  padding: 1rem 0;
  background: color-mix(in srgb, var(--ink) 82%, transparent);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid transparent;
}

.site-header.is-scrolled {
  border-bottom-color: var(--line);
}

.wordmark {
  display: inline-flex;
  align-items: center;
  gap: 0.7rem;
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 1.05rem;
  letter-spacing: 0.02em;
  text-decoration: none;
}

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

.mark {
  color: var(--ink);
}

.mark-bg {
  fill: var(--signal);
}

.mark-stroke {
  stroke: var(--ink);
}

.site-nav {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 0.35rem 1.1rem;
  font-size: 0.9375rem;
  font-weight: 500;
}

.site-nav a {
  text-decoration: none;
  color: var(--muted);
  transition: color 160ms var(--ease);
}

.site-nav a:hover,
.site-nav a:focus-visible {
  color: var(--paper);
}

/* Hero */

.hero {
  width: var(--rail);
  margin: 0 auto;
  padding: clamp(2.5rem, 8vw, 5.5rem) 0 clamp(3rem, 7vw, 5rem);
  display: grid;
  grid-template-columns: minmax(0, 1.15fr) minmax(0, 0.85fr);
  gap: clamp(2rem, 5vw, 4rem);
  align-items: center;
  border-bottom: 1px solid var(--line);
}

.eyebrow {
  margin: 0 0 1rem;
  font-size: 0.8125rem;
  font-weight: 600;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--signal);
}

.hero h1 {
  margin: 0;
  font-family: var(--font-display);
  font-weight: 700;
  font-size: clamp(1.7rem, 4.2vw, 3.25rem);
  line-height: 1.18;
  letter-spacing: 0.01em;
  max-width: 16ch;
}

.lede {
  margin: 1.4rem 0 0;
  max-width: 36ch;
  color: var(--muted);
  font-size: clamp(1.05rem, 1.5vw, 1.2rem);
}

.hero-diagram {
  position: relative;
  aspect-ratio: 1;
  max-width: 420px;
  margin-left: auto;
}

.orbit {
  width: 100%;
  height: auto;
}

.ring {
  fill: none;
  stroke: var(--line-strong);
  stroke-width: 1.25;
}

.ring-a {
  stroke-dasharray: 6 10;
  animation: spin 48s linear infinite;
  transform-origin: 210px 210px;
}

.ring-b {
  stroke: color-mix(in srgb, var(--signal) 35%, var(--line-strong));
  animation: spin-rev 36s linear infinite;
  transform-origin: 210px 210px;
}

.ring-c {
  stroke: var(--signal);
  stroke-opacity: 0.55;
}

.nodes circle {
  fill: var(--signal);
}

.chord {
  fill: none;
  stroke: color-mix(in srgb, var(--signal) 45%, transparent);
  stroke-width: 1.25;
}

.practice-rail {
  position: absolute;
  inset: auto 0 8% 0;
  display: flex;
  justify-content: space-between;
  gap: 0.5rem;
  margin: 0;
  padding: 0 4%;
  list-style: none;
  font-family: var(--font-display);
  font-weight: 600;
  font-size: clamp(0.85rem, 1.5vw, 1rem);
  letter-spacing: 0.02em;
}

.practice-rail li {
  display: flex;
  flex-direction: column;
  gap: 0.15rem;
}

.practice-rail .idx {
  font-family: var(--font-body);
  font-size: 0.7rem;
  font-weight: 500;
  letter-spacing: 0.08em;
  color: var(--muted);
}

@keyframes spin {
  to {
    transform: rotate(360deg);
  }
}

@keyframes spin-rev {
  to {
    transform: rotate(-360deg);
  }
}

/* Practices: asymmetric editorial rows, not three equal cards */

.practices {
  width: var(--rail);
  margin: 0 auto;
  padding: clamp(2.5rem, 6vw, 4.5rem) 0;
  display: grid;
  gap: 0;
  border-bottom: 1px solid var(--line);
}

.practice {
  display: grid;
  grid-template-columns: minmax(10rem, 0.38fr) minmax(0, 0.62fr);
  gap: 1.25rem 2rem;
  padding: clamp(1.6rem, 3vw, 2.4rem) 0;
  border-top: 1px solid var(--line);
}

.practice:first-child {
  border-top: 0;
  padding-top: 0;
}

.practice header {
  display: flex;
  align-items: baseline;
  gap: 0.85rem;
}

.practice .idx {
  font-size: 0.75rem;
  font-weight: 600;
  letter-spacing: 0.1em;
  color: var(--signal);
}

.practice h2 {
  margin: 0;
  font-family: var(--font-display);
  font-size: clamp(1.55rem, 3.2vw, 2.4rem);
  font-weight: 700;
  letter-spacing: 0.01em;
  line-height: 1.12;
}

.practice p {
  margin: 0.35rem 0 0;
  max-width: 42ch;
  color: var(--muted);
}

.practice:nth-child(2) {
  grid-template-columns: minmax(0, 0.55fr) minmax(12rem, 0.45fr);
}

.practice:nth-child(2) header {
  order: 2;
  justify-content: flex-end;
}

.practice:nth-child(2) p {
  order: 1;
  margin-left: 0;
}

/* Work */

.work {
  width: var(--rail);
  margin: 0 auto;
  padding: clamp(2.75rem, 7vw, 5rem) 0;
  border-bottom: 1px solid var(--line);
}

.section-head {
  margin-bottom: clamp(1.75rem, 4vw, 2.75rem);
  max-width: 28rem;
}

.section-head h2 {
  margin: 0;
  font-family: var(--font-display);
  font-size: clamp(1.45rem, 3vw, 2.25rem);
  font-weight: 700;
  letter-spacing: 0.01em;
  line-height: 1.18;
}

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

.work-link {
  display: grid;
  grid-template-columns: minmax(0, 1.1fr) minmax(0, 1.4fr) auto;
  gap: 0.75rem 1.25rem;
  align-items: baseline;
  padding: 1.15rem 0.15rem;
  border-bottom: 1px solid var(--line);
  text-decoration: none;
  transition: background 180ms var(--ease), padding-left 180ms var(--ease);
}

.work-link:hover,
.work-link:focus-visible {
  color: inherit;
  background: var(--signal-dim);
  padding-left: 0.55rem;
}

.work-name {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 1.1rem;
  letter-spacing: 0.015em;
}

.work-desc {
  color: var(--muted);
  font-size: 0.98rem;
}

.work-arrow {
  color: var(--signal);
  font-size: 1.05rem;
  justify-self: end;
}

.work-more {
  margin-top: 1.75rem;
}

.work-more summary {
  cursor: pointer;
  width: fit-content;
  padding: 0.55rem 0.85rem;
  border: 1px solid var(--line-strong);
  border-radius: 999px;
  font-size: 0.9rem;
  font-weight: 500;
  color: var(--paper);
  list-style: none;
  transition: border-color 160ms var(--ease), background 160ms var(--ease);
}

.work-more summary::-webkit-details-marker {
  display: none;
}

.work-more summary::before {
  content: "+ ";
  color: var(--signal);
  font-weight: 600;
}

.work-more[open] summary::before {
  content: "- ";
}

.work-more summary:hover {
  border-color: var(--signal);
  background: var(--signal-dim);
}

.work-rest {
  list-style: none;
  margin: 1.25rem 0 0;
  padding: 0;
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0.65rem 1.25rem;
}

.work-rest a {
  display: flex;
  flex-direction: column;
  gap: 0.2rem;
  padding: 0.9rem 1rem;
  background: var(--ink-2);
  border: 1px solid var(--line);
  border-radius: 10px;
  text-decoration: none;
  transition: border-color 160ms var(--ease), transform 160ms var(--ease);
}

.work-rest a:hover,
.work-rest a:focus-visible {
  border-color: color-mix(in srgb, var(--signal) 50%, var(--line));
  color: inherit;
  transform: translateY(-1px);
}

.work-rest a span:first-child {
  font-family: var(--font-display);
  font-weight: 700;
  letter-spacing: 0.015em;
}

.work-rest a span:last-child {
  color: var(--muted);
  font-size: 0.9rem;
}

/* Close */

.close {
  width: var(--rail);
  margin: 0 auto;
  padding: clamp(3rem, 8vw, 5.5rem) 0;
}

.close h2 {
  margin: 0;
  max-width: 18ch;
  font-family: var(--font-display);
  font-size: clamp(1.6rem, 3.6vw, 2.7rem);
  font-weight: 700;
  letter-spacing: 0.01em;
  line-height: 1.16;
}

.close p {
  margin: 1.2rem 0 0;
  max-width: 38ch;
  color: var(--muted);
  font-size: 1.1rem;
}

/* Footer */

.site-footer {
  width: var(--rail);
  margin: 0 auto;
  padding: 1.5rem 0 2.5rem;
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 1rem;
  border-top: 1px solid var(--line);
  color: var(--muted);
  font-size: 0.9rem;
}

.footer-brand strong {
  display: block;
  color: var(--paper);
  font-family: var(--font-display);
  font-size: 0.95rem;
  letter-spacing: 0.02em;
}

.footer-brand p {
  margin: 0.25rem 0 0;
}

.footer-meta {
  margin: 0;
  align-self: flex-end;
}

/* Entrance */

.hero-copy,
.hero-diagram,
.practice,
.section-head,
.work-featured,
.close {
  opacity: 0;
  transform: translateY(14px);
  animation: rise 700ms var(--ease) forwards;
}

.hero-copy {
  animation-delay: 60ms;
}

.hero-diagram {
  animation-delay: 180ms;
}

.practice:nth-child(1) {
  animation-delay: 80ms;
}

.practice:nth-child(2) {
  animation-delay: 140ms;
}

.practice:nth-child(3) {
  animation-delay: 200ms;
}

.section-head {
  animation-delay: 60ms;
}

.work-featured {
  animation-delay: 120ms;
}

.close {
  animation-delay: 80ms;
}

@keyframes rise {
  to {
    opacity: 1;
    transform: none;
  }
}

@media (prefers-reduced-motion: reduce) {
  .hero-copy,
  .hero-diagram,
  .practice,
  .section-head,
  .work-featured,
  .close {
    opacity: 1;
    transform: none;
    animation: none;
  }

  .ring-a,
  .ring-b {
    animation: none;
  }
}

/* Responsive */

@media (max-width: 860px) {
  .hero {
    grid-template-columns: 1fr;
    padding-top: 2rem;
  }

  .hero h1 {
    max-width: 18ch;
    font-size: clamp(1.55rem, 7.2vw, 2.35rem);
    line-height: 1.22;
    letter-spacing: 0.005em;
  }

  .hero-diagram {
    margin: 0 auto;
    max-width: 320px;
    order: -1;
  }

  .practice,
  .practice:nth-child(2) {
    grid-template-columns: 1fr;
  }

  .practice:nth-child(2) header {
    order: 0;
    justify-content: flex-start;
  }

  .work-link {
    grid-template-columns: 1fr auto;
    grid-template-areas:
      "name arrow"
      "desc arrow";
  }

  .work-name {
    grid-area: name;
  }

  .work-desc {
    grid-area: desc;
  }

  .work-arrow {
    grid-area: arrow;
    align-self: center;
  }
}

@media (max-width: 560px) {
  .site-header {
    flex-direction: column;
    align-items: flex-start;
    padding: 0.85rem 0;
  }

  .site-nav {
    width: 100%;
    justify-content: flex-start;
    gap: 0.75rem 1rem;
    padding-bottom: 0.25rem;
  }

  .work-rest {
    grid-template-columns: 1fr;
  }

  .practice-rail {
    font-size: 0.8rem;
  }
}
