/* ============================================================
   Kareem Studio — core stylesheet
   Dark premium theme, gold accent, Manrope/Oswald
   ============================================================ */

:root {
  /* Color tokens */
  --black: #0b0b0c;
  --bg: #0b0b0c;
  --panel: #141414;
  --panel-2: #1a1a1c;
  --panel-3: #202023;
  --line: #26262a;
  --line-soft: #1e1e22;
  --white: #f5f4f1;
  --mute: #a3a3ab;
  --mute-2: #6e6e76;
  --gold: #eab308;
  --gold-soft: #f7c948;
  --gold-ink: #161310;
  --gold-tint: rgba(234, 179, 8, 0.08);
  --gold-tint-2: rgba(234, 179, 8, 0.14);
  --gold-line: rgba(234, 179, 8, 0.4);
  --danger: #f87171;

  /* Radii */
  --radius-sm: 10px;
  --radius: 14px;
  --radius-lg: 20px;
  --radius-pill: 999px;

  /* Shadows */
  --shadow-card: 0 1px 2px rgba(0, 0, 0, 0.4);
  --shadow-lift: 0 10px 28px rgba(0, 0, 0, 0.45);
  --shadow-gold: 0 6px 20px rgba(234, 179, 8, 0.22);

  /* Spacing rhythm */
  --gap: 0.75rem;
  --section: 2.75rem;

  /* Type */
  --font-body: Manrope, system-ui, -apple-system, sans-serif;
  --font-display: Oswald, var(--font-body);

  /* Motion */
  --ease: cubic-bezier(0.22, 1, 0.36, 1);
  --speed: 0.22s;
}

* { box-sizing: border-box; margin: 0; padding: 0; }

html, body { background: var(--bg); color: var(--white); }

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

@media (prefers-reduced-motion: no-preference) {
  html { scroll-behavior: smooth; }
}

body {
  font-family: var(--font-body);
  font-size: 1rem;
  line-height: 1.5;
  padding-bottom: 1.5rem;
  -webkit-font-smoothing: antialiased;
}

img { display: block; max-width: 100%; height: auto; }

/* ---------- Lightbox (pose viewer) ---------- */

body.ks-lb-open { overflow: hidden; }

.ks-lightbox {
  position: fixed;
  inset: 0;
  z-index: 200;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(5, 5, 6, 0.94);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  padding: 1rem;
}

.ks-lightbox[hidden] { display: none; }

.ks-lightbox img {
  max-width: 92vw;
  max-height: 92vh;
  width: auto;
  height: auto;
  border-radius: var(--radius);
  border: 1px solid var(--line);
  box-shadow: var(--shadow-lift);
  animation: ksLbIn 0.22s var(--ease);
}

@keyframes ksLbIn {
  from { opacity: 0; transform: scale(0.96); }
  to { opacity: 1; transform: scale(1); }
}

.ks-lb-close {
  position: absolute;
  top: calc(0.9rem + env(safe-area-inset-top, 0px));
  right: 1rem;
  width: 44px;
  height: 44px;
  border-radius: 50%;
  border: 1px solid var(--line);
  background: var(--panel);
  color: var(--white);
  font-size: 1rem;
  cursor: pointer;
  transition: border-color 0.15s ease, color 0.15s ease;
}

.ks-lb-close:hover { border-color: var(--gold); color: var(--gold); }

.ks-lb-arrow {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  width: 44px;
  height: 44px;
  border-radius: 50%;
  border: 1px solid var(--line);
  background: rgba(20, 20, 20, 0.85);
  color: var(--white);
  font-size: 1.5rem;
  line-height: 1;
  cursor: pointer;
  transition: border-color 0.15s ease, color 0.15s ease;
}

.ks-lb-arrow:hover { border-color: var(--gold); color: var(--gold); }
.ks-lb-arrow.prev { left: 0.9rem; }
.ks-lb-arrow.next { right: 0.9rem; }

@media (prefers-reduced-motion: reduce) {
  .ks-lightbox img { animation: none; }
}

/* Masonry-friendly grids: cards flow in CSS columns, natural image heights */
.pose-grid { display: block; column-gap: 12px; }
.pose-grid .card, .flow-grid .card { display: inline-block; width: 100%; break-inside: avoid; margin: 0 0 12px; }

::selection { background: var(--gold); color: var(--gold-ink); }

/* Focus visibility — keyboard friendly */
a:focus-visible,
button:focus-visible,
input:focus-visible,
select:focus-visible,
textarea:focus-visible {
  outline: 2px solid var(--gold);
  outline-offset: 2px;
  border-radius: var(--radius-sm);
}

/* ---------- Top bar ---------- */

.topbar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 1rem;
  padding: 0.6rem 1rem;
  position: sticky;
  top: 0;
  z-index: 20;
  background: rgba(11, 11, 12, 0.82);
  -webkit-backdrop-filter: blur(14px);
  backdrop-filter: blur(14px);
  border-bottom: 1px solid var(--line-soft);
}

.logo {
  font-family: var(--font-display);
  font-weight: 600;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--white);
  text-decoration: none;
  font-size: 0.95rem;
  transition: color var(--speed) var(--ease);
}

.logo:hover { color: var(--gold-soft); }

.topnav {
  display: flex;
  align-items: center;
  gap: 1.15rem;
  font-size: 0.88rem;
  font-weight: 500;
}

.topnav a {
  color: var(--mute);
  text-decoration: none;
  transition: color var(--speed) var(--ease);
}

.topnav a.is-on, .topnav a:hover { color: var(--white); }

/* ---------- Buttons ---------- */

.gold-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.4rem;
  background: linear-gradient(180deg, var(--gold-soft), var(--gold));
  color: var(--gold-ink) !important;
  text-decoration: none;
  border: 0;
  border-radius: var(--radius-pill);
  padding: 0.55rem 1.1rem;
  font-weight: 700;
  font-size: 0.85rem;
  cursor: pointer;
  box-shadow: var(--shadow-gold);
  transition: transform var(--speed) var(--ease), box-shadow var(--speed) var(--ease), filter var(--speed) var(--ease);
}

.gold-btn:hover { transform: translateY(-1px); filter: brightness(1.05); box-shadow: 0 10px 26px rgba(234, 179, 8, 0.3); }
.gold-btn:active { transform: translateY(0); box-shadow: var(--shadow-gold); }

.gold-btn.lg { padding: 0.85rem 1.35rem; font-size: 0.95rem; width: fit-content; }

.ghost-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.4rem;
  color: var(--white);
  text-decoration: none;
  border: 1px solid var(--line);
  background: var(--panel);
  border-radius: var(--radius-pill);
  padding: 0.85rem 1.35rem;
  font-weight: 600;
  cursor: pointer;
  transition: border-color var(--speed) var(--ease), background var(--speed) var(--ease), transform var(--speed) var(--ease);
}

.ghost-btn:hover { border-color: var(--gold-line); background: var(--panel-2); transform: translateY(-1px); }
.ghost-btn:active { transform: translateY(0); }

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

.page {
  width: min(1180px, calc(100% - clamp(2rem, 6vw, 5rem)));
  margin: 0 auto;
  padding: 1.25rem 0 3rem;
}

/* ---------- Hero ---------- */

.hero {
  display: grid;
  grid-template-columns: 1fr 1.05fr;
  gap: 2.5rem;
  align-items: center;
  margin-bottom: var(--section);
}

.hero.tight { grid-template-columns: 1fr; margin-bottom: 1.5rem; }

.kicker {
  color: var(--gold);
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  margin-bottom: 0.7rem;
}

h1 {
  font-size: clamp(2.4rem, 6vw, 4.2rem);
  font-weight: 700;
  line-height: 1.04;
  letter-spacing: -0.03em;
}

h2 { font-size: 1.7rem; font-weight: 700; line-height: 1.15; letter-spacing: -0.01em; }

.lede {
  margin-top: 0.9rem;
  color: var(--mute);
  line-height: 1.7;
  max-width: 36rem;
}

.hero-actions { display: flex; gap: 0.7rem; flex-wrap: wrap; margin-top: 1.5rem; }
.hero-actions.bottom { margin: 2.5rem 0 1rem; }

.hero-photo {
  position: relative;
  border-radius: var(--radius-lg);
  overflow: hidden;
  min-height: 420px;
  background: var(--panel);
  border: 1px solid var(--line-soft);
  box-shadow: var(--shadow-lift);
}

.hero-photo img { min-height: 420px; }

.hero-photo figcaption {
  position: absolute;
  left: 1rem;
  bottom: 1rem;
  background: rgba(0, 0, 0, 0.68);
  -webkit-backdrop-filter: blur(6px);
  backdrop-filter: blur(6px);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: var(--radius-pill);
  padding: 0.4rem 0.8rem;
  font-size: 0.75rem;
  color: var(--mute);
}

/* ---------- Sections & category tiles ---------- */

.section-label { font-weight: 700; margin: 0 0 0.9rem; }

.cats {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: var(--gap);
}

.cat {
  position: relative;
  min-height: 160px;
  border-radius: var(--radius);
  overflow: hidden;
  background-size: cover;
  background-position: center;
  text-decoration: none;
  color: var(--white);
  font-weight: 700;
  display: flex;
  align-items: flex-end;
  padding: 0.9rem;
  border: 1px solid var(--line-soft);
  box-shadow: var(--shadow-card);
  transition: transform var(--speed) var(--ease), box-shadow var(--speed) var(--ease), border-color var(--speed) var(--ease);
}

.cat::before {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(to top, rgba(0, 0, 0, 0.78), transparent 55%);
  transition: opacity var(--speed) var(--ease);
}

.cat:hover {
  transform: translateY(-3px);
  box-shadow: var(--shadow-lift);
  border-color: var(--gold-line);
}

.cat span { position: relative; text-shadow: 0 1px 8px rgba(0, 0, 0, 0.6); }

/* ---------- I'm Stuck banner ---------- */

.stuck {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 1rem;
  margin: 1.5rem 0 var(--section);
  background: linear-gradient(120deg, var(--gold-soft), var(--gold));
  color: var(--gold-ink);
  text-decoration: none;
  border-radius: var(--radius);
  padding: 1.15rem 1.3rem;
  box-shadow: var(--shadow-gold);
  transition: transform var(--speed) var(--ease), box-shadow var(--speed) var(--ease);
}

.stuck:hover { transform: translateY(-2px); box-shadow: 0 12px 30px rgba(234, 179, 8, 0.32); }

.stuck strong { font-size: 1.05rem; }
.stuck span { font-weight: 600; opacity: 0.78; }

/* ---------- Join / panels ---------- */

.join {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 2rem;
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  padding: 1.75rem;
}

/* ---------- Forms ---------- */

form label {
  display: block;
  margin: 0.85rem 0 0.35rem;
  font-size: 0.75rem;
  font-weight: 700;
  color: var(--mute);
  text-transform: uppercase;
  letter-spacing: 0.08em;
}

input, select, textarea {
  width: 100%;
  background: #0e0e10;
  border: 1px solid var(--line);
  color: var(--white);
  border-radius: var(--radius-sm);
  padding: 0.85rem 0.95rem;
  font: inherit;
  transition: border-color var(--speed) var(--ease), box-shadow var(--speed) var(--ease), background var(--speed) var(--ease);
}

input::placeholder, textarea::placeholder { color: var(--mute-2); }

input:focus, select:focus, textarea:focus {
  outline: none;
  border-color: var(--gold-line);
  box-shadow: 0 0 0 3px var(--gold-tint);
  background: #101013;
}

form button { margin-top: 1.1rem; }

.ok { color: var(--gold-soft); margin-bottom: 0.5rem; }
.bad { color: var(--danger); margin-bottom: 0.5rem; }

/* ---------- Split features ---------- */

.split {
  display: grid;
  grid-template-columns: 1.1fr 1fr;
  gap: 2rem;
  align-items: center;
  margin: 2rem 0;
}

.split.reverse { grid-template-columns: 1fr 1.1fr; }
.split.reverse img { order: 2; }
.split img {
  border-radius: var(--radius-lg);
  min-height: 280px;
  background: var(--panel);
  border: 1px solid var(--line-soft);
  box-shadow: var(--shadow-card);
}

/* ---------- Chips ---------- */

.chips { display: flex; flex-wrap: wrap; gap: 0.45rem; margin-top: 1rem; }

.chips span {
  border: 1px solid var(--line);
  background: var(--panel);
  border-radius: var(--radius-pill);
  padding: 0.35rem 0.75rem;
  font-size: 0.78rem;
  font-weight: 600;
  color: var(--mute);
  transition: border-color var(--speed) var(--ease), color var(--speed) var(--ease);
}

.chips span.on {
  background: var(--gold);
  border-color: var(--gold);
  color: var(--gold-ink);
}

/* ---------- Flow UI preview ---------- */

.flow-ui {
  margin-top: 1rem;
  background: var(--panel);
  border: 1px solid var(--line-soft);
  border-radius: var(--radius);
  padding: 1rem;
}

.flow-ui span { color: var(--gold); font-size: 0.75rem; font-weight: 700; letter-spacing: 0.06em; text-transform: uppercase; }
.flow-ui strong { display: block; margin-top: 0.35rem; }

.meta-block {
  background: var(--panel);
  border: 1px solid var(--line-soft);
  border-radius: var(--radius-lg);
  padding: 1.4rem;
  margin-top: 1rem;
}

/* ---------- Footer ---------- */

.foot {
  display: flex;
  justify-content: space-between;
  color: var(--mute-2);
  font-size: 0.72rem;
  padding: 0 0 0.5rem;
  width: min(1120px, calc(100% - 2rem));
  margin: 0 auto;
}

/* ---------- Pricing plans (shared) ---------- */

.plans {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 0.85rem;
  margin: 1.75rem 0 2rem;
}

.plan {
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  padding: 1.25rem;
  display: flex;
  flex-direction: column;
  gap: 0.45rem;
  box-shadow: var(--shadow-card);
  transition: transform var(--speed) var(--ease), box-shadow var(--speed) var(--ease), border-color var(--speed) var(--ease);
}

.plan:hover { transform: translateY(-3px); box-shadow: var(--shadow-lift); border-color: #333338; }

.plan.featured {
  border-color: var(--gold-line);
  background: linear-gradient(180deg, #1a1708, var(--panel));
  box-shadow: var(--shadow-gold);
}

.plan .name { font-weight: 700; font-size: 0.95rem; }
.plan .price { font-size: 2rem; font-weight: 700; letter-spacing: -0.03em; }
.plan .each { color: var(--mute); font-size: 0.82rem; }
.plan ul {
  margin: 0.7rem 0 1rem;
  padding-left: 1.1rem;
  color: var(--mute);
  font-size: 0.88rem;
  line-height: 1.65;
  flex: 1;
}
.plan .gold-btn { width: 100%; }

.note { color: var(--mute); font-size: 0.85rem; line-height: 1.65; }

/* ---------- Responsive ---------- */

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

@media (max-width: 840px) {
  .hero, .join, .split, .split.reverse, .plans { grid-template-columns: 1fr; }
  .split.reverse img { order: 0; }
  .cats { grid-template-columns: 1fr 1fr; }
  .topnav { flex-wrap: wrap; justify-content: flex-end; }
  .hero-photo, .hero-photo img { min-height: 280px; }
  .stuck { flex-direction: column; align-items: flex-start; }
}

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