@import url("https://fonts.googleapis.com/css2?family=Space+Grotesk:wght@400;500;600;700&family=Source+Serif+4:wght@400;600;700&display=swap");

:root {
  --bg: #f6f3ec;
  --bg-2: #efe6d8;
  --ink: #191714;
  --muted: #5a5247;
  --brand: #2f5b4a;
  --brand-2: #0e3b2c;
  --accent: #e0a44b;
  --card: #fff9ef;
  --stroke: #d9cbb6;
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  color: var(--ink);
  background: radial-gradient(1200px 600px at 10% 10%, #fff3d9 0%, transparent 60%),
    radial-gradient(1200px 600px at 90% 0%, #dbe9dc 0%, transparent 60%),
    linear-gradient(180deg, var(--bg) 0%, var(--bg-2) 100%);
  font-family: "Space Grotesk", system-ui, -apple-system, sans-serif;
}

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

.site-header {
  position: sticky;
  top: 0;
  backdrop-filter: blur(6px);
  background: rgba(246, 243, 236, 0.85);
  border-bottom: 1px solid var(--stroke);
  z-index: 10;
}

.header-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 14px 0;
  gap: 16px;
}

.brand {
  display: flex;
  align-items: center;
  gap: 10px;
  font-weight: 700;
  letter-spacing: 0.3px;
}

.brand-mark {
  width: 12px;
  height: 12px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--accent), var(--brand));
  display: inline-block;
  box-shadow: 0 0 0 4px rgba(224, 164, 75, 0.2);
}

.nav a {
  color: var(--ink);
  text-decoration: none;
  margin-left: 14px;
  font-weight: 500;
}

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

.site-main {
  padding: 32px 0 64px;
}

.hero {
  display: grid;
  grid-template-columns: 1.1fr 0.9fr;
  gap: 28px;
  align-items: center;
  padding: 24px 0 12px;
  animation: fadeUp 600ms ease both;
}

.hero h1 {
  font-size: clamp(32px, 4vw, 52px);
  line-height: 1.05;
  margin: 0 0 12px;
  letter-spacing: -0.8px;
}

.hero p {
  color: var(--muted);
  font-size: clamp(15px, 2vw, 18px);
  line-height: 1.6;
  margin: 0 0 20px;
}

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

.hero-cta {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
}

.btn {
  padding: 12px 18px;
  border-radius: 999px;
  font-weight: 600;
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  border: 1px solid transparent;
}

.btn-primary {
  background: var(--brand);
  color: #fff;
  box-shadow: 0 12px 30px rgba(47, 91, 74, 0.25);
}

.btn-secondary {
  background: transparent;
  color: var(--brand-2);
  border-color: var(--brand-2);
}

.hero-card {
  background: var(--card);
  border: 1px solid var(--stroke);
  border-radius: 18px;
  padding: 18px;
  box-shadow: 0 16px 40px rgba(0, 0, 0, 0.08);
  position: relative;
  overflow: hidden;
}

.hero-card::after {
  content: "";
  position: absolute;
  inset: -40% -30% auto auto;
  width: 220px;
  height: 220px;
  border-radius: 50%;
  background: radial-gradient(circle at center, rgba(224, 164, 75, 0.35), transparent 60%);
}

.hero-card h3 {
  margin: 0 0 8px;
  font-family: "Source Serif 4", serif;
}

.hero-metric {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
  margin-top: 16px;
}

.metric {
  background: #fff;
  border: 1px dashed var(--stroke);
  border-radius: 12px;
  padding: 12px;
}

.metric strong {
  font-size: 20px;
}

.section {
  margin-top: 32px;
}

.section h2 {
  margin: 0 0 12px;
  font-size: 28px;
}

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

.card {
  background: #fff;
  border: 1px solid var(--stroke);
  border-radius: 16px;
  padding: 16px;
  min-height: 140px;
  animation: fadeUp 700ms ease both;
}

.card h3 {
  margin: 0 0 8px;
  font-family: "Source Serif 4", serif;
}

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

.step {
  border-left: 3px solid var(--accent);
  padding-left: 12px;
}

.footer-cta {
  margin-top: 40px;
  background: linear-gradient(135deg, #1f3f32, #2f5b4a);
  color: #fff;
  border-radius: 18px;
  padding: 22px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}

.form-page {
  max-width: 820px;
}

.form-card {
  background: #fff;
  border: 1px solid var(--stroke);
  border-radius: 16px;
  padding: 20px;
  box-shadow: 0 12px 28px rgba(0, 0, 0, 0.08);
}

.field {
  margin-bottom: 14px;
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.field input,
.field select,
.field textarea {
  padding: 10px 12px;
  border-radius: 10px;
  border: 1px solid var(--stroke);
  font: inherit;
  background: #fffef9;
}

.stepper {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 10px;
  margin: 18px 0 22px;
}

.step {
  display: flex;
  align-items: center;
  gap: 8px;
  background: #fff;
  border: 1px solid var(--stroke);
  border-radius: 999px;
  padding: 8px 12px;
  font-size: 14px;
}

.step-link {
  text-decoration: none;
  color: inherit;
}

.step-link:hover {
  border-color: var(--brand);
}

.doc-row {
  border: 1px dashed var(--stroke);
  border-radius: 12px;
  padding: 12px;
  margin-bottom: 12px;
}

.form-actions {
  margin-top: 14px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}

.btn.small {
  padding: 8px 12px;
  font-size: 14px;
}

.btn-danger {
  background: #b34235;
  color: #fff;
  border-color: #b34235;
}

.btn-danger:hover {
  background: #9a352a;
  border-color: #9a352a;
}

.admin-page {
  display: flex;
  flex-direction: column;
  gap: 18px;
}

.admin-page-head {
  display: flex;
  justify-content: space-between;
  align-items: flex-end;
  gap: 16px;
}

.admin-page-head.compact {
  margin-bottom: 6px;
}

.back-link {
  display: inline-block;
  margin-bottom: 8px;
  color: var(--brand-2);
  text-decoration: none;
  font-weight: 500;
}

.back-link:hover {
  color: var(--brand);
}

.notice {
  border-radius: 12px;
  padding: 12px 14px;
  border: 1px solid var(--stroke);
  background: #fff;
}

.notice.success {
  border-color: rgba(47, 91, 74, 0.35);
  background: rgba(47, 91, 74, 0.1);
}

.notice.error {
  border-color: rgba(179, 66, 53, 0.5);
  background: rgba(179, 66, 53, 0.08);
}

.notice ul {
  margin: 8px 0 0;
  padding-left: 18px;
}

.article-filter-bar {
  display: grid;
  grid-template-columns: 2fr 1fr auto;
  gap: 12px;
  align-items: end;
}

.filter-actions {
  display: flex;
  align-items: center;
  gap: 8px;
}

.article-table-card {
  overflow-x: auto;
}

.admin-table {
  width: 100%;
  border-collapse: collapse;
  min-width: 720px;
}

.admin-table th,
.admin-table td {
  text-align: left;
  border-bottom: 1px solid var(--stroke);
  padding: 10px 8px;
  vertical-align: top;
}

.status-badge {
  display: inline-flex;
  align-items: center;
  border-radius: 999px;
  font-size: 12px;
  padding: 4px 9px;
  border: 1px solid var(--stroke);
  text-transform: uppercase;
  font-weight: 600;
  letter-spacing: 0.4px;
}

.status-draft {
  background: rgba(90, 82, 71, 0.1);
  color: var(--muted);
}

.status-published {
  background: rgba(47, 91, 74, 0.12);
  color: var(--brand-2);
}

.status-archived {
  background: rgba(14, 59, 44, 0.15);
  color: var(--brand-2);
}

.table-actions {
  display: flex;
  align-items: center;
  gap: 8px;
}

.table-actions form {
  margin: 0;
}

.small-text {
  font-size: 13px;
}

.empty-cell {
  text-align: center;
  color: var(--muted);
  padding: 24px 8px;
}

.article-editor-form {
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.content-builder {
  border: 1px solid var(--stroke);
  border-radius: 14px;
  padding: 14px;
  background: #fffef9;
}

.content-builder-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.content-builder-head h3 {
  margin: 0;
}

.content-builder-actions {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}

.block-list {
  margin-top: 12px;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.content-block {
  border: 1px dashed var(--stroke);
  border-radius: 12px;
  padding: 12px;
  display: flex;
  flex-direction: column;
  gap: 8px;
  background: #fff;
}

.content-block-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}

.remove-block {
  border: 1px solid rgba(179, 66, 53, 0.4);
  background: rgba(179, 66, 53, 0.08);
  color: #932c22;
  padding: 6px 10px;
  border-radius: 999px;
  cursor: pointer;
  font: inherit;
}

.remove-block:hover {
  background: rgba(179, 66, 53, 0.16);
}

.review-table {
  width: 100%;
  border-collapse: collapse;
  margin-bottom: 16px;
}

.review-table td {
  border-bottom: 1px solid var(--stroke);
  padding: 8px 4px;
  vertical-align: top;
}

.review-table td:first-child {
  width: 220px;
  color: var(--muted);
}

.review-list {
  margin: 0 0 16px;
  padding-left: 18px;
}

.step .dot {
  width: 22px;
  height: 22px;
  border-radius: 50%;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: var(--bg-2);
  font-weight: 600;
  color: var(--brand-2);
}

.step.active {
  border-color: var(--brand);
  background: rgba(47, 91, 74, 0.08);
}

.step.active .dot {
  background: var(--brand);
  color: #fff;
}

@keyframes fadeUp {
  from {
    opacity: 0;
    transform: translateY(16px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@media (max-width: 900px) {
  .hero {
    grid-template-columns: 1fr;
  }
  .cards,
  .steps {
    grid-template-columns: 1fr;
  }
  .footer-cta {
    flex-direction: column;
    align-items: flex-start;
  }
  .stepper {
    grid-template-columns: 1fr;
  }
  .article-filter-bar {
    grid-template-columns: 1fr;
  }
  .filter-actions {
    justify-content: flex-start;
  }
  .admin-page-head {
    flex-direction: column;
    align-items: flex-start;
  }
  .table-actions {
    flex-direction: column;
    align-items: flex-start;
  }
}
