:root {
    --ipti-primary: #0f4c81;
    --ipti-primary-dark: #0b3356;
    --ipti-accent: #f08a24;
    --ipti-accent-soft: #ffd8b0;
    --ipti-bg: #f4f8fc;
    --ipti-surface: #ffffff;
    --ipti-ink: #122033;
    --ipti-muted: #5f6f83;
    --ipti-border: #d7e3f1;
    --ipti-shadow: 0 18px 45px rgba(12, 51, 86, 0.14);
}

* {
    box-sizing: border-box;
}

body {
    margin: 0;
    font-family: "Plus Jakarta Sans", "Segoe UI", sans-serif;
    color: var(--ipti-ink);
    background:
        radial-gradient(circle at 5% 0%, #d8e9f8 0%, rgba(216, 233, 248, 0) 45%),
        radial-gradient(circle at 100% 10%, #fff2e3 0%, rgba(255, 242, 227, 0) 35%),
        var(--ipti-bg);
    line-height: 1.6;
}

.site-header {
    padding: 1.25rem 5vw 4rem;
    background-image:
        linear-gradient(125deg, rgba(9, 49, 81, 0.52), rgba(15, 76, 129, 0.40)),
        var(--ipti-hero-bg, linear-gradient(125deg, rgba(9, 49, 81, 0.96), rgba(15, 76, 129, 0.93)));
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
    color: #ffffff;
    position: relative;
    overflow: hidden;
}

.site-header::before,
.site-header::after {
    content: "";
    position: absolute;
    border-radius: 999px;
    filter: blur(2px);
}

.site-header::before {
    width: 460px;
    height: 460px;
    top: -230px;
    right: -120px;
    background: rgba(240, 138, 36, 0.35);
}

.site-header::after {
    width: 380px;
    height: 380px;
    left: -90px;
    bottom: -240px;
    background: rgba(255, 255, 255, 0.12);
}

.topbar,
.hero,
main,
.site-footer {
    position: relative;
    z-index: 2;
}

.topbar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
}

.brand-wrap {
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.brand-logo {
    width: 72px;
    height: auto;
    display: block;
    border-radius: 8px;
    background: rgba(255, 255, 255, 0.12);
    padding: 0.2rem;
}

.brand-mark {
    background: var(--ipti-accent);
    color: #3f2108;
    font-family: "Outfit", "Plus Jakarta Sans", sans-serif;
    font-weight: 800;
    letter-spacing: 0.08em;
    border-radius: 10px;
    padding: 0.45rem 0.7rem;
}

.brand-text strong {
    display: block;
    font-family: "Outfit", "Plus Jakarta Sans", sans-serif;
    font-size: 1.02rem;
    letter-spacing: 0.01em;
}

.brand-text span {
    color: #d9e9f6;
    font-size: 0.85rem;
}

.menu-toggle {
    display: none;
    border: 1px solid rgba(255, 255, 255, 0.35);
    border-radius: 999px;
    background: transparent;
    color: #fff;
    padding: 0.45rem 0.95rem;
    font-weight: 600;
}

.main-nav {
    display: flex;
    align-items: center;
    gap: 1.25rem;
}

.main-nav a {
    color: #f5f9fd;
    text-decoration: none;
    font-weight: 600;
    font-size: 0.96rem;
    opacity: 0.95;
}

.main-nav a:hover {
    opacity: 1;
    color: #fff4d8;
}

.hero {
    display: grid;
    grid-template-columns: 1.2fr 0.8fr;
    gap: 1.5rem;
    margin-top: 2.3rem;
}

.banner-carousel-wrap {
    margin-top: 1.1rem;
}

.banner-carousel {
    position: relative;
    display: grid;
    grid-template-columns: 1fr;
    align-items: center;
}

.banner-track {
    display: grid;
    grid-auto-flow: column;
    grid-auto-columns: 100%;
    overflow: hidden;
    border-radius: 18px;
    border: 1px solid rgba(255, 255, 255, 0.18);
    box-shadow: 0 18px 40px rgba(0, 0, 0, 0.22);
    background: rgba(255, 255, 255, 0.08);
}

.banner-slide {
    position: relative;
    display: block;
    min-height: 170px;
    color: #fff;
    text-decoration: none;
}

.banner-slide img {
    width: 100%;
    height: clamp(180px, 22vw, 280px);
    object-fit: cover;
    display: block;
    filter: saturate(1.05) contrast(1.02);
}

.banner-overlay {
    position: absolute;
    inset: 0;
    background:
        linear-gradient(110deg, rgba(9, 49, 81, 0.82) 0%, rgba(9, 49, 81, 0.10) 58%, rgba(9, 49, 81, 0.70) 100%),
        radial-gradient(circle at 15% 35%, rgba(240, 138, 36, 0.22), transparent 52%);
    display: flex;
    flex-direction: column;
    justify-content: flex-end;
    padding: 1.1rem 1.1rem;
    gap: 0.25rem;
}

.banner-title {
    font-family: "Outfit", "Plus Jakarta Sans", sans-serif;
    font-weight: 900;
    font-size: clamp(1.02rem, 2vw, 1.35rem);
    letter-spacing: 0.01em;
    text-shadow: 0 10px 22px rgba(0, 0, 0, 0.25);
}

.banner-nav {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    width: 44px;
    height: 44px;
    border-radius: 999px;
    border: 1px solid rgba(255, 255, 255, 0.28);
    background: rgba(7, 31, 51, 0.40);
    -webkit-backdrop-filter: blur(8px);
    backdrop-filter: blur(8px);
    color: #fff;
    font-weight: 900;
    font-size: 18px;
    line-height: 1;
    cursor: pointer;
    display: grid;
    place-items: center;
    z-index: 3;
    box-shadow: 0 14px 30px rgba(0, 0, 0, 0.28);
}

.banner-nav.prev { left: 10px; }
.banner-nav.next { right: 10px; }

.banner-nav:hover {
    background: rgba(255, 255, 255, 0.16);
    border-color: rgba(255, 255, 255, 0.34);
}

.banner-dots {
    display: flex;
    justify-content: center;
    gap: 0.45rem;
    margin-top: 0.7rem;
}

.banner-dot {
    width: 9px;
    height: 9px;
    border-radius: 999px;
    border: 1px solid rgba(255, 255, 255, 0.35);
    background: rgba(255, 255, 255, 0.12);
    cursor: pointer;
}

.banner-dot.active {
    width: 22px;
    background: rgba(240, 138, 36, 0.92);
    border-color: rgba(240, 138, 36, 0.92);
}

.eyebrow {
    text-transform: uppercase;
    letter-spacing: 0.14em;
    font-size: 0.78rem;
    font-weight: 700;
    color: #ffdcb9;
}

.hero h1 {
    margin: 0.25rem 0 0;
    font-size: clamp(2rem, 4vw, 3rem);
    font-family: "Outfit", "Plus Jakarta Sans", sans-serif;
    line-height: 1.2;
}

.lead {
    margin-top: 1rem;
    max-width: 58ch;
    color: #dcecf8;
}

.hero-search {
    display: flex;
    gap: 0.6rem;
    margin-top: 1.45rem;
    padding: 0.5rem;
    background: rgba(255, 255, 255, 0.14);
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: 14px;
    -webkit-backdrop-filter: blur(6px);
    backdrop-filter: blur(6px);
}

.hero-search input {
    width: 100%;
    border: 0;
    border-radius: 10px;
    padding: 0.8rem 0.95rem;
    font-size: 0.96rem;
    font-family: inherit;
}

.hero-search button {
    border: 0;
    border-radius: 10px;
    padding: 0.82rem 1rem;
    font-weight: 700;
    background: var(--ipti-accent);
    color: #3f2108;
    cursor: pointer;
    white-space: nowrap;
}

.quick-actions {
    margin-top: 1rem;
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 0.6rem;
}

.quick-actions a {
    text-decoration: none;
    color: #f4f9ff;
    background: rgba(6, 33, 55, 0.42);
    border: 1px solid rgba(255, 255, 255, 0.18);
    border-radius: 12px;
    padding: 0.55rem 0.65rem;
    text-align: center;
    font-size: 0.85rem;
    font-weight: 600;
}

.quick-actions a:hover {
    background: rgba(255, 255, 255, 0.2);
}

.hero-panel {
    background: rgba(255, 255, 255, 0.14);
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: 18px;
    padding: 1.35rem;
    box-shadow: var(--ipti-shadow);
}

.hero-panel h3 {
    margin: 0;
    font-family: "Outfit", "Plus Jakarta Sans", sans-serif;
    font-size: 1.3rem;
}

.hero-panel ul {
    margin: 1rem 0 0;
    padding-left: 1.1rem;
}

.hero-panel li {
    margin-bottom: 0.45rem;
    color: #ebf5fd;
}

.hero-enter {
    display: inline-block;
    margin-top: 0.85rem;
    text-decoration: none;
    background: #ffffff;
    color: var(--ipti-primary-dark);
    border-radius: 999px;
    padding: 0.6rem 1rem;
    font-weight: 700;
}

.section {
    padding: 3.5rem 5vw;
}

.section-alt {
    background: #edf4fb;
    border-top: 1px solid var(--ipti-border);
    border-bottom: 1px solid var(--ipti-border);
}

.section-head h2 {
    margin: 0;
    font-size: clamp(1.45rem, 2.8vw, 2rem);
    font-family: "Outfit", "Plus Jakarta Sans", sans-serif;
    color: var(--ipti-primary-dark);
}

.section-head p {
    margin: 0.5rem 0 0;
    color: var(--ipti-muted);
}

.card-grid {
    margin-top: 1.25rem;
    display: grid;
    gap: 0.95rem;
}

.card-grid-4 {
    grid-template-columns: repeat(4, minmax(0, 1fr));
}

.card-grid-3 {
    grid-template-columns: repeat(3, minmax(0, 1fr));
}

.book-card,
.news-card,
.list-card {
    background: var(--ipti-surface);
    border: 1px solid var(--ipti-border);
    border-radius: 16px;
    box-shadow: 0 10px 28px rgba(16, 57, 92, 0.08);
    text-decoration: none;
    color: inherit;
}

.book-carousel {
    position: relative;
    margin-top: 1.25rem;
}

.book-track {
    position: relative;
    z-index: 1;
    display: flex;
    gap: 0.95rem;
    overflow-x: auto;
    padding: 0.35rem 0.15rem 0.55rem;
    scroll-snap-type: x mandatory;
    scroll-behavior: smooth;
}

.book-track::-webkit-scrollbar { height: 10px; }
.book-track::-webkit-scrollbar-thumb { background: rgba(15, 76, 129, 0.25); border-radius: 999px; }
.book-track::-webkit-scrollbar-track { background: transparent; }

.book-carousel[data-motion="marquee"] .book-track {
    scroll-snap-type: none;
}

.book-shelf-card {
    scroll-snap-align: start;
    flex: 0 0 260px;
    display: grid;
    grid-template-columns: 92px 1fr;
    gap: 0.9rem;
    align-items: center;
    padding: 0.9rem;
    border-radius: 16px;
    background: var(--ipti-surface);
    border: 1px solid var(--ipti-border);
    box-shadow: 0 10px 28px rgba(16, 57, 92, 0.08);
    text-decoration: none;
    color: inherit;
    min-height: 128px;
}

.book-shelf-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 14px 34px rgba(16, 57, 92, 0.12);
}

.book-shelf-cover {
    width: 92px;
    height: 132px;
    border-radius: 12px;
    overflow: hidden;
    background: #f2f8fe;
    border: 1px solid rgba(15, 76, 129, 0.12);
}

.book-shelf-cover img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

.book-shelf-placeholder {
    width: 100%;
    height: 100%;
    display: grid;
    place-items: center;
    background: linear-gradient(135deg, rgba(240, 138, 36, 0.22), rgba(15, 76, 129, 0.12));
    color: var(--ipti-primary-dark);
    font-weight: 900;
    font-family: "Outfit", "Plus Jakarta Sans", sans-serif;
    letter-spacing: 0.08em;
}

.book-shelf-meta h3 {
    margin: 0;
    font-size: 1.02rem;
    line-height: 1.25;
}

.book-shelf-sub {
    margin-top: 0.45rem;
    color: var(--ipti-muted);
    font-size: 0.9rem;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.book-nav {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    z-index: 5;
    width: 44px;
    height: 44px;
    border-radius: 999px;
    border: 1px solid rgba(15, 76, 129, 0.25);
    background: rgba(255, 255, 255, 0.92);
    color: var(--ipti-primary-dark);
    font-weight: 900;
    cursor: pointer;
    display: grid;
    place-items: center;
    box-shadow: 0 10px 24px rgba(12, 51, 86, 0.16);
    pointer-events: auto;
}

.book-nav.prev { left: -10px; }
.book-nav.next { right: -10px; }

.book-nav:hover { background: #fff; transform: translateY(-50%) scale(1.03); }

.book-carousel[data-size="compact"] .book-nav { display: none; }

.book-card {
    padding: 1rem;
}

.book-tag {
    display: inline-block;
    background: var(--ipti-accent-soft);
    color: #8d4f16;
    border-radius: 999px;
    font-size: 0.75rem;
    padding: 0.2rem 0.6rem;
    font-weight: 700;
}

.book-card h3,
.news-card h3,
.list-card h3 {
    margin: 0.8rem 0 0.4rem;
    font-size: 1.05rem;
    line-height: 1.35;
}

.book-card a,
.list-card span {
    color: var(--ipti-primary);
    font-weight: 600;
    text-decoration: none;
    font-size: 0.9rem;
}

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

.promo-grid {
    margin-top: 1.25rem;
    display: grid;
    grid-template-columns: 1fr;
    gap: 1.25rem;
}

.promo-card {
    display: grid;
    grid-template-columns: 1.2fr 0.8fr;
    gap: 1.25rem;
    align-items: center;
    padding: 1.45rem 1.55rem;
    border-radius: 22px;
    background: linear-gradient(135deg, rgba(15, 76, 129, 0.08), rgba(240, 138, 36, 0.08));
    border: 1px solid rgba(15, 76, 129, 0.12);
    box-shadow: 0 18px 40px rgba(12, 51, 86, 0.10);
    overflow: hidden;
}

.promo-eyebrow {
    margin: 0;
    font-size: 0.78rem;
    font-weight: 900;
    letter-spacing: 0.14em;
    color: rgba(15, 76, 129, 0.78);
}

.promo-card h2 {
    margin: 0.4rem 0 0;
    font-family: "Outfit", "Plus Jakarta Sans", sans-serif;
    font-size: clamp(1.5rem, 3vw, 2.2rem);
    line-height: 1.1;
}

.promo-desc {
    margin: 0.75rem 0 0;
    color: var(--ipti-muted);
    max-width: 62ch;
}

.promo-actions {
    display: flex;
    gap: 0.7rem;
    flex-wrap: wrap;
    margin-top: 1.1rem;
}

.promo-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0.7rem 1rem;
    border-radius: 999px;
    border: 1px solid rgba(15, 76, 129, 0.18);
    background: rgba(255, 255, 255, 0.82);
    color: var(--ipti-primary-dark);
    font-weight: 800;
    text-decoration: none;
    min-width: 132px;
}

.promo-btn.primary {
    background: var(--ipti-primary);
    border-color: var(--ipti-primary);
    color: #fff;
}

.promo-btn:hover {
    filter: brightness(1.02);
    transform: translateY(-1px);
}

.promo-right {
    display: flex;
    justify-content: flex-end;
}

.promo-chip {
    width: min(360px, 100%);
    border-radius: 18px;
    background: rgba(255, 255, 255, 0.78);
    border: 1px solid rgba(15, 76, 129, 0.12);
    padding: 1.15rem 1.2rem;
    box-shadow: 0 14px 32px rgba(12, 51, 86, 0.10);
}

.promo-chip-title {
    display: block;
    font-weight: 900;
    color: var(--ipti-primary-dark);
    font-family: "Outfit", "Plus Jakarta Sans", sans-serif;
    letter-spacing: 0.01em;
}

.promo-chip-sub {
    display: block;
    margin-top: 0.25rem;
    color: var(--ipti-muted);
    font-weight: 700;
}

.align-start {
    align-items: start;
}

.list-stack {
    display: grid;
    gap: 0.8rem;
    margin-top: 1rem;
}

.list-card {
    padding: 0.95rem 1rem;
}

.news-card {
    padding: 1rem;
}

.news-card span {
    color: var(--ipti-primary);
    font-weight: 700;
    font-size: 0.84rem;
}

.news-card p {
    margin: 0;
    color: var(--ipti-muted);
}

.bullet-list {
    margin: 0;
    padding-left: 1.2rem;
}

.bullet-list li {
    margin-bottom: 0.45rem;
}

.hours-table {
    border-collapse: collapse;
    width: 100%;
    background: #fff;
    border-radius: 12px;
    overflow: hidden;
    border: 1px solid var(--ipti-border);
}

.hours-table th,
.hours-table td {
    border-bottom: 1px solid var(--ipti-border);
    padding: 0.78rem 0.85rem;
    text-align: left;
}

.hours-table th {
    width: 50%;
    background: #f2f8fe;
    color: var(--ipti-primary-dark);
}

.section-map {
    padding-top: 2.3rem;
}

.map-wrap {
    margin-top: 1rem;
    border: 1px solid var(--ipti-border);
    border-radius: 16px;
    overflow: hidden;
    box-shadow: 0 10px 35px rgba(12, 51, 86, 0.14);
}

.map-wrap iframe {
    width: 100%;
    min-height: 360px;
    border: 0;
}

.site-footer {
    background: var(--ipti-primary-dark);
    color: #dbeaf8;
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1rem 5vw;
    flex-wrap: wrap;
    gap: 0.6rem;
}

.site-footer p {
    margin: 0;
    font-weight: 600;
}

.site-footer a {
    color: #fff6ea;
    text-decoration: none;
    border: 1px solid rgba(255, 255, 255, 0.32);
    padding: 0.45rem 0.85rem;
    border-radius: 999px;
    font-weight: 700;
}

.github-link {
    margin-left: auto;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border: 0;
    padding: 0;
    border-radius: 0;
    background: transparent;
}

.github-link svg {
    display: block;
}

.footer-links {
    display: flex;
    gap: 0.45rem;
    flex-wrap: wrap;
}

.reveal {
    opacity: 0;
    transform: translateY(18px);
    transition: opacity 0.6s ease, transform 0.6s ease;
}

.reveal.in {
    opacity: 1;
    transform: translateY(0);
}

.reveal-delay-1 {
    transition-delay: 0.18s;
}

@media (max-width: 1100px) {
    .hero {
        grid-template-columns: 1fr;
    }

    .card-grid-4 {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .card-grid-3 {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}

@media (max-width: 760px) {
    .promo-card {
        grid-template-columns: 1fr;
        padding: 1.15rem 1.05rem;
    }
    .promo-right {
        justify-content: flex-start;
    }
    .book-shelf-card {
        flex-basis: 240px;
        grid-template-columns: 84px 1fr;
    }
    .book-shelf-cover { width: 84px; height: 122px; }
    .book-nav { display: none; }
    .menu-toggle {
        display: inline-block;
    }

    .main-nav {
        position: absolute;
        top: calc(100% + 0.6rem);
        right: 0;
        background: rgba(7, 31, 51, 0.96);
        border: 1px solid rgba(255, 255, 255, 0.18);
        border-radius: 12px;
        padding: 0.8rem;
        display: none;
        flex-direction: column;
        align-items: flex-start;
        min-width: 180px;
    }

    .main-nav.open {
        display: flex;
    }

    .hero-search {
        flex-direction: column;
    }

    .banner-slide img {
        height: clamp(160px, 40vw, 220px);
    }

    .banner-title {
        font-size: 1.02rem;
    }

    .banner-nav {
        width: 38px;
        height: 38px;
        font-size: 16px;
    }

    .banner-nav.prev { left: 8px; }
    .banner-nav.next { right: 8px; }

    .quick-actions {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .split-grid,
    .card-grid-3,
    .card-grid-4 {
        grid-template-columns: 1fr;
    }

    .site-footer {
        flex-direction: column;
        align-items: flex-start;
    }
}
