/* Fitly marketing site. Colors mirror app/lib/theme.dart (dark palette). */

:root {
  --bg: #000000;
  --card: #1c1c1e;
  --card-raised: #2c2c2e;
  --hairline: rgba(255, 255, 255, 0.09);
  --text: #ffffff;
  --text-2: #aeaeb2;
  --text-3: #98989f;
  --green: #30d158;
  --green-tint: rgba(48, 209, 88, 0.2);
  --on-accent: #000000;
  --radius: 16px;
  --gutter: 16px;
  --max: 1040px;
}

@media (prefers-color-scheme: light) {
  :root {
    --bg: #f2f2f7;
    --card: #ffffff;
    --card-raised: #ffffff;
    --hairline: rgba(0, 0, 0, 0.08);
    --text: #000000;
    --text-2: #3c3c43;
    --text-3: #6e6e73;
    --green: #248a3d;
    --green-tint: rgba(36, 138, 61, 0.14);
    --on-accent: #ffffff;
  }
}

* { box-sizing: border-box; }

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

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font: 16px/1.55 -apple-system, BlinkMacSystemFont, "SF Pro Text", "Segoe UI", Roboto,
    Helvetica, Arial, sans-serif;
  -webkit-font-smoothing: antialiased;
}

a { color: var(--green); text-decoration: none; }
a:hover, a:focus-visible { text-decoration: underline; }

h1, h2, h3 { margin: 0 0 .5rem; line-height: 1.15; letter-spacing: -0.01em; }
h1 { font-size: clamp(1.9rem, 6vw, 3.2rem); font-weight: 800; }
h2 { font-size: clamp(1.4rem, 4.5vw, 2rem); font-weight: 700; margin-bottom: 1rem; }
h3 { font-size: 1.05rem; font-weight: 650; }
p { margin: 0 0 .75rem; }

code {
  font: 0.9em/1 ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  background: var(--card-raised);
  padding: .1em .4em;
  border-radius: 6px;
}

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

.top {
  position: sticky;
  top: 0;
  z-index: 10;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--gutter);
  padding: 12px var(--gutter);
  background: color-mix(in srgb, var(--bg) 88%, transparent);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--hairline);
}

.brand {
  display: flex;
  align-items: center;
  gap: 10px;
  color: var(--text);
  font-weight: 700;
  font-size: 1.1rem;
}
.brand img { border-radius: 8px; }

.top nav {
  display: flex;
  gap: 14px;
  overflow-x: auto;
  white-space: nowrap;
  font-size: .95rem;
}
.top nav a { color: var(--text-2); }
.top nav a:hover { color: var(--green); }

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

main { max-width: var(--max); margin: 0 auto; padding: 0 var(--gutter); }

section { padding: 40px 0; border-bottom: 1px solid var(--hairline); }
section:last-of-type { border-bottom: 0; }

.grid { display: grid; gap: 14px; }
.grid.four { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.grid.two { grid-template-columns: 1fr; }

@media (min-width: 720px) {
  section { padding: 64px 0; }
  .grid.four { grid-template-columns: repeat(4, minmax(0, 1fr)); }
  .grid.two { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 18px; }
}

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

.hero { text-align: left; padding-top: 48px; }
.eyebrow {
  color: var(--green);
  font-weight: 650;
  font-size: .85rem;
  letter-spacing: .12em;
  text-transform: uppercase;
}
.lede { color: var(--text-2); font-size: 1.1rem; max-width: 42rem; }

.stores { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 1.5rem; }
.store {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  min-height: 56px;
  padding: 8px 18px 8px 14px;
  border-radius: 14px;
  background: var(--text);
  color: var(--bg);
  font-weight: 650;
  line-height: 1.1;
  flex: 1 1 180px;
  max-width: 260px;
}
.store:hover { text-decoration: none; background: var(--green); color: var(--on-accent); }
.store svg { width: 26px; height: 26px; fill: currentColor; flex: none; }
.store small { display: block; font-size: .7rem; font-weight: 500; opacity: .75; }
.note { color: var(--text-3); font-size: .9rem; margin-top: .75rem; }

/* -------------------------------------------------------------- cards */

.card, .feature {
  background: var(--card);
  border: 1px solid var(--hairline);
  border-radius: var(--radius);
  padding: 18px;
}
.card p, .feature p { color: var(--text-2); margin: 0; }

.card .icon {
  display: inline-grid;
  place-items: center;
  width: 40px;
  height: 40px;
  margin-bottom: 10px;
  border-radius: 12px;
  background: var(--green-tint);
  color: var(--green);
  font-size: 1.2rem;
}

.feature { border-left: 3px solid var(--green); }

.price { border-color: var(--green); }
.price p { color: var(--text); }

/* ----------------------------------------------------------- connector */

.connector .lede { margin-bottom: 1.25rem; }
.tools {
  display: grid;
  gap: 14px;
  grid-template-columns: 1fr;
}
@media (min-width: 720px) { .tools { grid-template-columns: 1fr 1fr; } }
.tools > div {
  background: var(--card);
  border: 1px solid var(--hairline);
  border-radius: var(--radius);
  padding: 18px;
}
.tools ul { margin: 0; padding-left: 1.1rem; color: var(--text-2); }
.tools li { margin: .35rem 0; overflow-wrap: anywhere; }
.tools li code { color: var(--text); }

.steps { margin: 1.25rem 0 0; padding-left: 1.25rem; color: var(--text-2); }
.steps li { margin: .5rem 0; }
.steps strong { color: var(--text); }

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

footer {
  max-width: var(--max);
  margin: 0 auto;
  padding: 32px var(--gutter) 48px;
  border-top: 1px solid var(--hairline);
}
footer nav { display: flex; flex-wrap: wrap; gap: 8px 20px; margin-bottom: 1rem; font-weight: 600; }
.small { color: var(--text-3); font-size: .85rem; }

@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }
