:root {
  --ink: #17211d;
  --muted: #66716b;
  --paper: #fbfaf6;
  --line: #d8ddd5;
  --sage: #49685a;
  --cedar: #9b5f38;
  --cream: #f2eadc;
  --gold: #c99b4e;
  --white: #ffffff;
  --shadow: 0 18px 45px rgba(23, 33, 29, 0.14);
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

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

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

button,
input,
textarea {
  font: inherit;
}

.site-hero {
  position: relative;
  min-height: 92vh;
  overflow: hidden;
  display: grid;
  align-items: center;
}

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

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

.hero-shade {
  background:
    linear-gradient(90deg, rgba(15, 24, 20, 0.78) 0%, rgba(15, 24, 20, 0.46) 42%, rgba(15, 24, 20, 0.08) 100%),
    linear-gradient(0deg, rgba(15, 24, 20, 0.32), transparent 38%);
}

.topbar {
  position: absolute;
  z-index: 2;
  top: 0;
  left: 0;
  right: 0;
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 24px clamp(20px, 5vw, 72px);
  color: var(--white);
}

.brand {
  font-weight: 750;
  letter-spacing: 0;
}

.nav-links {
  display: flex;
  gap: 24px;
  font-size: 0.95rem;
}

.hero-copy {
  position: relative;
  z-index: 1;
  width: min(680px, calc(100% - 40px));
  margin-left: clamp(20px, 7vw, 96px);
  padding-top: 56px;
  color: var(--white);
}

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

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

h1 {
  margin-bottom: 18px;
  font-size: clamp(3.6rem, 9vw, 7.8rem);
  line-height: 0.95;
  letter-spacing: 0;
}

h2 {
  margin-bottom: 12px;
  font-size: clamp(2rem, 4vw, 3.8rem);
  line-height: 1.08;
  letter-spacing: 0;
}

h3 {
  margin-bottom: 8px;
  font-size: 1.08rem;
}

.hero-text {
  max-width: 560px;
  color: rgba(255, 255, 255, 0.88);
  font-size: clamp(1rem, 2vw, 1.2rem);
}

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

.primary-action,
.secondary-action {
  display: inline-flex;
  align-items: center;
  min-height: 46px;
  padding: 0 18px;
  border-radius: 6px;
  font-weight: 760;
}

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

.secondary-action {
  border: 1px solid rgba(255, 255, 255, 0.58);
  color: var(--white);
}

.dark-action {
  border: 0;
  background: var(--sage);
  color: var(--white);
  cursor: pointer;
}

.light-action {
  border-color: var(--line);
  color: var(--ink);
}

.intro-band {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1px;
  background: var(--line);
  border-bottom: 1px solid var(--line);
}

.metric {
  min-height: 132px;
  padding: 28px clamp(18px, 4vw, 44px);
  background: var(--paper);
}

.metric strong {
  display: block;
  color: var(--sage);
  font-size: clamp(1.8rem, 3vw, 2.8rem);
  line-height: 1;
}

.metric span {
  display: block;
  margin-top: 12px;
  color: var(--muted);
}

.content-section {
  width: min(1180px, calc(100% - 40px));
  margin: 0 auto;
  padding: clamp(64px, 9vw, 112px) 0;
}

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

.section-kicker {
  max-width: 420px;
  margin-bottom: 0;
  color: var(--muted);
}

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

.search-box {
  display: grid;
  gap: 8px;
  min-width: min(420px, 100%);
  color: var(--muted);
  font-size: 0.9rem;
  font-weight: 700;
}

.search-box input,
.select-filters select,
.note-form input,
.note-form textarea {
  width: 100%;
  border: 1px solid var(--line);
  border-radius: 6px;
  background: var(--white);
  color: var(--ink);
  outline: none;
}

.search-box input {
  min-height: 48px;
  padding: 0 14px;
}

.search-box input:focus,
.select-filters select:focus,
.note-form input:focus,
.note-form textarea:focus {
  border-color: var(--sage);
  box-shadow: 0 0 0 3px rgba(73, 104, 90, 0.16);
}

.select-filters {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
  justify-content: flex-end;
}

.select-filters label {
  display: grid;
  gap: 8px;
  min-width: 160px;
  color: var(--muted);
  font-size: 0.9rem;
  font-weight: 700;
}

.select-filters select {
  min-height: 48px;
  padding: 0 38px 0 12px;
  appearance: none;
  background-image:
    linear-gradient(45deg, transparent 50%, var(--sage) 50%),
    linear-gradient(135deg, var(--sage) 50%, transparent 50%);
  background-position:
    calc(100% - 18px) 21px,
    calc(100% - 12px) 21px;
  background-size:
    6px 6px,
    6px 6px;
  background-repeat: no-repeat;
}

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

.cafe-card {
  display: grid;
  gap: 16px;
  min-height: 420px;
  padding: 22px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--white);
  box-shadow: 0 8px 24px rgba(23, 33, 29, 0.06);
}

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

.score {
  display: grid;
  place-items: center;
  flex: 0 0 58px;
  width: 58px;
  height: 58px;
  border-radius: 50%;
  background: var(--cream);
  color: var(--cedar);
  font-weight: 850;
}

.cafe-card h3 {
  margin-bottom: 2px;
  font-size: 1.38rem;
}

.location {
  color: var(--muted);
  font-size: 0.92rem;
}

.tags {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.tags span {
  border-radius: 999px;
  background: #edf1ea;
  color: #394940;
  padding: 4px 9px;
  font-size: 0.82rem;
  font-weight: 700;
}

.note {
  color: #334039;
}

.details {
  display: grid;
  gap: 8px;
  margin-top: auto;
  color: var(--muted);
  font-size: 0.92rem;
}

.details b {
  color: var(--ink);
}

.split-section {
  display: grid;
  grid-template-columns: minmax(260px, 0.8fr) minmax(0, 1.2fr);
  gap: clamp(28px, 6vw, 72px);
  align-items: start;
}

.section-copy {
  color: var(--muted);
  max-width: 440px;
}

.rubric-list {
  display: grid;
  gap: 12px;
}

.rubric-list article {
  display: grid;
  grid-template-columns: 48px 1fr;
  gap: 12px 18px;
  padding: 20px 0;
  border-bottom: 1px solid var(--line);
}

.rubric-list span {
  color: var(--cedar);
  font-weight: 850;
}

.rubric-list h3,
.rubric-list p {
  grid-column: 2;
}

.rubric-list p {
  margin-bottom: 0;
  color: var(--muted);
}

.note-form {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 16px;
  padding: 24px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--white);
  box-shadow: var(--shadow);
}

.note-form label {
  display: grid;
  gap: 8px;
  color: var(--muted);
  font-size: 0.9rem;
  font-weight: 760;
}

.note-form label:nth-last-child(-n + 2) {
  grid-column: 1 / -1;
}

.note-form input {
  min-height: 46px;
  padding: 0 12px;
}

.note-form textarea {
  min-height: 118px;
  resize: vertical;
  padding: 12px;
}

.publish-band {
  display: grid;
  grid-template-columns: minmax(280px, 0.8fr) minmax(0, 1fr);
  gap: clamp(24px, 5vw, 64px);
  align-items: center;
  padding: clamp(56px, 8vw, 86px) clamp(20px, 7vw, 96px);
  background: #18241f;
  color: var(--white);
}

.publish-band p {
  max-width: 560px;
  color: rgba(255, 255, 255, 0.78);
}

.publish-steps {
  margin: 0;
  padding-left: 22px;
  color: rgba(255, 255, 255, 0.86);
}

.publish-steps li + li {
  margin-top: 12px;
}

footer {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  padding: 24px clamp(20px, 5vw, 72px);
  color: var(--muted);
}

.admin-page {
  background: #f7f8f4;
}

.admin-header {
  padding: 24px clamp(20px, 5vw, 72px) 42px;
  background: #18241f;
  color: var(--white);
}

.admin-nav {
  display: flex;
  justify-content: space-between;
  gap: 18px;
  align-items: center;
}

.admin-title {
  width: min(820px, 100%);
  padding-top: clamp(56px, 8vw, 96px);
}

.admin-title h1 {
  margin-bottom: 14px;
  font-size: clamp(3rem, 7vw, 6rem);
}

.admin-title p:last-child {
  max-width: 680px;
  color: rgba(255, 255, 255, 0.78);
}

.admin-main {
  display: grid;
  grid-template-columns: minmax(320px, 0.9fr) minmax(0, 1.1fr);
  gap: 22px;
  width: min(1220px, calc(100% - 40px));
  margin: 0 auto;
  padding: clamp(36px, 6vw, 72px) 0;
}

.admin-panel {
  align-self: start;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--white);
  box-shadow: 0 10px 28px rgba(23, 33, 29, 0.08);
  padding: 22px;
}

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

.panel-heading h2 {
  font-size: clamp(1.65rem, 3vw, 2.4rem);
}

.text-button {
  border: 0;
  background: transparent;
  color: var(--sage);
  cursor: pointer;
  font-weight: 800;
}

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

.admin-form label {
  display: grid;
  gap: 7px;
  color: var(--muted);
  font-size: 0.9rem;
  font-weight: 760;
}

.admin-form label:nth-last-of-type(-n + 2),
.form-actions {
  grid-column: 1 / -1;
}

.admin-form input,
.admin-form textarea {
  width: 100%;
  border: 1px solid var(--line);
  border-radius: 6px;
  background: var(--white);
  color: var(--ink);
  outline: none;
}

.admin-form input {
  min-height: 44px;
  padding: 0 12px;
}

.admin-form textarea {
  min-height: 100px;
  padding: 12px;
  resize: vertical;
}

.admin-form input:focus,
.admin-form textarea:focus {
  border-color: var(--sage);
  box-shadow: 0 0 0 3px rgba(73, 104, 90, 0.16);
}

.form-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 4px;
}

.record-count {
  color: var(--muted);
  font-weight: 800;
}

.admin-list {
  display: grid;
  gap: 12px;
}

.admin-record {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 16px;
  align-items: center;
  padding: 16px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fbfaf6;
}

.admin-record h3 {
  margin-bottom: 2px;
  font-size: 1.12rem;
}

.admin-record p {
  margin-bottom: 3px;
  color: var(--muted);
  font-size: 0.92rem;
}

.admin-record-actions {
  display: flex;
  gap: 8px;
}

.admin-record-actions button {
  min-height: 36px;
  border: 1px solid var(--line);
  border-radius: 6px;
  background: var(--white);
  color: var(--ink);
  cursor: pointer;
  font-weight: 760;
  padding: 0 12px;
}

.admin-record-actions button[data-action="delete"] {
  color: #9b3328;
}

@media (max-width: 860px) {
  .site-hero {
    min-height: 86vh;
  }

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

  .hero-copy {
    margin: 0 auto;
    padding-top: 100px;
  }

  .intro-band,
  .cafe-grid,
  .split-section,
  .note-form,
  .publish-band,
  .admin-main,
  .admin-form {
    grid-template-columns: 1fr;
  }

  .select-filters {
    justify-content: flex-start;
    width: 100%;
  }

  .select-filters label {
    min-width: min(220px, 100%);
    flex: 1;
  }

  .admin-nav,
  .panel-heading,
  .admin-record {
    align-items: flex-start;
    grid-template-columns: 1fr;
  }
}

@media (max-width: 520px) {
  .nav-links {
    gap: 14px;
  }

  h1 {
    font-size: 3.25rem;
  }

  .hero-actions a {
    width: 100%;
    justify-content: center;
  }

  .cafe-card {
    min-height: auto;
  }
}
