/*
Theme Name: Pip & Tula
Author: Pip & Tula
Description: A playful nursery-rhyme theme with an illustrated homepage and a featured video.
Version: 1.0.0
Requires at least: 6.2
Requires PHP: 7.4
License: GNU General Public License v2 or later
Text Domain: pip-and-tula
*/
:root{--ink:#212641;--cream:#fff9ed;--purple:#684abd;--peach:#ffb085;--mint:#ddf6e5;--line:#ded4bd}
*{box-sizing:border-box}html{scroll-behavior:smooth}body{margin:0;background:var(--cream);color:var(--ink);font-family:ui-rounded,"Trebuchet MS",system-ui,sans-serif;line-height:1.55}img{max-width:100%;height:auto;display:block}a{color:inherit}a:focus-visible,button:focus-visible,summary:focus-visible{outline:3px solid #5536a0;outline-offset:5px}.wrap{width:min(1220px,calc(100% - 48px));margin-inline:auto}.site-header{padding:14px 0;background:var(--cream);border-bottom:2px solid var(--line)}.header-inner,.footer-inner{display:flex;justify-content:space-between;align-items:center;gap:20px;flex-wrap:wrap}.brand{text-decoration:none;font-weight:1000;font-size:1.55rem;letter-spacing:-.05em}.brand b{color:var(--purple)}.brand img{max-width:180px;max-height:55px;object-fit:contain}.site-nav ul,.socials{display:flex;gap:9px 22px;flex-wrap:wrap;align-items:center;list-style:none;margin:0;padding:0}.site-nav a,.socials a{font-size:.94rem;font-weight:800;text-decoration:none}.site-nav a:hover,.socials a:hover{text-decoration:underline}.socials{gap:9px}.socials a{display:inline-block;padding:7px 13px;border:1px solid var(--line);border-radius:40px;background:#fff}.hero{margin-top:34px;display:grid;grid-template-columns: .83fr 1.17fr;border:2px solid var(--ink);border-radius:36px;overflow:hidden;background:#ffe58e;box-shadow:0 7px 0 var(--ink)}.hero-copy{padding:clamp(28px,5vw,75px);align-self:center}.hero img{height:100%;min-height:350px;width:100%;object-fit:cover;object-position:52% center}.hero h1,h2,h3{line-height:1.03;letter-spacing:-.055em;margin:0}.hero h1{font-size:clamp(3rem,6.2vw,6.3rem)}.hero h1 span{color:#693bac}.hero p{font-size:clamp(1rem,1.8vw,1.29rem);max-width:36ch;margin:18px 0 23px}.button{display:inline-block;text-decoration:none;font-weight:850;color:#fff;background:#5534aa;padding:13px 21px;border:2px solid var(--ink);border-radius:14px;box-shadow:0 4px 0 var(--ink)}.button:hover{background:#432787}.section{padding-top:clamp(54px,8vw,100px)}.section h2,.content h1{font-size:clamp(2.2rem,4.4vw,4rem);margin-bottom:20px}.watch{border:2px solid var(--ink);border-radius:26px;overflow:hidden;background:#17243a}.watch video,.watch iframe{display:block;width:100%;aspect-ratio:16/9;border:0}.watch-link{padding:30px;color:white}.cards{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:22px}.card{overflow:hidden;border:2px solid var(--ink);border-radius:24px;background:#fff;box-shadow:0 4px 0 var(--ink)}.card a{display:block;text-decoration:none;height:100%}.card a:hover h3{text-decoration:underline}.card img{width:100%;aspect-ratio:16/9;object-fit:cover}.card h3{padding:18px 20px 20px;font-size:1.5rem}.friends{display:grid;grid-template-columns:1fr 1fr;overflow:hidden;border:2px solid var(--ink);border-radius:28px;background:var(--mint);margin-top:70px}.friends img{height:100%;width:100%;object-fit:cover}.friends div{padding:clamp(24px,4vw,58px)}.friends p{margin-bottom:0}.site-footer{margin-top:70px;padding:28px 0;background:#f4eaff;border-top:2px solid var(--ink)}.skip{position:absolute;left:12px;top:12px;z-index:9;background:white;padding:10px;transform:translateY(-170%)}.skip:focus{transform:none}.content{max-width:780px;padding-top:45px;overflow-wrap:anywhere}.content iframe{max-width:100%}.content img{border-radius:18px}.pagination{margin:30px 0}.aligncenter{margin-inline:auto}.alignwide{max-width:100%}
@media(max-width:850px){.hero{grid-template-columns:1fr}.hero img{min-height:0;aspect-ratio:16/10}.cards{grid-template-columns:repeat(2,minmax(0,1fr))}.header-inner{column-gap:15px}}
@media(max-width:520px){.wrap{width:calc(100% - 28px)}.hero{margin-top:20px;border-radius:25px}.cards,.friends{grid-template-columns:1fr}.friends{margin-top:52px}.site-nav ul{gap:10px}.header-inner{row-gap:12px}.hero-copy{padding:28px 23px}.site-footer{margin-top:54px}}
@media(prefers-reduced-motion:reduce){html{scroll-behavior:auto}}
.custom-logo-link{display:inline-flex;align-items:center}.custom-logo{width:auto;max-width:180px;max-height:55px;object-fit:contain}
.card:nth-child(3n+1){background:#ffe5b7}.card:nth-child(3n+2){background:#ddf6e5}.card:nth-child(3n+3){background:#eee5ff}
.watch video{object-fit:contain}

/* The illustrated home page uses perspective, soft lighting and raised surfaces. */
:root {
    --ink: #251b3b;
    --cream: #fff9f1;
    --purple: #6941b7;
    --line: #e9dff0;
    --shadow: 0 20px 42px #42225c19, 0 5px 10px #42225c12;
}
body {
    background: radial-gradient(ellipse at 12% 12%, #f3e9ff 0, transparent 37%),
        radial-gradient(ellipse at 92% 52%, #fff0df 0, transparent 45%), var(--cream);
}
.site-header {
    padding: 13px 0;
    background: #fffbf6;
    border-bottom: 1px solid var(--line);
}
.brand { display: inline-flex; align-items: center; gap: 10px; }
.brand .brand-badge { width: 54px; height: 54px; filter: drop-shadow(0 4px 5px #31245125); }
.socials a {
    padding: 8px 15px;
    border-color: #e3d6f4;
    background: #f4ecfe;
    color: #492a84;
}
.hero {
    position: relative;
    isolation: isolate;
    min-height: 540px;
    overflow: hidden;
    margin-top: clamp(20px, 4vw, 52px);
    border: 1px solid #e0d0f9;
    border-radius: clamp(24px, 4vw, 48px);
    background: radial-gradient(circle at 82% 26%, #fff4cc, transparent 32%),
        linear-gradient(145deg, #201736 2%, #503382 56%, #a576df 100%);
    color: #fffaf5;
    box-shadow: 0 24px 60px #45287538, inset 0 1px 0 #ffffff45;
}
.hero-copy { position: relative; z-index: 2; padding: clamp(25px, 4.4vw, 62px); }
.hero h1 { font-size: clamp(3.2rem, 6.1vw, 6.1rem); text-wrap: balance; }
.hero h1 span { color: #ffe293; display: block; }
.hero p { color: #fcf0ff; }
.hero-art {
    align-self: stretch;
    position: relative;
    margin: 30px 27px 31px 0;
    isolation: isolate;
    min-width: 0;
}
.hero-art::before {
    content: "";
    position: absolute;
    inset: 7% 3% 1% 3%;
    border-radius: 38px;
    background: #f5af82;
    transform: rotate(4deg);
    z-index: -1;
    box-shadow: 0 16px 35px #21133266;
}
.hero-art img {
    position: relative;
    min-height: 0;
    border-radius: 33px;
    border: 2px solid #ffffff80;
    box-shadow: 0 14px 38px #28194860;
    object-position: center;
}
.hero .button {
    border: 1px solid #fff3c9;
    background: linear-gradient(#fff2b8, #ffd476);
    color: #39234a;
    box-shadow: 0 5px 0 #b46d40, 0 10px 20px #1c102947;
    transition: transform .18s, box-shadow .18s;
}
.hero .button:hover { transform: translateY(-3px); box-shadow: 0 8px 0 #b46d40, 0 14px 25px #1c102947; }
.hero :focus-visible { outline-color: #ffe293; }
.hero-link { display: block; width: fit-content; margin-top: 18px; font-weight: 750; text-underline-offset: 5px; }
.section h2, .friends h2 { text-wrap: balance; }
.watch {
    padding: clamp(7px, 1.4vw, 16px);
    border: 1px solid #614293;
    border-radius: 30px;
    background: linear-gradient(135deg, #4a2d72, #201731);
    box-shadow: var(--shadow), inset 0 1px 0 #ffffff40;
}
.watch video, .watch iframe { border-radius: 18px; background: #140f1f; }
.cards { gap: clamp(16px, 2.6vw, 34px); perspective: 950px; }
.card {
    border: 1px solid #fff;
    border-radius: 26px;
    padding: 10px;
    background: #fff;
    box-shadow: var(--shadow), inset 0 1px 0 #fff;
    transition: transform .22s ease, box-shadow .22s ease;
}
.card img { border-radius: 18px; }
.card h3 { padding: 16px 9px 10px; }
.card:focus-within { outline: 3px solid #6941b7; outline-offset: 4px; }
@media (hover: hover) and (prefers-reduced-motion: no-preference) {
    .card:hover { transform: translateY(-7px) rotateX(4deg); box-shadow: 0 24px 36px #42225c2e; }
}
.friends {
    border: 1px solid #d2ecd9;
    border-radius: 33px;
    background: linear-gradient(125deg, #edfff5, #d3f2e1);
    box-shadow: var(--shadow);
}
.site-footer { background: #f3e9f9; border-top: 1px solid #e2d4ea; }
@media (max-width: 850px) {
    .hero { min-height: 0; }
    .hero h1 span { display: inline; }
    .hero-art { margin: 0 17px 24px; }
    .hero-art img { width: 100%; height: auto; aspect-ratio: 16 / 10; }
    .hero-art::before { transform: rotate(2deg); }
}
@media (max-width: 520px) {
    .hero-art img, .hero-art::before { border-radius: 21px; }
    .hero h1 { font-size: clamp(2.65rem, 11vw, 4rem); }
}
@media (prefers-reduced-motion: reduce) {
    .hero .button, .card { transition: none; }
    .hero .button:hover { transform: none; }
}

/* Dark studio palette and image-led sections. */
:root {
    color-scheme: dark;
    --ink: #fff9ed;
    --cream: #121022;
    --purple: #efbf68;
    --line: #39314c;
    --shadow: 0 22px 50px #080611a0, 0 5px 12px #0b081777;
}
body {
    background: radial-gradient(ellipse at 80% 14%, #2c1b48 0, transparent 43%),
        radial-gradient(ellipse at 5% 58%, #172d39 0, transparent 38%), #121022;
}
.site-header, .site-footer { background: #191429; border-color: #39314c; }
.socials a { background: #302346; border-color: #594576; color: #f8eaff; }
a:focus-visible, button:focus-visible, summary:focus-visible, .card:focus-within { outline-color: #ffdb87; }
.skip { color: #191429; }
.hero {
    background: radial-gradient(circle at 81% 20%, #9066bf, transparent 46%),
        linear-gradient(130deg,#241637,#362052 62%,#512f70);
    border-color: #69518b;
    box-shadow: var(--shadow);
}
.hero-art::before { background: #7951ab; }
.hero .button, .button { border-color: #edc877; }
.section { scroll-margin-top: 25px; }
.platforms .socials { display:grid; grid-template-columns: repeat(2,minmax(0,1fr)); gap: 20px; }
.platforms .socials a {
    display:block;
    padding: 23px clamp(14px,3vw,32px);
    border-radius: 20px;
    background: linear-gradient(130deg,#322751,#24203d);
    box-shadow: var(--shadow);
    border-color: #55416f;
    font-size: clamp(1.05rem,2vw,1.45rem);
}
.artwork-grid { display:grid; grid-template-columns: 1.25fr 1fr 1fr; gap: clamp(14px,2vw,24px); }
.artwork-grid figure {
    position:relative;
    margin:0;
    overflow:hidden;
    border-radius: 22px;
    border: 1px solid #574b72;
    background: #241b36;
    box-shadow: var(--shadow);
}
.artwork-grid img { width:100%; aspect-ratio: 4/3; object-fit:cover; }
.artwork-grid figcaption { padding: 12px 15px; font-weight:800; }
.card:nth-child(n) { background:#271c3b; border-color:#55436d; color:#fff7ed; box-shadow:var(--shadow); }
.card:nth-child(3n+2) { background:#1b3436; border-color:#395958; }
.card:nth-child(3n+3) { background:#3b2533; border-color:#694252; }
.friends { background:linear-gradient(140deg,#242449,#182f36); border-color:#44506a; grid-template-columns: .8fr 1.2fr; }
.friends img { max-height:475px; object-position:center 58%; }
.friends div { align-self:center; }
.friends h2 { font-size:clamp(2rem,4vw,3.4rem); }
@media(max-width:700px){
    .artwork-grid {grid-template-columns:1fr 1fr}
    .artwork-grid figure:first-child {grid-column:1/-1}
    .artwork-grid figure:first-child img {aspect-ratio:16/9}
}
@media(max-width:520px){
    .friends {grid-template-columns:1fr}
    .friends img {max-height:350px}
}

.watch-youtube { padding: 10px 12px 2px; text-align: right; }
.watch-youtube a { font-weight: 750; text-underline-offset: 4px; }
.watch-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: clamp(18px, 3vw, 34px); }
.watch-grid h3 { font-size: clamp(1.2rem, 2vw, 1.55rem); margin-bottom: 12px; }
@media (max-width: 700px) {
    .watch-grid { grid-template-columns: 1fr; gap: 26px; }
}
