/* PAGE SPECIFIC STYLES */

/* HERO */
.hero {
    padding: 80px 0 40px;
    text-align: center;
    max-width: 800px;
    margin: 0 auto;
}

.hero-title {
    font-size: 64px;
    letter-spacing: -0.03em;
    line-height: 1.1;
    margin-bottom: 24px;
}

.hero-title em {
    font-style: italic;
    color: var(--text-secondary);
}

.hero-subtitle {
    font-size: 20px;
    color: var(--text-secondary);
    max-width: 500px;
    margin: 0 auto 48px;
    font-weight: 400;
}

.hero-cta-stack {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 14px;
}

.hero-login-hint {
    font-size: 15px;
    color: var(--text-secondary);
}

.hero-login-link {
    color: var(--text-primary);
    font-weight: 500;
    text-decoration: underline;
    text-underline-offset: 3px;
    transition: color 0.2s ease;
}

.hero-login-link:hover {
    color: var(--text-secondary);
}

/* WAVEFORM */
.waveform-wrapper {
    margin: 60px auto 0;
    height: 140px;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 4px;
}

.wave-bar {
    width: 3px;
    background-color: var(--text-primary);
    border-radius: 4px;
    animation: liquidWave 1.2s ease-in-out infinite;
    opacity: 0.8;
}

.wave-bar:nth-child(odd) {
    background-color: #4A4542;
}

.wave-bar:nth-child(1) {
    height: 20px;
    animation-duration: 1.1s;
    animation-delay: -0.2s;
}

.wave-bar:nth-child(2) {
    height: 40px;
    animation-duration: 1.3s;
    animation-delay: -0.4s;
}

.wave-bar:nth-child(3) {
    height: 50px;
    animation-duration: 1.0s;
    animation-delay: -0.6s;
}

.wave-bar:nth-child(4) {
    height: 30px;
    animation-duration: 1.4s;
    animation-delay: -0.3s;
}

.wave-bar:nth-child(5) {
    height: 60px;
    animation-duration: 1.2s;
    animation-delay: -0.7s;
}

.wave-bar:nth-child(6) {
    height: 80px;
    animation-duration: 0.9s;
    animation-delay: -0.5s;
}

.wave-bar:nth-child(7) {
    height: 45px;
    animation-duration: 1.5s;
    animation-delay: -0.2s;
}

.wave-bar:nth-child(8) {
    height: 75px;
    animation-duration: 1.1s;
    animation-delay: -0.8s;
}

.wave-bar:nth-child(9) {
    height: 100px;
    animation-duration: 1.3s;
    animation-delay: -0.1s;
}

.wave-bar:nth-child(10) {
    height: 65px;
    animation-duration: 1.0s;
    animation-delay: -0.4s;
}

.wave-bar:nth-child(11) {
    height: 90px;
    animation-duration: 1.4s;
    animation-delay: -0.6s;
}

.wave-bar:nth-child(12) {
    height: 55px;
    animation-duration: 1.2s;
    animation-delay: -0.3s;
}

.wave-bar:nth-child(13) {
    height: 85px;
    animation-duration: 0.9s;
    animation-delay: -0.7s;
}

.wave-bar:nth-child(14) {
    height: 40px;
    animation-duration: 1.5s;
    animation-delay: -0.2s;
}

.wave-bar:nth-child(15) {
    height: 70px;
    animation-duration: 1.1s;
    animation-delay: -0.5s;
}

.wave-bar:nth-child(16) {
    height: 35px;
    animation-duration: 1.3s;
    animation-delay: -0.8s;
}

.wave-bar:nth-child(17) {
    height: 60px;
    animation-duration: 1.0s;
    animation-delay: -0.4s;
}

.wave-bar:nth-child(18) {
    height: 25px;
    animation-duration: 1.4s;
    animation-delay: -0.1s;
}

.wave-bar:nth-child(19) {
    height: 45px;
    animation-duration: 1.2s;
    animation-delay: -0.6s;
}

.wave-bar:nth-child(20) {
    height: 15px;
    animation-duration: 0.9s;
    animation-delay: -0.3s;
}

@keyframes liquidWave {

    0%,
    100% {
        transform: scaleY(0.4);
        opacity: 0.6;
    }

    50% {
        transform: scaleY(1);
        opacity: 1;
        box-shadow: 0 0 10px rgba(44, 40, 37, 0.1);
    }
}

/* BENTO GRID */
.bento-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 24px;
    margin-top: 20px;
}

.bento-card {
    background: var(--bg-card);
    border-radius: var(--radius-xl);
    padding: 40px;
    border: 1px solid rgba(0, 0, 0, 0.03);
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
}

.bento-card:hover {
    box-shadow: 0 20px 40px rgba(44, 40, 37, 0.05);
    /* Soft shadow */
    transform: translateY(-4px);
}

.bento-card.large {
    grid-column: span 2;
}

.card-label {
    font-family: var(--font-serif);
    font-style: italic;
    font-size: 24px;
    /* Previous size */
    color: var(--text-primary);
    margin-bottom: 24px;
    display: block;
}

.card-title {
    font-family: var(--font-sans);
    font-size: 20px;
    font-weight: 600;
    margin-bottom: 12px;
}

.card-desc {
    font-size: 15px;
    color: var(--text-secondary);
    line-height: 1.6;
}

.texture-pattern {
    position: absolute;
    top: 0;
    right: 0;
    bottom: 0;
    left: 0;
    background-image: radial-gradient(#2C2825 0.5px, transparent 0.5px);
    background-size: 20px 20px;
    opacity: 0.03;
    pointer-events: none;
}

/* ANIMATED ICONS - EXTRA DECORATION */
.card-icon-extra {
    position: absolute;
    top: 32px;
    right: 32px;
    width: 40px;
    height: 40px;
    color: var(--text-primary);
    opacity: 0.8;
    /* Base animation: "Breathe" every 6 seconds */
    animation: iconBreathe 6s ease-in-out infinite;
}

.bento-card:hover .card-icon-extra {
    /* Hover animation: "Pop" instantly */
    animation: iconPop 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275) forwards;
}

@keyframes iconBreathe {

    0%,
    5%,
    100% {
        transform: scale(1);
    }

    2.5% {
        transform: scale(1.1) rotate(5deg);
    }
}

@keyframes iconPop {
    0% {
        transform: scale(1);
    }

    50% {
        transform: scale(1.2);
    }

    100% {
        transform: scale(1.1);
    }
}


/* INTERACTIVE DEMO */
.demo-container {
    max-width: 800px;
    margin: 0 auto;
    position: relative;
    min-height: 500px;
    /* Prevent layout jumps */
}

.demo-stage {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    width: 100%;
    opacity: 0;
    visibility: hidden;
    transform: translateY(20px);
    transition: opacity 0.5s cubic-bezier(0.4, 0, 0.2, 1),
        transform 0.5s cubic-bezier(0.4, 0, 0.2, 1),
        visibility 0s 0.5s;
    /* Delay visibility until fade completes */
}

.demo-stage.active {
    position: relative;
    /* Active stage flows naturally */
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
    transition: opacity 0.5s cubic-bezier(0.4, 0, 0.2, 1),
        transform 0.5s cubic-bezier(0.4, 0, 0.2, 1),
        visibility 0s 0s;
    /* No delay for visibility when becoming active */
}

/* Bubble Selection */
.bubble-container {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
    justify-content: center;
    margin-bottom: 48px;
}

.reminder-bubble {
    background: var(--bg-card);
    border: 1px solid rgba(0, 0, 0, 0.06);
    border-radius: 24px;
    padding: 12px 24px;
    font-size: 15px;
    color: var(--text-primary);
    cursor: pointer;
    transition: all 0.3s ease;
    font-family: var(--font-sans);
}

.reminder-bubble:hover {
    border-color: var(--text-primary);
    transform: translateY(-2px);
    box-shadow: 0 8px 20px rgba(44, 40, 37, 0.08);
}

.reminder-bubble:active {
    transform: scale(0.98);
}

/* Input Divider */
.input-divider {
    display: flex;
    align-items: center;
    gap: 16px;
    margin: 32px 0;
}

.divider-line {
    flex: 1;
    height: 1px;
    background: var(--accent-line);
}

.divider-text {
    color: var(--text-secondary);
    font-size: 14px;
    font-style: italic;
    font-family: var(--font-serif);
}

/* Custom Input */
.custom-input-container {
    text-align: center;
}

.custom-reminder-input {
    width: 100%;
    max-width: 500px;
    padding: 16px 20px;
    font-size: 16px;
    border: 1px solid var(--accent-line);
    border-radius: var(--radius-lg);
    background: var(--bg-card);
    color: var(--text-primary);
    font-family: var(--font-sans);
    transition: all 0.3s ease;
}

.custom-reminder-input:focus {
    outline: none;
    border-color: var(--text-primary);
    box-shadow: 0 0 0 3px rgba(44, 40, 37, 0.1);
}

.custom-reminder-input::placeholder {
    color: var(--text-secondary);
    opacity: 0.6;
}

/* Walkthrough Steps */
.walkthrough-steps {
    display: flex;
    flex-direction: column;
    gap: 60px;
}

.walkthrough-step {
    text-align: center;
    opacity: 0;
    transform: translateY(20px);
    animation: fadeInUp 0.6s ease forwards;
}

.walkthrough-step:nth-child(1) {
    animation-delay: 0.2s;
}

.walkthrough-step:nth-child(2) {
    animation-delay: 0.8s;
}

.walkthrough-step:nth-child(3) {
    animation-delay: 1.4s;
}

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

.step-num {
    font-family: var(--font-serif);
    font-style: italic;
    color: var(--text-secondary);
    margin-bottom: 8px;
    display: block;
    font-size: 14px;
}

.step-title {
    font-size: 24px;
    font-weight: 500;
    margin-bottom: 20px;
    font-family: var(--font-serif);
}

.personalized-content {
    margin-top: 20px;
}

/* Mock Input */
.mock-input {
    background: var(--bg-card);
    border: 1px solid var(--accent-line);
    border-radius: var(--radius-lg);
    padding: 16px 20px;
    margin: 0 auto;
    max-width: 500px;
}

.typing-text {
    color: var(--text-primary);
    font-size: 16px;
    position: relative;
}

.typing-text::after {
    content: '|';
    animation: blink 1s infinite;
    margin-left: 2px;
}

@keyframes blink {

    0%,
    50% {
        opacity: 1;
    }

    51%,
    100% {
        opacity: 0;
    }
}

/* Mock Phone */
.mock-phone {
    background: var(--bg-card);
    border-radius: var(--radius-xl);
    padding: 32px;
    margin: 0 auto;
    max-width: 400px;
    box-shadow: 0 8px 24px rgba(44, 40, 37, 0.08);
}

.phone-icon {
    width: 48px;
    height: 48px;
    margin: 0 auto 16px;
    color: var(--text-primary);
    animation: phoneRing 1s ease-in-out infinite;
    animation-delay: 1s;
}

@keyframes phoneRing {

    0%,
    100% {
        transform: rotate(0deg);
    }

    25% {
        transform: rotate(-15deg);
    }

    75% {
        transform: rotate(15deg);
    }
}

.phone-text {
    color: var(--text-primary);
    font-size: 16px;
    line-height: 1.6;
}

/* Outcome Text */
.outcome-text {
    color: var(--text-primary);
    font-size: 18px;
    font-weight: 500;
    max-width: 400px;
    margin: 0 auto;
    line-height: 1.6;
}

/* Audio Player */
.audio-preview-container {
    text-align: center;
}

.audio-player {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 24px;
    padding: 32px;
    background: var(--bg-card);
    border-radius: var(--radius-xl);
    margin: 0 auto;
    max-width: 500px;
}

.audio-play-btn {
    width: 64px;
    height: 64px;
    border-radius: 50%;
    background: var(--text-primary);
    color: var(--bg-body);
    border: none;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
    flex-shrink: 0;
}

.audio-play-btn:hover {
    transform: scale(1.05);
    box-shadow: 0 8px 20px rgba(44, 40, 37, 0.2);
}

.audio-play-btn svg {
    width: 28px;
    height: 28px;
}

.audio-waveform {
    display: flex;
    align-items: center;
    gap: 3px;
    height: 40px;
    flex: 1;
}

.wave-bar-small {
    width: 3px;
    background-color: var(--text-primary);
    border-radius: 2px;
    height: 12px;
    opacity: 0.6;
    transition: all 0.2s ease;
}

.audio-waveform.playing .wave-bar-small {
    animation: smallWave 0.8s ease-in-out infinite;
}

.wave-bar-small:nth-child(even) {
    background-color: var(--text-secondary);
}

.wave-bar-small:nth-child(1) {
    animation-delay: -0.1s;
}

.wave-bar-small:nth-child(2) {
    animation-delay: -0.2s;
}

.wave-bar-small:nth-child(3) {
    animation-delay: -0.3s;
}

.wave-bar-small:nth-child(4) {
    animation-delay: -0.4s;
}

.wave-bar-small:nth-child(5) {
    animation-delay: -0.5s;
}

.wave-bar-small:nth-child(6) {
    animation-delay: -0.4s;
}

.wave-bar-small:nth-child(7) {
    animation-delay: -0.3s;
}

.wave-bar-small:nth-child(8) {
    animation-delay: -0.2s;
}

.wave-bar-small:nth-child(9) {
    animation-delay: -0.1s;
}

.wave-bar-small:nth-child(10) {
    animation-delay: -0.0s;
}

@keyframes smallWave {

    0%,
    100% {
        transform: scaleY(1);
        opacity: 0.6;
    }

    50% {
        transform: scaleY(2.5);
        opacity: 1;
    }
}

/* Loading & Error States */
.audio-loading,
.audio-error {
    padding: 32px;
    text-align: center;
}

.loading-spinner {
    width: 40px;
    height: 40px;
    border: 3px solid var(--accent-line);
    border-top-color: var(--text-primary);
    border-radius: 50%;
    animation: spin 1s linear infinite;
    margin: 0 auto 16px;
}

@keyframes spin {
    to {
        transform: rotate(360deg);
    }
}

.audio-error p {
    color: var(--text-secondary);
    font-style: italic;
}

/* Phone Input Form */
.call-preview-container {
    text-align: center;
}

.phone-input-form {
    max-width: 400px;
    margin: 0 auto;
}

.demo-phone-input {
    width: 100%;
    padding: 16px 20px;
    font-size: 16px;
    border: 1px solid var(--accent-line);
    border-radius: 12px;
    /* Match dashboard inputs */
    background: var(--bg-card);
    color: var(--text-primary);
    font-family: var(--font-sans);
    transition: all 0.3s ease;
    text-align: center;
}

.demo-phone-input:focus {
    outline: none;
    border-color: var(--text-primary);
    box-shadow: 0 0 0 3px rgba(44, 40, 37, 0.1);
}

.demo-phone-input::placeholder {
    color: var(--text-secondary);
    opacity: 0.6;
}

/* Call State Messages */
.call-state-message {
    padding: 32px;
    text-align: center;
    max-width: 400px;
    margin: 0 auto;
}

.call-state-message p {
    color: var(--text-secondary);
    margin-top: 8px;
}

.call-state-message.success {
    background: var(--bg-card);
    border-radius: var(--radius-xl);
    padding: 40px 32px;
}

.success-icon {
    width: 64px;
    height: 64px;
    margin: 0 auto 16px;
    background: var(--text-primary);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--bg-body);
}

.success-icon svg {
    width: 32px;
    height: 32px;
}

.call-state-message.success h4 {
    font-size: 20px;
    font-weight: 600;
    margin-bottom: 8px;
    color: var(--text-primary);
}

.call-state-message.success p {
    font-size: 16px;
}

.call-state-message.error p {
    color: var(--text-secondary);
    font-style: italic;
}


/* Text Button */
.btn-text {
    background: none;
    border: none;
    color: var(--text-secondary);
    font-family: var(--font-sans);
    font-size: 15px;
    cursor: pointer;
    text-decoration: underline;
    text-underline-offset: 3px;
    transition: color 0.2s ease;
    margin: 0 auto;
}

.btn-text:hover {
    color: var(--text-primary);
}

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

    .bento-card.large {
        grid-column: span 1;
    }

    .hero-title {
        font-size: 48px;
    }

    .demo-container {
        padding: 0 20px;
    }

    .bubble-container {
        gap: 8px;
    }

    .reminder-bubble {
        font-size: 14px;
        padding: 10px 18px;
    }

    .step-title {
        font-size: 20px;
    }

    .audio-player {
        padding: 24px;
        gap: 16px;
    }

    .audio-play-btn {
        width: 56px;
        height: 56px;
    }

    .card-icon-extra {
        top: 24px;
        right: 24px;
        width: 32px;
        height: 32px;
    }
}

/* FAQ SECTION */
.faq-section {
    max-width: 800px;
    margin: 0 auto;
}

.faq-header {
    text-align: center;
    margin-bottom: 60px;
}

.faq-header h2 {
    font-size: 32px;
    margin-bottom: 12px;
}

.faq-header p {
    color: var(--text-secondary);
}

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

.faq-item {
    background: var(--bg-card);
    border-radius: var(--radius-lg);
    border: 1px solid rgba(0, 0, 0, 0.03);
    overflow: hidden;
    transition: all 0.3s ease;
}

.faq-item:hover {
    box-shadow: 0 4px 12px rgba(44, 40, 37, 0.05);
}

.faq-question {
    width: 100%;
    padding: 24px 28px;
    background: none;
    border: none;
    text-align: left;
    cursor: pointer;
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 16px;
    font-family: var(--font-sans);
    font-size: 16px;
    font-weight: 500;
    color: var(--text-primary);
    transition: color 0.2s ease;
}

.faq-question:hover {
    color: var(--text-secondary);
}

.faq-icon {
    width: 24px;
    height: 24px;
    flex-shrink: 0;
    transition: transform 0.3s ease;
    color: var(--text-secondary);
}

.faq-item.active .faq-icon {
    transform: rotate(45deg);
}

.faq-answer {
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}

.faq-answer-inner {
    padding: 0 28px 24px;
    color: var(--text-secondary);
    font-size: 15px;
    line-height: 1.7;
}

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

@media (max-width: 600px) {
    .faq-question {
        padding: 20px;
        font-size: 15px;
    }

    .faq-answer-inner {
        padding: 0 20px 20px;
        font-size: 14px;
    }

    .faq-header h2 {
        font-size: 28px;
    }
}
