/* ============================================
   Solvaya — Concept A+D Style Sheet
   ============================================ */

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

/* ----- CSS Custom Properties ----- */
:root {
  --color-primary: #2D6EE4;
  --color-primary-hover: #1D5BD8;
  --color-primary-light: #EFF1FF;
  --color-accent: #059669;
  --color-accent-hover: #047857;
  --color-accent-light: #D1FAE5;
  --color-warning: #DC2626;
  --color-warning-light: #FEE2E2;
  --color-warning-bg: #FEF2F2;
  --color-bg: #FFFAF5;
  --color-bg-alt: #FFF5ED;
  --color-bg-card: #FFFFFF;
  --color-text: #1C1917;
  --color-text-secondary: #6B6258;
  --color-text-muted: #9C9388;
  --color-border: #E5DDD3;
  --color-border-light: #F0EBE4;
  --font-body: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
  --shadow-sm: 0 1px 2px rgba(0,0,0,0.04);
  --shadow-md: 0 4px 12px rgba(0,0,0,0.06);
  --shadow-lg: 0 12px 32px rgba(0,0,0,0.08);
  --radius-sm: 6px;
  --radius-md: 10px;
  --radius-lg: 16px;
  --radius-xl: 24px;
  --transition: 0.25s cubic-bezier(0.4, 0, 0.2, 1);
}

.dark {
  --color-primary: #3B82F6;
  --color-primary-hover: #60A5FA;
  --color-primary-light: #1E3A5F;
  --color-accent: #10B981;
  --color-accent-hover: #34D399;
  --color-accent-light: #064E3B;
  --color-warning: #EF4444;
  --color-warning-light: #7F1D1D;
  --color-warning-bg: #1F0A0A;
  --color-bg: #0F172A;
  --color-bg-alt: #1E293B;
  --color-bg-card: #1E293B;
  --color-text: #F5F5F4;
  --color-text-secondary: #A8A29E;
  --color-text-muted: #78716C;
  --color-border: #334155;
  --color-border-light: #1E293B;
  --shadow-sm: 0 1px 2px rgba(0,0,0,0.2);
  --shadow-md: 0 4px 12px rgba(0,0,0,0.3);
  --shadow-lg: 0 12px 32px rgba(0,0,0,0.4);
}

/* ----- Base ----- */
body {
  font-family: var(--font-body);
  background: var(--color-bg);
  color: var(--color-text);
  transition: background var(--transition), color var(--transition);
}

/* ----- Alpine Init Mask ----- */
[x-cloak] { display: none !important; }

/* ----- Animations ----- */
@keyframes fadeInUp {
  from { opacity: 0; transform: translateY(32px); }
  to   { opacity: 1; transform: translateY(0); }
}

@keyframes fadeInDown {
  from { opacity: 0; transform: translateY(-16px); }
  to   { opacity: 1; transform: translateY(0); }
}

@keyframes fadeIn {
  from { opacity: 0; }
  to   { opacity: 1; }
}

@keyframes countUp {
  from { opacity: 0; transform: translateY(8px); }
  to   { opacity: 1; transform: translateY(0); }
}

@keyframes slideInLeft {
  from { opacity: 0; transform: translateX(-48px); }
  to   { opacity: 1; transform: translateX(0); }
}

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

@keyframes scaleIn {
  from { opacity: 0; transform: scale(0.95); }
  to   { opacity: 1; transform: scale(1); }
}

@keyframes pulseGlow {
  0%, 100% { box-shadow: 0 0 0 0 rgba(45, 110, 228, 0.3); }
  50%      { box-shadow: 0 0 0 12px rgba(45, 110, 228, 0); }
}
.dark .pulse-glow {
  animation-name: pulseGlowDark;
}

.animate-fade-in-up {
  animation: fadeInUp 0.6s cubic-bezier(0.16, 1, 0.3, 1) forwards;
}

.animate-fade-in-down {
  animation: fadeInDown 0.5s cubic-bezier(0.16, 1, 0.3, 1) forwards;
}

.animate-fade-in {
  animation: fadeIn 0.5s ease forwards;
}

.animate-slide-left {
  animation: slideInLeft 0.7s cubic-bezier(0.16, 1, 0.3, 1) forwards;
}

.animate-slide-right {
  animation: slideInRight 0.7s cubic-bezier(0.16, 1, 0.3, 1) forwards;
}

.animate-scale-in {
  animation: scaleIn 0.5s cubic-bezier(0.16, 1, 0.3, 1) forwards;
}

.pulse-glow {
  animation: pulseGlow 2s ease-in-out infinite;
}

/* ----- Scroll Reveal ----- */
.reveal {
  opacity: 0;
  transform: translateY(32px);
  transition: opacity 0.7s cubic-bezier(0.16, 1, 0.3, 1),
              transform 0.7s cubic-bezier(0.16, 1, 0.3, 1);
}

.reveal.visible {
  opacity: 1;
  transform: translateY(0);
}

.reveal-left {
  opacity: 0;
  transform: translateX(-48px);
  transition: opacity 0.7s cubic-bezier(0.16, 1, 0.3, 1),
              transform 0.7s cubic-bezier(0.16, 1, 0.3, 1);
}

.reveal-left.visible {
  opacity: 1;
  transform: translateX(0);
}

.reveal-right {
  opacity: 0;
  transform: translateX(48px);
  transition: opacity 0.7s cubic-bezier(0.16, 1, 0.3, 1),
              transform 0.7s cubic-bezier(0.16, 1, 0.3, 1);
}

.reveal-right.visible {
  opacity: 1;
  transform: translateX(0);
}

.reveal-scale {
  opacity: 0;
  transform: scale(0.95);
  transition: opacity 0.7s cubic-bezier(0.16, 1, 0.3, 1),
              transform 0.7s cubic-bezier(0.16, 1, 0.3, 1);
}

.reveal-scale.visible {
  opacity: 1;
  transform: scale(1);
}

/* ----- Scrollbar ----- */
::-webkit-scrollbar { width: 8px; }
::-webkit-scrollbar-track { background: var(--color-bg-alt); }
::-webkit-scrollbar-thumb { background: var(--color-border); border-radius: 4px; }
::-webkit-scrollbar-thumb:hover { background: var(--color-text-muted); }

/* ----- Calculator ----- */
.calc-number {
  font-size: 2.75rem;
  font-weight: 800;
  letter-spacing: -0.03em;
  line-height: 1.1;
  font-variant-numeric: tabular-nums;
}

@media (min-width: 768px) {
  .calc-number { font-size: 3.5rem; }
}

.calc-label {
  font-size: 0.875rem;
  font-weight: 500;
  letter-spacing: 0.02em;
  text-transform: uppercase;
}

/* Range slider */
input[type="range"] {
  -webkit-appearance: none;
  appearance: none;
  width: 100%;
  height: 6px;
  border-radius: 3px;
  outline: none;
  background: var(--color-border);
  transition: background var(--transition);
}

input[type="range"]::-webkit-slider-thumb {
  -webkit-appearance: none;
  appearance: none;
  width: 24px;
  height: 24px;
  border-radius: 50%;
  background: var(--color-primary);
  cursor: pointer;
  border: 3px solid var(--color-bg-card);
  box-shadow: var(--shadow-md);
  transition: transform 0.15s ease, box-shadow var(--transition);
}

input[type="range"]::-webkit-slider-thumb:hover {
  transform: scale(1.15);
  box-shadow: var(--shadow-lg);
}

input[type="range"]::-moz-range-thumb {
  width: 24px;
  height: 24px;
  border-radius: 50%;
  background: var(--color-primary);
  cursor: pointer;
  border: 3px solid var(--color-bg-card);
  box-shadow: var(--shadow-md);
}

/* Range fill track */
input[type="range"]::-webkit-slider-runnable-track {
  height: 6px;
  border-radius: 3px;
}

/* Number input */
input[type="number"]::-webkit-inner-spin-button,
input[type="number"]::-webkit-outer-spin-button {
  opacity: 1;
}

.input-number {
  -moz-appearance: textfield;
  width: 100%;
  padding: 0.75rem 1rem;
  border: 2px solid var(--color-border);
  border-radius: var(--radius-md);
  background: var(--color-bg-card);
  color: var(--color-text);
  font-size: 1.125rem;
  font-weight: 600;
  font-variant-numeric: tabular-nums;
  transition: border-color var(--transition), box-shadow var(--transition);
  outline: none;
}

.input-number:focus {
  border-color: var(--color-primary);
  box-shadow: 0 0 0 3px rgba(45, 110, 228, 0.15);
}

/* ----- Trust Bar ----- */
@keyframes scroll {
  0%   { transform: translateX(0); }
  100% { transform: translateX(-50%); }
}

.trust-track {
  display: flex;
  gap: 3rem;
  width: max-content;
  animation: scroll 45s linear infinite;
}

.trust-track:hover {
  animation-play-state: paused;
}

.trust-item {
  flex-shrink: 0;
  font-size: 1rem;
  font-weight: 600;
  letter-spacing: 0.03em;
  color: var(--color-text-muted);
  white-space: nowrap;
  padding: 0.375rem 0;
  transition: color var(--transition);
}

.trust-item:hover {
  color: var(--color-text);
}

/* ----- Freedom Progress ----- */
.freedom-progress {
  position: fixed;
  right: 1.5rem;
  top: 50%;
  transform: translateY(-50%);
  z-index: 40;
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.freedom-dot {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: var(--color-border);
  border: 2px solid transparent;
  transition: all var(--transition);
  cursor: pointer;
}

.freedom-dot.active {
  background: var(--color-primary);
  border-color: var(--color-primary-light);
  box-shadow: 0 0 0 4px rgba(45, 110, 228, 0.15);
  transform: scale(1.2);
}

.dark .freedom-dot.active {
  box-shadow: 0 0 0 4px rgba(59, 130, 246, 0.2);
}

/* ----- Freedom Sections ----- */
.freedom-section {
  min-height: 100vh;
  display: flex;
  align-items: center;
  padding: 5rem 0;
  position: relative;
}

.freedom-stat {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.5rem 1rem;
  border-radius: 999px;
  font-size: 0.875rem;
  font-weight: 600;
  background: var(--color-accent-light);
  color: var(--color-accent);
}

.stat-number {
  font-size: 1.5rem;
  font-weight: 800;
}

/* ----- Image Placeholder ----- */
.img-cover {
  width: 100%;
  height: 100%;
  object-fit: cover;
  border-radius: var(--radius-lg);
}

.img-rounded {
  border-radius: var(--radius-lg);
}

/* ----- CTA Banner ----- */
.cta-banner {
  background: linear-gradient(135deg, var(--color-primary), #1D4ED8);
  padding: 4rem 0;
  position: relative;
  overflow: hidden;
}

.cta-banner::before {
  content: '';
  position: absolute;
  inset: 0;
  background: radial-gradient(ellipse at 30% 50%, rgba(255,255,255,0.08) 0%, transparent 60%);
}

/* ----- Button Styles ----- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  padding: 0.875rem 2rem;
  border-radius: var(--radius-md);
  font-weight: 600;
  font-size: 1rem;
  line-height: 1.2;
  cursor: pointer;
  border: none;
  transition: all var(--transition);
  text-decoration: none;
}

.btn:hover {
  transform: translateY(-2px);
}

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

.btn-primary {
  background: var(--color-primary);
  color: #fff;
  box-shadow: 0 4px 14px rgba(45, 110, 228, 0.35);
}

.btn-primary:hover {
  background: var(--color-primary-hover);
  box-shadow: 0 6px 20px rgba(45, 110, 228, 0.45);
}

.btn-primary:active {
  box-shadow: 0 2px 8px rgba(45, 110, 228, 0.3);
}

.btn-accent {
  background: var(--color-accent);
  color: #fff;
  box-shadow: 0 4px 14px rgba(5, 150, 105, 0.35);
}

.btn-accent:hover {
  background: var(--color-accent-hover);
  box-shadow: 0 6px 20px rgba(5, 150, 105, 0.45);
}

.btn-outline {
  background: transparent;
  color: var(--color-text);
  border: 2px solid var(--color-border);
}

.btn-outline:hover {
  border-color: var(--color-primary);
  color: var(--color-primary);
  box-shadow: var(--shadow-md);
}

.btn-lg {
  padding: 1rem 2.5rem;
  font-size: 1.125rem;
  border-radius: var(--radius-lg);
}

/* ----- Form ----- */
.form-input {
  width: 100%;
  padding: 0.875rem 1.125rem;
  border: 2px solid var(--color-border);
  border-radius: var(--radius-md);
  background: var(--color-bg-card);
  color: var(--color-text);
  font-size: 1rem;
  transition: border-color var(--transition), box-shadow var(--transition);
  outline: none;
  font-family: var(--font-body);
}

.form-input:focus {
  border-color: var(--color-primary);
  box-shadow: 0 0 0 3px rgba(45, 110, 228, 0.12);
}

.form-input.error {
  border-color: var(--color-warning);
  box-shadow: 0 0 0 3px rgba(220, 38, 38, 0.12);
}

.form-label {
  display: block;
  font-size: 0.875rem;
  font-weight: 600;
  margin-bottom: 0.5rem;
  color: var(--color-text);
}

.form-error {
  font-size: 0.8125rem;
  color: var(--color-warning);
  margin-top: 0.375rem;
}

select.form-input {
  appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8' viewBox='0 0 12 8'%3E%3Cpath d='M1 1l5 5 5-5' stroke='%236B6258' stroke-width='2' fill='none' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 1rem center;
  padding-right: 2.5rem;
}

.dark select.form-input {
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8' viewBox='0 0 12 8'%3E%3Cpath d='M1 1l5 5 5-5' stroke='%23A8A29E' stroke-width='2' fill='none' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E");
}

/* ----- FAQ ----- */
.faq-item {
  border-bottom: 1px solid var(--color-border);
}

.faq-question {
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 1.25rem 0;
  background: none;
  border: none;
  cursor: pointer;
  color: var(--color-text);
  font-size: 1rem;
  font-weight: 600;
  text-align: left;
  font-family: var(--font-body);
  transition: color var(--transition);
}

.faq-question:hover {
  color: var(--color-primary);
}

.faq-answer {
  overflow: hidden;
  transition: max-height 0.35s cubic-bezier(0.4, 0, 0.2, 1),
              opacity 0.3s ease;
}

.faq-answer-inner {
  padding-bottom: 1.25rem;
  color: var(--color-text-secondary);
  line-height: 1.7;
}

/* ----- Property Count Button ----- */
.prop-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 40px;
  height: 40px;
  border-radius: 50%;
  border: 2px solid var(--color-border);
  background: var(--color-bg-card);
  color: var(--color-text);
  font-size: 1.25rem;
  font-weight: 600;
  cursor: pointer;
  transition: all var(--transition);
  line-height: 1;
}

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

/* ----- Mobile Menu Overlay ----- */
.mobile-menu {
  position: fixed;
  inset: 0;
  z-index: 50;
  background: var(--color-bg);
  display: flex;
  flex-direction: column;
  padding: 1.5rem;
}

/* ----- Selection ----- */
::selection {
  background: rgba(45, 110, 228, 0.2);
  color: var(--color-text);
}

.dark ::selection {
  background: rgba(59, 130, 246, 0.3);
}

/* ----- Link styles ----- */
.nav-link {
  position: relative;
  font-weight: 500;
  color: var(--color-text-secondary);
  transition: color var(--transition);
  text-decoration: none;
}

.nav-link::after {
  content: '';
  position: absolute;
  bottom: -2px;
  left: 0;
  width: 0;
  height: 2px;
  background: var(--color-primary);
  transition: width var(--transition);
}

.nav-link:hover {
  color: var(--color-text);
}

.nav-link:hover::after {
  width: 100%;
}

.nav-link.active {
  color: var(--color-primary);
}

.nav-link.active::after {
  width: 100%;
}

/* ----- Section spacing ----- */
.section-padding {
  padding: 5rem 0;
}

@media (min-width: 768px) {
  .section-padding {
    padding: 7rem 0;
  }
}

/* ----- Heading styles ----- */
.heading-xl {
  font-size: 2.75rem;
  font-weight: 800;
  line-height: 1.1;
  letter-spacing: -0.03em;
}

@media (min-width: 768px) {
  .heading-xl { font-size: 3.75rem; }
}

@media (min-width: 1024px) {
  .heading-xl { font-size: 4.5rem; }
}

.heading-lg {
  font-size: 2rem;
  font-weight: 800;
  line-height: 1.15;
  letter-spacing: -0.02em;
}

@media (min-width: 768px) {
  .heading-lg { font-size: 2.75rem; }
}

.heading-md {
  font-size: 1.5rem;
  font-weight: 700;
  line-height: 1.2;
  letter-spacing: -0.02em;
}

@media (min-width: 768px) {
  .heading-md { font-size: 1.875rem; }
}

/* ----- Helper: divider ----- */
.divider {
  width: 3rem;
  height: 4px;
  border-radius: 2px;
  background: var(--color-primary);
}

/* ----- Testimonial block ----- */
.testimonial-block {
  position: relative;
  padding: 2rem;
  border-left: 4px solid var(--color-primary);
  background: var(--color-bg-alt);
  border-radius: 0 var(--radius-lg) var(--radius-lg) 0;
}

.testimonial-quote {
  font-size: 1.125rem;
  font-style: italic;
  line-height: 1.7;
  color: var(--color-text);
}

.testimonial-attribution {
  font-size: 0.9375rem;
  font-weight: 600;
  color: var(--color-text-secondary);
  margin-top: 1rem;
}

/* ----- Pricing card ----- */
.pricing-card {
  background: var(--color-bg-card);
  border: 2px solid var(--color-border);
  border-radius: var(--radius-xl);
  padding: 3rem;
  max-width: 520px;
  margin: 0 auto;
  transition: border-color var(--transition), box-shadow var(--transition);
}

.pricing-card:hover {
  border-color: var(--color-primary);
  box-shadow: 0 8px 32px rgba(45, 110, 228, 0.1);
}

.dark .pricing-card:hover {
  box-shadow: 0 8px 32px rgba(59, 130, 246, 0.15);
}

/* ----- Header ----- */
.site-header {
  position: sticky;
  top: 0;
  z-index: 30;
  background: rgba(255, 250, 245, 0.9);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--color-border-light);
  transition: background var(--transition), border-color var(--transition);
}

.dark .site-header {
  background: rgba(15, 23, 42, 0.9);
}

/* ----- Footer ----- */
.site-footer {
  background: var(--color-bg-alt);
  border-top: 1px solid var(--color-border-light);
  padding: 3rem 0;
  transition: background var(--transition);
}

/* ----- Gradient text ----- */
.gradient-text {
  background: linear-gradient(135deg, var(--color-primary), #8B5CF6);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

/* ----- Pill tag ----- */
.pill {
  display: inline-flex;
  align-items: center;
  gap: 0.375rem;
  padding: 0.375rem 0.875rem;
  border-radius: 999px;
  font-size: 0.8125rem;
  font-weight: 600;
  background: var(--color-primary-light);
  color: var(--color-primary);
}

/* ----- Toggle button for dark mode ----- */
.theme-toggle {
  width: 40px;
  height: 40px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  border: 2px solid var(--color-border);
  background: var(--color-bg-card);
  cursor: pointer;
  transition: all var(--transition);
  color: var(--color-text);
}

.theme-toggle:hover {
  border-color: var(--color-primary);
  color: var(--color-primary);
  background: var(--color-primary-light);
}

/* ----- Loading / transition helpers ----- */
/* ----- Theme toggle icons ----- */
.theme-toggle .icon-sun { display: block; }
.theme-toggle .icon-moon { display: none; }
.dark .theme-toggle .icon-sun { display: none; }
.dark .theme-toggle .icon-moon { display: block; }

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
}
