/* ==========================================================================
   Page-Specific Styles
   ========================================================================== */

/* ---- Home: Hero ---- */
.home-hero {
  min-height: 90vh;
  background-color: var(--brand-dark);
  position: relative;
}

.home-hero__pattern {
  position: absolute;
  inset: 0;
  opacity: 0.04;
  background-image:
    radial-gradient(circle at 20% 30%, var(--accent-amber) 0%, transparent 50%),
    radial-gradient(circle at 80% 70%, var(--accent-blue) 0%, transparent 50%),
    radial-gradient(circle at 50% 50%, var(--accent-red) 0%, transparent 60%);
  pointer-events: none;
}

/* ---- About: Timeline ---- */
.timeline {
  position: relative;
  padding-left: var(--space-8);
}

.timeline::before {
  content: '';
  position: absolute;
  top: 0;
  bottom: 0;
  left: 14px;
  width: 2px;
  background: linear-gradient(
    180deg,
    var(--accent-amber),
    var(--accent-blue),
    var(--accent-green)
  );
}

.timeline__item {
  position: relative;
  padding-bottom: var(--space-8);
}

.timeline__item:last-child {
  padding-bottom: 0;
}

.timeline__dot {
  position: absolute;
  left: calc(-1 * var(--space-8) + 7px);
  top: 4px;
  width: 16px;
  height: 16px;
  border-radius: 50%;
  background: var(--accent-amber);
  border: 3px solid var(--brand-cream);
  box-shadow: 0 0 0 2px var(--accent-amber);
}

.timeline__date {
  font-family: var(--font-accent);
  font-size: var(--text-sm);
  font-weight: var(--weight-bold);
  color: var(--accent-amber);
  margin-bottom: var(--space-2);
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.timeline__title {
  font-family: var(--font-heading);
  font-size: var(--text-xl);
  margin-bottom: var(--space-2);
}

.timeline__desc {
  font-size: var(--text-base);
  color: var(--brand-dark-soft);
}

@media (min-width: 768px) {
  .timeline {
    padding-left: var(--space-12);
  }

  .timeline__dot {
    left: calc(-1 * var(--space-12) + 7px);
  }
}

/* ---- Appraisals: Value Factors ---- */
.value-factors {
  display: grid;
  grid-template-columns: 1fr;
  gap: var(--space-4);
}

@media (min-width: 640px) {
  .value-factors {
    grid-template-columns: repeat(2, 1fr);
  }
}

.value-factor {
  display: flex;
  align-items: flex-start;
  gap: var(--space-3);
  padding: var(--space-4);
  background: var(--brand-white);
  border-radius: var(--radius-md);
  border-left: 3px solid var(--accent-blue);
}

.value-factor__icon {
  font-size: var(--text-xl);
  flex-shrink: 0;
}

.value-factor__text {
  font-size: var(--text-sm);
  line-height: var(--leading-relaxed);
}

.value-factor__text strong {
  display: block;
  margin-bottom: var(--space-1);
  font-size: var(--text-base);
}

/* ---- Multi-Step Form Wizard ---- */
.wizard {
  background: var(--brand-white);
  border-radius: var(--radius-xl);
  padding: var(--space-6);
  box-shadow: var(--shadow-lg);
  max-width: 700px;
  margin: 0 auto;
}

@media (min-width: 768px) {
  .wizard {
    padding: var(--space-10);
  }
}

.wizard__progress {
  display: flex;
  align-items: center;
  gap: var(--space-2);
  margin-bottom: var(--space-8);
  padding: 0 var(--space-2);
}

.wizard__step-indicator {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: var(--space-2);
  position: relative;
}

.wizard__step-dot {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: var(--font-accent);
  font-size: var(--text-sm);
  font-weight: var(--weight-bold);
  background: var(--brand-tan-light);
  color: var(--brand-dark-soft);
  transition:
    background var(--duration-base) var(--ease-out),
    color var(--duration-base) var(--ease-out),
    transform var(--duration-base) var(--ease-spring);
  position: relative;
  z-index: 2;
}

.wizard__step-indicator.is-active .wizard__step-dot {
  background: var(--accent-blue);
  color: var(--brand-white);
  transform: scale(1.1);
}

.wizard__step-indicator.is-complete .wizard__step-dot {
  background: var(--accent-green);
  color: var(--brand-white);
}

.wizard__step-label {
  font-size: 0.65rem;
  font-weight: var(--weight-medium);
  color: var(--brand-dark-soft);
  text-align: center;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  display: none;
}

@media (min-width: 640px) {
  .wizard__step-label {
    display: block;
  }
}

.wizard__step-indicator.is-active .wizard__step-label {
  color: var(--accent-blue);
  font-weight: var(--weight-semibold);
}

/* Progress bar connecting dots */
.wizard__progress-line {
  flex: 1;
  height: 2px;
  background: var(--brand-tan-light);
  margin-bottom: var(--space-6);
  position: relative;
}

.wizard__progress-line__fill {
  height: 100%;
  background: var(--accent-green);
  transition: width var(--duration-slow) var(--ease-out);
  border-radius: var(--radius-full);
}

/* Wizard step content */
.wizard__panel {
  display: none;
  animation: wizard-fade 0.4s var(--ease-out);
}

.wizard__panel.is-active {
  display: block;
}

@keyframes wizard-fade {
  from {
    opacity: 0;
    transform: translateX(20px);
  }
  to {
    opacity: 1;
    transform: translateX(0);
  }
}

.wizard__panel-title {
  font-family: var(--font-heading);
  font-size: var(--text-2xl);
  margin-bottom: var(--space-2);
}

.wizard__panel-desc {
  font-size: var(--text-base);
  color: var(--brand-dark-soft);
  margin-bottom: var(--space-6);
}

/* Wizard navigation */
.wizard__nav {
  display: flex;
  justify-content: space-between;
  gap: var(--space-4);
  margin-top: var(--space-8);
  padding-top: var(--space-6);
  border-top: 1px solid var(--brand-tan-light);
}

/* Review step */
.wizard__review {
  display: flex;
  flex-direction: column;
  gap: var(--space-4);
}

.wizard__review-group {
  background: var(--brand-cream);
  border-radius: var(--radius-md);
  padding: var(--space-4);
}

.wizard__review-label {
  font-size: var(--text-xs);
  font-weight: var(--weight-semibold);
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--brand-dark-soft);
  margin-bottom: var(--space-2);
  font-family: var(--font-accent);
}

.wizard__review-value {
  font-size: var(--text-base);
  color: var(--brand-dark);
}

/* Success state */
.wizard__success {
  text-align: center;
  padding: var(--space-10) var(--space-4);
}

.wizard__success-icon {
  width: 64px;
  height: 64px;
  border-radius: 50%;
  background: var(--accent-green);
  color: var(--brand-white);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: var(--text-3xl);
  margin: 0 auto var(--space-4);
  animation: success-pop 0.5s var(--ease-spring);
}

@keyframes success-pop {
  0% { transform: scale(0); }
  50% { transform: scale(1.2); }
  100% { transform: scale(1); }
}

/* ---- Case Study Cards ---- */
.case-card {
  border-radius: var(--radius-lg);
  overflow: hidden;
  background: var(--brand-white);
  box-shadow: var(--shadow-md);
  transition:
    transform var(--duration-base) var(--ease-out),
    box-shadow var(--duration-base) var(--ease-out);
}

.case-card:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-xl);
}

.case-card__image {
  height: 220px;
  overflow: hidden;
}

.case-card__image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform var(--duration-slow) var(--ease-out);
}

.case-card:hover .case-card__image img {
  transform: scale(1.05);
}

.case-card__content {
  padding: var(--space-5);
}

.case-card__tag {
  font-family: var(--font-accent);
  font-size: var(--text-xs);
  font-weight: var(--weight-semibold);
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--accent-amber);
  margin-bottom: var(--space-2);
}

.case-card__title {
  font-family: var(--font-heading);
  font-size: var(--text-xl);
  margin-bottom: var(--space-2);
}

.case-card__excerpt {
  font-size: var(--text-sm);
  color: var(--brand-dark-soft);
  line-height: var(--leading-relaxed);
}

/* ---- Windows For Sale cards ---- */
.window-card {
  border-radius: var(--radius-lg);
  overflow: hidden;
  background: var(--brand-white);
  box-shadow: var(--shadow-md);
}

.window-card__image {
  height: 280px;
  overflow: hidden;
}

.window-card__image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.window-card__details {
  padding: var(--space-5);
}

.window-card__title {
  font-family: var(--font-heading);
  font-size: var(--text-lg);
  margin-bottom: var(--space-2);
}

.window-card__meta {
  font-size: var(--text-sm);
  color: var(--brand-dark-soft);
}

/* ---- Resources / Publications ---- */
.publication {
  display: flex;
  align-items: flex-start;
  gap: var(--space-4);
  padding: var(--space-5);
  background: var(--brand-white);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-sm);
  transition:
    box-shadow var(--duration-base) var(--ease-out);
}

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

.publication__icon {
  width: 48px;
  height: 48px;
  border-radius: var(--radius-md);
  background: var(--brand-tan-light);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: var(--text-xl);
  flex-shrink: 0;
}

.publication__title {
  font-family: var(--font-heading);
  font-size: var(--text-lg);
  margin-bottom: var(--space-1);
}

.publication__meta {
  font-size: var(--text-sm);
  color: var(--brand-dark-soft);
}

/* ---- Service Welcome Banner (contact.html) ---- */
.service-welcome {
  display: flex;
  align-items: center;
  gap: var(--space-6);
  max-width: 700px;
  margin: 0 auto var(--space-8);
  padding: var(--space-6) var(--space-8);
  background: linear-gradient(135deg, var(--accent-blue) 0%, #152c48 60%, #1a2f50 100%);
  border-radius: var(--radius-xl);
  border: 1px solid rgba(200, 146, 42, 0.4);
  box-shadow:
    0 8px 40px rgba(30, 58, 95, 0.25),
    inset 0 1px 0 rgba(255, 255, 255, 0.06);
  position: relative;
  overflow: hidden;
  animation: welcome-fade-in 0.6s var(--ease-out) both;
}

.service-welcome::before {
  content: '';
  position: absolute;
  inset: 0;
  background:
    radial-gradient(ellipse at 10% 50%, rgba(200, 146, 42, 0.12) 0%, transparent 60%),
    radial-gradient(ellipse at 90% 50%, rgba(30, 58, 95, 0.2) 0%, transparent 60%);
  pointer-events: none;
}

.service-welcome__left {
  flex-shrink: 0;
}

.service-welcome__ornament {
  width: 56px;
  height: 56px;
  background: linear-gradient(135deg, #e8c55a, #c8922a);
  border-radius: var(--radius-md);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.5rem;
  color: #fff8e8;
  box-shadow: 0 4px 16px rgba(200, 146, 42, 0.4), inset 0 1px 0 rgba(255,255,255,0.25);
  text-shadow: 0 1px 3px rgba(0,0,0,0.3);
}

.service-welcome__body {
  flex: 1;
  min-width: 0;
}

.service-welcome__eyebrow {
  font-family: var(--font-accent);
  font-size: var(--text-xs);
  font-weight: var(--weight-semibold);
  text-transform: uppercase;
  letter-spacing: 0.12em;
  color: rgba(200, 146, 42, 0.85);
  margin-bottom: var(--space-1);
}

.service-welcome__title {
  font-family: var(--font-heading);
  font-size: var(--text-2xl);
  font-weight: var(--weight-semibold);
  color: #fff8e8;
  margin-bottom: var(--space-2);
  line-height: var(--leading-snug);
}

.service-welcome__message {
  font-size: var(--text-sm);
  color: rgba(232, 223, 206, 0.8);
  line-height: var(--leading-relaxed);
  margin: 0;
}

.service-welcome__right {
  flex-shrink: 0;
  color: rgba(200, 146, 42, 0.4);
  font-size: 2rem;
  line-height: 1;
  user-select: none;
}

@keyframes welcome-fade-in {
  from {
    opacity: 0;
    transform: translateY(-12px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@media (max-width: 640px) {
  .service-welcome {
    flex-direction: column;
    text-align: center;
    gap: var(--space-4);
    padding: var(--space-5) var(--space-6);
  }
  .service-welcome__right {
    display: none;
  }
}

/* ---- Card Background Decor — decorative images flush to bottom-right ---- */
.card-bg-decor {
  position: absolute;
  right: -40px;
  bottom: 0;
  height: 90%;
  width: auto;
  max-width: 70%;
  opacity: 0.18;
  pointer-events: none;
  object-fit: contain;
  object-position: right bottom;
}

@media (max-width: 767px) {
  .card-bg-decor {
    right: -20px;
    height: 80%;
    max-width: 65%;
    opacity: 0.14;
  }
}

/* ---- Condensed Form Header — shown when arriving from a service/appraisals page ---- */
.form-header-condensed {
  text-align: center;
  margin-bottom: var(--space-6);
  padding-bottom: var(--space-5);
  border-bottom: 1px solid rgba(139, 105, 60, 0.15);
}

.form-header-condensed__title {
  font-family: var(--font-heading);
  font-size: var(--text-2xl);
  font-weight: var(--weight-semibold);
  color: var(--brand-dark);
  margin-bottom: var(--space-2);
  line-height: var(--leading-snug);
}

.form-header-condensed__desc {
  font-size: var(--text-base);
  color: var(--text-muted);
  margin: 0;
}

/* ---- Glass Reflection — site-specific overrides ---- */
.glass-reflection {
  --gr-shadow:
    0 0 0 1px rgba(139, 105, 60, 0.18),
    0 0 0 5px rgba(248, 244, 236, 0.5),
    0 0 0 6px rgba(139, 105, 60, 0.1),
    0 24px 64px rgba(42, 37, 32, 0.16);
}
