/* Balance On Hand marketing site — main stylesheet
 * Design system:
 *   - Trustworthy blues / greens
 *   - Clean white backgrounds, dark text
 *   - System fonts for performance
 *   - Mobile-first base; see responsive.css for breakpoints
 */

/* ---------- Design tokens ---------- */
:root {
  --color-primary: #1e6fb8;
  --color-primary-dark: #155a96;
  --color-accent: #10b981;
  --color-accent-dark: #059669;
  --color-bg: #ffffff;
  --color-bg-soft: #f5f8fb;
  --color-bg-muted: #eef3f8;
  --color-text: #1f2a37;
  --color-text-soft: #4b5563;
  --color-text-muted: #6b7280;
  --color-border: #e5e7eb;
  --color-border-strong: #d1d5db;

  --shadow-sm: 0 1px 2px rgba(15, 23, 42, 0.06);
  --shadow-md: 0 4px 12px rgba(15, 23, 42, 0.08);
  --shadow-lg: 0 12px 32px rgba(15, 23, 42, 0.10);

  --radius-sm: 6px;
  --radius-md: 10px;
  --radius-lg: 16px;

  --font-sans: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto,
    "Helvetica Neue", Arial, "Noto Sans", sans-serif,
    "Apple Color Emoji", "Segoe UI Emoji", "Segoe UI Symbol";

  --container-max: 1120px;

  --header-height: 64px;
}

/* ---------- Reset ---------- */
*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  -webkit-text-size-adjust: 100%;
  scroll-behavior: smooth;
}

body {
  margin: 0;
  font-family: var(--font-sans);
  font-size: 17px;
  line-height: 1.6;
  color: var(--color-text);
  background-color: var(--color-bg);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

img,
svg {
  max-width: 100%;
  height: auto;
  display: block;
}

a {
  color: var(--color-primary);
  text-decoration: none;
}

a:hover,
a:focus {
  color: var(--color-primary-dark);
  text-decoration: underline;
}

:focus-visible {
  outline: 2px solid var(--color-primary);
  outline-offset: 2px;
  border-radius: 4px;
}

/* ---------- Typography ---------- */
h1, h2, h3, h4, h5, h6 {
  margin: 0 0 0.5em;
  line-height: 1.25;
  color: var(--color-text);
  letter-spacing: -0.01em;
}

h1 {
  font-size: 2rem;
  font-weight: 700;
}

h2 {
  font-size: 1.5rem;
  font-weight: 700;
}

h3 {
  font-size: 1.2rem;
  font-weight: 600;
}

p {
  margin: 0 0 1em;
  color: var(--color-text-soft);
}

ul, ol {
  margin: 0 0 1em;
  padding-left: 1.25em;
  color: var(--color-text-soft);
}

li {
  margin-bottom: 0.35em;
}

strong {
  color: var(--color-text);
  font-weight: 600;
}

/* ---------- Layout helpers ---------- */
.container {
  width: 100%;
  max-width: var(--container-max);
  margin: 0 auto;
  padding: 0 20px;
}

.section {
  padding: 48px 0;
}

.section-tight {
  padding: 32px 0;
}

.section-alt {
  background-color: var(--color-bg-soft);
}

.section-eyebrow {
  display: inline-block;
  font-size: 0.78rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--color-primary);
  margin-bottom: 0.6em;
}

.lead {
  font-size: 1.1rem;
  color: var(--color-text-soft);
  max-width: 60ch;
}

.text-center {
  text-align: center;
}

.text-balance {
  text-wrap: balance;
}

.muted {
  color: var(--color-text-muted);
}

.divider {
  border: 0;
  border-top: 1px solid var(--color-border);
  margin: 32px 0;
}

/* ---------- Skip link (accessibility) ---------- */
.skip-link {
  position: absolute;
  left: -9999px;
  top: auto;
  width: 1px;
  height: 1px;
  overflow: hidden;
}

.skip-link:focus {
  position: fixed;
  left: 16px;
  top: 16px;
  width: auto;
  height: auto;
  padding: 10px 14px;
  background: var(--color-primary);
  color: #fff;
  z-index: 1000;
  border-radius: var(--radius-sm);
}

/* ---------- Header / nav ---------- */
.header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: rgba(255, 255, 255, 0.96);
  backdrop-filter: saturate(150%) blur(8px);
  border-bottom: 1px solid var(--color-border);
}

.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: var(--header-height);
}

.logo {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-weight: 700;
  font-size: 1.05rem;
  color: var(--color-text);
}

.logo:hover,
.logo:focus {
  color: var(--color-primary);
  text-decoration: none;
}

.logo-mark {
  width: 32px;
  height: 32px;
  border-radius: 8px;
  background: linear-gradient(135deg, var(--color-primary), var(--color-accent));
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: #fff;
  font-weight: 700;
  font-size: 0.9rem;
  letter-spacing: 0.02em;
}

.nav {
  display: flex;
  align-items: center;
  gap: 8px;
}

.nav-list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  gap: 4px;
  align-items: center;
}

.nav-list a {
  color: var(--color-text-soft);
  padding: 8px 12px;
  border-radius: var(--radius-sm);
  font-size: 0.95rem;
  font-weight: 500;
}

.nav-list a:hover,
.nav-list a:focus,
.nav-list a[aria-current="page"] {
  color: var(--color-primary-dark);
  background: var(--color-bg-muted);
  text-decoration: none;
}

.nav-cta {
  margin-left: 6px;
}

.menu-toggle {
  display: none;
  appearance: none;
  background: transparent;
  border: 1px solid var(--color-border);
  border-radius: var(--radius-sm);
  width: 40px;
  height: 40px;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  color: var(--color-text);
}

.menu-toggle:hover,
.menu-toggle:focus {
  background: var(--color-bg-muted);
}

.menu-toggle svg {
  width: 22px;
  height: 22px;
}

.menu-toggle .icon-close {
  display: none;
}

.menu-toggle[aria-expanded="true"] .icon-open {
  display: none;
}

.menu-toggle[aria-expanded="true"] .icon-close {
  display: block;
}

/* ---------- Buttons ---------- */
.cta-button,
.cta-button-secondary {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 12px 22px;
  border-radius: 999px;
  font-size: 0.98rem;
  font-weight: 600;
  line-height: 1.2;
  border: 1px solid transparent;
  cursor: pointer;
  transition: background-color 120ms ease, border-color 120ms ease,
    color 120ms ease, transform 120ms ease, box-shadow 120ms ease;
  text-decoration: none;
  white-space: nowrap;
}

.cta-button {
  background: var(--color-primary);
  color: #fff;
  box-shadow: var(--shadow-sm);
}

.cta-button:hover,
.cta-button:focus {
  background: var(--color-primary-dark);
  color: #fff;
  text-decoration: none;
  box-shadow: var(--shadow-md);
}

.cta-button-secondary {
  background: #fff;
  color: var(--color-primary-dark);
  border-color: var(--color-border-strong);
}

.cta-button-secondary:hover,
.cta-button-secondary:focus {
  background: var(--color-bg-muted);
  color: var(--color-primary-dark);
  border-color: var(--color-primary);
  text-decoration: none;
}

.cta-button.is-large,
.cta-button-secondary.is-large {
  padding: 14px 28px;
  font-size: 1.05rem;
}

.cta-row {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
}

/* ---------- Hero ---------- */
.hero {
  padding: 64px 0 56px;
  background:
    radial-gradient(circle at 20% 20%, rgba(30, 111, 184, 0.08), transparent 60%),
    radial-gradient(circle at 90% 0%, rgba(16, 185, 129, 0.08), transparent 50%),
    var(--color-bg);
}

.hero-inner {
  display: grid;
  gap: 40px;
  align-items: center;
  grid-template-columns: 1fr;
}

.hero-eyebrow {
  display: inline-block;
  background: var(--color-bg-muted);
  color: var(--color-primary-dark);
  padding: 6px 12px;
  border-radius: 999px;
  font-size: 0.85rem;
  font-weight: 600;
  margin-bottom: 16px;
}

.hero h1 {
  font-size: 2.2rem;
  margin-bottom: 0.5em;
}

.hero p.lead {
  font-size: 1.15rem;
  margin-bottom: 1.4em;
}

.hero-cta {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-bottom: 18px;
}

.hero-meta {
  font-size: 0.9rem;
  color: var(--color-text-muted);
}

/* ---------- Cards ---------- */
.card-grid {
  display: grid;
  gap: 20px;
  grid-template-columns: 1fr;
}

.card-grid.is-3 {
  grid-template-columns: 1fr;
}

.card-grid.is-4 {
  grid-template-columns: 1fr;
}

.card {
  background: #fff;
  border: 1px solid var(--color-border);
  border-radius: var(--radius-lg);
  padding: 24px;
  box-shadow: var(--shadow-sm);
  transition: box-shadow 120ms ease, transform 120ms ease,
    border-color 120ms ease;
}

.card:hover {
  box-shadow: var(--shadow-md);
  border-color: var(--color-border-strong);
}

.card h3 {
  margin-top: 0;
  margin-bottom: 0.4em;
  font-size: 1.1rem;
}

.card p {
  margin-bottom: 0;
  font-size: 0.97rem;
}

.card-icon {
  width: 44px;
  height: 44px;
  border-radius: 12px;
  background: var(--color-bg-muted);
  color: var(--color-primary-dark);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 1.2rem;
  font-weight: 700;
  margin-bottom: 14px;
}

.card-icon.is-accent {
  background: rgba(16, 185, 129, 0.12);
  color: var(--color-accent-dark);
}

/* ---------- Steps ---------- */
.steps {
  list-style: none;
  padding: 0;
  margin: 0;
  display: grid;
  gap: 16px;
}

.step {
  background: #fff;
  border: 1px solid var(--color-border);
  border-radius: var(--radius-md);
  padding: 20px 22px;
  display: grid;
  grid-template-columns: 44px 1fr;
  gap: 16px;
  align-items: start;
}

.step-number {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background: var(--color-primary);
  color: #fff;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
}

.step h3 {
  margin: 0 0 0.25em;
  font-size: 1.05rem;
}

.step p {
  margin: 0;
  font-size: 0.97rem;
}

/* ---------- Article / long-form content ---------- */
.article {
  max-width: 760px;
}

.article h2 {
  margin-top: 1.6em;
}

.article h3 {
  margin-top: 1.2em;
}

.article ul,
.article ol {
  padding-left: 1.4em;
}

.article li {
  margin-bottom: 0.5em;
}

.callout {
  background: var(--color-bg-soft);
  border: 1px solid var(--color-border);
  border-left: 4px solid var(--color-primary);
  padding: 16px 18px;
  border-radius: var(--radius-sm);
  margin: 1.5em 0;
}

.callout p:last-child {
  margin-bottom: 0;
}

.disclaimer {
  font-size: 0.88rem;
  color: var(--color-text-muted);
  border-top: 1px solid var(--color-border);
  padding-top: 16px;
  margin-top: 32px;
}

/* ---------- Screenshot / image placeholders ---------- */
.image-placeholder {
  background: linear-gradient(135deg, var(--color-bg-muted), #fff);
  border: 1px dashed var(--color-border-strong);
  border-radius: var(--radius-lg);
  color: var(--color-text-muted);
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: 32px;
  min-height: 220px;
  font-size: 0.95rem;
}

.install-screenshot {
  width: 100%;
  max-width: 320px;
  height: auto;
  border-radius: 18px;
  display: block;
  object-fit: contain;
}

.image-placeholder img {
  display: block;
  margin: 0 auto;
}

.inline-icon {
  width: 25px;
  height: 25px;
  display: inline-block;
  vertical-align: text-bottom;
  margin: 0 4px;
}

.image-placeholder.is-phone {
  aspect-ratio: 9 / 16;
  max-width: 280px;
  min-height: 0;
  margin: 0 auto;
}

.phone-screenshot {
  width: 100%;
  max-width: 320px;
  height: auto;
  border-radius: 24px;
  display: block;
  margin: 0 auto;
}


/* ---------- Final CTA band ---------- */
.cta-band {
  background: linear-gradient(135deg, var(--color-primary), var(--color-accent));
  color: #fff;
  border-radius: var(--radius-lg);
  padding: 40px 28px;
  text-align: center;
  margin: 0 auto;
}

.cta-band h2 {
  color: #fff;
  margin-bottom: 0.4em;
  font-size: 1.6rem;
}

.cta-band p {
  color: rgba(255, 255, 255, 0.92);
  margin-bottom: 1.4em;
}

.cta-band .cta-button {
  background: #fff;
  color: var(--color-primary-dark);
}

.cta-band .cta-button:hover,
.cta-band .cta-button:focus {
  background: var(--color-bg-muted);
  color: var(--color-primary-dark);
}

.cta-band .cta-button-secondary {
  background: transparent;
  color: #fff;
  border-color: rgba(255, 255, 255, 0.7);
}

.cta-band .cta-button-secondary:hover,
.cta-band .cta-button-secondary:focus {
  background: rgba(255, 255, 255, 0.12);
  color: #fff;
  border-color: #fff;
}

/* ---------- Footer ---------- */
.footer {
  background: #0f172a;
  color: #cbd5e1;
  padding: 48px 0 24px;
  margin-top: 64px;
}

.footer a {
  color: #e2e8f0;
}

.footer a:hover,
.footer a:focus {
  color: #fff;
}

.footer-grid {
  display: grid;
  gap: 28px;
  grid-template-columns: 1fr;
  margin-bottom: 32px;
}

.footer-brand p {
  color: #94a3b8;
  margin: 0.6em 0 0;
  max-width: 40ch;
}

.footer-col h4 {
  color: #fff;
  font-size: 0.85rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  margin: 0 0 12px;
}

.footer-col ul {
  list-style: none;
  margin: 0;
  padding: 0;
}

.footer-col li {
  margin-bottom: 8px;
}

.footer-col a {
  color: #cbd5e1;
  font-size: 0.95rem;
}

.footer-bottom {
  border-top: 1px solid #1e293b;
  padding-top: 20px;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  font-size: 0.85rem;
  color: #94a3b8;
}

.social-links {
  display: flex;
  gap: 8px;
  list-style: none;
  margin: 0;
  padding: 0;
}

.social-links a {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background: #1e293b;
  color: #cbd5e1;
  font-size: 0.78rem;
  font-weight: 600;
  text-decoration: none;
}

.social-links a:hover,
.social-links a:focus {
  background: #334155;
  color: #fff;
}

.beta-badge {
  background: #facc15;
  color: #111827;
  font-size: 0.75rem;
  font-weight: 700;
  padding: 4px 8px;
  border-radius: 999px;
  margin-left: 8px;
  vertical-align: middle;
}
