/* ==========================================================================
   Moira Shooter: site styles
   Edit the variables in :root to change colours, fonts and spacing site-wide.
   ========================================================================== */

@font-face {
    font-family: "Inter";
    src: url("../fonts/InterVariable.woff2") format("woff2");
    font-weight: 100 900;
    font-display: swap;
}

:root {
    --accent: #4a6b5a;
    --accent-2: #b5654a;
    --accent-ink: #ffffff;
    --bg: #faf6f0;
    --surface: #fffdf9;
    --text: #2b2a28;
    --muted: #6b655d;
    --border: #e8e0d4;
    --shadow: 0 1px 2px rgba(60, 45, 30, .05), 0 6px 18px rgba(60, 45, 30, .05);
    --radius: 12px;
    --font: "Inter", system-ui, -apple-system, "Segoe UI", Roboto, Arial, sans-serif;
    --font-display: "Iowan Old Style", "Palatino Linotype", Palatino, Georgia, serif;
    --max: 1040px;
    --nav-h: 64px;
}

/* Dark: follows the OS unless the user picked a theme with the toggle. */
@media (prefers-color-scheme: dark) {
    :root:not([data-theme="light"]) {
        --accent: #a6c7b3;
        --accent-2: #e0a58c;
        --accent-ink: #1f1d1a;
        --bg: #1f1d1a;
        --surface: #2a2723;
        --text: #f0ebe3;
        --muted: #b5ada0;
        --border: #3a362f;
        --shadow: 0 1px 2px rgba(0, 0, 0, .4), 0 6px 18px rgba(0, 0, 0, .25);
    }
}
:root[data-theme="dark"] {
    --accent: #a6c7b3;
    --accent-2: #e0a58c;
    --accent-ink: #1f1d1a;
    --bg: #1f1d1a;
    --surface: #2a2723;
    --text: #f0ebe3;
    --muted: #b5ada0;
    --border: #3a362f;
    --shadow: 0 1px 2px rgba(0, 0, 0, .4), 0 6px 18px rgba(0, 0, 0, .25);
}

*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; scroll-padding-top: calc(var(--nav-h) + 8px); -webkit-text-size-adjust: 100%; }
body {
    margin: 0;
    font-family: var(--font);
    font-size: 1.0625rem;
    line-height: 1.65;
    color: var(--text);
    background: var(--bg);
    overflow-x: hidden;
}
img { max-width: 100%; display: block; }
a { color: var(--accent); text-decoration: underline; text-decoration-thickness: 1px; text-underline-offset: 3px; }
a:hover { text-decoration-thickness: 2px; }
/* Links styled as buttons, tabs or titles don't need the underline */
.brand, .nav-links a, .social, .pill, .skip-link, .doc > p:first-child a, .card a { text-decoration: none; }
:focus-visible { outline: 3px solid var(--accent-2); outline-offset: 2px; border-radius: 4px; }
h1, h2, h3 { font-family: var(--font-display); font-weight: 600; line-height: 1.2; margin: 0 0 .5em; letter-spacing: -.01em; }
h2 { font-size: clamp(1.6rem, 3vw, 2.1rem); }
h3 { font-size: 1.15rem; }
p { margin: 0 0 1em; }

.wrap { width: min(100% - 32px, var(--max)); margin-inline: auto; }
.section { padding-block: clamp(40px, 7vw, 80px); }
.small { font-size: .875rem; color: var(--muted); }

.sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0; }
.skip-link { position: absolute; left: -999px; top: 8px; background: var(--accent); color: var(--accent-ink); padding: 8px 14px; border-radius: 8px; z-index: 100; }
.skip-link:focus { left: 8px; }

/* ---------- Navigation ---------- */
.nav {
    position: sticky; top: 0; z-index: 50; height: var(--nav-h);
    background: color-mix(in srgb, var(--bg) 82%, transparent);
    backdrop-filter: saturate(180%) blur(12px);
    -webkit-backdrop-filter: saturate(180%) blur(12px);
    border-bottom: 1px solid var(--border);
}
.nav-inner { display: flex; align-items: center; gap: 8px; height: 100%; }
.brand { font-family: var(--font-display); font-weight: 600; font-size: 1.15rem; color: var(--text); letter-spacing: -.02em; margin-right: auto; }

.nav-links { display: flex; gap: 4px; }
.nav-links a {
    color: var(--muted); font-weight: 500; font-size: .95rem;
    padding: 8px 12px; border-radius: 999px;
}
.nav-links a:hover { color: var(--text); background: color-mix(in srgb, var(--accent) 10%, transparent); }
.nav-links a.active { color: var(--accent); background: color-mix(in srgb, var(--accent) 14%, transparent); }
.icon-btn {
    width: 44px; height: 44px; display: inline-grid; place-items: center;
    border: 0; background: transparent; color: var(--text); border-radius: 50%; cursor: pointer;
}
.icon-btn:hover { background: color-mix(in srgb, var(--accent) 12%, transparent); }
.menu-btn { display: none; }

@media (max-width: 800px) {
    .menu-btn { display: inline-grid; }
    .nav-links {
        position: absolute; left: 0; right: 0; top: var(--nav-h);
        flex-direction: column; gap: 0; padding: 8px 16px 16px;
        background: var(--surface); border-bottom: 1px solid var(--border);
        box-shadow: var(--shadow);
        display: none;
    }
    .nav-links.open { display: flex; }
    .nav-links a { padding: 14px 12px; font-size: 1.05rem; border-radius: 10px; }
}

/* ---------- Hero ---------- */
.hero {
    position: relative; overflow: hidden;
    padding-block: clamp(48px, 9vw, 110px) clamp(32px, 5vw, 56px);
}

.hero-inner { display: grid; gap: 28px; align-items: center; justify-items: center; text-align: center; }
.photo {
    width: clamp(140px, 30vw, 220px); height: auto; aspect-ratio: 1; border-radius: 50%; object-fit: cover;
    box-shadow: var(--shadow);
}
.hero h1 { font-size: clamp(2.4rem, 6vw, 3.6rem); margin-bottom: .2em; }
.role { font-size: clamp(1rem, 2.2vw, 1.2rem); color: var(--accent); font-weight: 600; margin-bottom: .3em; }
.tagline { font-size: clamp(1.1rem, 2.4vw, 1.35rem); max-width: 40ch; margin-inline: auto; }
.socials { display: flex; flex-wrap: wrap; gap: 10px; justify-content: center; }
.social {
    display: inline-flex; align-items: center; gap: 8px; min-height: 44px; padding: 0 16px;
    border-radius: 999px; background: var(--surface); border: 1px solid var(--border);
    color: var(--text); font-weight: 600; font-size: .95rem; box-shadow: none;
    transition: border-color .15s ease;
}
.social:hover { border-color: var(--accent); }
.social svg { width: 20px; height: 20px; fill: currentColor; }

@media (min-width: 900px) {
    .hero-inner { grid-template-columns: auto 1fr; gap: 56px; text-align: left; justify-items: start; }
    .tagline { margin-inline: 0; }
    .socials { justify-content: flex-start; }
}

/* ---------- About ---------- */
.about { display: grid; gap: 28px; }
.about-text { max-width: 68ch; }
.tags { display: flex; flex-wrap: wrap; gap: 8px; list-style: none; padding: 0; margin: 0; align-content: flex-start; }
.tag {
    padding: 7px 14px; border-radius: 999px; font-weight: 500; font-size: .92rem;
    background: color-mix(in srgb, var(--accent) 12%, var(--surface)); color: var(--accent);
}
.about h3 { margin-bottom: .6em; }
@media (min-width: 900px) { .about { grid-template-columns: 1.6fr 1fr; gap: 56px; } }

/* ---------- Cards ---------- */
.section-note { color: var(--muted); margin: -.2em 0 1.6em; }
.grid { display: grid; gap: 20px; }
.cards { grid-template-columns: repeat(auto-fill, minmax(min(100%, 320px), 1fr)); }
.card {
    display: flex; flex-direction: column; background: var(--surface);
    border: 1px solid var(--border); border-radius: var(--radius); overflow: hidden;
    box-shadow: var(--shadow); transition: border-color .2s ease;
}
.card:hover { border-color: var(--accent); }
.card-media { aspect-ratio: 16 / 9; background: color-mix(in srgb, var(--accent) 8%, var(--surface)); overflow: hidden; }
.card-media img { width: 100%; height: 100%; object-fit: cover; }
.card-body { padding: 18px 20px 20px; display: flex; flex-direction: column; flex: 1; }
.card-body h3 { margin-bottom: .4em; }
.meta { font-size: .9rem; color: var(--muted); margin-bottom: 14px; }
.badge {
    align-self: flex-start; font-size: .78rem; font-weight: 600; padding: 4px 10px; border-radius: 999px; margin-bottom: 10px;
    background: color-mix(in srgb, var(--accent-2) 18%, var(--surface)); color: var(--accent-2);
}
.pills { display: flex; flex-wrap: wrap; gap: 8px; margin-top: auto; }
.pill {
    display: inline-flex; align-items: center; min-height: 36px; padding: 0 14px; border-radius: 999px;
    font-size: .88rem; font-weight: 600; border: 1px solid var(--accent); color: var(--accent);
}
.pill:hover { background: var(--accent); color: var(--accent-ink); }
.pill.disabled { border-color: var(--border); color: var(--muted); pointer-events: none; }

/* ---------- Timeline ---------- */
.timeline { list-style: none; margin: 0; padding: 0 0 0 22px; border-left: 2px solid var(--border); display: grid; gap: 24px; }
.t-item { position: relative; background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); padding: 18px 20px; box-shadow: var(--shadow); }
.t-item::before {
    content: ""; position: absolute; left: -31px; top: 24px; width: 14px; height: 14px; border-radius: 50%;
    background: var(--accent); border: 3px solid var(--bg);
}
.t-dates { font-size: .85rem; font-weight: 600; color: var(--accent); letter-spacing: .03em; }
.t-item h3 { margin: .2em 0; }
.t-item p { margin: 0; color: var(--muted); font-size: .95rem; }

/* ---------- Service ---------- */
.service { grid-template-columns: repeat(auto-fit, minmax(min(100%, 300px), 1fr)); }
.panel { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); padding: 22px; box-shadow: var(--shadow); }
.panel > h3 { color: var(--accent); font-family: var(--font); text-transform: uppercase; font-size: .8rem; letter-spacing: .08em; margin-bottom: 1em; }
.panel .item + .item { margin-top: 18px; padding-top: 18px; border-top: 1px solid var(--border); }
.panel .item a { font-weight: 600; font-size: .9rem; }
.panel .item h4 { margin: 0 0 .3em; font-size: 1rem; }
.panel .item p { margin: 0 0 .5em; color: var(--muted); font-size: .93rem; white-space: pre-line; }

/* ---------- Footer ---------- */
.footer { border-top: 1px solid var(--border); padding-block: 32px; text-align: center; margin-top: 40px; }
.footer p { margin: 0 0 6px; }

/* ---------- Reveal on scroll ---------- */
.js .reveal { opacity: 0; transform: translateY(18px); transition: opacity .6s ease, transform .6s ease; }
.js .reveal.in { opacity: 1; transform: none; }
@media (prefers-reduced-motion: reduce) {
    html { scroll-behavior: auto; }
    *, *::before, *::after { animation: none !important; transition: none !important; }
    .js .reveal { opacity: 1; transform: none; }
}

/* ---------- Legal sub-pages ---------- */
.doc { max-width: 760px; padding-block: 48px; }
.doc h1 { font-size: 2rem; }
.doc h2 { font-size: 1.3rem; margin-top: 1.8em; }
.doc li { margin-bottom: .4em; }
