/* ============================================================
   CrankIQ — Landing Page Styles
   ============================================================ */

/* ── Reset & Base ────────────────────────────────────────── */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

:root {
  --brand-orange: #F97316;
  --brand-orange-dark: #EA6908;
  --brand-dark: #0F172A;
  --brand-mid: #1E293B;
  --brand-slate: #334155;
  --brand-muted: #94A3B8;
  --brand-light: #F1F5F9;
  --brand-white: #FFFFFF;
  --radius-md: 12px;
  --radius-lg: 20px;
  --shadow-card: 0 4px 24px rgba(0,0,0,.18);
  --transition: .25s ease;
}

html { scroll-behavior: smooth; }

body {
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  background: var(--brand-dark);
  color: var(--brand-white);
  line-height: 1.6;
  overflow-x: hidden;
}

a { color: inherit; text-decoration: none; }
img { max-width: 100%; display: block; }

/* ── Utility ─────────────────────────────────────────────── */
.container { max-width: 1100px; margin: 0 auto; padding: 0 1.5rem; }
.text-orange { color: var(--brand-orange); }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0,0,0,0); white-space: nowrap; }

/* ── Navigation ──────────────────────────────────────────── */
.nav {
  position: fixed; top: 0; left: 0; right: 0; z-index: 100;
  background: rgba(15, 23, 42, 0.85);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-bottom: 1px solid rgba(255,255,255,.06);
  padding: .9rem 0;
  transition: background var(--transition);
}

.nav__inner {
  display: flex; align-items: center; justify-content: space-between;
}

.nav__logo {
  display: flex; align-items: center; gap: .55rem;
  font-weight: 700; font-size: 1.25rem; letter-spacing: -.3px;
}

.nav__logo-icon {
  width: 32px; height: 32px;
  border-radius: 8px;
  display: flex; align-items: center; justify-content: center;
  overflow: hidden;
}

.nav__links {
  display: flex; align-items: center; gap: 2rem;
  list-style: none;
}

.nav__links a {
  font-size: .925rem; color: var(--brand-muted);
  transition: color var(--transition);
}
.nav__links a:hover { color: var(--brand-white); }

.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: .45rem;
  padding: .65rem 1.35rem;
  border-radius: var(--radius-md);
  font-weight: 600; font-size: .925rem;
  cursor: pointer; border: none;
  transition: filter var(--transition), transform var(--transition);
}
.btn:hover { filter: brightness(1.12); transform: translateY(-1px); }
.btn:active { transform: translateY(0); }

.btn--primary {
  background: var(--brand-orange);
  color: var(--brand-white);
}

.btn--outline {
  background: transparent;
  border: 1.5px solid rgba(255,255,255,.2);
  color: var(--brand-white);
}
.btn--outline:hover { border-color: rgba(255,255,255,.5); filter: none; }

.btn--nav { padding: .5rem 1.1rem; }

.btn--lg { padding: .85rem 1.85rem; font-size: 1rem; border-radius: 14px; }

/* ── Hero ────────────────────────────────────────────────── */
.hero {
  min-height: 100vh;
  display: flex; align-items: center;
  padding: 7rem 0 5rem;
  position: relative;
  overflow: hidden;
}

/* animated gradient background */
.hero::before {
  content: "";
  position: absolute; inset: 0;
  background:
    radial-gradient(ellipse 60% 50% at 70% 40%, rgba(249,115,22,.18) 0%, transparent 65%),
    radial-gradient(ellipse 40% 40% at 20% 70%, rgba(249,115,22,.08) 0%, transparent 60%);
  pointer-events: none;
}

.hero__inner {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 3rem;
  align-items: center;
  position: relative;
}

.hero__eyebrow {
  display: inline-flex; align-items: center; gap: .5rem;
  background: rgba(249,115,22,.15);
  border: 1px solid rgba(249,115,22,.3);
  border-radius: 100px;
  padding: .3rem .9rem;
  font-size: .8rem; font-weight: 600;
  color: var(--brand-orange);
  letter-spacing: .5px;
  text-transform: uppercase;
  margin-bottom: 1.25rem;
}

.hero__title {
  font-size: clamp(2.4rem, 5vw, 3.6rem);
  font-weight: 800;
  line-height: 1.1;
  letter-spacing: -.5px;
  margin-bottom: 1.25rem;
}

.hero__title span {
  background: linear-gradient(90deg, #F97316 0%, #FB923C 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.hero__subtitle {
  font-size: 1.15rem;
  color: var(--brand-muted);
  max-width: 480px;
  margin-bottom: 2.25rem;
  line-height: 1.75;
}

.hero__actions {
  display: flex; align-items: center; gap: 1rem;
  flex-wrap: wrap;
}

.hero__store-badge {
  display: inline-flex; align-items: center; gap: .6rem;
  background: var(--brand-white);
  color: var(--brand-dark);
  border-radius: 12px;
  padding: .7rem 1.3rem;
  font-weight: 700;
  transition: transform var(--transition), box-shadow var(--transition);
}
.hero__store-badge:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 28px rgba(0,0,0,.35);
}
.hero__store-badge svg { flex-shrink: 0; }

.hero__store-text { text-align: left; line-height: 1.2; }
.hero__store-text small { display: block; font-size: .65rem; font-weight: 500; color: #555; text-transform: uppercase; letter-spacing: .4px; }
.hero__store-text strong { font-size: 1rem; }

.hero__stats {
  display: flex; gap: 2rem; margin-top: 2.5rem;
}
.hero__stat { border-left: 2px solid var(--brand-orange); padding-left: .75rem; }
.hero__stat strong { display: block; font-size: 1.5rem; font-weight: 800; color: var(--brand-white); }
.hero__stat span { font-size: .8rem; color: var(--brand-muted); }

/* Phone Mockup */
.hero__visual {
  display: flex; justify-content: center; align-items: center;
  position: relative;
}

.phone-mockup {
  position: relative;
  width: 280px;
  filter: drop-shadow(0 30px 60px rgba(0,0,0,.5));
  animation: float 4s ease-in-out infinite;
}

@keyframes float {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-14px); }
}

.phone-mockup__frame {
  background: #111;
  border-radius: 44px;
  border: 2.5px solid rgba(255,255,255,.12);
  padding: 12px;
  box-shadow:
    0 0 0 1px rgba(0,0,0,.6),
    inset 0 0 0 1px rgba(255,255,255,.04);
}

.phone-mockup__screen {
  background: linear-gradient(160deg, #0F172A 0%, #1E293B 100%);
  border-radius: 34px;
  overflow: hidden;
  aspect-ratio: 9/19.5;
  padding: 1.5rem 1rem 1rem;
  display: flex; flex-direction: column; gap: .9rem;
  position: relative;
}

.phone-mockup__notch {
  position: absolute; top: 0; left: 50%; transform: translateX(-50%);
  width: 90px; height: 22px;
  background: #111;
  border-radius: 0 0 16px 16px;
}

/* Fake app UI inside phone */
.app-ui {
  padding-top: 24px;
  display: flex; flex-direction: column; gap: .75rem;
  height: 100%;
}

.app-ui__header {
  display: flex; justify-content: space-between; align-items: center;
}
.app-ui__greeting { font-size: .65rem; color: var(--brand-muted); }
.app-ui__name { font-size: .9rem; font-weight: 700; }
.app-ui__avatar {
  width: 30px; height: 30px; border-radius: 50%;
  background: linear-gradient(135deg, var(--brand-orange), #FB923C);
  display: flex; align-items: center; justify-content: center;
  font-size: 1rem;
  line-height: 1;
}

.app-ui__card {
  background: rgba(249,115,22,.12);
  border: 1px solid rgba(249,115,22,.25);
  border-radius: 14px;
  padding: .75rem;
}
.app-ui__card-label { font-size: .55rem; color: var(--brand-orange); text-transform: uppercase; letter-spacing: .5px; margin-bottom: .2rem; }
.app-ui__card-value { font-size: 1.4rem; font-weight: 800; }
.app-ui__card-unit { font-size: .6rem; color: var(--brand-muted); }

.app-ui__grid {
  display: grid; grid-template-columns: 1fr 1fr; gap: .5rem;
}

.app-ui__stat-card {
  background: rgba(255,255,255,.05);
  border-radius: 10px;
  padding: .6rem;
}
.app-ui__stat-label { font-size: .5rem; color: var(--brand-muted); text-transform: uppercase; }
.app-ui__stat-value { font-size: .95rem; font-weight: 700; margin-top: .1rem; }

/* mini chart */
.app-ui__chart {
  background: rgba(255,255,255,.04);
  border-radius: 10px;
  padding: .6rem;
  flex: 1;
}
.app-ui__chart-label { font-size: .5rem; color: var(--brand-muted); margin-bottom: .35rem; }
.chart-bars {
  display: flex; align-items: flex-end; gap: 3px; height: 38px;
}
.chart-bar {
  flex: 1;
  background: rgba(249,115,22,.35);
  border-radius: 3px 3px 0 0;
  transition: background var(--transition);
}
.chart-bar.active { background: var(--brand-orange); }

/* ── Section shared ──────────────────────────────────────── */
.section { padding: 6rem 0; }
.section--alt { background: var(--brand-mid); }

.section__eyebrow {
  font-size: .78rem; font-weight: 700; letter-spacing: 1px; text-transform: uppercase;
  color: var(--brand-orange); margin-bottom: .6rem;
}
.section__title {
  font-size: clamp(1.75rem, 3.5vw, 2.6rem);
  font-weight: 800;
  line-height: 1.2;
  margin-bottom: 1rem;
}
.section__subtitle {
  font-size: 1.05rem;
  color: var(--brand-muted);
  max-width: 560px;
  margin: 0 auto 3.5rem;
  line-height: 1.7;
}
.section__header { text-align: center; }

/* ── Features ────────────────────────────────────────────── */
.features__grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 1.5rem;
}

.feature-card {
  background: rgba(255,255,255,.04);
  border: 1px solid rgba(255,255,255,.07);
  border-radius: var(--radius-lg);
  padding: 2rem;
  transition: border-color var(--transition), transform var(--transition), background var(--transition);
}
.feature-card:hover {
  border-color: rgba(249,115,22,.35);
  background: rgba(249,115,22,.06);
  transform: translateY(-4px);
}

.feature-card__icon {
  width: 52px; height: 52px;
  background: rgba(249,115,22,.15);
  border-radius: 14px;
  display: flex; align-items: center; justify-content: center;
  font-size: 1.4rem;
  margin-bottom: 1.25rem;
}

.feature-card__title {
  font-size: 1.1rem; font-weight: 700;
  margin-bottom: .5rem;
}

.feature-card__desc {
  font-size: .9rem;
  color: var(--brand-muted);
  line-height: 1.65;
}

/* ── Screenshots Section ─────────────────────────────────── */
.screenshots__track {
  display: flex; gap: 1.5rem;
  overflow-x: auto;
  padding-bottom: 1rem;
  scrollbar-width: thin;
  scrollbar-color: var(--brand-orange) transparent;
  scroll-snap-type: x mandatory;
  -webkit-overflow-scrolling: touch;
}
.screenshots__track::-webkit-scrollbar { height: 4px; }
.screenshots__track::-webkit-scrollbar-track { background: transparent; }
.screenshots__track::-webkit-scrollbar-thumb { background: var(--brand-orange); border-radius: 2px; }

.screenshot-card {
  flex-shrink: 0;
  width: 220px;
  scroll-snap-align: start;
}

.screenshot-card__phone {
  background: #111;
  border-radius: 32px;
  border: 2px solid rgba(255,255,255,.1);
  padding: 10px;
  box-shadow: var(--shadow-card);
}

.screenshot-card__screen {
  border-radius: 24px;
  overflow: hidden;
  aspect-ratio: 9/19.5;
  display: flex; flex-direction: column;
  padding: 1rem;
  gap: .6rem;
}

.screenshot-card__label {
  text-align: center;
  font-size: .8rem;
  color: var(--brand-muted);
  margin-top: .75rem;
  font-weight: 500;
}

/* screen colour themes */
.screen--ride    { background: linear-gradient(160deg, #0D1B2A 0%, #162032 100%); }
.screen--stats   { background: linear-gradient(160deg, #0D1B2A 0%, #1a1030 100%); }
.screen--map     { background: linear-gradient(160deg, #0B1D16 0%, #122b1e 100%); }
.screen--history { background: linear-gradient(160deg, #1a0f00 0%, #2a1800 100%); }

.screen-chunk {
  background: rgba(255,255,255,.07);
  border-radius: 8px;
  height: 10px;
}
.screen-chunk--wide { height: 14px; width: 70%; }
.screen-chunk--orange { background: rgba(249,115,22,.4); height: 14px; width: 55%; }
.screen-chunk--accent { background: rgba(249,115,22,.2); }
.screen-chunk--sm { height: 8px; width: 50%; }
.screen-chart {
  display: flex; align-items: flex-end; gap: 3px;
  height: 40px; margin-top: .25rem;
}
.screen-chart-bar { flex:1; border-radius:3px 3px 0 0; background: rgba(249,115,22,.3); }
.screen-chart-bar.hi { background: var(--brand-orange); }

/* ── How it works ────────────────────────────────────────── */
.steps {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 2rem;
  position: relative;
}

.steps::before {
  content: "";
  position: absolute;
  top: 28px; left: 10%; right: 10%;
  height: 1px;
  background: linear-gradient(90deg, transparent, rgba(249,115,22,.3), transparent);
}

.step {
  display: flex; flex-direction: column; align-items: center;
  text-align: center; gap: 1rem;
  position: relative; z-index: 1;
}

.step__number {
  width: 56px; height: 56px;
  background: var(--brand-orange);
  border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  font-size: 1.25rem; font-weight: 800;
  box-shadow: 0 4px 20px rgba(249,115,22,.4);
  flex-shrink: 0;
}

.step__title { font-size: 1rem; font-weight: 700; }
.step__desc  { font-size: .88rem; color: var(--brand-muted); line-height: 1.6; }

/* ── CTA ─────────────────────────────────────────────────── */
.cta {
  background: radial-gradient(ellipse 70% 60% at 50% 50%, rgba(249,115,22,.2) 0%, transparent 65%),
              var(--brand-dark);
  padding: 7rem 0;
  text-align: center;
}

.cta__title {
  font-size: clamp(1.9rem, 4vw, 3rem);
  font-weight: 800;
  line-height: 1.15;
  max-width: 640px;
  margin: 0 auto 1.25rem;
}

.cta__subtitle {
  font-size: 1.05rem;
  color: var(--brand-muted);
  max-width: 460px;
  margin: 0 auto 2.5rem;
}

.cta__badges {
  display: flex; align-items: center; justify-content: center; gap: 1rem;
  flex-wrap: wrap;
}

.store-badge {
  display: inline-flex; align-items: center; gap: .65rem;
  background: var(--brand-white);
  color: var(--brand-dark);
  border-radius: 14px;
  padding: .8rem 1.5rem;
  font-weight: 700;
  box-shadow: 0 4px 24px rgba(0,0,0,.25);
  transition: transform var(--transition), box-shadow var(--transition);
}
.store-badge:hover {
  transform: translateY(-3px);
  box-shadow: 0 10px 32px rgba(0,0,0,.35);
}
.store-badge__text small { display: block; font-size: .65rem; font-weight: 500; color: #666; text-transform: uppercase; letter-spacing: .5px; }
.store-badge__text strong { font-size: 1.05rem; }

/* ── Footer ──────────────────────────────────────────────── */
.footer {
  background: var(--brand-mid);
  border-top: 1px solid rgba(255,255,255,.06);
  padding: 3rem 0 2rem;
}

.footer__inner {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 2rem;
  flex-wrap: wrap;
}

.footer__brand { max-width: 280px; }
.footer__brand p {
  font-size: .85rem;
  color: var(--brand-muted);
  margin-top: .65rem;
  line-height: 1.6;
}

.footer__links h4 {
  font-size: .85rem; font-weight: 700; margin-bottom: .85rem;
  color: var(--brand-muted); text-transform: uppercase; letter-spacing: .5px;
}
.footer__links ul { list-style: none; display: flex; flex-direction: column; gap: .5rem; }
.footer__links a { font-size: .875rem; color: var(--brand-muted); transition: color var(--transition); }
.footer__links a:hover { color: var(--brand-white); }

.footer__bottom {
  border-top: 1px solid rgba(255,255,255,.06);
  margin-top: 2.5rem;
  padding-top: 1.5rem;
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 1rem;
  font-size: .8rem;
  color: var(--brand-muted);
}

.footer__social { display: flex; gap: .75rem; }
.footer__social a {
  width: 34px; height: 34px;
  background: rgba(255,255,255,.07);
  border-radius: 8px;
  display: flex; align-items: center; justify-content: center;
  font-size: .85rem;
  transition: background var(--transition);
}
.footer__social a:hover { background: var(--brand-orange); }

/* ── Entrance Animations (CSS-only, no JS hiding) ───────── */

/* Keyframes */
@keyframes fadeUp {
  from { opacity: 0; transform: translateY(22px); }
  to   { opacity: 1; transform: none; }
}
@keyframes fadeIn {
  from { opacity: 0; }
  to   { opacity: 1; }
}

/* Hero — staggered on load */
.hero__eyebrow  { animation: fadeUp .6s ease both .1s; }
.hero__title    { animation: fadeUp .65s ease both .22s; }
.hero__subtitle { animation: fadeUp .65s ease both .34s; }
.hero__actions  { animation: fadeUp .65s ease both .44s; }
.hero__stats    { animation: fadeUp .65s ease both .54s; }
.hero__visual   { animation: fadeIn .9s ease both .3s; }

/* Feature cards — staggered */
.feature-card:nth-child(1) { animation: fadeUp .6s ease both .1s; }
.feature-card:nth-child(2) { animation: fadeUp .6s ease both .18s; }
.feature-card:nth-child(3) { animation: fadeUp .6s ease both .26s; }
.feature-card:nth-child(4) { animation: fadeUp .6s ease both .34s; }
.feature-card:nth-child(5) { animation: fadeUp .6s ease both .42s; }
.feature-card:nth-child(6) { animation: fadeUp .6s ease both .50s; }

/* Section headers */
.section__eyebrow  { animation: fadeUp .55s ease both .05s; }
.section__title    { animation: fadeUp .6s ease both .15s; }
.section__subtitle { animation: fadeUp .6s ease both .25s; }

/* Screenshot cards */
.screenshot-card:nth-child(1) { animation: fadeUp .6s ease both .1s; }
.screenshot-card:nth-child(2) { animation: fadeUp .6s ease both .2s; }
.screenshot-card:nth-child(3) { animation: fadeUp .6s ease both .3s; }
.screenshot-card:nth-child(4) { animation: fadeUp .6s ease both .4s; }

/* How it works steps */
.step:nth-child(1) { animation: fadeUp .6s ease both .1s; }
.step:nth-child(2) { animation: fadeUp .6s ease both .2s; }
.step:nth-child(3) { animation: fadeUp .6s ease both .3s; }

/* CTA */
.cta__title    { animation: fadeUp .65s ease both .1s; }
.cta__subtitle { animation: fadeUp .65s ease both .2s; }
.cta__badges   { animation: fadeUp .65s ease both .3s; }

/* Respect user motion preference — disable decorative animations only */
@media (prefers-reduced-motion: reduce) {
  .hero__eyebrow, .hero__title, .hero__subtitle, .hero__actions, .hero__stats,
  .hero__visual, .feature-card, .section__eyebrow, .section__title,
  .section__subtitle, .screenshot-card, .step,
  .cta__title, .cta__subtitle, .cta__badges { animation: none; }
  .phone-mockup { animation: none; }
  .btn, .feature-card, .hero__store-badge, .store-badge { transition: none; }
}

/* ── Responsive ──────────────────────────────────────────── */
@media (max-width: 768px) {
  .nav__links { display: none; }

  .hero__inner {
    grid-template-columns: 1fr;
    text-align: center;
  }
  .hero__subtitle { max-width: 100%; }
  .hero__actions { justify-content: center; }
  .hero__stats { justify-content: center; }
  .hero__visual { order: -1; }
  .phone-mockup { width: 220px; }

  .steps::before { display: none; }

  .footer__inner { flex-direction: column; }
  .footer__bottom { flex-direction: column; text-align: center; }
}
