:root {
  --ink: #241e1b;
  --muted: #6f625d;
  --paper: #fffaf4;
  --linen: #f6eadc;
  --rose: #b95c4d;
  --terracotta: #d97858;
  --gold: #d8a34f;
  --teal: #2f7773;
  --sage: #8aa58f;
  --border: rgba(36, 30, 27, 0.14);
  --shadow: 0 24px 70px rgba(75, 44, 29, 0.16);
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

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

a {
  color: inherit;
  text-decoration: none;
}

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

button,
input,
select,
textarea {
  font: inherit;
}

.site-header {
  position: sticky;
  top: 0;
  z-index: 20;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  padding: 14px clamp(18px, 4vw, 56px);
  background: rgba(255, 250, 244, 0.9);
  border-bottom: 1px solid var(--border);
  backdrop-filter: blur(18px);
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-weight: 800;
  white-space: nowrap;
}

.brand-mark {
  display: grid;
  place-items: center;
  width: 38px;
  height: 38px;
  border-radius: 8px;
  color: #fff;
  background: var(--ink);
  font-size: 13px;
  letter-spacing: 0;
}

.main-nav,
.site-footer nav {
  display: flex;
  align-items: center;
  gap: 18px;
  color: var(--muted);
  font-size: 14px;
  font-weight: 700;
}

.main-nav a:hover,
.site-footer a:hover {
  color: var(--rose);
}

.header-action,
.button {
  display: inline-flex;
  min-height: 44px;
  align-items: center;
  justify-content: center;
  border: 1px solid transparent;
  border-radius: 8px;
  padding: 11px 16px;
  cursor: pointer;
  font-weight: 800;
  transition: transform 160ms ease, box-shadow 160ms ease, background 160ms ease;
}

.header-action,
.button.primary {
  color: #fff;
  background: var(--rose);
  box-shadow: 0 12px 28px rgba(185, 92, 77, 0.22);
}

.button.secondary {
  color: var(--ink);
  background: #fff8ed;
  border-color: rgba(255, 255, 255, 0.45);
}

.button.ghost {
  color: var(--rose);
  background: #fff;
  border-color: var(--border);
  box-shadow: none;
}

.header-action:hover,
.button:hover {
  transform: translateY(-1px);
}

.hero {
  position: relative;
  min-height: 88vh;
  display: grid;
  align-items: end;
  padding: 120px clamp(20px, 6vw, 78px) 70px;
  overflow: hidden;
}

.hero-image,
.hero-scrim {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
}

.hero-image {
  object-fit: cover;
}

.hero-scrim {
  background:
    linear-gradient(90deg, rgba(36, 30, 27, 0.82) 0%, rgba(36, 30, 27, 0.58) 42%, rgba(36, 30, 27, 0.16) 100%),
    linear-gradient(0deg, rgba(36, 30, 27, 0.58) 0%, rgba(36, 30, 27, 0) 40%);
}

.hero-content {
  position: relative;
  max-width: 860px;
  color: #fffaf4;
}

.eyebrow,
.feature-tag,
.template-type {
  margin: 0 0 12px;
  color: var(--teal);
  font-size: 12px;
  font-weight: 900;
  letter-spacing: 0;
  text-transform: uppercase;
}

.hero .eyebrow {
  color: #ffd99b;
}

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

h1,
h2,
h3 {
  font-family: "Plus Jakarta Sans", Inter, ui-sans-serif, system-ui, sans-serif;
  font-weight: 800;
  line-height: 1.06;
  letter-spacing: 0;
}

h1 {
  max-width: 880px;
  margin-bottom: 22px;
  font-size: clamp(34px, 5.2vw, 68px);
}

h2 {
  margin-bottom: 16px;
  font-size: clamp(26px, 3.6vw, 44px);
}

h3 {
  margin-bottom: 10px;
  font-size: 20px;
  line-height: 1.18;
}

.hero-copy {
  max-width: 650px;
  color: rgba(255, 250, 244, 0.88);
  font-size: clamp(18px, 2vw, 22px);
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 30px;
}

.section {
  padding: 92px clamp(20px, 6vw, 78px);
}

.section-heading {
  max-width: 850px;
  margin-bottom: 36px;
}

.section-heading > p:not(.eyebrow),
.about-section > p,
.contact-section p,
.subscribe-copy p {
  color: var(--muted);
  font-size: 18px;
}

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

.feature-card,
.template-card,
.help-grid article {
  border: 1px solid var(--border);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.72);
  box-shadow: var(--shadow);
}

.feature-card {
  min-height: 270px;
  padding: 24px;
}

.feature-card p,
.template-card p,
.automation-item p,
.help-grid p,
.site-footer p {
  color: var(--muted);
}

.split-section {
  display: grid;
  grid-template-columns: minmax(260px, 0.75fr) minmax(0, 1.25fr);
  gap: 34px;
  background: var(--linen);
}

.sticky-panel {
  position: sticky;
  top: 88px;
  align-self: start;
}

.filter-row {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 22px;
}

.chip {
  min-height: 38px;
  border: 1px solid var(--border);
  border-radius: 999px;
  padding: 8px 13px;
  color: var(--muted);
  background: #fffaf4;
  cursor: pointer;
  font-weight: 800;
}

.chip.active {
  color: #fff;
  background: var(--teal);
  border-color: var(--teal);
}

.template-list {
  display: grid;
  gap: 18px;
}

.template-card {
  padding: 22px;
}

.template-instructions {
  margin: 18px 0;
  padding: 16px 18px;
  border: 1px solid rgba(216, 163, 79, 0.34);
  border-radius: 8px;
  background: #fff8ed;
}

.template-instructions h4 {
  margin: 0 0 10px;
  font-size: 15px;
  line-height: 1.2;
}

.template-instructions ol {
  display: grid;
  gap: 8px;
  margin: 0;
  padding-left: 20px;
  color: var(--muted);
  font-size: 14px;
}

.template-card pre {
  max-height: 300px;
  overflow: auto;
  margin: 0 0 18px;
  padding: 18px;
  border: 1px solid rgba(47, 119, 115, 0.2);
  border-radius: 8px;
  color: #2d2a27;
  background: #fffaf4;
  white-space: pre-wrap;
}

.template-card code {
  font-family: "SFMono-Regular", Consolas, "Liberation Mono", monospace;
  font-size: 13px;
}

.template-actions {
  display: grid;
  grid-template-columns: auto minmax(180px, 260px) auto;
  gap: 10px;
  align-items: end;
}

.tool-picker {
  margin-bottom: 0;
  color: var(--muted);
  font-size: 12px;
}

.tool-picker select {
  min-height: 44px;
  margin-top: 6px;
  background: #fff;
}

.tool-note {
  grid-column: 1 / -1;
  margin: 0;
  color: var(--muted);
  font-size: 13px;
}

.automation-board {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  border-top: 1px solid var(--border);
  border-left: 1px solid var(--border);
}

.automation-item {
  min-height: 280px;
  padding: 26px;
  border-right: 1px solid var(--border);
  border-bottom: 1px solid var(--border);
  background: #fffdf8;
}

.automation-item span {
  display: block;
  margin-bottom: 50px;
  color: var(--terracotta);
  font-weight: 900;
}

.community-section {
  background: #fffdf8;
}

.panel-form,
.subscribe-form,
.feedback-form {
  max-width: 980px;
  padding: 26px;
  border: 1px solid var(--border);
  border-radius: 8px;
  background: #fff;
  box-shadow: var(--shadow);
}

.subscribe-section {
  display: grid;
  grid-template-columns: 0.75fr 1.25fr;
  gap: 34px;
  background: var(--ink);
  color: #fffaf4;
}

.subscribe-copy p,
.subscribe-section .form-note {
  color: rgba(255, 250, 244, 0.72);
}

.subscribe-form {
  color: var(--ink);
}

.form-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 16px;
}

label,
legend {
  display: grid;
  gap: 8px;
  margin-bottom: 16px;
  font-size: 14px;
  font-weight: 800;
}

input,
select,
textarea {
  width: 100%;
  border: 1px solid rgba(36, 30, 27, 0.2);
  border-radius: 8px;
  padding: 13px 14px;
  color: var(--ink);
  background: #fffaf4;
}

textarea {
  resize: vertical;
}

input:focus,
select:focus,
textarea:focus {
  outline: 3px solid rgba(216, 163, 79, 0.28);
  border-color: var(--gold);
}

.audit-box {
  margin: 10px 0 18px;
  padding: 18px;
  border: 1px solid rgba(47, 119, 115, 0.22);
  border-radius: 8px;
}

.audit-box label,
.consent {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  color: var(--muted);
  font-weight: 700;
}

.audit-box input,
.consent input {
  width: auto;
  margin-top: 3px;
}

.form-note {
  min-height: 24px;
  margin: 14px 0 0;
  color: var(--muted);
  font-weight: 800;
}

.hidden-field {
  position: absolute;
  left: -10000px;
  width: 1px;
  height: 1px;
  overflow: hidden;
}

.about-section,
.contact-section {
  display: grid;
  grid-template-columns: 0.8fr 1.2fr;
  gap: 40px;
  align-items: start;
}

.help-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 16px;
  margin-bottom: 20px;
}

.help-grid article {
  padding: 24px;
}

.feedback-form {
  max-width: none;
}

.site-footer {
  display: flex;
  justify-content: space-between;
  gap: 24px;
  padding: 34px clamp(20px, 6vw, 78px);
  border-top: 1px solid var(--border);
  background: #fffdf8;
}

.site-footer p {
  margin-bottom: 0;
}

.success-page {
  min-height: 100vh;
  display: grid;
  place-items: center;
  padding: 32px;
  background: var(--linen);
}

.success-panel {
  width: min(760px, 100%);
  padding: clamp(28px, 6vw, 56px);
  border: 1px solid var(--border);
  border-radius: 8px;
  background: #fffaf4;
  box-shadow: var(--shadow);
}

.success-panel .brand {
  margin-bottom: 44px;
}

.success-panel h1 {
  font-size: clamp(34px, 5vw, 60px);
}

.success-panel p:not(.eyebrow) {
  max-width: 580px;
  color: var(--muted);
  font-size: 18px;
}

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

  .feature-grid,
  .automation-board,
  .help-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .split-section,
  .subscribe-section,
  .about-section,
  .contact-section {
    grid-template-columns: 1fr;
  }

  .sticky-panel {
    position: static;
  }
}

@media (max-width: 640px) {
  .site-header {
    align-items: stretch;
    flex-direction: column;
    gap: 12px;
  }

  .header-action {
    width: 100%;
  }

  .hero {
    min-height: 82vh;
    padding-top: 80px;
  }

  .hero-scrim {
    background: linear-gradient(0deg, rgba(36, 30, 27, 0.82) 0%, rgba(36, 30, 27, 0.5) 100%);
  }

  .hero-actions,
  .hero-actions .button {
    width: 100%;
  }

  .section {
    padding-block: 64px;
  }

  .feature-grid,
  .automation-board,
  .help-grid,
  .form-grid {
    grid-template-columns: 1fr;
  }

  .automation-item {
    min-height: auto;
  }

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

  .automation-item span {
    margin-bottom: 24px;
  }

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