:root {
  color-scheme: light;
  --bg: #f6f7f4;
  --ink: #18211f;
  --muted: #5f6a66;
  --line: #d9ded7;
  --panel: #ffffff;
  --accent: #0f7b63;
  --accent-strong: #095c49;
  --warning: #985c07;
  --danger: #b42318;
  --gold: #d99020;
  --blue: #2563eb;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  background: var(--bg);
  color: var(--ink);
}

a {
  color: inherit;
}

.topbar {
  position: sticky;
  top: 0;
  z-index: 10;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 24px;
  padding: 16px clamp(18px, 4vw, 56px);
  background: rgba(246, 247, 244, 0.92);
  border-bottom: 1px solid var(--line);
  backdrop-filter: blur(12px);
}

.brand {
  font-weight: 800;
  text-decoration: none;
}

nav {
  display: flex;
  gap: 18px;
  color: var(--muted);
  font-size: 0.95rem;
}

nav a {
  text-decoration: none;
}

.hero {
  min-height: calc(100vh - 70px);
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(320px, 0.78fr);
  gap: clamp(28px, 5vw, 72px);
  align-items: center;
  padding: clamp(44px, 7vw, 86px) clamp(18px, 6vw, 76px);
}

.hero-copy {
  max-width: 740px;
}

.eyebrow {
  margin: 0 0 10px;
  color: var(--accent);
  font-size: 0.78rem;
  font-weight: 800;
  letter-spacing: 0;
  text-transform: uppercase;
}

h1,
h2,
h3,
p {
  margin-top: 0;
}

h1 {
  margin-bottom: 22px;
  font-size: clamp(2.8rem, 6vw, 5.8rem);
  line-height: 0.96;
  letter-spacing: 0;
}

h2 {
  font-size: clamp(1.9rem, 3vw, 3rem);
  line-height: 1.04;
  letter-spacing: 0;
}

.lead {
  max-width: 670px;
  color: var(--muted);
  font-size: clamp(1.05rem, 2vw, 1.35rem);
  line-height: 1.55;
}

.hero-actions,
.package-foot,
.footer {
  display: flex;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
}

.btn {
  display: inline-flex;
  justify-content: center;
  align-items: center;
  min-height: 44px;
  padding: 0 18px;
  border: 1px solid var(--line);
  border-radius: 6px;
  background: var(--panel);
  color: var(--ink);
  font-weight: 750;
  text-decoration: none;
  cursor: pointer;
}

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

.btn.primary:hover {
  background: var(--accent-strong);
}

.btn.ghost {
  background: transparent;
}

.btn.small {
  min-height: 36px;
  padding: 0 12px;
  font-size: 0.9rem;
}

.insight-preview {
  display: grid;
  gap: 12px;
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #e8ece6;
  box-shadow: 0 24px 70px rgba(24, 33, 31, 0.14);
}

.score-card,
.diagnostic-card,
.rewrite-card {
  border: 1px solid var(--line);
  border-radius: 6px;
  background: var(--panel);
}

.score-card {
  display: grid;
  grid-template-columns: 1fr auto auto;
  align-items: end;
  gap: 10px;
  padding: 18px;
}

.score-card strong {
  font-size: 4.8rem;
  line-height: 0.8;
  color: var(--danger);
}

.score-label {
  color: var(--muted);
  font-weight: 800;
}

.diagnostic-card {
  padding: 18px;
}

.diag-head {
  display: flex;
  justify-content: space-between;
  gap: 14px;
  margin-bottom: 12px;
  color: var(--muted);
  font-weight: 800;
}

.diag-head strong {
  color: var(--danger);
  font-size: 1.8rem;
}

.diagnostic-card ul {
  display: grid;
  gap: 8px;
  margin: 0;
  padding-left: 18px;
  color: var(--muted);
  line-height: 1.45;
}

.rewrite-card {
  padding: 18px;
  border-color: rgba(15, 123, 99, 0.35);
  background: #f8fbf7;
}

.preview-tag {
  width: max-content;
  padding: 4px 8px;
  border-radius: 999px;
  background: rgba(24, 33, 31, 0.08);
  color: var(--muted);
  font-size: 0.78rem;
  font-weight: 800;
  text-transform: uppercase;
}

.rewrite-card h2 {
  margin: 12px 0;
  font-size: 1.7rem;
}

.rewrite-card p {
  margin-bottom: 0;
  color: var(--muted);
  line-height: 1.45;
}

.package-card ul {
  margin: 0;
  padding-left: 18px;
  color: var(--muted);
  line-height: 1.55;
}

.metrics {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
  background: var(--panel);
}

.metrics div {
  padding: 22px clamp(18px, 4vw, 56px);
  border-right: 1px solid var(--line);
}

.metrics strong {
  display: block;
  font-size: 2rem;
}

.metrics span {
  color: var(--muted);
}

.section {
  padding: clamp(48px, 7vw, 88px) clamp(18px, 6vw, 76px);
}

.section-head {
  max-width: 760px;
  margin-bottom: 28px;
}

.section-head p:not(.eyebrow) {
  color: var(--muted);
  line-height: 1.55;
}

.audit-section {
  background: #ffffff;
}

.audit-tool {
  display: grid;
  grid-template-columns: minmax(300px, 0.82fr) minmax(320px, 1fr);
  gap: 18px;
  align-items: start;
}

.audit-form,
.audit-result {
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #f8faf7;
}

.audit-form {
  display: grid;
  gap: 14px;
  padding: 20px;
}

.audit-result {
  min-height: 420px;
  padding: 18px;
}

.result-placeholder {
  display: grid;
  min-height: 380px;
  place-items: center;
  color: var(--muted);
  text-align: center;
}

.audit-score {
  display: inline-grid;
  grid-template-columns: auto auto auto;
  align-items: baseline;
  gap: 8px;
  padding: 10px 12px;
  border-radius: 6px;
  background: var(--panel);
  border: 1px solid var(--line);
}

.product-card-preview {
  display: grid;
  grid-template-columns: 132px minmax(0, 1fr);
  gap: 14px;
  align-items: center;
  margin-bottom: 16px;
  padding: 10px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--panel);
}

.product-card-preview img {
  width: 132px;
  aspect-ratio: 1 / 1;
  object-fit: cover;
  border-radius: 6px;
  border: 1px solid var(--line);
  background: #eef2ed;
}

.product-card-preview span {
  display: block;
  margin-bottom: 4px;
  color: var(--accent);
  font-size: 0.76rem;
  font-weight: 800;
  text-transform: uppercase;
}

.product-card-preview strong {
  display: block;
  color: var(--ink);
  line-height: 1.2;
}

.product-card-preview p {
  margin: 8px 0 0;
  color: var(--muted);
  font-size: 0.9rem;
  line-height: 1.4;
}

.product-card-preview--empty {
  display: block;
}

.product-card-preview--empty span {
  margin-top: 6px;
  color: var(--muted);
  text-transform: none;
  font-weight: 600;
}

.audit-score strong {
  font-size: 3rem;
  line-height: 0.9;
}

.audit-score--good strong {
  color: var(--accent);
}

.audit-score--warn strong {
  color: var(--gold);
}

.audit-score--bad strong {
  color: var(--danger);
}

.audit-output {
  margin-top: 18px;
}

.audit-output h3 {
  margin: 18px 0 8px;
  font-size: 1rem;
}

.audit-output p,
.audit-output li {
  color: var(--muted);
  line-height: 1.5;
}

.audit-output ul,
.audit-output ol {
  margin: 0;
  padding-left: 20px;
}

.packages-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 14px;
}

.package-card {
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  gap: 20px;
  min-height: 420px;
  padding: 20px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--panel);
}

.package-card h3 {
  font-size: 1.35rem;
}

.package-card p {
  color: var(--muted);
  line-height: 1.5;
}

.package-foot {
  justify-content: space-between;
  padding-top: 16px;
  border-top: 1px solid var(--line);
}

.package-foot strong {
  font-size: 1.3rem;
}

.package-foot span {
  color: var(--muted);
  font-size: 0.9rem;
}

.process {
  background: #edf0ea;
}

.steps {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 14px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.steps li {
  padding: 18px;
  border-left: 3px solid var(--accent);
  background: rgba(255, 255, 255, 0.62);
}

.steps span {
  display: inline-flex;
  width: 28px;
  height: 28px;
  align-items: center;
  justify-content: center;
  margin-bottom: 14px;
  border-radius: 50%;
  background: var(--accent);
  color: #fff;
  font-weight: 800;
}

.steps p {
  margin-bottom: 0;
  color: var(--muted);
  line-height: 1.45;
}

.order-section {
  display: grid;
  grid-template-columns: minmax(0, 0.8fr) minmax(320px, 1fr);
  gap: clamp(28px, 5vw, 64px);
  align-items: start;
}

.order-copy p {
  color: var(--muted);
  line-height: 1.55;
}

.order-form {
  display: grid;
  gap: 14px;
  padding: 20px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--panel);
}

label {
  display: grid;
  gap: 6px;
  color: var(--muted);
  font-size: 0.92rem;
  font-weight: 700;
}

input,
select,
textarea {
  width: 100%;
  min-height: 44px;
  border: 1px solid var(--line);
  border-radius: 6px;
  padding: 10px 12px;
  background: #fbfcfa;
  color: var(--ink);
  font: inherit;
}

textarea {
  resize: vertical;
}

.status {
  min-height: 22px;
  margin-top: 16px;
  color: var(--muted);
  line-height: 1.4;
}

.status.success {
  color: var(--accent-strong);
}

.status.error {
  color: var(--danger);
}

.footer {
  justify-content: space-between;
  padding: 24px clamp(18px, 6vw, 76px);
  border-top: 1px solid var(--line);
  color: var(--muted);
}

.success-page {
  min-height: 100vh;
  display: grid;
  place-items: center;
  padding: 20px;
}

.success-box {
  max-width: 520px;
  padding: 28px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--panel);
  text-align: center;
}

.muted {
  color: var(--muted);
}

@media (max-width: 980px) {
  .hero,
  .audit-tool,
  .order-section {
    grid-template-columns: 1fr;
  }

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

  .package-card {
    min-height: 0;
  }
}

@media (max-width: 640px) {
  .topbar {
    align-items: flex-start;
    flex-direction: column;
  }

  nav {
    width: 100%;
    justify-content: space-between;
    gap: 10px;
  }

  h1 {
    font-size: 2.65rem;
  }

  .packages-grid,
  .steps,
  .metrics {
    grid-template-columns: 1fr;
  }

  .metrics div {
    border-right: 0;
    border-bottom: 1px solid var(--line);
  }

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

  .product-card-preview {
    grid-template-columns: 1fr;
  }

  .product-card-preview img {
    width: 100%;
  }
}
