:root {
  --bg: #120e0c;
  --surface: #1a1512;
  --surface-muted: #28201c;
  --surface-elevated: #221c18;
  --text: #f6eee8;
  --text-secondary: #d0b8a8;
  --text-body: #b09888;
  --text-muted: #887060;
  --border: #342820;
  --border-strong: #4a3a30;
  --primary: #ff8a64;
  --on-primary: #1a0c08;
  --primary-muted: #3a2018;
  --primary-border: #8a4838;
  --font-display: "Syne", system-ui, sans-serif;
  --font-body: "Figtree", system-ui, sans-serif;
  --max: 68rem;
  --phone-w: 11.5rem;
  --pad-x: 1.25rem;
  --safe-top: env(safe-area-inset-top, 0px);
  --safe-right: env(safe-area-inset-right, 0px);
  --safe-bottom: env(safe-area-inset-bottom, 0px);
  --safe-left: env(safe-area-inset-left, 0px);
}

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

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

body {
  margin: 0;
  min-height: 100vh;
  min-height: 100dvh;
  font-family: var(--font-body);
  font-size: 1.0625rem;
  line-height: 1.55;
  color: var(--text-body);
  background: var(--bg);
  background-image:
    radial-gradient(ellipse 90% 55% at 50% -10%, rgba(255, 138, 100, 0.18), transparent 55%),
    radial-gradient(ellipse 50% 40% at 100% 30%, rgba(138, 72, 56, 0.2), transparent 50%),
    radial-gradient(ellipse 40% 35% at 0% 70%, rgba(58, 32, 24, 0.55), transparent 45%);
  background-attachment: scroll;
  overflow-x: clip;
}

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

a {
  color: var(--primary);
  text-decoration-thickness: 1px;
  text-underline-offset: 0.2em;
}

a:hover {
  color: #ffb090;
}

.site-header {
  position: sticky;
  top: 0;
  z-index: 20;
  display: grid;
  grid-template-columns: 1fr auto;
  grid-template-areas:
    "brand lang"
    "nav nav";
  align-items: center;
  gap: 0.55rem 0.75rem;
  padding: calc(0.65rem + var(--safe-top)) calc(var(--pad-x) + var(--safe-right)) 0.65rem
    calc(var(--pad-x) + var(--safe-left));
  background: rgba(18, 14, 12, 0.9);
  border-bottom: 1px solid var(--border);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
}

.site-header__brand {
  grid-area: brand;
  display: inline-flex;
  align-items: center;
  gap: 0.65rem;
  min-height: 2.75rem;
  color: var(--text);
  text-decoration: none;
  font-family: var(--font-display);
  font-weight: 700;
  letter-spacing: -0.02em;
}

.site-header__brand img {
  width: 2.25rem;
  height: 2.25rem;
  border-radius: 0.35rem;
  flex-shrink: 0;
}

.site-header__brand-text {
  white-space: nowrap;
}

.site-header__nav {
  grid-area: nav;
  display: flex;
  flex-wrap: nowrap;
  gap: 0.35rem 0.85rem;
  font-size: 0.85rem;
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
  scrollbar-width: none;
  padding-bottom: 0.15rem;
  margin-inline: calc(-1 * var(--pad-x));
  padding-inline: var(--pad-x);
}

.site-header__nav::-webkit-scrollbar {
  display: none;
}

.site-header__nav a {
  flex: 0 0 auto;
  color: var(--text-secondary);
  text-decoration: none;
  min-height: 2.5rem;
  display: inline-flex;
  align-items: center;
  padding: 0.15rem 0.1rem;
}

.site-header__nav a:hover {
  color: var(--primary);
}

.lang-switch {
  grid-area: lang;
  display: inline-flex;
  border: 1px solid var(--border-strong);
  border-radius: 0.45rem;
  overflow: hidden;
  background: var(--surface);
  flex-shrink: 0;
}

.lang-switch__btn {
  appearance: none;
  border: 0;
  margin: 0;
  padding: 0.45rem 0.7rem;
  min-height: 2.75rem;
  min-width: 2.75rem;
  background: transparent;
  color: var(--text-muted);
  font-family: var(--font-body);
  font-size: 0.75rem;
  font-weight: 700;
  letter-spacing: 0.04em;
  cursor: pointer;
  touch-action: manipulation;
}

.lang-switch__btn + .lang-switch__btn {
  border-left: 1px solid var(--border);
}

.lang-switch__btn:hover {
  color: var(--text);
  background: var(--primary-muted);
}

.lang-switch__btn.is-active {
  color: var(--on-primary);
  background: var(--primary);
}

.wrap {
  width: min(100% - 2 * var(--pad-x), var(--max));
  margin-inline: auto;
}

@media (min-width: 720px) {
  .site-header {
    grid-template-columns: auto 1fr auto;
    grid-template-areas: "brand nav lang";
    gap: 1rem 1.25rem;
    padding-top: calc(0.85rem + var(--safe-top));
    padding-bottom: 0.85rem;
  }

  .site-header__nav {
    justify-content: flex-end;
    margin-inline: 0;
    padding-inline: 0;
    font-size: 0.9rem;
    gap: 0.85rem 1.15rem;
  }

  body {
    background-attachment: fixed;
  }
}

/* —— Hero —— */
.hero {
  position: relative;
  display: grid;
  place-items: center;
  text-align: center;
  padding: clamp(2rem, 7vw, 5.5rem) var(--pad-x) clamp(2rem, 5vw, 3rem);
  min-height: min(88dvh, 52rem);
}

.hero__logo {
  width: min(14rem, 68vw);
  margin: 0 auto 1.1rem;
  filter: drop-shadow(0 0 2.5rem rgba(255, 138, 100, 0.25));
  animation: rise-in 0.9s ease-out both;
}

/* Logo asset already includes the mybike.love wordmark — keep h1 for a11y/SEO only */
.hero__product {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

.hero__tagline {
  margin: 0.5rem auto 0;
  max-width: 28rem;
  padding-inline: 0.25rem;
  font-size: clamp(1.05rem, 2.8vw, 1.25rem);
  color: var(--text-secondary);
  animation: rise-in 0.9s ease-out 0.16s both;
}

.hero__ctas {
  display: flex;
  flex-direction: column;
  align-items: stretch;
  width: min(100%, 20rem);
  gap: 0.75rem;
  margin-top: 1.5rem;
  animation: rise-in 0.9s ease-out 0.28s both;
}

@media (min-width: 480px) {
  .hero__ctas {
    flex-direction: row;
    flex-wrap: wrap;
    justify-content: center;
    width: auto;
    max-width: none;
  }
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  min-height: 2.85rem;
  padding: 0.65rem 1.2rem;
  border-radius: 0.55rem;
  border: 1px solid transparent;
  font-family: var(--font-body);
  font-size: 0.95rem;
  font-weight: 600;
  text-decoration: none;
  cursor: pointer;
  touch-action: manipulation;
  transition: transform 0.15s ease, background 0.15s ease, border-color 0.15s ease;
}

.btn:hover {
  transform: translateY(-1px);
}

.btn--primary {
  background: var(--primary);
  color: var(--on-primary);
}

.btn--primary:hover {
  background: #ff9d7c;
  color: var(--on-primary);
}

.btn--ghost {
  background: transparent;
  color: var(--text);
  border-color: var(--border-strong);
}

.btn--ghost:hover {
  border-color: var(--primary-border);
  color: var(--primary);
  background: var(--primary-muted);
}

.btn svg {
  width: 1.15rem;
  height: 1.15rem;
  flex-shrink: 0;
}

/* —— Screenshots —— */
.shots {
  padding: 1rem 0 3.5rem;
}

.shots__head {
  width: min(100% - 2 * var(--pad-x), var(--max));
  margin: 0 auto 1.25rem;
}

.shots__head h2 {
  margin: 0;
  font-family: var(--font-display);
  font-size: clamp(1.5rem, 3vw, 2rem);
  font-weight: 700;
  letter-spacing: -0.03em;
  color: var(--text);
}

.shots__head p {
  margin: 0.4rem 0 0;
  color: var(--text-muted);
  max-width: 36rem;
}

.shots__track {
  display: flex;
  gap: 1rem;
  overflow-x: auto;
  overscroll-behavior-x: contain;
  padding: 0.5rem var(--pad-x) 1.25rem;
  scroll-snap-type: x mandatory;
  scroll-padding-inline: var(--pad-x);
  -webkit-overflow-scrolling: touch;
  animation: drift-in 1s ease-out 0.35s both;
}

@media (min-width: 720px) {
  .shots__track {
    gap: 1.1rem;
    padding-inline: max(var(--pad-x), calc((100% - var(--max)) / 2 + var(--pad-x)));
    scroll-padding-inline: max(var(--pad-x), calc((100% - var(--max)) / 2 + var(--pad-x)));
  }
}

.shots__track::-webkit-scrollbar {
  height: 6px;
}

.shots__track::-webkit-scrollbar-thumb {
  background: var(--border-strong);
  border-radius: 3px;
}

.phone {
  flex: 0 0 auto;
  width: min(14.5rem, 72vw);
  scroll-snap-align: center;
  margin: 0;
}

@media (min-width: 720px) {
  .phone {
    width: var(--phone-w);
    scroll-snap-align: start;
  }
}

.phone__open {
  display: block;
  width: 100%;
  padding: 0;
  margin: 0;
  border: 0;
  background: transparent;
  cursor: zoom-in;
  touch-action: manipulation;
  border-radius: 1.35rem;
  transition: transform 0.15s ease;
}

.phone__open:hover {
  transform: translateY(-2px);
}

.phone__open:focus-visible {
  outline: 2px solid var(--primary);
  outline-offset: 3px;
}

.phone__frame {
  display: block;
  border-radius: 1.35rem;
  border: 2px solid var(--border-strong);
  background: #0a0807;
  padding: 0.35rem;
  box-shadow:
    0 0 0 1px rgba(255, 138, 100, 0.08),
    0 1.5rem 3rem rgba(0, 0, 0, 0.45);
  overflow: hidden;
}

.phone__frame img {
  width: 100%;
  height: auto;
  border-radius: 1.05rem;
  pointer-events: none;
}

.phone__caption {
  margin: 0.55rem 0 0;
  text-align: center;
  font-size: 0.8rem;
  color: var(--text-muted);
}

/* —— Lightbox —— */
body.lightbox-open {
  overflow: hidden;
}

.lightbox[hidden] {
  display: none;
}

.lightbox {
  position: fixed;
  inset: 0;
  z-index: 80;
  display: grid;
  place-items: center;
  padding: calc(0.75rem + var(--safe-top)) calc(0.75rem + var(--safe-right))
    calc(0.75rem + var(--safe-bottom)) calc(0.75rem + var(--safe-left));
}

.lightbox__backdrop {
  position: absolute;
  inset: 0;
  background: rgba(8, 6, 5, 0.88);
  border: 0;
  cursor: zoom-out;
}

.lightbox__panel {
  position: relative;
  z-index: 1;
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  grid-template-areas:
    "close close close"
    "prev figure next";
  align-items: center;
  gap: 0.35rem 0.35rem;
  width: min(100%, 28rem);
  max-height: calc(100dvh - 1.5rem - var(--safe-top) - var(--safe-bottom));
}

.lightbox__figure {
  grid-area: figure;
  margin: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  min-width: 0;
  max-height: inherit;
}

.lightbox__img {
  max-width: 100%;
  max-height: calc(100dvh - 6.5rem - var(--safe-top) - var(--safe-bottom));
  width: auto;
  height: auto;
  object-fit: contain;
  border-radius: 1.1rem;
  border: 2px solid var(--border-strong);
  background: #0a0807;
  box-shadow: 0 1.25rem 3rem rgba(0, 0, 0, 0.55);
}

.lightbox__caption {
  margin: 0.65rem 0 0;
  text-align: center;
  font-size: 0.9rem;
  color: var(--text-secondary);
}

.lightbox__close,
.lightbox__nav {
  appearance: none;
  border: 1px solid var(--border-strong);
  background: var(--surface-elevated);
  color: var(--text);
  cursor: pointer;
  touch-action: manipulation;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 2.75rem;
  min-height: 2.75rem;
  border-radius: 999px;
  font-size: 1.35rem;
  line-height: 1;
  padding: 0;
}

.lightbox__close:hover,
.lightbox__nav:hover {
  background: var(--primary-muted);
  border-color: var(--primary-border);
  color: var(--primary);
}

.lightbox__close:focus-visible,
.lightbox__nav:focus-visible {
  outline: 2px solid var(--primary);
  outline-offset: 2px;
}

.lightbox__close {
  grid-area: close;
  justify-self: end;
  margin-bottom: 0.15rem;
}

.lightbox__nav--prev {
  grid-area: prev;
}

.lightbox__nav--next {
  grid-area: next;
}

@media (min-width: 720px) {
  .lightbox__panel {
    width: min(100%, 24rem);
    gap: 0.5rem 0.65rem;
  }

  .lightbox__nav {
    min-width: 3rem;
    min-height: 3rem;
  }
}

/* —— Features —— */
.features {
  padding: 0 0 calc(3.5rem + var(--safe-bottom));
}

@media (max-width: 719px) {
  :root {
    --pad-x: 1rem;
  }

  .site-header__brand-text {
    display: none;
  }

  .hero {
    min-height: auto;
    padding-top: 2rem;
    padding-bottom: 2.25rem;
  }
}

.features__grid {
  display: grid;
  gap: 1.75rem 2.5rem;
}

@media (min-width: 720px) {
  .features__grid {
    grid-template-columns: 1fr 1fr;
  }
}

.features h2 {
  margin: 0 0 0.35rem;
  font-family: var(--font-display);
  font-size: clamp(1.5rem, 3vw, 2rem);
  font-weight: 700;
  letter-spacing: -0.03em;
  color: var(--text);
  grid-column: 1 / -1;
}

.features__lead {
  margin: 0 0 0.5rem;
  color: var(--text-muted);
  grid-column: 1 / -1;
  max-width: 40rem;
}

.feature h3 {
  margin: 0 0 0.35rem;
  font-family: var(--font-display);
  font-size: 1.15rem;
  font-weight: 650;
  color: var(--text);
}

.feature p {
  margin: 0;
  color: var(--text-body);
}

.feature {
  padding-top: 0.85rem;
  border-top: 1px solid var(--border);
}

/* —— Legal / support pages —— */
.page {
  padding: 1.75rem 0 calc(3.5rem + var(--safe-bottom));
}

@media (min-width: 720px) {
  .page {
    padding: 2.5rem 0 4rem;
  }
}

.page h1 {
  margin: 0 0 0.5rem;
  font-family: var(--font-display);
  font-size: clamp(1.85rem, 4vw, 2.6rem);
  font-weight: 700;
  letter-spacing: -0.03em;
  color: var(--text);
}

.page__meta {
  margin: 0 0 2rem;
  color: var(--text-muted);
  font-size: 0.9rem;
}

.prose {
  max-width: 42rem;
}

.prose h2 {
  margin: 2rem 0 0.6rem;
  font-family: var(--font-display);
  font-size: 1.25rem;
  color: var(--text);
}

.prose p,
.prose li {
  color: var(--text-body);
}

.prose ul {
  padding-left: 1.2rem;
}

.prose li + li {
  margin-top: 0.35rem;
}

.support-ctas {
  margin-top: 0.75rem;
  align-items: stretch;
}

@media (min-width: 480px) {
  .support-ctas {
    justify-content: flex-start;
  }
}

/* —— Footer —— */
.site-footer {
  border-top: 1px solid var(--border);
  padding: 1.75rem calc(var(--pad-x) + var(--safe-right))
    calc(2rem + var(--safe-bottom)) calc(var(--pad-x) + var(--safe-left));
  background: rgba(10, 8, 6, 0.55);
}

.site-footer__inner {
  width: min(100%, var(--max));
  margin-inline: auto;
  display: flex;
  flex-wrap: wrap;
  gap: 1rem 2rem;
  justify-content: space-between;
  align-items: flex-start;
}

.site-footer nav {
  display: flex;
  flex-wrap: wrap;
  gap: 0.35rem 1rem;
}

.site-footer a {
  color: var(--text-secondary);
  text-decoration: none;
  font-size: 0.9rem;
  min-height: 2.5rem;
  display: inline-flex;
  align-items: center;
}

.site-footer a:hover {
  color: var(--primary);
}

.site-footer__note {
  margin: 0.75rem 0 0;
  width: 100%;
  font-size: 0.8rem;
  color: var(--text-muted);
  max-width: 40rem;
}

@keyframes rise-in {
  from {
    opacity: 0;
    transform: translateY(1.1rem);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes drift-in {
  from {
    opacity: 0;
    transform: translateX(1.5rem);
  }
  to {
    opacity: 1;
    transform: translateX(0);
  }
}

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