/* ============================================================
   ROOFING QUOTE — DESIGN SYSTEM
   ============================================================ */

/* --- Google Fonts Import --- */
@import url('https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600;700&family=Outfit:wght@400;500;600;700;800&display=swap');

/* --- CSS Custom Properties (Tokens) --- */
:root {
  /* Colors — Dark Palette */
  --bg-primary: #000000;
  --bg-secondary: #0c0c0e;
  --bg-card: rgba(18, 18, 20, 0.75);
  --bg-card-hover: rgba(26, 26, 30, 0.85);
  --bg-input: rgba(255, 255, 255, 0.04);
  --bg-input-focus: rgba(255, 255, 255, 0.08);

  /* Accent — Premium Electric Blue (Apple) */
  --accent-primary: #2997ff;
  --accent-secondary: #0071e3;
  --accent-glow: rgba(41, 151, 255, 0.25);
  --accent-soft: rgba(41, 151, 255, 0.08);
  --accent-gradient: linear-gradient(135deg, #2997ff 0%, #0066cc 100%);

  /* Text */
  --text-primary: #f5f5f7;
  --text-secondary: #86868b;
  --text-muted: #6e6e73;
  --text-accent: #2997ff;

  /* Borders */
  --border-subtle: rgba(255, 255, 255, 0.08);
  --border-input: rgba(255, 255, 255, 0.15);
  --border-focus: rgba(41, 151, 255, 0.5);

  /* Status */
  --success: #30d158;
  --success-bg: rgba(48, 209, 88, 0.1);
  --error: #ff453a;
  --error-bg: rgba(255, 69, 58, 0.1);
  --warning: #ffd60a;

  /* Shadows */
  --shadow-sm: 0 1px 2px rgba(0, 0, 0, 0.5);
  --shadow-md: 0 8px 24px rgba(0, 0, 0, 0.7);
  --shadow-lg: 0 16px 48px rgba(0, 0, 0, 0.9);
  --shadow-glow: 0 0 40px rgba(41, 151, 255, 0.2);

  /* Spacing */
  --space-xs: 0.25rem;
  --space-sm: 0.5rem;
  --space-md: 1rem;
  --space-lg: 1.5rem;
  --space-xl: 2rem;
  --space-2xl: 3rem;
  --space-3xl: 4rem;

  /* Radii */
  --radius-sm: 8px;
  --radius-md: 12px;
  --radius-lg: 16px;
  --radius-xl: 24px;
  --radius-full: 9999px;

  /* Typography */
  --font-body: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
  --font-heading: 'Outfit', 'Inter', sans-serif;

  /* Transitions */
  --ease-out: cubic-bezier(0.15, 1, 0.3, 1);
  --ease-spring: cubic-bezier(0.34, 1.56, 0.64, 1);
  --duration-fast: 150ms;
  --duration-normal: 300ms;
  --duration-slow: 500ms;
}

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

html {
  scroll-behavior: smooth;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

body {
  font-family: var(--font-body);
  background: var(--bg-primary);
  color: var(--text-primary);
  line-height: 1.6;
  min-height: 100vh;
  overflow-x: hidden;
}

/* Background ambient glow */
body::before {
  content: '';
  position: fixed;
  top: -30%;
  left: -20%;
  width: 70%;
  height: 70%;
  background: radial-gradient(circle, rgba(245, 158, 11, 0.04) 0%, transparent 60%);
  pointer-events: none;
  z-index: 0;
}

body::after {
  content: '';
  position: fixed;
  bottom: -30%;
  right: -20%;
  width: 60%;
  height: 60%;
  background: radial-gradient(circle, rgba(239, 68, 68, 0.03) 0%, transparent 60%);
  pointer-events: none;
  z-index: 0;
}

a {
  color: var(--accent-primary);
  text-decoration: none;
}

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

/* --- Typography --- */
h1, h2, h3, h4, h5, h6 {
  font-family: var(--font-heading);
  font-weight: 700;
  line-height: 1.15;
  letter-spacing: -0.02em;
}

h1 { font-size: clamp(2.2rem, 5vw, 3.8rem); }
h2 { font-size: clamp(1.6rem, 3.5vw, 2.4rem); }
h3 { font-size: clamp(1.2rem, 2.5vw, 1.6rem); }

.text-gradient {
  background: var(--accent-gradient);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

/* --- Layout --- */
.container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 var(--space-xl);
  position: relative;
  z-index: 1;
}

.section {
  padding: var(--space-3xl) 0;
}

/* ============================================================
   NAVIGATION
   ============================================================ */
.navbar {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 1000;
  padding: var(--space-md) 0;
  background: rgba(10, 13, 20, 0.8);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border-bottom: 1px solid var(--border-subtle);
  transition: all var(--duration-normal) var(--ease-out);
}

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

.logo {
  display: flex;
  align-items: center;
  gap: var(--space-sm);
  font-family: var(--font-heading);
  font-weight: 800;
  font-size: 1.4rem;
  color: var(--text-primary);
}

.logo-icon {
  width: 36px;
  height: 36px;
  background: var(--accent-gradient);
  border-radius: var(--radius-sm);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.2rem;
}

.nav-cta {
  padding: var(--space-sm) var(--space-lg);
  background: var(--accent-gradient);
  color: #fff;
  font-weight: 600;
  font-size: 0.9rem;
  border: none;
  border-radius: var(--radius-full);
  cursor: pointer;
  transition: all var(--duration-normal) var(--ease-out);
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.nav-cta:hover {
  transform: translateY(-1px);
  box-shadow: var(--shadow-glow);
}

/* ============================================================
   HERO SECTION
   ============================================================ */
.hero {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding-top: 80px;
  position: relative;
  overflow: hidden;
  background: linear-gradient(180deg, rgba(0, 0, 0, 0.6) 0%, rgba(0, 0, 0, 0.95) 100%), url('../assets/carousel-1.jpg') no-repeat center center;
  background-size: cover;
}

.hero-content {
  max-width: 800px;
  animation: fadeInUp 0.8s var(--ease-out) forwards;
}

.hero-badge {
  display: inline-flex;
  align-items: center;
  gap: var(--space-sm);
  padding: var(--space-xs) var(--space-md);
  background: var(--accent-soft);
  border: 1px solid rgba(245, 158, 11, 0.2);
  border-radius: var(--radius-full);
  color: var(--text-accent);
  font-size: 0.85rem;
  font-weight: 500;
  margin-bottom: var(--space-xl);
}

.hero-badge .dot {
  width: 6px;
  height: 6px;
  background: var(--accent-primary);
  border-radius: 50%;
  animation: pulse 2s ease infinite;
}

.hero h1 {
  margin-bottom: var(--space-lg);
}

.hero p {
  font-size: 1.15rem;
  color: var(--text-secondary);
  max-width: 600px;
  margin: 0 auto var(--space-2xl);
  line-height: 1.8;
}

.hero-cta {
  display: inline-flex;
  align-items: center;
  gap: var(--space-sm);
  padding: var(--space-md) var(--space-2xl);
  background: var(--accent-gradient);
  color: #fff;
  font-family: var(--font-heading);
  font-weight: 700;
  font-size: 1.1rem;
  border: none;
  border-radius: var(--radius-full);
  cursor: pointer;
  transition: all var(--duration-normal) var(--ease-out);
  position: relative;
  overflow: hidden;
}

.hero-cta::before {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(135deg, rgba(255,255,255,0.2) 0%, transparent 50%);
  opacity: 0;
  transition: opacity var(--duration-normal);
}

.hero-cta:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 40px rgba(245, 158, 11, 0.3);
}

.hero-cta:hover::before {
  opacity: 1;
}

.hero-cta .arrow {
  transition: transform var(--duration-normal) var(--ease-spring);
}

.hero-cta:hover .arrow {
  transform: translateX(4px);
}

/* Floating grid background */
.hero-bg {
  position: absolute;
  inset: 0;
  background-image:
    linear-gradient(rgba(255,255,255,0.02) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255,255,255,0.02) 1px, transparent 1px);
  background-size: 60px 60px;
  mask-image: radial-gradient(ellipse 80% 50% at 50% 50%, black 40%, transparent 100%);
  -webkit-mask-image: radial-gradient(ellipse 80% 50% at 50% 50%, black 40%, transparent 100%);
}

/* ============================================================
   PROGRESS STEPPER
   ============================================================ */
.stepper {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0;
  margin-bottom: var(--space-3xl);
  padding: 0 var(--space-xl);
}

.stepper-step {
  display: flex;
  align-items: center;
  gap: var(--space-sm);
}

.step-circle {
  width: 44px;
  height: 44px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: var(--font-heading);
  font-weight: 700;
  font-size: 1rem;
  border: 2px solid var(--border-input);
  color: var(--text-muted);
  background: var(--bg-secondary);
  transition: all var(--duration-normal) var(--ease-out);
  flex-shrink: 0;
}

.step-label {
  font-size: 0.85rem;
  font-weight: 500;
  color: var(--text-muted);
  white-space: nowrap;
  transition: color var(--duration-normal);
}

.stepper-line {
  width: 80px;
  height: 2px;
  background: var(--border-input);
  margin: 0 var(--space-sm);
  transition: background var(--duration-normal);
  flex-shrink: 0;
}

/* Active step */
.stepper-step.active .step-circle {
  border-color: var(--accent-primary);
  background: var(--accent-primary);
  color: #000;
  box-shadow: 0 0 20px var(--accent-glow);
}

.stepper-step.active .step-label {
  color: var(--text-primary);
}

/* Completed step */
.stepper-step.completed .step-circle {
  border-color: var(--success);
  background: var(--success);
  color: #fff;
}

.stepper-step.completed .step-label {
  color: var(--text-secondary);
}

.stepper-line.completed {
  background: var(--success);
}

.stepper-line.active {
  background: linear-gradient(90deg, var(--success), var(--accent-primary));
}

/* ============================================================
   GLASS CARD
   ============================================================ */
.card {
  background: var(--bg-card);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-lg);
  padding: var(--space-2xl);
  transition: all var(--duration-normal) var(--ease-out);
}

.card:hover {
  border-color: rgba(255, 255, 255, 0.1);
  box-shadow: var(--shadow-md);
}

.card-header {
  margin-bottom: var(--space-xl);
}

.card-header h2 {
  margin-bottom: var(--space-sm);
}

.card-header p {
  color: var(--text-secondary);
  font-size: 0.95rem;
}

/* ============================================================
   FORM ELEMENTS
   ============================================================ */
.form-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: var(--space-lg);
}

.form-group {
  display: flex;
  flex-direction: column;
  gap: var(--space-xs);
}

.form-group.full-width {
  grid-column: 1 / -1;
}

.form-label {
  font-size: 0.85rem;
  font-weight: 500;
  color: var(--text-secondary);
  letter-spacing: 0.02em;
}

.form-label .required {
  color: var(--accent-primary);
  margin-left: 2px;
}

.input-wrapper {
  position: relative;
}

.input-wrapper .input-icon {
  position: absolute;
  left: var(--space-md);
  top: 50%;
  transform: translateY(-50%);
  color: var(--text-muted);
  font-size: 1.1rem;
  pointer-events: none;
  transition: color var(--duration-fast);
}

.form-input {
  width: 100%;
  padding: var(--space-md) var(--space-md) var(--space-md) 2.8rem;
  background: var(--bg-input);
  border: 1px solid var(--border-input);
  border-radius: var(--radius-md);
  color: var(--text-primary);
  font-family: var(--font-body);
  font-size: 0.95rem;
  transition: all var(--duration-fast);
  outline: none;
}

.form-input::placeholder {
  color: var(--text-muted);
}

.form-input:focus {
  background: var(--bg-input-focus);
  border-color: var(--border-focus);
  box-shadow: 0 0 0 3px var(--accent-glow);
}

.form-input:focus ~ .input-icon,
.form-input:focus + .input-icon {
  color: var(--accent-primary);
}

/* Validation states */
.form-group.valid .form-input {
  border-color: var(--success);
}

.form-group.error .form-input {
  border-color: var(--error);
  box-shadow: 0 0 0 3px var(--error-bg);
}

.form-error {
  font-size: 0.8rem;
  color: var(--error);
  min-height: 1.2rem;
  opacity: 0;
  transform: translateY(-4px);
  transition: all var(--duration-fast);
}

.form-group.error .form-error {
  opacity: 1;
  transform: translateY(0);
}

.validation-icon {
  position: absolute;
  right: var(--space-md);
  top: 50%;
  transform: translateY(-50%);
  font-size: 1rem;
  opacity: 0;
  transition: opacity var(--duration-fast);
}

.form-group.valid .validation-icon.valid-icon {
  opacity: 1;
  color: var(--success);
}

.form-group.error .validation-icon.error-icon {
  opacity: 1;
  color: var(--error);
}

/* ============================================================
   BUTTONS
   ============================================================ */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: var(--space-sm);
  padding: var(--space-md) var(--space-xl);
  font-family: var(--font-heading);
  font-weight: 600;
  font-size: 1rem;
  border: none;
  border-radius: var(--radius-md);
  cursor: pointer;
  transition: all var(--duration-normal) var(--ease-out);
  text-transform: none;
  letter-spacing: 0.01em;
}

.btn-primary {
  background: var(--accent-gradient);
  color: #fff;
  padding: var(--space-md) var(--space-2xl);
  border-radius: var(--radius-full);
  font-size: 1.05rem;
}

.btn-primary:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 30px rgba(245, 158, 11, 0.3);
}

.btn-primary:active {
  transform: translateY(0);
}

.btn-primary:disabled {
  opacity: 0.5;
  cursor: not-allowed;
  transform: none;
  box-shadow: none;
}

.btn-secondary {
  background: var(--bg-input);
  color: var(--text-primary);
  border: 1px solid var(--border-input);
}

.btn-secondary:hover {
  background: var(--bg-input-focus);
  border-color: rgba(255, 255, 255, 0.15);
}

.btn-outline {
  background: transparent;
  color: var(--accent-primary);
  border: 1px solid var(--accent-primary);
}

.btn-outline:hover {
  background: var(--accent-soft);
}

.btn-icon {
  width: 44px;
  height: 44px;
  padding: 0;
  border-radius: var(--radius-md);
}

/* ============================================================
   STEP WIZARD — SECTIONS
   ============================================================ */
.wizard-section {
  display: none;
  animation: fadeInUp 0.5s var(--ease-out) forwards;
}

.wizard-section.active {
  display: block;
}

.step-actions {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-top: var(--space-2xl);
  gap: var(--space-md);
}

.step-actions .btn-back {
  background: none;
  border: none;
  color: var(--text-secondary);
  font-family: var(--font-body);
  font-size: 0.95rem;
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: var(--space-xs);
  padding: var(--space-sm) var(--space-md);
  border-radius: var(--radius-md);
  transition: all var(--duration-fast);
}

.step-actions .btn-back:hover {
  color: var(--text-primary);
  background: var(--bg-input);
}

/* ============================================================
   MAP SECTION
   ============================================================ */
.map-container {
  position: relative;
  border-radius: var(--radius-lg);
  overflow: hidden;
  border: 1px solid var(--border-subtle);
  height: 450px;
  background: var(--bg-secondary);
}

#map {
  width: 100%;
  height: 100%;
}

.map-overlay {
  position: absolute;
  top: var(--space-md);
  right: var(--space-md);
  z-index: 10;
}

.roof-info-card {
  background: rgba(10, 13, 20, 0.9);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
  padding: var(--space-lg);
  min-width: 240px;
  animation: slideInRight 0.4s var(--ease-out) forwards;
}

.roof-info-card h4 {
  font-size: 0.8rem;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--text-muted);
  margin-bottom: var(--space-md);
}

.roof-stat {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: var(--space-sm) 0;
  border-bottom: 1px solid var(--border-subtle);
}

.roof-stat:last-child {
  border-bottom: none;
}

.roof-stat-label {
  font-size: 0.85rem;
  color: var(--text-secondary);
}

.roof-stat-value {
  font-family: var(--font-heading);
  font-weight: 700;
  color: var(--text-accent);
  font-size: 1rem;
}

/* Street View inset */
.streetview-container {
  position: absolute;
  bottom: var(--space-md);
  left: var(--space-md);
  width: 200px;
  height: 140px;
  border-radius: var(--radius-md);
  overflow: hidden;
  border: 2px solid var(--border-subtle);
  z-index: 10;
  cursor: pointer;
  transition: all var(--duration-normal) var(--ease-out);
}

.streetview-container:hover {
  border-color: var(--accent-primary);
  transform: scale(1.05);
}

#streetview {
  width: 100%;
  height: 100%;
}

.streetview-label {
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  padding: 4px 8px;
  background: rgba(0,0,0,0.7);
  color: #fff;
  font-size: 0.7rem;
  font-weight: 500;
  text-align: center;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

/* ============================================================
   QUOTE SECTION
   ============================================================ */
.material-selector {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: var(--space-md);
  margin-bottom: var(--space-2xl);
}

.material-option {
  position: relative;
  padding: var(--space-lg);
  background: var(--bg-input);
  border: 2px solid var(--border-input);
  border-radius: var(--radius-md);
  cursor: pointer;
  transition: all var(--duration-normal) var(--ease-out);
  text-align: center;
}

.material-option:hover {
  border-color: rgba(255, 255, 255, 0.15);
  background: var(--bg-input-focus);
}

.material-option.selected {
  border-color: var(--accent-primary);
  background: var(--accent-soft);
  box-shadow: 0 0 24px var(--accent-glow);
}

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

.material-icon {
  font-size: 2rem;
  margin-bottom: var(--space-sm);
}

.material-name {
  font-family: var(--font-heading);
  font-weight: 600;
  font-size: 1rem;
  margin-bottom: var(--space-xs);
  color: var(--text-primary);
}

.material-price {
  font-size: 0.8rem;
  color: var(--text-muted);
}

/* Tear-off toggle */
.toggle-group {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: var(--space-lg);
  background: var(--bg-input);
  border: 1px solid var(--border-input);
  border-radius: var(--radius-md);
  margin-bottom: var(--space-2xl);
}

.toggle-info h4 {
  font-size: 0.95rem;
  font-weight: 600;
  margin-bottom: var(--space-xs);
}

.toggle-info p {
  font-size: 0.8rem;
  color: var(--text-muted);
}

.toggle-switch {
  position: relative;
  width: 52px;
  height: 28px;
  flex-shrink: 0;
}

.toggle-switch input {
  opacity: 0;
  width: 0;
  height: 0;
}

.toggle-slider {
  position: absolute;
  inset: 0;
  background: var(--bg-secondary);
  border: 1px solid var(--border-input);
  border-radius: var(--radius-full);
  cursor: pointer;
  transition: all var(--duration-normal);
}

.toggle-slider::before {
  content: '';
  position: absolute;
  top: 3px;
  left: 3px;
  width: 20px;
  height: 20px;
  background: var(--text-muted);
  border-radius: 50%;
  transition: all var(--duration-normal) var(--ease-spring);
}

.toggle-switch input:checked + .toggle-slider {
  background: var(--accent-primary);
  border-color: var(--accent-primary);
}

.toggle-switch input:checked + .toggle-slider::before {
  transform: translateX(24px);
  background: #fff;
}

/* Quote breakdown */
.quote-breakdown {
  background: var(--bg-secondary);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-lg);
  overflow: hidden;
}

.quote-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: var(--space-md) var(--space-xl);
  border-bottom: 1px solid var(--border-subtle);
}

.quote-row:last-child {
  border-bottom: none;
}

.quote-row-label {
  display: flex;
  align-items: center;
  gap: var(--space-sm);
  font-size: 0.9rem;
  color: var(--text-secondary);
}

.quote-row-label .row-icon {
  font-size: 1.1rem;
}

.quote-row-value {
  font-family: var(--font-heading);
  font-weight: 600;
  font-size: 1rem;
  color: var(--text-primary);
}

.quote-row.total {
  background: var(--accent-soft);
  padding: var(--space-lg) var(--space-xl);
}

.quote-row.total .quote-row-label {
  font-size: 1.1rem;
  font-weight: 700;
  color: var(--text-primary);
}

.quote-row.total .quote-row-value {
  font-size: 1.4rem;
  color: var(--text-accent);
}

.quote-range {
  text-align: center;
  padding: var(--space-lg);
  color: var(--text-muted);
  font-size: 0.85rem;
}

.quote-disclaimer {
  text-align: center;
  padding: var(--space-lg) var(--space-xl);
  color: var(--text-muted);
  font-size: 0.8rem;
  font-style: italic;
  border-top: 1px solid var(--border-subtle);
}

/* Quote total hero */
.quote-total-hero {
  text-align: center;
  padding: var(--space-2xl);
  margin-bottom: var(--space-xl);
  background: linear-gradient(135deg, rgba(245, 158, 11, 0.08), rgba(239, 68, 68, 0.05));
  border: 1px solid rgba(245, 158, 11, 0.15);
  border-radius: var(--radius-lg);
}

.quote-total-hero .total-label {
  font-size: 0.85rem;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--text-muted);
  margin-bottom: var(--space-sm);
}

.quote-total-hero .total-amount {
  font-family: var(--font-heading);
  font-size: clamp(2.5rem, 5vw, 3.5rem);
  font-weight: 800;
  background: var(--accent-gradient);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.quote-total-hero .total-range {
  font-size: 0.9rem;
  color: var(--text-secondary);
  margin-top: var(--space-sm);
}

/* Quote actions */
.quote-actions {
  display: flex;
  gap: var(--space-md);
  justify-content: center;
  margin-top: var(--space-2xl);
  flex-wrap: wrap;
}

/* Customer info summary on quote page */
.customer-summary {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: var(--space-md);
  padding: var(--space-lg);
  background: var(--bg-input);
  border-radius: var(--radius-md);
  margin-bottom: var(--space-xl);
}

.customer-summary-item {
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.customer-summary-item .label {
  font-size: 0.75rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--text-muted);
}

.customer-summary-item .value {
  font-weight: 500;
  font-size: 0.9rem;
  color: var(--text-primary);
}

/* ============================================================
   LOADING STATES
   ============================================================ */
.loading-container {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: var(--space-lg);
  padding: var(--space-3xl);
}

.spinner {
  width: 48px;
  height: 48px;
  border: 3px solid var(--border-input);
  border-top-color: var(--accent-primary);
  border-radius: 50%;
  animation: spin 0.8s linear infinite;
}

.loading-text {
  color: var(--text-secondary);
  font-size: 0.95rem;
  animation: pulse 2s ease infinite;
}

.skeleton {
  background: linear-gradient(90deg, var(--bg-input) 25%, var(--bg-input-focus) 50%, var(--bg-input) 75%);
  background-size: 200% 100%;
  animation: shimmer 1.5s infinite;
  border-radius: var(--radius-sm);
}

.skeleton-text {
  height: 16px;
  margin-bottom: var(--space-sm);
}

.skeleton-text:last-child {
  width: 60%;
}

.skeleton-block {
  height: 200px;
  border-radius: var(--radius-md);
}

/* ============================================================
   ERROR STATE
   ============================================================ */
.error-container {
  text-align: center;
  padding: var(--space-2xl);
}

.error-icon {
  font-size: 3rem;
  margin-bottom: var(--space-md);
}

.error-container h3 {
  margin-bottom: var(--space-sm);
  color: var(--error);
}

.error-container p {
  color: var(--text-secondary);
  margin-bottom: var(--space-lg);
}

/* ============================================================
   FOOTER
   ============================================================ */
.footer {
  padding: var(--space-2xl) 0;
  border-top: 1px solid var(--border-subtle);
  text-align: center;
  color: var(--text-muted);
  font-size: 0.85rem;
}

/* ============================================================
   ANIMATIONS
   ============================================================ */
@keyframes fadeInUp {
  from {
    opacity: 0;
    transform: translateY(24px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes slideInRight {
  from {
    opacity: 0;
    transform: translateX(24px);
  }
  to {
    opacity: 1;
    transform: translateX(0);
  }
}

@keyframes pulse {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.5; }
}

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

@keyframes shimmer {
  0% { background-position: -200% 0; }
  100% { background-position: 200% 0; }
}

@keyframes bounceIn {
  0% { transform: scale(0.3); opacity: 0; }
  50% { transform: scale(1.05); }
  70% { transform: scale(0.9); }
  100% { transform: scale(1); opacity: 1; }
}

/* ============================================================
   RESPONSIVE
   ============================================================ */
@media (max-width: 768px) {
  .container {
    padding: 0 var(--space-md);
  }

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

  .material-selector {
    grid-template-columns: 1fr;
  }

  .customer-summary {
    grid-template-columns: 1fr;
  }

  .stepper {
    padding: 0;
  }

  .step-label {
    display: none;
  }

  .stepper-line {
    width: 40px;
  }

  .map-container {
    height: 350px;
  }

  .streetview-container {
    width: 140px;
    height: 100px;
  }

  .card {
    padding: var(--space-lg);
  }

  .quote-row {
    padding: var(--space-md);
  }

  .quote-actions {
    flex-direction: column;
  }

  .quote-actions .btn {
    width: 100%;
  }

  /* Scanner adjustments for medium screens */
  .scanner-overlay {
    padding: var(--space-sm);
  }
  .telemetry-box {
    height: 95px;
    font-size: 0.7rem;
  }
}

@media (max-width: 480px) {
  .hero-cta {
    width: 100%;
    justify-content: center;
  }

  .stepper-line {
    width: 24px;
  }

  .step-circle {
    width: 36px;
    height: 36px;
    font-size: 0.85rem;
  }

  /* Navbar adjustments for small screens */
  .navbar .container {
    flex-direction: column;
    gap: var(--space-sm);
    padding: var(--space-xs) var(--space-md);
  }

  .navbar .logo {
    font-size: 1.15rem;
  }

  .navbar .logo-icon {
    width: 28px;
    height: 28px;
    font-size: 0.95rem;
  }

  .navbar .lang-selector {
    font-size: 0.75rem;
  }

  .nav-cta {
    padding: var(--space-xs) var(--space-md);
    font-size: 0.75rem;
  }

  /* Scanner HUD adjustments for small mobile screens */
  .scanner-overlay {
    padding: 6px;
  }

  .scanner-crosshair {
    width: 80px;
    height: 80px;
  }

  .hud-header {
    font-size: 0.65rem;
    padding: 3px 6px;
  }

  .telemetry-box {
    height: 80px;
    font-size: 0.6rem;
    padding: 6px;
  }
}

/* ============================================================
   SCANNER HUD & TELEMETRY
   ============================================================ */
.scanner-overlay {
  position: absolute;
  inset: 0;
  background: rgba(0, 0, 0, 0.85);
  z-index: 20;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  padding: var(--space-md);
  overflow: hidden;
  border-radius: var(--radius-lg);
  font-family: var(--font-body);
}

.scanner-grid {
  position: absolute;
  inset: 0;
  background-image: 
    linear-gradient(rgba(41, 151, 255, 0.08) 1px, transparent 1px),
    linear-gradient(90deg, rgba(41, 151, 255, 0.08) 1px, transparent 1px);
  background-size: 30px 30px;
  pointer-events: none;
  z-index: 1;
}

.scanner-sweep {
  position: absolute;
  left: 0;
  right: 0;
  height: 4px;
  background: linear-gradient(180deg, rgba(41, 151, 255, 0), rgba(41, 151, 255, 0.8) 50%, rgba(41, 151, 255, 0));
  box-shadow: 0 0 20px rgba(41, 151, 255, 0.5);
  animation: scanSweep 3s cubic-bezier(0.4, 0, 0.2, 1) infinite;
  pointer-events: none;
  z-index: 2;
}

@keyframes scanSweep {
  0% { top: 0%; }
  50% { top: 100%; }
  100% { top: 0%; }
}

.scanner-crosshair {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: 120px;
  height: 120px;
  border: 1px solid rgba(41, 151, 255, 0.25);
  border-radius: 50%;
  pointer-events: none;
  z-index: 2;
  animation: pulse 2s infinite ease-in-out;
}

.scanner-crosshair::before,
.scanner-crosshair::after {
  content: '';
  position: absolute;
  background: rgba(41, 151, 255, 0.4);
}

.scanner-crosshair::before {
  top: 50%; left: -15px; right: -15px; height: 1px;
}

.scanner-crosshair::after {
  left: 50%; top: -15px; bottom: -15px; width: 1px;
}

.scanner-hud {
  position: relative;
  z-index: 3;
  display: flex;
  flex-direction: column;
  height: 100%;
  justify-content: space-between;
}

.hud-header {
  display: flex;
  align-items: center;
  gap: var(--space-sm);
  font-family: var(--font-heading);
  font-size: 0.8rem;
  font-weight: 700;
  color: var(--accent-primary);
  letter-spacing: 0.08em;
  background: rgba(12, 12, 14, 0.9);
  padding: 6px 12px;
  border-radius: var(--radius-sm);
  border: 1px solid rgba(41, 151, 255, 0.2);
  align-self: flex-start;
  box-shadow: var(--shadow-md);
}

.hud-dot {
  width: 6px;
  height: 6px;
  background: var(--accent-primary);
  border-radius: 50%;
  box-shadow: 0 0 8px var(--accent-primary);
}

.telemetry-box {
  background: rgba(12, 12, 14, 0.9);
  border: 1px solid rgba(41, 151, 255, 0.2);
  border-radius: var(--radius-md);
  padding: var(--space-md);
  font-family: 'Courier New', Courier, monospace;
  font-size: 0.75rem;
  color: #38bdf8;
  height: 110px;
  overflow-y: hidden;
  align-self: stretch;
  box-shadow: inset 0 0 10px rgba(0,0,0,0.8), var(--shadow-md);
  display: flex;
  flex-direction: column-reverse; /* Keeps bottom scrolled view active */
}

.telemetry-log {
  white-space: pre-wrap;
  line-height: 1.4;
}

/* ============================================================
   DETAILS & SVG CHART LAYOUT
   ============================================================ */
.quote-details-layout {
  display: grid;
  grid-template-columns: 1fr 1.2fr;
  gap: var(--space-2xl);
  align-items: center;
  margin-bottom: var(--space-xl);
}

.quote-chart-container {
  position: relative;
  width: 100%;
  max-width: 260px;
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: center;
}

.quote-chart-container svg {
  width: 100%;
  height: auto;
  transform: rotate(-90deg); /* Start at 12 o'clock */
}

.chart-center-label {
  position: absolute;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  pointer-events: none;
}

.chart-label-title {
  font-size: 0.65rem;
  letter-spacing: 0.12em;
  color: var(--text-muted);
  text-transform: uppercase;
}

.chart-label-val {
  font-family: var(--font-heading);
  font-size: 1.6rem;
  font-weight: 800;
  color: var(--text-primary);
  margin-top: 2px;
}

.chart-segment {
  fill: none;
  stroke-width: 18;
  transition: stroke-width var(--duration-fast) var(--ease-out), filter var(--duration-fast) var(--ease-out), opacity var(--duration-fast) var(--ease-out);
  cursor: pointer;
}

.chart-segment:hover {
  stroke-width: 22;
  filter: drop-shadow(0 0 6px var(--accent-glow));
}

@media (max-width: 768px) {
  .quote-details-layout {
    grid-template-columns: 1fr;
    gap: var(--space-xl);
  }
}

/* ============================================================
   LANGUAGE SELECTOR
   ============================================================ */
.lang-selector {
  display: flex;
  align-items: center;
  gap: 4px;
  font-family: var(--font-heading);
  font-size: 0.85rem;
  font-weight: 600;
}

.lang-btn {
  background: none;
  border: none;
  color: var(--text-muted);
  cursor: pointer;
  padding: 2px 6px;
  border-radius: var(--radius-sm);
  transition: color var(--duration-fast), background var(--duration-fast);
}

.lang-btn:hover {
  color: var(--text-primary);
  background: var(--bg-input);
}

.lang-btn.active {
  color: var(--accent-primary);
  background: var(--accent-soft);
}

.lang-divider {
  color: var(--border-input);
  font-weight: 300;
  pointer-events: none;
}

/* ============================================================
   PRINT STYLES
   ============================================================ */
@media print {
  body {
    background: #fff;
    color: #000;
  }

  body::before,
  body::after,
  .hero-bg {
    display: none;
  }

  .navbar,
  .hero,
  .stepper,
  .step-actions,
  .material-selector,
  .toggle-group,
  .quote-actions,
  .footer,
  .btn-back {
    display: none !important;
  }

  .wizard-section {
    display: block !important;
    animation: none !important;
  }

  #step-1, #step-2 {
    display: none !important;
  }

  .card {
    background: #fff;
    border: 1px solid #ddd;
    backdrop-filter: none;
    box-shadow: none;
  }

  .quote-total-hero {
    background: #f5f5f5;
    border-color: #ddd;
  }

  .quote-total-hero .total-amount {
    background: none;
    -webkit-text-fill-color: #000;
    color: #000;
  }

  .quote-breakdown {
    background: #fff;
    border-color: #ddd;
  }

  .quote-row {
    border-color: #eee;
  }

  .text-gradient {
    background: none;
    -webkit-text-fill-color: #000;
  }

  .customer-summary {
    background: #f9f9f9;
  }

  .customer-summary-item .label {
    color: #666;
  }

  .customer-summary-item .value {
    color: #000;
  }

  .roof-stat-value {
    color: #000;
  }

  @page {
    margin: 1in;
  }
}

/* Nav Menu Links */
.nav-links {
  display: flex;
  gap: var(--space-lg);
  align-items: center;
}

.nav-link-item {
  color: var(--text-secondary);
  font-family: var(--font-heading);
  font-weight: 500;
  font-size: 0.95rem;
  transition: color var(--duration-fast);
}

.nav-link-item:hover,
.nav-link-item.active {
  color: var(--accent-primary);
}

@media (max-width: 768px) {
  .nav-links {
    display: none;
  }
}
