/* Women with Baskets: faceted, Post-Cubist styling.
   Palette is drawn from the subject: sea, salt, woven straw, crab shell. */
:root {
    --salt: #EDF0EA;
    --paper: #F8F9F5;
    --tide: #0F3B3F;
    --ink: #16211F;
    --muted: #4B5A57;
    --straw: #C9A04A;
    --crab: #C8402B;
    --rule: #C9D2CC;
    --cut: 20px;
    --display: 'Bricolage Grotesque', 'Helvetica Neue', Arial, sans-serif;
    --body: 'Source Serif 4', Georgia, 'Times New Roman', serif;
}

* {
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    margin: 0;
    background: var(--salt);
    color: var(--ink);
    font-family: var(--body);
    font-size: 1.125rem;
    line-height: 1.7;
}

a {
    color: var(--tide);
    text-underline-offset: 3px;
}

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

:focus-visible {
    outline: 3px solid var(--crab);
    outline-offset: 3px;
}

h1, h2, h3 {
    font-family: var(--display);
    color: var(--tide);
    line-height: 1.1;
    letter-spacing: -0.01em;
}

/* Top bar */
.topbar {
    background: var(--tide);
    padding: 14px 24px;
}

.topbar a {
    color: var(--salt);
    font-family: var(--display);
    font-weight: 700;
    text-decoration: none;
}

.topbar a:hover {
    color: var(--straw);
}

.container {
    max-width: 1080px;
    margin: 0 auto;
    padding: 0 24px 80px;
}

/* Hero: the one bold move. The painting sits in a faceted frame. */
.hero {
    display: grid;
    grid-template-columns: minmax(0, 0.85fr) minmax(0, 1.15fr);
    gap: 56px;
    align-items: center;
    padding: 64px 0 72px;
}

.byline {
    margin: 0 0 12px;
    font-family: var(--display);
    font-weight: 600;
    color: var(--muted);
}

.hero h1 {
    margin: 0 0 20px;
    font-size: clamp(2.75rem, 6.5vw, 5rem);
    font-weight: 800;
    line-height: 0.98;
    letter-spacing: -0.03em;
}

.deck {
    margin: 0 0 24px;
    font-size: 1.25rem;
    max-width: 30em;
}

.source-link {
    margin: 0;
    font-size: 0.95rem;
    color: var(--muted);
}

.hero-art {
    position: relative;
    margin: 0;
}

.hero-art::before {
    content: '';
    position: absolute;
    inset: 0;
    transform: translate(18px, 18px);
    background: var(--straw);
    clip-path: polygon(0 8%, 14% 0, 100% 0, 100% 90%, 86% 100%, 0 100%);
}

.image-wrapper {
    position: relative;
    clip-path: polygon(0 8%, 14% 0, 100% 0, 100% 90%, 86% 100%, 0 100%);
    background: var(--paper);
}

.image-wrapper img {
    display: block;
    width: 100%;
    height: auto;
}

/* Section headings */
.section-title {
    margin: 0 0 24px;
    font-size: 2rem;
}

/* Explore tabs */
.interactive-panel {
    border-top: 3px solid var(--tide);
    padding: 32px 0 64px;
}

.interactive-panel h2 {
    margin: 0 0 24px;
    font-size: 2rem;
}

.tabs {
    display: flex;
    gap: 28px;
    flex-wrap: wrap;
    border-bottom: 1px solid var(--rule);
    margin-bottom: 28px;
}

.tab-btn {
    background: none;
    border: 0;
    border-bottom: 4px solid transparent;
    margin-bottom: -1px;
    padding: 8px 0 10px;
    font-family: var(--display);
    font-size: 1.05rem;
    font-weight: 600;
    color: var(--muted);
    cursor: pointer;
}

.tab-btn:hover {
    color: var(--tide);
}

.tab-btn.active {
    color: var(--tide);
    border-bottom-color: var(--crab);
}

.tab-content {
    display: none;
    max-width: 38em;
    min-height: 96px;
}

.tab-content.active {
    display: block;
    animation: reveal 0.3s ease;
}

.tab-content p {
    margin: 0;
    font-size: 1.25rem;
}

@keyframes reveal {
    from { opacity: 0; }
    to { opacity: 1; }
}

/* About the artist, video and quote */
.details-grid {
    display: grid;
    grid-template-columns: minmax(0, 1.1fr) minmax(0, 0.9fr);
    gap: 56px;
    align-items: start;
    border-top: 1px solid var(--rule);
    padding: 56px 0 64px;
}

.details-content h2 {
    margin: 0 0 20px;
    font-size: 2rem;
}

.details-content p {
    margin: 0 0 1.1em;
    max-width: 36em;
}

.right-column {
    display: flex;
    flex-direction: column;
    gap: 32px;
}

.video-wrapper {
    position: relative;
    aspect-ratio: 16 / 9;
    background: var(--ink);
    overflow: hidden;
    clip-path: polygon(0 0, calc(100% - var(--cut)) 0, 100% var(--cut), 100% 100%, var(--cut) 100%, 0 calc(100% - var(--cut)));
}

.video-cover {
    position: absolute;
    inset: 0;
    z-index: 2;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    background:
        linear-gradient(rgba(15, 59, 63, 0.35), rgba(15, 59, 63, 0.75)),
        url('https://i.ibb.co/3mx7fWR3/anita-magsaysay-ho-women-with-baskets-fish-and-crab.jpg') center / cover no-repeat;
    transition: opacity 0.4s ease;
}

.video-cover p {
    margin: 12px 0 0;
    font-family: var(--display);
    font-size: 1.1rem;
    font-weight: 700;
    color: #fff;
}

.play-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 68px;
    height: 68px;
    background: var(--straw);
    clip-path: polygon(0 12%, 12% 0, 100% 0, 100% 88%, 88% 100%, 0 100%);
    transition: transform 0.2s ease;
}

.play-btn::after {
    content: '';
    margin-left: 5px;
    border-style: solid;
    border-width: 11px 0 11px 18px;
    border-color: transparent transparent transparent var(--tide);
}

.video-cover:hover .play-btn {
    transform: scale(1.1);
}

iframe {
    display: block;
    width: 100%;
    height: 100%;
    border: 0;
}

.quote-card {
    margin: 0;
    padding: 4px 0 4px 24px;
    border-left: 6px solid var(--straw);
}

.quote-card blockquote {
    margin: 0;
    font-size: 1.4rem;
    font-style: italic;
    line-height: 1.45;
    color: var(--tide);
}

.quote-card cite {
    display: block;
    margin-top: 12px;
    font-family: var(--display);
    font-size: 0.95rem;
    font-style: normal;
    font-weight: 600;
    color: var(--muted);
}

/* Artwork information */
.specs-card {
    border-top: 1px solid var(--rule);
    padding: 56px 0 64px;
}

.specs-card h3 {
    margin: 0 0 20px;
    font-size: 2rem;
}

.specs-table {
    width: 100%;
    max-width: 40em;
    border-collapse: collapse;
}

.specs-table td {
    padding: 14px 16px 14px 0;
    border-bottom: 1px solid var(--rule);
    vertical-align: top;
}

.specs-table td:first-child {
    width: 34%;
    font-family: var(--display);
    font-weight: 700;
    color: var(--tide);
}

.specs-table tr:last-child td {
    border-bottom: 0;
}

/* Quiz */
.quiz-container {
    background: var(--paper);
    border: 3px solid var(--tide);
    box-shadow: 10px 10px 0 var(--straw);
    padding: 40px;
    max-width: 720px;
}

.quiz-container h2 {
    margin: 0 0 8px;
    font-size: 2rem;
}

.quiz-container > p {
    margin: 0 0 20px;
    text-align: left !important;
    color: var(--muted);
}

#quiz-box p {
    margin: 0 0 12px;
}

.quiz-option {
    display: block;
    width: 100%;
    margin: 10px 0;
    padding: 14px 18px;
    background: #fff;
    border: 2px solid var(--rule);
    color: var(--ink);
    font-family: var(--display);
    font-size: 1.05rem;
    font-weight: 600;
    text-align: left;
    cursor: pointer;
    transition: border-color 0.15s ease, background-color 0.15s ease;
}

.quiz-option:hover:not(:disabled) {
    border-color: var(--tide);
    background: var(--salt);
}

.quiz-option.correct {
    background: #D5E8DB;
    border-color: #2F7D4F;
    color: #14452B;
}

.quiz-option.wrong {
    background: #F6DAD3;
    border-color: var(--crab);
    color: #7A2415;
}

.quiz-feedback {
    min-height: 28px;
    margin-top: 16px;
    font-family: var(--display);
    font-weight: 700;
}

.quiz-feedback.is-correct {
    color: #14452B;
}

.quiz-feedback.is-wrong {
    color: #7A2415;
}

@media (max-width: 800px) {
    body {
        font-size: 1.0625rem;
    }
    .hero,
    .details-grid {
        grid-template-columns: 1fr;
        gap: 40px;
    }
    .hero {
        padding: 40px 0 56px;
    }
    .hero-art::before {
        transform: translate(10px, 10px);
    }
    .quiz-container {
        padding: 28px 22px;
        box-shadow: 6px 6px 0 var(--straw);
    }
}

@media (prefers-reduced-motion: reduce) {
    html {
        scroll-behavior: auto;
    }
    .tab-content.active {
        animation: none;
    }
    .play-btn,
    .video-cover {
        transition: none;
    }
}