/*
Theme Name:   Grove Portfolio
Theme URI:    https://the-grove.audio
Description:  Portfolio block theme for a game audio studio: dark moss photo backdrop, interface sounds, credits grid with filters, demo reel and contact form. Edit everything visually in Appearance > Editor.
Version:      2.1.5
Requires at least: 6.6
Requires PHP: 8.0
License:      GNU General Public License v2 or later
License URI:  https://www.gnu.org/licenses/gpl-2.0.html
Text Domain:  grove-portfolio
*/

:root {
  /* Moss palette, sampled from the background photo: dark bokeh, lit moss */
  --bg: #0f1210;
  --bg-raised: rgba(20, 25, 21, .62);
  --bg-sunken: rgba(9, 12, 10, .72);
  --line: rgba(214, 228, 206, .13);
  --text: #e8ece4;
  --text-dim: #a3ae9f;
  --accent: #a3c95a;      /* sunlit moss */
  --accent-2: #e08a62;    /* errors: warm lichen */
  --on-accent: #10160c;   /* text on moss-green buttons */
  color-scheme: dark;     /* dark scrollbars, form controls and drop-down lists */
  --radius: 14px;
  --max: 1120px;
  --font-body: "Inter", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  --font-display: "Space Grotesk", var(--font-body);
  --font-mono: "JetBrains Mono", ui-monospace, Consolas, monospace;
}

*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: var(--font-body);
  font-size: 17px;
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}
main { flex: 1; }
img, video, iframe { max-width: 100%; display: block; }
a { color: var(--accent); text-decoration: none; }
a:hover { text-decoration: underline; }
h1, h2, h3 { font-family: var(--font-display); line-height: 1.15; margin: 0 0 .5em; letter-spacing: -0.01em; }
h1 { font-size: clamp(2.4rem, 6vw, 4.5rem); }
h2 { font-size: clamp(1.6rem, 3.5vw, 2.4rem); }
h3 { font-size: 1.2rem; }
p { margin: 0 0 1em; }
.mono { font-family: var(--font-mono); font-size: .85em; letter-spacing: .04em; }
.dim { color: var(--text-dim); }
.wrap { width: 100%; max-width: var(--max); margin: 0 auto; padding: 0 24px; }
@media (max-width: 600px) { .wrap { padding: 0 16px; } }

:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; border-radius: 4px; }
.skip-link { position: absolute; left: -999px; top: 8px; background: var(--accent); color: var(--on-accent); padding: 8px 14px; border-radius: 8px; z-index: 100; }
.skip-link:focus { left: 8px; }

/* ---------- Header / nav ---------- */
.site-header {
  position: sticky; top: 0; z-index: 50;
  border-bottom: 1px solid var(--line);
}
/* The frosted-glass blur sits on a background layer: putting it on the header itself
   would trap the full-screen phone menu inside the header bar. */
.site-header::before {
  content: ""; position: absolute; inset: 0; z-index: -1;
  background: color-mix(in srgb, var(--bg) 82%, transparent);
  -webkit-backdrop-filter: blur(10px); backdrop-filter: blur(10px);
}
.site-header .wrap { display: flex; align-items: center; justify-content: space-between; height: 68px; gap: 16px; }
/* Site title (Site Title block) */
.brand { margin: 0; font-family: var(--font-display); font-weight: 700; font-size: 1.15rem; line-height: 1; white-space: nowrap; }
.brand a { color: var(--text); display: inline-flex; align-items: center; text-decoration: none; }

/* Navigation block */
.site-header .wp-block-navigation { margin-left: auto; font-size: .95rem; font-weight: 500; }
.site-header .wp-block-navigation .wp-block-navigation__container { gap: 4px; }
.site-header .wp-block-navigation-item__content {
  color: var(--text-dim); padding: 8px 12px !important; border-radius: 8px; text-decoration: none;
  transition: color .2s, background .2s;
}
.site-header .wp-block-navigation-item__content:hover { color: var(--text); background: var(--bg-raised); text-decoration: none; }
.site-header .wp-block-navigation-item__content[aria-current="page"] { color: var(--accent); }
.site-header .wp-block-navigation__responsive-container-open,
.site-header .wp-block-navigation__responsive-container-close { color: var(--text); }
.site-header .wp-block-navigation__responsive-container.is-menu-open {
  background: var(--bg) !important; color: var(--text) !important; padding: 24px;
}
.site-header .wp-block-navigation__responsive-container.is-menu-open .wp-block-navigation-item__content { font-size: 1.3rem; padding: 12px !important; }
.site-header .wp-block-navigation__responsive-container.is-menu-open .wp-block-navigation__responsive-container-content,
.site-header .wp-block-navigation__responsive-container.is-menu-open .wp-block-navigation__container { align-items: flex-start !important; }
.admin-bar .wp-block-navigation__responsive-container.is-menu-open { top: 46px; }
@media (min-width: 783px) { .admin-bar .wp-block-navigation__responsive-container.is-menu-open { top: 32px; } }

.icon-btn {
  background: var(--bg-raised); border: 1px solid var(--line); color: var(--text-dim);
  width: 40px; height: 40px; border-radius: 10px; display: inline-grid; place-items: center;
  cursor: pointer; transition: color .2s, border-color .2s;
}
.icon-btn:hover { color: var(--text); border-color: var(--accent); }
.icon-btn[aria-pressed="true"] { color: var(--accent); border-color: var(--accent); }
.icon-btn svg { width: 18px; height: 18px; }
.sfx-btn { flex: none; }

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex; align-items: center; gap: 10px;
  padding: 13px 22px; border-radius: 999px; font-weight: 600; font-size: .98rem;
  border: 1px solid var(--accent); background: var(--accent); color: var(--on-accent);
  cursor: pointer; transition: transform .15s, box-shadow .2s, background .2s, color .2s;
  font-family: inherit;
}
.btn:hover { text-decoration: none; transform: translateY(-2px); box-shadow: 0 10px 26px -10px color-mix(in srgb, var(--accent) 70%, transparent); }
.btn.ghost { background: transparent; color: var(--text); border-color: var(--line); }
.btn.ghost:hover { border-color: var(--accent); color: var(--accent); box-shadow: none; }
.btn[disabled] { opacity: .6; cursor: progress; transform: none; }

/* ---------- Sections ---------- */
.section { padding: 96px 0; }
.section.tight { padding: 56px 0; }
.page-head { padding: 80px 0 32px; }
.eyebrow { font-family: var(--font-mono); color: var(--accent); font-size: .8rem; letter-spacing: .18em; text-transform: uppercase; margin-bottom: 14px; display: block; }
.lead { font-size: 1.2rem; color: var(--text-dim); max-width: 60ch; }

/* ---------- Hero ---------- */
.hero { position: relative; min-height: calc(100vh - 68px); display: grid; align-items: start; overflow: hidden; }
.hero .wrap { position: relative; z-index: 1; padding-top: clamp(48px, 14vh, 160px); padding-bottom: 80px; }
.hero h1 span, .hero h1 mark { color: var(--accent); background: none; }
.hero .lead { margin-bottom: 32px; }
.hero-cta { display: flex; flex-wrap: wrap; gap: 12px; }

/* ---------- Cards / grids ---------- */
.grid { display: grid; gap: 20px; }
.grid.cols-3 { grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); }
.card {
  background: var(--bg-raised); border: 1px solid var(--line); border-radius: var(--radius);
  padding: 28px; transition: border-color .25s, transform .25s;
}
.card:hover { border-color: color-mix(in srgb, var(--accent) 50%, var(--line)); transform: translateY(-3px); }
.card .num { font-family: var(--font-mono); color: var(--accent); font-size: .8rem; }

/* ---------- About ---------- */
.about-grid { display: grid; grid-template-columns: 340px 1fr; gap: 56px; align-items: start; }
@media (max-width: 860px) { .about-grid { grid-template-columns: 1fr; gap: 32px; } .portrait { max-width: 280px; } }
.portrait {
  aspect-ratio: 4/5; border-radius: var(--radius); border: 1px solid var(--line);
  background: linear-gradient(160deg, var(--bg-raised), var(--bg-sunken));
  display: grid; place-items: center; color: var(--text-dim); overflow: hidden;
}
.portrait img { width: 100%; height: 100%; object-fit: cover; }
.tags { display: flex; flex-wrap: wrap; gap: 8px; padding: 0; margin: 0 0 24px; list-style: none; }
.tags li { font-family: var(--font-mono); font-size: .78rem; padding: 6px 12px; border: 1px solid var(--line); border-radius: 999px; color: var(--text-dim); }

/* ---------- Credits ---------- */
.filters { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 28px; }
.chip {
  font-family: var(--font-mono); font-size: .8rem; padding: 8px 14px; border-radius: 999px;
  border: 1px solid var(--line); background: transparent; color: var(--text-dim); cursor: pointer;
}
.chip:hover { color: var(--text); }
.chip[aria-pressed="true"] { background: var(--accent); color: var(--on-accent); border-color: var(--accent); }
.credits-grid { display: grid; gap: 20px; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); }
.credit { padding: 0; overflow: hidden; display: flex; flex-direction: column; }
.credit .art {
  aspect-ratio: 16/9; background: linear-gradient(135deg, #1a2030, #0e1119);
  display: grid; place-items: center; color: var(--line); font-family: var(--font-display); font-size: 2.4rem; font-weight: 700;
}
.credit .art img { width: 100%; height: 100%; object-fit: cover; }
.credit .body { padding: 20px 22px 24px; }
.credit h3 { margin-bottom: 4px; }
.credit .meta { color: var(--text-dim); font-size: .9rem; margin-bottom: 10px; }
.credit .role { font-family: var(--font-mono); font-size: .78rem; color: var(--accent); }
.credit[hidden] { display: none; }
/* The whole card is clickable: the title's link is stretched over the card */
.credit { position: relative; cursor: pointer; }
.credit h3 a { color: inherit; text-decoration: none; }
.credit h3 a::after { content: ""; position: absolute; inset: 0; border-radius: inherit; z-index: 1; }
.credit h3 a:focus-visible { outline: none; }
.credit:has(h3 a:focus-visible) { outline: 2px solid var(--accent); outline-offset: 3px; }
.credit:hover h3 a { color: var(--accent); }
.credit .edit-link { position: relative; z-index: 2; }

/* ---------- Reel ---------- */
.video-frame {
  position: relative; aspect-ratio: 16/9; border-radius: var(--radius); overflow: hidden;
  border: 1px solid var(--line); background: var(--bg-sunken);
}
.video-frame iframe, .video-frame video { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; }
.video-placeholder { position: absolute; inset: 0; display: grid; place-items: center; text-align: center; color: var(--text-dim); padding: 24px; }
.reel-list { list-style: none; padding: 0; margin: 0; display: grid; gap: 12px; }
.reel-list li { display: grid; grid-template-columns: 90px 1fr; gap: 16px; padding: 16px 20px; border: 1px solid var(--line); border-radius: 12px; background: var(--bg-raised); }
.reel-list .t { font-family: var(--font-mono); color: var(--accent); }

/* ---------- Contact ---------- */
.contact-grid { display: grid; grid-template-columns: 1fr 1.4fr; gap: 56px; }
@media (max-width: 860px) { .contact-grid { grid-template-columns: 1fr; gap: 32px; } }
.form { display: grid; gap: 18px; }
.field { display: grid; gap: 6px; }
.field label { font-size: .9rem; font-weight: 600; }
.field input, .field select, .field textarea {
  font: inherit; color: var(--text); background: var(--bg-sunken);
  border: 1px solid var(--line); border-radius: 10px; padding: 12px 14px; width: 100%;
  transition: border-color .2s, box-shadow .2s;
}
.field textarea { min-height: 170px; resize: vertical; }
.field input:focus, .field select:focus, .field textarea:focus { outline: none; border-color: var(--accent); box-shadow: 0 0 0 3px color-mix(in srgb, var(--accent) 22%, transparent); }
.row-2 { display: grid; grid-template-columns: 1fr 1fr; gap: 18px; }
@media (max-width: 600px) { .row-2 { grid-template-columns: 1fr; } }
.hp { position: absolute; left: -9999px; width: 1px; height: 1px; overflow: hidden; }
.form-status { min-height: 1.5em; font-size: .95rem; }
.form-status.ok { color: var(--accent); }
.form-status.err { color: var(--accent-2); }
.contact-links { list-style: none; padding: 0; margin: 24px 0 0; display: grid; gap: 10px; }

/* ---------- Footer ---------- */
.site-footer { padding: 32px 0; color: var(--text-dim); font-size: .9rem; }
.site-footer .wrap { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 12px; }
.site-footer a { color: var(--text-dim); }
.site-footer a:hover { color: var(--accent); }

/* ---------- Reveal-on-scroll animation ---------- */
.reveal { opacity: 0; transform: translateY(24px); transition: opacity .7s ease, transform .7s ease; }
.reveal.in { opacity: 1; transform: none; }

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; scroll-behavior: auto !important; }
  .reveal { opacity: 1; transform: none; }
}

/* =========================================================
   WordPress-specific styles: menus, editor content, blocks.
   ========================================================= */

/* Sticky header sits below the WordPress admin bar when logged in */
.admin-bar .site-header { top: 32px; }
@media (max-width: 782px) { .admin-bar .site-header { top: 46px; } }

.screen-reader-text {
  border: 0; clip: rect(1px,1px,1px,1px); clip-path: inset(50%);
  height: 1px; margin: -1px; overflow: hidden; padding: 0; position: absolute; width: 1px; word-wrap: normal !important;
}

/* ---------- Block-theme layout ----------
   Templates use plain Group blocks with the same class names as before
   (wrap, section, page-head, hero...). These rules keep WordPress's own
   spacing from fighting the design. */
.wp-site-blocks { display: flex; flex-direction: column; min-height: 100vh; }
.wp-site-blocks > main, .wp-site-blocks > #main { flex: 1; }
.wp-site-blocks > * + * { margin-block-start: 0 !important; }
main.wp-block-group > * { margin-block-start: 0 !important; }
.site-header .wrap > *, .site-footer .wrap > * { margin: 0 !important; }
.site-footer p { margin: 0; }
.section .wrap > * + *, .page-head .wrap > * + * { margin-block-start: 1.1rem; }
.page-head .wrap > .eyebrow + h1 { margin-block-start: 0; }
.hero .wrap > * { margin-block-start: 0; }
.hero .eyebrow { margin-bottom: 14px; }
.hero .wp-block-buttons { margin-top: 8px; }
.page-head + .section { padding-top: 16px; }
.lead { margin-top: 0; }

/* About: photo + text */
.about-grid > .portrait { margin: 0; }
.about-grid .portrait img { width: 100%; aspect-ratio: 4 / 5; object-fit: cover; border-radius: var(--radius); border: 1px solid var(--line); }
.about-text > * + * { margin-block-start: 1em; }
.about-text h3 { margin-top: 1.8em; }
.about-text .tags { margin-top: .6em; }
.about-text .wp-block-buttons { margin-top: 1.6em; }

/* Credits cards */
.credits-grid > .credit { margin: 0 !important; }
.credit .cover { margin: 0; }
.credit .cover img { width: 100%; aspect-ratio: 16 / 9; object-fit: cover; display: block; border-radius: 0; }
.credit .body > * { margin: 0; }
.credit .body h3 { margin-bottom: 4px; }
.credit .body .meta { margin-bottom: 10px; }
.credit .credit-type { margin-top: 12px; font-family: var(--font-mono); font-size: .72rem; color: var(--text-dim); letter-spacing: .06em; text-transform: uppercase; }
.filters { margin-bottom: 28px !important; }

/* Contact */
.contact-grid > * { margin: 0 !important; }
.contact-text > * + * { margin-block-start: 1em; }
.wp-block-grove-contact-form { margin: 0; }

/* Reel breakdown list */
.breakdown { list-style: none; padding: 0; display: grid; gap: 10px; }
.breakdown li { padding: 14px 18px; border: 1px solid var(--line); border-radius: 12px; background: var(--bg-raised); margin: 0; }

/* Generic pages and posts */
.wp-block-post-title { margin: 0; }
.post-list { list-style: none; padding: 0; }

/* ---------- Text written in the WordPress editor ---------- */
.entry > * { margin-top: 0; margin-bottom: 1.1em; }
.entry > *:last-child { margin-bottom: 0; }
.entry h2 { margin-top: 1.6em; }
.entry h3 { margin-top: 1.4em; }
.entry h2:first-child, .entry h3:first-child { margin-top: 0; }
.entry ul, .entry ol { padding-left: 1.3em; }
.entry li { margin-bottom: .35em; }
.entry img { border-radius: var(--radius); height: auto; }
.entry figure { margin-left: 0; margin-right: 0; }
.entry figcaption, .entry .wp-element-caption { color: var(--text-dim); font-size: .88rem; margin-top: 8px; }
.entry blockquote, .entry .wp-block-quote {
  border-left: 3px solid var(--accent); margin-left: 0; padding: 4px 0 4px 20px; color: var(--text-dim); font-size: 1.1rem;
}
.entry hr, .entry .wp-block-separator { border: 0; border-top: 1px solid var(--line); margin: 2.4em 0; }
.entry .has-large-font-size { font-size: 1.25rem; color: var(--text-dim); }
.entry > p:first-child.is-style-lead, .entry .is-style-lead { font-size: 1.2rem; color: var(--text-dim); }
.entry a { text-decoration: underline; text-underline-offset: 3px; }
.entry a:hover { color: var(--text); }

/* Buttons block matches the site's buttons */
.wp-block-buttons { display: flex; flex-wrap: wrap; gap: 12px; }
.wp-block-button__link, .entry .wp-block-button__link {
  display: inline-flex; align-items: center; gap: 10px; padding: 13px 22px; border-radius: 999px; font-weight: 600;
  border: 1px solid var(--accent); background: var(--accent); color: var(--on-accent); text-decoration: none;
  transition: transform .15s, box-shadow .2s;
}
.wp-block-button__link:hover { color: var(--on-accent); transform: translateY(-2px); box-shadow: 0 10px 26px -10px color-mix(in srgb, var(--accent) 70%, transparent); }
.wp-block-button.is-style-outline .wp-block-button__link { background: transparent; color: var(--text); border-color: var(--line); }
.wp-block-button.is-style-outline .wp-block-button__link:hover { color: var(--accent); border-color: var(--accent); box-shadow: none; }

/* Video embeds (YouTube / Vimeo) and uploaded video */
.wp-block-embed, .wp-block-video { margin-bottom: 2em; }
.wp-block-embed__wrapper, .wp-block-video video {
  border-radius: var(--radius); overflow: hidden; border: 1px solid var(--line); background: var(--bg-sunken);
}
.wp-block-video video { width: 100%; }

/* Home page: Columns blocks become cards */
.home-content .wp-block-columns { display: grid; grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); gap: 20px; margin: 36px 0; }
.home-content .wp-block-column {
  background: var(--bg-raised); border: 1px solid var(--line); border-radius: var(--radius); padding: 28px;
  transition: border-color .25s, transform .25s; margin: 0 !important;
}
.home-content .wp-block-column:hover { border-color: color-mix(in srgb, var(--accent) 50%, var(--line)); transform: translateY(-3px); }
.home-content .wp-block-column h3 { margin-top: 0; }
.home-content .wp-block-column p { color: var(--text-dim); margin: 0; }
.home-content > h2 + p { color: var(--text-dim); }

/* Reel: lists read as a timestamped breakdown */
.page-template-template-reel .entry ul { list-style: none; padding: 0; display: grid; gap: 10px; }
.page-template-template-reel .entry ul li {
  padding: 14px 18px; border: 1px solid var(--line); border-radius: 12px; background: var(--bg-raised); margin: 0;
}

.notice-inline { padding: 14px 18px; border-radius: 10px; border: 1px solid var(--line); background: var(--bg-raised); }
.notice-inline.ok { border-color: var(--accent); color: var(--accent); }
.notice-inline.err { border-color: var(--accent-2); color: var(--accent-2); }

.credit .edit-link { font-size: .78rem; margin-top: 8px; display: inline-block; }
.empty-state { color: var(--text-dim); border: 1px dashed var(--line); border-radius: var(--radius); padding: 32px; text-align: center; }

/* Posts (if you ever use the blog) */
.post-list { display: grid; gap: 20px; }
.post-list .card h2 { font-size: 1.4rem; margin-bottom: .3em; }
.post-list .card h2 a { color: var(--text); }
.pagination { margin-top: 32px; display: flex; gap: 8px; flex-wrap: wrap; }
.pagination .page-numbers { padding: 8px 14px; border: 1px solid var(--line); border-radius: 8px; color: var(--text-dim); }
.pagination .current { color: var(--accent); border-color: var(--accent); }

/* About page without a photo yet: text uses the full width */
.about-grid.no-photo { grid-template-columns: 1fr; max-width: 820px; }


/* =========================================================
   Moss scenery
   - Behind every page: a real macro photo of moss (Pexels 736253),
     fixed to the window. The sharp moss sits along the bottom, the
     dark out-of-focus forest above it leaves room for text.
   - It pushes in very slowly, and a soft patch of light "breathes"
     over it, so the page feels alive without looking animated.
   Photo: assets/images/scape/moss-2560.jpg (moss-1440.jpg on phones)
   Design references: /design-references in the project folder
   ========================================================= */
/* The page colour lives on <html>; <body> stays see-through so the photo
   (drawn on body::before/::after) shows behind the content. */
body { background: transparent !important; }
html { background: var(--bg); }
body::before {
  content: ""; position: fixed; inset: -2%; z-index: -2; pointer-events: none;
  background:
    /* darken the top and the left (where the text sits); keep the moss bright */
    linear-gradient(180deg, rgba(11, 14, 12, .62) 0%, rgba(11, 14, 12, .30) 42%, rgba(11, 14, 12, 0) 68%, rgba(11, 14, 12, .18) 100%),
    linear-gradient(90deg, rgba(11, 14, 12, .45) 0%, rgba(11, 14, 12, 0) 60%),
    url("assets/images/scape/moss-2560.jpg") 62% 100% / cover no-repeat,
    var(--bg);
  transform-origin: 62% 100%;
  animation: moss-push 80s ease-in-out infinite alternate;
  /* gentle pan that follows the mouse (main.js sets --pan-x / --pan-y) */
  translate: var(--pan-x, 0px) var(--pan-y, 0px);
}
@keyframes moss-push { from { transform: scale(1); } to { transform: scale(1.06); } }
/* Fade the photo in once it has downloaded (main.js adds/removes .moss-loading) */
body::before { transition: opacity 1.6s ease; }
html.moss-loading body::before { opacity: 0; transition: none; }
/* soft light falling on the moss */
body::after {
  content: ""; position: fixed; inset: 0; z-index: -1; pointer-events: none;
  background: radial-gradient(ellipse 55% 40% at 68% 72%, rgba(200, 230, 140, .10), transparent 70%);
  animation: moss-light 14s ease-in-out infinite alternate;
}
@keyframes moss-light { from { opacity: .45; } to { opacity: 1; } }

/* Sunbeams: shafts of light fall through the canopy and light up patches of
   the moss (sunbeams.js moves them). Two layers:
   - .sun-lit:   a brighter, warmer copy of the photo, exactly over it, shown
                 only in soft pools where the light lands (sunbeams.js sets
                 the mask), so the moss itself is lit, texture and all.
   - .sun-beams: faint slanted shafts in the air, ending in those pools. */
.sun-lit {
  position: fixed; inset: -2%; z-index: -2; pointer-events: none;
  background: url("assets/images/scape/moss-2560.jpg") 62% 100% / cover no-repeat;
  filter: brightness(1.65) saturate(1.18) sepia(.14) contrast(1.04);
  /* moves exactly with the photo: same slow zoom and same mouse pan */
  transform-origin: 62% 100%;
  animation: moss-push 80s ease-in-out infinite alternate;
  translate: var(--pan-x, 0px) var(--pan-y, 0px);
  -webkit-mask-repeat: no-repeat; mask-repeat: no-repeat;
  -webkit-mask-image: linear-gradient(transparent, transparent); mask-image: linear-gradient(transparent, transparent);
  transition: opacity 1.6s ease;
}
@media (max-width: 900px) {
  .sun-lit { background-image: url("assets/images/scape/moss-1440.jpg"); background-position: 70% 100%; }
}
.sun-beams {
  position: fixed; inset: 0; width: 100%; height: 100%; z-index: -1; pointer-events: none; display: block;
  mix-blend-mode: screen;
  filter: blur(16px);           /* the canvas is quarter-size; scaled up and blurred it reads as soft light */
  translate: calc(var(--pan-x, 0px) * 1.4) calc(var(--pan-y, 0px) * 1.4);   /* a touch of depth with the mouse */
  transition: opacity 1.6s ease;
}
/* hidden until the photo has loaded, then they fade in with it */
html.moss-loading .sun-lit, html.moss-loading .sun-beams { opacity: 0; transition: none; }
/* Disable motion: the light stays where it is (sunbeams.js also stops updating it) */
html.motion-off .sun-lit { animation: none; translate: none; }
html.motion-off .sun-beams { translate: none; }

/* "Disable motion" (header button, main.js adds html.motion-off):
   everything still appears, nothing moves. */
html.motion-off body::before, html.motion-off body::after { animation: none; translate: none; transition: none; }
html.motion-off .reveal { opacity: 1 !important; transform: none !important; transition: none !important; }
html.motion-off main, html.motion-off main.page-enter, html.motion-off main.page-leave { transform: none; transition: none; }
html.motion-off .card:hover, html.motion-off .home-content .wp-block-column:hover,
html.motion-off .btn:hover, html.motion-off .wp-block-button__link:hover { transform: none; }
html.motion-off { scroll-behavior: auto; }

/* The Disable/Enable motion button at the right of the header */
.motion-btn {
  display: inline-flex; align-items: center; justify-content: center;
  flex: none; width: auto; padding: 0 12px; gap: 8px;
  font: 500 .82rem/1 var(--font-body); white-space: nowrap;
  background: rgba(12, 16, 13, .6);
}
.motion-btn .label { display: inline; }
@media (max-width: 700px) { .motion-btn { width: 40px; padding: 0; } .motion-btn .label { display: none; } }
@media (max-width: 900px) {
  body::before {
    background:
      linear-gradient(180deg, rgba(11, 14, 12, .70) 0%, rgba(11, 14, 12, .38) 50%, rgba(11, 14, 12, .05) 78%, rgba(11, 14, 12, .2) 100%),
      url("assets/images/scape/moss-1440.jpg") 70% 100% / cover no-repeat,
      var(--bg);
  }
}

/* Frosted panels so text stays readable over the photo */
.site-header { border-bottom-color: var(--line); }
.site-header::before { background: rgba(12, 15, 13, .55); }
.site-header .wp-block-navigation__responsive-container.is-menu-open { background: var(--bg) !important; }
.card, .home-content .wp-block-column, .breakdown li, .reel-list li, .notice-inline {
  -webkit-backdrop-filter: blur(12px) saturate(1.1); backdrop-filter: blur(12px) saturate(1.1);
  box-shadow: 0 1px 0 rgba(255, 255, 255, .04) inset, 0 16px 36px -20px rgba(0, 0, 0, .7);
}
.card:hover { box-shadow: 0 1px 0 rgba(255, 255, 255, .06) inset, 0 22px 44px -20px rgba(0, 0, 0, .8); }
/* About page: photo and text sit together on one frosted card, like the Credits cards */
.about-grid.wrap {
  max-width: calc(var(--max) - 48px);
  padding: clamp(24px, 4vw, 44px);
  background: rgba(14, 18, 15, .72);
  border: 1px solid var(--line); border-radius: calc(var(--radius) + 4px);
  -webkit-backdrop-filter: blur(14px) saturate(1.1); backdrop-filter: blur(14px) saturate(1.1);
  box-shadow: 0 1px 0 rgba(255, 255, 255, .04) inset, 0 24px 60px -28px rgba(0, 0, 0, .85);
}
.about-grid .about-text { text-shadow: none; }
@media (max-width: 600px) { .about-grid.wrap { width: calc(100% - 32px); } }

/* Tag bubbles and filter chips: solid dark "pebbles" so they stay readable over bright moss */
.tags li, .chip {
  background: rgba(12, 16, 13, .78);
  border-color: rgba(163, 201, 90, .28);
  -webkit-backdrop-filter: blur(10px); backdrop-filter: blur(10px);
  box-shadow: 0 6px 18px -10px rgba(0, 0, 0, .8);
}
.tags li { color: var(--text); font-size: .84rem; font-weight: 500; letter-spacing: .02em; padding: 7px 14px; }
.chip { color: #c9d2c4; }
.chip:hover { color: var(--text); border-color: rgba(163, 201, 90, .5); }
.wp-block-embed__wrapper, .wp-block-video video { background: #0b0e0c; }

/* Plain text sitting directly on the page gets a soft dark halo */
.page-head .wrap, .section .wrap, .hero .wrap { text-shadow: 0 1px 20px rgba(5, 8, 6, .65); }
.card, .btn, .wp-block-button__link, .chip, .tags li, input, textarea, select { text-shadow: none; }

/* Footer rests on the moss: a dark wash keeps the text readable */
.site-footer {
  position: relative; color: var(--text-dim); padding: 120px 0 28px;
  background: linear-gradient(180deg, rgba(8, 11, 9, 0), rgba(8, 11, 9, .78) 70%);
}
.site-footer a { color: var(--text); }
.site-footer a:hover { color: var(--accent); }
@media (max-width: 600px) { .site-footer { padding-top: 72px; } }

/* =========================================================
   Page transitions (see main.js): the content fades out, the
   next page's content fades in. Header, background photo and footer
   stay put.
   ========================================================= */
/* <main> itself only slides: fading or blurring it would stop the frosted cards
   blurring the photo until the transition ends. The fading happens on the
   individual .reveal pieces instead (new ones fade in as they are revealed). */
main { transition: transform .45s ease; }
main.page-enter { transform: translateY(10px); transition: none; }
main.page-leave { transform: translateY(-8px); transition-duration: .26s; }
main.page-leave .reveal { opacity: 0; transition: opacity .26s ease, transform .26s ease; transition-delay: 0s !important; }
main:focus { outline: none; }
html.is-navigating { cursor: progress; }
@media (prefers-reduced-motion: reduce) {
  main, main.page-leave, main.page-enter { transform: none; }
}
