:root {
  --brand: #ff6a00;
  --brand-dark: #e85d00;
  --brand-glow: rgba(255, 106, 0, 0.08);
  --brand-border: rgba(255, 106, 0, 0.25);
  --ink: #111827;
  --ink-soft: #334155;
  --muted: #64748b;
  --line: #e5e7eb;
  --surface: #ffffff;
  --surface-alt: #f3f4f6;
  --surface-warm: #fff6f0;
  --shadow: 0 18px 40px rgba(15, 23, 42, 0.12);
  --shadow-sm: 0 1px 3px rgba(15, 23, 42, 0.04), 0 1px 2px rgba(15, 23, 42, 0.06);
  --shadow-hover: 0 8px 30px rgba(15, 23, 42, 0.12), 0 2px 6px rgba(15, 23, 42, 0.04);
  --radius-lg: 18px;
  --radius-md: 12px;
  --radius-sm: 8px;
  --transition-base: 0.25s cubic-bezier(0.4, 0, 0.2, 1);
}

html {
  scroll-behavior: smooth;
  scroll-padding-top: 96px;
}

::selection {
  background: var(--brand-glow);
  color: var(--ink);
}

:focus-visible {
  outline: 2px solid var(--brand);
  outline-offset: 2px;
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  font-family: "Plus Jakarta Sans", "Space Grotesk", "Segoe UI", sans-serif;
  color: var(--ink);
  background: var(--surface);
  line-height: 1.6;
}

h1,
h2,
h3 {
  margin: 0 0 16px;
  line-height: 1.2;
}

h2 {
  font-size: clamp(1.9rem, 3vw, 2.6rem);
}

h3 {
  font-size: 1.25rem;
}

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

a {
  color: inherit;
  text-decoration: none;
  transition: color var(--transition-base);
}

main {
  overflow: hidden;
}

.container {
  width: min(1120px, 92vw);
  margin: 0 auto;
}

.section {
  padding: 80px 0;
}

.section-tight {
  padding: 48px 0;
}

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

.section-dark {
  background: #111827;
  color: #f8fafc;
}

.section-gradient {
  background:
    radial-gradient(ellipse 80% 50% at 50% -20%, rgba(255, 106, 0, 0.07) 0%, transparent 70%),
    radial-gradient(circle at 20% 80%, rgba(255, 106, 0, 0.04) 0%, transparent 50%),
    linear-gradient(180deg, #fff6f0 0%, #ffffff 60%);
}

/* Section heading underline accent */
.section > .container > .reveal:first-child h2,
.section > .container > div:first-child > h2 {
  display: inline-block;
  position: relative;
}

.section > .container > .reveal:first-child h2::after,
.section > .container > div:first-child > h2::after {
  content: '';
  display: block;
  width: 48px;
  height: 3px;
  background: var(--brand);
  border-radius: 2px;
  margin: 12px auto 0;
}

.pill {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  background: var(--surface-warm);
  color: var(--brand);
  font-weight: 600;
  padding: 6px 14px;
  border-radius: 999px;
  border: 1px solid #ffe0c6;
  font-size: 14px;
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 16px 28px;
  border-radius: 12px;
  font-weight: 600;
  font-size: 16px;
  transition: transform var(--transition-base), box-shadow var(--transition-base), background var(--transition-base), border-color var(--transition-base);
  border: 1px solid transparent;
  cursor: pointer;
}

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

.btn-primary {
  background: var(--brand);
  color: #ffffff;
  box-shadow: 0 18px 30px rgba(255, 106, 0, 0.24);
}

.btn-primary:hover {
  background: var(--brand-dark);
  transform: translateY(-1px);
}

.btn-outline {
  border-color: var(--line);
  color: var(--ink-soft);
  background: #ffffff;
}

.btn-outline:hover {
  border-color: var(--brand);
  color: var(--ink);
  transform: translateY(-1px);
}

.btn-light {
  background: #ffffff;
  color: var(--ink);
}

/* ---- Navbar ---- */

.navbar {
  position: sticky;
  top: 0;
  z-index: 30;
  background: rgba(255, 255, 255, 0.96);
  border-bottom: 1px solid var(--line);
  backdrop-filter: blur(10px);
}

.navbar-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 80px;
}

.navbar-logo {
  display: flex;
  align-items: center;
  gap: 10px;
  font-weight: 700;
}

.nav-links {
  display: flex;
  align-items: center;
  gap: 28px;
  font-size: 14px;
  font-weight: 500;
  color: var(--ink-soft);
}

.nav-links a:not(.btn) {
  position: relative;
  padding-bottom: 4px;
}

.nav-links a:not(.btn)::after {
  content: '';
  position: absolute;
  bottom: -2px;
  left: 50%;
  right: 50%;
  height: 2px;
  background: var(--brand);
  border-radius: 1px;
  transition: left var(--transition-base), right var(--transition-base);
}

.nav-links a:not(.btn):hover::after,
.nav-links a.active::after {
  left: 0;
  right: 0;
}

.nav-links a.active {
  color: var(--brand);
}

.nav-links a:hover {
  color: var(--brand);
}

.nav-cta {
  margin-left: 10px;
}

.menu-toggle {
  display: none;
  background: transparent;
  border: 0;
  padding: 8px;
}

.mobile-nav {
  display: none;
  padding: 20px 0 28px;
  border-bottom: 1px solid var(--line);
}

.mobile-nav a {
  display: block;
  padding: 10px 0;
  font-weight: 500;
  color: var(--ink-soft);
}

.mobile-nav a.active {
  color: var(--brand);
}

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

.hero {
  padding: 90px 0 70px;
  text-align: center;
  position: relative;
}

.hero::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 50%;
  transform: translateX(-50%);
  width: min(200px, 30%);
  height: 3px;
  background: linear-gradient(90deg, transparent, var(--brand), transparent);
  border-radius: 2px;
}

.hero-content {
  max-width: 720px;
  margin: 0 auto;
}

.hero h1 {
  font-size: clamp(2.5rem, 4vw, 3.8rem);
  line-height: 1.1;
  margin-bottom: 20px;
}

.hero p {
  font-size: 18px;
  color: var(--ink-soft);
  max-width: 700px;
  margin: 0 auto 24px;
}

.hero-actions {
  display: flex;
  justify-content: center;
  gap: 16px;
  flex-wrap: wrap;
  margin-top: 30px;
}

.hero-subnote {
  margin-top: 18px;
  color: var(--muted);
  font-size: 14px;
}

.hero-bullets {
  list-style: none;
  padding: 0 0 0 20px;
  margin: 0 auto 28px;
  max-width: 600px;
  text-align: left;
  border-left: 3px solid var(--brand);
}

.hero-bullets li {
  padding: 6px 0;
  font-size: 16px;
  color: var(--ink-soft);
  line-height: 1.5;
}

.hero-bullets li + li {
  border-top: 1px solid var(--line);
}

.hero-bullets li strong {
  color: var(--ink);
}

.hero-examples {
  margin-top: 12px;
  font-size: 14px;
  color: var(--muted);
  font-weight: 500;
}

.hero-image {
  margin-top: 40px;
  border-radius: var(--radius-lg);
  border: 1px solid #f1f5f9;
  box-shadow: var(--shadow);
}

/* ---- Grids ---- */

.grid-3,
.grid-2 {
  display: grid;
  gap: 24px;
}

.grid-5 {
  display: grid;
  gap: 20px;
  grid-template-columns: repeat(5, 1fr);
}

.grid-3 {
  grid-template-columns: repeat(3, 1fr);
}

.grid-2 {
  grid-template-columns: repeat(2, 1fr);
}

/* Center orphan card when last item starts a new row in grid-3 */
@media (min-width: 641px) {
  .grid-3 > :last-child:nth-child(3n + 1) {
    grid-column: 2 / 3;
  }
}

/* ---- Cards ---- */

.card {
  background: #ffffff;
  border-radius: var(--radius-md);
  border: 1px solid var(--line);
  padding: 28px;
  box-shadow: var(--shadow-sm);
  transition: transform var(--transition-base), box-shadow var(--transition-base);
}

.card:hover {
  transform: translateY(-3px);
  box-shadow: var(--shadow-hover);
}

.card-highlight {
  border-color: #ffd2a8;
  background: linear-gradient(135deg, #fff9f4 0%, #fff1e6 100%);
  box-shadow: var(--shadow-sm), 0 0 0 1px rgba(255, 106, 0, 0.06);
}

.card-accent {
  border-top: 3px solid var(--brand);
}

.card-do {
  border-left: 3px solid var(--brand);
}

.card-dont {
  border-left: 3px solid var(--line);
}

.card-title {
  font-size: 20px;
  font-weight: 700;
  margin-bottom: 12px;
}

.card-list {
  margin: 0;
  padding-left: 18px;
  color: var(--ink-soft);
}

.card-list li {
  margin-bottom: 8px;
  padding-left: 4px;
}

.split {
  display: grid;
  gap: 32px;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
}

/* ---- Tags ---- */

.tags {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  justify-content: center;
  padding: 24px;
  background: #ffffff;
  border-radius: var(--radius-lg);
  border: 1px solid var(--line);
  box-shadow: var(--shadow-sm);
}

.tag {
  padding: 10px 20px;
  border-radius: 999px;
  border: 1px solid var(--line);
  background: #ffffff;
  font-weight: 600;
  font-size: 15px;
  color: var(--ink);
  transition: all var(--transition-base);
  cursor: default;
}

.tag:hover {
  border-color: var(--brand-border);
  background: var(--brand-glow);
  color: var(--brand-dark);
  transform: translateY(-1px);
}

/* ---- Feature rows ---- */

.feature-row {
  display: flex;
  align-items: center;
  gap: 12px;
}

.feature-row span {
  color: var(--ink);
  font-weight: 600;
}

.note-box {
  background: #ffffff;
  border-radius: var(--radius-md);
  border: 1px solid var(--line);
  padding: 24px;
  text-align: center;
  font-weight: 700;
  color: var(--brand);
}

/* ---- Steps ---- */

.steps {
  display: grid;
  gap: 18px;
}

.step {
  display: flex;
  gap: 16px;
  align-items: flex-start;
}

.step-number {
  width: 44px;
  height: 44px;
  min-width: 44px;
  border-radius: 50%;
  background: var(--brand);
  color: #ffffff;
  display: grid;
  place-items: center;
  font-weight: 700;
  font-size: 18px;
  box-shadow: 0 0 0 6px var(--brand-glow), 0 4px 12px rgba(255, 106, 0, 0.2);
}

/* ---- Forms ---- */

.form {
  display: grid;
  gap: 16px;
}

.form label {
  font-weight: 600;
  font-size: 14px;
}

.form input,
.form textarea,
.form select {
  width: 100%;
  padding: 14px 16px;
  border-radius: 10px;
  border: 1px solid var(--line);
  font-family: inherit;
  font-size: 16px;
  background: #fafbfc;
  transition: border-color var(--transition-base), box-shadow var(--transition-base), background var(--transition-base);
}

.form input::placeholder,
.form textarea::placeholder {
  color: #94a3b8;
}

.form input:hover,
.form textarea:hover,
.form select:hover {
  border-color: #cbd5e1;
}

.form textarea {
  min-height: 120px;
  resize: vertical;
}

.form input:focus,
.form textarea:focus,
.form select:focus {
  outline: none;
  border-color: var(--brand);
  box-shadow: 0 0 0 3px rgba(255, 106, 0, 0.12);
  background: #ffffff;
}

.form input.error,
.form textarea.error,
.form select.error {
  border-color: #dc2626;
  box-shadow: 0 0 0 3px rgba(220, 38, 38, 0.1);
}

.form .field-error {
  font-size: 13px;
  color: #dc2626;
  margin-top: 4px;
  display: none;
}

.form input.error + .field-error,
.form textarea.error + .field-error,
.form select.error + .field-error {
  display: block;
}

.fit-check-success h3 {
  margin-bottom: 8px;
}

.form-help {
  font-size: 13px;
  color: var(--muted);
}

/* ---- Footer (dark) ---- */

.footer {
  background: #111827;
  color: #e2e8f0;
  border-top: none;
  padding: 60px 0 30px;
}

.footer p {
  color: #94a3b8;
  font-size: 14px;
}

.footer .pill {
  background: rgba(255, 106, 0, 0.1);
  border-color: rgba(255, 106, 0, 0.2);
  color: var(--brand);
}

.footer-grid {
  display: grid;
  gap: 40px;
  grid-template-columns: 2fr 1fr 1fr;
}

.footer-title {
  font-weight: 700;
  font-size: 18px;
  color: #ffffff;
}

.footer-link {
  display: block;
  color: #94a3b8;
  margin-bottom: 10px;
  font-size: 14px;
  transition: color var(--transition-base), padding-left var(--transition-base);
}

.footer-link:hover {
  color: var(--brand);
  padding-left: 4px;
}

.footer-bottom {
  border-top: 1px solid #1f2937;
  margin-top: 40px;
  padding-top: 20px;
  text-align: center;
  font-size: 13px;
  color: #64748b;
}

.footer .form-help {
  color: #64748b;
}

/* ---- Reveal animations ---- */

.reveal {
  opacity: 0;
  transform: translateY(24px);
  transition: opacity 0.5s cubic-bezier(0.4, 0, 0.2, 1), transform 0.5s cubic-bezier(0.4, 0, 0.2, 1);
}

.reveal.visible {
  opacity: 1;
  transform: translateY(0);
}

/* Stagger children within grids */
.grid-2 .reveal:nth-child(2) { transition-delay: 0.08s; }
.grid-3 .reveal:nth-child(2) { transition-delay: 0.08s; }
.grid-3 .reveal:nth-child(3) { transition-delay: 0.16s; }
.grid-5 .reveal:nth-child(2) { transition-delay: 0.06s; }
.grid-5 .reveal:nth-child(3) { transition-delay: 0.12s; }
.grid-5 .reveal:nth-child(4) { transition-delay: 0.18s; }
.grid-5 .reveal:nth-child(5) { transition-delay: 0.24s; }

/* ---- Calculator ---- */

.calculator {
  background: #ffffff;
  border-radius: var(--radius-lg);
  border: 1px solid var(--line);
  padding: 32px;
  box-shadow: var(--shadow);
}

.calculator-header {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
}

.segment {
  display: inline-flex;
  gap: 6px;
  padding: 4px;
  background: #e2e8f0;
  border-radius: 12px;
}

.segment button {
  border: 0;
  padding: 8px 14px;
  border-radius: 10px;
  background: transparent;
  font-weight: 600;
  color: var(--muted);
}

.segment button.active {
  background: #ffffff;
  color: var(--ink);
  box-shadow: 0 6px 12px rgba(15, 23, 42, 0.12);
}

.tab-switch {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 6px;
  background: #e2e8f0;
  border-radius: 12px;
  padding: 6px;
  margin-bottom: 24px;
}

.tab-switch button {
  border: 0;
  padding: 10px 14px;
  border-radius: 10px;
  font-weight: 600;
  background: transparent;
  color: var(--muted);
}

.tab-switch button.active {
  background: #ffffff;
  color: var(--ink);
  box-shadow: 0 8px 12px rgba(15, 23, 42, 0.12);
}

.metric {
  background: #ffffff;
  border-radius: var(--radius-md);
  border: 1px solid var(--line);
  padding: 22px;
}

.metric strong {
  font-size: 32px;
  color: var(--brand);
}

.metrics-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
  gap: 16px;
}

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

@media (max-width: 1024px) {
  .grid-5 {
    grid-template-columns: repeat(3, 1fr);
  }
}

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

  .menu-toggle {
    display: inline-flex;
  }

  body[data-nav-open="true"] .mobile-nav {
    display: block;
  }

  .footer-grid {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 640px) {
  .hero {
    padding: 70px 0 50px;
  }

  .section {
    padding: 64px 0;
  }

  .btn {
    width: 100%;
  }

  .grid-5 {
    grid-template-columns: 1fr;
  }

  .grid-3 {
    grid-template-columns: 1fr;
  }

  .grid-2 {
    grid-template-columns: 1fr;
  }
}

.hidden-sm {
  display: none;
}

@media (min-width: 640px) {
  .hidden-sm {
    display: inline;
  }
}
