/* Home landing — brand banner + book grids + YouTube */

.home-page {
    padding-top: 0;
}

.site-top {
    position: sticky;
    top: 0;
    z-index: 40;
    display: flex;
    align-items: center;
    justify-content: flex-start;
    gap: 1rem;
    padding: 0.9rem 5.5rem 0.9rem 1.6rem;
    background: color-mix(in srgb, var(--bg-panel-solid) 88%, transparent);
    border-bottom: 1px solid rgba(123, 163, 201, 0.28);
    backdrop-filter: blur(12px);
}

.brand-mark {
    display: inline-flex;
    align-items: center;
    gap: 0.8rem;
    text-decoration: none;
    color: var(--text);
    font-family: var(--font-ui);
    font-size: 1.45rem;
    font-weight: 700;
}

.brand-mark .brand-logo {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    /* Tiny landscape mark matching the logo artwork (~1.6:1) */
    width: 6.3rem;
    height: 4rem;
    flex-shrink: 0;
    overflow: hidden;
    border-radius: 6px;
    border: 1px solid rgba(123, 163, 201, 0.35);
    background: #444ccc;
}

.brand-mark .brand-logo img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: center center;
    border: 0;
    border-radius: 0;
    transform: none;
}

.brand-mark .tamil,
.brand-mark em.tamil {
    font-style: normal;
    font-family: var(--font-tamil);
    color: var(--tone-b-deep);
}

.site-hero {
    position: relative;
    width: 100%;
    min-height: min(52vh, 420px);
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    padding: 4.5rem 2rem;
    color: var(--band-text);
    background-color: var(--band-base);
    background-image:
        var(--band-overlay),
        url(./Home/bannerbackgroundhomepage.jpg);
    background-size: cover;
    background-position: center;
    background-blend-mode: normal, soft-light;
    animation: riseIn 480ms ease both;
    transition: background-color 220ms ease, color 220ms ease;
}

.hero-inner {
    width: min(100%, 72rem);
}

.site-hero .site-title {
    color: var(--band-text);
    margin-bottom: 1rem;
    text-shadow: 0 2px 18px rgba(0, 0, 0, 0.22);
}

.site-hero .site-title .tamil {
    background: none;
    -webkit-background-clip: unset;
    background-clip: unset;
    color: var(--band-accent);
}

.site-hero .site-tagline {
    color: var(--band-muted);
    max-width: 54rem;
    margin: 0 auto;
    font-family: var(--font-tamil);
    font-size: 1.85rem;
    line-height: 1.7;
}

.site-hero::after {
    content: "";
    position: absolute;
    left: 50%;
    bottom: 0;
    width: min(14rem, 45%);
    height: 4px;
    transform: translate(-50%, 50%);
    border-radius: 999px;
    background: linear-gradient(90deg, var(--tone-a), var(--tone-b));
}

.how-section {
    width: min(100%, 96rem);
    margin: 2.8rem auto 0.5rem;
    padding: 0 2.4rem;
    text-align: center;
    animation: riseIn 520ms ease both;
}

.how-section h2 {
    font-family: var(--font-tamil);
    font-size: 2.2rem;
    margin-bottom: 0.6rem;
    color: var(--tone-a-deep);
}

.how-lead {
    max-width: 52rem;
    margin: 0 auto 1.6rem;
    color: var(--text-muted);
    font-size: 1.55rem;
    line-height: 1.6;
}

.how-steps {
    list-style: none;
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 1rem;
    max-width: 64rem;
    margin: 0 auto;
}

.how-steps li {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.6rem;
    padding: 1.2rem 1rem;
    border-radius: 14px;
    background: var(--bg-panel);
    border: 1px solid rgba(123, 163, 201, 0.3);
    box-shadow: var(--shadow);
    font-family: var(--font-tamil);
    font-size: 1.55rem;
    color: var(--text);
}

.how-steps strong {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 2.8rem;
    height: 2.8rem;
    border-radius: 999px;
    font-family: var(--font-ui);
    font-size: 1.4rem;
    color: #fff;
    background: linear-gradient(135deg, var(--tone-a-deep), var(--tone-b-deep));
}

.home-tools {
    width: min(100%, 96rem);
    margin: 0.6rem auto 0;
    padding: 0 2.4rem;
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.resume-strip {
    display: flex;
    flex-wrap: wrap;
    align-items: baseline;
    justify-content: center;
    gap: 0.6rem 1.2rem;
    text-align: center;
}

.resume-label {
    margin: 0;
    font-size: 1.35rem;
    color: var(--text-muted);
    font-weight: 600;
}

.resume-link {
    font-family: var(--font-tamil);
    font-size: 1.7rem;
    font-weight: 700;
    color: var(--tone-a-deep);
    text-decoration: none;
    border-bottom: 2px solid rgba(123, 163, 201, 0.45);
}

.resume-link:hover {
    border-bottom-color: var(--tone-b-deep);
}

.book-search-label {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
    max-width: 36rem;
    margin: 0 auto;
    width: 100%;
    font-size: 1.35rem;
    font-weight: 600;
    color: var(--text-muted);
}

.book-search-label input {
    font: inherit;
    font-weight: 500;
    color: var(--text);
    background: var(--input-bg, var(--bg-panel));
    border: 1px solid rgba(123, 163, 201, 0.45);
    border-radius: 12px;
    padding: 1rem 1.2rem;
}

.book-search-empty {
    text-align: center;
    margin: 0;
}

.book-link[hidden],
.books-section[hidden] {
    display: none !important;
}

.books-wrap {
    width: min(100%, 96rem);
    margin: 0 auto;
    padding: 1.6rem 2.4rem 3rem;
}

.books-section {
    margin-bottom: 2.4rem;
    padding: 2.2rem;
    background: var(--bg-panel);
    border: 1px solid rgba(123, 163, 201, 0.3);
    border-radius: calc(var(--radius) + 4px);
    box-shadow: var(--shadow);
    backdrop-filter: blur(10px);
    animation: riseIn 560ms ease both;
}

.books-nt {
    animation-delay: 70ms;
    border-color: rgba(212, 137, 124, 0.35);
}

.books-section h2 {
    margin-bottom: 1.6rem;
    font-family: var(--font-tamil);
    font-size: 2.4rem;
    color: var(--tone-a-deep);
    border-bottom: 1px solid rgba(123, 163, 201, 0.35);
    padding-bottom: 1rem;
}

.books-nt h2 {
    color: var(--tone-b-deep);
    border-bottom-color: rgba(212, 137, 124, 0.4);
}

.books-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(15.5rem, 1fr));
    gap: 1rem;
}

.book-link {
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 5.2rem;
    min-width: 0;
    padding: 1.1rem 1rem;
    text-align: center;
    text-decoration: none;
    color: var(--text);
    font-family: var(--font-tamil);
    font-size: 1.65rem;
    font-weight: 600;
    line-height: 1.35;
    overflow-wrap: anywhere;
    word-break: break-word;
    background: rgba(123, 163, 201, 0.16);
    border: 1px solid rgba(123, 163, 201, 0.4);
    border-radius: 14px;
    transition: transform 160ms ease, background 160ms ease, box-shadow 160ms ease, color 160ms ease, border-color 160ms ease;
}

/* Long titles (e.g. Thessalonians) — slightly smaller so they fit without overlapping */
.book-link--long {
    font-size: 1.35rem;
    line-height: 1.3;
    padding: 1rem 0.8rem;
}

.books-nt .book-link {
    background: rgba(212, 137, 124, 0.14);
    border-color: rgba(212, 137, 124, 0.42);
}

/* Same strong hover treatment for OT + NT — readable white on deep tones */
.books-ot .book-link:hover,
.books-ot .book-link:focus-visible {
    transform: translateY(-2px);
    color: #fff;
    background: linear-gradient(135deg, #4f7fad 0%, #2f5f8f 100%);
    border-color: #2f5f8f;
    box-shadow: 0 12px 26px rgba(47, 95, 143, 0.35);
}

.books-nt .book-link:hover,
.books-nt .book-link:focus-visible {
    transform: translateY(-2px);
    color: #fff;
    background: linear-gradient(135deg, #c57a68 0%, #9e5344 100%);
    border-color: #9e5344;
    box-shadow: 0 12px 26px rgba(158, 83, 68, 0.35);
}

.site-footer {
    text-align: center;
    padding: 0 0 2.5rem;
}

.footer-media {
    width: 100%;
    margin: 0 auto 1.4rem;
    padding: 3rem 2.4rem 2.6rem;
    color: var(--band-text);
    background-color: var(--band-base);
    background-image:
        var(--band-overlay),
        url(./backgroundimage.jpg);
    background-size: cover;
    background-position: center;
    background-blend-mode: normal, soft-light;
    transition: background-color 220ms ease, color 220ms ease;
}

.footer-heading {
    font-family: var(--font-tamil);
    font-size: 2.4rem;
    color: var(--band-accent);
    margin-bottom: 0.6rem;
}

.footer-sub {
    color: var(--band-muted);
    font-size: 1.5rem;
    margin: 0.9rem auto 1.4rem;
    max-width: 40rem;
}

.footer-contact {
    width: min(100%, 64rem);
    margin: 0 auto 1.6rem;
    padding: 1.4rem 1.6rem;
    text-align: left;
    background: rgba(255, 255, 255, 0.1);
    border: 1px solid rgba(255, 255, 255, 0.22);
    border-radius: 14px;
}

.contact-line {
    margin: 0.45rem 0;
    font-size: 1.45rem;
    line-height: 1.55;
    color: var(--band-muted);
    overflow-wrap: anywhere;
}

.contact-line span {
    font-weight: 700;
    color: var(--band-accent);
    margin-right: 0.4rem;
}

.contact-line a {
    color: var(--band-text);
    text-decoration: underline;
    text-underline-offset: 2px;
}

.contact-line a:hover {
    color: var(--band-accent);
}

.footer-actions {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    align-items: center;
    gap: 1rem;
    margin: 0 0 0.2rem;
}

.social-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 4.4rem;
    height: 4.4rem;
    border-radius: 50%;
    color: #fff;
    text-decoration: none;
    box-shadow: 0 8px 18px rgba(0, 0, 0, 0.22);
    transition: transform 160ms ease, box-shadow 160ms ease;
}

.social-icon svg {
    width: 2.2rem;
    height: 2.2rem;
    display: block;
}

.social-icon:hover {
    transform: translateY(-2px);
    box-shadow: 0 12px 22px rgba(0, 0, 0, 0.28);
}

.social-icon--yt {
    background: #c4302b;
}

.social-icon--fb {
    background: #1877f2;
}

.social-icon--mail {
    background: #3f6f8c;
}

.video-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 1.2rem;
    margin: 1.8rem auto 0;
    width: min(100%, 96rem);
}

.video-frame {
    position: relative;
    width: 100%;
    padding-bottom: 56.25%;
    border-radius: 12px;
    overflow: hidden;
    background: rgba(0, 0, 0, 0.25);
    border: 1px solid rgba(255, 255, 255, 0.2);
    box-shadow: 0 12px 28px rgba(0, 0, 0, 0.28);
}

.video-frame iframe {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    border: 0;
}

.footer-note {
    margin-top: 0.4rem;
}

.site-footer .footer-note a {
    color: var(--text-muted);
    font-size: 1.35rem;
    text-decoration: underline;
}

.site-footer .footer-note a:hover {
    color: var(--tone-b-deep);
}

html[data-theme="dark"] .site-top {
    background: rgba(18, 32, 54, 0.92);
    border-bottom-color: rgba(111, 155, 196, 0.25);
}

html[data-theme="light"] .site-top {
    background: color-mix(in srgb, #fffdfb 90%, transparent);
    border-bottom-color: rgba(123, 163, 201, 0.28);
}

@media screen and (max-width: 900px) {
    .video-grid,
    .how-steps {
        grid-template-columns: 1fr;
    }
}

@media screen and (max-width: 768px) {
    .site-top {
        padding: 0.8rem 4.4rem 0.8rem 1.2rem;
    }

    .brand-mark span:not(.brand-logo) {
        font-size: 1.3rem;
    }

    .brand-mark .brand-logo {
        width: 5.5rem;
        height: 3.5rem;
    }

    .site-hero {
        min-height: 34vh;
        padding: 2.8rem 1.4rem;
    }

    .site-hero .site-tagline {
        font-size: 1.55rem;
    }

    .how-section,
    .home-tools,
    .books-wrap {
        padding-left: 1.2rem;
        padding-right: 1.2rem;
    }

    .books-section {
        padding: 1.4rem;
    }

    .books-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
        gap: 0.8rem;
    }

    .book-link {
        min-height: 4.8rem;
        font-size: 1.4rem;
        padding: 0.9rem 0.6rem;
    }

    .book-link--long {
        font-size: 1.2rem;
    }

    .footer-media {
        padding: 2rem 1.2rem 2.2rem;
    }

    .footer-contact {
        text-align: left;
        font-size: 1.3rem;
    }

    .contact-line {
        font-size: 1.3rem;
    }
}

@media screen and (max-width: 380px) {
    .books-grid {
        grid-template-columns: 1fr;
    }
}
