/* The Tangerine Toddler: site styles */

@font-face
{
    font-family: 'Luckiest Guy';
    src: url('../fonts/luckiest-guy-latin-400-normal.woff2') format('woff2');
    font-weight: 400;
    font-display: swap;
}

@font-face
{
    font-family: 'Fredoka';
    src: url('../fonts/fredoka-latin-400-normal.woff2') format('woff2');
    font-weight: 400;
    font-display: swap;
}

@font-face
{
    font-family: 'Fredoka';
    src: url('../fonts/fredoka-latin-600-normal.woff2') format('woff2');
    font-weight: 600;
    font-display: swap;
}

@font-face
{
    font-family: 'Fredoka';
    src: url('../fonts/fredoka-latin-700-normal.woff2') format('woff2');
    font-weight: 700;
    font-display: swap;
}

:root
{
    --orange: #FF8A1F;
    --orange-deep: #E0650A;
    --orange-soft: #FFE3C7;
    --navy: #1D2B53;
    --navy-soft: #2C3E73;
    --gold: #FFD23F;
    --gold-soft: #FFF2C2;
    --red: #D7263D;
    --blue: #3A86FF;
    --green: #2A9D8F;
    --cream: #FFF8EE;
    --paper: #FFFFFF;
    --ink: #1D2B53;
    --muted: #5B6585;
    --line: #F0E1CC;
    --radius: 18px;
    --shadow: 0 2px 0 rgba(29, 43, 83, 0.08), 0 10px 30px rgba(29, 43, 83, 0.08);
    --display: 'Luckiest Guy', 'Arial Black', sans-serif;
    --body: 'Fredoka', 'Trebuchet MS', system-ui, sans-serif;
}

*,
*::before,
*::after
{
    box-sizing: border-box;
}

html
{
    scroll-behavior: smooth;
}

body
{
    margin: 0;
    font-family: var(--body);
    font-size: 18px;
    line-height: 1.55;
    color: var(--ink);
    background: var(--cream);
    -webkit-font-smoothing: antialiased;
}

img
{
    max-width: 100%;
    display: block;
}

a
{
    color: var(--orange-deep);
    text-decoration-thickness: 2px;
    text-underline-offset: 3px;
}

a:hover
{
    color: var(--red);
}

h1,
h2,
h3
{
    font-family: var(--display);
    font-weight: 400;
    line-height: 1.05;
    letter-spacing: 0.01em;
    text-transform: uppercase;
    margin: 0 0 0.4em;
}

h1
{
    font-size: clamp(2.4rem, 6vw, 4.2rem);
}

h2
{
    font-size: clamp(1.8rem, 4vw, 2.6rem);
}

h3
{
    font-size: 1.4rem;
}

p
{
    margin: 0 0 1em;
}

.wrap
{
    width: min(1200px, 100% - 32px);
    margin-inline: auto;
}

.skip
{
    position: absolute;
    left: -999px;
}

.skip:focus
{
    left: 16px;
    top: 16px;
    background: var(--paper);
    padding: 8px 14px;
    z-index: 100;
    border-radius: 8px;
}

/* Parody ribbon */

.ribbon
{
    background: var(--navy);
    color: #fff;
    font-size: 0.85rem;
    text-align: center;
    padding: 6px 16px;
    letter-spacing: 0.02em;
}

.ribbon strong
{
    color: var(--gold);
}

/* Header */

.site-header
{
    background: var(--paper);
    border-bottom: 4px solid var(--orange);
    position: sticky;
    top: 0;
    z-index: 50;
}

.site-header .wrap
{
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    padding-block: 10px;
}

.brand img
{
    height: 56px;
    width: auto;
}

.nav-toggle
{
    display: none;
    font: 600 1rem var(--body);
    background: var(--navy);
    color: #fff;
    border: 0;
    border-radius: 999px;
    padding: 8px 16px;
    cursor: pointer;
}

.site-nav ul
{
    list-style: none;
    display: flex;
    gap: 4px;
    margin: 0;
    padding: 0;
}

.site-nav a
{
    display: block;
    font-weight: 600;
    color: var(--navy);
    text-decoration: none;
    padding: 8px 14px;
    border-radius: 999px;
}

.site-nav a:hover
{
    background: var(--orange-soft);
}

.site-nav a[aria-current="page"]
{
    background: var(--orange);
    color: #fff;
}

@media (max-width: 860px)
{
    .nav-toggle
    {
        display: block;
    }

    .site-nav
    {
        display: none;
        position: absolute;
        left: 0;
        right: 0;
        top: 100%;
        background: var(--paper);
        border-bottom: 4px solid var(--orange);
        padding: 8px 16px 16px;
    }

    .site-nav.open
    {
        display: block;
    }

    .site-nav ul
    {
        flex-direction: column;
    }

    .brand img
    {
        height: 44px;
    }
}

/* Page layout: content plus an advert column */

.layout
{
    display: grid;
    grid-template-columns: minmax(0, 1fr) 300px;
    gap: 32px;
    padding-block: 32px 56px;
}

.ad-rail
{
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.ad-rail .sticky
{
    position: sticky;
    top: 100px;
    display: flex;
    flex-direction: column;
    gap: 20px;
}

@media (max-width: 1000px)
{
    .layout
    {
        grid-template-columns: minmax(0, 1fr);
    }

    .ad-rail .sticky
    {
        position: static;
    }

    .ad-rail
    {
        display: grid;
        grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
    }

    .ad-rail .sticky
    {
        display: contents;
    }
}

/* Hero */

.hero
{
    background:
        radial-gradient(circle at 85% 20%, rgba(255, 210, 63, 0.55), transparent 40%),
        linear-gradient(135deg, var(--orange) 0%, #FF6F3C 100%);
    color: #fff;
    padding-block: 56px 64px;
    overflow: hidden;
}

.hero .wrap
{
    display: grid;
    grid-template-columns: 1.3fr 1fr;
    align-items: center;
    gap: 32px;
}

.hero h1
{
    text-shadow: 0 4px 0 rgba(29, 43, 83, 0.25);
}

.hero p.lede
{
    font-size: 1.25rem;
    max-width: 34ch;
}

.mascot-stage
{
    position: relative;
    justify-self: center;
    width: min(340px, 70%);
}

.hero-mascot
{
    width: 100%;
    height: auto;
    filter: drop-shadow(0 18px 24px rgba(29, 43, 83, 0.3));
    animation: wobble 4s ease-in-out infinite;
}

@keyframes wobble
{
    0%,
    100%
    {
        transform: rotate(-4deg);
    }

    50%
    {
        transform: rotate(4deg) translateY(-6px);
    }
}

/* Waving hands: three gestures in a 12-second loop.
   0-4s the accordion (hands slide together and apart), 4-8s the pinch, 8-12s the point. */

.hand
{
    position: absolute;
    bottom: -12%;
    width: 42%;
    height: auto;
    overflow: visible;
    filter: drop-shadow(0 8px 10px rgba(29, 43, 83, 0.25));
}

.hand.left
{
    left: -26%;
    transform: scaleX(-1);
    animation: hand-left 12s ease-in-out infinite;
}

.hand.right
{
    right: -26%;
    animation: hand-right 12s ease-in-out infinite;
}

.hand .pose
{
    opacity: 0;
}

.hand .pose-flat
{
    animation: pose-flat 12s steps(1) infinite;
}

.hand .pose-pinch
{
    animation: pose-pinch 12s steps(1) infinite;
}

.hand .pose-point
{
    animation: pose-point 12s steps(1) infinite;
}

@keyframes pose-flat
{
    0%
    {
        opacity: 1;
    }

    33.33%
    {
        opacity: 0;
    }
}

@keyframes pose-pinch
{
    0%
    {
        opacity: 0;
    }

    33.33%
    {
        opacity: 1;
    }

    66.66%
    {
        opacity: 0;
    }
}

@keyframes pose-point
{
    0%
    {
        opacity: 0;
    }

    66.66%
    {
        opacity: 1;
    }
}

@keyframes hand-right
{
    0%,
    8%,
    16%,
    24%,
    32%
    {
        transform: translateX(0) rotate(0deg);
    }

    4%,
    12%,
    20%,
    28%
    {
        transform: translateX(-26%) rotate(-6deg);
    }

    36%,
    44%,
    52%,
    60%
    {
        transform: translateY(-14%) rotate(-10deg);
    }

    40%,
    48%,
    56%,
    64%
    {
        transform: translateY(4%) rotate(4deg);
    }

    70%,
    78%,
    86%,
    94%
    {
        transform: translate(-10%, -10%) rotate(-14deg) scale(1.08);
    }

    74%,
    82%,
    90%,
    98%,
    100%
    {
        transform: translate(0, 0) rotate(0deg) scale(1);
    }
}

@keyframes hand-left
{
    0%,
    8%,
    16%,
    24%,
    32%
    {
        transform: scaleX(-1) translateX(0) rotate(0deg);
    }

    4%,
    12%,
    20%,
    28%
    {
        transform: scaleX(-1) translateX(-26%) rotate(-6deg);
    }

    36%,
    44%,
    52%,
    60%
    {
        transform: scaleX(-1) translateY(4%) rotate(4deg);
    }

    40%,
    48%,
    56%,
    64%
    {
        transform: scaleX(-1) translateY(-14%) rotate(-10deg);
    }

    66.66%,
    100%
    {
        transform: scaleX(-1) translate(0, 0) rotate(0deg);
    }
}

@media (prefers-reduced-motion: reduce)
{
    .hero-mascot,
    .hand,
    .hand .pose
    {
        animation: none;
    }

    .hand .pose-flat
    {
        opacity: 1;
    }
}

@media (max-width: 760px)
{
    .hero .wrap
    {
        grid-template-columns: 1fr;
        text-align: center;
    }

    .hero p.lede
    {
        margin-inline: auto;
    }

    .mascot-stage
    {
        order: -1;
        width: 170px;
        margin-bottom: 36px;
    }
}

.btn
{
    display: inline-block;
    font: 700 1.05rem var(--body);
    text-decoration: none;
    padding: 12px 22px;
    border-radius: 999px;
    border: 3px solid var(--navy);
    background: var(--gold);
    color: var(--navy);
    box-shadow: 0 4px 0 var(--navy);
    cursor: pointer;
    transition: transform 0.08s ease, box-shadow 0.08s ease;
}

.btn:hover
{
    color: var(--navy);
    transform: translateY(-2px);
    box-shadow: 0 6px 0 var(--navy);
}

.btn:active
{
    transform: translateY(3px);
    box-shadow: 0 1px 0 var(--navy);
}

.btn.alt
{
    background: #fff;
}

.btn-row
{
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
    margin-top: 20px;
}

@media (max-width: 760px)
{
    .btn-row
    {
        justify-content: center;
    }
}

/* Page heading band (inner pages) */

.page-head
{
    background: var(--navy);
    color: #fff;
    padding-block: 40px;
    position: relative;
    overflow: hidden;
}

.page-head h1
{
    color: var(--gold);
}

.page-head p
{
    max-width: 60ch;
    font-size: 1.1rem;
    margin: 0;
    color: #DDE3F5;
}

.page-head .mascot-peek
{
    position: absolute;
    right: 4%;
    bottom: -40px;
    width: 170px;
    opacity: 0.95;
    transform: rotate(-10deg);
}

@media (max-width: 760px)
{
    .page-head .mascot-peek
    {
        display: none;
    }
}

/* Generic cards and sections */

.section
{
    margin-bottom: 48px;
}

.section-head
{
    display: flex;
    align-items: baseline;
    justify-content: space-between;
    gap: 16px;
    flex-wrap: wrap;
    margin-bottom: 16px;
}

.section-head a
{
    font-weight: 600;
}

.card
{
    background: var(--paper);
    border-radius: var(--radius);
    box-shadow: var(--shadow);
    padding: 24px;
}

.grid
{
    display: grid;
    gap: 20px;
}

.grid.two
{
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
}

.grid.three
{
    grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
}

/* Quote cards */

.quote-card
{
    position: relative;
    display: flex;
    flex-direction: column;
    background: var(--paper);
    border-radius: var(--radius);
    box-shadow: var(--shadow);
    padding: 26px 24px 20px;
    border-top: 6px solid var(--orange);
}

.quote-card blockquote
{
    margin: 0 0 14px;
    font-size: 1.25rem;
    font-weight: 600;
    line-height: 1.35;
}

.quote-card blockquote::before
{
    content: '\201C';
    font-family: var(--display);
    color: var(--orange);
    font-size: 3rem;
    line-height: 0;
    vertical-align: -0.45em;
    margin-right: 4px;
}

.quote-meta
{
    font-size: 0.9rem;
    color: var(--muted);
    margin-bottom: 14px;
}

.toddler-says
{
    margin-top: auto;
    background: var(--gold-soft);
    border-radius: 12px;
    padding: 10px 14px;
    font-size: 0.95rem;
}

.toddler-says b
{
    display: block;
    font-family: var(--display);
    font-weight: 400;
    color: var(--orange-deep);
    letter-spacing: 0.03em;
    text-transform: uppercase;
    font-size: 0.85rem;
}

.tag
{
    display: inline-block;
    font-size: 0.75rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    background: var(--navy);
    color: #fff;
    border-radius: 999px;
    padding: 2px 10px;
    margin-bottom: 10px;
    align-self: flex-start;
}

.source-link
{
    font-size: 0.85rem;
    margin-top: 12px;
}

.filters
{
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-bottom: 24px;
}

.filters button
{
    font: 600 0.95rem var(--body);
    border: 2px solid var(--navy);
    background: #fff;
    color: var(--navy);
    border-radius: 999px;
    padding: 6px 14px;
    cursor: pointer;
}

.filters button[aria-pressed="true"]
{
    background: var(--navy);
    color: #fff;
}

/* Big quote of the moment */

.qotm
{
    background: var(--navy);
    color: #fff;
    border-radius: var(--radius);
    padding: 32px;
    position: relative;
    overflow: hidden;
}

.qotm blockquote
{
    font-family: var(--display);
    font-size: clamp(1.6rem, 3.5vw, 2.4rem);
    line-height: 1.15;
    margin: 0 0 12px;
    color: var(--gold);
    text-transform: uppercase;
}

.qotm .quote-meta
{
    color: #C9D1EA;
}

.qotm .toddler-says
{
    background: rgba(255, 255, 255, 0.1);
    color: #fff;
}

.qotm .toddler-says b
{
    color: var(--gold);
}

.qotm .btn
{
    margin-top: 16px;
}

/* Official version table */

.official-block
{
    margin-bottom: 40px;
}

.official-block h2 a
{
    color: inherit;
    text-decoration: none;
}

.official-row
{
    display: grid;
    grid-template-columns: 1fr 1.4fr;
    gap: 0;
    background: var(--paper);
    border-radius: var(--radius);
    box-shadow: var(--shadow);
    overflow: hidden;
    margin-bottom: 14px;
}

.official-row > div
{
    padding: 18px 22px;
}

.official-row .said
{
    background: #EEF1F8;
    border-right: 3px dashed #C9D1EA;
}

.official-row .said span,
.official-row .meant span
{
    display: block;
    font-size: 0.75rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    color: var(--muted);
    margin-bottom: 4px;
}

.official-row .said strong
{
    font-size: 1.15rem;
}

.official-row .meant span
{
    color: var(--orange-deep);
}

@media (max-width: 640px)
{
    .official-row
    {
        grid-template-columns: 1fr;
    }

    .official-row .said
    {
        border-right: 0;
        border-bottom: 3px dashed #C9D1EA;
    }
}

/* Videos */

.video-card
{
    background: var(--paper);
    border-radius: var(--radius);
    box-shadow: var(--shadow);
    overflow: hidden;
    display: flex;
    flex-direction: column;
}

.video-thumb
{
    aspect-ratio: 16 / 9;
    background:
        repeating-linear-gradient(45deg, rgba(255, 255, 255, 0.06) 0 12px, transparent 12px 24px),
        linear-gradient(135deg, var(--navy), var(--navy-soft));
    display: grid;
    place-items: center;
    position: relative;
}

.video-thumb.has-img
{
    border: 0;
    padding: 0;
    width: 100%;
    cursor: pointer;
    overflow: hidden;
}

.video-thumb.has-img img
{
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.3s ease;
}

.video-thumb.has-img:hover img
{
    transform: scale(1.04);
}

.video-thumb.has-img .play,
.video-thumb.has-img .when
{
    position: relative;
    z-index: 1;
}

.video-thumb.has-img .when
{
    position: absolute;
}

.video-links
{
    margin-top: auto;
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 10px 14px;
}

.video-links .btn
{
    margin-top: 0;
}

.video-credit
{
    font-size: 0.8rem;
    color: var(--muted);
}

.video-thumb .play
{
    width: 74px;
    height: 74px;
    border-radius: 50%;
    background: var(--orange);
    display: grid;
    place-items: center;
    box-shadow: 0 6px 0 rgba(0, 0, 0, 0.25);
}

.video-thumb .play::after
{
    content: '';
    border-left: 24px solid #fff;
    border-top: 15px solid transparent;
    border-bottom: 15px solid transparent;
    margin-left: 6px;
}

.video-thumb .when
{
    position: absolute;
    left: 12px;
    top: 12px;
    background: var(--gold);
    color: var(--navy);
    font-weight: 700;
    font-size: 0.8rem;
    border-radius: 999px;
    padding: 2px 10px;
}

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

.video-body
{
    padding: 18px 20px 20px;
    display: flex;
    flex-direction: column;
    flex: 1;
}

.video-body p
{
    color: var(--muted);
    font-size: 0.98rem;
}

.video-body .btn
{
    margin-top: auto;
    align-self: flex-start;
    font-size: 0.95rem;
    padding: 8px 16px;
}

/* Spoof adverts */

.ad
{
    --ad-bg: var(--orange);
    --ad-fg: #fff;
    --ad-accent: var(--gold);
    position: relative;
    background: var(--ad-bg);
    color: var(--ad-fg);
    border-radius: var(--radius);
    padding: 30px 20px 20px;
    box-shadow: var(--shadow);
    overflow: hidden;
    border: 3px solid rgba(29, 43, 83, 0.15);
}

.ad::before
{
    content: 'Advertisement (not a real one)';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    font-size: 0.68rem;
    font-weight: 700;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    text-align: center;
    padding: 4px;
    background: rgba(0, 0, 0, 0.18);
}

.ad .ad-icon
{
    font-size: 3.2rem;
    line-height: 1;
    margin-bottom: 8px;
}

.ad .ad-brand
{
    font-size: 0.8rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    opacity: 0.85;
}

.ad h3
{
    font-size: 1.55rem;
    margin: 2px 0 6px;
}

.ad .ad-tagline
{
    font-weight: 700;
    color: var(--ad-accent);
    margin-bottom: 8px;
}

.ad .ad-blurb
{
    font-size: 0.95rem;
}

.ad .ad-inspired
{
    font-size: 0.78rem;
    opacity: 0.85;
    border-top: 1px dashed currentColor;
    padding-top: 8px;
    margin-top: 4px;
}

.ad .ad-foot
{
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    margin-top: 12px;
}

.ad .price
{
    font-family: var(--display);
    font-size: 1.35rem;
    background: var(--ad-accent);
    color: var(--navy);
    padding: 6px 12px 3px;
    border-radius: 10px;
    transform: rotate(-4deg);
    white-space: nowrap;
}

.ad .buy
{
    font: 700 0.95rem var(--body);
    background: #fff;
    color: var(--navy);
    border: 0;
    border-radius: 999px;
    padding: 8px 16px;
    cursor: pointer;
    box-shadow: 0 3px 0 rgba(0, 0, 0, 0.25);
}

.ad .buy:active
{
    transform: translateY(2px);
    box-shadow: 0 1px 0 rgba(0, 0, 0, 0.25);
}

.ad.theme-orange
{
    --ad-bg: linear-gradient(160deg, #FF9A3D, #F06A0F);
    background: var(--ad-bg);
}

.ad.theme-gold
{
    --ad-bg: linear-gradient(160deg, #FFE06B, #F5B90C);
    --ad-fg: var(--navy);
    --ad-accent: var(--red);
    background: var(--ad-bg);
}

.ad.theme-gold .price
{
    color: #fff;
}

.ad.theme-blue
{
    --ad-bg: linear-gradient(160deg, #5B9BFF, #2A6FE0);
    background: var(--ad-bg);
}

.ad.theme-red
{
    --ad-bg: linear-gradient(160deg, #E8485B, #B71C30);
    background: var(--ad-bg);
}

.ad.theme-navy
{
    --ad-bg: linear-gradient(160deg, #2C3E73, #141E3C);
    background: var(--ad-bg);
}

.ad.theme-green
{
    --ad-bg: linear-gradient(160deg, #3DBBAA, #1F7F73);
    background: var(--ad-bg);
}

/* Wide inline ad strip between sections */

.ad.wide
{
    display: grid;
    grid-template-columns: auto 1fr auto;
    align-items: center;
    gap: 20px;
    padding: 34px 26px 22px;
}

.ad.wide .ad-icon
{
    font-size: 4.2rem;
    margin: 0;
}

.ad.wide .ad-foot
{
    flex-direction: column;
    margin: 0;
}

@media (max-width: 640px)
{
    .ad.wide
    {
        grid-template-columns: 1fr;
        text-align: center;
    }

    .ad.wide .ad-foot
    {
        flex-direction: row;
        justify-content: center;
    }
}

/* Toast message */

.toast
{
    position: fixed;
    left: 50%;
    bottom: 24px;
    transform: translate(-50%, 150%);
    background: var(--navy);
    color: #fff;
    padding: 14px 22px;
    border-radius: 14px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.3);
    font-weight: 600;
    max-width: calc(100% - 32px);
    text-align: center;
    transition: transform 0.25s ease;
    z-index: 200;
}

.toast.show
{
    transform: translate(-50%, 0);
}

/* Prose pages */

.prose
{
    max-width: 72ch;
}

.prose h2
{
    margin-top: 1.4em;
}

.prose ul
{
    padding-left: 1.2em;
}

.prose li
{
    margin-bottom: 0.4em;
}

.notice
{
    background: var(--gold-soft);
    border-left: 6px solid var(--gold);
    border-radius: 12px;
    padding: 16px 20px;
    margin-bottom: 24px;
}

/* Footer */

.site-footer
{
    background: var(--navy);
    color: #C9D1EA;
    padding-block: 40px;
    font-size: 0.92rem;
}

.site-footer .wrap
{
    display: grid;
    grid-template-columns: auto 1fr;
    gap: 28px;
    align-items: start;
}

.site-footer img
{
    width: 72px;
}

.site-footer a
{
    color: var(--gold);
}

.site-footer nav ul
{
    list-style: none;
    padding: 0;
    margin: 0 0 14px;
    display: flex;
    flex-wrap: wrap;
    gap: 6px 18px;
}

.site-footer .disclaimer
{
    max-width: 80ch;
}

@media (max-width: 640px)
{
    .site-footer .wrap
    {
        grid-template-columns: 1fr;
    }
}

/* 404 */

.lost
{
    text-align: center;
    padding-block: 72px;
}

.lost img
{
    width: 200px;
    margin: 0 auto 20px;
    animation: wobble 2s ease-in-out infinite;
}
