/* Public pages. Colours come from theme.css. */

/* Rising bubbles behind everything */
.bubbles { position: fixed; inset: 0; overflow: hidden; pointer-events: none; z-index: 0; }
.bubble {
    position: absolute;
    bottom: -60px;
    border-radius: 50%;
    border: 2px solid var(--bubble-edge);
    background: radial-gradient(circle at 30% 28%, var(--white) 0 9%, var(--bubble-fill) 10% 100%);
    animation: rise linear infinite;
}
@keyframes rise {
    from { transform: translate(0, 0); }
    50% { transform: translate(14px, -55vh); }
    to { transform: translate(-6px, -112vh); }
}

/* Shae and Ash swimming behind the page (js/swimmers.js) */
.swimmers { position: fixed; inset: 0; overflow: hidden; pointer-events: none; z-index: 0; }
.swimmer { position: absolute; left: 0; top: 0; will-change: transform; }
.swimmer-flip, .swimmer-art { width: 100%; height: 100%; }
.swimmer-flip { transition: transform 0.45s ease; }
.swimmer-art { display: block; filter: drop-shadow(0 5px 4px var(--shadow)); }
main { position: relative; z-index: 1; }

/* Header */
.site-head {
    position: relative;
    z-index: 5;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    max-width: 1160px;
    width: 100%;
    margin: 0 auto;
    padding: 0.7rem 1rem;
}
.brand { display: flex; align-items: center; gap: 0.6rem; text-decoration: none; }
.brand img { width: 64px; height: 64px; border-radius: 50%; border: var(--outline); box-shadow: 0 3px 0 var(--ink); }
.wordmark { font-size: clamp(1.7rem, 4.5vw, 2.5rem); }
.site-nav { display: flex; align-items: center; gap: 0.3rem; }
.site-nav a:not(.btn) {
    padding: 0.3em 0.75em;
    font: 400 1.1rem var(--font-toon);
    color: var(--white);
    text-decoration: none;
    text-shadow: 0 2px 0 var(--ink), 0 0 6px var(--ink);
    border-radius: 999px;
}
.site-nav a:not(.btn):hover, .site-nav a[aria-current=page] { background: var(--ink); }
.site-nav .btn { margin-left: 0.5rem; }
.nav-toggle { display: none; font: 400 1rem var(--font-toon); color: var(--ink); background: var(--gold-1); border: var(--outline); border-radius: 999px; padding: 0.35em 1em; }

.wrap { max-width: 1160px; margin: 0 auto; padding: 1rem 1rem 1.6rem; }
.wrap > .toon { display: block; text-align: center; font-size: clamp(1.7rem, 4.5vw, 2.5rem); margin: 0.6rem 0 1.1rem; }
.center { text-align: center; }
.plank { max-width: 780px; margin: 0.4rem auto 1.4rem; }
.plank .toon { font-size: clamp(1.5rem, 4.4vw, 2.4rem); }

/* Home hero: the brand banner itself */
.hero { max-width: 1000px; margin: 0 auto; padding: 0.4rem 1rem 1.2rem; text-align: center; }
.hero-banner { display: block; width: 100%; border: 4px solid var(--ink); border-radius: 22px; box-shadow: 0 7px 0 var(--ink), 0 18px 30px var(--shadow); }
.actions { display: flex; flex-wrap: wrap; justify-content: center; gap: 0.8rem; margin: 1.2rem 0 0.4rem; }

.trio { display: grid; grid-template-columns: repeat(3, 1fr); gap: 1.1rem; margin-bottom: 0.6rem; }
.trio h2, .parchment h3 { margin: 0 0 0.3rem; font: 400 1.45rem var(--font-toon); color: var(--blue-2); }
.trio p { margin: 0 0 0.9rem; }
.step {
    display: inline-grid; place-items: center; width: 2.2em; height: 2.2em; margin-bottom: 0.4rem;
    font: 400 1.2rem var(--font-toon); color: var(--ink);
    background: linear-gradient(180deg, var(--gold-1), var(--gold-2)); border: var(--outline); border-radius: 50%;
}

/* Listing cards */
.grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(230px, 1fr)); gap: 1.1rem; }
.card {
    display: flex; flex-direction: column; overflow: hidden;
    color: var(--ink); text-decoration: none;
    background: linear-gradient(180deg, var(--parch-1), var(--parch-2));
    border: var(--outline); border-radius: var(--radius); box-shadow: var(--drop);
    transition: transform 0.12s;
}
.card:hover { transform: translateY(-4px) rotate(-0.6deg); }
.card-photo { position: relative; display: block; aspect-ratio: 1; background: var(--sea-mid); border-bottom: var(--outline); }
.card-photo img { width: 100%; height: 100%; object-fit: cover; display: block; }
.card-photo img.no-photo { object-fit: contain; padding: 14%; }
.card-photo .flag { position: absolute; top: 10px; left: 10px; transform: rotate(-6deg); }
.card-body { display: flex; flex-direction: column; gap: 0.15rem; padding: 0.7rem 0.9rem 0.9rem; flex: 1; }
.card-title { font-weight: 700; line-height: 1.2; }
.card-meta { font-size: 0.9rem; color: var(--ink-soft); min-height: 1.2em; }
.price { margin-top: auto; font: 400 1.35rem var(--font-toon); color: var(--red-dark); }
.price-big { font-size: 2.1rem; margin: 0.2rem 0 0.6rem; }

/* Shop filter */
.filter { display: flex; flex-wrap: wrap; align-items: center; gap: 0.8rem; margin-bottom: 1rem; padding: 0.8rem 1rem; }
.filter input[type=search] { flex: 1 1 220px; width: auto; margin: 0; }
.chips { display: flex; flex-wrap: wrap; gap: 0.5rem; margin-bottom: 1.2rem; }
.chip { padding: 0.2em 0.9em; font-weight: 700; color: var(--ink); text-decoration: none; background: var(--parch-1); border: 2px solid var(--ink); border-radius: 999px; }
.chip-on { color: var(--white); background: var(--blue-2); }
.empty { text-align: center; max-width: 520px; margin: 0 auto; }
.empty img { border: var(--outline); border-radius: 50%; }

/* Item page */
.crumbs { margin: 0 0 0.8rem; font-weight: 700; color: var(--white); text-shadow: 0 2px 0 var(--ink); }
.crumbs a { color: var(--gold-1); }
.item { display: grid; grid-template-columns: minmax(0, 1.15fr) minmax(0, 1fr); gap: 1.3rem; align-items: start; margin-bottom: 1.3rem; }
.gallery-main { display: block; width: 100%; max-height: 640px; object-fit: contain; background: var(--parch-1); border: 4px solid var(--ink); border-radius: var(--radius); box-shadow: var(--drop); }
.gallery-main.no-photo { padding: 12%; }
.gallery-thumbs { display: flex; flex-wrap: wrap; gap: 0.5rem; margin-top: 0.9rem; }
.gallery-thumbs button { width: 74px; height: 74px; padding: 0; overflow: hidden; background: var(--parch-1); border: var(--outline); border-radius: 12px; cursor: pointer; }
.gallery-thumbs button.on { outline: 3px solid var(--gold-1); outline-offset: 1px; }
.gallery-thumbs img { width: 100%; height: 100%; object-fit: cover; display: block; }
.item-info h1 { margin: 0 0 0.3rem; font: 400 clamp(1.6rem, 4vw, 2.2rem) var(--font-toon); line-height: 1.1; color: var(--blue-2); }
.item-info .actions { justify-content: flex-start; }
.flag.inline { margin: 0.2rem 0; }
.meta { margin: 0 0 0.5rem; }
.description { margin: 0.6rem 0 0.4rem; overflow-wrap: anywhere; }

/* Episodes */
.grid-wide { grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); }
.episode-card .card-photo { aspect-ratio: 16 / 9; }
.play {
    position: absolute; left: 50%; top: 50%; width: 64px; height: 64px; margin: -32px 0 0 -32px;
    background: linear-gradient(180deg, var(--gold-1), var(--gold-2)); border: var(--outline); border-radius: 50%; box-shadow: 0 4px 0 var(--ink);
}
.play::after { content: ''; position: absolute; left: 24px; top: 17px; border: 13px solid transparent; border-left: 21px solid var(--ink); border-right: 0; }
/* One column for the whole watch page: link, player and text share the same edges.
   Its width is capped by the window height too, so the whole 16:9 picture always fits on screen. */
.watch { width: min(100%, 1040px, calc((100vh - 150px) * 16 / 9)); min-width: min(100%, 320px); margin: 0 auto; }
.player {
    display: block; width: 100%; height: auto; aspect-ratio: 16 / 9; object-fit: contain; margin: 0 0 1.2rem;
    background: var(--ink); border: 4px solid var(--ink); border-radius: var(--radius); box-shadow: var(--drop);
}
.player-frame { position: relative; overflow: hidden; }
.episode-info { margin-bottom: 1.2rem; }
.episode-info .description { margin: 0; }
.player-frame iframe { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; }
.episode-info h1 { margin: 0 0 0.4rem; font: 400 clamp(1.5rem, 4vw, 2.1rem) var(--font-toon); color: var(--blue-2); }

/* Text panels and the message form */
.prose { max-width: 780px; margin: 0 auto 1.3rem; }
.prose p { margin: 0 0 0.6rem; }
.prose .big { font: 400 1.6rem var(--font-toon); }
.contact-form { max-width: 640px; margin: 1.4rem auto 0; }
.two { display: grid; grid-template-columns: 1fr 1fr; gap: 0.8rem; }

/* Sea floor footer */
.seabed { position: relative; z-index: 1; margin-top: 1.5rem; text-align: center; }
.seabed-art { display: block; width: 100%; height: 120px; margin-bottom: -1px; }
.seabed-art .weed { fill: var(--weed-1); stroke: var(--weed-2); stroke-width: 10; stroke-linejoin: round; }
.seabed-art .sand { fill: var(--sand-1); stroke: var(--ink); stroke-width: 3; }
.seabed-art .rock { fill: var(--rock); stroke: var(--ink); stroke-width: 3; }
.seabed-fish { position: absolute; top: -34px; height: 128px; width: auto; filter: drop-shadow(0 5px 4px var(--shadow)); }
.seabed-shae { left: 15%; }
.seabed-ashley { right: 15%; transform: scaleX(-1); }
.cast { display: flex; justify-content: center; gap: 1.4rem; margin-bottom: 0.7rem; }
.cast figure { margin: 0; font: 400 1.25rem var(--font-toon); }
.cast img { display: block; width: 110px; height: 110px; border-radius: 50%; border: var(--outline); box-shadow: 0 4px 0 var(--ink); }
.with-fish { display: flex; align-items: center; gap: 1.2rem; }
.with-fish img { flex: none; width: 130px; height: auto; }
.seabed-inner { padding: 0.4rem 1rem 1.6rem; background: linear-gradient(180deg, var(--sand-1), var(--sand-2)); }
.foot-contact { display: flex; flex-wrap: wrap; justify-content: center; gap: 0.3rem 1.6rem; margin: 1rem 0 0.4rem; font: 400 1.25rem var(--font-toon); }
.foot-contact a { color: var(--ink); text-decoration: none; }
.foot-social { display: flex; justify-content: center; gap: 0.7rem; margin: 0.6rem 0; }
.social { padding: 0.25em 1.1em; font: 400 1.05rem var(--font-toon); color: var(--white); text-decoration: none; border: var(--outline); border-radius: 999px; box-shadow: 0 3px 0 var(--ink); background: var(--blue-2); }
.social-ebay { color: var(--ink); background: var(--white); }
.foot-small { margin: 0.6rem 0 0; font-size: 0.9rem; }
.foot-small a { color: var(--ink); }

@media (max-width: 820px) {
    .trio { grid-template-columns: 1fr; }
    .item { grid-template-columns: 1fr; }
    .nav-toggle { display: block; }
    .site-nav {
        display: none; position: absolute; top: 100%; left: 1rem; right: 1rem; z-index: 10;
        flex-direction: column; align-items: stretch; gap: 0.2rem; padding: 0.8rem;
        background: var(--sea-deep); border: var(--outline); border-radius: var(--radius); box-shadow: var(--drop);
    }
    .site-nav.open { display: flex; }
    .site-nav a:not(.btn) { text-align: center; padding: 0.5em; }
    .site-nav .btn { margin: 0.4rem 0 0; }
}
@media (max-width: 520px) {
    body { font-size: 17px; }
    .two { grid-template-columns: 1fr; }
    .grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 0.7rem; }
    .grid-wide { grid-template-columns: 1fr; }
    .brand img { width: 50px; height: 50px; }
    .plank { padding: 0.7rem 1.6rem; }
    .seabed-art { height: 80px; }
    .seabed-fish { height: 84px; top: -26px; }
    .seabed-shae { left: 5%; }
    .seabed-ashley { right: 5%; }
    .cast img { width: 84px; height: 84px; }
    .with-fish { flex-direction: column; text-align: center; }
    .with-fish img { width: 104px; }
}
