:root {
  --bg: #f7f2e8;
  --ink: #1d1a16;
  --muted: #665f56;
  --card: rgba(255, 250, 243, 0.78);
  --card-strong: rgba(255, 252, 247, 0.9);
  --line: rgba(73, 55, 31, 0.12);
  --brand: #c65d2e;
  --brand-deep: #7f2d12;
  --accent: #0f766e;
  --glow: rgba(198, 93, 46, 0.22);
  --radius-lg: 32px;
  --radius-md: 22px;
  --radius-sm: 18px;
  --shadow: 0 26px 80px rgba(70, 45, 17, 0.12);
  --shadow-soft: 0 12px 28px rgba(70, 45, 17, 0.08);
  --font-sans: "Space Grotesk", "Helvetica Neue", sans-serif;
  --font-serif: "Instrument Serif", Georgia, serif;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  min-height: 100vh;
  overflow-x: hidden;
  color: var(--ink);
  font-family: var(--font-sans);
  background:
    radial-gradient(circle at top left, rgba(198, 93, 46, 0.18), transparent 26%),
    radial-gradient(circle at bottom right, rgba(15, 118, 110, 0.18), transparent 24%),
    linear-gradient(180deg, #f6f0e5 0%, #f0e6d6 100%);
}

body::before {
  content: "";
  position: fixed;
  inset: 0;
  background-image: linear-gradient(rgba(94, 67, 35, 0.05) 1px, transparent 1px),
    linear-gradient(90deg, rgba(94, 67, 35, 0.05) 1px, transparent 1px);
  background-size: 28px 28px;
  mask-image: radial-gradient(circle at center, black 46%, transparent 88%);
  pointer-events: none;
}

.bg-orb {
  position: fixed;
  width: 360px;
  height: 360px;
  border-radius: 999px;
  filter: blur(36px);
  opacity: 0.5;
  pointer-events: none;
}

.orb-left {
  top: -80px;
  left: -60px;
  background: rgba(198, 93, 46, 0.24);
}

.orb-right {
  right: -80px;
  bottom: 10%;
  background: rgba(15, 118, 110, 0.2);
}

.page-shell {
  width: min(1180px, calc(100vw - 32px));
  margin: 0 auto;
  padding: 24px 0 64px;
}

.site-nav,
.app-topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  margin-bottom: 18px;
  padding: 14px 18px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: rgba(255, 250, 243, 0.72);
  backdrop-filter: blur(18px);
  box-shadow: var(--shadow-soft);
}

.brand-lockup {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  color: var(--ink);
  font-weight: 700;
  text-decoration: none;
}

.brand-mark {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 38px;
  height: 38px;
  border-radius: 14px;
  background: linear-gradient(135deg, var(--brand), #dd7b4f);
  color: #fff8ef;
  box-shadow: 0 12px 24px var(--glow);
}

.nav-links {
  display: inline-flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 18px;
}

.nav-links a,
.inline-link {
  color: var(--brand-deep);
  text-decoration: none;
}

.nav-links a {
  font-size: 0.96rem;
}

.nav-cta {
  white-space: nowrap;
}

.hero-card,
.proof-card,
.story-section,
.pricing-section,
.waitlist-section {
  position: relative;
  border: 1px solid var(--line);
  background: var(--card);
  backdrop-filter: blur(18px);
  box-shadow: var(--shadow);
}

.hero-card {
  display: grid;
  grid-template-columns: minmax(0, 1.15fr) minmax(320px, 0.85fr);
  gap: 22px;
  align-items: stretch;
  padding: 34px;
  border-radius: 40px;
}

.hero-copy,
.hero-panel,
.waitlist-copy,
.waitlist-form,
.pricing-card,
.proof-card,
.step-card {
  min-width: 0;
}

.hero-copy {
  display: flex;
  flex-direction: column;
  justify-content: center;
  padding: 8px 10px 8px 4px;
}

.eyebrow,
.section-label,
.status-pill,
.proof-kicker,
.plan-name {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  margin: 0;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  font-size: 0.75rem;
  color: var(--brand-deep);
}

.eyebrow,
.section-label,
.proof-kicker,
.plan-name {
  font-weight: 700;
}

h1,
h2,
h3 {
  margin: 0;
  text-wrap: balance;
  letter-spacing: -0.02em;
}

h1 {
  margin-top: 14px;
  font-family: var(--font-serif);
  font-size: clamp(3rem, 7vw, 5.4rem);
  line-height: 0.95;
  max-width: 9.5ch;
}

.lede {
  max-width: 52ch;
  font-size: 1.04rem;
  line-height: 1.68;
  color: var(--muted);
  margin: 18px 0 24px;
}

.hero-actions,
.signal-row {
  display: flex;
  flex-wrap: wrap;
  gap: 16px;
}

.proof-grid,
.step-grid,
.pricing-grid {
  display: grid;
  gap: 18px;
}

.inline-link {
  margin-top: auto;
  font-weight: 700;
}

.button {
  display: inline-flex;
  justify-content: center;
  align-items: center;
  min-height: 52px;
  padding: 0 20px;
  border-radius: 999px;
  border: 1px solid transparent;
  font: inherit;
  text-decoration: none;
  cursor: pointer;
  text-align: center;
  transition: transform 180ms ease, box-shadow 180ms ease, background 180ms ease;
}

.button:hover,
.button:focus-visible {
  transform: translateY(-2px);
}

.button-primary {
  background: linear-gradient(135deg, var(--brand), #dd7b4f);
  color: #fff8ef;
  box-shadow: 0 18px 34px var(--glow);
}

.button-ghost {
  border-color: rgba(127, 45, 18, 0.18);
  color: var(--ink);
  background: rgba(255, 255, 255, 0.56);
}

.hero-actions .button {
  flex: 0 1 auto;
  min-width: 176px;
}

.signal-row {
  margin-top: 26px;
}

.signal-row div {
  flex: 1 1 160px;
  min-width: 0;
  padding: 15px 17px;
  border-radius: var(--radius-md);
  background: rgba(255, 255, 255, 0.48);
  border: 1px solid rgba(127, 45, 18, 0.08);
  box-shadow: var(--shadow-soft);
}

.signal-row strong {
  display: block;
  font-size: 1.06rem;
  margin-bottom: 4px;
  line-height: 1.25;
}

.signal-row span,
.metric-card p,
.proof-card p,
.step-card p,
.plan-copy,
.fine-print,
.footer p,
.waitlist-copy p {
  color: var(--muted);
  line-height: 1.65;
}

.hero-panel {
  display: grid;
  gap: 16px;
  align-content: start;
  padding: 22px;
  border-radius: 30px;
  background: linear-gradient(180deg, rgba(44, 25, 10, 0.95), rgba(64, 37, 17, 0.92));
  color: #fff9f2;
}

.panel-topline {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  color: rgba(255, 247, 240, 0.82);
}

.status-pill {
  padding: 8px 12px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.1);
  color: #ffd9c7;
}

.metric-stack {
  display: grid;
  gap: 14px;
}

.metric-card {
  min-width: 0;
  padding: 18px;
  border-radius: 24px;
  background: rgba(255, 248, 239, 0.08);
  border: 1px solid rgba(255, 255, 255, 0.08);
}

.metric-card span {
  display: block;
  color: rgba(255, 236, 224, 0.72);
  font-size: 0.85rem;
  line-height: 1.45;
}

.metric-card strong {
  display: block;
  margin: 8px 0 6px;
  font-size: clamp(1.85rem, 3vw, 2.35rem);
  line-height: 1;
}

.accent-card {
  background: linear-gradient(135deg, rgba(198, 93, 46, 0.2), rgba(15, 118, 110, 0.18));
}

.proof-grid {
  margin-top: 20px;
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.proof-card {
  padding: 24px;
  border-radius: 28px;
}

.proof-card h2 {
  margin: 10px 0 12px;
  font-size: clamp(1.35rem, 2.2vw, 1.62rem);
  line-height: 1.14;
}

.story-section,
.pricing-section,
.waitlist-section {
  margin-top: 20px;
  padding: 30px;
  border-radius: 34px;
}

.story-section > div:first-child,
.section-heading,
.waitlist-copy {
  max-width: 720px;
}

.story-section h2,
.pricing-section h2,
.waitlist-copy h2 {
  margin-top: 10px;
  font-size: clamp(1.9rem, 3.8vw, 2.7rem);
  line-height: 1.04;
}

.step-grid {
  margin-top: 20px;
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.step-card {
  display: flex;
  flex-direction: column;
  gap: 10px;
  padding: 22px;
  border-radius: 26px;
  background: rgba(255, 255, 255, 0.6);
  border: 1px solid rgba(127, 45, 18, 0.08);
}

.step-card span {
  display: inline-flex;
  width: 38px;
  height: 38px;
  align-items: center;
  justify-content: center;
  border-radius: 12px;
  margin-bottom: 12px;
  background: rgba(198, 93, 46, 0.12);
  color: var(--brand-deep);
  font-weight: 700;
}

.step-card h3 {
  margin-bottom: 2px;
  font-size: 1.18rem;
  line-height: 1.18;
}

.section-heading {
  display: flex;
  justify-content: space-between;
  align-items: end;
  gap: 16px;
  margin-bottom: 20px;
}

.pricing-grid {
  align-items: stretch;
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.pricing-card {
  display: flex;
  flex-direction: column;
  gap: 14px;
  padding: 24px;
  border-radius: 26px;
  background: rgba(255, 255, 255, 0.56);
  border: 1px solid rgba(127, 45, 18, 0.1);
  box-shadow: var(--shadow-soft);
}

.plan-tag {
  margin: 0;
  font-size: 0.82rem;
  font-weight: 700;
  color: var(--accent);
  letter-spacing: 0.02em;
}

.pricing-card-featured {
  background: linear-gradient(180deg, rgba(198, 93, 46, 0.14), rgba(255, 255, 255, 0.68));
  border-color: rgba(198, 93, 46, 0.24);
  transform: translateY(-4px);
}

.pricing-card h3 {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  gap: 8px;
  font-size: clamp(1.7rem, 3.2vw, 2.15rem);
  line-height: 1.02;
}

.pricing-card h3 span {
  font-size: 0.94rem;
  color: var(--muted);
}

.plan-copy {
  min-height: 3.2em;
}

.pricing-card ul {
  margin: 0;
  padding-left: 18px;
  color: var(--muted);
  line-height: 1.75;
  flex: 1;
}

.pricing-card li + li {
  margin-top: 6px;
}

.pricing-card .button {
  width: 100%;
  margin-top: auto;
}

.fine-print {
  max-width: 70ch;
  margin-top: 12px;
  font-size: 0.92rem;
}

.waitlist-section {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(320px, 0.92fr);
  gap: 24px;
  align-items: start;
}

.waitlist-form,
.checkout-form {
  display: grid;
  gap: 16px;
}

.waitlist-form {
  padding: 22px;
  border-radius: 28px;
  background: var(--card-strong);
  border: 1px solid rgba(127, 45, 18, 0.1);
  box-shadow: var(--shadow-soft);
}

.waitlist-form label,
.checkout-form label,
.auth-form label {
  display: grid;
  gap: 8px;
  color: var(--brand-deep);
  font-size: 0.95rem;
}

input,
textarea,
select {
  width: 100%;
  border: 1px solid rgba(127, 45, 18, 0.12);
  border-radius: var(--radius-sm);
  padding: 14px 16px;
  background: rgba(255, 255, 255, 0.74);
  color: var(--ink);
  font: inherit;
}

input:focus,
textarea:focus,
select:focus {
  outline: 2px solid rgba(198, 93, 46, 0.28);
  outline-offset: 1px;
}

.form-status {
  min-height: 24px;
  margin: 0;
  color: var(--brand-deep);
}

.footer {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  align-items: center;
  flex-wrap: wrap;
  margin-top: 22px;
  padding: 0 8px;
}

.footer a {
  color: var(--brand-deep);
  text-decoration: none;
  overflow-wrap: anywhere;
}

.auth-shell,
.app-shell {
  padding-top: 10px;
}

.auth-card,
.app-panel,
.app-hero,
.invoice-hero {
  border: 1px solid var(--line);
  background: var(--card);
  backdrop-filter: blur(18px);
  box-shadow: var(--shadow);
}

.auth-card {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(320px, 420px);
  gap: 24px;
  padding: 32px;
  border-radius: 38px;
}

.auth-form {
  display: grid;
  gap: 16px;
  padding: 24px;
  border-radius: 28px;
  background: var(--card-strong);
  border: 1px solid rgba(127, 45, 18, 0.1);
  box-shadow: var(--shadow-soft);
}

.auth-copy {
  min-width: 0;
  padding: 6px 4px;
}

.app-hero,
.invoice-hero {
  display: flex;
  justify-content: space-between;
  align-items: end;
  gap: 20px;
  margin-top: 18px;
  padding: 28px;
  border-radius: 34px;
}

.app-metric-grid,
.app-grid {
  display: grid;
  gap: 18px;
  margin-top: 18px;
}

.app-metric-grid {
  grid-template-columns: repeat(4, minmax(0, 1fr));
}

.app-metric,
.app-panel {
  min-width: 0;
  padding: 24px;
  border-radius: 28px;
}

.app-metric {
  background: rgba(255, 255, 255, 0.54);
  border: 1px solid rgba(127, 45, 18, 0.08);
  box-shadow: var(--shadow-soft);
}

.app-metric span,
.invoice-hero-meta span {
  display: block;
  color: var(--muted);
  font-size: 0.92rem;
}

.app-metric strong,
.invoice-hero-meta strong {
  display: block;
  margin: 10px 0 8px;
  font-size: clamp(1.8rem, 3vw, 2.45rem);
  line-height: 1;
}

.app-grid {
  grid-template-columns: minmax(0, 1.2fr) minmax(320px, 0.8fr);
}

.panel-heading {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  align-items: start;
  margin-bottom: 18px;
}

.invoice-list,
.stack-list,
.timeline {
  display: grid;
  gap: 12px;
}

.invoice-row,
.stack-row,
.timeline-item,
.draft-card {
  padding: 18px;
  border-radius: 22px;
  background: rgba(255, 255, 255, 0.6);
  border: 1px solid rgba(127, 45, 18, 0.08);
  box-shadow: var(--shadow-soft);
}

.invoice-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  text-decoration: none;
  color: inherit;
}

.invoice-row div,
.invoice-hero-meta div {
  min-width: 0;
}

.invoice-row strong,
.stack-row strong,
.timeline-item strong {
  display: block;
  line-height: 1.2;
}

.invoice-row span,
.stack-row span,
.timeline-item span {
  display: block;
  margin-top: 6px;
  color: var(--muted);
}

.invoice-row em {
  font-style: normal;
  font-weight: 700;
  white-space: nowrap;
  color: var(--brand-deep);
}

.draft-card p {
  margin: 0 0 14px;
  line-height: 1.7;
  color: var(--ink);
}

.draft-card p:last-child {
  margin-bottom: 0;
}

.invoice-hero-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 16px;
}

.invoice-hero-meta div {
  min-width: 180px;
  padding: 16px 18px;
  border-radius: 22px;
  background: rgba(255, 255, 255, 0.54);
  border: 1px solid rgba(127, 45, 18, 0.08);
}

.checkout-dialog {
  width: min(480px, calc(100vw - 24px));
  border: none;
  border-radius: 28px;
  padding: 0;
  background: transparent;
}

.checkout-dialog::backdrop {
  background: rgba(29, 26, 22, 0.42);
  backdrop-filter: blur(8px);
}

.checkout-form {
  padding: 24px;
  border-radius: 28px;
  background: #fff9f2;
  border: 1px solid rgba(127, 45, 18, 0.12);
  box-shadow: var(--shadow);
}

.dialog-header {
  display: flex;
  justify-content: space-between;
  align-items: start;
  gap: 16px;
}

.dialog-close {
  width: 42px;
  height: 42px;
  border: none;
  border-radius: 999px;
  background: rgba(127, 45, 18, 0.08);
  color: var(--brand-deep);
  font-size: 1.5rem;
  cursor: pointer;
}

@media (max-width: 1100px) {
  .app-metric-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

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

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

@media (max-width: 960px) {
  .site-nav,
  .app-topbar,
  .panel-heading,
  .app-hero,
  .invoice-hero,
  .auth-card {
    flex-direction: column;
    align-items: start;
  }

  .auth-card,
  .app-grid {
    grid-template-columns: 1fr;
  }

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

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

  .section-heading {
    align-items: start;
  }

  .hero-card {
    gap: 18px;
  }

  .waitlist-section {
    gap: 22px;
  }

  .hero-card,
  .waitlist-section {
    grid-template-columns: 1fr;
  }

  .hero-panel {
    order: -1;
  }

  .pricing-card-featured {
    transform: none;
  }
}

@media (max-width: 760px) {
  .app-metric-grid,
  .proof-grid,
  .step-grid,
  .pricing-grid {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 720px) {
  .page-shell {
    width: min(100vw - 20px, 1180px);
    padding-top: 18px;
  }

  .hero-card,
  .story-section,
  .pricing-section,
  .waitlist-section {
    padding: 22px;
    border-radius: 28px;
  }

  h1 {
    font-size: clamp(2.6rem, 15vw, 4rem);
  }

  .hero-actions .button,
  .pricing-card .button,
  .auth-form .button,
  .nav-cta {
    width: 100%;
  }

  .waitlist-form,
  .checkout-form,
  .auth-form,
  .app-panel,
  .app-metric,
  .app-hero,
  .invoice-hero {
    padding: 20px;
  }

  .nav-links {
    justify-content: start;
  }

  .footer,
  .section-heading {
    flex-direction: column;
    align-items: start;
  }
}
