/* ==========================================================================
   TAPINHA - STYLESHEET (VANILLA CSS)
   Palette taken from the app logo: cream background, olive-green laptop,
   near-black ink outlines, warm terracotta as the "pop" CTA color.
   ========================================================================== */

:root {
    --cream: #FBF3E4;
    --cream-alt: #F1E6CE;
    --card-bg: #FFFFFF;
    --card-border: rgba(34, 31, 26, 0.08);

    --olive: #6B7A45;
    --olive-dark: #4B5730;
    --olive-tint: rgba(107, 122, 69, 0.12);

    --terra: #E2703A;
    --terra-dark: #C25A28;
    --terra-tint: rgba(226, 112, 58, 0.14);

    --ink: #221F1A;
    --ink-soft: #5B564C;
    --ink-faint: #8B8577;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
    font-family: 'Inter', sans-serif;
    background-color: var(--cream);
    color: var(--ink);
}

body {
    overflow-x: hidden;
    background:
        radial-gradient(circle at 8% 15%, var(--olive-tint) 0%, transparent 35%),
        radial-gradient(circle at 92% 75%, var(--terra-tint) 0%, transparent 40%),
        var(--cream);
}

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

h1, h2, h3, h4 {
    font-family: 'Outfit', sans-serif;
    font-weight: 700;
}

a {
    color: inherit;
    text-decoration: none;
}

/* --- Panels --- */
.glass-panel {
    background: var(--card-bg);
    border: 1px solid var(--card-border);
    border-radius: 18px;
    box-shadow: 0 10px 30px 0 rgba(34, 31, 26, 0.06);
}

/* --- Typography Helpers --- */
.text-gradient {
    background: linear-gradient(135deg, var(--terra) 0%, var(--olive-dark) 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

.highlight {
    color: var(--olive-dark);
}

/* --- Buttons --- */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-family: 'Outfit', sans-serif;
    font-weight: 700;
    font-size: 14px;
    padding: 12px 24px;
    border-radius: 10px;
    cursor: pointer;
    transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1);
    outline: none;
    border: none;
}

.btn-primary {
    background: var(--terra);
    color: #fff;
    box-shadow: 0 4px 14px 0 rgba(226, 112, 58, 0.35);
}

.btn-primary:hover {
    transform: translateY(-2px);
    background: var(--terra-dark);
    box-shadow: 0 6px 20px 0 rgba(226, 112, 58, 0.45);
}

.btn-secondary {
    background: var(--cream-alt);
    color: var(--ink);
    border: 1px solid var(--card-border);
}

.btn-secondary:hover {
    background: #e9dcc0;
}

.btn-lg {
    padding: 16px 32px;
    font-size: 16px;
}

.btn-block {
    display: flex;
    width: 100%;
}

/* --- Navigation Bar --- */
.navbar {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    z-index: 100;
    background: rgba(251, 243, 228, 0.85);
    backdrop-filter: blur(12px);
    border-bottom: 1px solid var(--card-border);
}

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

.logo {
    display: flex;
    align-items: center;
    gap: 10px;
    font-family: 'Outfit', sans-serif;
    font-weight: 800;
    font-size: 20px;
}

.logo-icon {
    width: 32px;
    height: 32px;
    border-radius: 8px;
    object-fit: cover;
}

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

.nav-links a {
    font-size: 14px;
    font-weight: 500;
    color: var(--ink-soft);
    transition: color 0.2s;
}

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

.save-link {
    color: var(--terra-dark) !important;
    font-weight: 700 !important;
}

/* --- Hero Section --- */
.hero {
    padding-top: 140px;
    padding-bottom: 80px;
}

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

.badge-new {
    display: inline-block;
    padding: 6px 14px;
    background: var(--olive-tint);
    color: var(--olive-dark);
    border: 1px solid rgba(107, 122, 69, 0.25);
    border-radius: 50px;
    font-size: 12px;
    font-weight: 600;
    margin-bottom: 24px;
}

.hero-title {
    font-size: 48px;
    line-height: 1.15;
    margin-bottom: 20px;
    color: var(--ink);
}

.hero-subtitle {
    font-size: 17px;
    line-height: 1.6;
    color: var(--ink-soft);
    margin-bottom: 36px;
}

.hero-ctas {
    display: flex;
    flex-wrap: wrap;
    gap: 16px;
    margin-bottom: 40px;
}

.hero-meta {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 12px;
    font-size: 12px;
    color: var(--ink-faint);
}

.hero-meta .separator {
    color: rgba(34, 31, 26, 0.15);
}

/* --- Interactive MacBook Graphic (Hero) --- */
.hero-visual {
    display: flex;
    justify-content: center;
}

.visual-card {
    padding: 40px;
    width: 100%;
    max-width: 440px;
    display: flex;
    flex-direction: column;
    align-items: center;
}

.macbook-wrapper {
    width: 280px;
    perspective: 800px;
    cursor: pointer;
    transition: transform 0.1s;
    user-select: none;
}

.macbook-screen {
    width: 240px;
    height: 150px;
    background: var(--olive-dark);
    border: 10px solid var(--ink);
    border-radius: 8px 8px 0 0;
    margin: 0 auto;
    position: relative;
    box-shadow: 0 4px 20px rgba(34, 31, 26, 0.25);
    display: flex;
    align-items: center;
    justify-content: center;
}

.macbook-content {
    width: 100%;
    height: 100%;
    background: #3a4527;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 16px;
    position: relative;
    overflow: hidden;
}

.waveform-container {
    display: flex;
    align-items: flex-end;
    gap: 3px;
    height: 40px;
}

.waveform-bar {
    width: 4px;
    background: var(--terra);
    border-radius: 2px;
    transition: height 0.15s ease;
}

.simulator-status {
    font-size: 9px;
    font-weight: 700;
    color: #d8dcc4;
    letter-spacing: 1px;
    display: flex;
    align-items: center;
    gap: 6px;
}

.pulse-dot {
    width: 6px;
    height: 6px;
    background-color: #8fd19e;
    border-radius: 50%;
    animation: pulse 1.5s infinite;
}

.macbook-base {
    width: 280px;
    height: 8px;
    background: #cabf9f;
    border-radius: 0 0 12px 12px;
    position: relative;
    box-shadow: 0 8px 24px rgba(34, 31, 26, 0.2);
}

.macbook-base::after {
    content: '';
    position: absolute;
    bottom: -4px;
    left: 50%;
    transform: translateX(-50%);
    width: 60px;
    height: 4px;
    background: var(--ink);
    border-radius: 0 0 4px 4px;
}

.trackpad {
    width: 50px;
    height: 4px;
    background: #b3a684;
    margin: 1px auto 0;
    border-radius: 0 0 1px 1px;
}

.visual-hint {
    margin-top: 24px;
    font-size: 11px;
    color: var(--ink-faint);
}

/* Animations for slap shock */
.slapped {
    animation: shake 0.2s cubic-bezier(.36,.07,.19,.97) both;
}

@keyframes shake {
    10%, 90% { transform: translate3d(-2px, 1px, 0) rotate(-1deg); }
    20%, 80% { transform: translate3d(3px, -1px, 0) rotate(1.5deg); }
    30%, 50%, 70% { transform: translate3d(-4px, 2px, 0) rotate(-2deg); }
    40%, 60% { transform: translate3d(4px, -1px, 0) rotate(2deg); }
}

@keyframes pulse {
    0% { transform: scale(0.9); opacity: 0.6; }
    50% { transform: scale(1.2); opacity: 1; }
    100% { transform: scale(0.9); opacity: 0.6; }
}

/* --- "What is it" strip --- */
.what-section {
    padding: 20px 0 80px;
}

.what-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
    gap: 28px;
}

.what-item {
    text-align: center;
    padding: 16px;
}

.what-emoji {
    font-size: 34px;
    display: inline-block;
    margin-bottom: 14px;
}

.what-item h3 {
    font-size: 17px;
    margin-bottom: 10px;
}

.what-item p {
    font-size: 13.5px;
    line-height: 1.6;
    color: var(--ink-soft);
}

/* --- Features Section --- */
.features-section {
    padding: 100px 0;
    background: var(--cream-alt);
}

.section-header {
    text-align: center;
    max-width: 620px;
    margin: 0 auto 60px;
}

.section-title {
    font-size: 36px;
    margin-bottom: 16px;
    color: var(--ink);
}

.section-subtitle {
    font-size: 15px;
    color: var(--ink-soft);
}

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

.feature-card {
    padding: 32px;
    transition: transform 0.3s, box-shadow 0.3s;
}

.feature-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 16px 34px 0 rgba(34, 31, 26, 0.1);
}

.feature-icon {
    width: 48px;
    height: 48px;
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 22px;
    margin-bottom: 24px;
}

.bg-olive { background: var(--olive-tint); color: var(--olive-dark); }
.bg-terra { background: var(--terra-tint); color: var(--terra-dark); }

.feature-card h3 {
    font-size: 18px;
    margin-bottom: 12px;
    color: var(--ink);
}

.feature-card p {
    font-size: 13px;
    line-height: 1.6;
    color: var(--ink-soft);
}

/* --- Interactive Simulator Panel --- */
.simulator-section {
    padding: 100px 0;
}

.simulator-panel {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 40px;
    padding: 50px;
    align-items: center;
}

.simulator-controls h2 {
    font-size: 28px;
    margin-bottom: 12px;
    color: var(--ink);
}

.simulator-controls p {
    font-size: 14px;
    color: var(--ink-soft);
    margin-bottom: 30px;
}

.theme-selector-web {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin-bottom: 24px;
}

.web-theme-btn {
    padding: 10px 16px;
    border-radius: 8px;
    border: 1px solid var(--card-border);
    background: var(--cream-alt);
    color: var(--ink-soft);
    font-family: 'Outfit', sans-serif;
    font-size: 13px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s;
}

.web-theme-btn:hover {
    border-color: var(--olive);
    color: var(--ink);
}

.web-theme-btn.active {
    background: var(--olive);
    color: #fff;
    border-color: var(--olive);
}

.web-sound-list h4 {
    font-size: 13px;
    color: var(--ink-soft);
    margin-bottom: 12px;
}

.web-sound-list ul {
    list-style: none;
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.web-sound-list li {
    padding: 8px 12px;
    background: var(--cream-alt);
    border: 1px solid var(--card-border);
    border-radius: 6px;
    font-size: 12px;
    cursor: pointer;
    transition: all 0.2s;
}

.web-sound-list li:hover {
    background: #e9dcc0;
}

.web-sound-list li.playing {
    background: var(--terra-tint);
    border-color: var(--terra);
    color: var(--terra-dark);
}

/* MacBook in Simulator */
.simulator-mac-container {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    position: relative;
}

.interactive-macbook {
    width: 360px;
    cursor: pointer;
    transition: transform 0.1s;
}

.screen-bezel {
    width: 320px;
    height: 200px;
    background: var(--olive-dark);
    border: 12px solid var(--ink);
    border-radius: 12px 12px 0 0;
    margin: 0 auto;
    box-shadow: 0 10px 30px rgba(34, 31, 26, 0.25);
    position: relative;
}

.screen-display {
    width: 100%;
    height: 100%;
    background: #3a4527;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    padding: 8px;
    overflow: hidden;
}

.dashboard-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    border-bottom: 1px solid rgba(255,255,255,0.08);
    padding-bottom: 6px;
}

.dashboard-header .dots {
    display: flex;
    gap: 4px;
}

.dashboard-header .dots span {
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background: rgba(255,255,255,0.25);
}

.dashboard-header .app-title {
    font-size: 8px;
    color: #d8dcc4;
    font-weight: 700;
}

#waveform-canvas {
    width: 100%;
    height: 90px;
    background: rgba(0,0,0,0.15);
    border-radius: 4px;
}

.screen-footer {
    display: flex;
    justify-content: center;
    padding-top: 4px;
}

#screen-impact-text {
    font-size: 9px;
    font-weight: 700;
    color: #ff8a65;
    opacity: 0;
    transition: opacity 0.1s ease;
}

#screen-impact-text.flash {
    opacity: 1;
}

.keyboard-chassis {
    width: 360px;
    height: 12px;
    background: #cabf9f;
    border-radius: 0 0 16px 16px;
    position: relative;
    box-shadow: 0 12px 28px rgba(34, 31, 26, 0.2);
}

.keyboard-chassis::after {
    content: '';
    position: absolute;
    bottom: -6px;
    left: 50%;
    transform: translateX(-50%);
    width: 80px;
    height: 6px;
    background: var(--ink);
    border-radius: 0 0 6px 6px;
}

.click-instruction {
    margin-top: 24px;
    font-size: 10px;
    letter-spacing: 2px;
    font-weight: 700;
    color: var(--terra);
    opacity: 0.8;
    animation: flash-slow 2s infinite;
}

@keyframes flash-slow {
    0%, 100% { opacity: 0.4; }
    50% { opacity: 1; }
}

/* --- Pricing Section --- */
.pricing-preview-section {
    padding: 100px 0;
    background: radial-gradient(circle at center, var(--terra-tint) 0%, transparent 60%),
                var(--cream-alt);
}

.pricing-card {
    max-width: 500px;
    margin: 0 auto;
    padding: 48px;
    text-align: center;
    border-color: rgba(226, 112, 58, 0.25);
    box-shadow: 0 12px 40px rgba(226, 112, 58, 0.08);
}

.pricing-tag {
    display: inline-block;
    padding: 4px 12px;
    background: var(--terra);
    color: #fff;
    border-radius: 50px;
    font-size: 10px;
    font-weight: 800;
    letter-spacing: 1px;
    margin-bottom: 20px;
}

.pricing-card h2 {
    font-size: 32px;
    margin-bottom: 16px;
    color: var(--ink);
}

.price-box {
    display: flex;
    justify-content: center;
    align-items: baseline;
}

.price-box:first-of-type {
    margin-top: 8px;
}

.price-box:last-of-type {
    margin: 4px 0 24px;
}

.price-old {
    font-size: 16px;
    color: var(--ink-faint);
    text-decoration: line-through;
}

.price-box .currency {
    font-size: 20px;
    font-weight: 700;
    margin-right: 4px;
    color: var(--ink);
}

.price-box .price-val {
    font-size: 72px;
    font-family: 'Outfit', sans-serif;
    font-weight: 800;
    line-height: 1;
    color: var(--ink);
}

.price-box .decimals {
    font-size: 24px;
    font-weight: 700;
    color: var(--ink);
}

.price-box .period {
    font-size: 14px;
    color: var(--ink-soft);
    margin-left: 8px;
}

.pricing-features {
    list-style: none;
    text-align: left;
    max-width: 340px;
    margin: 32px auto;
    font-size: 14px;
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.pricing-features li {
    color: var(--ink-soft);
}

.secure-badge {
    margin-top: 16px;
    font-size: 11px;
    color: var(--ink-faint);
}

/* --- FAQ Section --- */
.faq-section {
    padding: 100px 0;
}

.faq-container {
    max-width: 800px;
}

.faq-list {
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.faq-item {
    padding: 24px;
    cursor: pointer;
    transition: box-shadow 0.2s;
}

.faq-item:hover {
    box-shadow: 0 12px 26px 0 rgba(34, 31, 26, 0.08);
}

.faq-question {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.faq-question h3 {
    font-size: 16px;
    font-weight: 600;
    color: var(--ink);
}

.faq-toggle {
    font-size: 20px;
    color: var(--ink-faint);
    transition: transform 0.2s;
}

.faq-answer {
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.3s cubic-bezier(0, 1, 0, 1), padding-top 0.2s;
    font-size: 13.5px;
    line-height: 1.6;
    color: var(--ink-soft);
}

.faq-item.active .faq-toggle {
    transform: rotate(45deg);
    color: var(--terra);
}

.faq-item.active .faq-answer {
    max-height: 260px;
    padding-top: 16px;
}

/* --- Footer --- */
.footer {
    border-top: 1px solid var(--card-border);
    padding: 40px 0;
    background: var(--cream-alt);
}

.footer-container {
    display: flex;
    flex-wrap: wrap;
    gap: 16px;
    justify-content: space-between;
    align-items: center;
}

.footer-links {
    display: flex;
    gap: 20px;
    font-size: 13px;
    color: var(--ink-soft);
}

.footer-links a:hover {
    color: var(--ink);
}

.copyright {
    font-size: 12px;
    color: var(--ink-faint);
}

/* --- Global click "slap" effect --- */
body.page-slapped {
    animation: page-shake 0.25s cubic-bezier(.36,.07,.19,.97) both;
}

@keyframes page-shake {
    10%, 90% { transform: translate3d(-1px, 0, 0); }
    20%, 80% { transform: translate3d(2px, 0, 0); }
    30%, 50%, 70% { transform: translate3d(-3px, 1px, 0); }
    40%, 60% { transform: translate3d(3px, -1px, 0); }
}

.click-slap {
    position: fixed;
    z-index: 9999;
    pointer-events: none;
    font-size: 42px;
    transform: translate(-50%, -50%) rotate(var(--rot, 0deg)) scale(0.4);
    animation: slap-pop 0.45s cubic-bezier(0.2, 0.9, 0.3, 1.2) forwards;
    user-select: none;
}

@keyframes slap-pop {
    0% { transform: translate(-50%, -50%) rotate(var(--rot, 0deg)) scale(0.3); opacity: 0; }
    25% { transform: translate(-50%, -50%) rotate(var(--rot, 0deg)) scale(1.15); opacity: 1; }
    100% { transform: translate(-50%, -60%) rotate(var(--rot, 0deg)) scale(0.9); opacity: 0; }
}

.click-ring {
    position: fixed;
    z-index: 9998;
    pointer-events: none;
    width: 20px;
    height: 20px;
    border-radius: 50%;
    border: 3px solid var(--terra);
    transform: translate(-50%, -50%) scale(0.3);
    opacity: 0.8;
    animation: ring-expand 0.45s ease-out forwards;
}

@keyframes ring-expand {
    0% { transform: translate(-50%, -50%) scale(0.2); opacity: 0.7; }
    100% { transform: translate(-50%, -50%) scale(3); opacity: 0; }
}

/* --- Responsive Media Queries --- */
@media (max-width: 900px) {
    .hero-container {
        grid-template-columns: 1fr;
        gap: 40px;
        text-align: center;
    }

    .hero-visual {
        order: -1;
    }

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

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

    .simulator-panel {
        grid-template-columns: 1fr;
        padding: 30px;
    }

    .nav-links {
        display: none;
    }

    .footer-container {
        flex-direction: column;
        text-align: center;
    }
}
