@import url("https://fonts.googleapis.com/css2?family=DM+Sans:wght@400;500;600;700&family=Playfair+Display:wght@600;700&display=swap");

:root {
  --color-cream: #f7f2ea;
  --color-warm-white: #fffdf9;
  --color-sand: #e8ddce;
  --color-taupe: #b8a58e;
  --color-copper: #b66a3c;
  --color-copper-dark: #8e4d2d;
  --color-espresso: #2f241f;
  --color-brown: #5a463b;
  --color-stone: #7d746e;
  --color-border: #dfd4c7;
  --color-success: #59725b;
  --color-shadow: rgba(47, 36, 31, 0.12);

  --font-body: "DM Sans", Arial, sans-serif;
  --font-heading: "Playfair Display", Georgia, serif;

  --radius-small: 10px;
  --radius-medium: 16px;
  --radius-large: 24px;

  --shadow-soft: 0 10px 30px rgba(47, 36, 31, 0.08);
  --shadow-card: 0 18px 50px rgba(47, 36, 31, 0.12);
}

* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  scroll-behavior: smooth;
}

body {
  min-height: 100vh;
  background:
    radial-gradient(circle at top left, rgba(182, 106, 60, 0.08), transparent 32%),
    linear-gradient(180deg, #f9f5ef 0%, #f3ede5 100%);
  color: var(--color-espresso);
  font-family: var(--font-body);
  line-height: 1.6;
}

button,
input,
select {
  font: inherit;
}

button {
  cursor: pointer;
}

input,
select {
  width: 100%;
}

.app-shell {
  width: min(1480px, calc(100% - 32px));
  margin: 32px auto;
  overflow: hidden;
  background: var(--color-warm-white);
  border: 1px solid rgba(223, 212, 199, 0.9);
  border-radius: 30px;
  box-shadow: 0 24px 70px rgba(47, 36, 31, 0.14);
}

.hero-section {
  position: relative;
  display: grid;
  grid-template-columns: minmax(0, 1.45fr) minmax(300px, 0.55fr);
  gap: 48px;
  align-items: center;
  min-height: 430px;
  padding: 72px;
  overflow: hidden;
  background:
    linear-gradient(135deg, rgba(47, 36, 31, 0.98), rgba(76, 55, 44, 0.96)),
    var(--color-espresso);
  color: #fff;
}

.hero-section::before {
  content: "";
  position: absolute;
  top: -160px;
  right: -90px;
  width: 440px;
  height: 440px;
  border-radius: 50%;
  background: rgba(182, 106, 60, 0.22);
  filter: blur(2px);
}

.hero-section::after {
  content: "";
  position: absolute;
  bottom: -180px;
  left: 35%;
  width: 380px;
  height: 380px;
  border-radius: 50%;
  background: rgba(255, 253, 249, 0.06);
}

.hero-content,
.hero-visual {
  position: relative;
  z-index: 1;
}

.hero-badge {
  display: inline-flex;
  align-items: center;
  gap: 9px;
  margin-bottom: 22px;
  padding: 9px 14px;
  border: 1px solid rgba(255, 255, 255, 0.18);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.08);
  color: #f5d7c4;
  font-size: 0.84rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.hero-badge-icon {
  color: #d89061;
  font-size: 0.72rem;
}

.hero-section h1 {
  max-width: 850px;
  font-family: var(--font-heading);
  font-size: clamp(3rem, 6vw, 5.8rem);
  line-height: 0.98;
  letter-spacing: -0.035em;
}

.hero-subheading {
  max-width: 790px;
  margin-top: 26px;
  color: rgba(255, 255, 255, 0.78);
  font-size: 1.12rem;
}

.hero-highlights {
  display: flex;
  flex-wrap: wrap;
  gap: 14px 24px;
  margin-top: 30px;
}

.hero-highlight {
  display: flex;
  align-items: center;
  gap: 9px;
  color: rgba(255, 255, 255, 0.88);
  font-size: 0.94rem;
  font-weight: 600;
}

.highlight-icon {
  display: grid;
  place-items: center;
  width: 22px;
  height: 22px;
  border-radius: 50%;
  background: rgba(216, 144, 97, 0.18);
  color: #f3b58c;
  font-size: 0.78rem;
}

.hero-visual {
  display: flex;
  justify-content: flex-end;
}

.hero-visual-card {
  width: min(100%, 350px);
  padding: 32px;
  border: 1px solid rgba(255, 255, 255, 0.15);
  border-radius: var(--radius-large);
  background:
    linear-gradient(145deg, rgba(255, 255, 255, 0.13), rgba(255, 255, 255, 0.05));
  box-shadow: 0 26px 70px rgba(0, 0, 0, 0.2);
  backdrop-filter: blur(12px);
}

.visual-card-label {
  display: block;
  margin-bottom: 12px;
  color: #e8b08a;
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
}

.hero-visual-card strong {
  display: block;
  font-family: var(--font-heading);
  font-size: 2rem;
  line-height: 1.2;
}

.estimator-layout {
  display: grid;
  grid-template-columns: minmax(0, 1.55fr) minmax(350px, 0.75fr);
  gap: 32px;
  align-items: start;
  padding: 48px;
  background: var(--color-cream);
}

.form-panel,
.results-panel-inner {
  background: var(--color-warm-white);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-large);
  box-shadow: var(--shadow-soft);
}

.form-panel {
  padding: 34px;
}

.panel-heading {
  display: flex;
  justify-content: space-between;
  gap: 30px;
  align-items: end;
  padding-bottom: 28px;
  border-bottom: 1px solid var(--color-border);
}

.section-eyebrow {
  display: inline-block;
  margin-bottom: 7px;
  color: var(--color-copper);
  font-size: 0.76rem;
  font-weight: 800;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.panel-heading h2,
.results-header h2 {
  font-family: var(--font-heading);
  font-size: clamp(1.9rem, 3vw, 2.7rem);
  line-height: 1.15;
}

.panel-heading > p {
  max-width: 360px;
  color: var(--color-stone);
  font-size: 0.96rem;
}

.form-section {
  padding: 34px 0;
  border-bottom: 1px solid var(--color-border);
}

.section-heading {
  display: flex;
  gap: 16px;
  align-items: flex-start;
  margin-bottom: 26px;
}

.section-number {
  display: grid;
  place-items: center;
  flex: 0 0 42px;
  width: 42px;
  height: 42px;
  border-radius: 12px;
  background: #efe1d5;
  color: var(--color-copper-dark);
  font-size: 0.82rem;
  font-weight: 800;
}

.section-heading h3 {
  font-family: var(--font-heading);
  font-size: 1.55rem;
  line-height: 1.2;
}

.section-heading p {
  margin-top: 3px;
  color: var(--color-stone);
  font-size: 0.93rem;
}

.field-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 22px;
}

.form-group {
  min-width: 0;
}

.form-group label:not(.checkbox-card) {
  display: block;
  margin-bottom: 9px;
  color: var(--color-brown);
  font-size: 0.88rem;
  font-weight: 700;
}

.required-mark {
  color: var(--color-copper);
}

input[type="number"],
select {
  min-height: 52px;
  padding: 0 15px;
  border: 1px solid #d8cdc0;
  border-radius: var(--radius-small);
  outline: none;
  background: #fff;
  color: var(--color-espresso);
  font-weight: 600;
  transition:
    border-color 0.2s ease,
    box-shadow 0.2s ease,
    transform 0.2s ease;
}

select {
  appearance: none;
  background-image:
    linear-gradient(45deg, transparent 50%, var(--color-brown) 50%),
    linear-gradient(135deg, var(--color-brown) 50%, transparent 50%);
  background-position:
    calc(100% - 20px) 50%,
    calc(100% - 14px) 50%;
  background-size: 6px 6px, 6px 6px;
  background-repeat: no-repeat;
  padding-right: 42px;
}

input[type="number"]:focus,
select:focus {
  border-color: var(--color-copper);
  box-shadow: 0 0 0 4px rgba(182, 106, 60, 0.12);
}

input[type="number"]:hover,
select:hover {
  border-color: #c7b5a5;
}

.input-with-suffix {
  position: relative;
}

.input-with-suffix input {
  padding-right: 84px;
}

.input-suffix {
  position: absolute;
  top: 50%;
  right: 14px;
  transform: translateY(-50%);
  color: var(--color-stone);
  font-size: 0.8rem;
  font-weight: 700;
  pointer-events: none;
}

.field-help {
  display: block;
  margin-top: 7px;
  color: #8f847d;
  font-size: 0.78rem;
  line-height: 1.45;
}

.checkbox-field {
  display: flex;
  align-items: end;
}

.checkbox-card,
.service-card,
.option-card {
  position: relative;
  cursor: pointer;
}

.checkbox-card {
  display: flex;
  width: 100%;
  min-height: 92px;
  gap: 13px;
  align-items: flex-start;
  padding: 17px;
  border: 1px solid var(--color-border);
  border-radius: var(--radius-medium);
  background: #fffaf5;
  transition:
    border-color 0.2s ease,
    background 0.2s ease,
    transform 0.2s ease,
    box-shadow 0.2s ease;
}

.checkbox-card:hover,
.service-card:hover,
.option-card:hover {
  transform: translateY(-2px);
  border-color: #cda98f;
  box-shadow: 0 8px 22px rgba(47, 36, 31, 0.07);
}

.checkbox-card input,
.service-card input,
.option-card input {
  position: absolute;
  opacity: 0;
  pointer-events: none;
}

.custom-checkbox {
  position: relative;
  display: grid;
  place-items: center;
  flex: 0 0 22px;
  width: 22px;
  height: 22px;
  margin-top: 1px;
  border: 2px solid #baa99b;
  border-radius: 6px;
  background: #fff;
  transition:
    background 0.2s ease,
    border-color 0.2s ease;
}

.custom-checkbox::after {
  content: "✓";
  opacity: 0;
  color: #fff;
  font-size: 0.75rem;
  font-weight: 800;
  transform: scale(0.7);
  transition:
    opacity 0.2s ease,
    transform 0.2s ease;
}

.checkbox-card input:checked + .custom-checkbox,
.service-card input:checked + .custom-checkbox {
  border-color: var(--color-copper);
  background: var(--color-copper);
}

.checkbox-card input:checked + .custom-checkbox::after,
.service-card input:checked + .custom-checkbox::after {
  opacity: 1;
  transform: scale(1);
}

.checkbox-card:has(input:checked),
.service-card:has(input:checked) {
  border-color: #c58a64;
  background: #fff5ec;
}

.checkbox-copy strong,
.service-card strong,
.option-content strong {
  display: block;
  color: var(--color-espresso);
  font-size: 0.92rem;
}

.checkbox-copy small,
.service-card small,
.option-content small {
  display: block;
  margin-top: 4px;
  color: var(--color-stone);
  font-size: 0.78rem;
  line-height: 1.4;
}

.full-width-field {
  grid-column: 1 / -1;
}

.option-card-group {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 16px;
  border: 0;
}

.option-card {
  display: flex;
  min-height: 102px;
  gap: 13px;
  align-items: flex-start;
  padding: 18px;
  border: 1px solid var(--color-border);
  border-radius: var(--radius-medium);
  background: #fff;
  transition:
    border-color 0.2s ease,
    background 0.2s ease,
    transform 0.2s ease,
    box-shadow 0.2s ease;
}

.option-indicator {
  position: relative;
  display: grid;
  place-items: center;
  flex: 0 0 21px;
  width: 21px;
  height: 21px;
  margin-top: 1px;
  border: 2px solid #baa99b;
  border-radius: 50%;
  background: #fff;
}

.option-indicator::after {
  content: "";
  width: 9px;
  height: 9px;
  border-radius: 50%;
  background: transparent;
  transition: background 0.2s ease;
}

.option-card input:checked + .option-indicator {
  border-color: var(--color-copper);
}

.option-card input:checked + .option-indicator::after {
  background: var(--color-copper);
}

.option-card:has(input:checked) {
  border-color: #c58a64;
  background: #fff5ec;
}

.services-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px;
}

.service-card {
  display: flex;
  gap: 13px;
  align-items: flex-start;
  min-height: 96px;
  padding: 17px;
  border: 1px solid var(--color-border);
  border-radius: var(--radius-medium);
  background: #fff;
  transition:
    border-color 0.2s ease,
    background 0.2s ease,
    transform 0.2s ease,
    box-shadow 0.2s ease;
}

.form-actions {
  display: flex;
  justify-content: space-between;
  gap: 20px;
  align-items: center;
  padding-top: 30px;
}

.reset-button {
  display: inline-flex;
  align-items: center;
  gap: 9px;
  min-height: 48px;
  padding: 0 19px;
  border: 1px solid #cdbdac;
  border-radius: 10px;
  background: #fff;
  color: var(--color-brown);
  font-weight: 800;
  transition:
    background 0.2s ease,
    border-color 0.2s ease,
    color 0.2s ease,
    transform 0.2s ease;
}

.reset-button:hover {
  transform: translateY(-1px);
  border-color: var(--color-copper);
  background: #fff6ef;
  color: var(--color-copper-dark);
}

.form-action-note {
  color: var(--color-stone);
  font-size: 0.84rem;
  text-align: right;
}

.results-panel {
  position: sticky;
  top: 24px;
}

.results-panel-inner {
  overflow: hidden;
}

.results-header {
  display: flex;
  justify-content: space-between;
  gap: 18px;
  align-items: flex-start;
  padding: 28px 28px 22px;
}

.results-header h2 {
  font-size: 2rem;
}

.live-status {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-top: 5px;
  color: var(--color-success);
  font-size: 0.76rem;
  font-weight: 800;
  white-space: nowrap;
}

.live-status-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--color-success);
  box-shadow: 0 0 0 5px rgba(89, 114, 91, 0.12);
}

.estimate-overview {
  padding: 30px 28px;
  background:
    linear-gradient(135deg, rgba(182, 106, 60, 0.12), rgba(182, 106, 60, 0.03)),
    #fbf4ed;
  border-top: 1px solid #ead9cb;
  border-bottom: 1px solid #ead9cb;
}

.overview-label {
  display: block;
  margin-bottom: 8px;
  color: var(--color-brown);
  font-size: 0.82rem;
  font-weight: 800;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.grand-total {
  display: block;
  color: var(--color-copper-dark);
  font-family: var(--font-heading);
  font-size: clamp(2.8rem, 5vw, 4.3rem);
  line-height: 1;
  letter-spacing: -0.04em;
}

.estimate-range {
  margin-top: 12px;
  color: var(--color-stone);
  font-size: 0.88rem;
}

.estimate-breakdown {
  padding: 16px 28px;
}

.breakdown-row {
  display: flex;
  justify-content: space-between;
  gap: 18px;
  align-items: center;
  padding: 15px 0;
  border-bottom: 1px solid #eee5dc;
}

.breakdown-row:last-child {
  border-bottom: 0;
}

.breakdown-row > div {
  display: flex;
  gap: 11px;
  align-items: center;
  color: var(--color-brown);
  font-size: 0.9rem;
  font-weight: 700;
}

.breakdown-row strong {
  color: var(--color-espresso);
  font-size: 0.93rem;
}

.breakdown-icon {
  display: grid;
  place-items: center;
  flex: 0 0 31px;
  width: 31px;
  height: 31px;
  border-radius: 9px;
  background: #f1e7dd;
  color: var(--color-copper-dark);
  font-size: 0.82rem;
}

.subtotal-section {
  margin: 0 28px;
  padding: 20px;
  border-radius: var(--radius-medium);
  background: #f5efe8;
}

.subtotal-row {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  align-items: center;
  padding: 8px 0;
  color: var(--color-brown);
  font-size: 0.88rem;
}

.subtotal-row span small {
  margin-left: 4px;
  color: var(--color-copper-dark);
  font-weight: 800;
}

.subtotal-row strong {
  color: var(--color-espresso);
}

.project-metrics {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
  padding: 22px 28px;
}

.metric-card {
  padding: 16px;
  border: 1px solid var(--color-border);
  border-radius: 14px;
  background: #fff;
}

.metric-card span {
  display: block;
  color: var(--color-stone);
  font-size: 0.76rem;
}

.metric-card strong {
  display: block;
  margin-top: 5px;
  color: var(--color-espresso);
  font-family: var(--font-heading);
  font-size: 1.35rem;
}

.estimate-notice {
  display: flex;
  gap: 13px;
  margin: 0 28px 24px;
  padding: 18px;
  border: 1px solid #e5d7ca;
  border-radius: 14px;
  background: #fffbf7;
}

.notice-icon {
  display: grid;
  place-items: center;
  flex: 0 0 25px;
  width: 25px;
  height: 25px;
  border-radius: 50%;
  background: var(--color-copper);
  color: #fff;
  font-size: 0.8rem;
  font-weight: 800;
}

.estimate-notice strong {
  color: var(--color-espresso);
  font-size: 0.88rem;
}

.estimate-notice p {
  margin-top: 5px;
  color: var(--color-stone);
  font-size: 0.77rem;
  line-height: 1.5;
}

.results-footer {
  padding: 18px 28px;
  background: var(--color-espresso);
  color: rgba(255, 255, 255, 0.7);
  font-size: 0.76rem;
  text-align: center;
}

.trust-section {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 1px;
  background: var(--color-border);
  border-top: 1px solid var(--color-border);
}

.trust-item {
  display: flex;
  gap: 13px;
  align-items: flex-start;
  padding: 28px;
  background: var(--color-warm-white);
}

.trust-icon {
  display: grid;
  place-items: center;
  flex: 0 0 30px;
  width: 30px;
  height: 30px;
  border-radius: 50%;
  background: #edf3ed;
  color: var(--color-success);
  font-size: 0.82rem;
  font-weight: 800;
}

.trust-item strong {
  display: block;
  color: var(--color-espresso);
  font-size: 0.92rem;
}

.trust-item p {
  margin-top: 3px;
  color: var(--color-stone);
  font-size: 0.8rem;
  line-height: 1.45;
}

.app-footer {
  padding: 20px 28px;
  background: #2a211d;
  color: rgba(255, 255, 255, 0.58);
  font-size: 0.75rem;
  text-align: center;
}

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

@media (max-width: 1180px) {
  .hero-section {
    grid-template-columns: 1fr;
    min-height: auto;
  }

  .hero-visual {
    justify-content: flex-start;
  }

  .hero-visual-card {
    width: 100%;
    max-width: 560px;
  }

  .estimator-layout {
    grid-template-columns: 1fr;
  }

  .results-panel {
    position: static;
  }
}

@media (max-width: 820px) {
  .app-shell {
    width: min(100% - 18px, 1480px);
    margin: 9px auto;
    border-radius: 22px;
  }

  .hero-section {
    gap: 34px;
    padding: 52px 28px;
  }

  .hero-section h1 {
    font-size: clamp(2.7rem, 11vw, 4.4rem);
  }

  .hero-subheading {
    font-size: 1rem;
  }

  .estimator-layout {
    padding: 22px;
  }

  .form-panel {
    padding: 24px;
  }

  .panel-heading {
    display: block;
  }

  .panel-heading > p {
    margin-top: 12px;
  }

  .field-grid,
  .services-grid,
  .option-card-group,
  .trust-section {
    grid-template-columns: 1fr;
  }

  .full-width-field {
    grid-column: auto;
  }

  .form-actions {
    align-items: stretch;
    flex-direction: column;
  }

  .reset-button {
    justify-content: center;
  }

  .form-action-note {
    text-align: center;
  }
}

@media (max-width: 560px) {
  .app-shell {
    width: 100%;
    margin: 0;
    border: 0;
    border-radius: 0;
  }

  .hero-section {
    padding: 42px 20px;
  }

  .hero-section h1 {
    font-size: 2.75rem;
  }

  .hero-highlights {
    display: grid;
    gap: 10px;
  }

  .hero-visual-card {
    padding: 24px;
  }

  .hero-visual-card strong {
    font-size: 1.65rem;
  }

  .estimator-layout {
    padding: 14px;
  }

  .form-panel {
    padding: 20px 16px;
    border-radius: 18px;
  }

  .form-section {
    padding: 28px 0;
  }

  .section-heading {
    gap: 12px;
  }

  .section-number {
    flex-basis: 38px;
    width: 38px;
    height: 38px;
  }

  .section-heading h3 {
    font-size: 1.35rem;
  }

  .results-header,
  .estimate-overview,
  .estimate-breakdown,
  .project-metrics {
    padding-left: 20px;
    padding-right: 20px;
  }

  .results-header {
    display: block;
  }

  .live-status {
    margin-top: 12px;
  }

  .subtotal-section,
  .estimate-notice {
    margin-left: 20px;
    margin-right: 20px;
  }

  .project-metrics {
    grid-template-columns: 1fr;
  }

  .trust-item {
    padding: 22px 20px;
  }
}