:root {
  --blue: #1f4870;
  --blue-deep: #1b3f63;
  --herring: #ecd36d;
  --lily: #a9cf8a;
  --sky: #b9dcf2;
  --bg: #fbfaf6;
  --ink: #1d2b38;
  --muted: #5b6670;
  --rule: #e4e2da;
  --sans: "Inter", "Helvetica Neue", Arial, sans-serif;
}
* { box-sizing: border-box; }
body { margin: 0; background: var(--bg); color: var(--ink); font-family: var(--sans); font-size: 17px; line-height: 1.7; -webkit-font-smoothing: antialiased; }
a { color: var(--blue); }

/* Header (sits over the painting on every page) */
.site-header { position: absolute; top: 0; left: 0; right: 0; z-index: 10; background: linear-gradient(rgba(12, 24, 40, .45), rgba(12, 24, 40, 0)); }
.site-header .inner { max-width: 1200px; margin: 0 auto; padding: 22px 24px 40px; display: flex; align-items: center; justify-content: space-between; }
.brand { text-shadow: 0 1px 8px rgba(10, 20, 40, .6); font-size: 22px; font-weight: 500; letter-spacing: 0.01em; text-decoration: none; color: var(--sky); }
.nav { display: flex; gap: 32px; }
.nav a { color: #fff; text-decoration: none; font-size: 15px; text-shadow: 0 1px 6px rgba(0,0,0,.35); }
.nav a:hover, .nav a[aria-current="page"] { text-decoration: underline; text-underline-offset: 6px; }
.menu-btn { display: none; background: none; border: 0; color: #fff; font-size: 24px; cursor: pointer; }
@media (max-width: 720px) {
  .menu-btn { display: block; }
  .nav { position: fixed; inset: 0; background: #1b2f4d; flex-direction: column; align-items: center; justify-content: center; gap: 26px; display: none; }
  .nav.open { display: flex; }
  .nav a { font-size: 28px; }
  .nav .close { position: absolute; top: 18px; right: 22px; }
}

/* Painting */
.hero, .band { position: relative; overflow: hidden; background: #1c2850; }
.hero { aspect-ratio: 1810 / 1160; max-height: 92vh; width: 100%; }
.hero-art, .band { background-image: url("herring.jpg"); background-size: cover; background-repeat: no-repeat; }
.hero-art { position: absolute; inset: 0; background-position: center top; }
.band { height: 150px; background-position: center 8%; }
.hero-text { position: absolute; left: max(24px, calc((100vw - 1200px) / 2 + 24px)); top: clamp(76px, 8.5vw, 120px); right: 24px; text-shadow: 0 1px 10px rgba(10, 20, 40, .5); }
.hero h1 { font-weight: 300; font-size: clamp(36px, 4.6vw, 66px); line-height: 1; letter-spacing: -0.02em; margin: 0 0 10px; color: var(--sky); }
.hero p { font-size: clamp(15px, 1.5vw, 19px); font-weight: 300; margin: 0; color: #fff; }
.btn { text-shadow: none; display: inline-block; background: var(--herring); color: #1b2f4d; text-decoration: none; font-weight: 500; font-size: 15px; padding: 13px 28px; border-radius: 999px; }
.btn:hover { background: #f4e08f; }
.btn.outline { background: none; color: var(--blue); border: 1.5px solid var(--blue); }
@media (max-width: 720px) {
  .hero { aspect-ratio: auto; height: 72vh; min-height: 460px; }
  .hero-art { background-position: 40% top; }
  .band { height: 110px; }
}

/* Content */
.wrap { max-width: 1000px; margin: 0 auto; padding: 0 24px; }
section.block { padding: 96px 0; }
.page-title { padding-top: 80px; padding-bottom: 24px; }
.page-title h1 { font-weight: 300; font-size: clamp(40px, 6vw, 64px); letter-spacing: -0.02em; margin: 0; color: var(--blue); }
h2 { font-weight: 300; font-size: clamp(28px, 4vw, 40px); line-height: 1.2; letter-spacing: -0.01em; color: var(--blue); margin: 0 0 24px; }
h3 { font-weight: 500; font-size: 18px; margin: 0 0 4px; color: var(--ink); }
.lede { font-size: 20px; font-weight: 300; max-width: 720px; color: var(--ink); }
.list { list-style: none; margin: 48px 0 0; padding: 0; border-top: 1px solid var(--rule); }
.list li { display: grid; grid-template-columns: 34px 1fr; gap: 14px; padding: 24px 0; border-bottom: 1px solid var(--rule); }
.list p { margin: 0; color: var(--muted); }
.list .meta { font-size: 13px; letter-spacing: .08em; text-transform: uppercase; color: var(--muted); margin-bottom: 6px; }
.pad-icon { width: 22px; height: 22px; margin-top: 4px; }
.two-col { display: grid; grid-template-columns: 1.4fr 1fr; gap: 64px; }
@media (max-width: 820px) { .two-col { grid-template-columns: 1fr; gap: 32px; } }
.facts { list-style: none; padding: 0; margin: 0; }
.facts li { padding: 14px 0; border-bottom: 1px solid var(--rule); font-size: 16px; }
.facts b { display: block; font-weight: 500; font-size: 13px; letter-spacing: .08em; text-transform: uppercase; color: var(--muted); }
.cta { text-align: center; }
.email { font-size: clamp(22px, 3.4vw, 32px); font-weight: 300; color: var(--blue); text-decoration: none; border-bottom: 1.5px solid var(--herring); word-break: break-word; }

/* Footer */
.site-footer { border-top: 1px solid var(--rule); color: var(--muted); font-size: 14px; }
.site-footer .inner { max-width: 1200px; margin: 0 auto; padding: 28px 24px; display: flex; flex-wrap: wrap; gap: 12px; justify-content: space-between; }
.site-footer a { color: var(--muted); text-decoration: none; margin-left: 20px; }
.hero .credit { position: absolute; right: 16px; bottom: 10px; margin: 0; font-size: 12px; color: rgba(255, 255, 255, .75); }

/* Lily Pad Leap game on the About page */
.game-block { padding-top: 0; }
.game-frame { position: relative; width: 100%; aspect-ratio: 16 / 9; margin-top: 28px; border-radius: 6px; overflow: hidden; background: #2c5653; }
.game-frame iframe { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; display: block; }
@media (max-width: 640px) { .game-frame { aspect-ratio: 4 / 5; } }

/* ---------- Loading animations (lily pad / water lily) ---------- */
.cf-loader-svg { width: 96px; height: 96px; overflow: visible; }
.cf-pad .cf-spin { transform-box: fill-box; transform-origin: 50% 50%; animation: cf-spin 3.2s linear infinite; }
.cf-pad .cf-ripple { transform-box: fill-box; transform-origin: center; opacity: 0; animation: cf-ripple 3.2s ease-out infinite; }
.cf-pad .cf-r2 { animation-delay: 1.6s; }
.cf-lily .cf-petal { transform-box: fill-box; transform-origin: 50% 100%; opacity: 0; animation: cf-petal 2.6s ease-in-out infinite; }
@keyframes cf-spin { to { transform: rotate(360deg); } }
@keyframes cf-ripple { 0% { transform: scale(.9); opacity: .5; } 100% { transform: scale(1.35); opacity: 0; } }
@keyframes cf-petal { 0% { transform: scale(.2); opacity: 0; } 14% { transform: scale(1); opacity: 1; } 72% { transform: scale(1); opacity: 1; } 92%, 100% { transform: scale(.85); opacity: 0; } }
@media (prefers-reduced-motion: reduce) {
  .cf-pad .cf-spin { animation-duration: 12s; }
  .cf-pad .cf-ripple { animation: none; }
  .cf-lily .cf-petal { animation: none; opacity: 1; }
}

/* Full-page loader: paper-coloured cover that fades away once the page has loaded */
.cf-page-loader { position: fixed; inset: 0; z-index: 100; display: grid; place-items: center; background: #fbfaf6; opacity: 0; animation: cf-show .25s .3s forwards, cf-failsafe 0s 6s forwards; }
@keyframes cf-show { to { opacity: 1; } }   /* only appears if loading takes longer than 0.3 s */
.cf-loaded .cf-page-loader { animation: none; opacity: 0; visibility: hidden; }
@keyframes cf-failsafe { to { opacity: 0; visibility: hidden; } }   /* never blocks the page for long, even without JavaScript */

/* Loader behind the game while it loads */
.game-frame .cf-frame-loader { position: absolute; inset: 0; display: grid; place-items: center; background: #f1e9d6; }
.game-frame iframe { opacity: 0; transition: opacity .5s; }
.game-frame iframe.cf-ready { opacity: 1; }

/* Publications list on the Portfolio page */
.pubs .pub-group { margin: 36px 0 8px; font-size: 13px; font-weight: 500; letter-spacing: .08em; text-transform: uppercase; color: var(--muted); }
.pub-list { list-style: none; margin: 0; padding: 0; border-top: 1px solid var(--rule); }
.pub-list li { padding: 12px 0; border-bottom: 1px solid var(--rule); display: grid; gap: 2px; }
.pub-list a { color: var(--blue); text-decoration: none; font-size: 17px; line-height: 1.45; }
.pub-list a:hover { text-decoration: underline; text-underline-offset: 4px; }
.pub-list span { color: var(--muted); font-size: 14px; }

/* About page: four services on hand-drawn lily pads, a water lily opening in the middle */
.pond { position: relative; margin-top: 40px; }
.pond-grid { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 18px 28px; max-width: 760px; margin-inline: auto; }
.pad-card { position: relative; aspect-ratio: 1 / 1; display: grid; place-items: center; }
.pad-card .pad-shape { position: absolute; inset: 0; width: 100%; height: 100%; overflow: visible; }
.pad-text { position: relative; max-width: 66%; text-align: center; }
.pad-text h3 { font-size: clamp(16px, 2vw, 19px); margin-bottom: 8px; color: var(--blue); }
.pad-text p { margin: 0; font-size: clamp(14px, 1.6vw, 16px); line-height: 1.5; color: var(--ink); }
.pond-lily { position: absolute; left: 50%; top: 50%; transform: translate(-50%, -50%); z-index: 2; width: clamp(110px, 15vw, 150px); pointer-events: none; }
.pond-lily .cf-loader-svg { width: 100%; height: auto; display: block; }
.pond-cta { text-align: center; margin-top: 40px; }
@media (max-width: 640px) {
  .pond-grid { grid-template-columns: 1fr; gap: 8px; max-width: 360px; }
  .pond-lily { position: static; transform: none; margin: 0 auto 8px; width: 104px; }
  .pad-text { max-width: 64%; }
}
/* keep text clear of each pad's notch (notches point toward the lily) */
.pad-card:nth-child(-n+2) .pad-text { margin-bottom: 9%; }
.pad-card:nth-child(n+3) .pad-text { margin-top: 13%; }
/* bigger, bold service titles on the About page */
.pad-text h3 { font-size: clamp(19px, 2.4vw, 23px); font-weight: 600; line-height: 1.25; margin-bottom: 10px; }
.pad-text { max-width: 70%; }
.pad-card:nth-child(n+3) .pad-text { margin-top: 18%; }
@media (max-width: 640px) { .pad-text { max-width: 66%; } }
/* Lily pads as ink drawings, each one a link to an example */
.pad-link { position: absolute; inset: 0; display: grid; place-items: center; color: inherit; text-decoration: none; border-radius: 50%; }
.pad-link .pad-shape { transition: transform .25s ease; }
.pad-link:hover .pad-shape, .pad-link:focus-visible .pad-shape { transform: scale(1.025); }
.pad-link:focus-visible { outline: 2px solid var(--blue); outline-offset: 4px; }
.pad-text { display: flex; flex-direction: column; align-items: center; }
.pad-title { font-size: clamp(19px, 2.4vw, 23px); font-weight: 600; line-height: 1.25; margin-bottom: 10px; color: var(--blue); }
.pad-desc { font-size: clamp(14px, 1.6vw, 16px); line-height: 1.5; color: var(--ink); }
.pad-more { margin-top: 12px; font-size: 13px; letter-spacing: .02em; color: var(--blue); border-bottom: 1px solid currentColor; padding-bottom: 1px; }
.pad-link:hover .pad-more { color: var(--ink); }
.pad-title { font-size: clamp(18px, 2.1vw, 21px); margin-bottom: 8px; }
.pad-desc { font-size: clamp(13px, 1.45vw, 15px); }
.pad-more { margin-top: 10px; white-space: nowrap; }
/* dark green lily pads with white text (About page) */
.pad-title, .pad-desc, .pad-more { color: #ffffff; }
.pad-desc { color: rgba(255, 255, 255, .9); }
.pad-link:hover .pad-more { color: #ecd36d; }
.pad-link:focus-visible { outline-color: #2f4f36; }
/* bolder RiverReach title */
.hero h1 { font-weight: 700; letter-spacing: -0.015em; }
.brand { font-weight: 600; }

/* River Reach Studio wordmark: same lettering as the logo (Helvetica, capitals, wide spacing) */
.wordmark { font-family: "Helvetica Neue", Helvetica, Arial, "TeX Gyre Heros", sans-serif; text-transform: uppercase; }
.brand .wordmark { font-weight: 600; font-size: 15px; letter-spacing: .2em; }
.hero h1.wordmark { display: flex; flex-direction: column; align-items: flex-start; gap: .35em; font-weight: 600; letter-spacing: 0; line-height: 1; }
.hero h1.wordmark .wm-main { font-size: clamp(30px, 4.2vw, 58px); letter-spacing: .18em; }
.hero h1.wordmark .wm-sub { font-size: clamp(14px, 1.6vw, 22px); font-weight: 500; letter-spacing: .6em; padding-left: .1em; }

/* Nov 5 edits: one-line wordmark, bigger tabs, bigger service list */
.hero h1.wordmark .wm-main { font-size: clamp(30px, 5vw, 72px); letter-spacing: .14em; white-space: nowrap; }
.nav a { font-size: 18px; }
.brand .wordmark { font-size: 17px; }
.svc-list h3 { font-size: clamp(22px, 2.6vw, 28px); font-weight: 600; color: var(--blue); margin-bottom: 6px; }
.svc-list p { font-size: clamp(17px, 1.9vw, 20px); color: var(--ink); }
.svc-list .pad-icon { width: 26px; height: 26px; margin-top: 8px; }
@media (max-width: 720px) { .hero h1.wordmark .wm-main { white-space: normal; letter-spacing: .1em; } .nav a { font-size: 28px; } }
