/*
  style.css
  Theme: Financial Technologies (FinTech)
  Design System: Creative
  Trend: Block Interface
  Color Scheme: Neutral
  Animation Style: 3D Effects
*/

/* ---------------------------------- */
/*          CSS Variables             */
/* ---------------------------------- */
:root {
  --font-display: 'Raleway', sans-serif;
  --font-sans: 'Open Sans', sans-serif;

  --color-neutral-light: #F5F7FA;
  --color-neutral-medium: #E0E0E0;
  --color-neutral-dark: #4A4A4A;
  --color-neutral-darkest: #121212;
  --color-white: #FFFFFF;
  
  --color-accent: #4F46E5;
  --color-accent-dark: #4338CA;

  --transition-fast: 0.3s ease;
  --transition-medium: 0.5s ease;
  --shadow-md: 0 4px 6px -1px rgb(0 0 0 / 0.1), 0 2px 4px -2px rgb(0 0 0 / 0.1);
  --shadow-lg: 0 10px 15px -3px rgb(0 0 0 / 0.1), 0 4px 6px -4px rgb(0 0 0 / 0.1);
  --shadow-xl: 0 20px 25px -5px rgb(0 0 0 / 0.1), 0 8px 10px -6px rgb(0 0 0 / 0.1);
}

/* ---------------------------------- */
/*          Base & Typography         */
/* ---------------------------------- */
body {
  background-color: var(--color-neutral-light);
  color: var(--color-neutral-dark);
  font-family: var(--font-sans);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

h1, h2, h3, h4, h5, h6 {
  font-family: var(--font-display);
  color: var(--color-neutral-darkest);
  font-weight: 800;
  text-shadow: 1px 1px 2px rgba(0,0,0,0.05);
}

a {
  color: var(--color-accent);
  transition: color var(--transition-fast);
}

a:hover {
  color: var(--color-accent-dark);
}

section {
  padding-top: 5rem;
  padding-bottom: 5rem;
}

.container {
  max-width: 1200px;
}

/* ---------------------------------- */
/*        Global Button Styles        */
/* ---------------------------------- */
.btn, button, input[type="submit"] {
  display: inline-block;
  padding: 0.75rem 1.5rem;
  border-radius: 0.5rem;
  font-family: var(--font-sans);
  font-weight: 700;
  text-align: center;
  cursor: pointer;
  transition: all var(--transition-fast);
  border: none;
  box-shadow: var(--shadow-md);
  transform: perspective(1000px); /* Enable 3D transforms */
}

button:hover, .btn:hover, input[type="submit"]:hover {
  transform: scale(1.05) translateZ(10px);
  box-shadow: var(--shadow-lg);
}

/* Accent Button Style */
.bg-accent {
  background-color: var(--color-accent);
  color: var(--color-white);
}

.bg-accent:hover {
  background-color: var(--color-accent-dark);
}


/* ---------------------------------- */
/*       Header & Navigation          */
/* ---------------------------------- */
header a {
  position: relative;
  text-decoration: none;
}

header nav > a::after {
  content: '';
  position: absolute;
  width: 100%;
  transform: scaleX(0);
  height: 2px;
  bottom: -4px;
  left: 0;
  background-color: var(--color-accent);
  transform-origin: bottom right;
  transition: transform 0.25s ease-out;
}

header nav > a:hover::after {
  transform: scaleX(1);
  transform-origin: bottom left;
}


/* ---------------------------------- */
/*           Hero Section             */
/* ---------------------------------- */
#hero .parallax-bg {
  background-attachment: fixed; /* Simple parallax, enhanced with JS */
  background-position: center;
  background-repeat: no-repeat;
  background-size: cover;
  transform: translateZ(-1px) scale(1.1); /* 3D Parallax preparation */
}

#hero h1, #hero p {
  color: var(--color-white); /* Ensure hero text is white */
}


/* ---------------------------------- */
/*         Animation Classes          */
/* ---------------------------------- */
.scroll-animate {
  opacity: 0;
  transform: translateY(50px) scale(0.95);
  transition: opacity 0.8s ease-out, transform 0.8s ease-out;
}

.scroll-animate.is-visible {
  opacity: 1;
  transform: translateY(0) scale(1);
}

/* ---------------------------------- */
/*       Card Component Styles        */
/* ---------------------------------- */
.card {
  display: flex;
  flex-direction: column;
  background-color: var(--color-white);
  border-radius: 0.75rem;
  box-shadow: var(--shadow-lg);
  overflow: hidden;
  text-align: center;
  transform-style: preserve-3d;
  transition: transform var(--transition-medium), box-shadow var(--transition-medium);
}

.card:hover {
  transform: perspective(1500px) rotateY(5deg) scale(1.02);
  box-shadow: var(--shadow-xl);
}

.card .card-image {
  height: 224px; /* Fixed height for image containers */
  width: 100%;
  overflow: hidden;
  flex-shrink: 0;
}

.card .card-image img {
  width: 100%;
  height: 100%;
  object-fit: cover; /* Ensures image covers the area without distortion */
  transition: transform var(--transition-medium);
}

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

.card .card-content {
  padding: 1.5rem;
  flex-grow: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
}
.card .card-content h3 {
  margin-bottom: 0.5rem;
}
.card .card-content p {
  margin-bottom: 1rem;
  flex-grow: 1;
}
.card .card-content a {
  font-weight: 700;
  text-decoration: none;
  position: relative;
  padding-bottom: 2px;
}
.card .card-content a::after {
  content: '';
  position: absolute;
  width: 100%;
  height: 2px;
  bottom: 0;
  left: 0;
  background-color: var(--color-accent);
  transform: scaleX(0);
  transform-origin: left;
  transition: transform var(--transition-fast);
}
.card .card-content a:hover::after {
  transform: scaleX(1);
}

/* ---------------------------------- */
/*         Timeline (History)         */
/* ---------------------------------- */
.timeline-item .z-20 {
  transition: transform var(--transition-fast);
}
.timeline-item:hover .z-20 {
  transform: scale(1.2);
}

/* ---------------------------------- */
/*        Insights (Switches)         */
/* ---------------------------------- */
.insights-toggle {
  transition: all var(--transition-fast);
  border-bottom: 2px solid transparent;
  color: var(--color-neutral-dark);
}
.insights-toggle.active {
  color: var(--color-accent);
  border-bottom-color: var(--color-accent);
}
.insight-panel {
  transition: opacity 0.5s ease-in-out, transform 0.5s ease-in-out;
}

/* ---------------------------------- */
/*            FAQ Section             */
/* ---------------------------------- */
.faq-answer {
  max-height: 0;
  overflow: hidden;
  transition: max-height 0.5s cubic-bezier(0, 1, 0, 1), padding 0.5s ease;
  padding: 0 1.25rem;
}
.faq-answer.open {
  max-height: 500px; /* Large enough to fit content */
  padding: 0 1.25rem 1.25rem;
  transition: max-height 1s cubic-bezier(1, 0, 1, 0), padding 0.5s ease;
}
.faq-question svg {
  transition: transform var(--transition-medium);
}
.faq-question.open svg {
  transform: rotate(180deg);
}

/* ---------------------------------- */
/*          Contact Form              */
/* ---------------------------------- */
#contact-form input, #contact-form textarea {
  background-color: rgba(255, 255, 255, 0.1);
  border: 1px solid rgba(255, 255, 255, 0.2);
  color: var(--color-white);
  transition: border-color var(--transition-fast), box-shadow var(--transition-fast);
  padding: 0.75rem;
  border-radius: 0.5rem;
}

#contact-form input::placeholder, #contact-form textarea::placeholder {
  color: rgba(255, 255, 255, 0.5);
}

#contact-form input:focus, #contact-form textarea:focus {
  outline: none;
  border-color: var(--color-accent);
  box-shadow: 0 0 0 2px rgba(79, 70, 229, 0.5);
}

/* ---------------------------------- */
/*              Footer                */
/* ---------------------------------- */
footer {
  background-color: var(--color-neutral-darkest);
  color: var(--color-neutral-medium);
}
footer h3, footer h4 {
  color: var(--color-white);
}
footer a {
  color: var(--color-neutral-medium);
  text-decoration: none;
}
footer a:hover {
  color: var(--color-white);
  text-decoration: underline;
}

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

/* For static content pages like Privacy Policy and Terms */
.static-page-content {
  padding-top: 120px; /* Offset for sticky header */
  padding-bottom: 80px;
}
.static-page-content h1 {
  margin-bottom: 2rem;
}
.static-page-content h2 {
  margin-top: 2rem;
  margin-bottom: 1rem;
}

/* For form success page */
.success-page {
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 100vh;
  text-align: center;
  background-color: var(--color-neutral-light);
}
.success-page .content-wrapper {
  background: var(--color-white);
  padding: 3rem;
  border-radius: 1rem;
  box-shadow: var(--shadow-xl);
}