/* =============================================================
   ENERGIATODISTUS - Main Stylesheet
   Font: Manrope (Google Fonts)
   Color system: CSS custom properties for easy brand updates
   ============================================================= */

/* ------------------------------------------------------------------
   CUSTOM PROPERTIES (design tokens)
   ------------------------------------------------------------------ */
:root {
  /* Brand colors */
  --primary:        #38A169;   /* Main green – buttons, highlights */
  --primary-dark:   #2F855A;   /* Hover state, headings accent */
  --primary-light:  #F0FFF4;   /* Light green backgrounds */
  --primary-mid:    #68D391;   /* Softer green for decorative use */

  /* Neutral palette */
  --text:           #1A202C;   /* Primary body text */
  --text-secondary: #718096;   /* Captions, hints, secondary info */
  --bg:             #FFFFFF;
  --bg-alt:         #F7FAFC;   /* Alternating section background */
  --border:         #E2E8F0;
  --white:          #FFFFFF;

  /* Status colors */
  --error:          #E53E3E;
  --error-light:    #FFF5F5;
  --success:        #38A169;

  /* Typography */
  --font:           'Manrope', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  --text-xs:        0.75rem;    /* 12px */
  --text-sm:        0.875rem;   /* 14px */
  --text-base:      1rem;       /* 16px */
  --text-lg:        1.125rem;   /* 18px */
  --text-xl:        1.25rem;    /* 20px */
  --text-2xl:       1.5rem;     /* 24px */
  --text-3xl:       1.875rem;   /* 30px */
  --text-4xl:       2.25rem;    /* 36px */
  --text-5xl:       3rem;       /* 48px */

  /* Spacing */
  --space-1:        0.25rem;
  --space-2:        0.5rem;
  --space-3:        0.75rem;
  --space-4:        1rem;
  --space-5:        1.25rem;
  --space-6:        1.5rem;
  --space-8:        2rem;
  --space-10:       2.5rem;
  --space-12:       3rem;
  --space-16:       4rem;
  --space-20:       5rem;
  --space-24:       6rem;

  /* Layout */
  --max-width:      1100px;
  --nav-height:     64px;

  /* Shape */
  --radius-sm:      4px;
  --radius:         8px;
  --radius-lg:      12px;
  --radius-xl:      16px;
  --radius-full:    9999px;

  /* Shadows */
  --shadow-sm:      0 1px 3px rgba(0,0,0,0.08), 0 1px 2px rgba(0,0,0,0.05);
  --shadow:         0 4px 12px rgba(0,0,0,0.08), 0 2px 4px rgba(0,0,0,0.04);
  --shadow-lg:      0 10px 30px rgba(0,0,0,0.1), 0 4px 8px rgba(0,0,0,0.05);
  --shadow-xl:      0 20px 50px rgba(0,0,0,0.12);

  /* Transitions */
  --transition:     150ms ease;
  --transition-md:  250ms ease;
}

/* ------------------------------------------------------------------
   RESET & BASE
   ------------------------------------------------------------------ */
*, *::before, *::after { box-sizing: border-box; }

html {
  font-size: 16px;
  scroll-behavior: smooth;
  /* Offset anchor links so sticky nav doesn't cover headings */
  scroll-padding-top: calc(var(--nav-height) + 1rem);
}

body {
  margin: 0;
  font-family: var(--font);
  font-size: var(--text-base);
  line-height: 1.6;
  color: var(--text);
  background: var(--bg);
  -webkit-font-smoothing: antialiased;
}

img, svg { display: block; max-width: 100%; }

h1, h2, h3, h4 {
  margin: 0 0 var(--space-4);
  line-height: 1.25;
  font-weight: 700;
}

h1 { font-size: var(--text-4xl); }
h2 { font-size: var(--text-3xl); }
h3 { font-size: var(--text-xl); }

p { margin: 0 0 var(--space-4); }
p:last-child { margin-bottom: 0; }

a { color: var(--primary-dark); text-decoration: underline; }
a:hover { color: var(--primary); }

ul, ol { margin: 0; padding: 0; }
li { list-style: none; }

/* ------------------------------------------------------------------
   LAYOUT HELPERS
   ------------------------------------------------------------------ */
.container {
  width: 100%;
  max-width: var(--max-width);
  margin-inline: auto;
  padding-inline: var(--space-6);
}

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

.section--alt {
  background: var(--bg-alt);
}

.section-header {
  text-align: center;
  max-width: 680px;
  margin-inline: auto;
  margin-bottom: var(--space-12);
}

.section-header h2 { margin-bottom: var(--space-3); }
.section-header p { color: var(--text-secondary); font-size: var(--text-lg); }

.text-center { text-align: center; }
.mt-2 { margin-top: var(--space-2); }
.mt-4 { margin-top: var(--space-4); }

/* ------------------------------------------------------------------
   BUTTONS
   ------------------------------------------------------------------ */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: var(--space-2);
  padding: 0.625rem 1.25rem;
  font-family: var(--font);
  font-size: var(--text-base);
  font-weight: 600;
  line-height: 1;
  border-radius: var(--radius);
  border: 2px solid transparent;
  cursor: pointer;
  text-decoration: none;
  transition: background var(--transition), border-color var(--transition), color var(--transition), box-shadow var(--transition);
  white-space: nowrap;
}

.btn--primary {
  background: var(--primary);
  color: var(--white);
  border-color: var(--primary);
}
.btn--primary:hover {
  background: var(--primary-dark);
  border-color: var(--primary-dark);
  color: var(--white);
}

.btn--outline {
  background: transparent;
  color: var(--primary-dark);
  border-color: var(--primary);
}
.btn--outline:hover {
  background: var(--primary-light);
}

.btn--ghost {
  background: transparent;
  color: var(--primary-dark);
  border-color: transparent;
}
.btn--ghost:hover {
  background: var(--primary-light);
  border-color: transparent;
}

.btn--lg  { padding: 0.875rem 1.75rem; font-size: var(--text-lg); }
.btn--sm  { padding: 0.5rem 1rem; font-size: var(--text-sm); }
.btn--full { width: 100%; }

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

[hidden] { display: none !important; }

.btn__spinner {
  width: 20px;
  height: 20px;
  animation: spin 0.8s linear infinite;
}

@keyframes spin { to { transform: rotate(360deg); } }

/* ------------------------------------------------------------------
   BADGE
   ------------------------------------------------------------------ */
.badge {
  display: inline-block;
  padding: 0.25rem 0.75rem;
  background: var(--primary-light);
  color: var(--primary-dark);
  font-size: var(--text-sm);
  font-weight: 700;
  border-radius: var(--radius-full);
  margin-bottom: var(--space-4);
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.badge--secondary {
  background: #EBF8FF;
  color: #2C5282;
}

/* ------------------------------------------------------------------
   NAVIGATION
   ------------------------------------------------------------------ */
.nav {
  position: sticky;
  top: 0;
  z-index: 100;
  background: rgba(255, 255, 255, 0.95);
  backdrop-filter: blur(8px);
  border-bottom: 1px solid var(--border);
  height: var(--nav-height);
  display: flex;
  align-items: center;
}

.nav__inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.nav__logo {
  display: flex;
  align-items: center;
  gap: var(--space-2);
  text-decoration: none;
  color: var(--text);
}

.nav__logo-icon { width: 32px; height: 32px; flex-shrink: 0; }

.nav__logo-text {
  font-size: var(--text-lg);
  font-weight: 800;
  color: var(--text);
}

/* ------------------------------------------------------------------
   HERO
   ------------------------------------------------------------------ */
.hero {
  padding-block: var(--space-20);
  background: linear-gradient(135deg, var(--bg) 0%, var(--primary-light) 100%);
  overflow: hidden;
}

.hero__inner {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: var(--space-12);
  align-items: center;
}

.hero__content { max-width: 540px; }

.hero__title {
  font-size: var(--text-5xl);
  font-weight: 800;
  line-height: 1.1;
  margin-bottom: var(--space-5);
}

.hero__subtitle {
  font-size: var(--text-lg);
  color: var(--text-secondary);
  margin-bottom: var(--space-8);
  line-height: 1.7;
}

.hero__actions {
  display: flex;
  gap: var(--space-3);
  flex-wrap: wrap;
  margin-bottom: var(--space-8);
}

.hero__trust-list {
  display: flex;
  flex-direction: column;
  gap: var(--space-2);
}

.hero__trust-list li {
  display: flex;
  align-items: center;
  gap: var(--space-2);
  font-size: var(--text-sm);
  color: var(--text-secondary);
  font-weight: 500;
}

.hero__trust-list li svg {
  width: 16px;
  height: 16px;
  color: var(--primary);
  flex-shrink: 0;
}

.hero__visual {
  display: flex;
  justify-content: center;
  align-items: center;
}

.cert-svg {
  width: 100%;
  max-width: 340px;
}

/* ------------------------------------------------------------------
   TRUST BAR
   ------------------------------------------------------------------ */
.trust-bar {
  background: var(--white);
  border-block: 1px solid var(--border);
  padding-block: var(--space-8);
}

.trust-bar__list {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: var(--space-6);
}

.trust-bar__item {
  display: flex;
  align-items: flex-start;
  gap: var(--space-3);
}

.trust-bar__icon {
  width: 24px;
  height: 24px;
  color: var(--primary);
  flex-shrink: 0;
  margin-top: 2px;
}

.trust-bar__item strong {
  display: block;
  font-size: var(--text-sm);
  font-weight: 700;
  margin-bottom: var(--space-1);
}

.trust-bar__item span {
  display: block;
  font-size: var(--text-xs);
  color: var(--text-secondary);
  line-height: 1.4;
}

/* ------------------------------------------------------------------
   CARDS (building types)
   ------------------------------------------------------------------ */
.cards--3 {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: var(--space-6);
}

.card {
  background: var(--white);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: var(--space-8);
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: var(--space-4);
  transition: box-shadow var(--transition-md), transform var(--transition-md);
}

.card:hover {
  box-shadow: var(--shadow-lg);
  transform: translateY(-2px);
}

.card--featured {
  border-color: var(--primary);
  box-shadow: var(--shadow);
  position: relative;
}

.card--featured::before {
  content: 'Suosittu';
  position: absolute;
  top: -12px;
  left: 50%;
  transform: translateX(-50%);
  background: var(--primary);
  color: var(--white);
  font-size: var(--text-xs);
  font-weight: 700;
  padding: 0.25rem 0.75rem;
  border-radius: var(--radius-full);
  white-space: nowrap;
}

.card__icon-wrap {
  background: var(--primary-light);
  border-radius: var(--radius);
  padding: var(--space-3);
}

.card__icon { width: 48px; height: 48px; }

.card h3 { margin-bottom: 0; }

.card p {
  color: var(--text-secondary);
  font-size: var(--text-sm);
  flex: 1;
}

.card__price {
  display: flex;
  align-items: baseline;
  gap: var(--space-2);
}

.card__price-from {
  font-size: var(--text-xs);
  color: var(--text-secondary);
}

.card__price-value {
  font-size: var(--text-2xl);
  font-weight: 800;
  color: var(--primary-dark);
}

/* ------------------------------------------------------------------
   HOW IT WORKS (steps)
   ------------------------------------------------------------------ */
.steps {
  display: flex;
  flex-direction: column;
  gap: 0;
  max-width: 700px;
  margin-inline: auto;
  counter-reset: none;
}

.step {
  display: flex;
  gap: var(--space-6);
  position: relative;
  padding-bottom: var(--space-10);
}

/* Vertical connector line between steps */
.step:not(:last-child)::after {
  content: '';
  position: absolute;
  left: 23px;
  top: 48px;
  bottom: 0;
  width: 2px;
  background: var(--border);
}

.step__number {
  width: 48px;
  height: 48px;
  border-radius: var(--radius-full);
  background: var(--primary);
  color: var(--white);
  font-size: var(--text-lg);
  font-weight: 800;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  position: relative;
  z-index: 1;
}

.step__content h3 { margin-bottom: var(--space-2); }
.step__content p { color: var(--text-secondary); }

/* ------------------------------------------------------------------
   ORDER FORM LAYOUT
   ------------------------------------------------------------------ */
.order-layout {
  display: grid;
  grid-template-columns: 1fr 320px;
  gap: var(--space-8);
  align-items: start;
}

/* ------------------------------------------------------------------
   ORDER FORM
   ------------------------------------------------------------------ */
.order-form {
  background: var(--white);
  border: 1px solid var(--border);
  border-radius: var(--radius-xl);
  overflow: hidden;
}

/* Hide honeypot from humans */
.honeypot {
  position: absolute;
  left: -9999px;
  width: 1px;
  height: 1px;
  overflow: hidden;
}

.form-section {
  border: none;
  padding: var(--space-8);
  border-bottom: 1px solid var(--border);
}

.form-section:last-of-type { border-bottom: none; }

.form-section__title {
  display: flex;
  align-items: center;
  gap: var(--space-3);
  font-size: var(--text-lg);
  font-weight: 700;
  color: var(--text);
  margin-bottom: var(--space-5);
  padding: 0;
}

.form-section__number {
  width: 28px;
  height: 28px;
  border-radius: var(--radius-full);
  background: var(--primary);
  color: var(--white);
  font-size: var(--text-sm);
  font-weight: 700;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

/* Building type selection cards */
.building-type-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: var(--space-3);
}

.building-type-card {
  cursor: pointer;
  display: block;
}

.building-type-card input[type="radio"] {
  position: absolute;
  opacity: 0;
  width: 0;
  height: 0;
}

.building-type-card__inner {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: var(--space-2);
  padding: var(--space-5);
  border: 2px solid var(--border);
  border-radius: var(--radius-lg);
  transition: border-color var(--transition), background var(--transition), box-shadow var(--transition);
  color: var(--text-secondary);
  font-weight: 600;
  font-size: var(--text-sm);
  text-align: center;
}

.building-type-card__inner svg {
  width: 40px;
  height: 40px;
  color: var(--text-secondary);
  transition: color var(--transition);
}

.building-type-card:hover .building-type-card__inner {
  border-color: var(--primary);
  background: var(--primary-light);
}

.building-type-card input:checked + .building-type-card__inner {
  border-color: var(--primary);
  background: var(--primary-light);
  color: var(--primary-dark);
  box-shadow: 0 0 0 3px rgba(56, 161, 105, 0.15);
}

.building-type-card input:checked + .building-type-card__inner svg {
  color: var(--primary-dark);
}

.building-type-card input:focus-visible + .building-type-card__inner {
  outline: 3px solid var(--primary);
  outline-offset: 2px;
}

/* Radio options (size selection) */
.radio-group {
  display: flex;
  flex-direction: column;
  gap: var(--space-2);
}

.radio-option {
  display: flex;
  align-items: center;
  cursor: pointer;
}

.radio-option input[type="radio"] {
  width: 18px;
  height: 18px;
  accent-color: var(--primary);
  margin-right: var(--space-3);
  cursor: pointer;
  flex-shrink: 0;
}

.radio-option__label {
  font-size: var(--text-base);
  padding: var(--space-3) var(--space-4);
  border: 1.5px solid var(--border);
  border-radius: var(--radius);
  width: 100%;
  transition: border-color var(--transition), background var(--transition);
  cursor: pointer;
}

.radio-option:has(input:checked) .radio-option__label {
  border-color: var(--primary);
  background: var(--primary-light);
}

.radio-option:has(input:focus-visible) .radio-option__label {
  outline: 3px solid var(--primary);
}

/* Checkbox options */
.checkbox-group { display: flex; flex-direction: column; gap: var(--space-3); }

.checkbox-option {
  display: flex;
  align-items: flex-start;
  gap: var(--space-3);
  cursor: pointer;
}

.checkbox-option input[type="checkbox"] {
  width: 18px;
  height: 18px;
  accent-color: var(--primary);
  cursor: pointer;
  margin-top: 2px;
  flex-shrink: 0;
}

.checkbox-option__label {
  font-size: var(--text-sm);
  color: var(--text-secondary);
  display: flex;
  align-items: center;
  gap: var(--space-2);
  flex-wrap: wrap;
}

/* Document check rows */
.doc-check-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--space-4);
  padding: var(--space-3) 0;
  border-bottom: 1px solid var(--border);
}

.doc-check-row:first-child { border-top: 1px solid var(--border); }

.doc-check-label {
  font-weight: 600;
  font-size: var(--text-sm);
  flex-shrink: 0;
}

.doc-check-options {
  display: flex;
  gap: var(--space-2);
}

.radio-pill {
  cursor: pointer;
  font-size: var(--text-xs);
  font-weight: 600;
}

.radio-pill input[type="radio"] {
  position: absolute;
  opacity: 0;
  width: 0;
  height: 0;
}

.radio-pill span {
  display: none; /* label text is inline after input */
}

.radio-pill {
  display: inline-flex;
  align-items: center;
  padding: 0.3rem 0.7rem;
  border: 1.5px solid var(--border);
  border-radius: var(--radius-full);
  color: var(--text-secondary);
  transition: border-color var(--transition), background var(--transition), color var(--transition);
}

.radio-pill:has(input:checked) {
  border-color: var(--primary);
  background: var(--primary-light);
  color: var(--primary-dark);
}

/* Form fields */
.form-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: var(--space-4);
}

.form-group { margin-bottom: var(--space-4); }
.form-group--wide { grid-column: 1 / -1; }

.form-label {
  display: block;
  font-size: var(--text-sm);
  font-weight: 600;
  color: var(--text);
  margin-bottom: var(--space-2);
  display: flex;
  align-items: center;
  gap: var(--space-2);
}

.required { color: var(--error); }
.optional { font-weight: 400; color: var(--text-secondary); font-size: var(--text-sm); }

.form-control {
  width: 100%;
  padding: 0.625rem 0.875rem;
  font-family: var(--font);
  font-size: var(--text-base);
  color: var(--text);
  background: var(--white);
  border: 1.5px solid var(--border);
  border-radius: var(--radius);
  transition: border-color var(--transition), box-shadow var(--transition);
  appearance: none;
  -webkit-appearance: none;
}

.form-control:focus {
  outline: none;
  border-color: var(--primary);
  box-shadow: 0 0 0 3px rgba(56, 161, 105, 0.15);
}

.form-control.is-invalid {
  border-color: var(--error);
  box-shadow: 0 0 0 3px rgba(229, 62, 62, 0.1);
}

select.form-control {
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 20 20' fill='%23718096'%3E%3Cpath fill-rule='evenodd' d='M5.293 7.293a1 1 0 011.414 0L10 10.586l3.293-3.293a1 1 0 111.414 1.414l-4 4a1 1 0 01-1.414 0l-4-4a1 1 0 010-1.414z'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 0.75rem center;
  background-size: 16px;
  padding-right: 2.5rem;
}

textarea.form-control { resize: vertical; }

.form-hint {
  font-size: var(--text-xs);
  color: var(--text-secondary);
  margin-top: var(--space-1);
  margin-bottom: 0;
}

.form-error {
  font-size: var(--text-xs);
  color: var(--error);
  margin-top: var(--space-1);
  font-weight: 500;
  min-height: 1rem;
}

/* Region notice */
.region-notice {
  display: flex;
  align-items: flex-start;
  gap: var(--space-2);
  padding: var(--space-3) var(--space-4);
  background: #EBF8FF;
  border-radius: var(--radius);
  font-size: var(--text-sm);
  color: #2C5282;
  margin-top: var(--space-2);
}

.region-notice svg {
  width: 18px;
  height: 18px;
  flex-shrink: 0;
  margin-top: 1px;
}

/* Tooltip */
.tooltip {
  position: relative;
  display: inline-flex;
  align-items: center;
}

.tooltip svg {
  width: 16px;
  height: 16px;
  color: var(--text-secondary);
  cursor: help;
}

.tooltip__text {
  display: none;
  position: absolute;
  bottom: calc(100% + 8px);
  left: 50%;
  transform: translateX(-50%);
  width: 260px;
  background: var(--text);
  color: var(--white);
  font-size: var(--text-xs);
  font-weight: 400;
  padding: var(--space-3) var(--space-4);
  border-radius: var(--radius);
  line-height: 1.5;
  z-index: 10;
  pointer-events: none;
}

.tooltip__text::after {
  content: '';
  position: absolute;
  top: 100%;
  left: 50%;
  transform: translateX(-50%);
  border: 5px solid transparent;
  border-top-color: var(--text);
}

.tooltip:hover .tooltip__text,
.tooltip:focus-within .tooltip__text {
  display: block;
}

/* ------------------------------------------------------------------
   ORDER SUMMARY BLOCK
   ------------------------------------------------------------------ */
.order-summary {
  padding: var(--space-8);
  background: var(--primary-light);
  border-top: 1px solid var(--border);
}

.order-summary__price-block {
  display: flex;
  align-items: baseline;
  gap: var(--space-3);
  margin-bottom: var(--space-4);
  flex-wrap: wrap;
}

.order-summary__label {
  font-size: var(--text-sm);
  font-weight: 600;
  color: var(--text-secondary);
}

.order-summary__price {
  font-size: var(--text-4xl);
  font-weight: 800;
  color: var(--primary-dark);
}

.order-summary__vat {
  font-size: var(--text-xs);
  color: var(--text-secondary);
  width: 100%;
  margin-top: calc(-1 * var(--space-3));
}

.order-summary__details {
  font-size: var(--text-sm);
  color: var(--text-secondary);
  margin-bottom: var(--space-5);
  line-height: 1.8;
}

.order-summary__note {
  text-align: center;
  font-size: var(--text-xs);
  color: var(--text-secondary);
  margin-top: var(--space-3);
}

/* ------------------------------------------------------------------
   PRICE SIDEBAR
   ------------------------------------------------------------------ */
.price-sidebar {
  position: sticky;
  top: calc(var(--nav-height) + var(--space-4));
}

.price-sidebar__inner {
  background: var(--white);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: var(--space-6);
}

.price-sidebar__title {
  font-size: var(--text-base);
  font-weight: 700;
  margin-bottom: var(--space-4);
  color: var(--text);
}

.price-sidebar__empty {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: var(--space-3);
  text-align: center;
  padding: var(--space-6) 0;
}

.price-sidebar__empty svg { width: 48px; height: 48px; opacity: 0.4; }
.price-sidebar__empty p { font-size: var(--text-sm); color: var(--text-secondary); }

.price-sidebar__row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: var(--text-sm);
  padding-block: var(--space-2);
  border-bottom: 1px solid var(--border);
  color: var(--text-secondary);
}

.price-sidebar__total {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: var(--text-lg);
  font-weight: 800;
  padding-top: var(--space-3);
  color: var(--primary-dark);
}

.price-sidebar__vat {
  font-size: var(--text-xs);
  color: var(--text-secondary);
  margin-top: var(--space-2);
  text-align: right;
}

/* ------------------------------------------------------------------
   FORM SUCCESS & ERROR STATES
   ------------------------------------------------------------------ */
.form-success {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: var(--space-4);
  text-align: center;
  padding: var(--space-12) var(--space-8);
}

.form-success svg { width: 56px; height: 56px; }
.form-success h3 { font-size: var(--text-2xl); color: var(--primary-dark); }
.form-success p { color: var(--text-secondary); max-width: 420px; }

/* Small inline success for agent form */
.agent-form .form-success {
  flex-direction: row;
  text-align: left;
  padding: var(--space-3) var(--space-4);
  background: var(--primary-light);
  border-radius: var(--radius);
  font-size: var(--text-sm);
  font-weight: 600;
  color: var(--primary-dark);
}

.agent-form .form-success svg { width: 20px; height: 20px; flex-shrink: 0; }

.form-alert {
  display: flex;
  align-items: center;
  gap: var(--space-3);
  padding: var(--space-4);
  border-radius: var(--radius);
  font-size: var(--text-sm);
  font-weight: 500;
  margin: var(--space-4) var(--space-8) var(--space-8);
}

.form-alert--error {
  background: var(--error-light);
  color: var(--error);
  border: 1px solid #FED7D7;
}

.form-alert svg { width: 20px; height: 20px; flex-shrink: 0; }

/* ------------------------------------------------------------------
   REAL ESTATE AGENT SECTION
   ------------------------------------------------------------------ */
.agent-section {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: var(--space-12);
  align-items: start;
}

.agent-section__content .badge { margin-bottom: var(--space-4); }
.agent-section__content h2 { margin-bottom: var(--space-4); }
.agent-section__content p { color: var(--text-secondary); }

.agent-section__benefits {
  display: flex;
  flex-direction: column;
  gap: var(--space-3);
  margin-top: var(--space-5);
}

.agent-section__benefits li {
  display: flex;
  align-items: center;
  gap: var(--space-2);
  font-size: var(--text-sm);
  font-weight: 600;
}

.agent-section__benefits li svg {
  width: 16px;
  height: 16px;
  color: var(--primary);
  flex-shrink: 0;
}

.agent-section__form-wrap {
  background: var(--white);
  border: 1px solid var(--border);
  border-radius: var(--radius-xl);
  padding: var(--space-8);
}

.agent-form h3 { margin-bottom: var(--space-2); }
.agent-form > p { color: var(--text-secondary); font-size: var(--text-sm); margin-bottom: var(--space-6); }

/* ------------------------------------------------------------------
   FAQ ACCORDION
   ------------------------------------------------------------------ */
.faq {
  max-width: 780px;
  margin-inline: auto;
}

.faq__item {
  border-bottom: 1px solid var(--border);
}

.faq__question {
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--space-4);
  padding: var(--space-5) 0;
  background: none;
  border: none;
  font-family: var(--font);
  font-size: var(--text-base);
  font-weight: 600;
  color: var(--text);
  cursor: pointer;
  text-align: left;
  transition: color var(--transition);
}

.faq__question:hover { color: var(--primary-dark); }

.faq__chevron {
  width: 20px;
  height: 20px;
  color: var(--text-secondary);
  flex-shrink: 0;
  transition: transform var(--transition-md);
}

.faq__question[aria-expanded="true"] .faq__chevron {
  transform: rotate(180deg);
  color: var(--primary);
}

.faq__answer {
  padding: 0 0 var(--space-5);
  color: var(--text-secondary);
  line-height: 1.7;
  font-size: var(--text-sm);
}

/* ------------------------------------------------------------------
   TESTIMONIALS
   ------------------------------------------------------------------ */
.testimonials {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: var(--space-6);
}

.testimonial {
  background: var(--white);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: var(--space-6);
  display: flex;
  flex-direction: column;
  gap: var(--space-4);
  transition: box-shadow var(--transition-md);
}

.testimonial:hover { box-shadow: var(--shadow); }

.testimonial__stars {
  color: #ECC94B;
  font-size: var(--text-lg);
  letter-spacing: 2px;
}

.testimonial blockquote {
  margin: 0;
  padding: 0;
  font-size: var(--text-sm);
  color: var(--text-secondary);
  line-height: 1.7;
  flex: 1;
}

.testimonial blockquote p { margin: 0; }

.testimonial footer {
  border-top: 1px solid var(--border);
  padding-top: var(--space-3);
}

.testimonial footer strong {
  display: block;
  font-size: var(--text-sm);
  color: var(--text);
}

.testimonial footer span {
  font-size: var(--text-xs);
  color: var(--text-secondary);
}

/* ------------------------------------------------------------------
   FOOTER
   ------------------------------------------------------------------ */
.footer {
  background: var(--text);
  color: rgba(255,255,255,0.7);
  padding-block: var(--space-12);
}

.footer__inner {
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  gap: var(--space-8);
  align-items: start;
}

.footer__brand .nav__logo-text { color: var(--white); }
.footer__brand .nav__logo { margin-bottom: var(--space-3); }
.footer__brand p { font-size: var(--text-sm); margin: 0; }

.footer__links {
  display: flex;
  flex-direction: column;
  gap: var(--space-2);
  align-items: center;
}

.footer__links a {
  color: rgba(255,255,255,0.7);
  text-decoration: none;
  font-size: var(--text-sm);
  transition: color var(--transition);
}

.footer__links a:hover { color: var(--white); }

.footer__legal {
  text-align: right;
}

.footer__legal p {
  font-size: var(--text-xs);
  margin-bottom: var(--space-2);
  display: flex;
  gap: var(--space-4);
  justify-content: flex-end;
  flex-wrap: wrap;
}

.footer__legal a {
  color: rgba(255,255,255,0.7);
  font-size: var(--text-xs);
  transition: color var(--transition);
}

.footer__legal a:hover { color: var(--white); }

/* ------------------------------------------------------------------
   RESPONSIVE: TABLET (max 960px)
   ------------------------------------------------------------------ */
@media (max-width: 960px) {
  h1 { font-size: var(--text-4xl); }
  h2 { font-size: var(--text-2xl); }

  .hero__inner {
    grid-template-columns: 1fr;
    text-align: center;
  }

  .hero__content { max-width: 100%; }
  .hero__actions { justify-content: center; }
  .hero__trust-list { align-items: center; }
  .hero__visual { margin-top: var(--space-8); }
  .cert-svg { max-width: 260px; }

  .trust-bar__list { grid-template-columns: 1fr 1fr; }

  .cards--3 { grid-template-columns: 1fr; max-width: 400px; margin-inline: auto; }

  .order-layout {
    grid-template-columns: 1fr;
  }

  .price-sidebar {
    position: static;
    order: -1;
  }

  .agent-section { grid-template-columns: 1fr; }
  .testimonials { grid-template-columns: 1fr; max-width: 500px; margin-inline: auto; }

  .footer__inner {
    grid-template-columns: 1fr;
    text-align: center;
    gap: var(--space-6);
  }

  .footer__links { flex-direction: row; flex-wrap: wrap; justify-content: center; }
  .footer__legal { text-align: center; }
  .footer__legal p { justify-content: center; }
  .footer__brand .nav__logo { justify-content: center; }
}

/* ------------------------------------------------------------------
   RESPONSIVE: MOBILE (max 640px)
   ------------------------------------------------------------------ */
@media (max-width: 640px) {
  :root { --nav-height: 56px; }

  .container { padding-inline: var(--space-4); }

  h1 { font-size: var(--text-3xl); }
  h2 { font-size: var(--text-2xl); }

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

  .hero { padding-block: var(--space-12); }
  .hero__actions { flex-direction: column; }
  .hero__actions .btn { width: 100%; justify-content: center; }

  .trust-bar__list { grid-template-columns: 1fr; }

  .building-type-grid { grid-template-columns: 1fr; }

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

  .doc-check-row {
    flex-direction: column;
    align-items: flex-start;
    gap: var(--space-2);
  }

  .form-section { padding: var(--space-5); }
  .order-summary { padding: var(--space-5); }

  .testimonials { grid-template-columns: 1fr; }

  .footer__inner { gap: var(--space-4); }

  /* Hero title: force centering and prevent overflow */
  .hero__title {
    text-align: center;
    overflow-wrap: break-word;
    word-break: break-word;
  }

  /* Tooltip on mobile: show as fixed bottom panel to avoid viewport overflow */
  .tooltip__text {
    position: fixed;
    bottom: 20%;
    left: var(--space-4);
    right: var(--space-4);
    top: auto;
    width: auto;
    transform: none;
    font-size: var(--text-sm);
    padding: var(--space-4);
    border-radius: var(--radius);
    z-index: 200;
  }
  .tooltip__text::after {
    display: none;
  }
}

/* ------------------------------------------------------------------
   PRINT (minimal print styles)
   ------------------------------------------------------------------ */
@media print {
  .nav, .hero__actions, .btn, .footer { display: none; }
  .hero { padding-top: 0; }
}
