:root {
  --text: #f2eee4;
  --muted: rgba(242, 238, 228, 0.84);
  --line: rgba(242, 238, 228, 0.3);
  --line-strong: rgba(242, 238, 228, 0.55);
  --chip-bg: rgba(20, 19, 17, 0.24);
  --chip-bg-strong: rgba(20, 19, 17, 0.42);
  --panel: rgba(15, 15, 14, 0.46);
  --accent: #ece1c1;
  --ok: #9de7be;
  --error: #ff9f9f;
}

* {
  box-sizing: border-box;
}

html,
body {
  margin: 0;
  min-height: 100%;
}

body {
  color: var(--text);
  font-family: 'Manrope', 'Avenir Next', 'Segoe UI', sans-serif;
  position: relative;
}

body::before {
  content: '';
  position: fixed;
  inset: 0;
  background: url('/photos/me_fitness_vizual_horizontal.png') center center / cover no-repeat;
  z-index: -3;
}

body::after {
  content: '';
  position: fixed;
  inset: 0;
  background:
    radial-gradient(circle at 14% 18%, rgba(255, 255, 255, 0.18), transparent 34%),
    linear-gradient(180deg, rgba(11, 11, 10, 0.18), rgba(11, 11, 10, 0.34));
  z-index: -2;
}

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

h1,
h2,
h3 {
  margin: 0;
  font-family: 'Questrial', 'Helvetica Neue', sans-serif;
  font-weight: 400;
  letter-spacing: 0.02em;
}

p {
  margin: 0;
}

button,
input {
  font: inherit;
}

.container {
  width: min(1280px, calc(100% - 2.4rem));
  margin: 0 auto;
}

.topbar {
  position: fixed;
  inset: 0 0 auto 0;
  z-index: 40;
  border-bottom: 1px solid rgba(242, 238, 228, 0.18);
  background: linear-gradient(180deg, rgba(13, 13, 12, 0.56), rgba(13, 13, 12, 0.22) 74%, transparent);
  backdrop-filter: blur(4px);
}

.topbar__inner {
  min-height: 88px;
  display: grid;
  grid-template-columns: auto 1fr;
  align-items: center;
  gap: 1.15rem;
}

.brand {
  display: inline-flex;
  align-items: center;
}

.brand__lockup {
  display: grid;
  gap: 0.08rem;
}

.brand__wordmark {
  font-family: 'Questrial', sans-serif;
  font-size: clamp(1.22rem, 1.8vw, 1.82rem);
  letter-spacing: 0.08em;
  text-transform: lowercase;
}

.brand__subline {
  font-family: ui-monospace, 'SFMono-Regular', 'Menlo', monospace;
  font-size: clamp(0.56rem, 0.78vw, 0.72rem);
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--muted);
}

.topbar__nav {
  width: 100%;
}

.topbar__menu {
  margin: 0;
  padding: 0;
  list-style: none;
  display: flex;
  align-items: center;
  gap: 0.56rem;
  flex-wrap: nowrap;
}

.topbar__menu a {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 30px;
  padding: 0.36rem 0.74rem;
  border-radius: 999px;
  border: 1px solid var(--line);
  background: var(--chip-bg);
  color: var(--text);
  font-family: ui-monospace, 'SFMono-Regular', 'Menlo', monospace;
  font-size: 0.66rem;
  letter-spacing: 0.11em;
  text-transform: uppercase;
  transition: border-color 160ms ease, background-color 160ms ease;
}

.topbar__menu a:hover,
.topbar__menu a.is-active {
  border-color: var(--line-strong);
  background: var(--chip-bg-strong);
}

.topbar__meta {
  display: flex;
  align-items: center;
  gap: 0.56rem;
  justify-self: end;
}

.topbar__chip {
  position: relative;
  border: 1px solid var(--line);
  background: var(--chip-bg);
  color: var(--text);
  border-radius: 999px;
  min-height: 34px;
  padding: 0.42rem 0.88rem;
  cursor: pointer;
  font-family: ui-monospace, 'SFMono-Regular', 'Menlo', monospace;
  font-size: 0.72rem;
  text-transform: uppercase;
  letter-spacing: 0.11em;
  transition: border-color 160ms ease, background-color 160ms ease;
}

.topbar__chip:hover {
  border-color: var(--line-strong);
  background: var(--chip-bg-strong);
}

.topbar__chip--icon {
  width: 36px;
  height: 34px;
  padding: 0;
  display: grid;
  place-items: center;
}

.topbar__chip--icon svg {
  width: 18px;
  height: 18px;
}

.cart-count {
  position: absolute;
  right: -7px;
  top: -7px;
  min-width: 17px;
  height: 17px;
  border-radius: 99px;
  background: var(--accent);
  color: #1a1814;
  font-family: ui-monospace, 'SFMono-Regular', 'Menlo', monospace;
  font-size: 0.62rem;
  font-weight: 700;
  display: grid;
  place-items: center;
}

.topbar__note {
  margin: 0 0 0 0.3rem;
  color: var(--muted);
  font-family: ui-monospace, 'SFMono-Regular', 'Menlo', monospace;
  font-size: 0.82rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  white-space: nowrap;
}

main {
  padding-top: 104px;
}

.hero {
  min-height: calc(100svh - 104px);
  padding-block: clamp(2.2rem, 6vh, 4.8rem) 2rem;
  display: flex;
  flex-direction: column;
  justify-content: center;
}

.hero-kicker {
  color: var(--muted);
  text-transform: uppercase;
  letter-spacing: 0.16em;
  font-family: ui-monospace, 'SFMono-Regular', 'Menlo', monospace;
  font-size: 0.66rem;
}

.hero h1 {
  margin-top: 0.6rem;
  font-size: clamp(2rem, 4vw, 3.6rem);
  line-height: 0.95;
  max-width: 14ch;
}

.hero-copy {
  margin-top: 1rem;
  max-width: 60ch;
  color: var(--muted);
  line-height: 1.58;
}

.status-line {
  margin-top: 1rem;
  min-height: 1.2rem;
  color: var(--muted);
  font-size: 0.93rem;
}

.status-line.ok {
  color: var(--ok);
}

.status-line.error {
  color: var(--error);
}

.plans {
  padding-block: 1.4rem 2.6rem;
}

.plans-head {
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 0.9rem;
}

.plans-head h2,
.panel h1 {
  font-size: clamp(1.8rem, 3vw, 2.6rem);
}

.plans-head p,
.panel-copy {
  color: var(--muted);
}

.plans-grid {
  margin-top: 1rem;
  display: grid;
  grid-auto-flow: column;
  grid-auto-columns: minmax(320px, 27.5%);
  gap: 0.9rem;
  overflow-x: auto;
  scroll-snap-type: x mandatory;
  scrollbar-width: thin;
  scrollbar-color: rgba(242, 238, 228, 0.35) transparent;
  padding-bottom: 0.35rem;
}

.plans-grid::-webkit-scrollbar {
  height: 8px;
}

.plans-grid::-webkit-scrollbar-track {
  background: transparent;
}

.plans-grid::-webkit-scrollbar-thumb {
  background: rgba(242, 238, 228, 0.35);
  border-radius: 999px;
}

.plans-controls {
  display: flex;
  gap: 0.4rem;
}

.info-section {
  padding-bottom: 2rem;
}

.info-card {
  border: 1px solid var(--line);
  background: rgba(15, 15, 14, 0.46);
  border-radius: 16px;
  padding: 1.2rem;
  display: grid;
  gap: 0.9rem;
}

.info-card h2 {
  font-size: clamp(1.7rem, 2.8vw, 2.4rem);
}

.info-card p {
  color: var(--muted);
  line-height: 1.6;
  max-width: 88ch;
}

.benefits-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.8rem;
}

.benefits-controls {
  display: flex;
  gap: 0.4rem;
}

.benefits-arrow {
  border: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.08);
  color: var(--text);
  width: 34px;
  height: 34px;
  border-radius: 999px;
  display: grid;
  place-items: center;
  font-size: 1.1rem;
  cursor: pointer;
  transition: background-color 160ms ease, border-color 160ms ease, opacity 160ms ease;
}

.benefits-arrow:hover {
  background: rgba(255, 255, 255, 0.16);
  border-color: var(--line-strong);
}

.benefits-arrow:disabled {
  opacity: 0.35;
  cursor: default;
}

.benefits-hint {
  color: var(--muted);
  font-size: 0.88rem;
}

.benefits-carousel {
  margin: 0;
  padding: 0 0 0.35rem 0;
  list-style: none;
  display: grid;
  grid-auto-flow: column;
  grid-auto-columns: minmax(280px, 34%);
  gap: 0.8rem;
  overflow-x: auto;
  scroll-snap-type: x mandatory;
  scrollbar-width: thin;
  scrollbar-color: rgba(242, 238, 228, 0.35) transparent;
}

.benefits-carousel::-webkit-scrollbar {
  height: 8px;
}

.benefits-carousel::-webkit-scrollbar-track {
  background: transparent;
}

.benefits-carousel::-webkit-scrollbar-thumb {
  background: rgba(242, 238, 228, 0.35);
  border-radius: 999px;
}

.benefit-card {
  scroll-snap-align: start;
  border: 1px solid var(--line);
  border-radius: 14px;
  padding: 0.95rem;
  background: linear-gradient(165deg, rgba(255, 255, 255, 0.09), rgba(10, 10, 10, 0.24));
  color: var(--muted);
  line-height: 1.5;
}

.benefit-index {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 38px;
  height: 24px;
  border-radius: 999px;
  border: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.12);
  color: var(--text);
  font-family: ui-monospace, 'SFMono-Regular', 'Menlo', monospace;
  font-size: 0.64rem;
  letter-spacing: 0.11em;
  margin: 0.12rem 0 0.55rem 0.14rem;
}

.benefit-card strong {
  display: block;
  color: var(--text);
  margin-bottom: 0.24rem;
}

.benefit-card span {
  display: block;
}

.plan-card {
  border: 1px solid var(--line);
  border-radius: 16px;
  overflow: hidden;
  position: relative;
  width: 100%;
  aspect-ratio: 2 / 3;
  scroll-snap-align: start;
}

.plan-card::before {
  content: '';
  position: absolute;
  inset: 0;
  background: url('/photos/me_fitness_vizual_vertical.png') center center / cover no-repeat;
  filter: brightness(0.7);
}

.plan-card::after {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(165deg, rgba(8, 8, 8, 0.1), rgba(8, 8, 8, 0.48));
}

.plan-content {
  position: relative;
  z-index: 1;
  padding: 1.05rem;
  height: 100%;
  display: flex;
  flex-direction: column;
  gap: 0.6rem;
}

.plan-badge {
  font-family: ui-monospace, 'SFMono-Regular', 'Menlo', monospace;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  font-size: 0.64rem;
  color: var(--muted);
}

.plan-title {
  font-size: 1.65rem;
  line-height: 0.96;
}

.plan-description {
  color: var(--text);
  line-height: 1.46;
  max-width: 46ch;
}

.plan-price {
  font-family: 'Questrial', sans-serif;
  font-size: 1.46rem;
  color: #f8efda;
}

.buy-btn,
.primary-btn,
.ghost-btn,
.google-btn {
  border-radius: 11px;
  padding: 0.68rem 0.9rem;
  border: 1px solid transparent;
  cursor: pointer;
}

.buy-btn,
.primary-btn {
  background: rgba(236, 225, 193, 0.88);
  color: #171611;
  font-weight: 600;
}

.buy-btn:hover,
.primary-btn:hover {
  background: var(--accent);
}

.plan-card .buy-btn {
  margin-top: auto;
  padding: 0.48rem 1rem;
  font-size: 0.86rem;
  border-radius: 8px;
  min-height: 34px;
  align-self: center;
}

.ghost-btn,
.google-btn {
  background: rgba(255, 255, 255, 0.08);
  border-color: var(--line);
  color: var(--text);
}

.ghost-btn:hover,
.google-btn:hover {
  background: rgba(255, 255, 255, 0.14);
}

.site-footer {
  padding-bottom: 1.8rem;
  color: var(--muted);
  font-size: 0.86rem;
}

.page-main {
  padding-block: 2rem 2.4rem;
}

.account-page .page-main {
  padding-top: 4.8rem;
}

.cart-page .page-main {
  padding-top: 4.8rem;
}

.panel {
  border: 1px solid var(--line);
  background: var(--panel);
  border-radius: 18px;
  padding: 1.2rem;
}

.auth-panel {
  max-width: 620px;
  margin-top: 2rem;
}

.cart-page .panel {
  margin-top: 2rem;
}

#authView {
  margin-top: 0.5rem;
}

.auth-form {
  margin-top: 1rem;
  display: grid;
  gap: 0.72rem;
}

.auth-form input {
  border-radius: 12px;
  border: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.1);
  color: var(--text);
  padding: 0.72rem 0.84rem;
}

.auth-form input::placeholder {
  color: rgba(242, 238, 228, 0.7);
}

.auth-actions,
.inline-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.58rem;
}

.auth-switch {
  margin-top: 1.15rem;
  display: inline-flex;
  gap: 0.5rem;
  padding: 0.28rem;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: rgba(10, 10, 10, 0.18);
}

.auth-switch-btn {
  border: 1px solid transparent;
  background: transparent;
  color: var(--muted);
  border-radius: 999px;
  padding: 0.36rem 0.8rem;
  font-family: ui-monospace, 'SFMono-Regular', 'Menlo', monospace;
  font-size: 0.66rem;
  letter-spacing: 0.11em;
  text-transform: uppercase;
  cursor: pointer;
}

.auth-switch-btn.active {
  color: var(--text);
  border-color: var(--line);
  background: rgba(255, 255, 255, 0.12);
}

.google-btn {
  margin-top: 0.74rem;
}

.signed-in-view {
  margin-top: 1rem;
  display: grid;
  gap: 0.8rem;
}

.cart-grid {
  margin-top: 1rem;
  display: grid;
  gap: 0.78rem;
}

.cart-footer {
  margin-top: 1rem;
  border-top: 1px solid var(--line);
  padding-top: 1rem;
  display: grid;
  gap: 0.8rem;
}

.cart-total {
  font-family: ui-monospace, 'SFMono-Regular', 'Menlo', monospace;
  font-size: 0.8rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--muted);
}

.checkout-all-btn {
  min-width: 220px;
  justify-self: end;
}

.checkout-block {
  display: grid;
  gap: 0.6rem;
}

.checkout-hint {
  color: var(--muted);
  font-size: 0.88rem;
}

.guest-fields {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0.55rem;
}

.guest-fields input {
  border-radius: 10px;
  border: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.1);
  color: var(--text);
  padding: 0.7rem 0.78rem;
}

.guest-fields input::placeholder {
  color: rgba(242, 238, 228, 0.72);
}

.cart-item {
  border: 1px solid var(--line);
  border-radius: 15px;
  overflow: hidden;
  position: relative;
}

.cart-item::before {
  content: '';
  position: absolute;
  inset: 0;
  background: url('/photos/me_fitness_vizual_vertical.png') center center / cover no-repeat;
  filter: brightness(0.62);
}

.cart-item::after {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(155deg, rgba(8, 8, 8, 0.14), rgba(8, 8, 8, 0.56));
}

.cart-item-content {
  position: relative;
  z-index: 1;
  display: grid;
  gap: 0.55rem;
  padding: 0.98rem;
}

.cart-item-title {
  font-size: 1.56rem;
  line-height: 0.96;
}

.cart-item-desc {
  color: var(--text);
}

.cart-item-price {
  font-family: 'Questrial', sans-serif;
  font-size: 1.34rem;
  color: #f8efda;
}

.empty-state {
  margin-top: 1rem;
  color: var(--muted);
}

.hidden {
  display: none;
}

@media (max-width: 1180px) {
  .topbar__inner {
    grid-template-columns: 1fr;
    gap: 0.7rem;
    padding-block: 0.6rem;
  }

  .topbar__menu {
    flex-wrap: wrap;
  }

  .topbar__meta {
    justify-content: flex-end;
    flex-wrap: wrap;
  }

  main {
    padding-top: 188px;
  }

  .hero {
    min-height: calc(100svh - 188px);
  }
}

@media (max-width: 860px) {
  .container {
    width: min(1280px, calc(100% - 1.2rem));
  }

  .hero {
    padding-block: 2.4rem 1.2rem;
  }

  .account-page .page-main {
    padding-top: 5.2rem;
  }

  .cart-page .page-main {
    padding-top: 5.2rem;
  }

  .plans-grid {
    grid-auto-columns: 86%;
  }

  .benefits-controls {
    display: none;
  }

  .plans-controls {
    display: none;
  }

  .benefits-carousel {
    grid-auto-columns: 86%;
    gap: 0.65rem;
  }

  .topbar__note {
    font-size: 0.72rem;
  }

  .cart-footer {
    gap: 0.95rem;
  }

  .guest-fields {
    grid-template-columns: 1fr;
  }

  .checkout-all-btn {
    width: 100%;
    justify-self: stretch;
  }
}
