/* ==========================================================================
   Shared styling for ONEIROM's prose pages (/about, /privacy, /support,
   /creations).

   The tokens below are copied from index.html so the sub-pages sit in the
   same system: same near-black ground, same gold, same two-family type rule
   (--font-display for the wordmark and section numbers, --font-text for
   everything else). Kept as one linked file rather than inlined twice so the
   two pages cannot drift apart.

   Lives in public/ so Vite copies it verbatim and the /page.css path stays
   stable rather than being hashed.
   ========================================================================== */

:root {
  --bg: #030303;
  --bg-deep: #010101;
  --ivory: #fff6e0;
  --gold: #d7b66a;
  --gold-rgb: 215, 182, 106;
  --ivory-rgb: 255, 246, 224;

  --text: rgba(var(--ivory-rgb), 0.88);
  --text-dim: rgba(var(--ivory-rgb), 0.56);
  --text-faint: rgba(var(--ivory-rgb), 0.34);
  --hairline: rgba(var(--ivory-rgb), 0.08);

  --font-display: 'Inter', ui-sans-serif, system-ui, -apple-system,
    BlinkMacSystemFont, 'Segoe UI', sans-serif;
  --font-text: 'Inter', ui-sans-serif, system-ui, -apple-system,
    BlinkMacSystemFont, 'Segoe UI', sans-serif;

  /* narrower measure than the landing page — this is reading matter */
  --shell: min(90vw, 720px);
  --ease: cubic-bezier(0.22, 0.61, 0.36, 1);

  color-scheme: dark;
}

* {
  box-sizing: border-box;
}

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

body {
  margin: 0;
  min-width: 320px;
  padding: 0 0 clamp(4rem, 10vh, 7rem);
  background: var(--bg);
  color: var(--text);
  font-family: var(--font-text);
  font-size: clamp(0.94rem, 1.6vw, 1rem);
  font-synthesis: none;
  font-weight: 300;
  line-height: 1.72;
  text-rendering: optimizeLegibility;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  overflow-x: clip;
}

a {
  color: rgba(var(--gold-rgb), 0.92);
  text-decoration: none;
  border-bottom: 1px solid rgba(var(--gold-rgb), 0.28);
  transition:
    color 0.4s var(--ease),
    border-color 0.4s var(--ease);
}

a:hover {
  color: var(--ivory);
  border-bottom-color: rgba(var(--ivory-rgb), 0.5);
}

:focus-visible {
  outline: 1px solid rgba(var(--gold-rgb), 0.7);
  outline-offset: 4px;
}

::selection {
  background: rgba(var(--gold-rgb), 0.32);
  color: #fff;
}

.shell {
  width: var(--shell);
  margin-inline: auto;
}

/* visually hidden, still read by screen readers */
.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  margin: -1px;
  padding: 0;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
  border: 0;
}

/* --- masthead ------------------------------------------------------------ */
.masthead {
  position: relative;
  padding: clamp(2.5rem, 7vh, 4.5rem) 0 clamp(2rem, 5vh, 3rem);
  overflow: hidden;
  border-bottom: 1px solid var(--hairline);
  text-align: center;
}

/* faint static orbital echo of the landing page, no JS */
.masthead-orbits {
  position: absolute;
  top: 50%;
  left: 50%;
  z-index: -1;
  width: min(140vw, 1000px);
  color: rgba(var(--gold-rgb), 0.5);
  opacity: 0.18;
  translate: -50% -50%;
  pointer-events: none;
}

.masthead-orbits ellipse,
.masthead-orbits circle {
  fill: none;
  stroke: currentColor;
  stroke-width: 1;
  vector-effect: non-scaling-stroke;
}

.masthead-orbits .node {
  fill: rgba(var(--gold-rgb), 0.8);
  stroke: none;
}

.brand {
  display: inline-block;
  border: 0;
  color: var(--ivory);
  font-family: var(--font-display);
  font-size: clamp(1.15rem, 3.4vw, 1.6rem);
  font-weight: 200;
  letter-spacing: clamp(0.3em, 1.4vw, 0.46em);
  text-indent: clamp(0.3em, 1.4vw, 0.46em);
  text-transform: uppercase;
}

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

.page-title {
  margin: clamp(1.6rem, 4vw, 2.4rem) 0 0.6rem;
  color: rgba(var(--ivory-rgb), 0.92);
  font-size: clamp(1.5rem, 4.6vw, 2.2rem);
  font-weight: 200;
  letter-spacing: 0.01em;
  line-height: 1.25;
}

.page-meta {
  margin: 0;
  color: var(--text-faint);
  font-family: var(--font-display);
  font-size: 0.62rem;
  font-weight: 400;
  letter-spacing: 0.26em;
  text-transform: uppercase;
}

/* /about: the heading carries the splash wordmark's weight, tracking and
   glow (index.html .wordmark), at page scale rather than splash scale */
.page-title-wordmark {
  color: var(--ivory);
  font-family: var(--font-display);
  font-size: clamp(2rem, 6.4vw, 3.4rem);
  letter-spacing: clamp(0.24em, 2vw, 0.58em);
  line-height: 0.96;
  text-indent: clamp(0.24em, 2vw, 0.58em);
  text-transform: uppercase;
  text-shadow:
    0 0 40px rgba(var(--ivory-rgb), 0.08),
    0 20px 60px rgba(0, 0, 0, 0.56);
}

/* --- prose --------------------------------------------------------------- */
main {
  padding-top: clamp(2.5rem, 7vh, 4rem);
}

.lede {
  margin: 0 0 clamp(2.5rem, 6vh, 3.5rem);
  color: rgba(var(--ivory-rgb), 0.8);
  font-size: clamp(1.02rem, 2.1vw, 1.16rem);
  font-weight: 200;
  line-height: 1.62;
}

section {
  margin-bottom: clamp(2.4rem, 6vh, 3.4rem);
}

h2 {
  display: flex;
  align-items: baseline;
  gap: 0.9rem;
  margin: 0 0 0.9rem;
  color: var(--ivory);
  font-size: clamp(1rem, 2.2vw, 1.14rem);
  font-weight: 300;
  letter-spacing: 0.02em;
  line-height: 1.35;
}

/* section numbers are display-family, per the site's type rule */
h2::before {
  flex: none;
  color: rgba(var(--gold-rgb), 0.6);
  content: counter(sect, decimal-leading-zero);
  counter-increment: sect;
  font-family: var(--font-display);
  font-size: 0.62rem;
  font-weight: 400;
  letter-spacing: 0.24em;
}

main {
  counter-reset: sect;
}

h3 {
  margin: 1.6rem 0 0.5rem;
  color: rgba(var(--ivory-rgb), 0.86);
  font-size: 0.95rem;
  font-weight: 400;
  letter-spacing: 0.02em;
}

p {
  margin: 0 0 1rem;
  color: var(--text-dim);
}

ul {
  margin: 0 0 1rem;
  padding-left: 1.1rem;
  color: var(--text-dim);
}

li {
  margin-bottom: 0.5rem;
  padding-left: 0.3rem;
}

li::marker {
  color: rgba(var(--gold-rgb), 0.55);
}

strong {
  color: rgba(var(--ivory-rgb), 0.9);
  font-weight: 400;
}

hr {
  height: 1px;
  margin: clamp(2.5rem, 6vh, 3.5rem) 0;
  border: 0;
  background: linear-gradient(
    90deg,
    rgba(var(--gold-rgb), 0.28),
    transparent 72%
  );
}

/* --- per-app blocks ------------------------------------------------------ */
.app {
  margin-bottom: 1.1rem;
  padding: clamp(1.1rem, 3vw, 1.5rem);
  border: 1px solid var(--hairline);
  background: linear-gradient(
    180deg,
    rgba(255, 255, 255, 0.018),
    rgba(0, 0, 0, 0.26)
  );
}

.app h3 {
  margin-top: 0;
}

.app p:last-child,
.app ul:last-child {
  margin-bottom: 0;
}

.app-note {
  color: var(--text-faint);
  font-size: 0.84rem;
}

/* --- creations grid ------------------------------------------------------ */
/* /creations is a grid, not reading matter, so it gets the landing page's
   wider measure. Set on body so .shell and .page-foot both pick it up. */
.page-wide {
  --shell: min(92vw, 1080px);
}

.ventures {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(min(100%, 300px), 1fr));
  gap: clamp(1rem, 2.4vw, 1.5rem);
  margin: 0;
  padding: 0;
  list-style: none;
}

.ventures li {
  margin: 0;
  padding: 0;
  opacity: 0;
  transform: translateY(18px);
  animation: rise 0.7s var(--ease) forwards;
  animation-delay: calc(120ms + var(--i, 0) * 90ms);
}

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

.venture {
  position: relative;
  display: flex;
  flex-direction: column;
  gap: 1rem;
  height: 100%;
  padding: clamp(1.3rem, 3vw, 1.7rem);
  border: 1px solid var(--hairline);
  background: linear-gradient(
    180deg,
    rgba(255, 255, 255, 0.018),
    rgba(0, 0, 0, 0.26)
  );
  transition:
    border-color 0.5s var(--ease),
    background 0.5s var(--ease),
    transform 0.5s var(--ease);
}

.venture:hover,
.venture:focus-within {
  border-color: rgba(var(--gold-rgb), 0.3);
  background: linear-gradient(
    180deg,
    rgba(var(--gold-rgb), 0.045),
    rgba(0, 0, 0, 0.26)
  );
  transform: translateY(-3px);
}

.venture-head {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 0.8rem;
}

.venture h2 {
  display: block;
  margin: 0;
  font-size: clamp(1.15rem, 2.4vw, 1.3rem);
  font-weight: 200;
}

.venture h2::before {
  content: none;
  counter-increment: none;
}

.venture p {
  flex: 1;
  margin: 0;
  font-size: 0.95rem;
  line-height: 1.6;
}

/* status pill: caption scale, hairline ring; Live earns the gold */
.pill {
  display: inline-flex;
  align-items: center;
  gap: 0.45em;
  padding: 0.32em 0.7em 0.28em;
  border: 1px solid rgba(var(--ivory-rgb), 0.14);
  border-radius: 999px;
  color: var(--text-dim);
  font-family: var(--font-display);
  font-size: 0.58rem;
  font-weight: 400;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  white-space: nowrap;
}

.pill::before {
  width: 5px;
  height: 5px;
  border-radius: 50%;
  background: rgba(var(--ivory-rgb), 0.3);
  content: '';
}

.pill-live {
  border-color: rgba(var(--gold-rgb), 0.4);
  color: rgba(var(--gold-rgb), 0.95);
}

.pill-live::before {
  background: var(--gold);
  box-shadow: 0 0 8px rgba(var(--gold-rgb), 0.7);
}

/* CTA: footer-scale caption link, arrow slides on hover */
.cta {
  display: inline-flex;
  align-items: center;
  gap: 0.6em;
  margin-top: 0.4rem;
  padding-top: 1rem;
  border: 0;
  border-top: 1px solid var(--hairline);
  width: 100%;
  color: rgba(var(--gold-rgb), 0.92);
  font-family: var(--font-display);
  font-size: 0.64rem;
  font-weight: 400;
  letter-spacing: 0.24em;
  text-transform: uppercase;
  transition:
    color 0.5s var(--ease),
    border-color 0.5s var(--ease);
}

.cta::after {
  content: '\2197';
  font-size: 0.9em;
  transition: transform 0.5s var(--ease);
}

a.cta:hover,
a.cta:focus-visible {
  color: var(--ivory);
  border-top-color: rgba(var(--gold-rgb), 0.3);
}

a.cta:hover::after,
a.cta:focus-visible::after {
  transform: translate(2px, -2px);
}

.cta-muted {
  color: var(--text-faint);
  cursor: default;
}

.cta-muted::after {
  content: none;
}

/* --- contact callout ----------------------------------------------------- */
.callout {
  padding: clamp(1.2rem, 3.4vw, 1.7rem);
  border: 1px solid rgba(var(--gold-rgb), 0.26);
  background: rgba(var(--gold-rgb), 0.04);
}

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

/* --- footer -------------------------------------------------------------- */
.page-foot {
  display: flex;
  flex-wrap: wrap;
  gap: 0.7rem 1.4rem;
  justify-content: space-between;
  width: var(--shell);
  margin: clamp(3rem, 8vh, 5rem) auto 0;
  padding-top: 1.8rem;
  border-top: 1px solid var(--hairline);
  color: var(--text-faint);
  font-family: var(--font-display);
  font-size: 0.62rem;
  font-weight: 400;
  letter-spacing: 0.2em;
  text-transform: uppercase;
}

.page-foot nav {
  display: flex;
  flex-wrap: wrap;
  gap: 0.7rem 1.4rem;
}

.page-foot a {
  border: 0;
  color: var(--text-faint);
}

.page-foot a:hover {
  color: rgba(var(--gold-rgb), 0.95);
}

/* ==========================================================================
   MENU

   The hamburger toggle and full-screen overlay. Copied from index.html,
   which keeps its own inline copy because it does not load this file;
   every sub-page shares this one. The open/close behaviour is in
   /menu.js (repo root), loaded as a module by each page.
   ========================================================================== */
.menu-toggle {
  /* buttons do not inherit font-family — without this the UA font
     leaks in as a third family */
  position: fixed;
  top: clamp(1.1rem, 2.4vw, 2rem);
  left: clamp(1.1rem, 2.4vw, 2rem);
  z-index: 120;
  display: grid;
  width: 46px;
  height: 46px;
  padding: 0;
  border: 1px solid transparent;
  border-radius: 50%;
  background: none;
  font-family: var(--font-text);
  cursor: pointer;
  place-items: center;
  transition:
    border-color 0.55s var(--ease),
    background 0.55s var(--ease);
}

.menu-toggle:hover {
  border-color: rgba(var(--gold-rgb), 0.28);
  background: rgba(var(--gold-rgb), 0.04);
}

.menu-toggle i {
  position: absolute;
  display: block;
  width: 22px;
  height: 1px;
  background: rgba(var(--gold-rgb), 0.85);
  transition:
    transform 0.55s var(--ease),
    width 0.55s var(--ease);
}

.menu-toggle i:first-child {
  transform: translateY(-3.5px);
}

.menu-toggle i:last-child {
  width: 14px;
  transform: translateY(3.5px) translateX(-4px);
}

.menu-toggle[aria-expanded='true'] i:first-child {
  transform: rotate(45deg);
}

.menu-toggle[aria-expanded='true'] i:last-child {
  width: 22px;
  transform: rotate(-45deg);
}

.menu {
  position: fixed;
  inset: 0;
  z-index: 110;
  display: grid;
  align-content: center;
  visibility: hidden;
  opacity: 0;
  background: rgba(3, 3, 3, 0.9);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  transition:
    opacity 0.6s var(--ease),
    visibility 0s linear 0.6s;
}

.menu.open {
  visibility: visible;
  opacity: 1;
  transition:
    opacity 0.6s var(--ease),
    visibility 0s;
}

.menu-inner {
  width: var(--shell);
  margin-inline: auto;
}

.menu-list {
  margin: 0;
  padding: 0;
  list-style: none;
}

.menu-list li {
  border-top: 1px solid var(--hairline);
}

.menu-list li:last-child {
  border-bottom: 1px solid var(--hairline);
}

/* everything in the panel rises on the same stagger */
.menu-lede,
.menu-list li,
.menu-minor {
  opacity: 0;
  transform: translateY(18px);
  transition:
    opacity 0.6s var(--ease),
    transform 0.6s var(--ease);
}

.menu.open .menu-lede,
.menu.open .menu-list li,
.menu.open .menu-minor {
  opacity: 1;
  transform: none;
  transition-delay: calc(120ms + var(--i, 0) * 70ms);
}

/* one muted line saying what this is — caption weight, not a heading */
.menu-lede {
  margin: 0 0 clamp(1.5rem, 3.6vw, 2.2rem);
  color: var(--text-dim);
  font-size: clamp(0.82rem, 1.9vw, 0.95rem);
  font-weight: 300;
  letter-spacing: 0.01em;
  line-height: 1.6;
}

.menu-list a {
  display: flex;
  align-items: baseline;
  gap: clamp(1rem, 3vw, 2.6rem);
  padding: clamp(1.05rem, 2.6vw, 1.9rem) 0;
  color: rgba(var(--ivory-rgb), 0.78);
  font-size: clamp(1.35rem, 5vw, 2.6rem);
  font-weight: 200;
  letter-spacing: 0.01em;
  text-decoration: none;
  transition:
    color 0.5s var(--ease),
    padding-left 0.5s var(--ease);
}

.menu-list a:hover,
.menu-list a:focus-visible {
  padding-left: clamp(0.5rem, 1.4vw, 1.1rem);
  color: var(--ivory);
}

/* tail of the panel: the quiet housekeeping links */
.menu-tail {
  margin-top: clamp(1.8rem, 4.5vw, 2.8rem);
}

/* Privacy and Support: reachable, but deliberately not competing with
   the primary entry — no numbering, footer scale, footer colour */
.menu-minor {
  display: flex;
  flex-wrap: wrap;
  gap: 0.6rem 1.4rem;
  margin: 0;
  color: var(--text-faint);
  font-family: var(--font-display);
  font-size: 0.62rem;
  font-weight: 400;
  letter-spacing: 0.2em;
  text-transform: uppercase;
}

.menu-minor a {
  color: var(--text-faint);
  text-decoration: none;
  transition: color 0.5s var(--ease);
}

.menu-minor a:hover,
.menu-minor a:focus-visible {
  color: rgba(var(--gold-rgb), 0.95);
}

@media (max-width: 560px) {
  h2 {
    flex-direction: column;
    gap: 0.35rem;
  }

  .page-foot {
    justify-content: flex-start;
  }
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    transition-duration: 0.01ms !important;
    animation-duration: 0.01ms !important;
  }
}
