/* Vishva Patel – wildlife photography
   Palette taken from the bush at dusk and the brown KWS park signposts. */
/* Fonts are hosted with the site (SIL Open Font License) */
@font-face { font-family: "Big Shoulders Display"; font-weight: 500; font-display: swap; src: url(fonts/big-shoulders-500.woff2) format("woff2"); }
@font-face { font-family: "Big Shoulders Display"; font-weight: 700; font-display: swap; src: url(fonts/big-shoulders-700.woff2) format("woff2"); }
@font-face { font-family: "Big Shoulders Display"; font-weight: 800; font-display: swap; src: url(fonts/big-shoulders-800.woff2) format("woff2"); }
@font-face { font-family: "Source Serif 4"; font-weight: 200 900; font-display: swap; src: url(fonts/source-serif-4.woff2) format("woff2"); }

:root {
  --bush: #16201A;        /* page background: night in the bush */
  --acacia: #213027;      /* raised panels */
  --line: #34453A;        /* borders */
  --bone: #EFE8D8;        /* main text */
  --dust: #AFA690;        /* secondary text */
  --sign: #6B4423;        /* park signboard brown */
  --sign-ink: #F3E9CF;    /* signboard lettering */
  --grass: #E0B44C;       /* dry-grass gold: focus and active states */

  --display: "Big Shoulders Display", "Arial Narrow", sans-serif;
  --text: "Source Serif 4", Georgia, serif;

  --wrap: 1320px;
  --gutter: clamp(16px, 4vw, 48px);
}

*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; scroll-padding-top: 72px; }
body {
  margin: 0;
  background: var(--bush);
  color: var(--bone);
  font: 400 1.0625rem/1.65 var(--text);
  -webkit-font-smoothing: antialiased;
}
img { display: block; max-width: 100%; height: auto; }
a { color: inherit; }
button { font: inherit; color: inherit; }
h1, h2 { font-family: var(--display); font-weight: 800; line-height: .9; margin: 0; letter-spacing: -.005em; }
h2 { font-size: clamp(3rem, 7vw, 5.5rem); }
p { margin: 0; }

:focus-visible { outline: 3px solid var(--grass); outline-offset: 3px; }
.skip { position: absolute; left: -9999px; }
.skip:focus { left: 16px; top: 16px; z-index: 100; background: var(--grass); color: var(--bush); padding: 8px 14px; }

.wrap { max-width: var(--wrap); margin: 0 auto; padding: 0 var(--gutter); }
.section { padding: clamp(72px, 10vw, 140px) 0; }
.section-head { display: grid; gap: 18px; margin-bottom: 40px; max-width: 62ch; }
.section-head p { color: var(--dust); }
.section-head.with-controls { max-width: none; grid-template-columns: 1fr auto; align-items: end; }
.section-head.with-controls > div:first-child { display: grid; gap: 18px; }

/* Buttons */
.btn {
  display: inline-flex; align-items: center; gap: 10px;
  font: 700 1.15rem/1 var(--display); letter-spacing: .02em;
  padding: 14px 22px; border-radius: 2px; text-decoration: none; cursor: pointer;
  border: 2px solid transparent; transition: background .2s, color .2s, border-color .2s;
}
.btn-solid { background: var(--grass); color: var(--bush); }
.btn-solid:hover { background: var(--bone); }
.btn-ghost { background: rgba(22,32,26,.35); border-color: rgba(239,232,216,.6); color: var(--bone); backdrop-filter: blur(4px); }
.btn-ghost:hover { border-color: var(--bone); }
.btn svg { width: 22px; height: 22px; }
.btn[aria-pressed="true"] .wave { animation: pulse 1s ease-in-out infinite; }
@keyframes pulse { 50% { opacity: .25; } }

/* Top bar */
.topbar {
  position: fixed; inset: 0 0 auto 0; z-index: 50;
  display: flex; align-items: center; justify-content: space-between;
  padding: 18px var(--gutter); transition: background .3s, padding .3s;
}
.topbar.solid { background: rgba(22,32,26,.94); backdrop-filter: blur(8px); padding-block: 10px; box-shadow: 0 1px 0 var(--line); }
.brand { font: 800 1.6rem/1 var(--display); text-decoration: none; letter-spacing: .01em; }
#nav { display: flex; gap: clamp(16px, 3vw, 36px); }
#nav a { font: 700 1.2rem/1 var(--display); text-decoration: none; letter-spacing: .02em; padding: 6px 0; border-bottom: 2px solid transparent; }
#nav a:hover, #nav a.active { border-color: var(--grass); }
.menu-btn { display: none; background: none; border: 2px solid var(--bone); padding: 6px 14px; font: 700 1.05rem/1 var(--display); cursor: pointer; }

/* Hero */
.hero { position: relative; height: 100vh; height: 100svh; min-height: 560px; overflow: hidden; background: #000; }
.hero-slides img {
  position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover;
  opacity: 0; transform: scale(1.06); transition: opacity 1.4s ease, transform 8s ease-out;
}
.hero-slides img.on { opacity: 1; transform: scale(1); }
.hero-shade { position: absolute; inset: 0; background:
  linear-gradient(90deg, rgba(10,16,12,.72) 0%, rgba(10,16,12,.25) 45%, rgba(10,16,12,0) 70%),
  linear-gradient(0deg, rgba(10,16,12,.75) 0%, rgba(10,16,12,0) 35%); }
.hero-text { position: absolute; left: var(--gutter); bottom: clamp(110px, 16vh, 170px); max-width: 680px; }
.hero-text h1 { font-size: clamp(5rem, 15vw, 12.5rem); line-height: .82; text-transform: uppercase; }
.hero-text p { margin: 24px 0 30px; font-size: clamp(1.05rem, 1.6vw, 1.3rem); max-width: 34ch; }
.hero-actions { display: flex; flex-wrap: wrap; gap: 12px; }
.hero-meta {
  position: absolute; left: var(--gutter); right: var(--gutter); bottom: 28px;
  display: flex; justify-content: space-between; align-items: end; gap: 20px;
}
.hero-caption { color: var(--dust); font-size: .95rem; }
.hero-caption strong { color: var(--bone); font-weight: 600; }
.hero-dots { display: flex; gap: 8px; }
.hero-dots button {
  width: 44px; height: 24px; padding: 0; background: none; border: 0; cursor: pointer; position: relative;
}
.hero-dots button::before { content: ""; position: absolute; left: 0; right: 0; top: 11px; height: 3px; background: rgba(239,232,216,.35); }
.hero-dots button::after { content: ""; position: absolute; left: 0; top: 11px; height: 3px; width: 0; background: var(--bone); }
.hero-dots button.on::after { animation: fill var(--slide-ms, 6500ms) linear forwards; }
.hero.paused .hero-dots button.on::after { animation-play-state: paused; }
@keyframes fill { to { width: 100%; } }

/* Signpost filters – the KWS signboard look */
.signposts { display: flex; flex-wrap: wrap; gap: 10px; margin-bottom: 36px; }
.sign {
  display: inline-flex; align-items: baseline; gap: 14px; cursor: pointer;
  background: var(--sign); color: var(--sign-ink);
  border: 0; border-radius: 3px; padding: 9px 14px 8px;
  box-shadow: inset 0 0 0 2px var(--sign), inset 0 0 0 4px var(--sign-ink);
  font: 700 1.2rem/1 var(--display); text-transform: uppercase; letter-spacing: .05em;
  transition: background .2s, color .2s;
}
.sign .n { font-weight: 500; opacity: .85; }
.sign:hover { background: #7d5130; }
.sign[aria-pressed="true"] { background: var(--sign-ink); color: var(--sign); box-shadow: inset 0 0 0 2px var(--sign-ink), inset 0 0 0 4px var(--sign); }

/* Photo grid (masonry with CSS columns) */
.grid { columns: 3 300px; column-gap: 14px; }
.tile {
  display: block; width: 100%; margin: 0 0 14px; padding: 0; border: 0; cursor: zoom-in;
  background: var(--acacia); position: relative; overflow: hidden; break-inside: avoid;
}
.tile img { width: 100%; height: auto; transition: transform .5s ease, opacity .4s; }
.tile img.loading { opacity: 0; }
.tile figcaption {
  position: absolute; inset: auto 0 0 0; padding: 30px 14px 12px; text-align: left;
  background: linear-gradient(0deg, rgba(10,16,12,.85), rgba(10,16,12,0));
  font-size: .95rem; transform: translateY(100%); transition: transform .3s ease;
}
.tile:hover img, .tile:focus-visible img { transform: scale(1.04); }
.tile:hover figcaption, .tile:focus-visible figcaption { transform: none; }
.tile[hidden] { display: none; }

/* Big Five */
.bigfive { background: var(--acacia); }
.b5-layout { display: grid; grid-template-columns: minmax(0, 1.5fr) minmax(0, 1fr); gap: clamp(28px, 4vw, 64px); align-items: center; }
.b5-photo { margin: 0; aspect-ratio: 3 / 2; overflow: hidden; background: var(--bush); }
.b5-photo img { width: 100%; height: 100%; object-fit: cover; transition: opacity .45s ease; }
.b5-photo img.fade { opacity: 0; }
.b5-intro { color: var(--dust); margin: 18px 0 28px; max-width: 40ch; }
.b5-tabs { display: flex; flex-direction: column; border-top: 1px solid var(--line); }
.b5-tab {
  display: flex; justify-content: space-between; align-items: baseline; text-align: left;
  background: none; border: 0; border-bottom: 1px solid var(--line); padding: 10px 0; cursor: pointer;
  font: 800 clamp(1.9rem, 3.4vw, 2.8rem)/1 var(--display); color: rgba(239,232,216,.38);
  transition: color .2s;
}
.b5-tab:hover { color: rgba(239,232,216,.75); }
.b5-tab[aria-selected="true"] { color: var(--bone); }
.b5-tab small { font: 400 .95rem var(--text); color: var(--dust); }
.b5-detail { margin-top: 24px; min-height: 9.5em; }
.b5-detail p { max-width: 46ch; }
.b5-detail a { display: inline-block; margin-top: 14px; color: var(--grass); font-weight: 600; text-underline-offset: 4px; }

/* Recent strip */
.strip-controls { display: flex; gap: 10px; }
.round {
  width: 48px; height: 48px; border-radius: 50%; border: 2px solid var(--line); background: none;
  cursor: pointer; font-size: 1.2rem; transition: border-color .2s;
}
.round:hover { border-color: var(--bone); }
.strip {
  display: flex; gap: 14px; overflow-x: auto; scroll-snap-type: x mandatory;
  --edge: max(var(--gutter), calc((100vw - var(--wrap)) / 2 + var(--gutter)));
  padding: 0 var(--edge) 18px; scroll-padding-inline: var(--edge);
  scrollbar-width: thin; scrollbar-color: var(--line) transparent;
}
.strip .card {
  flex: 0 0 auto; scroll-snap-align: start; margin: 0; padding: 0; border: 0; background: none; cursor: zoom-in; text-align: left;
}
.strip .card img { height: clamp(260px, 42vh, 440px); width: auto; max-width: none; }
.strip .card figcaption { padding-top: 10px; font-size: .95rem; }
.strip .card figcaption span { display: block; color: var(--dust); font-size: .85rem; }

/* Contact */
.contact { border-top: 1px solid var(--line); }
.contact-layout { display: grid; grid-template-columns: 1fr 1fr; gap: clamp(36px, 6vw, 96px); }
.contact-info > p { color: var(--dust); margin: 22px 0 30px; max-width: 40ch; }
.contact-list, .social { list-style: none; margin: 0; padding: 0; }
.contact-list li { display: grid; grid-template-columns: 110px 1fr; padding: 12px 0; border-top: 1px solid var(--line); }
.contact-list li:last-child { border-bottom: 1px solid var(--line); }
.contact-list span { color: var(--dust); }
.contact-list a { text-underline-offset: 4px; }
.social { display: flex; flex-wrap: wrap; gap: 18px; margin-top: 26px; }
.social a { font: 700 1.2rem var(--display); letter-spacing: .02em; text-underline-offset: 5px; }

.contact-form { display: grid; gap: 18px; align-content: start; }
.contact-form label { display: grid; gap: 6px; font-size: .95rem; color: var(--dust); }
.contact-form input, .contact-form textarea {
  font: inherit; color: var(--bone); background: var(--acacia);
  border: 1px solid var(--line); border-radius: 2px; padding: 12px 14px; font-size: 1rem;
}
.contact-form input:focus, .contact-form textarea:focus { border-color: var(--grass); outline: none; box-shadow: 0 0 0 2px var(--grass); }
.contact-form [aria-invalid="true"] { border-color: #E07A5F; }
.contact-form .btn { justify-self: start; }
.contact-form .btn[disabled] { opacity: .6; cursor: wait; }
.trap { position: absolute !important; left: -9999px; }
.form-status { min-height: 1.6em; }
.form-status.ok { color: var(--grass); }
.form-status.err { color: #F0A58F; }

/* Footer */
.footer { border-top: 1px solid var(--line); padding: 28px 0; color: var(--dust); font-size: .9rem; }
.footer .wrap { display: flex; justify-content: space-between; gap: 20px; flex-wrap: wrap; }

/* Lightbox */
.lightbox {
  width: 100vw; height: 100vh; height: 100dvh; max-width: none; max-height: none; margin: 0; padding: 0;
  border: 0; background: rgba(8,12,9,.97); color: var(--bone); overflow: hidden;
}
.lightbox[open] { display: grid; grid-template-rows: 1fr auto; }
.lightbox::backdrop { background: rgba(8,12,9,.97); }
.lb-stage { position: relative; display: grid; place-items: center; padding: 64px 72px 8px; min-height: 0; touch-action: pan-y; }
.lb-stage img { max-width: 100%; max-height: 100%; width: auto; height: auto; object-fit: contain; transition: opacity .25s; }
.lb-stage img.fade { opacity: 0; }
.lb-bar { display: flex; justify-content: space-between; align-items: end; gap: 16px; padding: 14px 24px 22px; }
.lb-caption { font-size: 1.1rem; }
.lb-place, .lb-count { color: var(--dust); font-size: .9rem; }
.lb-btn {
  position: absolute; width: 52px; height: 52px; border-radius: 50%; cursor: pointer;
  background: rgba(22,32,26,.6); border: 2px solid rgba(239,232,216,.35); font-size: 1.3rem;
}
.lb-btn:hover { border-color: var(--bone); }
.lb-close { top: 14px; right: 14px; }
.lb-prev { left: 12px; top: calc(50% - 26px); }
.lb-next { right: 12px; top: calc(50% - 26px); }

/* Small screens */
@media (max-width: 860px) {
  .menu-btn { display: block; }
  #nav {
    position: absolute; top: 100%; left: 0; right: 0; flex-direction: column; gap: 0;
    background: var(--bush); border-bottom: 1px solid var(--line); padding: 8px var(--gutter) 16px;
    display: none;
  }
  #nav.open { display: flex; }
  #nav a { font-size: 1.6rem; padding: 12px 0; border-bottom: 1px solid var(--line); }
  .topbar.menu-open { background: var(--bush); }
  .b5-layout, .contact-layout { grid-template-columns: 1fr; }
  .grid { columns: 2 150px; column-gap: 10px; }
  .tile { margin-bottom: 10px; }
  .tile figcaption { display: none; }
  .section-head.with-controls { grid-template-columns: 1fr; }
  .strip-controls { display: none; }
  .lb-stage { padding: 56px 8px 8px; }
  .lb-prev, .lb-next { display: none; }
  .hero-meta { flex-direction: column; align-items: start; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { transition-duration: .01ms !important; animation-duration: .01ms !important; }
  .hero-slides img { transform: none; }
}
