/* ============================================
   VreauAcoperis — Design tokens
   ============================================ */
:root {
  --orange: #FF6B35;
  --orange-dark: #E24E1B;
  --orange-light: #FFB088;
  --charcoal: #241F1C;
  --cream: #FFF8F3;
  --white: #FFFFFF;

  --glass-bg: rgba(255, 255, 255, 0.55);
  --glass-bg-strong: rgba(255, 255, 255, 0.75);
  --glass-border: rgba(255, 255, 255, 0.65);
  --glass-shadow: 0 8px 32px rgba(226, 78, 27, 0.12);

  --font-display: 'Space Grotesk', sans-serif;
  --font-body: 'Inter', sans-serif;

  --radius-lg: 28px;
  --radius-md: 18px;
  --radius-sm: 12px;
}

* { box-sizing: border-box; margin: 0; padding: 0; }

html { scroll-behavior: smooth; }

body {
  font-family: var(--font-body);
  color: var(--charcoal);
  background: linear-gradient(180deg, #FFF3EA 0%, #FFF8F3 40%, #FFEFE3 100%);
  min-height: 100vh;
  overflow-x: hidden;
  position: relative;
}

/* ============================================
   Signature element: repeating roofline motif
   ============================================ */
.roofline-bg {
  position: fixed;
  inset: 0;
  z-index: 0;
  pointer-events: none;
  opacity: 0.5;
}

.roofline-bg svg {
  position: absolute;
  bottom: -2px;
  left: 0;
  width: 100%;
  height: auto;
}

.roofline-far { opacity: 0.18; filter: blur(0.5px); }
.roofline-near { opacity: 0.28; }

/* ============================================
   Layout wrapper
   ============================================ */
.stage {
  position: relative;
  z-index: 1;
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px;
}

/* ============================================
   HERO
   ============================================ */
.hero {
  width: 100%;
  max-width: 640px;
  text-align: center;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 28px;
  transition: opacity 0.5s ease, transform 0.5s ease, filter 0.5s ease;
}

.hero.is-hidden {
  opacity: 0;
  transform: translateY(-24px) scale(0.98);
  filter: blur(6px);
  pointer-events: none;
  position: absolute;
}

.logo-mark {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 10px;
}

.logo-mark svg { width: 76px; height: auto; }

.logo-wordmark {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 20px;
  letter-spacing: -0.01em;
  color: var(--orange-dark);
}

.hero h1 {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: clamp(2.4rem, 6vw, 3.6rem);
  line-height: 1.05;
  letter-spacing: -0.02em;
  color: var(--charcoal);
}

.hero h1 span {
  color: var(--orange);
  position: relative;
  white-space: nowrap;
}

.hero p.lede {
  font-size: clamp(1rem, 2.4vw, 1.15rem);
  line-height: 1.6;
  color: rgba(36, 31, 28, 0.7);
  max-width: 460px;
}

.trust-row {
  display: flex;
  gap: 22px;
  flex-wrap: wrap;
  justify-content: center;
  font-size: 0.85rem;
  color: rgba(36, 31, 28, 0.55);
  font-weight: 500;
}

.trust-row span { display: flex; align-items: center; gap: 6px; }
.trust-row svg { width: 15px; height: 15px; flex-shrink: 0; }

/* ============================================
   Glass CTA button
   ============================================ */
.btn-glass {
  font-family: var(--font-body);
  font-weight: 600;
  font-size: 1.05rem;
  color: var(--white);
  background: linear-gradient(135deg, var(--orange) 0%, var(--orange-dark) 100%);
  border: 1px solid rgba(255, 255, 255, 0.4);
  border-radius: 999px;
  padding: 18px 38px;
  cursor: pointer;
  box-shadow: 0 12px 30px rgba(226, 78, 27, 0.35), inset 0 1px 0 rgba(255,255,255,0.3);
  display: inline-flex;
  align-items: center;
  gap: 10px;
  transition: transform 0.25s ease, box-shadow 0.25s ease;
  animation: pulse-glow 3.2s ease-in-out infinite;
}

.btn-glass:hover {
  transform: translateY(-2px) scale(1.02);
  box-shadow: 0 16px 36px rgba(226, 78, 27, 0.42), inset 0 1px 0 rgba(255,255,255,0.35);
}

.btn-glass:active { transform: translateY(0) scale(0.98); }

.btn-glass svg { width: 18px; height: 18px; transition: transform 0.25s ease; }
.btn-glass:hover svg { transform: translateX(3px); }

@keyframes pulse-glow {
  0%, 100% { box-shadow: 0 12px 30px rgba(226, 78, 27, 0.35), inset 0 1px 0 rgba(255,255,255,0.3); }
  50% { box-shadow: 0 12px 40px rgba(226, 78, 27, 0.5), inset 0 1px 0 rgba(255,255,255,0.3); }
}

@media (prefers-reduced-motion: reduce) {
  .btn-glass { animation: none; }
  html { scroll-behavior: auto; }
  * { transition-duration: 0.01ms !important; animation-duration: 0.01ms !important; }
}

/* ============================================
   Glass panel (form container)
   ============================================ */
.panel {
  width: 100%;
  max-width: 640px;
  opacity: 0;
  transform: translateY(24px) scale(0.98);
  filter: blur(6px);
  pointer-events: none;
  position: absolute;
  transition: opacity 0.5s ease, transform 0.5s ease, filter 0.5s ease;
}

.panel.is-visible {
  opacity: 1;
  transform: translateY(0) scale(1);
  filter: blur(0);
  pointer-events: auto;
  position: relative;
}

.glass-card {
  background: var(--glass-bg);
  backdrop-filter: blur(22px) saturate(140%);
  -webkit-backdrop-filter: blur(22px) saturate(140%);
  border: 1px solid var(--glass-border);
  border-radius: var(--radius-lg);
  box-shadow: var(--glass-shadow), inset 0 1px 0 rgba(255,255,255,0.6);
  padding: 34px;
}

.panel-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 22px;
}

.panel-head h2 {
  font-family: var(--font-display);
  font-size: 1.5rem;
  font-weight: 700;
  letter-spacing: -0.01em;
}

.panel-head p {
  font-size: 0.9rem;
  color: rgba(36, 31, 28, 0.6);
  margin-top: 4px;
}

.btn-close {
  width: 36px; height: 36px;
  border-radius: 50%;
  border: 1px solid rgba(36,31,28,0.12);
  background: rgba(255,255,255,0.6);
  display: flex; align-items: center; justify-content: center;
  cursor: pointer;
  flex-shrink: 0;
  transition: background 0.2s ease, transform 0.2s ease;
}
.btn-close:hover { background: rgba(255,255,255,0.9); transform: rotate(90deg); }
.btn-close svg { width: 16px; height: 16px; }

/* ============================================
   Form
   ============================================ */
.form-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 14px;
}

.field { display: flex; flex-direction: column; gap: 6px; }
.field.full { grid-column: 1 / -1; }

.field label {
  font-size: 0.8rem;
  font-weight: 600;
  color: rgba(36, 31, 28, 0.75);
}

.field input,
.field select,
.field textarea {
  font-family: var(--font-body);
  font-size: 0.95rem;
  padding: 12px 14px;
  border-radius: var(--radius-sm);
  border: 1px solid rgba(36, 31, 28, 0.14);
  background: rgba(255, 255, 255, 0.7);
  color: var(--charcoal);
  outline: none;
  transition: border-color 0.2s ease, box-shadow 0.2s ease, background 0.2s ease;
  width: 100%;
}

.field textarea { resize: vertical; min-height: 80px; font-family: var(--font-body); }

.field input:focus,
.field select:focus,
.field textarea:focus {
  border-color: var(--orange);
  box-shadow: 0 0 0 3px rgba(255, 107, 53, 0.15);
  background: rgba(255, 255, 255, 0.95);
}

.field input:hover,
.field select:hover,
.field textarea:hover {
  border-color: rgba(255, 107, 53, 0.4);
}

.field input:invalid:not(:placeholder-shown) {
  border-color: rgba(192,57,43,0.4);
}

/* Photo upload dropzone */
.dropzone {
  border: 2px dashed rgba(255, 107, 53, 0.35);
  border-radius: var(--radius-md);
  padding: 22px;
  text-align: center;
  cursor: pointer;
  background: rgba(255, 255, 255, 0.4);
  transition: border-color 0.2s ease, background 0.2s ease;
}
.dropzone:hover, .dropzone.is-dragover {
  border-color: var(--orange);
  background: rgba(255, 107, 53, 0.06);
}
.dropzone svg { width: 26px; height: 26px; color: var(--orange); margin-bottom: 8px; }
.dropzone p { font-size: 0.85rem; color: rgba(36,31,28,0.6); }
.dropzone input { display: none; }

.thumbs {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  margin-top: 10px;
}
.thumbs .thumb {
  width: 56px; height: 56px;
  border-radius: 10px;
  overflow: hidden;
  position: relative;
  border: 1px solid rgba(36,31,28,0.12);
}
.thumbs .thumb img { width: 100%; height: 100%; object-fit: cover; }
.thumbs .thumb button {
  position: absolute; top: 2px; right: 2px;
  width: 16px; height: 16px;
  border-radius: 50%;
  background: rgba(36,31,28,0.75);
  color: #fff;
  border: none;
  font-size: 10px;
  line-height: 1;
  cursor: pointer;
}

.btn-submit {
  margin-top: 22px;
  width: 100%;
  font-family: var(--font-body);
  font-weight: 700;
  font-size: 1rem;
  color: var(--white);
  background: linear-gradient(135deg, var(--orange) 0%, var(--orange-dark) 100%);
  border: none;
  border-radius: var(--radius-md);
  padding: 15px;
  cursor: pointer;
  box-shadow: 0 10px 24px rgba(226, 78, 27, 0.3);
  transition: transform 0.2s ease, box-shadow 0.2s ease, opacity 0.2s ease;
}
.btn-submit:hover { transform: translateY(-1px); box-shadow: 0 14px 30px rgba(226, 78, 27, 0.38); }
.btn-submit:disabled { opacity: 0.6; cursor: not-allowed; transform: none; }

.form-note {
  font-size: 0.75rem;
  color: rgba(36,31,28,0.45);
  text-align: center;
  margin-top: 12px;
}

/* Success state */
.success-view {
  text-align: center;
  padding: 20px 10px;
  display: none;
  flex-direction: column;
  align-items: center;
  gap: 14px;
}
.success-view.is-visible { display: flex; }
.success-view svg { width: 56px; height: 56px; color: var(--orange); }
.success-view h2 { font-family: var(--font-display); font-size: 1.4rem; }
.success-view p { color: rgba(36,31,28,0.65); font-size: 0.95rem; max-width: 380px; }

.form-body { display: block; }
.form-body.is-hidden { display: none; }

@media (max-width: 560px) {
  .form-grid { grid-template-columns: 1fr; }
  .glass-card { padding: 24px 20px; }
}

/* ============================================
   Footer
   ============================================ */
.site-footer {
  position: fixed;
  bottom: 14px;
  left: 0; right: 0;
  text-align: center;
  font-size: 0.75rem;
  color: rgba(36,31,28,0.4);
  z-index: 1;
}
.site-footer a { color: rgba(226,78,27,0.7); text-decoration: none; }
.site-footer a:hover { text-decoration: underline; }

/* ============================================
   Entrance / reveal animations
   ============================================ */
@keyframes fadeUp {
  from { opacity: 0; transform: translateY(18px); }
  to { opacity: 1; transform: translateY(0); }
}
@keyframes popIn {
  from { opacity: 0; transform: scale(0.85); }
  to { opacity: 1; transform: scale(1); }
}
@keyframes floatSlow {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-8px); }
}
@keyframes shimmer {
  0% { background-position: -200% 0; }
  100% { background-position: 200% 0; }
}
@keyframes spin {
  to { transform: rotate(360deg); }
}

.reveal {
  opacity: 0;
  animation: fadeUp 0.7s cubic-bezier(0.16, 1, 0.3, 1) forwards;
}
.reveal-1 { animation-delay: 0.05s; }
.reveal-2 { animation-delay: 0.15s; }
.reveal-3 { animation-delay: 0.25s; }
.reveal-4 { animation-delay: 0.35s; }
.reveal-5 { animation-delay: 0.45s; }

.logo-mark svg { animation: floatSlow 4.5s ease-in-out infinite; }

@media (prefers-reduced-motion: reduce) {
  .reveal { opacity: 1; animation: none; }
  .logo-mark svg { animation: none; }
}

/* ============================================
   Toast notifications (replace alert())
   ============================================ */
.toast-stack {
  position: fixed;
  top: 20px;
  left: 50%;
  transform: translateX(-50%);
  z-index: 300;
  display: flex;
  flex-direction: column;
  gap: 10px;
  width: min(92vw, 420px);
  pointer-events: none;
}
.toast {
  pointer-events: auto;
  background: var(--glass-bg-strong);
  backdrop-filter: blur(18px) saturate(140%);
  -webkit-backdrop-filter: blur(18px) saturate(140%);
  border: 1px solid var(--glass-border);
  border-radius: var(--radius-md);
  box-shadow: var(--glass-shadow);
  padding: 14px 18px;
  font-size: 0.88rem;
  font-weight: 500;
  color: var(--charcoal);
  display: flex;
  align-items: center;
  gap: 10px;
  animation: popIn 0.3s cubic-bezier(0.16, 1, 0.3, 1) forwards;
}
.toast.toast-error { border-color: rgba(192,57,43,0.4); }
.toast.toast-error svg { color: #C0392B; }
.toast.toast-success svg { color: var(--orange); }
.toast svg { width: 18px; height: 18px; flex-shrink: 0; }
.toast.is-leaving { animation: fadeOutUp 0.3s ease forwards; }
@keyframes fadeOutUp { to { opacity: 0; transform: translateY(-8px); } }

/* ============================================
   Upload progress bar
   ============================================ */
.upload-progress {
  margin-top: 10px;
  height: 6px;
  border-radius: 999px;
  background: rgba(36,31,28,0.08);
  overflow: hidden;
  display: none;
}
.upload-progress.is-visible { display: block; }
.upload-progress-bar {
  height: 100%;
  width: 0%;
  border-radius: 999px;
  background: linear-gradient(90deg, var(--orange), var(--orange-dark), var(--orange));
  background-size: 200% 100%;
  animation: shimmer 1.4s linear infinite;
  transition: width 0.3s ease;
}
.upload-progress-label {
  font-size: 0.72rem;
  color: rgba(36,31,28,0.5);
  margin-top: 4px;
  text-align: right;
}

/* Submit spinner */
.btn-submit { position: relative; }
.spinner {
  width: 16px; height: 16px;
  border: 2px solid rgba(255,255,255,0.4);
  border-top-color: #fff;
  border-radius: 50%;
  animation: spin 0.7s linear infinite;
  display: inline-block;
  vertical-align: middle;
  margin-right: 8px;
}

/* ============================================
   Cookie consent banner
   ============================================ */
.cookie-banner {
  position: fixed;
  left: 16px; right: 16px; bottom: 16px;
  max-width: 560px;
  margin: 0 auto;
  z-index: 250;
  padding: 22px 24px;
  transform: translateY(140%);
  opacity: 0;
  transition: transform 0.45s cubic-bezier(0.16, 1, 0.3, 1), opacity 0.45s ease;
}
.cookie-banner.is-visible { transform: translateY(0); opacity: 1; }

.cookie-banner h3 {
  font-family: var(--font-display);
  font-size: 1rem;
  margin-bottom: 6px;
}
.cookie-banner p {
  font-size: 0.83rem;
  line-height: 1.55;
  color: rgba(36,31,28,0.68);
  margin-bottom: 14px;
}
.cookie-banner p a { color: var(--orange-dark); font-weight: 600; text-decoration: none; }
.cookie-banner p a:hover { text-decoration: underline; }

.cookie-actions {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
}
.cookie-btn {
  font-family: var(--font-body);
  font-size: 0.85rem;
  font-weight: 600;
  padding: 10px 18px;
  border-radius: 999px;
  cursor: pointer;
  border: none;
  transition: transform 0.15s ease, opacity 0.15s ease;
}
.cookie-btn:hover { transform: translateY(-1px); }
.cookie-btn-accept {
  color: #fff;
  background: linear-gradient(135deg, var(--orange) 0%, var(--orange-dark) 100%);
  box-shadow: 0 8px 18px rgba(226,78,27,0.3);
}
.cookie-btn-reject {
  color: var(--charcoal);
  background: rgba(255,255,255,0.7);
  border: 1px solid rgba(36,31,28,0.14);
}
.cookie-settings-link {
  font-size: 0.78rem;
  color: rgba(36,31,28,0.5);
  text-decoration: underline;
  cursor: pointer;
  align-self: center;
  background: none;
  border: none;
  font-family: var(--font-body);
}

@media (max-width: 480px) {
  .cookie-banner { left: 10px; right: 10px; bottom: 10px; padding: 18px; }
}
