@import url('https://fonts.googleapis.com/css2?family=Baloo+2:wght@500;600;700;800&family=Nunito:wght@500;600;700;800;900&family=Noto+Sans+Devanagari:wght@500;600;700&display=swap');

#homepage {
    --play-ink: #273c48;
    --play-muted: #536a70;
    --play-teal: #147a75;
    --play-teal-deep: #0b5b59;
    --play-coral: #e67559;
    --play-sun: #f4c653;
    --play-cream: #fff8e9;
    --play-mint: #dcefe5;
    color: var(--play-ink);
    font-family: "Nunito", "Noto Sans Devanagari", sans-serif;
}

#homepage :where(a, button, input) {
    -webkit-tap-highlight-color: transparent;
}

#homepage :where(a, button):focus-visible {
    outline: 3px solid #ce5a40;
    outline-offset: 4px;
}

#homepage .navbar {
    background: rgba(255, 250, 239, .96);
    border-bottom: 1px solid #eadfc9;
    box-shadow: 0 5px 22px rgba(57, 73, 65, .07);
}

#homepage .nav-container {
    max-width: 1380px;
    padding: .72rem clamp(1rem, 3vw, 2.5rem);
    gap: 1.25rem;
}

#homepage .logo {
    gap: .6rem;
    flex-shrink: 0;
    font-family: "Baloo 2", sans-serif;
    font-size: 1.3rem;
    color: var(--play-teal-deep);
}

#homepage .logo-icon {
    width: 42px;
    height: 42px;
    background-image: none;
    background-color: #f2c455;
    border: 2px solid #fff1c7;
    box-shadow: inset 0 0 0 2px #d99b32, 0 3px 0 #bd8533;
    position: relative;
    animation: logoWiggle 4.8s ease-in-out infinite;
}

#homepage .logo-icon::before {
    content: "अ";
    display: grid;
    place-items: center;
    height: 100%;
    color: #693d34;
    font: 800 1.6rem/1 "Noto Sans Devanagari", sans-serif;
}

#homepage .logo-text {
    color: var(--play-teal-deep) !important;
    letter-spacing: -.035em;
}

#homepage .nav-links {
    gap: clamp(.35rem, 1vw, 1rem);
    flex-wrap: nowrap;
}

#homepage .nav-links > a {
    min-height: 42px;
    display: inline-flex;
    align-items: center;
    padding: .45rem .65rem;
    border-radius: 14px;
    color: #43575d;
    font-size: .92rem;
    font-weight: 800;
    white-space: nowrap;
}

#homepage .nav-links > a:hover {
    color: var(--play-teal-deep);
    background: #e5f0e7;
}

#homepage .nav-links > a.start-learning-btn {
    background: #e5f0e7;
    color: var(--play-teal-deep);
}

#homepage .nav-links > a.games-btn {
    background: var(--play-coral);
    color: #fff;
    border-radius: 999px;
    padding-inline: .95rem;
    box-shadow: 0 3px 0 #b75442;
}

#homepage .nav-links > a.games-btn:hover {
    color: #fff;
    background: #d9664e;
    transform: translateY(-1px);
}

#homepage .sp-nav-group {
    display: flex;
    align-items: center;
    gap: .35rem;
    margin-left: 0 !important;
}

#homepage .sp-nav-btn {
    min-height: 44px;
    min-width: 86px;
    padding: .4rem .65rem;
    display: inline-flex;
    justify-content: center;
    align-items: center;
    gap: .38rem;
    border: 1.5px solid #d6dfd4;
    border-radius: 14px;
    background: #fffdf6;
    color: #3b5556;
    font: 800 .86rem/1 "Nunito", sans-serif;
    cursor: pointer;
    transition: transform .18s ease, background-color .18s ease, border-color .18s ease;
}

#homepage .sp-nav-btn:hover {
    background: #e5f0e7;
    border-color: #a7c9b3;
    transform: translateY(-2px);
}

#homepage .sp-nav-btn svg {
    width: 17px;
    height: 17px;
    fill: currentColor;
}

#homepage .nav-more-btn {
    min-height: 44px;
    padding: .5rem .8rem;
    border-color: #d6dfd4;
    border-radius: 14px;
    background: #fffdf6;
    color: #3b5556;
    font: 800 .9rem "Nunito", sans-serif;
}

#homepage .nav-dropdown {
    border: 1px solid #e5d9c4;
    border-radius: 18px;
    box-shadow: 0 20px 45px rgba(46, 68, 61, .18);
}

#homepage .hero-section {
    position: relative;
    isolation: isolate;
    overflow: hidden;
    min-height: 690px;
    padding: 146px 2rem 76px;
    background:
        radial-gradient(ellipse at 82% 11%, rgba(255, 218, 126, .47), transparent 25%),
        radial-gradient(ellipse at 12% 74%, rgba(189, 223, 194, .55), transparent 28%),
        linear-gradient(118deg, #fff8e9 0%, #f6f1dc 52%, #e5f0df 100%);
}

#homepage .hero-section::before {
    content: "";
    position: absolute;
    inset: 0;
    z-index: -1;
    opacity: .25;
    background-image: radial-gradient(#a98d54 1px, transparent 1px);
    background-size: 23px 23px;
    mask-image: linear-gradient(90deg, transparent, #000 65%);
}

#homepage .hero-container {
    max-width: 1260px;
    grid-template-columns: minmax(0, .9fr) minmax(420px, 1.1fr);
    gap: clamp(2.2rem, 6vw, 6rem);
    align-items: center;
}

#homepage .hero-content {
    position: relative;
    z-index: 2;
    padding: .5rem 0 1.4rem;
    animation: heroArrive .75s cubic-bezier(.2,.7,.2,1) both;
}

#homepage .hero-kicker {
    display: inline-flex;
    align-items: center;
    gap: .55rem;
    margin-bottom: 1.15rem;
    padding: .48rem .86rem;
    border: 1px solid #e5d5af;
    border-radius: 999px;
    background: rgba(255, 253, 244, .78);
    color: #53645b;
    font-size: .88rem;
    font-weight: 900;
    letter-spacing: .035em;
}

#homepage .hero-kicker-dot {
    width: 9px;
    height: 9px;
    border-radius: 50%;
    background: var(--play-coral);
    box-shadow: 0 0 0 4px #f7ded0;
}

#homepage .hero-title {
    max-width: 680px;
    margin: 0 0 1.1rem;
    color: #294451;
    font: 800 clamp(3.1rem, 6.2vw, 5.55rem)/.99 "Baloo 2", "Noto Sans Devanagari", sans-serif;
    letter-spacing: -.045em;
}

#homepage .gradient-text {
    display: inline-block;
    padding: .02em .08em .11em;
    color: #d65f49;
    background: none;
    -webkit-text-fill-color: currentColor;
    text-shadow: 0 3px 0 rgba(230, 117, 89, .12);
    transform: rotate(-1.5deg);
    transform-origin: left center;
}

#homepage .hero-description {
    max-width: 530px;
    margin: 0 0 1.65rem;
    color: #536a70;
    font-size: clamp(1.08rem, 1.5vw, 1.28rem);
    font-weight: 700;
    line-height: 1.65;
}

#homepage .hero-buttons {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: .85rem;
}

#homepage .cta-primary,
#homepage .cta-secondary {
    min-height: 58px;
    display: inline-flex;
    justify-content: center;
    align-items: center;
    gap: .7rem;
    padding: .85rem 1.45rem;
    border-radius: 18px;
    font: 900 1.03rem "Nunito", sans-serif;
    text-decoration: none;
    transition: transform .2s ease, box-shadow .2s ease, background-color .2s ease;
}

#homepage .cta-primary {
    color: #fffdf4;
    background: var(--play-teal);
    box-shadow: 0 5px 0 #0c5a57, 0 12px 22px rgba(17, 105, 99, .16);
}

#homepage .cta-primary span {
    font-size: 1.4rem;
    transition: transform .2s ease;
}

#homepage .cta-primary:hover {
    background: #0f6965;
    box-shadow: 0 7px 0 #0c5a57, 0 15px 24px rgba(17, 105, 99, .18);
    transform: translateY(-2px);
}

#homepage .cta-primary:hover span {
    transform: translateX(4px);
}

#homepage .cta-secondary {
    border: 1.5px solid #d8caa8;
    color: #46605d;
    background: rgba(255, 252, 240, .68);
}

#homepage .cta-secondary:hover {
    background: #fffdf5;
    transform: translateY(-2px);
}

#homepage .hero-note {
    margin: 1.2rem 0 0 .15rem;
    color: #728076;
    font-size: .94rem;
    font-weight: 800;
}

#homepage .hero-visual {
    position: relative;
    min-height: 480px;
    display: grid;
    place-items: center;
    isolation: isolate;
}

#homepage .hero-orbit {
    position: absolute;
    z-index: -2;
    left: 50%;
    top: 49%;
    border: 1px solid rgba(179, 145, 73, .23);
    border-radius: 50%;
    transform: translate(-50%, -50%) rotate(-12deg);
}

#homepage .orbit-one {
    width: min(94%, 530px);
    height: 390px;
}

#homepage .orbit-two {
    width: min(77%, 432px);
    height: 318px;
    transform: translate(-50%, -50%) rotate(19deg);
}

#homepage .hero-sun {
    position: absolute;
    z-index: -2;
    top: 7%;
    right: 13%;
    width: 95px;
    height: 95px;
    border-radius: 50%;
    background: #f5cb62;
    box-shadow: 0 0 0 13px rgba(245, 203, 98, .18), 0 0 0 28px rgba(245, 203, 98, .1);
}

#homepage .hero-landscape {
    position: absolute;
    z-index: -1;
    inset: auto 0 0;
    height: 63%;
    overflow: hidden;
    border-radius: 52% 48% 0 0 / 26% 26% 0 0;
    background: linear-gradient(180deg, #d7e8c9, #b4d4b3);
}

#homepage .hill {
    position: absolute;
    display: block;
    bottom: -65px;
    width: 77%;
    height: 210px;
    border-radius: 50% 50% 0 0;
}

#homepage .hill-back {
    left: -14%;
    bottom: 24px;
    background: #9ac6a7;
    transform: rotate(-10deg);
}

#homepage .hill-front {
    right: -15%;
    background: #74ad91;
    transform: rotate(9deg);
}

#homepage .hero-temple {
    position: absolute;
    bottom: 45px;
    left: 50%;
    width: clamp(126px, 18vw, 176px);
    filter: drop-shadow(0 10px 2px rgba(70, 91, 66, .13));
    transform: translateX(-50%);
}

#homepage .hero-letter {
    position: absolute;
    z-index: 2;
    display: grid;
    place-items: center;
    width: 93px;
    height: 93px;
    border: 4px solid rgba(255,255,255,.82);
    border-radius: 31px;
    color: #fffaf0;
    font: 700 3.2rem/1 "Noto Sans Devanagari", sans-serif;
    box-shadow: 0 10px 0 rgba(54, 76, 72, .12), 0 19px 35px rgba(49, 67, 60, .15);
    animation: letterBob 4.2s ease-in-out infinite;
}

#homepage .letter-ka {
    top: 16%;
    left: 9%;
    background: #e9795b;
    transform: rotate(-10deg);
}

#homepage .letter-aa {
    top: 24%;
    right: 6%;
    background: #e7b84f;
    animation-delay: .8s;
    transform: rotate(9deg);
}

#homepage .letter-ma {
    bottom: 31%;
    left: 14%;
    width: 77px;
    height: 77px;
    border-radius: 27px;
    background: #528d81;
    font-size: 2.6rem;
    animation-delay: 1.5s;
    transform: rotate(8deg);
}

#homepage .hero-leaf {
    position: absolute;
    z-index: 1;
    width: 44px;
    height: 70px;
    border-radius: 100% 0 100% 0;
    background: #78a97d;
    opacity: .9;
}

#homepage .leaf-left {
    bottom: 20%;
    left: 1%;
    transform: rotate(-36deg);
}

#homepage .leaf-right {
    right: 2%;
    bottom: 19%;
    width: 34px;
    height: 54px;
    background: #d29a55;
    transform: rotate(42deg);
}

#homepage .hero-spark {
    position: absolute;
    z-index: 2;
    color: #d79c32;
    font: 2rem "Baloo 2", sans-serif;
}

#homepage .spark-a { top: 23%; left: 31%; }
#homepage .spark-b { top: 46%; right: 1%; color: #e2775a; font-size: 2.6rem; }

#homepage .sanskrit-showcase {
    position: absolute;
    z-index: 4;
    right: 3%;
    bottom: 3%;
    width: min(67%, 355px);
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: .55rem;
}

#homepage .sanskrit-card {
    min-height: 98px;
    padding: .7rem .35rem;
    border: 1px solid rgba(255,255,255,.86);
    border-radius: 18px;
    background: rgba(255, 251, 239, .94);
    box-shadow: 0 8px 20px rgba(53, 76, 62, .12);
    text-align: center;
    transform: rotate(var(--word-tilt, 0deg));
    animation: cardPop .55s cubic-bezier(.2,.8,.3,1) both;
}

#homepage .sanskrit-card:nth-child(2) { --word-tilt: 2deg; animation-delay: .1s; }
#homepage .sanskrit-card:nth-child(3) { --word-tilt: -2deg; animation-delay: .2s; }
#homepage .sanskrit-word-demo {
    color: #b45143;
    font: 700 1.65rem/1.3 "Noto Sans Devanagari", serif;
}

#homepage .sanskrit-card .translation {
    margin-top: .15rem;
    color: #66766c;
    font-size: .76rem;
    font-weight: 900;
}

#homepage .features-section {
    position: relative;
    padding: 92px 2rem;
    background: #f8f4e9;
}

#homepage .features-section .container,
#homepage .about-section .container {
    max-width: 1240px;
}

#homepage .section-title {
    max-width: 730px;
    margin: 0 auto 2.5rem;
    color: #2c5055;
    font: 800 clamp(2.1rem, 4vw, 3.25rem)/1.08 "Baloo 2", sans-serif;
    letter-spacing: -.025em;
}

#homepage .features-grid {
    grid-template-columns: repeat(auto-fit, minmax(min(100%, 235px), 1fr));
    gap: 1.15rem;
}

#homepage .feature-card {
    border: 1px solid #e9dfc9;
    border-radius: 22px;
    background: #fffdf6;
    box-shadow: 0 5px 0 #eee4ce, 0 12px 26px rgba(66, 82, 69, .055);
    transition: transform .2s ease, box-shadow .2s ease, border-color .2s ease;
}

#homepage .feature-card:hover {
    border-color: #bfd3b8;
    box-shadow: 0 8px 0 #d9e4d2, 0 18px 30px rgba(66, 82, 69, .1);
    transform: translateY(-4px);
}

#homepage .feature-card h3 {
    color: #34555a;
    font-family: "Baloo 2", "Noto Sans Devanagari", sans-serif;
}

#homepage .feature-card p {
    color: #5c6d6c;
    line-height: 1.65;
}

#homepage .features-section-divider-label {
    color: #69756b;
    font-family: "Baloo 2", sans-serif;
    font-weight: 700;
}

#homepage .about-section {
    padding: 86px 2rem;
    background: #e6f0e3;
}

#homepage .about-section :where(h2, h3) {
    color: #2c5055;
    font-family: "Baloo 2", sans-serif;
}

#homepage .about-section p {
    color: #536a70;
    line-height: 1.7;
}

@keyframes logoWiggle {
    0%, 92%, 100% { transform: rotate(0); }
    95% { transform: rotate(-7deg); }
    98% { transform: rotate(6deg); }
}

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

@keyframes letterBob {
    0%, 100% { translate: 0 0; }
    50% { translate: 0 -9px; }
}

@keyframes cardPop {
    from { opacity: 0; transform: translateY(10px) scale(.96) rotate(var(--word-tilt, 0deg)); }
    to { opacity: 1; transform: translateY(0) scale(1) rotate(var(--word-tilt, 0deg)); }
}

@media (max-width: 1050px) {
    #homepage .nav-container { gap: .6rem; }
    #homepage .logo-text { max-width: 154px; font-size: 1.12rem; }
    #homepage .nav-links { gap: .25rem; }
    #homepage .nav-links > a { padding-inline: .48rem; font-size: .85rem; }
    #homepage .sp-nav-btn { min-width: 76px; padding-inline: .45rem; }
    #homepage .hero-container { grid-template-columns: minmax(0, .95fr) minmax(360px, 1fr); gap: 2rem; }
}

@media (max-width: 760px) {
    #homepage .navbar { position: sticky; top: 0; }
    #homepage .nav-container {
        display: block;
        padding: .5rem .75rem .58rem;
    }
    #homepage .logo { justify-content: center; margin: 0 auto .45rem; font-size: 1.1rem; }
    #homepage .logo-icon { width: 34px; height: 34px; }
    #homepage .logo-icon::before { font-size: 1.35rem; }
    #homepage .nav-links {
        width: 100%;
        display: flex;
        justify-content: center;
        gap: .38rem;
        overflow-x: auto;
        scrollbar-width: none;
    }
    #homepage .nav-links::-webkit-scrollbar { display: none; }
    #homepage .nav-links > a { display: none; }
    #homepage .nav-links > a.games-btn {
        display: inline-flex;
        min-height: 44px;
        padding: .45rem .85rem;
        font-size: .86rem;
    }
    #homepage .sp-nav-group { flex: 0 0 auto; gap: .35rem; }
    #homepage .sp-nav-btn {
        min-width: 82px;
        min-height: 44px;
        padding: .38rem .5rem;
        border-radius: 13px;
        font-size: .81rem;
    }
    #homepage .nav-more { flex: 0 0 auto; }
    #homepage .nav-more-btn { min-height: 44px; padding-inline: .65rem; }
    #homepage .nav-dropdown { position: fixed; top: 100px; left: .65rem; right: .65rem; width: auto; max-height: calc(100dvh - 115px); overflow-y: auto; }
    #homepage .hero-section { min-height: 0; padding: 56px 1.15rem 58px; }
    #homepage .hero-container { display: flex; flex-direction: column; gap: 1.1rem; }
    #homepage .hero-content { width: 100%; padding: 0; text-align: center; }
    #homepage .hero-kicker { margin-bottom: .9rem; font-size: .79rem; }
    #homepage .hero-title { font-size: clamp(3rem, 12vw, 4.35rem); line-height: .98; margin-bottom: .8rem; }
    #homepage .gradient-text { transform-origin: center; }
    #homepage .hero-description { margin: 0 auto 1.2rem; font-size: 1.05rem; line-height: 1.55; }
    #homepage .hero-buttons { justify-content: center; gap: .7rem; }
    #homepage .cta-primary, #homepage .cta-secondary { min-height: 54px; padding: .8rem 1rem; border-radius: 16px; font-size: .94rem; }
    #homepage .hero-note { margin-top: .9rem; font-size: .85rem; }
    #homepage .hero-visual { width: min(100%, 490px); min-height: 370px; margin: -.1rem auto 0; }
    #homepage .hero-landscape { height: 67%; }
    #homepage .hero-sun { width: 70px; height: 70px; top: 8%; right: 14%; }
    #homepage .hero-letter { width: 72px; height: 72px; border-radius: 24px; font-size: 2.45rem; }
    #homepage .letter-ma { width: 64px; height: 64px; font-size: 2.2rem; }
    #homepage .sanskrit-showcase { width: min(76%, 330px); right: 2%; bottom: 1%; gap: .4rem; }
    #homepage .sanskrit-card { min-height: 78px; padding: .45rem .2rem; border-radius: 14px; }
    #homepage .sanskrit-word-demo { font-size: 1.3rem; }
    #homepage .sanskrit-card .translation { font-size: .69rem; }
    #homepage .features-section { padding: 62px 1rem; }
    #homepage .features-section .container { padding: 0; }
    #homepage .section-title { margin-bottom: 1.75rem; }
    #homepage .features-grid { gap: .9rem; }
    #homepage .feature-card { padding: 1.15rem; border-radius: 18px; }
}

@media (max-width: 390px) {
    #homepage .nav-container { padding-inline: .45rem; }
    #homepage .nav-links { gap: .24rem; }
    #homepage .nav-links > a.games-btn { padding-inline: .62rem; font-size: .78rem; }
    #homepage .sp-nav-btn { min-width: 70px; gap: .25rem; padding-inline: .36rem; font-size: .76rem; }
    #homepage .sp-nav-btn svg { width: 15px; height: 15px; }
    #homepage .nav-more-btn { padding-inline: .52rem; font-size: .82rem; }
    #homepage .hero-buttons { flex-direction: column; align-items: stretch; }
    #homepage .cta-primary, #homepage .cta-secondary { width: 100%; }
    #homepage .hero-visual { min-height: 325px; }
}

@media (prefers-reduced-motion: reduce) {
    #homepage *,
    #homepage *::before,
    #homepage *::after {
        scroll-behavior: auto !important;
        animation-duration: .01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: .01ms !important;
    }
}
