:root {
  /* Brand palette pulled from the TipJar logo */
  --bg: #0b1020;
  --bg-soft: #11172e;
  --surface: #ffffff;
  --surface-alt: #f4f9fd;
  --text: #0f172a;
  --text-soft: #4b5a6b;
  --muted: #94a3b8;
  --border: #dbe7f1;

  /* "TipJar" wordmark blue */
  --primary: #2f90ea;
  --primary-600: #1f77cc;
  --primary-50: #e6f2fd;

  /* Jar outline light blue */
  --jar-blue: #6fc1ec;
  --jar-blue-50: #e4f4fc;

  /* Dollar bill green */
  --accent: #7cc58f;
  --accent-600: #58a56c;
  --accent-50: #e9f6ec;

  --shadow-sm: 0 1px 2px rgba(15, 23, 42, 0.06);
  --shadow-md: 0 8px 24px rgba(31, 119, 204, 0.12);
  --shadow-lg: 0 24px 60px rgba(31, 119, 204, 0.22);
  --radius: 14px;
  --radius-sm: 10px;
  --maxw: 1120px;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  font-family: "Inter", system-ui, -apple-system, Segoe UI, Roboto, Helvetica, Arial, sans-serif;
  color: var(--text);
  background: var(--surface);
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

img,
svg {
  display: block;
  max-width: 100%;
}

a {
  color: var(--primary);
  text-decoration: none;
}

a:hover {
  text-decoration: underline;
}

h1,
h2,
h3,
h4 {
  color: var(--text);
  margin: 0 0 0.5rem;
  letter-spacing: -0.02em;
  line-height: 1.15;
}

h1 {
  font-size: clamp(2.2rem, 4.5vw, 3.6rem);
  font-weight: 800;
}

h2 {
  font-size: clamp(1.6rem, 2.6vw, 2.2rem);
  font-weight: 700;
}

h3 {
  font-size: 1.15rem;
  font-weight: 700;
}

p {
  color: var(--text-soft);
  margin: 0 0 1rem;
}

.container {
  width: 100%;
  max-width: var(--maxw);
  margin: 0 auto;
  padding: 0 1.25rem;
}

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  padding: 0.85rem 1.25rem;
  border-radius: var(--radius-sm);
  font-weight: 600;
  font-size: 0.95rem;
  border: 1px solid transparent;
  cursor: pointer;
  transition: transform 0.06s ease, box-shadow 0.2s ease, background 0.2s ease,
    color 0.2s ease, border-color 0.2s ease;
  font-family: inherit;
}

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

.btn:active {
  transform: translateY(0);
}

.btn-sm {
  padding: 0.55rem 0.9rem;
  font-size: 0.85rem;
}

.btn-primary {
  background: var(--primary);
  color: #fff;
  box-shadow: var(--shadow-sm);
}

.btn-primary:hover {
  background: var(--primary-600);
  box-shadow: var(--shadow-md);
}

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

.btn-ghost:hover {
  background: var(--surface-alt);
  border-color: #d1d5db;
}

/* ---------- Header ---------- */
.site-header {
  position: sticky;
  top: 0;
  z-index: 30;
  background: rgba(255, 255, 255, 0.85);
  backdrop-filter: saturate(180%) blur(10px);
  border-bottom: 1px solid var(--border);
}

.nav {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0.85rem 1.25rem;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 0.55rem;
  font-weight: 800;
  color: var(--text);
}

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

.brand-mark {
  width: 32px;
  height: 32px;
  display: inline-block;
  object-fit: contain;
}

.brand-name {
  font-size: 1.05rem;
  letter-spacing: -0.01em;
}

.nav-links {
  display: flex;
  gap: 1.5rem;
}

.nav-links a {
  color: var(--text-soft);
  font-weight: 500;
  font-size: 0.95rem;
}

.nav-links a:hover {
  color: var(--text);
  text-decoration: none;
}

.nav-actions {
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

@media (max-width: 720px) {
  .nav-links {
    display: none;
  }

  .nav-actions {
    gap: 0.35rem;
  }
}

@media (max-width: 420px) {
  .nav-actions .btn {
    padding: 0.5rem 0.75rem;
    font-size: 0.8rem;
  }
}

/* ---------- Hero ---------- */
.hero {
  position: relative;
  padding: 5rem 0 4rem;
  background:
    radial-gradient(1000px 500px at 80% -10%, rgba(47, 144, 234, 0.14), transparent 60%),
    radial-gradient(700px 400px at 0% 10%, rgba(124, 197, 143, 0.14), transparent 60%),
    linear-gradient(180deg, #ffffff 0%, #f4f9fd 100%);
  overflow: hidden;
}

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

.eyebrow {
  display: inline-block;
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--primary);
  background: var(--primary-50);
  padding: 0.35rem 0.65rem;
  border-radius: 999px;
  margin-bottom: 1rem;
}

.hero-title {
  margin-bottom: 1rem;
}

.rotator {
  display: inline-block;
  position: relative;
  color: var(--primary);
  min-width: 6ch;
}

.rotator-word {
  display: inline-block;
  transition: opacity 0.25s ease, transform 0.25s ease;
}

.rotator-word.swap {
  opacity: 0;
  transform: translateY(-6px);
}

.hero-sub {
  font-size: 1.1rem;
  color: var(--text-soft);
  max-width: 680px;
  margin: 0 auto 1.75rem;
}

.hero-actions {
  display: flex;
  justify-content: center;
  gap: 0.75rem;
  flex-wrap: wrap;
  margin-bottom: 2.5rem;
}

.hero-stats {
  list-style: none;
  display: flex;
  justify-content: center;
  gap: 2.5rem;
  padding: 0;
  margin: 0;
  flex-wrap: wrap;
}

.hero-stats li {
  display: flex;
  flex-direction: column;
  align-items: center;
}

.hero-stats strong {
  font-size: 1.5rem;
  font-weight: 800;
  color: var(--text);
}

.hero-stats span {
  font-size: 0.85rem;
  color: var(--muted);
  text-transform: uppercase;
  letter-spacing: 0.08em;
}

/* ---------- Sections ---------- */
.section {
  padding: 5rem 0;
}

.section-alt {
  background: var(--surface-alt);
  border-top: 1px solid var(--border);
  border-bottom: 1px solid var(--border);
}

.section-head {
  text-align: center;
  max-width: 720px;
  margin: 0 auto 3rem;
}

.section-sub {
  color: var(--text-soft);
  font-size: 1.05rem;
}

/* ---------- Features ---------- */
.feature-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1.25rem;
}

@media (max-width: 900px) {
  .feature-grid {
    grid-template-columns: 1fr;
  }
}

.feature-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1.75rem;
  box-shadow: var(--shadow-sm);
  transition: transform 0.2s ease, box-shadow 0.2s ease, border-color 0.2s ease;
}

.feature-card:hover {
  transform: translateY(-3px);
  box-shadow: var(--shadow-md);
  border-color: #d6dbe4;
}

.feature-icon {
  width: 42px;
  height: 42px;
  border-radius: 10px;
  background: var(--primary-50);
  color: var(--primary);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 1rem;
}

.feature-icon svg {
  width: 22px;
  height: 22px;
}

.feature-list {
  list-style: none;
  padding: 0;
  margin: 0.5rem 0 0;
}

.feature-list li {
  position: relative;
  padding-left: 1.25rem;
  color: var(--text-soft);
  font-size: 0.95rem;
  margin-bottom: 0.4rem;
}

.feature-list li::before {
  content: "";
  position: absolute;
  left: 0;
  top: 0.55em;
  width: 6px;
  height: 6px;
  background: var(--accent);
  border-radius: 50%;
}

/* ---------- How it works ---------- */
.how-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 3rem;
  align-items: center;
}

@media (max-width: 800px) {
  .how-grid {
    grid-template-columns: 1fr;
    gap: 1.5rem;
  }
}

.steps {
  list-style: none;
  padding: 0;
  margin: 0;
  display: grid;
  gap: 1rem;
}

.steps li {
  display: flex;
  gap: 1rem;
  padding: 1.1rem 1.25rem;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  box-shadow: var(--shadow-sm);
}

.step-num {
  flex: 0 0 auto;
  width: 34px;
  height: 34px;
  border-radius: 50%;
  background: var(--primary);
  color: #fff;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
}

.steps h4 {
  margin: 0 0 0.15rem;
  font-size: 1rem;
}

.steps p {
  margin: 0;
  font-size: 0.92rem;
}

/* ---------- Contact ---------- */
.contact-wrap {
  display: grid;
  grid-template-columns: 1fr 1.05fr;
  gap: 3rem;
  align-items: start;
}

@media (max-width: 900px) {
  .contact-wrap {
    grid-template-columns: 1fr;
  }
}

.contact-points {
  list-style: none;
  padding: 0;
  margin: 1rem 0 0;
  display: grid;
  gap: 0.5rem;
  color: var(--text-soft);
}

.contact-points li {
  position: relative;
  padding-left: 1.25rem;
}

.contact-points li::before {
  content: "✓";
  position: absolute;
  left: 0;
  color: var(--accent);
  font-weight: 800;
}

.contact-form {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1.75rem;
  box-shadow: var(--shadow-md);
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1rem;
}

.field {
  display: flex;
  flex-direction: column;
}

.field-full {
  grid-column: 1 / -1;
}

.field label {
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--text);
  margin-bottom: 0.35rem;
}

.field input,
.field select,
.field textarea {
  font-family: inherit;
  font-size: 0.95rem;
  color: var(--text);
  background: #fff;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 0.7rem 0.85rem;
  transition: border-color 0.15s ease, box-shadow 0.15s ease;
}

.field textarea {
  resize: vertical;
  min-height: 100px;
}

.field input:focus,
.field select:focus,
.field textarea:focus {
  outline: none;
  border-color: var(--primary);
  box-shadow: 0 0 0 3px rgba(47, 144, 234, 0.2);
}

.field.invalid input,
.field.invalid select,
.field.invalid textarea {
  border-color: #ef4444;
  box-shadow: 0 0 0 3px rgba(239, 68, 68, 0.12);
}

.hp {
  position: absolute;
  left: -10000px;
  width: 1px;
  height: 1px;
  opacity: 0;
}

.form-actions {
  grid-column: 1 / -1;
  display: flex;
  align-items: center;
  gap: 1rem;
  flex-wrap: wrap;
  margin-top: 0.25rem;
}

.form-status {
  margin: 0;
  font-size: 0.9rem;
  color: var(--text-soft);
}

.form-status.success {
  color: #047857;
}

.form-status.error {
  color: #b91c1c;
}

/* ---------- Footer ---------- */
.site-footer {
  border-top: 1px solid var(--border);
  background: var(--surface-alt);
  padding: 2rem 0;
}

.footer-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  flex-wrap: wrap;
}

.footer-logo {
  height: 40px;
  width: auto;
}

.footer-meta {
  margin: 0;
  color: var(--muted);
  font-size: 0.9rem;
}
