/* Tokens mirror the Figma "Semantic" (Dark), "Typography" and "Layout" collections. */
:root {
  --color-bg-app: #020003;
  --color-bg-app-elevated: #1a1a1a;
  --color-bg-brand: #ddba6e;
  --color-surface-card: #2e2e2e;
  --color-surface-glass: rgba(255, 255, 255, 0.1);
  --color-surface-glass-strong: rgba(255, 255, 255, 0.16);
  --color-surface-brand-subtle: #2c2721;
  --color-text-primary: #ffffff;
  --color-text-secondary: #8a8a8a;
  --color-text-tertiary: rgba(255, 255, 255, 0.3);
  --color-text-brand: #ddba6e;
  --color-text-on-brand: #161618;
  --color-border-subtle: rgba(255, 255, 255, 0.06);
  --color-border-default: rgba(255, 255, 255, 0.1);
  --color-action-white-bg: #ffffff;
  --color-action-white-bg-pressed: #e3e3e3;
  --color-action-white-text: #161618;
  --color-action-brand-bg: #ddba6e;
  --color-action-brand-bg-pressed: #c99a45;

  --font-family-sans: -apple-system, BlinkMacSystemFont, "SF Pro Text", "SF Pro Display", system-ui, "Helvetica Neue", Arial, sans-serif;
  --font-weight-regular: 400;
  --font-weight-medium: 510;
  --font-weight-semibold: 590;

  --spacing-2: 2px;
  --spacing-4: 4px;
  --spacing-6: 6px;
  --spacing-10: 10px;
  --spacing-12: 12px;
  --spacing-16: 16px;
  --spacing-20: 20px;
  --spacing-24: 24px;
  --spacing-32: 32px;
  --radius-full: 999px;
  --radius-panel: 40px;
  --radius-inner: 38px;
}

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

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

body {
  margin: 0;
  background: var(--color-bg-app);
  color: var(--color-text-primary);
  font-family: var(--font-family-sans);
  font-weight: var(--font-weight-regular);
  -webkit-font-smoothing: antialiased;
}

h1, h2, h3, p, ul { margin: 0; }
img { display: block; }
button { font: inherit; color: inherit; border: 0; padding: 0; background: none; cursor: pointer; }
a { color: inherit; text-decoration: none; }

:focus-visible { outline: 2px solid var(--color-text-primary); outline-offset: 2px; }

/* Pages stay invisible until the content from the CMS has been rendered */
.page,
.program-page,
.buy-bar { transition: opacity 0.2s ease; }
.is-loading .page,
.is-loading .program-page,
.is-loading .buy-bar { opacity: 0; }

[hidden] { display: none !important; }

/* ---------- Layout: mobile first ---------- */
.page {
  display: flex;
  flex-direction: column;
  gap: 24px;
  max-width: 480px;
  margin: 0 auto;
}

.profile {
  display: flex;
  flex-direction: column;
  gap: 24px;
}

.content {
  display: flex;
  flex-direction: column;
  gap: var(--spacing-16);
  padding: 0 var(--spacing-2);
}

/* ---------- Hero ---------- */
.hero {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: var(--spacing-20);
  padding: 40px var(--spacing-20) 0;
}

.hero__photo {
  width: 128px;
  height: 128px;
  border-radius: var(--radius-full);
  overflow: hidden;
}

.hero__photo img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: 50% 10%;
  /* zoom in on the face inside the small round avatar */
  transform: scale(1.5);
  transform-origin: 56% 68%;
}

/* A photo uploaded in the CMS: plain centred crop, no hand-tuned zoom */
.hero__photo .hero__img--cms {
  object-position: 50% 20%;
  transform: none;
}

.hero__name {
  font-size: 24px;
  line-height: 28px;
  font-weight: var(--font-weight-medium);
  letter-spacing: 8px;
  text-transform: uppercase;
  text-align: center;
}

/* ---------- Links ---------- */
.links {
  display: flex;
  flex-direction: column;
  gap: var(--spacing-10);
  padding: 0 var(--spacing-20);
}

.link-row {
  display: flex;
  align-items: center;
  gap: var(--spacing-12);
  padding: var(--spacing-12) var(--spacing-16) var(--spacing-12) var(--spacing-12);
  background: var(--color-surface-glass);
  border: 1px solid var(--color-border-default);
  border-radius: var(--radius-full);
  transition: background-color 0.15s ease;
}

.link-row:hover { background: var(--color-surface-glass-strong); }

.link-row__icon {
  display: flex;
  align-items: center;
  justify-content: center;
  flex: none;
  width: 40px;
  height: 40px;
  border-radius: var(--radius-full);
  background: var(--color-surface-brand-subtle);
}

.link-row__text {
  display: flex;
  flex-direction: column;
  gap: var(--spacing-2);
  flex: 1 1 0;
  min-width: 0;
}

.link-row__title {
  font-size: 15px;
  line-height: 20px;
  font-weight: var(--font-weight-medium);
}

.link-row__sub {
  font-size: 12px;
  line-height: 16px;
  color: var(--color-text-secondary);
}

.link-row__chevron { flex: none; }

/* ---------- Panels ---------- */
.panel {
  display: flex;
  flex-direction: column;
  gap: 20px;
  padding: 32px var(--spacing-2) var(--spacing-2);
  background: var(--color-bg-app-elevated);
  border-radius: var(--radius-panel);
  box-shadow: 1px 1px 23.6px rgba(0, 0, 0, 0.07);
  overflow: hidden;
}

.panel__header {
  display: flex;
  flex-direction: column;
  gap: var(--spacing-6);
  padding: 0 24px;
}

.overline {
  font-size: 10px;
  line-height: 12px;
  font-weight: var(--font-weight-medium);
  letter-spacing: 0.5px;
  text-transform: uppercase;
  color: var(--color-text-brand);
}

.panel__title {
  font-size: 24px;
  line-height: 28px;
  font-weight: var(--font-weight-semibold);
}

.panel__lead {
  font-size: 15px;
  line-height: 20px;
  letter-spacing: -0.25px;
  color: var(--color-text-secondary);
}

/* ---------- Products ---------- */
.products {
  display: flex;
  gap: var(--spacing-2);
}

.product {
  position: relative;
  flex: 1 1 0;
  min-width: 0;
  aspect-ratio: 197 / 250;
  border-radius: var(--radius-inner);
  overflow: hidden;
  text-align: left;
}

.product--photo { background: var(--color-surface-brand-subtle); }
.product--light { background: #e6e3e6; }

.product__image {
  position: absolute;
  left: -2.5%;
  top: -8%;
  width: 105%;
  height: 116%;
  max-width: none;
  object-fit: cover;
  transition: transform 0.3s ease;
}

.product:hover .product__image { transform: scale(1.03); }

.product__price {
  position: absolute;
  left: 16px;
  bottom: 23px;
  font-size: 17px;
  line-height: 22px;
  font-weight: var(--font-weight-medium);
  color: var(--color-text-primary);
  white-space: nowrap;
}

.product--light .product__price { left: 24px; bottom: 25px; }

.product__go {
  position: absolute;
  right: 19px;
  bottom: 20px;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 40px;
  height: 40px;
  border: 1px solid var(--color-border-subtle);
  border-radius: 47px;
}

.product--light .product__go { right: 15px; border-color: rgba(0, 0, 0, 0.06); }

/* ---------- Coaching tiers ---------- */
.tiers {
  display: flex;
  flex-direction: column;
  gap: var(--spacing-2);
}

.tier {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: var(--spacing-16);
  padding: var(--spacing-32) var(--spacing-24);
  background: var(--color-surface-card);
  border-radius: var(--radius-inner);
}

.tier--brand { background: var(--color-surface-brand-subtle); }

.badge {
  padding: var(--spacing-4) var(--spacing-10);
  background: var(--color-bg-brand);
  border-radius: var(--radius-full);
  font-size: 10px;
  line-height: 12px;
  font-weight: var(--font-weight-semibold);
  text-transform: uppercase;
  color: var(--color-text-on-brand);
}

.tier__title-row {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: var(--spacing-12);
  width: 100%;
  white-space: nowrap;
}

.tier__name {
  font-size: 18px;
  line-height: 22px;
  font-weight: var(--font-weight-semibold);
}

.tier__price {
  display: flex;
  align-items: flex-end;
  gap: var(--spacing-4);
}

.tier__amount {
  font-size: 18px;
  line-height: 22px;
  font-weight: var(--font-weight-semibold);
  color: var(--color-text-brand);
}

.tier__per {
  font-size: 12px;
  line-height: 16px;
  color: var(--color-text-secondary);
}

.bullets {
  display: flex;
  flex-direction: column;
  gap: var(--spacing-10);
  width: 100%;
  padding: 0;
  list-style: none;
}

.bullets li {
  min-height: 20px;
  padding-left: 28px;
  background: url("assets/icon-check.svg") left 1px / 18px 18px no-repeat;
  font-size: 14px;
  line-height: 20px;
}

.button {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  margin-top: auto;
  padding: var(--spacing-16) var(--spacing-32);
  border-radius: var(--radius-full);
  font-size: 17px;
  line-height: 22px;
  font-weight: var(--font-weight-medium);
  color: var(--color-action-white-text);
  white-space: nowrap;
  transition: background-color 0.15s ease;
}

.button--white { background: var(--color-action-white-bg); }
.button--white:hover { background: var(--color-action-white-bg-pressed); }
.button--brand { background: var(--color-action-brand-bg); }
.button--brand:hover { background: var(--color-action-brand-bg-pressed); }

/* ---------- Footer ---------- */
.footer {
  display: flex;
  flex-direction: column;
  gap: var(--spacing-6);
  padding: var(--spacing-32) var(--spacing-20) 40px;
  font-size: 12px;
  line-height: 16px;
  text-align: center;
}

.footer__links { color: var(--color-text-secondary); }
.footer__copy { color: var(--color-text-tertiary); }

/* ---------- Program page ---------- */
.program-page {
  display: flex;
  flex-direction: column;
  gap: var(--spacing-16);
  max-width: 480px;
  margin: 0 auto;
}

.has-buy-bar { padding-bottom: 96px; }

.site-header {
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
  padding: var(--spacing-16) var(--spacing-20) 0;
}

/* Logo placeholder: swap for the real mark */
.logo {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 36px;
  height: 36px;
  background: var(--color-surface-glass);
  border: 1px solid var(--color-border-default);
  border-radius: 10px;
  font-size: 8px;
  line-height: 12px;
  font-weight: var(--font-weight-semibold);
  letter-spacing: 0.5px;
  text-transform: uppercase;
  color: var(--color-text-secondary);
}

.site-nav {
  display: flex;
  gap: var(--spacing-24);
  font-size: 15px;
  line-height: 20px;
  font-weight: var(--font-weight-medium);
}

.site-nav a { padding: var(--spacing-12) 0; transition: color 0.15s ease; }
.site-nav a:hover { color: var(--color-text-brand); }

.back-arrow {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 44px;
  height: 44px;
  margin: -10px 0 -10px 10px;
  border-radius: var(--radius-full);
  transition: transform 0.15s ease;
}

.back-arrow:hover { transform: translateX(-3px); }

.purchase {
  display: flex;
  flex-direction: column;
  gap: var(--spacing-12);
  margin-top: 14px;
}

.purchase__price {
  font-size: 18px;
  line-height: 22px;
  font-weight: var(--font-weight-semibold);
}

.purchase__actions {
  display: flex;
  gap: 8px;
}

.purchase__actions .button { flex: 1 1 0; min-width: 0; padding-left: var(--spacing-12); padding-right: var(--spacing-12); }

.button--glass {
  background: var(--color-surface-glass);
  color: var(--color-text-primary);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.18), inset 0 0 0 1px rgba(255, 255, 255, 0.06);
}

.button--glass:hover { background: rgba(255, 255, 255, 0.2); }

.program,
.program__main {
  display: flex;
  flex-direction: column;
  gap: var(--spacing-16);
}

.program { padding: 0 var(--spacing-2); }

.panel--flush { padding-top: var(--spacing-2); gap: 0; }
.panel--text { padding-bottom: var(--spacing-32); }

.program__cover {
  position: relative;
  aspect-ratio: 394 / 420;
  border-radius: var(--radius-inner);
  overflow: hidden;
  background: var(--color-surface-brand-subtle);
}

.program__cover--light { background: #e6e3e6; }

.program__cover .product__image { left: 0; top: 0; width: 100%; height: 100%; object-position: 50% 20%; }

.program__head {
  display: flex;
  flex-direction: column;
  gap: var(--spacing-10);
  padding: var(--spacing-24) var(--spacing-24) var(--spacing-32);
}

.program__title {
  font-size: 32px;
  line-height: 38px;
  font-weight: var(--font-weight-semibold);
}

.chips {
  display: flex;
  flex-wrap: wrap;
  gap: var(--spacing-6);
  margin-top: var(--spacing-6);
  padding: 0;
  list-style: none;
}

.chips li {
  padding: var(--spacing-6) var(--spacing-12);
  background: var(--color-surface-glass);
  border: 1px solid var(--color-border-default);
  border-radius: var(--radius-full);
  font-size: 12px;
  line-height: 16px;
  color: var(--color-text-primary);
}

.prose {
  display: flex;
  flex-direction: column;
  gap: var(--spacing-12);
  padding: 0 24px;
  font-size: 15px;
  line-height: 22px;
  letter-spacing: -0.25px;
  color: var(--color-text-secondary);
}

.bullets--padded { padding: 0 24px; }

.more {
  display: flex;
  flex-direction: column;
  gap: 20px;
  padding: var(--spacing-16) var(--spacing-2) 0;
}

.more:empty { display: none; }

.products--more .product { flex: 0 0 calc(50% - 1px); }

.product__title {
  position: absolute;
  left: 16px;
  right: 16px;
  bottom: 49px;
  font-size: 15px;
  line-height: 20px;
  font-weight: var(--font-weight-medium);
  color: var(--color-text-primary);
}

.products--more .product--light .product__title,
.products--more .product--light .product__price { left: 16px; bottom: 49px; color: var(--color-text-on-brand); }
.products--more .product--light .product__price { bottom: 23px; }
.products--more .product__price { color: rgba(255, 255, 255, 0.8); font-size: 15px; }
.products--more .product--light .product__price { color: rgba(22, 22, 24, 0.7); }

/* Floating buy bar */
.buy-bar {
  position: fixed;
  left: 50%;
  bottom: calc(16px + env(safe-area-inset-bottom, 0px));
  z-index: 10;
  display: flex;
  align-items: center;
  gap: var(--spacing-16);
  width: min(100% - 24px, 440px);
  padding: var(--spacing-8, 8px) 8px 8px var(--spacing-24);
  transform: translateX(-50%);
  /* Soft glass: the same 10% white tint as the link rows over a dark base, no gradient, no stroke */
  background-color: rgba(26, 26, 26, 0.6);
  background-image: linear-gradient(var(--color-surface-glass), var(--color-surface-glass));
  -webkit-backdrop-filter: blur(24px);
  backdrop-filter: blur(24px);
  border-radius: var(--radius-full);
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.12),
    0 12px 32px rgba(0, 0, 0, 0.35);
}

.buy-bar__info {
  display: flex;
  flex-direction: column;
  gap: var(--spacing-2);
  flex: 1 1 0;
  min-width: 0;
}

.buy-bar__title {
  font-size: 15px;
  line-height: 20px;
  font-weight: var(--font-weight-medium);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.buy-bar__price {
  font-size: 12px;
  line-height: 16px;
  color: var(--color-text-brand);
}

.button--m {
  width: auto;
  flex: none;
  margin: 0;
  padding: 11px var(--spacing-24);
  font-size: 15px;
}

/* ---------- Desktop ---------- */
@media (min-width: 1024px) {
  .page {
    display: grid;
    grid-template-columns: 402px minmax(0, 1fr);
    column-gap: 24px;
    row-gap: 0;
    max-width: 1160px;
    padding: 32px 32px 0;
  }

  .profile {
    position: sticky;
    top: 32px;
    align-self: start;
  }

  .hero { padding: 24px 0 0; gap: 24px; }

  .hero__photo { width: 160px; height: 160px; }

  .links { padding: 0; }

  .content {
    gap: 24px;
    padding: 0;
  }

  .panel { padding-top: 40px; gap: 28px; }
  .panel__header { padding: 0 32px; }
  .panel__title { font-size: 32px; line-height: 38px; }
  .panel__lead { max-width: 480px; }

  .tiers { flex-direction: row; }
  .tier { flex: 1 1 0; min-width: 0; padding: var(--spacing-32); }

  .product__price { left: 32px; bottom: 37px; }
  .product--light .product__price { left: 32px; bottom: 37px; }
  .product__go,
  .product--light .product__go { right: 28px; bottom: 28px; width: 48px; height: 48px; }

  .footer { grid-column: 1 / -1; padding-top: 48px; }

  /* Only the profile is shown: one column in the middle of the screen */
  .page--solo {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    min-height: 100vh;
    padding: 32px;
  }

  .page--solo .profile {
    position: static;
    align-self: center;
    width: 402px;
    max-width: 100%;
  }

  .page--solo .hero { padding-top: 0; }
  .page--solo .footer { padding: 32px 0 0; }
  /* Program page */
  .program-page {
    max-width: 1160px;
    padding: 16px 32px 0;
    gap: 24px;
  }

  .site-header { padding: 0; }
  .back-arrow { margin-left: -10px; }

  .program {
    display: grid;
    grid-template-columns: 402px minmax(0, 1fr);
    gap: 24px;
    padding: 0;
  }

  .program__aside { align-self: start; }

  .program__main { gap: 24px; }
  .program__head { padding: var(--spacing-24) 32px var(--spacing-32); }
  .prose { max-width: 620px; padding: 0 32px; font-size: 17px; line-height: 26px; }
  .bullets--padded { padding: 0 32px; }

  .more { padding: var(--spacing-24) 0 0; }
  .products--more .product { flex: 0 0 260px; }
  .products--more .product .product__price { left: 16px; bottom: 23px; }
  .products--more .product .product__go { right: 16px; bottom: 16px; width: 40px; height: 40px; }
}


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

@media (min-width: 1024px) and (min-height: 860px) {
  .program__aside {
    position: sticky;
    top: 24px;
  }
}
