:root {
  --color-bg: #faf8f5;
  --color-surface: #ffffff;
  --color-text: #2c2419;
  --color-muted: #6b5d4f;
  --color-accent: #8b4513;
  --color-accent-dark: #6d3410;
  --color-border: #e8dfd4;
  --color-alt: #f3ede4;
  --font-sans: 'Segoe UI', system-ui, -apple-system, sans-serif;
  --font-display: var(--font-sans);
  --radius: 8px;
  --shadow: 0 2px 12px rgba(44, 36, 25, 0.08);
  --max-width: 1100px;
}

*, *::before, *::after { box-sizing: border-box; }

body {
  margin: 0;
  font-family: var(--font-sans);
  color: var(--color-text);
  background: var(--color-bg);
  line-height: 1.6;
}

.container {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 0 1.25rem;
}

.container.narrow { max-width: 720px; }

/* Header */
.site-header {
  background: var(--color-surface);
  border-bottom: 1px solid var(--color-border);
  position: sticky;
  top: 0;
  z-index: 100;
}

.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  min-height: 64px;
}

.logo {
  font-size: 1.25rem;
  font-weight: 700;
  color: var(--color-accent);
  text-decoration: none;
}

.site-nav {
  display: flex;
  gap: 1.5rem;
}

.site-nav a {
  color: var(--color-text);
  text-decoration: none;
  font-weight: 500;
}

.site-nav a:hover { color: var(--color-accent); }

.nav-toggle {
  display: none;
  background: none;
  border: none;
  font-size: 1.5rem;
  cursor: pointer;
}

/* Hero */
.hero {
  background: linear-gradient(135deg, #3d2b1f 0%, #6d4c2a 100%);
  color: #fff;
  padding: 5rem 0;
  background-size: cover;
  background-position: center;
  position: relative;
}

.hero-has-bg::before {
  content: '';
  position: absolute;
  inset: 0;
  background: rgba(0, 0, 0, 0.5);
}

.hero-has-bg .hero-inner {
  position: relative;
  z-index: 1;
}

.hero-inner { text-align: center; }

.hero h1 {
  font-size: clamp(2rem, 5vw, 3rem);
  margin: 0 0 1rem;
  line-height: 1.2;
}

.hero-subtext {
  font-size: 1.15rem;
  max-width: 600px;
  margin: 0 auto 2rem;
}

.hero-subtext p {
  opacity: 0.9;
  margin: 0 0 1rem;
}

.hero-subtext p:last-child {
  margin-bottom: 0;
}

.hero .prose p {
  color: rgba(255, 255, 255, 0.9);
}

/* Text banner (mid-page, background image) */
.banner {
  background: linear-gradient(135deg, #3d2b1f 0%, #6d4c2a 100%);
  color: #fff;
  padding: 4rem 0;
  background-size: cover;
  background-position: center;
  position: relative;
}

.banner-has-bg::before {
  content: '';
  position: absolute;
  inset: 0;
  background: rgba(0, 0, 0, 0.55);
}

.banner-inner {
  position: relative;
  z-index: 1;
  text-align: center;
}

.banner h2 {
  color: #fff;
  font-size: clamp(1.5rem, 4vw, 2.25rem);
  margin: 0 0 1rem;
}

.banner-subtext {
  font-size: 1.05rem;
  max-width: 640px;
  margin: 0 auto 1.5rem;
}

.banner-subtext p {
  opacity: 0.9;
  margin: 0 0 1rem;
  color: rgba(255, 255, 255, 0.9);
}

.banner-subtext p:last-child {
  margin-bottom: 0;
}

/* Image banner block */
.image-banner {
  padding-top: 0;
  padding-bottom: 0;
}

.image-banner-empty {
  padding: 2rem 0;
}

.image-banner-placeholder {
  text-align: center;
  color: var(--color-muted);
  padding: 3rem 1rem;
  border: 2px dashed var(--color-border);
  border-radius: var(--radius);
  margin: 0;
}

.image-banner-full .image-banner-wrap {
  width: 100%;
}

.image-banner-img {
  display: block;
  width: 100%;
  height: auto;
  object-fit: cover;
  object-position: center center;
}

.image-banner-full.image-banner-h-auto .image-banner-img {
  max-height: 480px;
}

.image-banner-contained .image-banner-img {
  border-radius: var(--radius);
  box-shadow: var(--shadow);
}

/* Fixed heights */
.image-banner-h-sm .image-banner-media { height: 220px; }
.image-banner-h-md .image-banner-media { height: 360px; }
.image-banner-h-lg .image-banner-media { height: 480px; }
.image-banner-h-xl .image-banner-media { height: 600px; }
.image-banner-h-tall .image-banner-media { height: 720px; }
.image-banner-h-half .image-banner-media { height: 50vh; min-height: 220px; }

.image-banner-h-sm .image-banner-img,
.image-banner-h-md .image-banner-img,
.image-banner-h-lg .image-banner-img,
.image-banner-h-xl .image-banner-img,
.image-banner-h-tall .image-banner-img,
.image-banner-h-half .image-banner-img {
  height: 100%;
  max-height: none;
}

/* Object fit */
.image-banner-fit-cover .image-banner-img { object-fit: cover; }
.image-banner-fit-contain .image-banner-img { object-fit: contain; }
.image-banner-fit-fill .image-banner-img { object-fit: fill; }

.image-banner-contained.image-banner-fit-contain .image-banner-media {
  height: auto;
}

.image-banner-contained.image-banner-fit-contain .image-banner-img {
  height: auto;
}

/* Crop focal point */
.image-banner-focal-top .image-banner-img { object-position: center top; }
.image-banner-focal-center .image-banner-img { object-position: center center; }
.image-banner-focal-bottom .image-banner-img { object-position: center bottom; }

/* Contained alignment */
.image-banner-contained.image-banner-align-left > .container {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
}

.image-banner-contained.image-banner-align-center > .container {
  display: flex;
  flex-direction: column;
  align-items: center;
}

.image-banner-contained.image-banner-align-right > .container {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
}

.image-banner-contained.image-banner-align-left .image-banner-caption,
.image-banner-contained.image-banner-align-right .image-banner-caption,
.image-banner-contained.image-banner-align-center .image-banner-caption {
  align-self: stretch;
  text-align: center;
}

.image-banner-link {
  display: block;
}

.image-banner-caption {
  text-align: center;
  color: var(--color-muted);
  font-size: 0.9rem;
  margin: 0.75rem 0 0;
  padding: 0 1rem 2rem;
}

.image-banner-contained .image-banner-caption {
  padding-bottom: 0;
}

.image-banner-media {
  overflow: hidden;
  position: relative;
}

/* Scroll reveal */
[data-image-fx="scroll"] {
  opacity: 0;
  transition: opacity 0.75s ease, transform 0.75s ease;
}

[data-image-fx="scroll"].image-fx-visible {
  opacity: 1;
}

.image-fx-scroll-slide-up {
  transform: translateY(2.25rem);
}

.image-fx-scroll-slide-up.image-fx-visible {
  transform: translateY(0);
}

.image-fx-scroll-zoom-in {
  transform: scale(0.94);
}

.image-fx-scroll-zoom-in.image-fx-visible {
  transform: scale(1);
}

/* Hover effects */
.image-fx-hover-zoom .image-banner-img {
  transition: transform 0.45s ease;
}

.image-fx-hover-zoom:hover .image-banner-img {
  transform: scale(1.06);
}

.image-fx-hover-lift {
  transition: transform 0.35s ease, box-shadow 0.35s ease;
  border-radius: var(--radius);
}

.image-fx-hover-lift:hover {
  transform: translateY(-6px);
  box-shadow: 0 16px 40px rgba(44, 36, 25, 0.18);
}

.image-fx-hover-color-reveal .image-banner-img {
  filter: grayscale(100%);
  transition: filter 0.55s ease, transform 0.45s ease;
}

.image-fx-hover-color-reveal:hover .image-banner-img {
  filter: grayscale(0%);
}

.image-fx-hover-color-reveal.image-fx-hover-zoom:hover .image-banner-img {
  transform: scale(1.06);
}

/* Ken Burns ambient motion */
.image-fx-ken-burns .image-banner-img {
  animation: image-ken-burns 20s ease-in-out infinite alternate;
  transform-origin: center center;
}

@keyframes image-ken-burns {
  from {
    transform: scale(1) translate(0, 0);
  }
  to {
    transform: scale(1.1) translate(-1.5%, -1%);
  }
}

.image-fx-rounded,
.image-fx-rounded .image-banner-img {
  border-radius: 1.25rem;
}

.image-banner-contained .image-fx-rounded .image-banner-img {
  border-radius: 1.25rem;
}

@media (prefers-reduced-motion: reduce) {
  [data-image-fx="scroll"] {
    opacity: 1;
    transform: none;
    transition: none;
  }

  .image-fx-hover-zoom .image-banner-img,
  .image-fx-hover-color-reveal .image-banner-img {
    transition: none;
  }

  .image-fx-hover-zoom:hover .image-banner-img,
  .image-fx-hover-color-reveal:hover .image-banner-img {
    transform: none;
    filter: none;
  }

  .image-fx-hover-lift:hover {
    transform: none;
  }

  .image-fx-ken-burns .image-banner-img {
    animation: none;
  }
}

/* Sections */
.section { padding: 4rem 0; }
.section-alt { background: var(--color-alt); }

.section-title {
  text-align: center;
  margin-bottom: 2.5rem;
  font-size: 1.75rem;
}

h1, h2, h3,
.logo,
.section-title,
.hero h1,
.banner h2 {
  font-family: var(--font-display);
}

h2 { color: var(--color-text); }

.prose p { color: var(--color-muted); margin: 0 0 1rem; }
.prose p:last-child { margin-bottom: 0; }
.prose ul, .prose ol { color: var(--color-muted); margin: 0 0 1rem 1.25rem; }

/* Cards */
.card-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 1.5rem;
}

.card {
  background: var(--color-surface);
  padding: 1.5rem;
  border-radius: var(--radius);
  box-shadow: var(--shadow);
}

.card h3 { margin-top: 0; color: var(--color-accent); }

.card-description {
  font-size: 0.95rem;
}

.card-description p:last-child {
  margin-bottom: 0;
}

/* Staff */
.staff-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
  gap: 1.5rem;
}

.staff-item {
  padding: 1.25rem;
  border-left: 4px solid var(--color-accent);
  background: var(--color-surface);
  border-radius: 0 var(--radius) var(--radius) 0;
}

.staff-item h3 { margin: 0 0 0.5rem; }

.staff-description p:last-child {
  margin-bottom: 0;
}

/* Callout */
.callout {
  padding: 2rem;
  border-radius: var(--radius);
  text-align: center;
}

.callout-accent {
  background: #fff3e6;
  border: 2px solid var(--color-accent);
}

.callout-neutral {
  background: var(--color-alt);
  border: 1px solid var(--color-border);
}

.callout h3 { margin-top: 0; color: var(--color-accent); }

/* Steps */
.steps-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 2rem;
}

.step {
  text-align: center;
}

.step-num {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 48px;
  height: 48px;
  background: var(--color-accent);
  color: #fff;
  border-radius: 50%;
  font-weight: 700;
  font-size: 1.25rem;
  margin-bottom: 1rem;
}

/* Buttons */
.btn {
  display: inline-block;
  padding: 0.75rem 1.5rem;
  border-radius: var(--radius);
  font-weight: 600;
  text-decoration: none;
  border: 2px solid transparent;
  cursor: pointer;
  font-size: 1rem;
  font-family: inherit;
  transition: background 0.2s, color 0.2s;
}

.btn-primary {
  background: var(--color-accent);
  color: #fff;
}

.btn-primary:hover { background: var(--color-accent-dark); }

.btn-outline {
  background: transparent;
  color: var(--color-accent);
  border-color: var(--color-accent);
}

.btn-outline:hover {
  background: var(--color-accent);
  color: #fff;
}

.btn-lg { padding: 1rem 2rem; font-size: 1.1rem; }

/* Footer */
.site-footer {
  background: #2c2419;
  color: #d4c9bc;
  padding: 3rem 0 0;
  margin-top: 2rem;
}

.footer-inner {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 2rem;
  padding-bottom: 2rem;
}

.footer-inner strong { color: #fff; font-size: 1.1rem; }

.footer-bottom {
  border-top: 1px solid #4a3f32;
  padding: 1rem 0;
  text-align: center;
  font-size: 0.875rem;
}

.site-footer .btn-outline {
  color: #fff;
  border-color: #fff;
}

.site-footer .btn-outline:hover {
  background: #fff;
  color: var(--color-text);
}

/* Spacer */
.spacer-sm { height: 1.5rem; }
.spacer-md { height: 3rem; }
.spacer-lg { height: 5rem; }

/* Quote Form */
.form-intro { color: var(--color-muted); margin-bottom: 2rem; }

.form-extra-section {
  background: var(--color-alt);
  border-left: 4px solid var(--color-accent);
  padding: 1rem 1.25rem;
  margin-bottom: 1.5rem;
  border-radius: 0 var(--radius) var(--radius) 0;
}

.form-extra-section h3 {
  margin: 0 0 0.5rem;
  font-size: 1.1rem;
  color: var(--color-accent);
}

.form-extra-section p {
  margin: 0.25rem 0;
  color: var(--color-muted);
}

.quote-form fieldset {
  border: 1px solid var(--color-border);
  border-radius: var(--radius);
  padding: 1.5rem;
  margin-bottom: 1.5rem;
  background: var(--color-surface);
}

.quote-form legend {
  font-weight: 700;
  padding: 0 0.5rem;
  color: var(--color-accent);
}

.form-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1rem;
}

.quote-form label {
  display: block;
  margin-bottom: 1rem;
  font-weight: 500;
  font-size: 0.9rem;
}

.quote-form input,
.quote-form select,
.quote-form textarea {
  display: block;
  width: 100%;
  margin-top: 0.35rem;
  padding: 0.65rem 0.75rem;
  border: 1px solid var(--color-border);
  border-radius: var(--radius);
  font-size: 1rem;
  font-family: inherit;
}

.quote-form input:focus,
.quote-form select:focus,
.quote-form textarea:focus {
  outline: 2px solid var(--color-accent);
  outline-offset: 1px;
}

.form-notice {
  background: #fff3e6;
  border: 1px solid var(--color-accent);
  padding: 1rem;
  border-radius: var(--radius);
  margin-bottom: 1.5rem;
  font-weight: 600;
  color: var(--color-accent-dark);
}

.field-hint { font-size: 0.875rem; color: var(--color-muted); margin-top: 0; }

.staff-grid-form { display: flex; flex-direction: column; gap: 0.75rem; }

.staff-row {
  display: grid;
  grid-template-columns: auto 1fr auto;
  align-items: center;
  gap: 0.75rem;
  padding: 0.65rem 0;
  border-bottom: 1px solid var(--color-border);
}

.staff-row input[type="checkbox"] {
  width: 1.1rem;
  height: 1.1rem;
  margin: 0;
  cursor: pointer;
  accent-color: var(--color-accent);
}

.staff-label {
  margin: 0;
  cursor: pointer;
  font-weight: 500;
  font-size: 0.95rem;
}

.qty-input {
  width: 72px !important;
  margin: 0 !important;
  text-align: center;
}

.form-errors {
  background: #fde8e8;
  border: 1px solid #e53e3e;
  color: #9b2c2c;
  padding: 1rem;
  border-radius: var(--radius);
  margin-bottom: 1rem;
}

.form-errors p { margin: 0.25rem 0; }

.form-field {
  margin-bottom: 0.25rem;
}

.form-field .field-error {
  margin: 0.35rem 0 0;
  font-size: 0.8rem;
  color: #9b2c2c;
  line-height: 1.35;
}

.quote-form input.is-invalid,
.quote-form select.is-invalid,
.quote-form textarea.is-invalid {
  border-color: #e53e3e;
}

.quote-form-wrapper {
  width: 100%;
}

.quote-service-gate {
  margin: 1.25rem 0 1.5rem;
  padding: 1.25rem 0;
  border-top: 1px solid var(--color-border, #e5e7eb);
  border-bottom: 1px solid var(--color-border, #e5e7eb);
}

.quote-gate-question {
  font-size: 1.15rem;
  font-weight: 600;
  margin: 0 0 1rem;
  line-height: 1.4;
}

.quote-gate-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
}

.quote-gate-decline {
  margin: 1.25rem 0;
  padding: 1rem 0;
}

.quote-gate-decline p {
  margin: 0 0 1rem;
  color: var(--color-muted);
  line-height: 1.5;
}

.form-success {
  background: #e6ffed;
  border: 1px solid #38a169;
  color: #276749;
  padding: 1.5rem;
  border-radius: var(--radius);
  margin-bottom: 1rem;
}

.thanks-hero {
  padding-bottom: 1.5rem;
}

.thanks-eyebrow {
  text-transform: uppercase;
  letter-spacing: 0.06em;
  font-size: 0.75rem;
  color: var(--color-muted);
  margin: 0 0 0.5rem;
}

.thanks-lead {
  color: var(--color-muted);
  font-size: 1.05rem;
}

.thanks-panel {
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: var(--radius);
  padding: 1.5rem;
  margin-bottom: 1.5rem;
  box-shadow: var(--shadow);
}

.thanks-panel-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 1rem;
  flex-wrap: wrap;
  margin-bottom: 1rem;
}

.thanks-panel-header h2 {
  margin: 0;
  font-size: 1.25rem;
}

.thanks-summary {
  margin: 0;
}

.thanks-row {
  display: grid;
  grid-template-columns: 8rem 1fr;
  gap: 0.75rem;
  padding: 0.75rem 0;
  border-bottom: 1px solid var(--color-border);
}

.thanks-row:last-child {
  border-bottom: none;
}

.thanks-row dt {
  margin: 0;
  color: var(--color-muted);
  font-size: 0.875rem;
  font-weight: 600;
}

.thanks-row dd {
  margin: 0;
}

.thanks-account-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
}

.thanks-locked {
  margin: 0;
  color: var(--color-muted);
  font-size: 0.875rem;
}

.status-badge {
  display: inline-block;
  padding: 0.15rem 0.5rem;
  border-radius: 999px;
  font-size: 0.8rem;
  background: var(--color-alt);
}

.status-badge.status-new { background: #e8f0fe; color: #1a56db; }
.status-badge.status-reviewed { background: #fef3c7; color: #92400e; }
.status-badge.status-quoted { background: #d1fae5; color: #065f46; }
.status-badge.status-closed { background: #e5e7eb; color: #374151; }

@media (max-width: 640px) {
  .thanks-row {
    grid-template-columns: 1fr;
    gap: 0.25rem;
  }
}
  border-radius: var(--radius);
  font-weight: 600;
  text-align: center;
}

/* Responsive */
@media (max-width: 768px) {
  .nav-toggle { display: block; }

  .site-nav {
    display: none;
    position: absolute;
    top: 64px;
    left: 0;
    right: 0;
    background: var(--color-surface);
    flex-direction: column;
    padding: 1rem;
    border-bottom: 1px solid var(--color-border);
  }

  .site-nav.open { display: flex; }

  .form-row { grid-template-columns: 1fr; }

  .hero { padding: 3rem 0; }
}

/* Quote account section */
.quote-account-fieldset {
  margin-top: 0.5rem;
}

.form-checkbox {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-weight: 500;
  margin-bottom: 0.75rem;
}

.form-checkbox input {
  width: auto;
}

.quote-account-password-fields label {
  margin-top: 0.75rem;
}

.account-divider {
  text-align: center;
  color: var(--color-muted);
  font-size: 0.875rem;
  margin: 1rem 0;
}

.google-signin-container {
  min-height: 44px;
}

.btn-link {
  background: none;
  border: none;
  color: var(--color-accent);
  text-decoration: underline;
  cursor: pointer;
  font: inherit;
  padding: 0;
}

.quote-account-logged-in {
  background: var(--color-alt);
  padding: 1rem;
  border-radius: var(--radius);
}

.form-success .btn {
  margin-top: 1rem;
}

/* Account page */
.account-page h1 {
  margin-top: 0;
}

.account-intro {
  color: var(--color-muted);
  margin-bottom: 1.5rem;
}

.account-tabs {
  display: flex;
  gap: 0.5rem;
  margin-bottom: 1.5rem;
}

.account-tab {
  flex: 1;
  padding: 0.75rem;
  border: 1px solid var(--color-border);
  background: var(--color-surface);
  border-radius: var(--radius);
  cursor: pointer;
  font-weight: 600;
}

.account-tab.active {
  background: var(--color-accent);
  color: #fff;
  border-color: var(--color-accent);
}

.account-form label {
  display: block;
  margin-bottom: 1rem;
  font-weight: 600;
  font-size: 0.9rem;
}

.account-form input {
  display: block;
  width: 100%;
  margin-top: 0.35rem;
  padding: 0.65rem 0.75rem;
  border: 1px solid var(--color-border);
  border-radius: var(--radius);
  font: inherit;
}

.account-oauth {
  margin-top: 2rem;
  text-align: center;
}

.account-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 1rem;
  margin-bottom: 2rem;
}

.account-email {
  color: var(--color-muted);
  margin: 0.25rem 0 0;
}

.account-card {
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: var(--radius);
  padding: 1.5rem;
  box-shadow: var(--shadow);
}

.account-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.9rem;
}

.account-table th,
.account-table td {
  text-align: left;
  padding: 0.75rem 0.5rem;
  border-bottom: 1px solid var(--color-border);
}

.account-table th {
  font-weight: 600;
  color: var(--color-muted);
}

.status-badge {
  display: inline-block;
  padding: 0.2rem 0.6rem;
  border-radius: 999px;
  font-size: 0.75rem;
  font-weight: 600;
  text-transform: capitalize;
}

.status-new { background: #ebf8ff; color: #2b6cb0; }
.status-reviewed { background: #fefcbf; color: #975a16; }
.status-quoted { background: #e6ffed; color: #276749; }
.status-declined { background: #fed7d7; color: #9b2c2c; }
.status-closed { background: #edf2f7; color: #4a5568; }

.btn-block {
  width: 100%;
  margin-top: 0.75rem;
}

.passkey-list {
  list-style: none;
  margin: 0 0 1rem;
  padding: 0;
}

.passkey-list li {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 1rem;
  padding: 0.75rem 0;
  border-bottom: 1px solid var(--color-border);
}

.passkey-list li:last-child {
  border-bottom: none;
}
