/* --- RewardPact Landing Page --- */

/* ------------------- */
/* --- ROOT & FONT --- */
/* ------------------- */
:root {
  /* Color Palette from Platform Image */
  --primary-hue: 275; /* Purple/Magenta from 'Offers' button */
  --accent-hue: 225; /* A secondary blue */
  
  --primary-color: hsl(var(--primary-hue), 90%, 70%);
  --primary-dark: hsl(var(--primary-hue), 90%, 60%);
  
  --text-primary: #E2E8F0;
  --text-secondary: #94A3B8;
  
  --bg-main: #0D1117; /* Darkest background from image */
  --bg-header: #161B22; /* Header background from image */
  --bg-content: #21262D; /* Card background from image */
  --bg-glass: rgba(33, 38, 45, 0.5);
  --border-color: rgba(148, 163, 184, 0.2);

  /* Shadows & Radii */
  --shadow-md: 0 4px 6px -1px rgba(0,0,0,0.1), 0 2px 4px -1px rgba(0,0,0,0.06);
  --shadow-lg: 0 10px 20px -5px rgba(0,0,0,0.2);
  --shadow-2xl: 0 25px 50px -12px rgb(0 0 0 / 0.25);
  --radius-md: 12px;
  --radius-lg: 16px;
  --radius-xl: 24px;
}

/* --- Global Styles --- */
* { box-sizing: border-box; }
html { font-size: 16px; scroll-behavior: smooth; }
body {
  font-family: "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  margin: 0;
  background-color: var(--bg-main);
  color: var(--text-primary);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  overflow-x: hidden;
}

.container {
    width: 100%;
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 1.5rem;
}

/* --- Cleaner Animated Background --- */
#background-animation {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: -1;
    overflow: hidden;
    background: linear-gradient(300deg, var(--bg-main), hsl(var(--primary-hue), 30%, 15%), hsl(var(--accent-hue), 40%, 15%), var(--bg-main));
    background-size: 400% 400%;
    animation: gradientAnimation 25s ease infinite;
}

@keyframes gradientAnimation {
    0% { background-position: 0% 50%; }
    50% { background-position: 100% 50%; }
    100% { background-position: 0% 50%; }
}

/* --- Header --- */
.main-header {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    padding: 1rem 0;
    z-index: 1000;
    background-color: var(--bg-header); /* Solid background color */
    border-bottom: 1px solid var(--border-color);
    transition: box-shadow 0.3s ease;
}
.main-header.scrolled {
    box-shadow: var(--shadow-lg); /* Add shadow on scroll for depth */
}
.main-header .container {
    display: flex;
    justify-content: space-between;
    align-items: center;
}
.brand {
    font-size: 1.5rem;
    font-weight: 800;
    color: white;
    text-decoration: none;
}
.main-nav {
    display: none; /* Hidden on mobile by default */
    align-items: center;
    gap: 2rem;
}
.main-nav a {
    color: var(--text-secondary);
    text-decoration: none;
    font-weight: 600;
    transition: color 0.3s ease;
    position: relative;
    padding: 0.5rem 0;
}
.main-nav a::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 0;
    height: 2px;
    background-color: var(--primary-color);
    transition: width 0.3s ease;
}
.main-nav a:hover {
    color: var(--text-primary);
}
.main-nav a:hover::after {
    width: 100%;
}
.header-right {
    display: flex;
    align-items: center;
    gap: 1rem;
}
.header-login-btn {
    background-color: var(--primary-color);
    color: white !important;
    padding: 0.6rem 1.25rem;
    border-radius: var(--radius-lg);
    transition: all 0.3s ease;
    text-decoration: none;
    font-weight: 600;
    display: none; /* Hidden on mobile */
    align-items: center;
    gap: 0.5rem;
}
.header-login-btn:hover {
    background-color: var(--primary-dark);
    transform: translateY(-2px);
    box-shadow: 0 4px 15px rgba(0,0,0,0.2);
}
.header-login-btn svg {
    width: 18px;
    height: 18px;
}

.mobile-menu-btn {
    background: none;
    border: none;
    color: var(--text-primary);
    font-size: 1.5rem;
    cursor: pointer;
    z-index: 1001;
    padding: 0;
    width: 40px;
    height: 40px;
    position: relative;
    /* Added for perfect centering of the icon box */
    display: flex;
    align-items: center;
    justify-content: center;
}
.hamburger-box {
    position: relative;
    width: 30px;
    height: 24px;
}
.hamburger-inner {
    /* This is the middle line */
    top: 50%;
    transform: translateY(-50%);
    transition: transform 0.22s cubic-bezier(0.55, 0.055, 0.675, 0.19);
}
.hamburger-inner::before, 
.hamburger-inner::after {
    content: '';
    /* This transition is for the top/bottom lines */
    transition: transform 0.22s cubic-bezier(0.55, 0.055, 0.675, 0.19), top 0.1s ease-out, bottom 0.1s ease-out;
}

/* Shared properties for all 3 lines to ensure alignment */
.hamburger-inner,
.hamburger-inner::before,
.hamburger-inner::after {
    position: absolute;
    width: 100%; /* All lines take 100% width of the hamburger-box */
    height: 3px;
    background-color: var(--text-primary);
    border-radius: 4px;
    left: 0; /* Explicitly align all lines to the left */
}

.hamburger-inner::before { 
    top: -10px; 
}
.hamburger-inner::after { 
    bottom: -10px; 
}

/* Active (X) state */
.mobile-menu-btn.active .hamburger-inner {
    transform: rotate(225deg);
    transition-delay: 0.12s;
    transition-timing-function: cubic-bezier(0.215, 0.61, 0.355, 1);
}
.mobile-menu-btn.active .hamburger-inner::before {
    top: 0;
    transform: rotate(-90deg);
    transition: top 0.1s ease-out, transform 0.22s cubic-bezier(0.215, 0.61, 0.355, 1) 0.12s;
}
.mobile-menu-btn.active .hamburger-inner::after {
    bottom: 0;
    transform: rotate(-90deg);
    transition: bottom 0.1s ease-out, transform 0.22s cubic-bezier(0.215, 0.61, 0.355, 1) 0.12s;
}

/* --- Mobile Menu Panel --- */
.mobile-menu-panel {
    position: absolute;
    top: 100%;
    left: 0;
    width: 100%;
    background-color: var(--bg-header);
    border-top: 1px solid var(--border-color);
    display: flex;
    flex-direction: column;
    align-items: center;
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.4s ease-in-out, padding 0.4s ease-in-out;
    padding: 0 1.5rem;
}
.mobile-menu-panel.active {
    max-height: 500px; /* A large enough value */
    padding: 1.5rem;
}
.mobile-nav-link {
    font-size: 1.1rem;
    font-weight: 600;
    color: var(--text-primary);
    text-decoration: none;
    padding: 1rem 0;
    width: 100%;
    text-align: center;
    transition: color 0.3s ease, background-color 0.3s ease;
    border-radius: var(--radius-md);
}
.mobile-nav-link:hover {
    color: var(--primary-color);
    background-color: rgba(255,255,255,0.05);
}
.mobile-login-btn {
    font-size: 1.1rem;
    font-weight: 600;
    color: white;
    text-decoration: none;
    padding: 0.8rem 1.5rem;
    background-color: var(--primary-color);
    border-radius: var(--radius-lg);
    margin-top: 1rem;
    transition: all 0.3s ease;
    width: 100%;
    text-align: center;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
}
.mobile-login-btn:hover {
    background-color: var(--primary-dark);
    transform: scale(1.02);
}
.mobile-login-btn svg {
    width: 18px;
    height: 18px;
}


/* --- Hero Section --- */
.hero-section {
    padding: 12rem 0 8rem;
    text-align: center;
    position: relative;
    z-index: 1;
}
.hero-content {
    max-width: 800px;
    margin: 0 auto;
}
.hero-content h1 {
    font-size: 3rem;
    font-weight: 800;
    line-height: 1.2;
    margin: 0 0 1.5rem;
    background: linear-gradient(90deg, white, var(--text-secondary));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    animation: text-focus-in 1s cubic-bezier(0.550, 0.085, 0.680, 0.530) both;
}
@keyframes text-focus-in {
  0% { filter: blur(12px); opacity: 0; }
  100% { filter: blur(0px); opacity: 1; }
}

.hero-content p {
    font-size: 1.25rem;
    color: var(--text-secondary);
    line-height: 1.6;
    margin: 0 0 2.5rem;
    max-width: 650px;
    margin-left: auto;
    margin-right: auto;
}

/* --- Google Button --- */
.google-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    text-decoration: none;
    font-weight: 600;
    padding: 0.85rem 1.5rem;
    border-radius: var(--radius-lg);
    transition: all 0.3s ease;
    box-shadow: var(--shadow-lg);
    border: none;
    font-size: 1.1rem;
    cursor: pointer;
    background-color: var(--primary-color); /* Updated to new primary color */
    color: #ffffff;
}
.google-btn:hover {
    background-color: var(--primary-dark); /* Updated to new primary color */
    box-shadow: 0 10px 20px -5px hsla(var(--primary-hue), 80%, 65%, 0.4);
    transform: translateY(-3px);
}
.google-btn svg {
    width: 20px;
    height: 20px;
    margin-right: 12px;
}
.google-btn.large {
    font-size: 1.2rem;
    padding: 1rem 2rem;
    border-radius: var(--radius-xl);
}

/* --- Sections --- */
.section {
    padding: 6rem 0;
    text-align: center;
    position: relative;
    z-index: 1;
}
.section h2 {
    font-size: 2.5rem;
    font-weight: 700;
    margin: 0 0 1rem;
}
.section > .container > p {
    font-size: 1.1rem;
    color: var(--text-secondary);
    max-width: 600px;
    margin: 0 auto 3rem;
}

.steps-grid, .features-grid {
    display: grid;
    gap: 1.5rem;
    margin-top: 4rem;
}

.step-card, .feature-card {
    background: var(--bg-glass);
    padding: 2.5rem 2rem;
    border-radius: var(--radius-xl);
    border: 1px solid var(--border-color);
    transition: all 0.3s ease;
    backdrop-filter: blur(5px);
    -webkit-backdrop-filter: blur(5px);
}
.step-card:hover, .feature-card:hover {
    transform: translateY(-10px) scale(1.02);
    border-color: var(--primary-color);
    box-shadow: 0 20px 40px -10px rgba(0,0,0,0.3);
}
.step-icon, .feature-icon {
    font-size: 2rem;
    color: var(--primary-color);
    margin-bottom: 1.5rem;
    background: hsla(var(--primary-hue), 80%, 65%, 0.1);
    width: 64px;
    height: 64px;
    border-radius: 50%;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
}
.step-card:hover .step-icon, .feature-card:hover .feature-icon {
    transform: rotateY(360deg);
    background: var(--primary-color);
    color: white;
}
.step-card h3, .feature-card h3 {
    font-size: 1.25rem;
    margin: 0 0 0.75rem;
}
.step-card p, .feature-card p {
    color: var(--text-secondary);
    line-height: 1.6;
    margin: 0;
}

/* --- Footer --- */
.main-footer {
    padding: 3rem 0;
    text-align: center;
    border-top: 1px solid var(--border-color);
    margin-top: 4rem;
    position: relative;
    z-index: 1;
    background-color: var(--bg-header);
}
.main-footer p {
    margin: 0;
    color: var(--text-secondary);
}

/* --- Responsive --- */
@media (min-width: 576px) {
    .features-grid { grid-template-columns: repeat(2, 1fr); }
}

@media (min-width: 768px) {
    .main-nav { display: flex; }
    .header-login-btn { display: inline-flex; }
    .mobile-menu-btn { display: none; }
    .hero-content h1 { font-size: 4rem; }
    .steps-grid { grid-template-columns: repeat(3, 1fr); }
}

@media (min-width: 992px) {
     .hero-content h1 { font-size: 4.5rem; }
    .features-grid { grid-template-columns: repeat(4, 1fr); }
}

@media (max-width: 767px) {
    .hero-section {
        padding-top: 8rem;
        padding-bottom: 4rem;
    }
    .hero-content h1 { font-size: 2.5rem; }
    .hero-content p { font-size: 1.1rem; }
    
    .section {
        padding: 4rem 0;
    }
    .section h2 { font-size: 2rem; }
}
