/* Coffee Pay Design System */

:root {
    /* Colors */
    --espresso: #2D1E17;
    --espresso-light: #4A3329;
    --cream: #F5F2EA;
    --gold: #C5A059;
    --gold-dark: #A68546;
    --latte: #D7C4A3;
    --white: #FFFFFF;
    --glass-bg: rgba(255, 255, 255, 0.7);
    --glass-border: rgba(255, 255, 255, 0.3);
    
    /* Fonts */
    --font-heading: 'Playfair Display', serif;
    --font-body: 'Inter', sans-serif;
    
    /* Spacing */
    --container-width: 1200px;
    --section-padding: 100px 20px;
    
    /* Transitions */
    --transition: all 0.4s cubic-bezier(0.165, 0.84, 0.44, 1);
}

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

html {
    scroll-behavior: smooth;
}

body {
    font-family: var(--font-body);
    background-color: var(--cream);
    color: var(--espresso);
    line-height: 1.6;
    overflow-x: hidden;
}

h1, h2, h3, h4 {
    font-family: var(--font-heading);
    font-weight: 700;
}

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

ul {
    list-style: none;
}

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

.container {
    max-width: var(--container-width);
    margin: 0 auto;
    padding: 0 20px;
}

/* Buttons */
.btn {
    display: inline-block;
    padding: 12px 28px;
    border-radius: 50px;
    font-weight: 600;
    cursor: pointer;
    text-align: center;
    border: none;
    font-size: 0.95rem;
}

.btn-large {
    padding: 16px 36px;
    font-size: 1.1rem;
}

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

.btn-primary:hover {
    background-color: var(--espresso-light);
    transform: translateY(-3px);
    box-shadow: 0 10px 20px rgba(45, 30, 23, 0.2);
}

.btn-gold {
    background-color: var(--gold);
    color: var(--white);
}

.btn-gold:hover {
    background-color: var(--gold-dark);
    transform: translateY(-3px);
}

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

.btn-outline:hover {
    background-color: var(--espresso);
    color: var(--white);
}

/* Navigation */
#main-nav {
    position: fixed;
    top: 0;
    width: 100%;
    z-index: 1000;
    padding: 20px 0;
    transition: var(--transition);
}

#main-nav.scrolled {
    background: var(--glass-bg);
    backdrop-filter: blur(10px);
    padding: 15px 0;
    box-shadow: 0 5px 20px rgba(0,0,0,0.05);
}

#main-nav .container {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.logo {
    display: flex;
    align-items: center;
    gap: 10px;
    font-family: var(--font-heading);
    font-size: 1.5rem;
    font-weight: 700;
}

#nav-logo {
    height: 40px;
}

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

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

.menu-toggle {
    display: none;
    cursor: pointer;
    z-index: 1001; /* Ensure it's above the nav links */
}

.bar {
    display: block;
    width: 28px;
    height: 2px;
    margin: 6px auto;
    transition: var(--transition);
    background-color: var(--espresso);
}

/* Hero Section */
#hero {
    height: 100vh;
    display: flex;
    align-items: center;
    padding-top: 80px;
    background: radial-gradient(circle at 10% 20%, rgba(215, 196, 163, 0.2) 0%, transparent 40%);
}

#hero .container {
    display: grid;
    grid-template-columns: 1fr 1fr;
    align-items: center;
    gap: 60px;
}

.hero-content h1 {
    font-size: 4rem;
    line-height: 1.1;
    margin-bottom: 24px;
}

.text-gold {
    color: var(--gold);
}

.hero-content p {
    font-size: 1.25rem;
    color: var(--espresso-light);
    margin-bottom: 40px;
    max-width: 500px;
}

.hero-btns {
    display: flex;
    gap: 20px;
}

.hero-image {
    position: relative;
}

.image-wrapper {
    position: relative;
    border-radius: 30px;
    overflow: visible;
}

.image-wrapper img {
    border-radius: 30px;
    box-shadow: 0 30px 60px rgba(0,0,0,0.15);
}

.glass-card {
    position: absolute;
    bottom: -30px;
    right: -30px;
    background: var(--glass-bg);
    backdrop-filter: blur(15px);
    border: 1px solid var(--glass-border);
    padding: 20px 30px;
    border-radius: 20px;
    display: flex;
    align-items: center;
    gap: 20px;
    box-shadow: 0 20px 40px rgba(0,0,0,0.1);
}

.card-icon {
    font-size: 2rem;
    background: var(--gold);
    width: 50px;
    height: 50px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 12px;
    color: white;
}

.card-info .label {
    display: block;
    font-size: 0.8rem;
    color: var(--espresso-light);
}

.card-info .value {
    font-size: 1.5rem;
    font-weight: 700;
}

/* Features Section */
#features {
    padding: var(--section-padding);
}

.section-header {
    margin-bottom: 60px;
}

.section-header h2 {
    font-size: 3rem;
    margin-bottom: 10px;
}

.features-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 30px;
}

.feature-card {
    background: var(--white);
    padding: 50px 40px;
    border-radius: 30px;
    transition: var(--transition);
    border: 1px solid rgba(0,0,0,0.05);
}

.feature-card:hover {
    transform: translateY(-10px);
    box-shadow: 0 20px 50px rgba(0,0,0,0.05);
}

.feature-card .icon {
    font-size: 2.5rem;
    margin-bottom: 20px;
    display: inline-block;
}

.feature-card h3 {
    margin-bottom: 15px;
    font-size: 1.5rem;
}

/* About Section */
#about {
    padding: var(--section-padding);
    background-color: var(--espresso);
    color: var(--cream);
}

.grid-2 {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 80px;
    align-items: center;
}

.tag {
    color: var(--gold);
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 2px;
    display: block;
    margin-bottom: 15px;
}

.about-text h2 {
    font-size: 3.5rem;
    margin-bottom: 25px;
}

.about-text p {
    margin-bottom: 20px;
    font-size: 1.1rem;
    opacity: 0.9;
}

.about-stats {
    display: flex;
    flex-direction: column;
    gap: 40px;
}

.stat-item .number {
    display: block;
    font-family: var(--font-heading);
    font-size: 4rem;
    color: var(--gold);
    line-height: 1;
}

.stat-item .label {
    font-size: 1.1rem;
    text-transform: uppercase;
    letter-spacing: 1px;
}

/* CTA Section */
#cta {
    padding: var(--section-padding);
}

.cta-box {
    background: linear-gradient(135deg, var(--espresso) 0%, var(--espresso-light) 100%);
    padding: 80px 40px;
    border-radius: 40px;
    color: var(--white);
}

.cta-box h2 {
    font-size: 3.5rem;
    margin-bottom: 20px;
}

.cta-box p {
    font-size: 1.25rem;
    margin-bottom: 40px;
    opacity: 0.9;
}

/* Footer */
footer {
    padding: 80px 0 40px;
    border-top: 1px solid rgba(0,0,0,0.05);
}

.footer-top {
    display: flex;
    justify-content: space-between;
    margin-bottom: 60px;
}

.footer-brand img {
    height: 50px;
    margin-bottom: 20px;
}

.footer-brand p {
    max-width: 300px;
    opacity: 0.7;
}

.footer-links {
    display: flex;
    gap: 80px;
}

.link-group h4 {
    margin-bottom: 20px;
    font-size: 1.1rem;
}

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

.link-group ul li a {
    opacity: 0.7;
}

.link-group ul li a:hover {
    opacity: 1;
    color: var(--gold);
}

.footer-bottom {
    padding-top: 40px;
    border-top: 1px solid rgba(0,0,0,0.05);
    display: flex;
    justify-content: space-between;
    align-items: center;
    opacity: 0.6;
    font-size: 0.9rem;
}

.social-links {
    display: flex;
    gap: 20px;
}

/* Animations */
.fade-in {
    opacity: 0;
    transform: translateY(30px);
    animation: fadeInUp 1s forwards;
}

.delay-1 { animation-delay: 0.2s; }
.delay-2 { animation-delay: 0.4s; }
.delay-3 { animation-delay: 0.6s; }

@keyframes fadeInUp {
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.floating {
    animation: float 4s ease-in-out infinite;
}

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

/* Reveal Animation */
.reveal {
    opacity: 0;
    transform: translateY(50px);
    transition: 1s all ease;
}

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

/* Responsive */
@media (max-width: 1200px) {
    .hero-content h1 {
        font-size: 3.5rem;
    }
}

@media (max-width: 992px) {
    :root {
        --section-padding: 80px 20px;
    }
    
    #hero {
        height: auto;
        padding-top: 140px; /* Increased padding */
        padding-bottom: 60px;
    }

    #hero .container {
        grid-template-columns: 1fr;
        text-align: center;
        gap: 40px;
    }
    
    .hero-content p {
        margin: 0 auto 40px;
    }
    
    .hero-btns {
        justify-content: center;
    }
    
    .hero-content h1 {
        font-size: 2.5rem; /* Smaller for mobile */
    }

    .hero-image {
        max-width: 100%;
        margin: 0 auto;
    }

    .glass-card {
        display: none; /* Hide floating elements on tablets and mobile */
    }

    .grid-2 {
        grid-template-columns: 1fr;
        gap: 40px;
        text-align: center;
    }
    
    .features-grid {
        grid-template-columns: 1fr;
    }
    
    .about-stats {
        flex-direction: row;
        justify-content: center;
        flex-wrap: wrap;
    }
    
    .footer-top {
        flex-direction: column;
        gap: 40px;
        text-align: center;
    }
    
    .footer-brand p {
        margin: 0 auto;
    }
    
    .footer-links {
        justify-content: center;
        gap: 40px;
    }
    
    .nav-links {
        position: fixed;
        left: -100%;
        top: 80px;
        flex-direction: column;
        background-color: var(--white);
        width: 100%;
        text-align: center;
        transition: 0.3s;
        box-shadow: 0 10px 20px rgba(0,0,0,0.1);
        padding: 40px 0;
        gap: 20px;
    }

    .nav-links.active {
        left: 0;
    }

    .menu-toggle {
        display: block;
    }

    .menu-toggle.active .bar:nth-child(2) {
        opacity: 0;
    }

    .menu-toggle.active .bar:nth-child(1) {
        transform: translateY(8px) rotate(45deg);
    }

    .menu-toggle.active .bar:nth-child(3) {
        transform: translateY(-8px) rotate(-45deg);
    }
}

@media (max-width: 600px) {
    .hero-content h1 {
        font-size: 2.5rem;
    }

    .cta-box h2 {
        font-size: 2.2rem;
    }
    
    .hero-btns {
        flex-direction: column;
        width: 100%;
        max-width: 300px;
        margin: 0 auto 40px;
    }

    .glass-card {
        display: none; /* Hide complex floating elements on very small screens for better UX */
    }

    .about-text h2 {
        font-size: 2.5rem;
    }

    .stat-item .number {
        font-size: 3rem;
    }
}

/* ============================================
   Calculator Section
   ============================================ */
#calculator {
    padding: var(--section-padding);
    background: linear-gradient(180deg, var(--cream) 0%, #EDE8DE 100%);
}

#calculator .section-header p {
    font-size: 1.1rem;
    color: var(--espresso-light);
    max-width: 520px;
    margin: 0 auto;
}

#calculator .tag {
    color: var(--gold);
}

.calc-wrapper {
    display: grid;
    grid-template-columns: 1fr 1.2fr;
    gap: 40px;
    margin-top: 60px;
    align-items: start;
}

/* --- Inputs Panel --- */
.calc-inputs {
    display: flex;
    flex-direction: column;
    gap: 28px;
}

.calc-field label {
    display: block;
    font-weight: 600;
    font-size: 0.85rem;
    text-transform: uppercase;
    letter-spacing: 1px;
    color: var(--espresso-light);
    margin-bottom: 10px;
}

.input-currency {
    display: flex;
    align-items: center;
    background: var(--white);
    border: 2px solid rgba(45, 30, 23, 0.12);
    border-radius: 16px;
    overflow: hidden;
    transition: var(--transition);
}

.input-currency:focus-within {
    border-color: var(--gold);
    box-shadow: 0 0 0 4px rgba(197, 160, 89, 0.12);
}

.currency-symbol {
    padding: 0 16px;
    font-size: 1.4rem;
    font-weight: 700;
    color: var(--gold);
    background: rgba(197, 160, 89, 0.08);
    height: 60px;
    display: flex;
    align-items: center;
    border-right: 2px solid rgba(45, 30, 23, 0.08);
}

#calc-amount {
    flex: 1;
    border: none;
    outline: none;
    font-size: 1.5rem;
    font-weight: 700;
    font-family: var(--font-body);
    color: var(--espresso);
    padding: 0 20px;
    background: transparent;
    height: 60px;
    width: 100%;
}

#calc-amount::placeholder {
    color: rgba(45, 30, 23, 0.2);
}

/* Payment Method Buttons */
.payment-methods {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.pm-btn {
    display: flex;
    align-items: center;
    gap: 14px;
    padding: 14px 20px;
    background: var(--white);
    border: 2px solid rgba(45, 30, 23, 0.1);
    border-radius: 14px;
    cursor: pointer;
    transition: var(--transition);
    font-family: var(--font-body);
    text-align: left;
    width: 100%;
}

.pm-btn:hover {
    border-color: var(--gold);
    transform: translateX(4px);
}

.pm-btn.active {
    border-color: var(--gold);
    background: linear-gradient(135deg, rgba(197,160,89,0.08) 0%, rgba(197,160,89,0.02) 100%);
    box-shadow: 0 4px 16px rgba(197, 160, 89, 0.15);
}

.pm-icon {
    font-size: 1.5rem;
    width: 38px;
    height: 38px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--cream);
    border-radius: 10px;
    flex-shrink: 0;
}

.pm-name {
    font-weight: 700;
    font-size: 1rem;
    color: var(--espresso);
    flex: 1;
}

.pm-tag {
    font-size: 0.72rem;
    font-weight: 600;
    color: var(--gold-dark);
    background: rgba(197, 160, 89, 0.12);
    padding: 3px 9px;
    border-radius: 20px;
    white-space: nowrap;
}

.pm-btn.active .pm-tag {
    background: var(--gold);
    color: var(--white);
}

/* Info Box */
.calc-info-box {
    background: var(--espresso);
    border-radius: 16px;
    padding: 20px 24px;
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.info-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 0.88rem;
    color: rgba(245, 242, 234, 0.65);
    padding: 6px 0;
    border-bottom: 1px solid rgba(255,255,255,0.06);
}

.info-row:last-child {
    border-bottom: none;
}

.info-val {
    font-weight: 700;
    color: var(--gold);
    font-size: 0.95rem;
}

/* --- Results Panel --- */
.calc-results {
    background: var(--white);
    border-radius: 24px;
    overflow: hidden;
    box-shadow: 0 20px 60px rgba(45, 30, 23, 0.1);
    border: 1px solid rgba(45, 30, 23, 0.06);
}

.result-header {
    background: linear-gradient(135deg, var(--espresso) 0%, var(--espresso-light) 100%);
    padding: 30px 32px;
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.result-label {
    font-size: 0.8rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 2px;
    color: rgba(245, 242, 234, 0.6);
}

.result-amount {
    font-family: var(--font-heading);
    font-size: 2.8rem;
    font-weight: 700;
    color: var(--gold);
    line-height: 1.1;
    transition: all 0.4s ease;
}

.result-breakdown {
    padding: 24px 32px;
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.breakdown-title {
    font-size: 0.75rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 1.5px;
    color: var(--espresso-light);
    opacity: 0.5;
    margin-bottom: 8px;
}

.breakdown-section-title {
    font-size: 0.72rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 1px;
    color: #b45309;
    opacity: 0.7;
    margin-top: 10px;
    margin-bottom: 2px;
}

.breakdown-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 8px 0;
    border-bottom: 1px solid rgba(45, 30, 23, 0.05);
}

.breakdown-row:last-child {
    border-bottom: none;
}

.breakdown-row.deduction {
    opacity: 0.85;
}

.bd-label {
    font-size: 0.9rem;
    color: var(--espresso);
}

.bd-val {
    font-size: 0.95rem;
    font-weight: 600;
    color: var(--espresso);
    font-variant-numeric: tabular-nums;
}

.bd-val.negative {
    color: #c0392b;
}

.breakdown-row.subtotal-row {
    background: rgba(45, 30, 23, 0.04);
    border-radius: 8px;
    padding: 10px 12px;
    margin: 6px -12px;
    border-bottom: none;
}

.breakdown-row.subtotal-row .bd-label {
    font-weight: 700;
}

.breakdown-row.final-row {
    background: linear-gradient(135deg, rgba(197,160,89,0.1) 0%, rgba(197,160,89,0.04) 100%);
    border-radius: 10px;
    padding: 14px 12px;
    margin: 8px -12px 0;
    border: 1px solid rgba(197, 160, 89, 0.2);
    border-bottom: 1px solid rgba(197, 160, 89, 0.2);
}

.breakdown-row.final-row .bd-label {
    font-weight: 700;
    font-size: 1rem;
}

.bd-val.final-highlight {
    color: var(--gold-dark);
    font-size: 1.15rem;
    font-weight: 700;
    font-family: var(--font-heading);
}

.result-disclaimer {
    padding: 16px 32px;
    font-size: 0.75rem;
    color: var(--espresso);
    opacity: 0.4;
    border-top: 1px solid rgba(45, 30, 23, 0.06);
    line-height: 1.5;
}

/* Update animation for result */
@keyframes resultPulse {
    0% { transform: scale(1); }
    50% { transform: scale(1.03); color: var(--gold); }
    100% { transform: scale(1); }
}

.result-amount.updated {
    animation: resultPulse 0.4s ease;
}

/* Responsive Calculator */
@media (max-width: 900px) {
    .calc-wrapper {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 600px) {
    .result-amount {
        font-size: 2rem;
    }

    .result-header,
    .result-breakdown {
        padding: 20px;
    }

    .result-disclaimer {
        padding: 14px 20px;
    }
}

