/* ============================================
   RFEL Design System
   ============================================ */

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

/* --- CSS Variables --- */
:root {
  --color-primary: #0B3D4A;
  --color-primary-light: #0E4F5F;
  --color-primary-dark: #072A33;
  --color-accent: #E8803A;
  --color-accent-hover: #D0702E;
  --color-mint: #4ECDC4;
  --color-mint-light: #E6F9F7;
  --color-success: #2ECC71;
  --color-text: #1A1A2E;
  --color-text-light: #5A5A72;
  --color-bg: #FAFBFC;
  --color-bg-alt: #F0F4F5;
  --color-white: #FFFFFF;
  --color-gray-100: #F5F5F7;
  --color-gray-200: #E8E8ED;
  --color-gray-300: #D1D1D9;

  --font-main: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
  --font-mono: 'JetBrains Mono', monospace;

  --shadow-sm: 0 1px 3px rgba(0,0,0,0.08);
  --shadow-md: 0 4px 16px rgba(0,0,0,0.1);
  --shadow-lg: 0 8px 32px rgba(0,0,0,0.12);
  --shadow-xl: 0 16px 48px rgba(0,0,0,0.15);

  --radius-sm: 8px;
  --radius-md: 12px;
  --radius-lg: 16px;
  --radius-xl: 24px;

  --transition: 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  --transition-fast: 0.15s ease;
}

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

html {
  scroll-behavior: smooth;
  font-size: 16px;
}

body {
  font-family: var(--font-main);
  color: var(--color-text);
  background: var(--color-bg);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

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

a {
  text-decoration: none;
  color: inherit;
  transition: color var(--transition-fast);
}

ul { list-style: none; }

/* --- Utilities --- */
.container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 24px;
}

.section-title {
  font-size: 2.25rem;
  font-weight: 800;
  text-align: center;
  color: var(--color-text);
  margin-bottom: 1rem;
}

.section-subtitle {
  font-size: 1.125rem;
  text-align: center;
  color: var(--color-text-light);
  max-width: 600px;
  margin: 0 auto 3rem;
}

/* --- Buttons --- */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 14px 28px;
  border-radius: var(--radius-sm);
  font-family: var(--font-main);
  font-size: 1rem;
  font-weight: 600;
  cursor: pointer;
  border: 2px solid transparent;
  transition: all var(--transition);
  white-space: nowrap;
}

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

.btn-primary:hover {
  background: var(--color-accent-hover);
  border-color: var(--color-accent-hover);
  transform: translateY(-2px);
  box-shadow: 0 8px 24px rgba(232, 128, 58, 0.35);
}

.btn-outline {
  background: transparent;
  color: var(--color-white);
  border-color: rgba(255,255,255,0.5);
}

.btn-outline:hover {
  background: var(--color-white);
  color: var(--color-primary);
  border-color: var(--color-white);
  transform: translateY(-2px);
}

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

.btn-teal:hover {
  background: var(--color-primary-light);
  transform: translateY(-2px);
  box-shadow: 0 8px 24px rgba(11, 61, 74, 0.3);
}

.btn-sm {
  padding: 10px 20px;
  font-size: 0.875rem;
}

/* ============================================
   TOP BAR
   ============================================ */
.top-bar {
  background: var(--color-primary-dark);
  color: rgba(255,255,255,0.85);
  font-size: 0.85rem;
  padding: 8px 0;
}

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

.top-bar-left {
  display: flex;
  gap: 24px;
  align-items: center;
}

.top-bar a {
  color: rgba(255,255,255,0.85);
  display: flex;
  align-items: center;
  gap: 6px;
}

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

.top-bar-icon {
  font-size: 0.9rem;
}

/* ============================================
   NAVIGATION
   ============================================ */
.navbar {
  position: sticky;
  top: 0;
  z-index: 1000;
  background: var(--color-white);
  box-shadow: none;
  transition: box-shadow var(--transition), background var(--transition);
  padding: 0;
}

.navbar.scrolled {
  box-shadow: var(--shadow-md);
}

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

.nav-logo img {
  height: 44px;
  width: auto;
}

.nav-links {
  display: flex;
  align-items: center;
  gap: 32px;
}

.nav-links a {
  font-size: 0.95rem;
  font-weight: 500;
  color: var(--color-text);
  position: relative;
  padding: 4px 0;
}

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

.nav-links a:hover {
  color: var(--color-primary);
}

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

.nav-cta {
  margin-left: 8px;
}

/* Mobile hamburger */
.nav-toggle {
  display: none;
  flex-direction: column;
  gap: 5px;
  cursor: pointer;
  padding: 8px;
  background: none;
  border: none;
}

.nav-toggle span {
  display: block;
  width: 24px;
  height: 2px;
  background: var(--color-text);
  transition: all var(--transition);
  border-radius: 2px;
}

/* ============================================
   HERO
   ============================================ */
.hero {
  background: linear-gradient(135deg, var(--color-primary-dark) 0%, var(--color-primary) 50%, var(--color-primary-light) 100%);
  color: var(--color-white);
  padding: 80px 0 60px;
  position: relative;
  overflow: hidden;
}

.hero::before {
  content: '';
  position: absolute;
  top: -50%;
  right: -20%;
  width: 600px;
  height: 600px;
  background: radial-gradient(circle, rgba(78, 205, 196, 0.12) 0%, transparent 70%);
  border-radius: 50%;
}

.hero .container {
  display: flex;
  align-items: center;
  gap: 60px;
  position: relative;
  z-index: 1;
}

.hero-content {
  flex: 1;
  max-width: 560px;
}

.hero-content h1 {
  font-size: 3rem;
  font-weight: 800;
  line-height: 1.1;
  margin-bottom: 16px;
  letter-spacing: -0.02em;
}

.hero-content h1 span {
  color: var(--color-accent);
}

.hero-subtitle {
  font-size: 1.15rem;
  color: rgba(255,255,255,0.8);
  margin-bottom: 32px;
  line-height: 1.6;
}

.hero-buttons {
  display: flex;
  gap: 16px;
  flex-wrap: wrap;
}

.hero-image {
  flex: 1;
  display: flex;
  justify-content: center;
  align-items: center;
}

.hero-image img {
  max-width: 420px;
  filter: drop-shadow(0 20px 40px rgba(0,0,0,0.3));
  animation: heroFloat 6s ease-in-out infinite;
}

@keyframes heroFloat {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-12px); }
}

/* ============================================
   STATS BAR
   ============================================ */
.stats-bar {
  background: var(--color-white);
  padding: 32px 0;
  border-bottom: 1px solid var(--color-gray-200);
}

.stats-bar .container {
  display: flex;
  justify-content: center;
  gap: 60px;
}

.stat-item {
  text-align: center;
  position: relative;
}

.stat-item:not(:last-child)::after {
  content: '';
  position: absolute;
  right: -30px;
  top: 50%;
  transform: translateY(-50%);
  width: 1px;
  height: 40px;
  background: var(--color-gray-300);
}

.stat-number {
  font-family: var(--font-mono);
  font-size: 2rem;
  font-weight: 700;
  color: var(--color-primary);
  display: block;
}

.stat-label {
  font-size: 0.9rem;
  color: var(--color-text-light);
  margin-top: 4px;
}

/* ============================================
   TRUST BAR
   ============================================ */
.trust-bar {
  background: var(--color-gray-100);
  padding: 24px 0;
  border-bottom: 1px solid var(--color-gray-200);
}

.trust-bar .container {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 48px;
}

.trust-item {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 0.95rem;
  font-weight: 500;
  color: var(--color-text-light);
}

.trust-icon {
  font-size: 1.5rem;
}

.trust-item img {
  height: 28px;
  opacity: 0.7;
}

/* ============================================
   SERVICES
   ============================================ */
.services {
  padding: 80px 0;
  background: var(--color-white);
}

.services-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 24px;
}

.service-card {
  background: var(--color-white);
  border: 1px solid var(--color-gray-200);
  border-radius: var(--radius-lg);
  padding: 32px 24px;
  transition: all var(--transition);
  position: relative;
  overflow: hidden;
}

.service-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 3px;
  background: linear-gradient(90deg, var(--color-primary), var(--color-mint));
  opacity: 0;
  transition: opacity var(--transition);
}

.service-card:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-lg);
  border-color: transparent;
}

.service-card:hover::before {
  opacity: 1;
}

.service-icon {
  width: 56px;
  height: 56px;
  border-radius: var(--radius-md);
  background: var(--color-mint-light);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.5rem;
  margin-bottom: 20px;
  color: var(--color-primary);
}

.service-card h3 {
  font-size: 1.2rem;
  font-weight: 700;
  margin-bottom: 8px;
  color: var(--color-text);
}

.service-card p {
  font-size: 0.9rem;
  color: var(--color-text-light);
  margin-bottom: 16px;
  line-height: 1.5;
}

.service-link {
  font-size: 0.9rem;
  font-weight: 600;
  color: var(--color-primary);
  display: inline-flex;
  align-items: center;
  gap: 6px;
  transition: gap var(--transition);
}

.service-link:hover {
  gap: 10px;
  color: var(--color-accent);
}

/* ============================================
   PROCESS
   ============================================ */
.process {
  padding: 80px 0;
  background: linear-gradient(180deg, var(--color-bg-alt) 0%, var(--color-mint-light) 100%);
}

.process-steps {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  position: relative;
  max-width: 900px;
  margin: 0 auto;
}

.process-steps::before {
  content: '';
  position: absolute;
  top: 36px;
  left: 72px;
  right: 72px;
  height: 2px;
  background: linear-gradient(90deg, var(--color-primary), var(--color-mint));
  z-index: 0;
}

.process-step {
  text-align: center;
  position: relative;
  z-index: 1;
  flex: 1;
}

.process-icon {
  width: 72px;
  height: 72px;
  border-radius: 50%;
  background: var(--color-white);
  border: 3px solid var(--color-primary);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.6rem;
  margin: 0 auto 16px;
  color: var(--color-primary);
  box-shadow: var(--shadow-md);
  transition: all var(--transition);
}

.process-step:hover .process-icon {
  background: var(--color-primary);
  color: var(--color-white);
  transform: scale(1.08);
}

.process-step h4 {
  font-size: 1.05rem;
  font-weight: 700;
  margin-bottom: 6px;
  color: var(--color-text);
}

.process-step p {
  font-size: 0.85rem;
  color: var(--color-text-light);
  max-width: 160px;
  margin: 0 auto;
  line-height: 1.4;
}

/* ============================================
   CALCULATOR TEASER
   ============================================ */
.calc-teaser {
  padding: 80px 0;
  background: var(--color-white);
}

.calc-teaser .container {
  display: flex;
  align-items: center;
  gap: 60px;
}

.calc-content {
  flex: 1;
}

.calc-content h2 {
  font-size: 2.25rem;
  font-weight: 800;
  margin-bottom: 16px;
  color: var(--color-text);
}

.calc-content p {
  font-size: 1.1rem;
  color: var(--color-text-light);
  margin-bottom: 24px;
  line-height: 1.7;
}

.calc-badge {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: var(--color-mint-light);
  color: var(--color-primary);
  padding: 8px 16px;
  border-radius: var(--radius-xl);
  font-size: 0.9rem;
  font-weight: 600;
  margin-bottom: 24px;
}

.calc-preview {
  flex: 1;
  background: linear-gradient(135deg, var(--color-primary-dark), var(--color-primary));
  border-radius: var(--radius-xl);
  padding: 40px;
  color: var(--color-white);
  position: relative;
  overflow: hidden;
}

.calc-preview::before {
  content: '';
  position: absolute;
  top: -30%;
  right: -20%;
  width: 200px;
  height: 200px;
  background: radial-gradient(circle, rgba(232,128,58,0.2), transparent 70%);
  border-radius: 50%;
}

.calc-preview h3 {
  font-size: 1rem;
  font-weight: 500;
  opacity: 0.8;
  margin-bottom: 8px;
}

.calc-amount {
  font-family: var(--font-mono);
  font-size: 3rem;
  font-weight: 700;
  color: var(--color-accent);
  margin-bottom: 4px;
}

.calc-period {
  font-size: 0.9rem;
  opacity: 0.7;
  margin-bottom: 24px;
}

.calc-detail {
  display: flex;
  justify-content: space-between;
  padding: 12px 0;
  border-top: 1px solid rgba(255,255,255,0.15);
  font-size: 0.9rem;
}

.calc-detail span:first-child {
  opacity: 0.7;
}

/* ============================================
   FAQ
   ============================================ */
.faq {
  padding: 80px 0;
  background: var(--color-bg-alt);
}

.faq-list {
  max-width: 720px;
  margin: 0 auto;
}

.faq-item {
  background: var(--color-white);
  border-radius: var(--radius-md);
  margin-bottom: 12px;
  border: 1px solid var(--color-gray-200);
  overflow: hidden;
  transition: box-shadow var(--transition);
}

.faq-item:hover {
  box-shadow: var(--shadow-sm);
}

.faq-question {
  width: 100%;
  padding: 20px 24px;
  background: none;
  border: none;
  font-family: var(--font-main);
  font-size: 1rem;
  font-weight: 600;
  color: var(--color-text);
  text-align: left;
  cursor: pointer;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 16px;
}

.faq-question::after {
  content: '+';
  font-size: 1.5rem;
  font-weight: 300;
  color: var(--color-primary);
  transition: transform var(--transition);
  flex-shrink: 0;
}

.faq-item.active .faq-question::after {
  content: '−';
  transform: rotate(180deg);
}

.faq-answer {
  max-height: 0;
  overflow: hidden;
  transition: max-height 0.4s ease, padding 0.3s ease;
}

.faq-item.active .faq-answer {
  max-height: 300px;
}

.faq-answer p {
  padding: 0 24px 20px;
  color: var(--color-text-light);
  font-size: 0.95rem;
  line-height: 1.7;
}

/* ============================================
   CTA SECTION
   ============================================ */
.cta-section {
  padding: 80px 0;
  background: linear-gradient(135deg, var(--color-primary-dark), var(--color-primary));
  color: var(--color-white);
  text-align: center;
}

.cta-section h2 {
  font-size: 2.25rem;
  font-weight: 800;
  margin-bottom: 16px;
}

.cta-section p {
  font-size: 1.15rem;
  opacity: 0.8;
  margin-bottom: 32px;
  max-width: 500px;
  margin-left: auto;
  margin-right: auto;
}

.cta-buttons {
  display: flex;
  justify-content: center;
  gap: 16px;
  flex-wrap: wrap;
}

/* ============================================
   FOOTER
   ============================================ */
.footer {
  background: var(--color-text);
  color: rgba(255,255,255,0.7);
  padding: 60px 0 24px;
}

.footer-grid {
  display: grid;
  grid-template-columns: 2fr 1fr 1fr 1fr;
  gap: 40px;
  margin-bottom: 40px;
}

.footer-brand p {
  font-size: 0.9rem;
  line-height: 1.6;
  margin-top: 16px;
  max-width: 280px;
}

.footer-brand img {
  height: 36px;
  filter: brightness(0) invert(1);
}

.footer h4 {
  color: var(--color-white);
  font-size: 0.95rem;
  font-weight: 700;
  margin-bottom: 16px;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.footer ul li {
  margin-bottom: 10px;
}

.footer ul li a {
  color: rgba(255,255,255,0.6);
  font-size: 0.9rem;
  transition: color var(--transition-fast);
}

.footer ul li a:hover {
  color: var(--color-accent);
}

.footer-bottom {
  border-top: 1px solid rgba(255,255,255,0.1);
  padding-top: 24px;
  text-align: center;
  font-size: 0.8rem;
  color: rgba(255,255,255,0.4);
}

/* ============================================
   SCROLL ANIMATIONS
   ============================================ */
.fade-in {
  opacity: 0;
  transform: translateY(24px);
  transition: opacity 0.6s ease, transform 0.6s ease;
}

.fade-in.visible {
  opacity: 1;
  transform: translateY(0);
}

/* ============================================
   RESPONSIVE
   ============================================ */
@media (max-width: 1024px) {
  .hero .container {
    flex-direction: column;
    text-align: center;
  }

  .hero-content h1 {
    font-size: 2.5rem;
  }

  .hero-buttons {
    justify-content: center;
  }

  .hero-image img {
    max-width: 320px;
  }

  .services-grid {
    grid-template-columns: repeat(2, 1fr);
  }

  .calc-teaser .container {
    flex-direction: column;
  }

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

@media (max-width: 768px) {
  .top-bar-right {
    display: none;
  }

  .nav-links {
    display: none;
    position: absolute;
    top: 72px;
    left: 0;
    right: 0;
    background: var(--color-white);
    flex-direction: column;
    padding: 24px;
    gap: 16px;
    box-shadow: var(--shadow-lg);
  }

  .nav-links.active {
    display: flex;
  }

  .nav-toggle {
    display: flex;
  }

  .hero-content h1 {
    font-size: 2rem;
  }

  .stats-bar .container {
    flex-direction: column;
    gap: 20px;
  }

  .stat-item::after {
    display: none;
  }

  .trust-bar .container {
    flex-wrap: wrap;
    gap: 24px;
  }

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

  .process-steps {
    flex-direction: column;
    gap: 32px;
  }

  .process-steps::before {
    display: none;
  }

  .section-title {
    font-size: 1.75rem;
  }

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