:root {
  --color-coral: #f08080;
  --color-text: #000000;
  --color-text-muted: #333333;
  --color-border: #cccccc;
  --color-bg: #ffffff;
  --color-bg-subtle: #fafafa;
  --color-error-bg: #fef2f2;
  --color-error-text: #991b1b;
  --color-success-bg: #f0fdf4;
  --color-success-text: #166534;
  --font-sans: "Source Sans 3", system-ui, -apple-system, sans-serif;
  --max-width: 960px;
  --radius: 4px;
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

body {
  margin: 0;
  font-family: var(--font-sans);
  font-size: 1rem;
  line-height: 1.5;
  color: var(--color-text);
  background-color: var(--color-bg);
}

img {
  max-width: 100%;
  height: auto;
  display: block;
}

a {
  color: var(--color-text);
  text-decoration: underline;
  text-underline-offset: 2px;
}

a:hover {
  color: var(--color-coral);
}

.container {
  width: 100%;
  max-width: var(--max-width);
  margin-inline: auto;
  padding-inline: 1.25rem;
}

.visually-hidden {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

/* Header */

.site-header {
  padding: 1.25rem 0 0.75rem;
  background: var(--color-bg);
}

.logo {
  margin-inline: auto;
  max-width: 260px;
}

/* Hero */

.hero {
  background: var(--color-bg);
  padding-bottom: 0.25rem;
}

.hero-banner {
  width: 100%;
  max-width: var(--max-width);
  margin-inline: auto;
}

/* Notice */

main {
  padding-block: 1.5rem 3rem;
}

.notice {
  margin-bottom: 2rem;
}

.notice h1 {
  font-family: var(--font-sans);
  font-size: clamp(1.25rem, 3.5vw, 1.75rem);
  font-weight: 400;
  color: var(--color-coral);
  text-align: center;
  margin: 0 0 1.25rem;
  line-height: 1.35;
}

.notice p {
  margin: 0 0 0.75rem;
  color: var(--color-text);
  text-align: left;
}

.notice-signature {
  font-weight: 600;
  margin-top: 1rem !important;
}

.notice-contact {
  margin-top: 1.25rem !important;
  font-weight: 500;
}

/* Form */

.form-message {
  padding: 1rem 1.25rem;
  border-radius: var(--radius);
  margin-bottom: 1.25rem;
}

.form-message--success {
  background: var(--color-success-bg);
  color: var(--color-success-text);
  border: 1px solid #bbf7d0;
}

.form-message--error {
  background: var(--color-error-bg);
  color: var(--color-error-text);
  border: 1px solid #fecaca;
}

.form-message p {
  margin: 0;
}

.contact-form {
  background: var(--color-bg);
}

.form-section-heading {
  font-size: 1.125rem;
  font-weight: 600;
  color: var(--color-text);
  margin: 0 0 1rem;
}

.form-section-heading + .form-fieldset.product-section {
  margin-top: 0;
}

.form-intro {
  margin: 0 0 1rem;
  color: var(--color-text);
}

.form-fieldset {
  border: none;
  margin: 0 0 1.5rem;
  padding: 0;
}

.form-grid {
  display: grid;
  gap: 0.75rem 1.25rem;
}

.form-grid--naw {
  grid-template-columns: 1fr 1fr;
}

.form-field label {
  display: block;
  font-weight: 400;
  font-size: 0.9375rem;
  margin-bottom: 0.25rem;
  color: var(--color-text);
}

.required {
  color: var(--color-coral);
}

.form-field input,
.form-field select {
  width: 100%;
  padding: 0.5rem 0.625rem;
  font-family: inherit;
  font-size: 1rem;
  line-height: 1.4;
  color: var(--color-text);
  background: var(--color-bg);
  border: 1px solid var(--color-border);
  border-radius: var(--radius);
}

.form-field select {
  cursor: pointer;
}

.form-field input:focus,
.form-field select:focus {
  outline: none;
  border-color: var(--color-coral);
  box-shadow: 0 0 0 2px rgba(240, 128, 128, 0.25);
}

/* Product tables */

.product-section {
  margin-top: 1.25rem;
}

.product-heading {
  display: block;
  font-size: 1rem;
  font-weight: 600;
  color: var(--color-text);
  margin-bottom: 0.5rem;
  padding: 0;
}

.product-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.9375rem;
}

.product-table th,
.product-table td {
  padding: 0.375rem 0.5rem;
  text-align: left;
  vertical-align: middle;
  font-weight: 400;
}

.product-table thead th {
  font-weight: 500;
  color: var(--color-text);
}

.col-product {
  width: 30%;
}

.col-num {
  width: 23%;
  text-align: center;
}

.product-table thead .col-num {
  text-align: center;
}

.product-table tbody th {
  white-space: nowrap;
}

.product-table input {
  width: 100%;
  padding: 0.375rem 0.5rem;
  font-family: inherit;
  font-size: 0.9375rem;
  color: var(--color-text);
  background: var(--color-bg);
  border: 1px solid var(--color-border);
  border-radius: var(--radius);
  text-align: right;
}

.product-table input:focus {
  outline: none;
  border-color: var(--color-coral);
}

.product-table input[readonly] {
  background: var(--color-bg-subtle);
  color: var(--color-text-muted);
}

/* Totals */

.totals {
  margin-top: 1.5rem;
  margin-left: auto;
  width: min(100%, 280px);
  display: flex;
  flex-direction: column;
  gap: 0.375rem;
}

.totals-row {
  display: grid;
  grid-template-columns: 1fr auto;
  align-items: center;
  gap: 1rem;
}

.totals-row--final {
  margin-top: 0.25rem;
  padding-top: 0.5rem;
  border-top: 1px solid var(--color-border);
  font-weight: 600;
}

.totals-label {
  text-align: left;
}

.totals-value {
  text-align: right;
  font-size: 0.9375rem;
}

.totals-input {
  width: 100%;
  max-width: 120px;
  justify-self: end;
  padding: 0.375rem 0.5rem;
  font-family: inherit;
  font-size: 0.9375rem;
  color: var(--color-text);
  background: var(--color-bg-subtle);
  border: 1px solid var(--color-border);
  border-radius: var(--radius);
  text-align: right;
}

.totals-row--final .totals-input {
  font-weight: 600;
}

/* Submit */

.form-actions {
  margin-top: 2rem;
  text-align: left;
}

.btn-submit {
  display: inline-block;
  padding: 0.625rem 2rem;
  font-family: inherit;
  font-size: 1rem;
  font-weight: 600;
  color: #fff;
  background: var(--color-coral);
  border: none;
  border-radius: var(--radius);
  cursor: pointer;
  transition: background 0.15s ease;
}

.btn-submit:hover:not(:disabled) {
  background: #e07070;
}

.btn-submit:disabled {
  opacity: 0.65;
  cursor: not-allowed;
}

/* Footer */

.site-footer {
  border-top: 1px solid var(--color-border);
  padding: 1.5rem 0;
  text-align: center;
}

.footer-contact {
  margin: 0 0 0.375rem;
  font-weight: 500;
}

.footer-tagline {
  margin: 0;
  font-size: 0.875rem;
  color: var(--color-text-muted);
  font-style: italic;
}

/* Responsive */

@media (max-width: 640px) {
  .form-grid--naw {
    grid-template-columns: 1fr;
  }

  .product-table {
    font-size: 0.875rem;
  }

  .product-table th,
  .product-table td {
    padding: 0.25rem 0.25rem;
  }

  .col-product {
    width: 28%;
  }

  .totals {
    width: 100%;
  }
}
