/* Home scene – "THEKKADY" rising behind the island. 2026-11
   All positions are % of background.jpg (3318 × 910), so it scales with the scene. */
@import url("https://fonts.googleapis.com/css2?family=Anek+Malayalam:wght@700;800&display=swap");

/* clip: the title can never show below the far shoreline (y 466 of 910) */
#background .tdk-clip {
    position: absolute;
    left: 0;
    top: 0;
    width: 100%;
    height: 51.21%;
    overflow: hidden;
    pointer-events: none;
    container-type: size;
    /* warm halo + soft depth, applied around the gold-filled letters */
    filter: drop-shadow(0 0 22px rgba(255, 238, 205, .38)) drop-shadow(0 5px 16px rgba(8, 38, 58, .28));
}
#background .tdk-title {
    position: absolute;
    left: 51.6%;                        /* centre of the island */
    bottom: -3.3%;                      /* letter bases rest on the far shoreline, just above the water */
    margin: 0;
    transform: translate(-50%, 0);
    font-family: "Anek Malayalam", "Noto Sans Malayalam", sans-serif;
    font-weight: 800;
    font-size: 44cqh;
    line-height: .86;
    letter-spacing: 0;               /* Malayalam conjuncts must not be spaced apart */
    padding-left: 0;                /* balances the trailing letter-space */
    white-space: nowrap;
    /* ivory-to-gold fill with a light band that sweeps across once */
    color: #fff6e4;
    background-image:
        linear-gradient(105deg, rgba(255, 255, 255, 0) 42%, rgba(255, 255, 255, .95) 50%, rgba(255, 255, 255, 0) 58%),
        linear-gradient(180deg, #fffdf7 0%, #fbefd5 48%, #e7cf99 100%);
    background-size: 260% 100%, 100% 100%;
    background-position: 130% 0, 0 0;
    background-repeat: no-repeat;
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
    opacity: 0;
    user-select: none;
}
#background .tdk-title.is-rising {
    animation:
        tdk-rise 3.9s cubic-bezier(.16, .84, .24, 1) .9s both,
        tdk-sheen 2.4s ease-in-out 4.6s both;
}
@keyframes tdk-sheen {
    from { background-position: 130% 0, 0 0; }
    to   { background-position: -30% 0, 0 0; }
}
@keyframes tdk-rise {
    0%   { transform: translate(-50%, 120%); opacity: 0;  filter: blur(8px); }
    35%  { opacity: .55; }
    100% { transform: translate(-50%, 0);    opacity: 1;  filter: blur(0);   }
}

/* exact copy of all the land above the horizon (left island, middle island, far shore),
   laid over the title so every letter sits behind the landscape */
#background .tdk-cutout {
    position: absolute;
    left: 0;
    top: 21.978%;                       /* y 200 of 910 */
    width: 100%;
    height: 30.110%;                    /* 274 of 910 */
    max-width: none;
    pointer-events: none;
}

@media (prefers-reduced-motion: reduce) {
    #background .tdk-title.is-rising { animation: none; opacity: 1; }
}
