:root {
  --bg: #fcf6ec;
  --bg-deep: #f3e5d0;
  --paper: rgba(255, 250, 241, 0.82);
  --ink: #1f1a17;
  --muted: #675d55;
  --line: rgba(31, 26, 23, 0.12);
  --accent: #d95f31;
  --accent-deep: #a3421b;
  --accent-soft: #ffd8c4;
  --olive: #6a7b3b;
  --shadow: 0 24px 90px rgba(88, 59, 26, 0.14);
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  font-family: "Manrope", sans-serif;
  color: var(--ink);
  background:
    radial-gradient(circle at top left, rgba(217, 95, 49, 0.2), transparent 28%),
    radial-gradient(circle at top right, rgba(106, 123, 59, 0.2), transparent 24%),
    linear-gradient(180deg, var(--bg) 0%, var(--bg-deep) 100%);
}

.backdrop,
.grain {
  position: fixed;
  inset: 0;
  pointer-events: none;
}

.backdrop {
  background:
    radial-gradient(circle at 20% 15%, rgba(255, 255, 255, 0.65), transparent 20%),
    radial-gradient(circle at 80% 20%, rgba(255, 216, 196, 0.45), transparent 18%);
}

.grain {
  opacity: 0.06;
  background-image:
    linear-gradient(rgba(31, 26, 23, 0.14) 1px, transparent 1px),
    linear-gradient(90deg, rgba(31, 26, 23, 0.14) 1px, transparent 1px);
  background-size: 22px 22px;
}

.page-shell {
  width: min(1180px, calc(100% - 32px));
  margin: 0 auto;
  padding: 24px 0 72px;
  position: relative;
  z-index: 1;
}

.topbar,
.hero-grid,
.feature-grid,
.dashboard-grid,
.insight-grid,
.pricing-grid,
.field-row,
.result-grid,
.stack-head,
.hero-metrics,
.lower-grid {
  display: grid;
  gap: 16px;
}

.topbar {
  grid-template-columns: auto 1fr;
  align-items: center;
  margin-bottom: 42px;
}

.topbar-links {
  justify-self: end;
  display: flex;
  gap: 18px;
}

.topbar a,
.brand {
  color: var(--ink);
  text-decoration: none;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  font-weight: 800;
}

.brand-mark {
  width: 42px;
  height: 42px;
  display: grid;
  place-items: center;
  border-radius: 14px;
  background: linear-gradient(135deg, var(--accent), var(--olive));
  color: white;
}

.hero {
  padding: 20px 0 52px;
}

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

.hero-copy h1,
.section-heading h2 {
  margin: 0;
  line-height: 0.96;
  letter-spacing: -0.045em;
  font-family: "Fraunces", serif;
}

.hero-copy h1 {
  font-size: clamp(3.4rem, 9vw, 6.6rem);
  max-width: 11ch;
}

.hero-text,
.section-heading p,
.feature-card p,
.panel p,
.price-card p,
.stack-summary,
label,
input,
select,
textarea {
  color: var(--muted);
}

.hero-actions {
  display: flex;
  gap: 14px;
  flex-wrap: wrap;
  margin: 28px 0;
}

.button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 14px 22px;
  border-radius: 999px;
  border: 1px solid transparent;
  text-decoration: none;
  font-weight: 800;
  cursor: pointer;
  transition: transform 180ms ease, box-shadow 180ms ease;
}

.button:hover {
  transform: translateY(-1px);
  box-shadow: 0 14px 30px rgba(31, 26, 23, 0.12);
}

.button.primary {
  background: var(--ink);
  color: white;
}

.button.secondary {
  background: rgba(255, 255, 255, 0.46);
  color: var(--ink);
  border-color: var(--line);
}

.hero-metrics {
  list-style: none;
  padding: 0;
  margin: 22px 0 0;
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.hero-metrics li,
.preview-card,
.feature-card,
.panel,
.price-card {
  background: var(--paper);
  backdrop-filter: blur(16px);
  border: 1px solid rgba(255, 255, 255, 0.45);
  box-shadow: var(--shadow);
}

.hero-metrics li {
  padding: 18px;
  border-radius: 18px;
}

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

.hero-preview {
  display: grid;
  gap: 18px;
  align-content: center;
}

.preview-card,
.feature-card,
.panel,
.price-card {
  border-radius: 28px;
  padding: 24px;
}

.preview-card.strong {
  background: linear-gradient(180deg, rgba(31, 26, 23, 0.95), rgba(217, 95, 49, 0.92));
  color: white;
}

.preview-card.strong p,
.preview-card.strong li {
  color: rgba(255, 255, 255, 0.82);
}

.preview-card.soft {
  background: linear-gradient(180deg, rgba(255, 229, 208, 0.92), rgba(255, 250, 241, 0.92));
}

.eyebrow,
.stack-label,
.pack-label,
.price-name {
  text-transform: uppercase;
  letter-spacing: 0.18em;
  font-size: 0.78rem;
  color: var(--accent-deep);
}

.section {
  padding: 28px 0;
}

.section-heading {
  margin-bottom: 22px;
}

.section-heading h2 {
  font-size: clamp(2rem, 4vw, 3.4rem);
  max-width: 14ch;
}

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

.feature-card span {
  color: var(--accent);
  font-size: 1.4rem;
  font-weight: 800;
}

.panel-form,
.panel-result,
.panel-send,
.panel-send-result {
  min-height: 100%;
}

.panel-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
  margin-bottom: 20px;
}

.status-pill {
  display: inline-flex;
  align-items: center;
  padding: 8px 12px;
  border-radius: 999px;
  font-size: 0.85rem;
  background: rgba(106, 123, 59, 0.12);
  color: var(--olive);
}

.status-pill.subtle {
  background: rgba(31, 26, 23, 0.08);
  color: var(--muted);
}

label {
  display: grid;
  gap: 8px;
  font-size: 0.95rem;
}

input,
select,
textarea {
  width: 100%;
  border: 1px solid var(--line);
  border-radius: 18px;
  padding: 14px 16px;
  background: rgba(255, 255, 255, 0.7);
  font: inherit;
}

textarea {
  resize: vertical;
}

.result-sheet,
.section-stack,
.stack-list {
  display: grid;
  gap: 14px;
}

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

.sheet-block,
.preview-section,
.stack-item {
  border: 1px solid var(--line);
  border-radius: 20px;
  padding: 16px;
  background: rgba(255, 255, 255, 0.42);
}

.preview-section strong,
.stack-head strong {
  color: var(--ink);
}

.stack-meta,
.history-empty,
code {
  color: var(--muted);
}

.stack-head {
  grid-template-columns: 1fr auto;
  align-items: baseline;
}

.price-card.featured {
  background: linear-gradient(180deg, rgba(31, 26, 23, 0.95), rgba(106, 123, 59, 0.9));
  color: white;
}

.price-card.featured p,
.price-card.featured .price-name,
.price-card.featured h3,
.price-card.featured span {
  color: white;
}

.price-card h3 {
  margin: 0 0 12px;
  font-size: 2.8rem;
  font-family: "Fraunces", serif;
}

.price-card h3 span {
  font-size: 1rem;
}

@media (max-width: 960px) {
  .hero-grid,
  .dashboard-grid,
  .insight-grid,
  .pricing-grid,
  .feature-grid,
  .hero-metrics {
    grid-template-columns: 1fr;
  }

  .topbar {
    grid-template-columns: 1fr;
    gap: 12px;
  }

  .topbar-links {
    justify-self: start;
    flex-wrap: wrap;
  }
}

@media (max-width: 640px) {
  .page-shell {
    width: min(100% - 20px, 1180px);
  }

  .field-row,
  .result-grid {
    grid-template-columns: 1fr;
  }

  .hero-copy h1 {
    font-size: 3rem;
  }

  .preview-card,
  .feature-card,
  .panel,
  .price-card {
    padding: 20px;
    border-radius: 22px;
  }
}
