/*
 * Jotly marketing site — minimal CSS, no build tooling.
 * Tokens lifted from docs/ui-design-system.md (Jotly palette).
 * Keep this file hand-edited and small; if it grows past ~400 lines,
 * that's a smell — the marketing site is meant to stay static + simple.
 */

:root {
  /* Surface */
  --rc-bg: #f6f4ef;
  --rc-canvas: #ece9e1;
  --rc-card: #ffffff;
  --rc-card-2: #fbfaf7;

  /* Ink */
  --rc-ink: #14161b;
  --rc-ink-2: #4a4f58;
  --rc-ink-3: #8b8f98;
  --rc-ink-4: #c2c6cd;

  /* Accent (Jotly orange) */
  --rc-accent: #f26b1f;
  --rc-accent-soft: #ffe7d6;
  --rc-accent-ink: #a8420f;

  /* Categorical earthy palette — used sparingly for chrome accents */
  --rc-olive: #5f7b3b;
  --rc-honey: #d27518;
  --rc-plum: #8c4264;
  --rc-slate: #3e5468;
  --rc-mocha: #6a4a36;

  /* Shape */
  --radius-sm: 8px;
  --radius-md: 12px;
  --radius-lg: 20px;

  /* Type */
  --font-stack: "Instrument Sans", -apple-system, BlinkMacSystemFont,
    "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
}

* {
  box-sizing: border-box;
}

html,
body {
  margin: 0;
  padding: 0;
}

body {
  font-family: var(--font-stack);
  color: var(--rc-ink);
  background: var(--rc-bg);
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

a {
  color: var(--rc-accent-ink);
  text-decoration: none;
}

a:hover {
  text-decoration: underline;
}

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

/* ---------- Header ---------- */

.site-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 20px 32px;
  max-width: 1120px;
  margin: 0 auto;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  color: var(--rc-ink);
  font-weight: 700;
  font-size: 20px;
}

.brand:hover {
  text-decoration: none;
}

.brand-mark {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 32px;
  height: 32px;
  background: var(--rc-accent);
  color: #fff;
  border-radius: 8px;
  font-weight: 700;
  font-size: 18px;
}

.site-nav {
  display: flex;
  align-items: center;
  gap: 24px;
}

.site-nav a {
  color: var(--rc-ink-2);
  font-weight: 500;
  font-size: 15px;
}

.site-nav a.nav-cta {
  color: var(--rc-accent-ink);
  background: var(--rc-accent-soft);
  padding: 8px 14px;
  border-radius: var(--radius-sm);
}

.site-nav a.nav-cta:hover {
  text-decoration: none;
  background: #ffd9bb;
}

/* ---------- Hero ---------- */

.hero {
  padding: 64px 32px 80px;
}

.hero-inner {
  max-width: 880px;
  margin: 0 auto;
  text-align: center;
}

.eyebrow {
  text-transform: uppercase;
  letter-spacing: 0.08em;
  font-size: 13px;
  font-weight: 600;
  color: var(--rc-accent-ink);
  margin: 0 0 16px;
}

.hero h1 {
  font-size: clamp(32px, 5.5vw, 56px);
  line-height: 1.1;
  letter-spacing: -0.02em;
  font-weight: 700;
  margin: 0 0 24px;
}

.lede {
  font-size: clamp(17px, 2vw, 20px);
  color: var(--rc-ink-2);
  margin: 0 auto 36px;
  max-width: 640px;
}

.hero-foot {
  margin-top: 28px;
  color: var(--rc-ink-3);
  font-size: 14px;
}

/* ---------- CTAs ---------- */

.cta-row {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
  justify-content: center;
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 12px 22px;
  border-radius: var(--radius-md);
  font-weight: 600;
  font-size: 15px;
  text-decoration: none;
  border: 1px solid transparent;
  transition: transform 0.06s ease, background 0.12s ease,
    border-color 0.12s ease;
}

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

.btn-primary {
  background: var(--rc-accent);
  color: #fff;
}

.btn-primary:hover {
  background: #d85913;
}

.btn-secondary {
  background: var(--rc-card);
  color: var(--rc-ink);
  border-color: var(--rc-ink-4);
}

.btn-secondary:hover {
  background: var(--rc-card-2);
  border-color: var(--rc-ink-3);
}

.btn-ghost {
  background: transparent;
  color: var(--rc-ink-2);
  border-color: transparent;
}

.btn-ghost:hover {
  background: var(--rc-canvas);
  color: var(--rc-ink);
}

/* ---------- Features ---------- */

.features {
  padding: 64px 32px;
  background: var(--rc-card);
  border-top: 1px solid var(--rc-canvas);
  border-bottom: 1px solid var(--rc-canvas);
}

.features h2,
.how h2,
.cta-band h2 {
  font-size: clamp(28px, 3.5vw, 36px);
  font-weight: 700;
  text-align: center;
  margin: 0 auto 48px;
  max-width: 720px;
  letter-spacing: -0.01em;
}

.feature-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 24px;
  max-width: 1120px;
  margin: 0 auto;
}

.feature {
  background: var(--rc-card-2);
  padding: 28px;
  border-radius: var(--radius-lg);
  border: 1px solid var(--rc-canvas);
}

.feature h3 {
  margin: 0 0 12px;
  font-size: 19px;
  font-weight: 600;
  color: var(--rc-ink);
}

.feature p {
  margin: 0;
  color: var(--rc-ink-2);
  font-size: 15px;
  line-height: 1.6;
}

/* ---------- How it works ---------- */

.how {
  padding: 80px 32px;
}

.how-steps {
  max-width: 720px;
  margin: 0 auto;
  padding: 0;
  list-style: none;
  counter-reset: step;
}

.how-steps li {
  position: relative;
  padding: 24px 24px 24px 72px;
  margin-bottom: 16px;
  background: var(--rc-card);
  border-radius: var(--radius-lg);
  border: 1px solid var(--rc-canvas);
  counter-increment: step;
  color: var(--rc-ink-2);
  font-size: 16px;
}

.how-steps li::before {
  content: counter(step);
  position: absolute;
  left: 24px;
  top: 24px;
  width: 32px;
  height: 32px;
  background: var(--rc-accent-soft);
  color: var(--rc-accent-ink);
  border-radius: 50%;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  font-size: 15px;
}

.how-steps strong {
  color: var(--rc-ink);
  font-weight: 600;
}

/* ---------- CTA band ---------- */

.cta-band {
  padding: 72px 32px 96px;
  text-align: center;
  background: var(--rc-canvas);
}

.cta-band p {
  max-width: 560px;
  margin: 0 auto 32px;
  color: var(--rc-ink-2);
  font-size: 17px;
}

/* ---------- Footer ---------- */

.site-footer {
  padding: 32px;
  max-width: 1120px;
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 16px;
  font-size: 14px;
  color: var(--rc-ink-3);
}

.copyright {
  margin: 0;
}

.footer-nav {
  display: flex;
  gap: 20px;
}

.footer-nav a {
  color: var(--rc-ink-2);
}

/* ---------- Legal pages (privacy + terms) ---------- */

.legal {
  max-width: 760px;
  margin: 0 auto;
  padding: 48px 32px 96px;
}

.legal h1 {
  font-size: clamp(28px, 4vw, 40px);
  margin: 0 0 8px;
  letter-spacing: -0.01em;
}

.legal .updated {
  color: var(--rc-ink-3);
  font-size: 14px;
  margin: 0 0 32px;
}

.legal h2 {
  font-size: 22px;
  margin: 40px 0 12px;
  font-weight: 600;
}

.legal h3 {
  font-size: 17px;
  margin: 24px 0 8px;
  font-weight: 600;
}

.legal p,
.legal ul,
.legal ol {
  color: var(--rc-ink-2);
  font-size: 16px;
  line-height: 1.7;
}

.legal ul,
.legal ol {
  padding-left: 24px;
}

.legal li {
  margin-bottom: 8px;
}

/* ---------- Responsive ---------- */

@media (max-width: 600px) {
  .site-header {
    padding: 16px 20px;
  }
  .site-nav {
    gap: 14px;
  }
  .site-nav a:not(.nav-cta) {
    display: none;
  }
  .hero {
    padding: 40px 20px 56px;
  }
  .features,
  .how,
  .cta-band {
    padding-left: 20px;
    padding-right: 20px;
  }
  .legal {
    padding: 32px 20px 64px;
  }
  .site-footer {
    padding: 24px 20px;
    flex-direction: column;
    align-items: flex-start;
  }
}
