:root {
  color-scheme: light;
  --ink: #1f2522;
  --muted: #69716c;
  --line: #d8ded8;
  --paper: #fbfaf6;
  --panel: #ffffff;
  --green: #244c3a;
  --green-2: #e4eee7;
  --gold: #c9892f;
  --amber: #f7e5c2;
  --red: #a0392f;
  --shadow: 0 24px 60px rgba(29, 37, 34, 0.14);
  font-family: Inter, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

* {
  box-sizing: border-box;
}

[hidden] {
  display: none !important;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
}

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

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

.topbar {
  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(251, 250, 246, 0.92);
  border-bottom: 1px solid rgba(216, 222, 216, 0.8);
  backdrop-filter: blur(18px);
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  min-width: 190px;
}

.brand-mark {
  display: grid;
  width: 42px;
  height: 42px;
  place-items: center;
  border-radius: 50%;
  background: var(--green);
  color: #fff;
  font-weight: 800;
}

.brand strong,
.brand small {
  display: block;
}

.brand small,
.eyebrow,
.hint,
.choice small,
.addons small,
footer span {
  color: var(--muted);
}

nav {
  display: flex;
  gap: 8px;
}

nav a {
  padding: 10px 12px;
  border-radius: 999px;
  color: #3a433e;
  font-weight: 600;
}

nav a:hover {
  background: var(--green-2);
}

.hero {
  position: relative;
  display: grid;
  min-height: clamp(560px, 82vh, 760px);
  overflow: hidden;
}

.hero img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.hero-overlay {
  position: absolute;
  inset: 0;
  background:
    linear-gradient(90deg, rgba(20, 24, 21, 0.8), rgba(20, 24, 21, 0.35) 48%, rgba(20, 24, 21, 0.08)),
    linear-gradient(0deg, rgba(251, 250, 246, 0.12), transparent 22%);
}

.hero-content {
  position: relative;
  z-index: 1;
  align-self: center;
  max-width: 760px;
  padding: 88px clamp(20px, 5vw, 72px) 132px;
  color: #fff;
}

.eyebrow {
  margin: 0 0 12px;
  font-size: 0.78rem;
  font-weight: 800;
  letter-spacing: 0;
  text-transform: uppercase;
}

.hero .eyebrow {
  color: #f3d8a4;
}

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

h1 {
  max-width: 680px;
  margin-bottom: 18px;
  font-size: clamp(3.2rem, 8vw, 6.8rem);
  line-height: 0.96;
  letter-spacing: 0;
}

h2 {
  margin-bottom: 0;
  font-size: clamp(2rem, 4vw, 3.25rem);
  line-height: 1.05;
  letter-spacing: 0;
}

h3 {
  margin-bottom: 10px;
  font-size: 1.18rem;
}

.hero p:not(.eyebrow) {
  max-width: 600px;
  font-size: clamp(1.08rem, 2vw, 1.35rem);
  line-height: 1.55;
}

.hero-actions,
.button,
.quick-panel,
.builder-header,
.summary-top,
.summary-list div,
footer {
  display: flex;
  align-items: center;
}

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

.button {
  justify-content: center;
  gap: 10px;
  min-height: 48px;
  padding: 13px 18px;
  border: 0;
  border-radius: 8px;
  cursor: pointer;
  font-weight: 800;
}

.button svg {
  width: 19px;
  height: 19px;
}

.primary {
  background: var(--gold);
  color: #171410;
}

.primary:hover {
  background: #d79a44;
}

.secondary {
  background: rgba(255, 255, 255, 0.14);
  color: #fff;
  outline: 1px solid rgba(255, 255, 255, 0.42);
}

.wide {
  width: 100%;
}

.quick-panel {
  position: relative;
  z-index: 2;
  max-width: 1120px;
  margin: -76px auto 0;
  padding: 18px;
  gap: 10px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--panel);
  box-shadow: var(--shadow);
}

.quick-panel div {
  flex: 1;
  min-width: 150px;
  padding: 14px 18px;
  border-right: 1px solid var(--line);
}

.quick-panel div:last-child {
  border-right: 0;
}

.quick-panel span,
.quick-panel small,
.status-chip span,
.summary-top span {
  display: block;
  color: var(--muted);
  font-size: 0.86rem;
}

.quick-panel strong,
.status-chip strong {
  display: block;
  margin: 4px 0;
  font-size: 1.7rem;
}

.section,
.builder-shell,
.inquiry {
  max-width: 1180px;
  margin: 0 auto;
  padding: 96px clamp(18px, 4vw, 32px) 0;
}

.section-heading {
  max-width: 760px;
  margin-bottom: 32px;
}

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

.offer-card,
.summary,
.builder-form,
.inquiry-form {
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--panel);
}

.offer-card {
  padding: 26px;
}

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

.icon-wrap {
  display: grid;
  width: 46px;
  height: 46px;
  margin-bottom: 22px;
  place-items: center;
  border-radius: 8px;
  background: var(--green-2);
  color: var(--green);
}

.builder-shell {
  scroll-margin-top: 74px;
}

.builder-header {
  justify-content: space-between;
  gap: 18px;
  margin-bottom: 24px;
}

.status-chip {
  min-width: 220px;
  padding: 16px 18px;
  border-radius: 8px;
  background: var(--green);
  color: #fff;
}

.status-chip span {
  color: #dce8df;
}

.builder-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.55fr) minmax(300px, 0.8fr);
  gap: 22px;
  align-items: start;
}

.builder-form,
.inquiry-form {
  padding: clamp(18px, 3vw, 30px);
}

fieldset {
  min-width: 0;
  margin: 0 0 26px;
  padding: 0;
  border: 0;
}

legend {
  margin-bottom: 12px;
  font-weight: 800;
}

.segmented,
.field-row,
.choice-list,
.product-list,
.addons,
.inquiry-form {
  display: grid;
  gap: 12px;
}

.segmented {
  grid-template-columns: repeat(2, minmax(0, 1fr));
  padding: 4px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #f1f4ef;
}

.segmented input,
.choice input,
.product-choice input {
  position: absolute;
  opacity: 0;
}

.segmented span {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  min-height: 48px;
  border-radius: 6px;
  cursor: pointer;
  font-weight: 800;
}

.segmented input:checked + span {
  background: #fff;
  box-shadow: 0 8px 24px rgba(31, 37, 34, 0.1);
}

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

label {
  display: grid;
  gap: 8px;
  min-width: 0;
  font-weight: 700;
}

input,
select,
textarea {
  width: 100%;
  border: 1px solid #cbd3cc;
  border-radius: 8px;
  background: #fff;
  color: var(--ink);
}

input {
  min-height: 48px;
  padding: 0 12px;
}

select {
  min-height: 48px;
  padding: 0 38px 0 12px;
}

textarea {
  resize: vertical;
  padding: 12px;
  line-height: 1.5;
}

.hint {
  min-height: 20px;
  margin: 8px 0 0;
  font-size: 0.9rem;
}

.hint.error {
  color: var(--red);
  font-weight: 700;
}

.choice-list {
  grid-template-columns: 1fr;
}

.choice,
.product-choice {
  position: relative;
  grid-template-columns: minmax(0, 1fr);
  align-items: center;
  padding: 16px;
  border: 1px solid var(--line);
  border-radius: 8px;
  cursor: pointer;
}

.choice:has(input:checked),
.product-choice:has(input:checked) {
  border-color: var(--green);
  background: var(--green-2);
}

.choice strong,
.choice small,
.product-choice strong,
.product-choice small {
  display: block;
}

.product-choice small {
  margin-top: 4px;
  color: var(--muted);
  line-height: 1.45;
}

.choice em {
  color: var(--green);
  font-style: normal;
  font-weight: 800;
  white-space: nowrap;
}

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

.addons label {
  grid-template-columns: auto 1fr auto;
  align-items: center;
  min-height: 54px;
  padding: 0 14px;
  border: 1px solid var(--line);
  border-radius: 8px;
  cursor: pointer;
}

.addons input {
  width: 18px;
  min-height: 18px;
  accent-color: var(--green);
}

.full-field {
  grid-column: 1 / -1;
}

.summary {
  position: sticky;
  top: 94px;
  padding: 24px;
  box-shadow: 0 18px 44px rgba(31, 37, 34, 0.08);
}

.summary-top {
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 20px;
}

.summary-top strong {
  text-align: right;
}

.timeline {
  display: grid;
  gap: 14px;
  margin: 0 0 24px;
  padding: 0;
  list-style: none;
}

.timeline li {
  display: grid;
  grid-template-columns: 64px 1fr;
  gap: 14px;
  padding-bottom: 14px;
  border-bottom: 1px solid var(--line);
}

.timeline time {
  color: var(--gold);
  font-weight: 800;
}

.timeline strong,
.timeline span {
  display: block;
}

.timeline span {
  margin-top: 3px;
  color: var(--muted);
  line-height: 1.4;
}

.summary-list {
  display: grid;
  gap: 10px;
  margin: 0 0 20px;
}

.summary-list div {
  justify-content: space-between;
  gap: 16px;
}

.summary-list dt {
  color: var(--muted);
}

.summary-list dd {
  margin: 0;
  text-align: right;
  font-weight: 800;
}

.inquiry {
  padding-bottom: 86px;
}

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

.inquiry-form button {
  justify-self: start;
}

.form-status {
  align-self: center;
  margin: 0;
  color: var(--green);
  font-weight: 800;
}

footer {
  justify-content: space-between;
  gap: 20px;
  padding: 28px clamp(18px, 4vw, 56px);
  border-top: 1px solid var(--line);
  background: #eef2ec;
}

.admin-body {
  background: #f4f5f1;
}

.admin-body.auth-locked .topbar,
.admin-body.auth-locked .admin-page {
  display: none;
}

.admin-login-gate {
  display: grid;
  min-height: 100vh;
  place-items: center;
  padding: 24px;
  background:
    linear-gradient(0deg, rgba(31, 37, 34, 0.68), rgba(31, 37, 34, 0.68)),
    url("assets/brewery-hero.png") center / cover;
}

.admin-body:not(.auth-locked) .admin-login-gate {
  display: none;
}

.login-panel {
  display: grid;
  width: min(100%, 420px);
  gap: 14px;
  padding: 28px;
  border: 1px solid rgba(255, 255, 255, 0.26);
  border-radius: 8px;
  background: rgba(251, 250, 246, 0.96);
  box-shadow: var(--shadow);
}

.login-panel h1 {
  margin-bottom: 0;
  color: var(--ink);
  font-size: clamp(2.2rem, 8vw, 3.4rem);
}

.login-panel p:not(.eyebrow) {
  margin-bottom: 4px;
  color: var(--muted);
  line-height: 1.5;
}

.admin-page {
  max-width: 1360px;
  margin: 0 auto;
  padding: 38px clamp(18px, 4vw, 48px) 72px;
}

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

.admin-hero h1 {
  margin-bottom: 12px;
  color: var(--ink);
  font-size: clamp(2.4rem, 5vw, 4.8rem);
}

.admin-hero p:not(.eyebrow) {
  max-width: 720px;
  color: var(--muted);
  font-size: 1.1rem;
  line-height: 1.55;
}

.admin-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  justify-content: flex-end;
}

.secondary-dark,
.secondary-admin {
  background: var(--green);
  color: #fff;
}

.ghost-danger {
  background: #fff;
  color: var(--red);
  outline: 1px solid #e3c8c4;
}

.admin-layout {
  display: grid;
  grid-template-columns: 320px minmax(0, 1fr);
  gap: 22px;
  align-items: start;
}

.product-admin {
  margin-bottom: 22px;
}

.product-admin-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 340px;
  gap: 18px;
  align-items: start;
}

.product-form {
  display: grid;
  gap: 14px;
}

.option-builder {
  display: grid;
  gap: 12px;
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #f7f8f4;
}

.admin-card-header.compact {
  margin-bottom: 0;
}

.admin-card-header.compact h3 {
  margin: 0;
}

.product-option-rows {
  display: grid;
  gap: 10px;
}

.product-option-row {
  display: grid;
  grid-template-columns: minmax(170px, 1fr) minmax(120px, 0.6fr) minmax(120px, 0.6fr) 40px;
  gap: 10px;
  align-items: end;
}

.product-catalog-panel {
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--panel);
}

.product-catalog-list {
  display: grid;
  gap: 10px;
  padding: 12px;
}

.product-catalog-item {
  display: flex;
  align-items: start;
  justify-content: space-between;
  gap: 12px;
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #f7f8f4;
}

.product-catalog-item strong,
.product-catalog-item span,
.product-catalog-item small {
  display: block;
}

.product-catalog-item span,
.product-catalog-item small {
  margin-top: 4px;
  color: var(--muted);
  line-height: 1.4;
}

.catalog-actions {
  display: flex;
  gap: 6px;
}

.inquiry-list-panel,
.admin-card,
.metric-card {
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--panel);
}

.inquiry-list-panel {
  position: sticky;
  top: 92px;
  overflow: hidden;
}

.panel-heading,
.admin-card-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}

.panel-heading {
  padding: 18px;
  border-bottom: 1px solid var(--line);
}

.panel-heading span,
.metric-card span,
.source-text,
.calc-table small {
  color: var(--muted);
  font-size: 0.86rem;
}

.panel-heading strong {
  display: grid;
  min-width: 34px;
  height: 34px;
  place-items: center;
  border-radius: 50%;
  background: var(--green-2);
  color: var(--green);
}

.inquiry-list {
  display: grid;
  gap: 8px;
  max-height: 70vh;
  overflow: auto;
  padding: 12px;
}

.inquiry-list-item {
  display: grid;
  gap: 5px;
  width: 100%;
  padding: 14px;
  border: 1px solid transparent;
  border-radius: 8px;
  background: #f7f8f4;
  color: var(--ink);
  cursor: pointer;
  text-align: left;
}

.inquiry-list-item.active {
  border-color: var(--green);
  background: var(--green-2);
}

.inquiry-list-item span,
.inquiry-list-item small {
  color: var(--muted);
}

.empty-state {
  margin: 0;
  padding: 8px;
  color: var(--muted);
  line-height: 1.45;
}

.admin-workspace {
  display: grid;
  gap: 18px;
}

.admin-card {
  padding: clamp(18px, 3vw, 26px);
}

.admin-card-header {
  margin-bottom: 18px;
}

.admin-card h2 {
  font-size: clamp(1.45rem, 3vw, 2.1rem);
}

.status-pill {
  padding: 8px 12px;
  border-radius: 999px;
  background: var(--green-2);
  color: var(--green);
  font-weight: 800;
}

.request-grid {
  display: grid;
  grid-template-columns: minmax(220px, 0.7fr) minmax(0, 1fr);
  gap: 18px;
}

.request-grid dl {
  display: grid;
  gap: 12px;
  margin: 0;
}

.request-grid dt {
  color: var(--muted);
  font-size: 0.86rem;
}

.request-grid dd {
  margin: 2px 0 0;
  font-weight: 800;
}

.pricing-controls {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px;
  margin-bottom: 18px;
}

.table-wrap {
  overflow-x: auto;
  margin-bottom: 14px;
}

.calc-table {
  width: 100%;
  min-width: 860px;
  border-collapse: collapse;
}

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

.calc-table th {
  color: var(--muted);
  font-size: 0.82rem;
  text-transform: uppercase;
}

.calc-table input {
  min-height: 40px;
}

.icon-button {
  display: grid;
  width: 38px;
  height: 38px;
  place-items: center;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
  color: var(--red);
  cursor: pointer;
}

.icon-button svg {
  width: 17px;
  height: 17px;
}

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

.metric-card {
  padding: 20px;
}

.metric-card strong {
  display: block;
  margin: 6px 0;
  color: var(--green);
  font-size: clamp(1.6rem, 3vw, 2.2rem);
}

.metric-card small {
  color: var(--muted);
}

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

  nav {
    width: 100%;
    overflow-x: auto;
    padding-bottom: 2px;
  }

  .quick-panel,
  .offer-grid,
  .builder-grid,
  .field-row,
  .inquiry-form,
  .admin-layout,
  .product-admin-grid,
  .product-option-row,
  .request-grid,
  .pricing-controls,
  .admin-summary-grid {
    grid-template-columns: 1fr;
  }

  .quick-panel {
    display: grid;
    margin: -58px 18px 0;
  }

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

  .quick-panel div:last-child {
    border-bottom: 0;
  }

  .offer-grid,
  .builder-grid {
    display: grid;
  }

  .summary {
    position: static;
  }

  .admin-hero {
    align-items: stretch;
    flex-direction: column;
  }

  .admin-actions {
    justify-content: flex-start;
  }

  .inquiry-list-panel {
    position: static;
  }
}

@media (max-width: 640px) {
  .hero {
    min-height: 650px;
  }

  .hero-overlay {
    background: linear-gradient(0deg, rgba(20, 24, 21, 0.88), rgba(20, 24, 21, 0.34));
  }

  .hero-content {
    align-self: end;
    padding: 72px 20px 116px;
  }

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

  .builder-header,
  footer {
    align-items: stretch;
    flex-direction: column;
  }

  .status-chip {
    min-width: 0;
  }

  .addons,
  .segmented {
    grid-template-columns: 1fr;
  }

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

  .choice em {
    margin-top: 6px;
  }
}
