/* Playful Modernism — home: yellow stage + hard feature blocks */

@keyframes stampIn {
    from {
        opacity: 0;
        transform: translateY(18px) scale(0.96);
    }
    to {
        opacity: 1;
        transform: translateY(0) scale(1);
    }
}

@keyframes fadeSlideIn {
    from {
        opacity: 0;
        transform: translateY(12px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* —— Hero: yellow bowl stage —— */

.hero {
    display: flex;
    align-items: center;
    scroll-margin-top: 96px;
    padding: 112px 24px 72px;
}

.hero--yellow {
    background: var(--accent-yellow);
    min-height: min(72vh, 720px);
    padding-bottom: 96px;
    /* Bowl underside into canvas — clip keeps fill yellow throughout the stage */
    clip-path: ellipse(130% 100% at 50% -8%);
}

#features,
#screenshots,
#about {
    scroll-margin-top: 96px;
}

.hero-inner {
    width: 100%;
    max-width: var(--page-max);
    margin: 0 auto;
    display: grid;
    grid-template-columns: 1fr;
    gap: 40px;
    align-items: center;
}

@media (min-width: 768px) {
    .hero-inner {
        grid-template-columns: 1fr 1fr;
        gap: 48px;
    }
}

@media (min-width: 1024px) {
    .hero-inner {
        gap: 64px;
    }
}

.hero-copy {
    text-align: left;
}

.hero-brand {
    font-family: var(--font-cute);
    font-size: clamp(56px, 10vw, 96px);
    font-weight: 400;
    letter-spacing: 0.12em;
    line-height: 1.05;
    margin: 0 0 16px;
    /* Neo stamp: white fill + ink outline + hard shadow (matches buttons/cards) */
    color: var(--surface);
    -webkit-text-stroke: 3px var(--ink);
    paint-order: stroke fill;
    text-shadow: 5px 5px 0 var(--ink);
}

.hero-copy h1 {
    font-family: var(--font-display);
    font-size: clamp(22px, 3.2vw, 32px);
    font-weight: 700;
    letter-spacing: -0.02em;
    line-height: 1.35;
    color: var(--ink);
    margin-bottom: 16px;
    max-width: 16em;
    word-break: keep-all;
    text-wrap: balance;
}

.hero-copy .description {
    font-size: 16px;
    color: var(--yellow-ink);
    line-height: 1.65;
    letter-spacing: 0.04em;
    max-width: 38ch;
    margin-bottom: 28px;
    word-break: keep-all;
    text-wrap: pretty;
}

.hero-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
    align-items: center;
}

/* Yellow-on-yellow secondary is invisible — use white ghost on the stage */
.hero--yellow .btn-secondary {
    background: var(--surface);
    color: var(--ink);
}

.hero-visual {
    display: flex;
    justify-content: center;
}

@media (min-width: 768px) {
    .hero-visual {
        justify-content: flex-end;
    }
}

.phone-frame {
    width: min(280px, 72vw);
    aspect-ratio: 9 / 19;
    padding: 12px;
    border-radius: 28px;
    background: var(--surface);
    border: 3px solid #000;
    box-shadow: 6px 6px 0 #000;
}

.phone-frame img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: top;
    border-radius: 20px;
    display: block;
}

@media (prefers-reduced-motion: no-preference) {
    .hero-brand {
        animation: stampIn 0.55s cubic-bezier(0.22, 1, 0.36, 1) both;
    }
    .hero-copy h1 {
        animation: fadeSlideIn 0.45s ease-out 0.08s both;
    }
    .hero-copy .description {
        animation: fadeSlideIn 0.45s ease-out 0.14s both;
    }
    .hero-actions {
        animation: fadeSlideIn 0.45s ease-out 0.2s both;
    }
    .phone-frame {
        animation: fadeSlideIn 0.55s ease-out 0.12s both;
    }
}

@media (prefers-reduced-motion: reduce) {
    .hero-brand,
    .hero-copy h1,
    .hero-copy .description,
    .hero-actions,
    .phone-frame {
        animation: none;
    }

    .hero-brand {
        text-shadow: none;
    }
}

/* —— Sections —— */

.section {
    padding: 88px 24px;
    max-width: var(--page-max);
    margin: 0 auto;
}

/* —— Features: asymmetric hard blocks —— */

.features-stack {
    display: grid;
    grid-template-columns: 1fr;
    gap: 20px;
}

@media (min-width: 768px) {
    .features-stack {
        grid-template-columns: 1.15fr 1fr;
        grid-template-rows: auto auto auto;
        gap: 24px;
    }

    .feature-featured {
        grid-column: 1;
        grid-row: 1 / 3;
        display: grid;
        grid-template-columns: 1fr;
        align-content: start;
        gap: 28px;
        padding: 32px;
    }

    .feature-featured-visual {
        max-width: 180px;
        margin: 0;
    }

    .feature-card-wide {
        grid-column: 1 / -1;
        display: grid;
        grid-template-columns: auto 1fr;
        gap: 4px 20px;
        align-items: center;
        padding: 28px 32px;
    }

    .feature-card-wide .feature-icon {
        grid-row: 1 / 3;
        margin-bottom: 0;
        align-self: center;
    }

    .feature-card-wide h3,
    .feature-card-wide p {
        margin-bottom: 0;
    }
}

.feature-card {
    padding: 28px;
    border-radius: var(--radius-xl);
    border: 3px solid var(--ink);
    box-shadow: var(--shadow-md);
    background: var(--surface);
    transition: transform 0.12s ease, box-shadow 0.12s ease;
}

.feature-card:hover {
    transform: translate(-2px, -2px);
    box-shadow: var(--shadow-lg);
}

.feature-card:focus-visible {
    outline: 3px solid var(--accent);
    outline-offset: 2px;
}

.feature-card:active {
    transform: translate(2px, 2px);
    box-shadow: var(--shadow-sm);
}

@media (prefers-reduced-motion: reduce) {
    .feature-card:hover,
    .feature-card:active {
        transform: none;
    }
}

.feature-card--yellow {
    background: var(--accent-yellow);
}

.feature-card--lilac {
    background: var(--lilac-mid);
}

.feature-card--sage {
    background: var(--sage);
}

.feature-card--coral {
    background: var(--coral);
}

.feature-card h3 {
    font-family: var(--font-display);
    font-size: 18px;
    font-weight: 700;
    margin-bottom: 8px;
    color: var(--ink);
}

.feature-card p {
    font-size: 15px;
    color: var(--ink-light);
    line-height: 1.65;
}

.feature-card--yellow h3,
.feature-card--yellow p {
    color: var(--ink);
}

.feature-card--yellow p {
    color: var(--yellow-ink);
}

.feature-card--lilac h3,
.feature-card--lilac p,
.feature-card--sage h3,
.feature-card--sage p,
.feature-card--coral h3,
.feature-card--coral p {
    color: var(--ink);
}

.feature-featured {
    display: grid;
    grid-template-columns: 1fr;
    gap: 24px;
    align-items: center;
}

.feature-featured-visual {
    border-radius: 20px;
    overflow: hidden;
    border: 3px solid var(--ink);
    box-shadow: var(--shadow-sm);
    max-width: 200px;
    margin: 0 auto;
    background: var(--surface);
}

.feature-featured-visual img {
    width: 100%;
    display: block;
    aspect-ratio: 9 / 16;
    object-fit: cover;
    object-position: top;
}

.feature-icon {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 52px;
    height: 52px;
    margin-bottom: 16px;
    padding: 8px;
    background: var(--surface);
    border: 2px solid var(--ink);
    border-radius: 14px;
    box-shadow: 3px 3px 0 var(--ink);
    color: var(--ink);
    flex-shrink: 0;
}

.feature-card--lilac .feature-icon {
    color: var(--lilac-mid);
}

.feature-card--sage .feature-icon {
    color: var(--sage);
}

.feature-card--coral .feature-icon {
    color: var(--coral);
}

.feature-icon svg {
    width: 28px;
    height: 28px;
    display: block;
}

/* —— Screenshots: hard frames + snap scroll —— */

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

.screenshot-frame {
    aspect-ratio: 9 / 16;
    border-radius: var(--radius-xl);
    overflow: hidden;
    border: 3px solid var(--ink);
    background: var(--surface);
    box-shadow: var(--shadow-md);
    padding: 8px;
}

.screenshot-frame img {
    width: 100%;
    height: 100%;
    object-fit: contain;
    border-radius: calc(var(--radius-xl) - 10px);
    display: block;
}

/* —— About: tone bars —— */

.about {
    max-width: 720px;
}

.about-lead {
    font-size: 18px;
    color: var(--ink);
    line-height: 1.8;
    margin-bottom: 32px;
}

.about-tones {
    list-style: none;
    display: flex;
    flex-direction: column;
    gap: 16px;
    margin: 0;
    padding: 0;
}

.about-tone {
    padding: 24px 28px;
    border: 3px solid var(--ink);
    border-radius: var(--radius-md);
    box-shadow: var(--shadow-md);
    font-size: 16px;
    line-height: 1.65;
    color: var(--ink-light);
    transition: transform 0.12s ease, box-shadow 0.12s ease;
}

.about-tone:hover {
    transform: translate(-2px, -2px);
    box-shadow: var(--shadow-lg);
}

@media (prefers-reduced-motion: reduce) {
    .about-tone:hover {
        transform: none;
    }
}

.about-tone strong {
    display: block;
    font-family: var(--font-display);
    font-size: 17px;
    font-weight: 700;
    color: var(--ink);
    margin-bottom: 6px;
}

.about-tone--yellow {
    background: var(--accent-yellow);
}

.about-tone--lilac {
    background: var(--lilac-mid);
}

.about-tone--sage {
    background: var(--sage);
}

.about-tone--yellow strong,
.about-tone--lilac strong,
.about-tone--sage strong {
    color: var(--ink);
}

.about-tone--yellow {
    color: var(--yellow-ink);
}

.about-tone--lilac,
.about-tone--sage {
    color: var(--ink);
}

/* —— Mobile —— */

@media (max-width: 767px) {
    .hero {
        padding: 100px 20px 64px;
        min-height: auto;
    }

    .hero--yellow {
        min-height: min(68vh, 640px);
        padding-bottom: 80px;
        clip-path: ellipse(145% 100% at 50% -6%);
    }

    .hero-inner {
        gap: 32px;
    }

    .hero-copy {
        text-align: center;
    }

    .hero-brand {
        letter-spacing: 0.1em;
    }

    .hero-copy h1 {
        max-width: none;
        margin-left: auto;
        margin-right: auto;
    }

    .hero-copy .description {
        margin-left: auto;
        margin-right: auto;
    }

    .hero-actions {
        flex-direction: column;
        align-items: stretch;
    }

    .hero-actions .btn {
        width: 100%;
        max-width: 320px;
        margin-left: auto;
        margin-right: auto;
    }

    .phone-frame {
        width: min(220px, 58vw);
    }

    .feature-card-wide {
        grid-template-columns: 1fr;
    }

    .feature-card-wide .feature-icon {
        grid-row: auto;
        margin-bottom: 16px;
    }
}

@media (max-width: 1023px) {
    .screenshots-grid {
        display: flex;
        overflow-x: auto;
        scroll-snap-type: x mandatory;
        gap: 16px;
        padding-bottom: 8px;
        margin-left: -4px;
        margin-right: -4px;
        -webkit-overflow-scrolling: touch;
        scrollbar-width: none;
    }

    .screenshots-grid::-webkit-scrollbar {
        display: none;
    }

    .screenshots-grid:focus-visible {
        outline: 3px solid var(--accent);
        outline-offset: 4px;
        border-radius: var(--radius-xl);
    }

    .screenshot-frame {
        flex: 0 0 min(260px, 72vw);
        scroll-snap-align: center;
    }
}
