/* Army of One Studio — shared components (mobile-first; 600 / 900 / 1200). */

/* ---------- Header ---------- */
.site-header {
  background: var(--aos-ink-950);
  border-bottom: 1px solid var(--color-border-decorative);
}
.site-header__inner {
  display: grid;
  grid-template-columns: 1fr auto;
  grid-template-areas: "brand lang" "nav nav";
  align-items: center;
  gap: var(--space-2) var(--space-4);
  padding-block: var(--space-2);
}
.site-header__brand { grid-area: brand; display: inline-flex; align-items: center; min-height: var(--target-min); justify-self: start; border-radius: var(--radius-sm); }
.site-header__brand img { width: auto; height: 44px; }
.site-header .lang-switch { grid-area: lang; }
.site-nav { grid-area: nav; }
.site-nav__list {
  list-style: none; padding: 0;
  display: flex; flex-wrap: wrap; gap: var(--space-2);
}
.site-nav__list > li { flex: 1 1 0; min-width: min(100%, 7.5rem); }
.site-nav__link {
  display: flex; align-items: center; justify-content: center; text-align: center;
  min-height: var(--target-min); padding: var(--space-2) var(--space-3);
  color: var(--color-text); font-weight: var(--weight-control); text-decoration: none;
  border-radius: var(--radius-sm); background: var(--color-surface-alt);
  box-shadow: inset 0 -3px 0 transparent;
}
.site-nav__link[aria-current="page"] { box-shadow: inset 0 -3px 0 var(--aos-sun); }
@media (hover: hover) and (pointer: fine) {
  .site-nav__link:hover { text-decoration: underline; text-underline-offset: .3em; }
}
@media (min-width: 900px) {
  .site-header { position: sticky; top: 0; z-index: var(--z-header); }
  .site-header__inner {
    grid-template-columns: auto 1fr auto;
    grid-template-areas: "brand nav lang";
    min-height: var(--header-height); padding-block: 0; gap: var(--space-6);
  }
  .site-header__brand img { height: 60px; } /* +25% (lot 6.4 review) */
  .site-nav__list { justify-content: flex-end; flex-wrap: nowrap; gap: var(--space-1); }
  .site-nav__list > li { flex: 0 0 auto; min-width: 0; }
  .site-nav__link { background: transparent; padding-inline: var(--space-4); }
}
/* Compact landscape: header never sticky (keeps vertical room) */
@media (max-height: 500px) and (orientation: landscape) {
  .site-header { position: static; }
}

/* ---------- Language switch ---------- */
.lang-switch { display: flex; gap: var(--space-1); list-style: none; padding: 0; }
.lang-switch a {
  display: inline-flex; align-items: center; justify-content: center;
  min-width: var(--target-min); min-height: var(--target-min); padding-inline: var(--space-2);
  color: var(--color-text-muted); font-weight: var(--weight-control); text-decoration: none;
  border-radius: var(--radius-sm);
}
.lang-switch a[aria-current="true"] { color: var(--color-text); box-shadow: inset 0 -3px 0 var(--aos-sun); }
@media (hover: hover) and (pointer: fine) {
  .lang-switch a:hover { color: var(--color-text); text-decoration: underline; }
}

/* ---------- Buttons ---------- */
.btn {
  --btn-bg: var(--color-surface); --btn-fg: var(--color-text);
  --btn-border: var(--color-border-control); --btn-shadow: none;
  display: inline-flex; align-items: center; justify-content: center; gap: var(--space-2);
  min-height: 48px; padding: var(--space-3) var(--space-5);
  border: var(--border-width) solid var(--btn-border); border-radius: var(--radius-pill);
  background: var(--btn-bg); color: var(--btn-fg); box-shadow: var(--btn-shadow);
  font-family: var(--font-body); font-weight: var(--weight-control); line-height: 1.2;
  text-align: center; text-decoration: none;
  transition: transform var(--motion-fast) var(--ease-press), background-color var(--motion-fast), border-color var(--motion-fast), box-shadow var(--motion-fast);
}
.btn--primary {
  --btn-bg: var(--color-action); --btn-fg: var(--color-on-action);
  --btn-border: var(--color-action); --btn-shadow: var(--shadow-extrude);
  margin-bottom: 4px; /* reserves room for the extrusion so pressing never shifts layout */
}
.btn--secondary { --btn-bg: var(--color-surface); --btn-fg: var(--color-text); --btn-border: var(--color-border-control); }
@media (hover: hover) and (pointer: fine) {
  .btn--primary:hover { --btn-bg: var(--color-action-hover); transform: translateY(-1px); }
  .btn--secondary:hover { --btn-border: var(--aos-sun); }
}
.btn--primary:active { transform: translateY(4px); --btn-shadow: none; }
.btn--secondary:active { transform: translateY(1px); }
.btn:focus-visible { border-radius: var(--radius-pill); }
.btn--primary:focus-visible { box-shadow: var(--btn-shadow), 0 0 0 7px var(--color-focus-inner); }
.btn--block { width: 100%; }
.btn__icon { width: 1.25em; height: 1.25em; flex: none; }

/* Stand-alone text links (not inside a sentence) get a full touch target */
.link-standalone, .card__action a, .cluster > a:not(.btn) {
  display: inline-flex; align-items: center; min-height: var(--target-min);
  font-weight: var(--weight-control);
}

/* ---------- Section header ---------- */
.section-header { max-width: var(--container-text); margin-bottom: var(--space-6); }
.section-header__eyebrow {
  display: block; margin-bottom: var(--space-2);
  color: var(--aos-mint); font-size: var(--text-small); font-weight: var(--weight-control);
  letter-spacing: .06em; text-transform: uppercase;
}
.section-header__lead { margin-top: var(--space-3); font-size: var(--text-lead); color: var(--color-text-muted); }

/* ---------- Cards ---------- */
.card {
  position: relative;
  display: flex; flex-direction: column; gap: var(--space-3);
  padding: var(--space-5);
  background: var(--color-surface); color: var(--color-text);
  border-radius: var(--radius-md); box-shadow: var(--shadow-card);
}
.card__title { font-size: var(--text-h3); }
.card__body { color: var(--color-text-muted); }
.card__action { margin-top: auto; padding-top: var(--space-2); }
.card--paper { background: var(--aos-paper); color: var(--aos-paper-ink); }
.card--paper .card__body { color: #4A3F66; }
.card--paper a { color: var(--aos-paper-ink); }
.card:focus-within { outline: 2px solid var(--color-border-control); outline-offset: 2px; }

/* ---------- World Window ---------- */
.window {
  position: relative; isolation: isolate;
  margin-inline: calc(var(--space-2) - var(--page-margin)); /* mobile: bleeds to 8px from edge */
  border-radius: var(--radius-window); box-shadow: var(--shadow-window);
  background: var(--window-bg, var(--color-surface-alt));
  overflow: clip; overflow-clip-margin: 0;
}
.window__art { position: absolute; inset: 0; z-index: -1; }
.window__art img { width: 100%; height: 100%; object-fit: cover; }
.window__inner {
  display: grid; gap: var(--space-5); align-items: center;
  padding: var(--space-6) var(--space-5);
  min-height: 0;
}
.window__media { display: flex; justify-content: center; }
.window__media img { width: min(100%, 520px); filter: drop-shadow(0 12px 18px rgb(0 0 0 / .25)); }
.window__plate {
  padding: var(--space-5);
  background: rgb(26 16 48 / .92); color: var(--aos-text);
  border-radius: var(--radius-lg);
  --color-text: var(--aos-text); --color-text-muted: var(--aos-text-muted); --color-link: var(--aos-mint);
}
.window__plate > * + * { margin-top: var(--space-3); }
.window__endorse { font-size: var(--text-small); color: var(--aos-text-muted); }
@media (min-width: 600px) {
  .window { margin-inline: 0; }
  .window__inner { padding: var(--space-7) var(--space-6); }
}
@media (min-width: 900px) {
  .window__inner { grid-template-columns: 7fr 5fr; padding: var(--space-8); }
  .window--media-end .window__media { order: 2; }
}

/* ---------- Platform availability ---------- */
.platforms { list-style: none; padding: 0; display: flex; flex-wrap: wrap; gap: var(--target-gap); }
.platform {
  display: inline-flex; align-items: center; gap: var(--space-2);
  min-height: var(--target-min); padding: var(--space-2) var(--space-4);
  border: var(--border-width) solid var(--color-border-control); border-radius: var(--radius-pill);
  font-size: var(--text-small); font-weight: var(--weight-control); color: var(--color-text);
}
.platform__state { color: var(--color-text-muted); font-weight: var(--weight-body); }
.platform[data-state="planned"] { background: transparent; }
.platform[data-state="coming-soon"] { border-color: var(--aos-mint); }
.platform[data-state="unavailable"] { border-style: dashed; color: var(--color-text-muted); }
.platform[data-state="available"] { padding: 0; border: 0; }
.platform__dot { width: 8px; height: 8px; border-radius: 50%; background: currentColor; flex: none; }
.platform[data-state="planned"] .platform__dot { background: transparent; border: 2px solid currentColor; }

/* ---------- Media ---------- */
.media { display: flex; flex-direction: column; gap: var(--space-2); }
.media__frame {
  display: block; overflow: hidden;
  border-radius: var(--radius-lg); background: var(--aos-ink-950);
  box-shadow: var(--shadow-card);
}
.media__frame img { width: 100%; height: auto; } /* native aspect ratio: HUD never cropped */
.media__caption { font-size: var(--text-small); color: var(--color-text-muted); }
.gallery { display: flex; flex-wrap: wrap; justify-content: center; gap: var(--gutter); list-style: none; padding: 0; }
.gallery > li { flex: 1 1 100%; margin: 0; }
@media (min-width: 600px) { .gallery > li { flex: 0 0 calc((100% - var(--gutter)) / 2); } }
@media (min-width: 1200px) { .gallery > li { flex: 0 0 calc((100% - 3 * var(--gutter)) / 4); } }
.gallery a.media__frame { color: inherit; }
@media (hover: hover) and (pointer: fine) {
  .gallery a.media__frame img { transition: transform var(--motion-base) var(--ease-out); }
  .gallery a.media__frame:hover img { transform: scale(1.02); }
}

/* ---------- Footer ---------- */
.site-footer {
  padding-block: var(--space-7) var(--space-5);
  background: var(--aos-ink-950); border-top: 1px solid var(--color-border-decorative);
  color: var(--color-text-muted); font-size: var(--text-small);
}
.site-footer__grid { display: grid; gap: var(--space-5) var(--space-4); grid-template-columns: repeat(2, minmax(0, 1fr)); }
.site-footer__brand { grid-column: 1 / -1; display: flex; flex-wrap: wrap; align-items: center; gap: var(--space-2) var(--space-5); }
.site-footer__brand img { width: 150px; }
.site-footer__brand img { height: auto; }
.site-footer__slogan { margin: 0; font-family: var(--font-display); font-size: var(--text-lead); color: var(--color-text); }
.site-footer__title { font-family: var(--font-body); font-size: var(--text-small); font-weight: var(--weight-control); color: var(--color-text); text-transform: uppercase; letter-spacing: .06em; margin-bottom: var(--space-2); }
.site-footer__list { list-style: none; padding: 0; }
.site-footer__list a {
  display: inline-flex; align-items: center; min-height: var(--target-min); min-width: var(--target-min);
  color: var(--color-text); text-decoration: none;
}
@media (hover: hover) and (pointer: fine) { .site-footer__list a:hover { text-decoration: underline; } }
.site-footer__bottom {
  display: flex; flex-wrap: wrap; justify-content: space-between; align-items: center; gap: var(--space-2) var(--space-4);
  margin-top: var(--space-5); padding-top: var(--space-4); border-top: 1px solid var(--color-border-decorative);
}
@media (min-width: 600px) { .site-footer__grid { grid-template-columns: repeat(3, minmax(0, 1fr)); } }
@media (min-width: 900px) {
  .site-footer { padding-block: var(--space-8) var(--space-6); }
  .site-footer__grid { grid-template-columns: 2fr 1fr 1fr 1fr; }
  .site-footer__brand { grid-column: auto; flex-direction: column; align-items: flex-start; }
  .site-footer__brand img { width: 200px; }
}

/* ---------- Optional decorative motion (only with JS + no reduced motion) ---------- */
@keyframes aos-float { from { translate: 0 0; } to { translate: 0 -6px; } }
.motion-ok .float-decor { animation: aos-float 5s var(--ease-out) infinite alternate; }

/* =====================================================================
   Page compositions (lot 6.4): hero, feature, founder, community,
   steps, characters, tools, framed gallery, dialog, organic sections.
   ===================================================================== */

/* Organic section backgrounds: localized light instead of hard blocks */
.section--glow {
  background:
    radial-gradient(60% 55% at 85% 20%, rgb(95 216 165 / .10), transparent 70%),
    radial-gradient(55% 60% at 10% 85%, rgb(242 203 78 / .08), transparent 70%),
    linear-gradient(180deg, var(--aos-ink-900), var(--aos-ink-800) 45%, var(--aos-ink-900));
}
.section--glow-warm {
  background:
    radial-gradient(50% 60% at 20% 30%, rgb(240 96 90 / .10), transparent 70%),
    radial-gradient(55% 55% at 90% 80%, rgb(242 203 78 / .08), transparent 70%),
    var(--aos-ink-900);
}
.section--tight { padding-block: calc(var(--section-gap) * .75); }

/* Phrase-aware headline: each sentence wraps as a unit */
.phrase { display: inline-block; }

/* ---------- Community ---------- */
.community {
  text-align: center; padding: var(--space-7) var(--space-5);
  border-radius: var(--radius-window);
  background: radial-gradient(80% 120% at 50% 0%, rgb(95 216 165 / .16), transparent 60%), var(--aos-ink-800);
  box-shadow: inset 0 0 0 2px rgb(90 74 138 / .6);
}
.community > * + * { margin-top: var(--space-4); }
.community .cluster { justify-content: center; }
.community__title { font-size: var(--text-h1); }

/* ---------- Standardized gallery frames (no crop, no distortion) ---------- */
.frame-16x10 { aspect-ratio: 16 / 10; display: grid; place-items: center;
  background: radial-gradient(80% 80% at 50% 50%, var(--aos-ink-800), var(--aos-ink-950)); }
.frame-16x10 img { width: 100%; height: 100%; object-fit: contain; }

/* ---------- Gallery dialog (progressive enhancement) ---------- */
.lightbox {
  width: min(96vw, 1200px); max-width: none; max-height: 94vh; padding: 0; border: 0; border-radius: var(--radius-lg);
  background: var(--aos-ink-950); color: var(--aos-text); box-shadow: 0 24px 80px rgb(0 0 0 / .6);
}
.lightbox::backdrop { background: rgb(17 8 24 / .85); }
.lightbox__figure { margin: 0; display: grid; gap: var(--space-3); padding: var(--space-4); }
.lightbox__img { width: 100%; max-height: 72vh; object-fit: contain; border-radius: var(--radius-md); background: #000; }
.lightbox__bar { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: var(--space-3); }
.lightbox__caption { color: var(--aos-text-muted); font-size: var(--text-small); flex: 1 1 200px; }
.lightbox__controls { display: flex; flex-wrap: wrap; gap: var(--target-gap); }
.lightbox__btn {
  min-width: var(--target-min); min-height: var(--target-min); padding: 0 var(--space-4);
  border-radius: var(--radius-pill); border: var(--border-width) solid var(--color-border-control);
  background: var(--aos-ink-700); color: var(--aos-text); font-weight: var(--weight-control);
}
@media (hover: hover) and (pointer: fine) { .lightbox__btn:hover { border-color: var(--aos-sun); } }

/* Long-form text (privacy policies) */
.prose > * + * { margin-top: var(--space-4); }
.prose h2 { margin-top: var(--space-7); font-size: var(--text-h3); }
.prose .updated { color: var(--color-text-muted); font-size: var(--text-small); }
.prose ul { padding-left: 1.25em; }
.prose-page { padding-block: var(--space-7) var(--space-9); }
.notice { padding: var(--space-4) var(--space-5); border-radius: var(--radius-md); background: var(--aos-ink-800); box-shadow: inset 0 0 0 2px rgb(90 74 138 / .6); }
