/**
 * Aeostara project pages on Raven Forge.
 * Scoped to Aeostara and Ennea project pages so the rest of the theme is unchanged.
 */

body.rf-aeostara main > .rf-page-hero,
body.rf-ennea main > .rf-page-hero {
  display: none;
}

body.rf-aeostara main > .rf-section,
body.rf-ennea main > .rf-section {
  padding: 0;
  background: transparent;
}

body.rf-aeostara main > .rf-section > .rf-container,
body.rf-ennea main > .rf-section > .rf-container {
  max-width: none;
  width: auto;
  margin: 0;
  padding: 0;
}

.ao {
  padding-top: 72px;
  color: var(--rf-text);
}

.ao-subnav {
  position: sticky;
  top: 72px;
  z-index: 30;
  background: rgba(6, 17, 29, 0.92);
  border-bottom: 1px solid var(--rf-border);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
}

.ao-subnav__list {
  display: flex;
  gap: 6px;
  width: min(1180px, calc(100% - 32px));
  margin: 0 auto;
  padding: 12px 0;
  overflow-x: auto;
  list-style: none;
  scrollbar-width: thin;
}

.ao-subnav__link {
  display: inline-flex;
  align-items: center;
  padding: 7px 12px;
  border: 1px solid transparent;
  border-radius: 999px;
  color: var(--rf-mist);
  font-size: 0.82rem;
  font-weight: 600;
  letter-spacing: 0.01em;
  line-height: 1.2;
  white-space: nowrap;
  text-decoration: none;
}

.ao-subnav__link:hover {
  color: var(--rf-frost);
  border-color: var(--rf-border);
}

.ao-subnav__link.is-current {
  color: var(--rf-void);
  background: var(--rf-glacier);
  border-color: transparent;
}

.ao-wrap {
  width: min(1120px, calc(100% - 48px));
  margin-inline: auto;
}

.ao-hero {
  padding: clamp(48px, 7vw, 88px) 0 clamp(36px, 5vw, 64px);
}

.ao-hero__grid {
  display: grid;
  grid-template-columns: minmax(0, 1.3fr) minmax(240px, 0.7fr);
  gap: clamp(28px, 4vw, 56px);
  align-items: center;
}

.ao-kicker {
  margin: 0 0 14px;
  color: var(--rf-glacier);
  font-family: var(--rf-font-mono);
  font-size: 0.75rem;
  font-weight: 500;
  letter-spacing: 0.12em;
  line-height: 1.5;
  text-transform: uppercase;
}

.ao h1,
.ao h2,
.ao h3 {
  color: var(--rf-frost);
  text-wrap: balance;
}

.ao h1 {
  max-width: 16ch;
  margin: 0;
  font-size: clamp(2.5rem, 5.4vw, 4.4rem);
  font-weight: 760;
  letter-spacing: -0.045em;
  line-height: 0.98;
}

.ao-hero--text h1 {
  max-width: 18ch;
}

.ao-lead {
  max-width: 68ch;
  margin: 22px 0 0;
  color: var(--rf-mist);
  font-size: clamp(1.05rem, 1.5vw, 1.2rem);
  line-height: 1.7;
}

.ao-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 28px;
}

.ao-figure {
  margin: 0;
}

.ao-figure img {
  width: min(100%, 420px);
  margin-inline: auto;
  border: 1px solid var(--rf-border);
  border-radius: var(--rf-radius-lg);
  background: var(--rf-indigo);
}

.ao-figure.ao-figure--wide img {
  width: 100%;
  max-width: none;
}

.ao-section {
  padding: clamp(56px, 7vw, 96px) 0;
}

.ao-section--band {
  background: rgba(11, 24, 39, 0.72);
  border-block: 1px solid var(--rf-border);
}

.ao-section h2 {
  margin: 0;
  font-size: clamp(1.8rem, 3.2vw, 2.6rem);
  letter-spacing: -0.03em;
}

.ao-section .ao-lead {
  margin-top: 14px;
}

.ao-copy {
  max-width: 74ch;
  margin-top: 18px;
}

.ao-copy p {
  margin: 0 0 1rem;
  color: var(--rf-text);
  font-size: 1.02rem;
  line-height: 1.75;
}

.ao-copy p:last-child {
  margin-bottom: 0;
}

.ao-grid {
  display: grid;
  gap: 16px;
  margin-top: 28px;
}

.ao-grid--2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.ao-grid--3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.ao-grid--4 { grid-template-columns: repeat(4, minmax(0, 1fr)); }

.ao-card {
  display: flex;
  flex-direction: column;
  gap: 8px;
  min-height: 100%;
  padding: 22px;
  border: 1px solid var(--rf-border);
  border-radius: var(--rf-radius);
  background: linear-gradient(180deg, rgba(16, 38, 59, 0.92), rgba(11, 24, 39, 0.92));
  color: inherit;
  text-decoration: none;
}

a.ao-card:hover {
  border-color: var(--rf-border-hover);
  color: inherit;
  transform: translateY(-2px);
}

.ao-card h3 {
  margin: 0;
  font-size: 1.15rem;
  line-height: 1.3;
}

.ao-card p {
  margin: 0;
  color: var(--rf-text);
  font-size: 0.98rem;
  line-height: 1.65;
}

.ao-card__tech,
.ao-card__label {
  color: var(--rf-glacier);
  font-family: var(--rf-font-mono);
  font-size: 0.72rem;
  font-weight: 500;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.ao-icon {
  width: 36px;
  height: 36px;
  color: var(--rf-glacier);
}

.ao-steps {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 16px;
  margin: 28px 0 0;
  padding: 0;
  list-style: none;
}

.ao-steps--3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.ao-steps--6 { grid-template-columns: repeat(3, minmax(0, 1fr)); }

.ao-step {
  padding: 22px;
  border: 1px solid var(--rf-border);
  border-radius: var(--rf-radius);
  background: rgba(16, 38, 59, 0.45);
}

.ao-step__num {
  display: block;
  margin-bottom: 12px;
  color: var(--rf-glacier);
  font-family: var(--rf-font-mono);
  font-size: 0.78rem;
  letter-spacing: 0.12em;
}

.ao-step h3 {
  margin: 0 0 8px;
  font-size: 1.12rem;
}

.ao-step p {
  margin: 0;
  color: var(--rf-text);
  font-size: 0.98rem;
  line-height: 1.65;
}

.ao-cta {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-end;
  justify-content: space-between;
  gap: 24px;
}

.ao-cta h2 {
  max-width: 18ch;
}

.ao-sources {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 22px;
}

body.admin-bar .ao { padding-top: 104px; }
body.admin-bar .ao-subnav { top: 104px; }

@media (max-width: 900px) {
  .ao-hero__grid,
  .ao-grid--4,
  .ao-grid--3,
  .ao-steps,
  .ao-steps--3,
  .ao-steps--6 {
    grid-template-columns: 1fr 1fr;
  }
}

@media (max-width: 720px) {
  .ao-wrap { width: min(1120px, calc(100% - 32px)); }
  .ao-hero__grid,
  .ao-grid--2,
  .ao-grid--3,
  .ao-grid--4,
  .ao-steps,
  .ao-steps--3,
  .ao-steps--6 {
    grid-template-columns: 1fr;
  }
  .ao h1 { max-width: none; }
}

@media (max-width: 782px) {
  body.admin-bar .ao { padding-top: 118px; }
  body.admin-bar .ao-subnav { top: 118px; }
}
