/* ─────────────────────────────────────────────────────────────────────────────
   HOME PAGE (index.html) + STUDIO HOURS (studiohours.html)
   The home page is a stack of full-width colour bands. Each band is one hue in
   two strengths — a ground and a type colour — plus, at most, one accent
   borrowed from elsewhere on the page.

   This sheet is loaded by index.html and studiohours.html, which share the
   header and footer markup below. The portfolio pages use main.css /
   navbar.css, whose header and footer are styled to match.
   ───────────────────────────────────────────────────────────────────────── */

:root {
    /* ── Intro: light + dark green, maroon accent ── */
    --intro-ground: #E1F3E4;
    --intro-ink: #0B5A34;
    --intro-display: #0B6E3F;   /* "Hi, I'm Nancy." */
    --maroon: #8A1C2C;          /* intro buttons, header, a Writings marker */

    /* ── Header: tomato bar, light yellow type ── */
    --header-ground: #BD1F0E;
    --header-ink: #FFF4B8;

    /* ── Zafiro: deep purple + pale lavender, yellow accent ── */
    --zafiro-ground: #4A3AFF;
    --zafiro-ink: #F1EDFF;
    --zafiro-accent: #FFD25E;
    --zafiro-accent-ink: #2A1FA8;

    /* ── Book: the cover's peach + brick, green accent ── */
    --book-ground: #FCE3CF;
    --book-ink: #A63D17;
    --book-accent: #0B6E3F;

    /* ── Word Llama: golden yellow + dark brown, the app's cream ── */
    --llama-ground: #F5C043;
    --llama-ink: #4A3210;
    --llama-cream: #FBF4E9;

    /* ── Sandbox: kelly-dark green + mint ── */
    --sandbox-ground: #0B6E3F;
    --sandbox-ink: #DDF5E4;

    /* ── Selected Writings: very light blue + bright blue ── */
    --writing-ground: #EAF3FF;
    --writing-ink: #1A5CFF;
    /* The little markers beside each article, in order. */
    --marker-1: #0B6E3F;
    --marker-2: #F5C043;
    --marker-3: #5757FF;
    --marker-4: #8A1C2C;
    --marker-5: #0B6E3F;
    --marker-6: #B9A3FF;

    /* ── Footer ── */
    --footer-ground: #04006F;
    --white: #FFFFFF;

    /* ── Type ── */
    --font-display: 'Young Serif', Georgia, serif;
    --font-body: 'Quicksand', 'Avenir', 'Avenir Next', sans-serif;

    /* ── Layout ── */
    --gutter: clamp(24px, 7vw, 120px);
    --content-width: 1120px;
}

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

html {
    scroll-behavior: smooth;
}

body {
    margin: 0;
    font-family: var(--font-body);
    font-weight: 400;
    font-size: 17px;
    line-height: 1.6;
    color: var(--intro-ink);
    background: var(--footer-ground);
    overflow-x: hidden;
}

img {
    max-width: 100%;
}

a {
    color: inherit;
}

a:hover {
    opacity: 0.82;
}

a:focus-visible {
    outline: 3px solid currentColor;
    outline-offset: 3px;
}

p {
    margin: 0;
}

h1,
h2 {
    margin: 0;
    font-family: var(--font-display);
    font-weight: 400;
}

cite {
    font-style: normal;
}

/* ── Shared pieces ───────────────────────────────────────────────────────── */

.band {
    padding: 80px var(--gutter);
    scroll-margin-top: 0;
}

.band-inner {
    max-width: var(--content-width);
    margin: 0 auto;
}

/* Text beside a picture; stacks once there isn't room for both. */
.split {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 48px 64px;
}

.split-text {
    flex: 1 1 380px;
    min-width: 0;
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 20px;
}

.eyebrow {
    font-weight: 700;
    font-size: 14px;
    letter-spacing: 0.12em;
    text-transform: uppercase;
}

.band h2 {
    font-size: clamp(34px, 4.2vw, 50px);
    line-height: 1.05;
}

.button-row {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
}

.button {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    min-height: 46px;
    padding: 0 24px;
    border: 2px solid transparent;
    border-radius: 999px;
    font-size: 16px;
    font-weight: 700;
    text-decoration: none;
}

.button svg {
    width: 18px;
    height: 18px;
    flex: none;
}

/* A picture with a solid block of colour peeking out from behind it. */
.offset {
    position: relative;
    display: block;
}

.offset::before {
    content: "";
    position: absolute;
    width: 100%;
    height: 100%;
    border-radius: inherit;
    background: var(--offset-color);
}

.offset > * {
    position: relative;
}

/* ── Header ──────────────────────────────────────────────────────────────── */

.site-header {
    padding: 8px var(--gutter);
    background: var(--header-ground);
    color: var(--header-ink);
}

.site-header .band-inner {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    gap: 12px 32px;
}

.brand {
    font-family: var(--font-display);
    font-size: 22px;
    line-height: 1.2;
    text-decoration: none;
}

.site-nav {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 2px 4px;
    font-weight: 700;
    font-size: 16px;
}

.site-nav a {
    padding: 8px 14px;
    border-radius: 999px;
    text-decoration: none;
}

/* Links are plain text at rest; the pill only appears on hover/focus. */
.site-nav a:hover,
.site-nav a:focus-visible {
    background: var(--header-ink);
    color: var(--header-ground);
    opacity: 1;
}

.site-nav a:focus-visible {
    outline: none;
}

/* Pull the row right so the last pill's edge, not its text, meets the gutter. */
.site-nav {
    margin-right: -14px;
}

/* ── Intro ───────────────────────────────────────────────────────────────── */

#about {
    padding-top: 44px;
    background: var(--intro-ground);
    color: var(--intro-ink);
}

#about .band-inner {
    max-width: 860px;
    font-size: 18px;
    font-weight: 500;
}

/* The greeting floats top-left; the bio starts to its right and then carries
   on underneath it. */
#about h1 {
    float: left;
    margin: 0 40px 12px 0;
    font-size: clamp(42px, 5.4vw, 70px);
    line-height: 1;
    letter-spacing: -0.01em;
    color: var(--intro-display);
}

#about p {
    margin-bottom: 20px;
}

#about .button-row {
    clear: both;
    padding-top: 12px;
}

#about .button,
#studio .button {
    background: var(--maroon);
    color: var(--white);
}

@media (max-width: 640px) {
    #about h1 {
        float: none;
        margin-right: 0;
    }
}

/* ── Zafiro ──────────────────────────────────────────────────────────────── */

#zafiro {
    background: var(--zafiro-ground);
    color: var(--zafiro-ink);
}

#zafiro p,
#wordllama p {
    font-weight: 500;
}

#zafiro .button {
    background: var(--zafiro-accent);
    color: var(--zafiro-accent-ink);
}

.zafiro-shot {
    flex: 1.3 1 420px;
    min-width: 0;
    border-radius: 20px;
    --offset-color: var(--zafiro-accent);
}

.zafiro-shot::before {
    right: -20px;
    bottom: -20px;
}

.zafiro-shot span {
    display: block;
    padding: 14px;
    border-radius: 20px;
    background: var(--white);
}

.zafiro-shot img {
    display: block;
    width: 100%;
    height: auto;
    border-radius: 8px;
}

/* ── Book ────────────────────────────────────────────────────────────────── */

#book {
    background: var(--book-ground);
    color: var(--book-ink);
}

#book .split {
    gap: 48px 72px;
}

#book .split-text {
    flex-basis: 420px;
}

#book h2 {
    font-size: clamp(29px, 3.5vw, 42px);
    line-height: 1.08;
}

.book-cover {
    flex: 0 1 360px;
    min-width: 0;
    margin: 0 auto;
    border-radius: 6px;
    --offset-color: var(--book-accent);
}

.book-cover::before {
    left: -20px;
    bottom: -20px;
}

.book-cover img {
    display: block;
    width: 100%;
    height: auto;
    border: 2px solid var(--book-ink);
    border-radius: 6px;
}

.available {
    font-weight: 700;
}

#book .button {
    min-height: 44px;
    padding: 0 22px;
    background: var(--book-ink);
    color: var(--white);
}

/* ── Word Llama ──────────────────────────────────────────────────────────── */

#wordllama {
    background: var(--llama-ground);
    color: var(--llama-ink);
}

#wordllama .split {
    gap: 48px 72px;
}

#wordllama .split-text {
    flex-basis: 420px;
}

#wordllama .button {
    background: var(--llama-ink);
    color: var(--llama-cream);
}

.llama-shot {
    flex: 1.1 1 380px;
    min-width: 0;
    border-radius: 20px;
    --offset-color: var(--llama-ink);
}

.llama-shot::before {
    right: -20px;
    bottom: -20px;
}

.llama-shot span {
    display: block;
    padding: 14px;
    border-radius: 20px;
    background: var(--llama-cream);
}

.llama-shot img {
    display: block;
    width: 100%;
    height: auto;
    border-radius: 8px;
}

/* ── Sandbox ─────────────────────────────────────────────────────────────── */

#sandbox {
    background: var(--sandbox-ground);
    color: var(--sandbox-ink);
}

/* The title and blurb sit in the top-right corner of the circle grid, and
   the circles fill in around them: 4 + 4 beside the text, then 8 below. */
.bubbles {
    display: grid;
    grid-template-columns: repeat(8, minmax(0, 1fr));
    grid-auto-flow: row dense;
    gap: 22px;
}

.sandbox-text {
    grid-column: 5 / -1;
    grid-row: 1 / span 2;
    align-self: center;
    display: flex;
    flex-direction: column;
    gap: 14px;
    padding-left: 12px;
}

/* The thumbnails (images/portfolio/*.png) have a pale background and a drop
   shadow baked in around their circles. Each link is a round window, and the
   image inside is oversized and nudged so only the circle shows through. */
.bubbles a {
    position: relative;
    display: block;
    aspect-ratio: 1 / 1;
    border-radius: 50%;
    overflow: hidden;
    background: var(--white);
    transition: transform 0.25s ease;
}

.bubbles img {
    position: absolute;
    left: -10.5%;
    top: -10.5%;
    width: 124%;
    max-width: none;
}

.bubbles a:hover {
    opacity: 1;
    transform: scale(-1, 1);
}

/* ── Selected Writings ───────────────────────────────────────────────────── */

#writing {
    background: var(--writing-ground);
    color: var(--writing-ink);
}

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

.writing-head > div {
    display: flex;
    flex-direction: column;
    gap: 16px;
}

#writing .button {
    min-height: 44px;
    padding: 0 22px;
    background: var(--writing-ink);
    color: var(--white);
}

.articles {
    margin: 0;
    padding: 0;
    list-style: none;
    border-top: 2px solid var(--writing-ink);
}

.articles a {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 8px 24px;
    padding: 18px 0;
    border-bottom: 2px solid var(--writing-ink);
    text-decoration: none;
}

/* Markers cycle circle, square, triangle… */
.articles a::before {
    content: "";
    flex: none;
    width: 28px;
    height: 28px;
    background: var(--marker-1);
}

.articles li:nth-child(3n+1) a::before { border-radius: 50%; }
.articles li:nth-child(3n) a::before { clip-path: polygon(50% 4%, 100% 96%, 0 96%); }
.articles li:nth-child(2) a::before { background: var(--marker-2); }
.articles li:nth-child(3) a::before { background: var(--marker-3); }
.articles li:nth-child(4) a::before { background: var(--marker-4); }
.articles li:nth-child(5) a::before { background: var(--marker-5); }
.articles li:nth-child(6) a::before { background: var(--marker-6); }

.article-text {
    flex: 1 1 380px;
    min-width: 0;
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.article-title {
    font-family: var(--font-display);
    font-size: 21px;
    line-height: 1.25;
}

.article-dek {
    font-size: 15px;
    font-weight: 500;
}

.article-source {
    flex: none;
    font-weight: 700;
    font-size: 13px;
    letter-spacing: 0.08em;
    text-transform: uppercase;
}

/* ── Studio Hours (studiohours.html) ─────────────────────────────────────
   The intro's light + dark green with maroon buttons, as one long band. */

#studio {
    flex-grow: 1;
    padding-top: 56px;
    background: var(--intro-ground);
    color: var(--intro-ink);
}

.studio-intro {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 40px 64px;
    padding-bottom: 56px;
    margin-bottom: 48px;
    border-bottom: 2px solid var(--intro-ink);
}

.studio-intro .split-text {
    flex: 1.2 1 420px;
}

#studio h1 {
    font-size: clamp(38px, 4.6vw, 56px);
    line-height: 1.05;
    color: var(--intro-display);
}

#studio .notice {
    padding: 10px 18px;
    border-radius: 12px;
    background: var(--white);
    color: var(--maroon);
    font-weight: 700;
}

.studio-art {
    flex: 1 1 320px;
    min-width: 0;
    border-radius: 12px;
    --offset-color: var(--maroon);
}

.studio-art::before {
    right: -16px;
    bottom: -16px;
}

.studio-art img {
    display: block;
    width: 100%;
    height: auto;
    border-radius: 12px;
}

.faq {
    max-width: 760px;
}

.faq h2 {
    margin: 40px 0 10px;
    font-size: 24px;
    line-height: 1.25;
    color: var(--intro-display);
}

.faq h2:first-child {
    margin-top: 0;
}

.faq p + p {
    margin-top: 12px;
}

.faq ul {
    margin: 12px 0;
    padding-left: 1.2em;
}

.faq li + li {
    margin-top: 6px;
}

.faq .button-row {
    margin-top: 28px;
}

.studio-contact {
    margin-top: 24px;
}

.studio-contact a {
    color: var(--maroon);
    font-weight: 700;
}

/* ── Footer ──────────────────────────────────────────────────────────────── */

.site-footer {
    padding: 18px var(--gutter);
    background: var(--footer-ground);
    color: var(--white);
}

.site-footer .band-inner {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    gap: 12px 32px;
}

.site-footer .brand {
    font-size: 20px;
}

.footer-links {
    display: flex;
    flex-wrap: wrap;
    gap: 4px 28px;
    font-weight: 700;
    font-size: 16px;
}

.footer-links a {
    padding: 8px 0;
    text-decoration: none;
}

@media (max-width: 600px) {
    .band {
        padding-top: 64px;
        padding-bottom: 64px;
    }
}

@media (prefers-reduced-motion: reduce) {
    html {
        scroll-behavior: auto;
    }

    .bubbles a {
        transition: none;
    }
}

/* Sixteen thumbnails: 4 across on narrow screens, so the rows come out even. */
@media (max-width: 900px) {
    .bubbles {
        grid-template-columns: repeat(4, minmax(0, 1fr));
    }

    /* Too narrow to share a row: the text goes on top, full width. */
    .sandbox-text {
        grid-column: 1 / -1;
        grid-row: auto;
        padding-left: 0;
        margin-bottom: 18px;
    }
}
