/* Optima Growth HQ - strictly black and white.
   Subtle tones are made with opacity, never with other colours. */

:root {
  --black: #000;
  --white: #fff;
  --sidebar-w: 264px;
  --ease: cubic-bezier(0.22, 1, 0.36, 1);
  --font: "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", Helvetica, Arial, sans-serif;
}

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

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

body {
  margin: 0;
  font-family: var(--font);
  background: var(--white);
  color: var(--black);
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

a { color: inherit; text-decoration: none; }

/* ---------- Layout ---------- */

.app {
  min-height: 100vh;
  display: grid;
  grid-template-columns: var(--sidebar-w) 1fr;
}

.sidebar {
  position: sticky;
  top: 0;
  height: 100vh;
  display: flex;
  flex-direction: column;
  padding: 32px 20px 24px;
  background: var(--black);
  color: var(--white);
}

.main {
  min-width: 0;
  padding: 72px clamp(24px, 6vw, 96px);
  outline: none;
}

/* ---------- Brand ---------- */

.brand {
  font-weight: 700;
  font-size: 15px;
  letter-spacing: 0.28em;
  white-space: nowrap;
}

.brand--sidebar { padding: 0 12px; margin-bottom: 48px; }

/* ---------- Navigation ---------- */

.nav { display: flex; flex-direction: column; gap: 4px; }

.nav a {
  position: relative;
  display: block;
  padding: 12px 12px;
  border-radius: 8px;
  font-size: 15px;
  font-weight: 500;
  color: rgba(255, 255, 255, 0.6);
  transition: color 0.25s var(--ease), background-color 0.25s var(--ease), padding-left 0.25s var(--ease);
}

.nav a:hover,
.nav a:focus-visible {
  color: var(--white);
  background: rgba(255, 255, 255, 0.08);
  padding-left: 18px;
  outline: none;
}

.nav a[aria-current="page"] {
  color: var(--black);
  background: var(--white);
  padding-left: 12px;
}

.sidebar-foot {
  margin: auto 12px 0;
  font-size: 12px;
  letter-spacing: 0.28em;
  color: rgba(255, 255, 255, 0.4);
}

/* ---------- Page content ---------- */

.page { max-width: 880px; animation: rise 0.5s var(--ease) both; }

.page__eyebrow {
  margin: 0 0 20px;
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.28em;
  text-transform: uppercase;
  opacity: 0.5;
}

.page__title {
  margin: 0;
  font-size: clamp(40px, 6vw, 80px);
  font-weight: 700;
  line-height: 1;
  letter-spacing: -0.035em;
}

.page__rule {
  width: 56px;
  height: 3px;
  margin: 36px 0 28px;
  background: var(--black);
  transition: width 0.4s var(--ease);
}

.page:hover .page__rule { width: 112px; }

.page__soon {
  margin: 0;
  font-size: 20px;
  font-weight: 500;
  letter-spacing: -0.01em;
  opacity: 0.55;
}

@keyframes rise {
  from { opacity: 0; transform: translateY(12px); }
  to   { opacity: 1; transform: none; }
}

/* ---------- Mobile top bar ---------- */

.topbar { display: none; }
.scrim { display: none; }

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

  .topbar {
    position: sticky;
    top: 0;
    z-index: 30;
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 16px 20px;
    background: var(--black);
    color: var(--white);
  }

  .menu-btn {
    width: 40px;
    height: 40px;
    padding: 0;
    border: 0;
    border-radius: 8px;
    background: transparent;
    color: inherit;
    cursor: pointer;
    display: grid;
    place-content: center;
    gap: 7px;
    transition: background-color 0.2s var(--ease);
  }
  .menu-btn:hover { background: rgba(255, 255, 255, 0.1); }
  .menu-btn span {
    display: block;
    width: 22px;
    height: 2px;
    background: var(--white);
    transition: transform 0.3s var(--ease);
  }
  .menu-btn[aria-expanded="true"] span:first-child { transform: translateY(4.5px) rotate(45deg); }
  .menu-btn[aria-expanded="true"] span:last-child  { transform: translateY(-4.5px) rotate(-45deg); }

  .sidebar {
    position: fixed;
    inset: 0 auto 0 0;
    z-index: 40;
    width: min(82vw, 320px);
    transform: translateX(-100%);
    transition: transform 0.35s var(--ease);
    overflow-y: auto;
  }
  .app.is-open .sidebar { transform: none; }

  .scrim {
    display: block;
    position: fixed;
    inset: 0;
    z-index: 35;
    background: rgba(0, 0, 0, 0.5);
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.3s var(--ease);
  }
  .app.is-open .scrim { opacity: 1; pointer-events: auto; }

  .main { padding: 48px 24px 64px; }
}

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