/* ===========================================================================
   Medbay Fit — medbay.fit
   Single shared stylesheet. No build step, no external fonts, no CDN, no JS.

   Brand tokens are copied verbatim from the app source so the site and the app
   cannot drift apart:
     iOS      fitness-app/fitness-app/Core/Theme.swift        (AppPalette.neonLime)
     Android  fitness-android/.../core/ui/Color.kt            (NeonLime, DarkNeutrals)
     App icon fitness-android/.../res/drawable/ic_launcher_background.xml (#141515)
   =========================================================================== */

:root {
  /* Accent — neonLime (the app's default palette) */
  --accent:        #d7f53c;
  --accent-soft:   #e9fc86;
  --accent-deep:   #a8c617;
  --on-accent:     #16180a;

  /* Dark neutrals — DarkNeutrals in Color.kt */
  --bg:            #12120d;
  --bg-raised:     #1c1c15;
  --card:          #1c1c15;
  --card-high:     #25251c;
  --ink:           #0a0a06;
  --icon-bg:       #141515; /* app icon background */
  --stroke:        rgba(255, 255, 255, 0.08);
  --stroke-strong: rgba(255, 255, 255, 0.18);

  --text:          #f2f2e9;
  --text-2:        #b4b4a6;
  --text-3:        #949488;

  /* Ring colours — RingColors in Color.kt */
  --ring-kcal:     #f59e0b;
  --ring-protein:  #2e90fa;
  --ring-water:    #06b6d4;
  --ring-workout:  #16a34a;

  --radius-sm: 12px;
  --radius-md: 18px;
  --radius-lg: 24px;
  --radius-xl: 32px;

  --measure: 68ch;       /* legal text column */
  --shell:   1120px;     /* page shell */

  --font: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue",
          Arial, "Noto Sans", sans-serif;
}

/* --------------------------------------------------------------------- reset */

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

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

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: var(--font);
  font-size: 17px;
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

img, svg { max-width: 100%; }
svg { display: block; }

h1, h2, h3, h4 {
  margin: 0 0 .5em;
  line-height: 1.15;
  letter-spacing: -0.02em;
  font-weight: 800;
}

p { margin: 0 0 1.1em; }
ul, ol { margin: 0 0 1.1em; padding-left: 1.35em; }
li { margin-bottom: .4em; }

a {
  color: var(--accent);
  text-decoration-thickness: 1px;
  text-underline-offset: 3px;
}
a:hover { color: var(--accent-soft); }

strong { color: var(--text); font-weight: 700; }

code, kbd {
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  font-size: .9em;
  background: var(--card-high);
  border: 1px solid var(--stroke);
  border-radius: 6px;
  padding: .1em .38em;
}

hr {
  border: 0;
  border-top: 1px solid var(--stroke);
  margin: 2.5rem 0;
}

/* ------------------------------------------------------------ a11y / focus */

:focus-visible {
  outline: 3px solid var(--accent);
  outline-offset: 3px;
  border-radius: 4px;
}

.skip-link {
  position: absolute;
  left: 1rem;
  top: -5rem;
  z-index: 50;
  background: var(--accent);
  color: var(--on-accent);
  font-weight: 700;
  padding: .7rem 1.1rem;
  border-radius: 0 0 var(--radius-sm) var(--radius-sm);
  text-decoration: none;
  transition: top .15s ease;
}
.skip-link:focus { top: 0; color: var(--on-accent); }

.visually-hidden {
  position: absolute;
  width: 1px; height: 1px;
  margin: -1px; padding: 0;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
  border: 0;
}

/* ------------------------------------------------------------------- layout */

.shell {
  width: 100%;
  max-width: var(--shell);
  margin: 0 auto;
  padding: 0 1.25rem;
}

section { padding: 4.5rem 0; }
section + section { border-top: 1px solid var(--stroke); }

.eyebrow {
  display: inline-block;
  font-size: .78rem;
  font-weight: 800;
  letter-spacing: .14em;
  text-transform: uppercase;
  color: var(--accent);
  margin-bottom: .9rem;
}

.lede {
  font-size: 1.16rem;
  color: var(--text-2);
  max-width: 62ch;
}

/* ------------------------------------------------------------------- header */

.site-header {
  position: sticky;
  top: 0;
  z-index: 20;
  background: rgba(18, 18, 13, 0.86);
  backdrop-filter: saturate(140%) blur(12px);
  border-bottom: 1px solid var(--stroke);
}

.site-header .shell {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  min-height: 64px;
}

.wordmark {
  display: inline-flex;
  align-items: center;
  gap: .6rem;
  color: var(--text);
  text-decoration: none;
  font-weight: 800;
  letter-spacing: -0.02em;
  font-size: 1.05rem;
}
.wordmark:hover { color: var(--text); }
.wordmark .mark {
  color: var(--accent);
  width: 34px;
  height: 34px;
  flex: 0 0 auto;
  background: var(--icon-bg);
  border: 1px solid var(--stroke);
  border-radius: 9px;
  padding: 3px;
}
.wordmark .mark svg { width: 100%; height: 100%; }
.wordmark em {
  font-style: normal;
  color: var(--accent);
}

.site-nav {
  display: flex;
  align-items: center;
  gap: 1.35rem;
  font-size: .95rem;
  flex-wrap: wrap;
  justify-content: flex-end;
}
.site-nav a {
  color: var(--text-2);
  text-decoration: none;
  font-weight: 600;
}
.site-nav a:hover { color: var(--accent); }

/* --------------------------------------------------------------------- hero */

.hero {
  position: relative;
  padding: 5rem 0 4.5rem;
  overflow: hidden;
  border-top: 0;
}
.hero::before {
  content: "";
  position: absolute;
  inset: -30% 40% 30% -20%;
  background: radial-gradient(closest-side,
              rgba(215, 245, 60, .20),
              rgba(215, 245, 60, .06),
              transparent);
  pointer-events: none;
}
.hero .shell {
  position: relative;
  display: grid;
  grid-template-columns: 1.08fr .92fr;
  gap: 3.5rem;
  align-items: center;
}

.hero h1 {
  font-size: clamp(2.35rem, 6vw, 4rem);
  letter-spacing: -0.035em;
  margin-bottom: 1rem;
}
.hero h1 .hl { color: var(--accent); }

.hero-sub {
  font-size: 1.2rem;
  color: var(--text-2);
  max-width: 46ch;
  margin-bottom: 1.8rem;
}

.hero-meta {
  margin-top: 1.6rem;
  font-size: .88rem;
  color: var(--text-3);
}

/* ------------------------------------------------------------ store badges */

.store-badges {
  display: flex;
  flex-wrap: wrap;
  gap: .8rem;
  margin: 0 0 .4rem;
  padding: 0;
  list-style: none;
}
.store-badges li { margin: 0; }

.badge {
  display: inline-flex;
  align-items: center;
  gap: .7rem;
  min-height: 56px;
  padding: .55rem 1.15rem;
  background: var(--card-high);
  border: 1px solid var(--stroke-strong);
  border-radius: 14px;
  color: var(--text);
  text-decoration: none;
  transition: border-color .15s ease, transform .15s ease, background .15s ease;
}
.badge:hover {
  color: var(--text);
  background: #2c2c22;
  border-color: var(--accent);
  transform: translateY(-1px);
}
.badge svg { width: 26px; height: 26px; flex: 0 0 auto; fill: currentColor; }
.badge span { display: block; line-height: 1.2; }
.badge .b-small {
  font-size: .68rem;
  letter-spacing: .06em;
  text-transform: uppercase;
  color: var(--text-3);
}
.badge .b-big { font-size: 1.05rem; font-weight: 700; }

/* ------------------------------------------------------- the "one card" art */

.phone {
  --phone-pad: 14px;
  position: relative;
  margin: 0 auto;
  max-width: 320px;
  background: var(--icon-bg);
  border: 1px solid var(--stroke-strong);
  border-radius: 38px;
  padding: var(--phone-pad);
  box-shadow: 0 30px 70px -30px rgba(0, 0, 0, .9);
}
.phone-screen {
  background: var(--bg);
  border: 1px solid var(--stroke);
  border-radius: 26px;
  padding: 1.1rem 1rem 1.3rem;
}
.phone-time {
  font-size: .72rem;
  color: var(--text-3);
  letter-spacing: .1em;
  text-transform: uppercase;
  margin-bottom: .9rem;
}
.day-card {
  background: var(--accent);
  color: var(--on-accent);
  border-radius: var(--radius-md);
  padding: 1rem 1.05rem 1.1rem;
}
.day-card .dc-top {
  font-size: .68rem;
  font-weight: 800;
  letter-spacing: .14em;
  text-transform: uppercase;
  opacity: .72;
}
.day-card .dc-title {
  font-size: 1.5rem;
  font-weight: 900;
  letter-spacing: -0.03em;
  margin: .15rem 0 .1rem;
}
.day-card .dc-meta { font-size: .88rem; font-weight: 600; opacity: .8; }
.day-card .dc-cta {
  margin-top: .9rem;
  background: var(--on-accent);
  color: var(--accent);
  border-radius: 999px;
  text-align: center;
  font-weight: 800;
  letter-spacing: .08em;
  font-size: .8rem;
  padding: .6rem;
}

.rings {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: .5rem;
  margin-top: .9rem;
}
.ring {
  background: var(--card);
  border: 1px solid var(--stroke);
  border-radius: var(--radius-sm);
  padding: .55rem .35rem;
  text-align: center;
}
.ring .dot {
  width: 22px; height: 22px;
  margin: 0 auto .35rem;
  border-radius: 50%;
  border: 3px solid currentColor;
  border-right-color: rgba(255, 255, 255, .12);
  border-bottom-color: rgba(255, 255, 255, .12);
}
.ring .rv { font-size: .78rem; font-weight: 800; color: var(--text); }
.ring .rl { font-size: .6rem; text-transform: uppercase; letter-spacing: .07em; color: var(--text-3); }
.ring.kcal    { color: var(--ring-kcal); }
.ring.protein { color: var(--ring-protein); }
.ring.water   { color: var(--ring-water); }
.ring.workout { color: var(--ring-workout); }

.meal-row {
  margin-top: .55rem;
  background: var(--card);
  border: 1px solid var(--stroke);
  border-radius: var(--radius-sm);
  padding: .6rem .75rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: .5rem;
  font-size: .82rem;
  color: var(--text-2);
}
.meal-row b { color: var(--text); font-weight: 700; }
.meal-row .tick {
  flex: 0 0 auto;
  width: 22px; height: 22px;
  border-radius: 50%;
  background: var(--accent);
  color: var(--on-accent);
  font-size: .72rem;
  font-weight: 900;
  display: grid;
  place-items: center;
}

/* ----------------------------------------------------------------- feature */

.grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1rem;
}
.grid.two { grid-template-columns: repeat(2, 1fr); }

.card {
  background: var(--card);
  border: 1px solid var(--stroke);
  border-radius: var(--radius-lg);
  padding: 1.5rem 1.4rem;
}
.card h3 {
  font-size: 1.12rem;
  margin-bottom: .45rem;
}
.card p {
  margin: 0;
  color: var(--text-2);
  font-size: .97rem;
}
.card .ico {
  width: 40px; height: 40px;
  border-radius: 12px;
  background: rgba(215, 245, 60, .12);
  border: 1px solid rgba(215, 245, 60, .3);
  color: var(--accent);
  display: grid;
  place-items: center;
  font-size: 1.1rem;
  font-weight: 900;
  margin-bottom: 1rem;
}

.steps {
  counter-reset: step;
  list-style: none;
  padding: 0;
  margin: 0;
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1rem;
}
.steps li {
  counter-increment: step;
  background: var(--card);
  border: 1px solid var(--stroke);
  border-radius: var(--radius-lg);
  padding: 1.5rem 1.4rem;
  margin: 0;
}
.steps li::before {
  content: counter(step);
  display: grid;
  place-items: center;
  width: 38px; height: 38px;
  border-radius: 50%;
  background: var(--accent);
  color: var(--on-accent);
  font-weight: 900;
  font-size: 1.05rem;
  margin-bottom: 1rem;
}
.steps h3 { font-size: 1.1rem; margin-bottom: .4rem; }
.steps p { margin: 0; color: var(--text-2); font-size: .97rem; }

.stat-row {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 1rem;
  margin-top: 2.5rem;
}
.stat {
  background: var(--card-high);
  border: 1px solid var(--stroke);
  border-radius: var(--radius-md);
  padding: 1.1rem 1rem;
  text-align: center;
}
.stat b {
  display: block;
  font-size: 1.6rem;
  font-weight: 900;
  color: var(--accent);
  letter-spacing: -0.03em;
}
.stat span { font-size: .84rem; color: var(--text-2); }

/* ------------------------------------------------------------------ pro box */

.pro {
  background:
    radial-gradient(120% 140% at 0% 0%, rgba(215, 245, 60, .14), transparent 60%),
    var(--card);
  border: 1px solid var(--stroke-strong);
  border-radius: var(--radius-xl);
  padding: 2.5rem 2rem;
}
.plan-list {
  list-style: none;
  padding: 0;
  margin: 1.5rem 0 0;
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: .8rem;
}
.plan-list li {
  background: var(--card-high);
  border: 1px solid var(--stroke);
  border-radius: var(--radius-md);
  padding: 1rem;
  margin: 0;
  text-align: center;
}
.plan-list b { display: block; font-size: 1.05rem; }
.plan-list span { font-size: .84rem; color: var(--text-3); }

.note {
  background: var(--card-high);
  border: 1px solid var(--stroke);
  border-left: 4px solid var(--accent);
  border-radius: var(--radius-sm);
  padding: 1.1rem 1.25rem;
  margin: 1.8rem 0;
  font-size: .97rem;
  color: var(--text-2);
}
.note :last-child { margin-bottom: 0; }
.note strong { color: var(--text); }

.note.alert {
  border-left-color: #f87171;
  background: rgba(248, 113, 113, .07);
}
.note.alert strong { color: #fca5a5; }

/* --------------------------------------------------------------- legal page */

.legal {
  padding: 3.5rem 0 1rem;
}
.legal .shell { max-width: calc(var(--measure) + 2.5rem); }

.back {
  display: inline-flex;
  align-items: center;
  gap: .45rem;
  font-size: .92rem;
  font-weight: 600;
  text-decoration: none;
  color: var(--text-2);
  margin-bottom: 2rem;
}
.back:hover { color: var(--accent); }
.back::before { content: "\2190"; font-size: 1.05em; }

.legal h1 {
  font-size: clamp(2rem, 5vw, 2.8rem);
  letter-spacing: -0.03em;
}
.updated {
  font-size: .88rem;
  color: var(--text-3);
  margin: -0.2rem 0 2rem;
}
.updated b { color: var(--text-2); font-weight: 700; }

.prose { max-width: var(--measure); }
.prose h2 {
  font-size: 1.4rem;
  margin-top: 2.6rem;
  padding-top: 1.6rem;
  border-top: 1px solid var(--stroke);
}
.prose h2:first-of-type { margin-top: 2rem; }
.prose h3 {
  font-size: 1.1rem;
  margin-top: 1.8rem;
  color: var(--accent-soft);
}
.prose p, .prose li { color: var(--text-2); }
.prose strong { color: var(--text); }
.prose ul { padding-left: 1.2em; }

.toc {
  background: var(--card);
  border: 1px solid var(--stroke);
  border-radius: var(--radius-md);
  padding: 1.25rem 1.4rem;
}
.toc h2 {
  font-size: .78rem;
  letter-spacing: .14em;
  text-transform: uppercase;
  color: var(--text-3);
  border: 0;
  margin: 0 0 .7rem;
  padding: 0;
}
.toc ol { margin: 0; padding-left: 1.3em; }
.toc li { margin-bottom: .2em; }
.toc a { text-decoration: none; }
.toc a:hover { text-decoration: underline; }

.data-table {
  width: 100%;
  border-collapse: collapse;
  font-size: .93rem;
  margin: 0 0 1.4rem;
  display: block;
  overflow-x: auto;
}
.data-table th, .data-table td {
  text-align: left;
  vertical-align: top;
  padding: .7rem .8rem;
  border-bottom: 1px solid var(--stroke);
  color: var(--text-2);
}
.data-table th {
  color: var(--text);
  font-weight: 700;
  white-space: nowrap;
}
.data-table thead th {
  border-bottom: 1px solid var(--stroke-strong);
  font-size: .78rem;
  letter-spacing: .1em;
  text-transform: uppercase;
  color: var(--text-3);
}

.faq { margin-top: 1rem; }
.faq h3 {
  color: var(--text);
  font-size: 1.05rem;
  margin-top: 2rem;
}
.faq h3:first-child { margin-top: 0; }

.contact-card {
  background: var(--card);
  border: 1px solid var(--stroke-strong);
  border-radius: var(--radius-lg);
  padding: 1.6rem 1.5rem;
  margin: 1.5rem 0 2.5rem;
}
.contact-card p:last-child { margin-bottom: 0; }
.contact-card .mail {
  font-size: 1.3rem;
  font-weight: 800;
  letter-spacing: -0.02em;
  word-break: break-all;
}

/* ------------------------------------------------------------------- footer */

.site-footer {
  border-top: 1px solid var(--stroke);
  background: var(--ink);
  padding: 3rem 0 2.5rem;
  margin-top: 4rem;
  font-size: .95rem;
}
.footer-grid {
  display: grid;
  grid-template-columns: 1.4fr 1fr 1fr;
  gap: 2rem;
}
.site-footer h2 {
  font-size: .78rem;
  letter-spacing: .14em;
  text-transform: uppercase;
  color: var(--text-3);
  margin-bottom: .8rem;
}
.site-footer ul { list-style: none; padding: 0; margin: 0; }
.site-footer li { margin-bottom: .45rem; }
.site-footer a { color: var(--text-2); text-decoration: none; }
.site-footer a:hover { color: var(--accent); text-decoration: underline; }
.site-footer p { color: var(--text-3); font-size: .9rem; }
.legal-line {
  border-top: 1px solid var(--stroke);
  margin-top: 2.5rem;
  padding-top: 1.5rem;
  color: var(--text-3);
  font-size: .86rem;
}
.legal-line p { margin: 0 0 .5em; }

/* -------------------------------------------------------------- responsive */

@media (max-width: 900px) {
  .hero .shell { grid-template-columns: 1fr; gap: 2.5rem; }
  .hero { padding: 3rem 0 3.5rem; }
  .grid, .grid.two, .steps { grid-template-columns: repeat(2, 1fr); }
  .stat-row { grid-template-columns: repeat(2, 1fr); }
  .footer-grid { grid-template-columns: 1fr 1fr; }
}

@media (max-width: 620px) {
  body { font-size: 16px; }
  section { padding: 3rem 0; }
  .grid, .grid.two, .steps, .plan-list, .stat-row { grid-template-columns: 1fr; }
  .footer-grid { grid-template-columns: 1fr; }
  .site-header .shell { flex-direction: column; align-items: flex-start; padding-top: .7rem; padding-bottom: .7rem; }
  .site-nav { justify-content: flex-start; gap: 1rem; }
  .badge { width: 100%; }
  .pro { padding: 1.75rem 1.25rem; }
  .rings { grid-template-columns: repeat(2, 1fr); }
}

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

/* Light-mode users still get the athletic dark identity on purpose; we only
   soften the ambient glow for very bright environments. */
@media (prefers-contrast: more) {
  :root {
    --text-2: #dcdcd2;
    --text-3: #b8b8ab;
    --stroke: rgba(255, 255, 255, .22);
  }
  .hero::before { display: none; }
}

@media print {
  body { background: #fff; color: #000; }
  .site-header, .site-footer, .store-badges, .phone { display: none; }
  .prose p, .prose li, .prose h3 { color: #000; }
  a { color: #000; }
}
