@font-face {
  font-family: "Cabinet";
  src: url("../../assets/fonts/CabinetGrotesk-Regular.ttf") format("truetype");
  font-weight: 400;
}

@font-face {
  font-family: "Cabinet";
  src: url("../../assets/fonts/CabinetGrotesk-Medium.ttf") format("truetype");
  font-weight: 500;
}

@font-face {
  font-family: "Cabinet";
  src: url("../../assets/fonts/CabinetGrotesk-Bold.ttf") format("truetype");
  font-weight: 800;
}

:root {
  --paper: #f6e5bd;
  --paper-soft: #fff0cc;
  --ink: #051900;
  --leaf: #223d1b;
  --moss: #748154;
  --clay: #bf602c;
  --rose: #e6a18d;
  --gold: #e8c46f;
  --line: rgba(5, 25, 0, 0.18);
  --white: #fffaf0;
  --shadow: 0 22px 70px rgba(55, 35, 10, 0.14);
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  color: var(--ink);
  background:
    linear-gradient(90deg, rgba(5, 25, 0, 0.05) 1px, transparent 1px) 0 0 / 72px 72px,
    linear-gradient(115deg, rgba(191, 96, 44, 0.18), transparent 38%, rgba(116, 129, 84, 0.18)),
    var(--paper);
  font-family: "Cabinet", Arial, sans-serif;
}

button,
input,
select {
  font: inherit;
}

.topbar {
  position: sticky;
  top: 0;
  z-index: 10;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  padding: 18px 28px;
  border-bottom: 1px solid var(--line);
  background: rgba(246, 229, 189, 0.9);
  backdrop-filter: blur(14px);
}

.brand img {
  display: block;
  width: min(320px, 48vw);
  height: auto;
}

.nav {
  display: flex;
  gap: 18px;
  text-transform: uppercase;
  font-weight: 800;
  font-size: 13px;
}

.nav a {
  color: var(--ink);
  text-decoration: none;
}

main {
  width: min(1440px, 100%);
  margin: 0 auto;
}

.intro {
  position: relative;
  overflow: hidden;
  display: grid;
  grid-template-columns: minmax(0, 1.2fr) minmax(320px, 0.8fr);
  gap: 32px;
  align-items: end;
  min-height: 380px;
  padding: 64px 28px 42px;
  color: var(--white);
  background:
    linear-gradient(90deg, rgba(5, 25, 0, 0.52), rgba(5, 25, 0, 0.12)),
    url("../../assets/images/portfolio-cover.png") center / cover;
}

.intro > * {
  position: relative;
  z-index: 1;
}

.kicker,
.section-number {
  margin: 0 0 10px;
  color: var(--clay);
  text-transform: uppercase;
  font-weight: 800;
  font-size: 12px;
}

h1,
h2 {
  margin: 0;
  font-weight: 800;
  line-height: 0.95;
}

h1 {
  max-width: 900px;
  font-size: clamp(46px, 7vw, 96px);
}

h2 {
  font-size: 28px;
  text-transform: uppercase;
}

.project-meta,
.fields {
  display: grid;
  gap: 14px;
}

.project-meta {
  grid-template-columns: 1fr;
}

.workspace {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 380px;
  gap: 22px;
  align-items: start;
  padding: 0 28px 36px;
}

.quote-form {
  display: grid;
  gap: 18px;
}

.panel,
.summary-card,
.summary-lines {
  background: rgba(255, 250, 240, 0.72);
  border: 1px solid var(--line);
  box-shadow: var(--shadow);
  backdrop-filter: blur(10px);
}

.panel {
  padding: 24px;
}

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

.panel-head p {
  max-width: 760px;
  margin: 10px 0 0;
  color: rgba(5, 25, 0, 0.68);
  font-size: 18px;
  line-height: 1.3;
}

.info-button,
.close-dialog {
  display: inline-grid;
  place-items: center;
  width: 32px;
  height: 32px;
  border: 1px solid var(--ink);
  border-radius: 999px;
  color: var(--ink);
  background: transparent;
  cursor: pointer;
  font-weight: 800;
}

.option-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(190px, 1fr));
  gap: 12px;
  margin-bottom: 18px;
}

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

.service-tab {
  display: grid;
  gap: 10px;
  min-height: 170px;
  padding: 18px;
  border: 1px solid var(--line);
  color: var(--ink);
  background: rgba(255, 240, 203, 0.62);
  cursor: pointer;
  text-align: left;
}

.service-tab span {
  color: var(--clay);
  font-size: 12px;
  font-weight: 800;
}

.service-tab strong {
  font-size: 24px;
  line-height: 1;
  text-transform: uppercase;
}

.service-tab small {
  color: rgba(5, 25, 0, 0.68);
  line-height: 1.25;
}

.service-tab.active {
  color: var(--white);
  background: linear-gradient(145deg, var(--ink), var(--leaf));
}

.service-tab.active span,
.service-tab.active small {
  color: rgba(255, 250, 240, 0.72);
}

.choice,
.toggle {
  cursor: pointer;
}

.choice {
  display: grid;
  gap: 10px;
  min-height: 132px;
  padding: 16px;
  border: 1px solid var(--line);
  background: rgba(255, 240, 203, 0.52);
}

.choice input {
  width: 18px;
  height: 18px;
  accent-color: var(--leaf);
}

.choice span {
  font-weight: 800;
  text-transform: uppercase;
}

.choice small,
.summary-card small,
.line-item small {
  color: rgba(5, 25, 0, 0.66);
}

.choice:has(input:checked) {
  color: var(--white);
  background: linear-gradient(145deg, var(--leaf), #526139);
}

.choice:has(input:checked) small {
  color: rgba(255, 250, 240, 0.76);
}

.addon-groups {
  display: grid;
  gap: 18px;
}

.addon-group {
  display: grid;
  gap: 12px;
  padding-top: 8px;
  border-top: 1px solid var(--line);
}

.addon-group h3 {
  margin: 0;
  color: var(--clay);
  font-size: 13px;
  font-weight: 800;
  text-transform: uppercase;
}

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

.addon-card {
  position: relative;
  display: grid;
  align-content: start;
  gap: 10px;
  min-height: 174px;
  padding: 16px;
  border: 1px solid var(--line);
  background: rgba(255, 250, 240, 0.7);
}

.addon-card.selected {
  color: var(--white);
  border-color: var(--leaf);
  background: linear-gradient(145deg, var(--leaf), #526139);
}

.addon-card.blocked {
  opacity: 0.46;
}

.addon-card.blocked::after {
  content: attr(data-blocked-by);
  position: absolute;
  inset: auto 12px 12px;
  padding: 7px 9px;
  color: var(--paper);
  background: var(--clay);
  font-size: 12px;
  font-weight: 800;
  text-transform: uppercase;
}

.addon-toggle {
  display: flex;
  grid-template-columns: auto 1fr;
  align-items: start;
  gap: 10px;
  cursor: pointer;
}

.addon-toggle input {
  width: 18px;
  min-height: 18px;
  margin-top: 2px;
  accent-color: var(--leaf);
}

.addon-toggle span {
  font-weight: 800;
  line-height: 1;
  text-transform: uppercase;
}

.addon-card p {
  margin: 0;
  color: rgba(5, 25, 0, 0.64);
  line-height: 1.25;
}

.addon-card.selected p,
.addon-card.selected .qty-control {
  color: rgba(255, 250, 240, 0.76);
}

.addon-card strong {
  margin-top: auto;
}

.qty-control {
  display: grid;
  gap: 6px;
  margin-top: 4px;
  color: rgba(5, 25, 0, 0.68);
  font-size: 13px;
  text-transform: uppercase;
}

.qty-control input {
  min-height: 40px;
}

.qty-control:not(.active) {
  opacity: 0.5;
}

.current-total {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  margin-top: 22px;
  padding: 16px 0 0;
  border-top: 1px solid var(--line);
  text-transform: uppercase;
  font-weight: 800;
}

.current-total strong {
  font-size: 34px;
  line-height: 1;
}

.service-actions {
  margin-top: 14px;
}

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

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

label {
  display: grid;
  gap: 8px;
  font-weight: 800;
}

input,
select {
  width: 100%;
  min-height: 48px;
  border: 1px solid var(--line);
  border-radius: 999px;
  color: var(--ink);
  background: var(--white);
  padding: 10px 12px;
}

input:focus,
select:focus,
button:focus {
  outline: 2px solid var(--clay);
  outline-offset: 2px;
}

.switch-row {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin: 18px 0;
}

.toggle {
  display: inline-flex;
  align-items: center;
  min-height: 42px;
  gap: 10px;
  padding: 9px 14px;
  border: 1px solid var(--line);
  background: var(--paper-soft);
  font-weight: 800;
  text-transform: uppercase;
  font-size: 13px;
}

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

.toggle:has(input:checked) {
  color: var(--white);
  border-color: var(--leaf);
  background: var(--leaf);
}

.muted-field {
  opacity: 0.55;
}

.muted-field.active {
  opacity: 1;
}

.summary {
  position: sticky;
  top: 92px;
  display: grid;
  gap: 14px;
}

.summary-card {
  padding: 22px;
  color: var(--white);
  background:
    linear-gradient(145deg, rgba(5, 25, 0, 0.92), rgba(34, 61, 27, 0.94)),
    url("../../assets/images/portfolio-cover.png") center / cover;
}

.summary-card .kicker {
  color: var(--rose);
}

.summary-card strong {
  display: block;
  margin-bottom: 8px;
  font-size: 46px;
  line-height: 1;
}

.summary-card code {
  color: var(--paper);
}

.summary-lines {
  display: grid;
  gap: 10px;
  padding: 0;
  overflow: hidden;
}

.line-item {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 10px;
  padding: 14px 16px;
  background: rgba(255, 250, 240, 0.72);
}

.line-item.compact {
  box-shadow: none;
}

.line-item.subtotal {
  background: rgba(5, 25, 0, 0.08);
  font-weight: 800;
}

.line-item strong {
  text-align: right;
}

.actions {
  display: grid;
  grid-template-columns: 1fr 0.8fr;
  gap: 10px;
}

.actions button {
  min-height: 48px;
  border: 1px solid var(--ink);
  border-radius: 999px;
  color: var(--white);
  background: var(--ink);
  cursor: pointer;
  font-weight: 800;
  text-transform: uppercase;
}

.actions .secondary {
  color: var(--ink);
  background: transparent;
}

.quote-block {
  display: grid;
  gap: 1px;
  overflow: hidden;
  border: 1px solid var(--line);
  background: var(--line);
}

.quote-block.draft {
  border-style: dashed;
}

.quote-block-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding: 12px 14px;
  color: var(--white);
  background: var(--ink);
  font-weight: 800;
  text-transform: uppercase;
}

.quote-block.draft .quote-block-head {
  color: var(--ink);
  background: var(--rose);
}

.quote-block-head button {
  display: inline-grid;
  place-items: center;
  width: 28px;
  height: 28px;
  border: 1px solid currentColor;
  border-radius: 999px;
  color: inherit;
  background: transparent;
  cursor: pointer;
  font-weight: 800;
}

dialog {
  width: min(520px, calc(100% - 34px));
  border: 1px solid var(--ink);
  color: var(--ink);
  background: var(--paper);
  box-shadow: var(--shadow);
  padding: 26px;
}

dialog::backdrop {
  background: rgba(5, 25, 0, 0.45);
}

.close-dialog {
  margin-left: auto;
}

#infoText {
  margin: 20px 0 0;
  font-size: 20px;
  line-height: 1.28;
}

@media (max-width: 980px) {
  .intro,
  .workspace {
    grid-template-columns: 1fr;
  }

  .summary {
    position: static;
  }

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

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

  .intro,
  .workspace {
    padding-left: 16px;
    padding-right: 16px;
  }

  .option-grid,
  .service-tabs,
  .addon-grid,
  .two-cols,
  .three-cols,
  .actions {
    grid-template-columns: 1fr;
  }

  h1 {
    font-size: 44px;
  }
}
