/* Dealwell Properties — SellToDealwell Seller Website
   Design tokens from Dealwell-Design-Direction (Direction A: Evergreen Ledger) */

/* === CSS Custom Properties (Design Tokens) === */
:root {
  /* Colors */
  --ink: #14211D;
  --ink-2: #3E4A45;
  --muted: #6B675F;
  --evergreen-50: #EEF4F1;
  --evergreen-100: #D9E7E0;
  --evergreen-600: #2A6352;
  --evergreen-700: #1F4D3F;
  --brass-50: #F7F0E3;
  --brass-500: #A9792B;
  --brass-700: #8A6220;
  --paper: #FAF8F4;
  --canvas: #F5F4F0;
  --surface: #FFFFFF;
  --line: #E4E0D8;
  --line-strong: #CFC9BE;
  --success: #2F7A4D;
  --success-bg: #E8F3EC;
  --warning: #8C5A0B;
  --warning-bg: #FBF1DE;
  --danger: #B42318;
  --danger-bg: #FDECEA;
  --info: #2B5B84;
  --info-bg: #E9F0F7;
  
  /* Typography */
  --font-serif: 'Source Serif 4', Georgia, serif;
  --font-sans: 'IBM Plex Sans', system-ui, sans-serif;
  --font-mono: 'IBM Plex Mono', ui-monospace, monospace;
  
  /* Spacing */
  --space-1: 4px;
  --space-2: 8px;
  --space-3: 12px;
  --space-4: 16px;
  --space-5: 20px;
  --space-6: 24px;
  --space-8: 32px;
  --space-10: 40px;
  --space-12: 48px;
  --space-16: 64px;
  --space-24: 96px;
  
  /* Border Radius */
  --radius-sm: 6px;
  --radius-md: 10px;
  --radius-lg: 12px;
  
  /* Shadows */
  --shadow-overlay: 0 8px 24px rgb(20 33 29 / 0.12), 0 1px 2px rgb(20 33 29 / 0.08);
}

/* === Reset & Base === */
*,
*::before,
*::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  font-size: 16px;
  -webkit-text-size-adjust: 100%;
  scroll-behavior: smooth;
  scroll-padding-top: 90px;
}

body {
  font-family: var(--font-sans);
  font-weight: 400;
  line-height: 1.6;
  color: var(--ink);
  background-color: var(--paper);
  min-height: 100vh;
}

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

a {
  color: var(--evergreen-700);
  text-decoration: none;
}

a:hover {
  color: var(--evergreen-600);
}

a:focus-visible {
  outline: 2px solid var(--evergreen-700);
  outline-offset: 2px;
}

/* === Typography === */
h1, h2, h3, h4, h5, h6 {
  font-family: var(--font-serif);
  font-weight: 500;
  line-height: 1.2;
  color: var(--ink);
}

.display {
  font-size: clamp(40px, 5.2vw, 64px);
  letter-spacing: -0.02em;
}

.h1 {
  font-size: clamp(28px, 3.4vw, 44px);
  letter-spacing: -0.015em;
}

.h2 {
  font-size: clamp(26px, 3.4vw, 42px);
  letter-spacing: -0.015em;
}

.h3 {
  font-family: var(--font-sans);
  font-size: 20px;
  font-weight: 600;
  line-height: 1.3;
}

.body-lg {
  font-size: 19px;
  line-height: 1.6;
  color: var(--ink-2);
}

.body {
  font-size: 16px;
  line-height: 1.6;
}

.body-sm {
  font-size: 14px;
  line-height: 1.5;
}

.caption {
  font-size: 13px;
  line-height: 1.5;
  color: var(--muted);
}

.label {
  font-size: 12px;
  font-weight: 500;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--brass-700);
}

/* === Layout === */
.wrap {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 24px;
}

.section {
  padding-block: var(--space-24);
}

.section-alt {
  background-color: var(--surface);
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
}

.section-dark {
  background-color: var(--ink);
  color: var(--paper);
}

/* === Header === */
.header {
  position: sticky;
  top: 0;
  z-index: 100;
  background-color: var(--paper);
  border-bottom: 1px solid var(--line);
}

.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--space-4);
  height: 76px;
}

.logo {
  display: flex;
  align-items: center;
  gap: 10px;
  text-decoration: none;
  color: var(--ink);
}

.logo-img {
  display: block;
  height: 30px;
  width: 90px;
  flex-shrink: 0;
  max-width: 100%;
}

.logo-mark {
  width: 36px;
  height: 36px;
  border-radius: 7px;
  background-color: var(--evergreen-700);
  color: var(--paper);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-family: var(--font-serif);
  font-weight: 600;
  font-size: 18px;
  line-height: 1;
}

.logo-text {
  font-family: var(--font-serif);
  font-weight: 600;
  font-size: 20px;
  line-height: 1;
}

.logo-text span {
  font-weight: 400;
  color: var(--muted);
}

.nav {
  display: flex;
  gap: 28px;
  font-size: 15px;
}

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

.nav a:hover {
  color: var(--ink);
}

.header-actions {
  display: flex;
  align-items: center;
  gap: 12px;
}

.phone-link {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-width: 44px;
  min-height: 44px;
  color: var(--ink);
  text-decoration: none;
  font-weight: 500;
  font-variant-numeric: tabular-nums;
}

.phone-link svg {
  width: 18px;
  height: 18px;
}

.btn-primary {
  height: 44px;
  padding: 0 18px;
  border-radius: var(--radius-sm);
  background-color: var(--evergreen-700);
  color: var(--surface);
  text-decoration: none;
  font-weight: 500;
  display: inline-flex;
  align-items: center;
  border: none;
  cursor: pointer;
  font-family: var(--font-sans);
  font-size: 15px;
}

.btn-primary:hover {
  background-color: var(--evergreen-600);
  color: var(--surface);
}

.btn-primary:focus-visible {
  outline: 2px solid var(--evergreen-700);
  outline-offset: 2px;
}

.menu-toggle {
  display: none;
  width: 44px;
  height: 44px;
  border: none;
  background: transparent;
  align-items: center;
  justify-content: center;
  cursor: pointer;
}

.menu-toggle svg {
  width: 22px;
  height: 22px;
  stroke: var(--ink);
  stroke-width: 1.6;
}

/* === Hero === */
.hero {
  display: flex;
  flex-wrap: wrap;
  gap: 48px;
  padding-top: 56px;
  padding-bottom: 64px;
  align-items: flex-start;
}

.hero-content {
  flex: 1 1 480px;
  display: flex;
  flex-direction: column;
  gap: 20px;
  padding-top: 8px;
}

.hero-form {
  flex: 1 1 380px;
  max-width: 460px;
  background-color: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  padding: 28px;
  display: flex;
  flex-direction: column;
  gap: 16px;
}

/* === Form === */
.form-header {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
}

.form-header h2 {
  font-size: 26px;
  font-weight: 500;
}

.form-step {
  font-size: 13px;
  color: var(--muted);
}

.progress-bar {
  height: 4px;
  border-radius: 2px;
  background-color: var(--canvas);
  overflow: hidden;
}

.progress-fill {
  height: 100%;
  border-radius: 2px;
  background-color: var(--evergreen-700);
  transition: width 0.3s ease;
}

.field {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.field label {
  font-size: 14px;
  font-weight: 500;
}

.field input,
.field textarea {
  height: 48px;
  box-sizing: border-box;
  border: 1px solid var(--line-strong);
  border-radius: var(--radius-sm);
  padding: 0 14px;
  font-family: var(--font-sans);
  font-size: 16px;
  font-weight: 400;
  color: var(--ink);
  background-color: var(--surface);
}

.field textarea {
  height: auto;
  min-height: 100px;
  padding: 12px 14px;
  resize: vertical;
}

.field input:focus,
.field textarea:focus {
  outline: none;
  border-color: var(--evergreen-700);
  box-shadow: 0 0 0 3px var(--evergreen-100);
}

.field input::placeholder,
.field textarea::placeholder {
  color: var(--muted);
}

.field-error {
  font-size: 13px;
  color: var(--danger);
  display: none;
}

.field.has-error input,
.field.has-error textarea {
  border-color: var(--danger);
}

.field.has-error .field-error {
  display: block;
}

.form-consent {
  font-size: 13px;
  line-height: 1.5;
  color: var(--muted);
}

.form-consent a {
  color: var(--evergreen-700);
  text-decoration: underline;
}

.btn-submit {
  height: 52px;
  border: none;
  border-radius: var(--radius-sm);
  background-color: var(--evergreen-700);
  color: var(--surface);
  font-family: var(--font-sans);
  font-size: 16px;
  font-weight: 500;
  cursor: pointer;
  transition: background-color 0.15s ease;
}

.btn-submit:hover {
  background-color: var(--evergreen-600);
}

.btn-submit:focus-visible {
  outline: 2px solid var(--evergreen-700);
  outline-offset: 2px;
}

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

/* === Disclosure === */
.disclosure-s {
  font-size: 14px;
  line-height: 1.6;
  color: var(--ink-2);
  padding: var(--space-4) var(--space-5);
  background-color: var(--evergreen-50);
  border-radius: var(--radius-sm);
  border-left: 3px solid var(--evergreen-700);
}

.disclosure-s p {
  margin: 0;
}

.disclosure-f {
  font-size: 13px;
  line-height: 1.5;
  color: var(--muted);
}

/* === Sale Process Cards === */
.sale-card {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius-md);
  padding: 28px;
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.sale-card-primary {
  border-color: var(--evergreen-100);
  border-width: 2px;
}

.sale-card-secondary {
  background: var(--evergreen-50);
  border-color: var(--evergreen-100);
}

.sale-card-steps {
  list-style: none;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.sale-card-steps li {
  display: flex;
  gap: 12px;
  align-items: flex-start;
}

.sale-card-steps .step-num {
  font-family: var(--font-mono);
  font-size: 13px;
  font-weight: 500;
  color: var(--brass-700);
  min-width: 24px;
  padding-top: 2px;
}

.sale-card-steps .step-text {
  color: var(--ink-2);
  line-height: 1.5;
}

/* === Form Spacing === */
.form-consent {
  font-size: 13px;
  line-height: 1.6;
  color: var(--muted);
  padding: var(--space-3) var(--space-4);
  background-color: var(--canvas);
  border-radius: var(--radius-sm);
}

.form-consent p {
  margin: 0;
}

.address-summary {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: var(--space-3) var(--space-4);
  background: var(--evergreen-50);
  border-radius: var(--radius-sm);
  border-left: 3px solid var(--evergreen-700);
}

.btn-link {
  background: none;
  border: none;
  color: var(--evergreen-700);
  font-family: var(--font-sans);
  font-size: 14px;
  font-weight: 500;
  cursor: pointer;
  text-decoration: underline;
  padding: 4px 8px;
}

.btn-link:hover {
  color: var(--evergreen-600);
}

/* === Steps === */
.steps {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(260px, 100%), 1fr));
  gap: 40px;
  list-style: none;
}

.step {
  display: flex;
  flex-direction: column;
  gap: 12px;
  border-top: 2px solid var(--evergreen-700);
  padding-top: 20px;
}

.step-number {
  font-family: var(--font-mono);
  font-size: 15px;
  font-weight: 500;
  color: var(--brass-700);
}

.step h3 {
  font-size: 20px;
  font-weight: 600;
  line-height: 1.3;
}

.step p {
  font-size: 16px;
  line-height: 1.6;
  color: var(--ink-2);
}

/* === Cards Grid === */
.cards-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(300px, 100%), 1fr));
  gap: 1px;
  background-color: var(--line);
  border: 1px solid var(--line);
  border-radius: var(--radius-md);
  overflow: hidden;
}

.card {
  background-color: var(--surface);
  padding: 28px;
  display: flex;
  flex-direction: column;
  gap: 8px;
  text-decoration: none;
  color: var(--ink);
}

.card:hover {
  background-color: var(--evergreen-50);
}

.card-title {
  font-family: var(--font-sans);
  font-size: 18px;
  font-weight: 600;
}

.card-desc {
  font-size: 15px;
  line-height: 1.55;
  color: var(--muted);
}

/* === Comparison Table === */
.comparison {
  display: flex;
  flex-wrap: wrap;
  gap: 40px;
  align-items: flex-start;
}

.comparison-text {
  flex: 1 1 300px;
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.comparison-table {
  flex: 2 1 500px;
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
  border: 1px solid var(--line);
  border-radius: var(--radius-md);
  background-color: var(--surface);
}

.comparison-table table {
  width: 100%;
  border-collapse: collapse;
  font-size: 14px;
  min-width: 480px;
}

.comparison-table th,
.comparison-table td {
  padding: 16px 20px;
  text-align: left;
  border-top: 1px solid var(--canvas);
}

.comparison-table thead th {
  background-color: var(--canvas);
  font-weight: 600;
  color: var(--ink);
  border-top: none;
}

.comparison-table thead th:first-child {
  color: var(--muted);
  font-weight: 500;
}

.comparison-table tbody th {
  font-weight: 500;
  color: var(--ink);
}

.comparison-table tbody td {
  color: var(--ink-2);
}

/* === About Section === */
.about {
  display: flex;
  flex-wrap: wrap;
  gap: 56px;
  align-items: center;
  justify-content: center;
}

.about-photo {
  flex: 1 1 420px;
  height: 360px;
  border-radius: var(--radius-md);
  background-color: #24332E;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #A9B5AF;
  font-size: 14px;
}

.about-content {
  flex: 1 1 420px;
  max-width: 720px;
  margin: 48px 0;
  display: flex;
  flex-direction: column;
  gap: 20px;
}

.about-content .label {
  color: var(--brass-500);
}

.about-content blockquote {
  font-family: var(--font-serif);
  font-size: clamp(24px, 2.4vw, 30px);
  line-height: 1.4;
  font-weight: 400;
  color: var(--paper);
}

.about-content .attribution {
  font-size: 15px;
  color: #A9B5AF;
}

.about-content a {
  color: var(--paper);
  font-weight: 500;
}

/* === FAQ === */
.faq {
  display: flex;
  flex-wrap: wrap;
  gap: 40px;
}

.faq-header {
  flex: 1 1 280px;
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.faq-list {
  flex: 2 1 560px;
  display: flex;
  flex-direction: column;
  border-top: 1px solid var(--line);
}

.faq-item {
  border-bottom: 1px solid var(--line);
  padding: 22px 0;
}

.faq-item summary {
  font-family: var(--font-sans);
  font-size: 18px;
  font-weight: 600;
  cursor: pointer;
  list-style: none;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.faq-item summary::-webkit-details-marker {
  display: none;
}

.faq-item summary::after {
  content: '+';
  font-size: 24px;
  font-weight: 300;
  color: var(--muted);
  transition: transform 0.2s ease;
}

.faq-item[open] summary::after {
  content: '−';
}

.faq-item p {
  margin-top: 12px;
  font-size: 16px;
  line-height: 1.6;
  color: var(--ink-2);
}

/* === CTA Banner === */
.cta-banner {
  background-color: var(--evergreen-700);
  color: var(--surface);
}

.cta-inner {
  padding: 72px 0;
  display: flex;
  flex-wrap: wrap;
  gap: 32px;
  align-items: center;
  justify-content: space-between;
}

.cta-inner h2 {
  font-size: clamp(28px, 3vw, 38px);
  line-height: 1.15;
  max-width: 620px;
  color: var(--surface);
}

.cta-buttons {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
}

.btn-cta-primary {
  height: 52px;
  padding: 0 24px;
  border-radius: var(--radius-sm);
  background-color: var(--surface);
  color: var(--evergreen-700);
  text-decoration: none;
  font-weight: 600;
  display: inline-flex;
  align-items: center;
}

.btn-cta-primary:hover {
  background-color: var(--evergreen-50);
  color: var(--evergreen-700);
}

.btn-cta-secondary {
  height: 52px;
  padding: 0 24px;
  border-radius: var(--radius-sm);
  border: 1px solid var(--evergreen-100);
  color: var(--surface);
  text-decoration: none;
  font-weight: 500;
  display: inline-flex;
  align-items: center;
  background: transparent;
}

.btn-cta-secondary:hover {
  background-color: rgba(255, 255, 255, 0.1);
  color: var(--surface);
}

/* === Footer === */
.footer {
  background-color: var(--paper);
  border-top: 1px solid var(--line);
}

.footer-inner {
  padding: 40px 0;
  display: flex;
  flex-wrap: wrap;
  gap: 40px;
  justify-content: space-between;
  align-items: flex-start;
  font-size: 14px;
  color: var(--muted);
}

.footer-brand {
  display: flex;
  flex-direction: column;
  gap: 6px;
  max-width: 420px;
}

.footer-brand .logo-text {
  font-size: 18px;
  color: var(--ink);
  margin-bottom: 4px;
}

.footer-nav {
  display: flex;
  gap: 20px;
  flex-wrap: wrap;
  align-items: center;
}

.footer-nav a {
  color: var(--ink-2);
  font-size: 14px;
}

/* === Thank You State === */
.thank-you {
  text-align: center;
  padding: var(--space-16) var(--space-6);
  max-width: 600px;
  margin: 0 auto;
}

.thank-you h2 {
  margin-bottom: var(--space-4);
}

.thank-you p {
  margin-bottom: var(--space-6);
  color: var(--ink-2);
}

/* === Accessibility === */
.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;
}

/* Focus styles for keyboard navigation */
:focus-visible {
  outline: 2px solid var(--evergreen-700);
  outline-offset: 2px;
}

/* Skip to content link */
.skip-link {
  position: absolute;
  top: -40px;
  left: 0;
  background: var(--evergreen-700);
  color: var(--surface);
  padding: 8px 16px;
  z-index: 100;
  transition: top 0.2s ease;
}

.skip-link:focus {
  top: 0;
}

/* === Responsive === */
@media (max-width: 1023px) {
  .nav {
    display: none;
  }
  
  .menu-toggle {
    display: inline-flex;
  }
  
  .phone-text {
    display: none;
  }
  
  .hero {
    padding-top: 48px;
    padding-bottom: 56px;
  }

  .header-inner {
    flex-wrap: wrap;
  }

  .nav {
    flex-basis: 100%;
    flex-direction: column;
    gap: 0;
  }

  .nav a {
    padding: 12px 0;
  }
}

@media (max-width: 767px) {
  .header-cta {
    display: none;
  }
  
  .hero {
    flex-direction: column;
    gap: 32px;
    padding-top: 32px;
    padding-bottom: 40px;
  }
  
  .hero-form {
    max-width: 100%;
  }
  
  .section {
    padding-block: var(--space-16);
  }
  
  .steps {
    grid-template-columns: 1fr;
  }
  
  .cards-grid {
    grid-template-columns: 1fr;
  }
  
  .comparison {
    flex-direction: column;
    gap: 24px;
  }
  
  .comparison-table {
    width: 100%;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
  }
  
  .about {
    flex-direction: column;
  }
  
  .faq {
    flex-direction: column;
  }
  
  .cta-inner {
    flex-direction: column;
    text-align: center;
  }
  
  .cta-buttons {
    justify-content: center;
  }
  
  .footer-inner {
    flex-direction: column;
    gap: 24px;
  }

  .card,
  .sale-card {
    padding: 20px;
  }

  .about {
    gap: 32px;
  }

  body {
    overflow-wrap: break-word;
  }
}

/* === Narrow viewports: keep the Turnstile widget inside the viewport ===
   The Turnstile widget has a fixed minimum width of 300px (data-size
   "flexible" = 100%, min 300px), wider than the form's content box below
   ~406px. Left-aligned, it forced document-level horizontal scrolling
   below 353px viewports. Center the 300px widget in the viewport instead
   (margin resolves against the form content box, which is centered):
   no document overflow, nothing clipped or hidden, full-size controls. */
@media (max-width: 405px) {
  .hero-form .cf-turnstile {
    width: 300px;
    margin-left: calc(50% - 150px);
  }
}

/* === Reduced Motion === */
@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
    scroll-behavior: auto !important;
  }
}

/* === Print Styles === */
@media print {
  .header,
  .cta-banner,
  .menu-toggle,
  .btn-primary,
  .btn-submit {
    display: none;
  }
  
  body {
    color: #000;
    background: #fff;
  }
  
  a {
    color: #000;
    text-decoration: underline;
  }
}