/* ============================================
   VIBECODING PAGE STYLES
   Works on top of style.css for base styles
============================================ */

.vibe-hero {
    width: min(75em, 100%);
    margin: 3em auto;
    padding: min(3em, 8%);
    background-color: transparent;
    border: none;
    text-align: left;
    opacity: 0;
    transform: translateY(20px);
    transition: opacity 0.8s ease, transform 0.8s ease;
}

.vibe-hero.fade-in {
    opacity: 1;
    transform: translateY(0);
}

.vibe-label {
    font-size: 0.85em;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    color: var(--primary-color);
    opacity: 0.7;
    margin-bottom: 0.6em;
}

.vibe-title {
    font-size: clamp(2.2em, 5vw, 3em);
    color: var(--primary-color);
    font-weight: 700;
    margin-bottom: 0.4em;
}

.vibe-tagline {
    font-size: clamp(1em, 2.5vw, 1.2em);
    color: var(--text-color);
    line-height: 1.6;
    opacity: 0.85;
    max-width: 45em;
}

.vibe-divider {
    width: min(40em, 60%);
    margin: 1em auto;
    border: none;
    border-top: 1px solid rgba(5, 76, 47, 0.15);
}

.vibe-section {
    width: min(75em, 100%);
    margin: 2em auto 4em auto;
    padding: 0 min(3em, 8%);
    background-color: transparent;
    border: none;
}

.vibe-project {
    display: grid;
    grid-template-columns: 1.1fr 0.9fr;
    gap: 3em;
    align-items: center;
    opacity: 0;
    transform: translateY(30px);
    transition: opacity 0.8s ease, transform 0.8s ease;
}

.vibe-project.fade-in {
    opacity: 1;
    transform: translateY(0);
}

.vibe-project-text {
    text-align: left;
}

.vibe-status {
    display: inline-block;
    font-size: 0.8em;
    font-weight: 600;
    color: var(--primary-color);
    background-color: var(--color-2);
    padding: 0.3em 0.9em;
    border-radius: 2em;
    margin-bottom: 1em;
}

.vibe-project-title {
    font-size: 2em;
    color: var(--color-3);
    font-weight: 700;
    margin-bottom: 0.2em;
}

.vibe-project-subtitle {
    font-size: 1.1em;
    color: var(--primary-color);
    font-weight: 600;
    margin-bottom: 0.8em;
}

.vibe-project-desc {
    font-size: 1em;
    line-height: 1.8;
    color: var(--text-color);
    opacity: 0.9;
    margin-bottom: 1.2em;
}

.vibe-pain-point {
    font-size: 0.95em;
    font-style: italic;
    line-height: 1.8;
    color: var(--color-3);
    opacity: 0.9;
    border-left: 3px solid var(--color-2);
    padding-left: 1em;
    margin-bottom: 1.4em;
}

.vibe-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5em;
}

.vibe-tag {
    font-size: 0.8em;
    font-weight: 600;
    color: var(--color-3);
    background-color: rgba(5, 76, 47, 0.08);
    padding: 0.35em 0.9em;
    border-radius: 2em;
}

/* ============================================
   PHONE MOCKUP
   Uses Klets' own Delft-tile colour scheme
   (ink blue / gold / cream) rather than the
   site palette, since it's meant to look like
   a peek at the actual app.
============================================ */

.vibe-project-visual {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 1em;
}

.phone-mockup {
    width: min(260px, 100%);
    aspect-ratio: 9 / 19.5;
    background-color: #1B4F8C;
    border-radius: 2.6em;
    padding: 0.6em;
    display: flex;
    flex-direction: column;
    box-shadow: 0 20px 40px rgba(20, 52, 92, 0.25);
    position: relative;
    border: 2px solid #14345C;
}

/* Power button (right) and volume button (left), like a real phone's side buttons */
.phone-mockup::before {
    content: '';
    position: absolute;
    right: -4px;
    top: 22%;
    width: 3px;
    height: 15%;
    background-color: #14345C;
    border-radius: 0 3px 3px 0;
}

.phone-mockup::after {
    content: '';
    position: absolute;
    left: -4px;
    top: 16%;
    width: 3px;
    height: 9%;
    background-color: #14345C;
    border-radius: 3px 0 0 3px;
}

.phone-notch {
    width: 28%;
    height: 1.5em;
    background-color: #14345C;
    border-radius: 999px;
    margin: 0 auto 0.5em auto;
}

.phone-screen {
    flex: 1;
    background-color: #FAF6ED;
    border-radius: 1.8em;
    padding: 1.2em 1em;
    text-align: left;
    display: flex;
    flex-direction: column;
    justify-content: center;
    overflow: hidden;
}

.phone-home-indicator {
    width: 34%;
    height: 4px;
    background-color: rgba(255, 255, 255, 0.55);
    border-radius: 999px;
    margin: 0.6em auto 0.1em auto;
}

.phone-screen-text {
    display: flex;
    flex-direction: column;
    gap: 0.4em;
}

.phone-screen.is-chat .phone-screen-text {
    display: none;
}

.phone-screen-title,
.phone-screen-desc {
    transition: opacity 0.3s ease, transform 0.3s ease;
}

.screen-fade .phone-screen-title,
.screen-fade .phone-screen-desc {
    opacity: 0.3;
    transform: translateY(4px);
}

.phone-screen-eyebrow {
    font-size: 0.7em;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    color: #C08A2E;
}

.phone-screen-title {
    font-size: 1.3em;
    font-weight: 700;
    color: #14345C;
}

.phone-screen-desc {
    font-size: 0.8em;
    line-height: 1.5;
    color: #5B6B7A;
}

/* ============================================
   PRACTICE TAB — CHATBOT-STYLE ANIMATION
   A tiny scripted exchange that plays each time
   the Practice tab becomes active, standing in for
   the app's conversation-practice scenarios.
============================================ */
.phone-screen-chat {
    display: none;
    flex-direction: column;
    justify-content: center;
    gap: 0.6em;
    position: relative;
    min-height: 100%;
}

.phone-screen.is-chat .phone-screen-chat {
    display: flex;
}

.chat-bubbles {
    display: flex;
    flex-direction: column;
    gap: 0.5em;
    margin-top: 0.3em;
}

.chat-bubble {
    max-width: 82%;
    padding: 0.5em 0.8em;
    border-radius: 1em;
    font-size: 0.72em;
    line-height: 1.4;
    opacity: 0;
    transform: translateY(6px);
    transition: opacity 0.35s ease, transform 0.35s ease;
}

.chat-bubble--bot {
    align-self: flex-start;
    background-color: rgba(20, 52, 92, 0.08);
    color: #14345C;
    border-bottom-left-radius: 0.3em;
}

.chat-bubble--user {
    align-self: flex-end;
    background-color: #1B4F8C;
    color: #FAF6ED;
    border-bottom-right-radius: 0.3em;
}

.chat-bubbles.chat-play .chat-bubble {
    opacity: 1;
    transform: translateY(0);
}

.chat-bubbles.chat-play .chat-bubble:nth-child(1) { transition-delay: 0.1s; }
.chat-bubbles.chat-play .chat-bubble:nth-child(2) { transition-delay: 0.6s; }
.chat-bubbles.chat-play .chat-bubble:nth-child(3) { transition-delay: 1.1s; }

/* After the conversation has had time to be read, it fades out and hands
   the screen over to the word flip-card — a sequence, not a stack. */
.chat-bubbles {
    transition: opacity 0.3s ease;
}

.phone-screen-chat.show-word .chat-bubbles {
    opacity: 0;
    pointer-events: none;
    position: absolute;
}

.phone-tabbar {
    display: flex;
    justify-content: space-between;
    margin-top: 0.6em;
    padding: 0.5em 0.3em 0.2em 0.3em;
}

.phone-tab {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.2em;
    flex: 1;
    opacity: 0.5;
    transition: opacity 0.3s ease, transform 0.3s ease;
}

.phone-tab.active {
    opacity: 1;
    transform: translateY(-2px);
}

.phone-tab-icon {
    font-size: 1.1em;
}

.phone-tab-label {
    display: none;
    font-size: 0.6em;
    font-weight: 600;
    color: #FAF6ED;
    white-space: nowrap;
}

.phone-tab.active .phone-tab-label {
    display: block;
}

/* ============================================
   WORD FLIP CARD
   A single vocabulary example that flips to reveal
   context/meaning — a small, concrete stand-in for
   the "contextual words" pain point above.
============================================ */
.word-flip-card {
    width: 100%;
    perspective: 1000px;
    opacity: 0;
    transform: translateY(6px);
    transition: opacity 0.4s ease 0.15s, transform 0.4s ease 0.15s;
}

.phone-screen-chat.show-word .word-flip-card {
    opacity: 1;
    transform: translateY(0);
}

.word-flip-inner {
    position: relative;
    width: 100%;
    height: 78px;
    transform-style: preserve-3d;
    transition: transform 0.7s cubic-bezier(0.4, 0.2, 0.2, 1), height 0.4s ease;
}

.phone-screen-chat.show-word .word-flip-inner {
    height: 110px;
}

.word-flip-inner.is-flipped {
    transform: rotateY(180deg);
}

.word-flip-face {
    position: absolute;
    inset: 0;
    backface-visibility: hidden;
    border-radius: 0.8em;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 0.3em;
    padding: 0.6em;
    text-align: center;
}

.word-flip-front {
    background-color: #1B4F8C;
    color: #FAF6ED;
}

.word-flip-back {
    background-color: #C08A2E;
    color: #14345C;
    transform: rotateY(180deg);
}

.word-flip-eyebrow {
    font-size: 0.6em;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    opacity: 0.85;
}

.word-flip-word {
    font-size: 1.2em;
    font-weight: 700;
    transition: font-size 0.4s ease;
}

.phone-screen-chat.show-word .word-flip-word {
    font-size: 1.5em;
}

.word-flip-meaning {
    font-size: 0.7em;
    font-weight: 500;
    line-height: 1.35;
}

.phone-screen-chat.show-word .word-flip-meaning {
    font-size: 0.78em;
}

/* ============================================
   FOOTER NAVIGATION
============================================ */
.vibe-footer {
    width: 100%;
    margin: 0 auto 3em auto;
    text-align: center;
    padding: 0;
    border: none;
    background-color: transparent;
}

.back-link {
    display: inline-block;
    text-decoration: none;
    color: var(--primary-color);
    font-size: 1.05em;
    font-weight: 600;
    transition: color 0.3s ease;
}

.back-link:hover {
    color: var(--color-3);
}

/* ============================================
   MOBILE RESPONSIVE
============================================ */
@media (max-width: 768px) {
    .vibe-project {
        grid-template-columns: 1fr;
        gap: 2em;
    }

    .vibe-project-visual {
        order: -1;
    }

    .vibe-project-text {
        text-align: left;
    }

    .vibe-title {
        font-size: clamp(1.8em, 8vw, 2.3em);
    }

    .phone-mockup {
        width: min(220px, 70%);
    }
}
