/* ==========================================================================
   Robin Hood Pole Archery Club - styles
   Sections: 1 Tokens & fonts | 2 Base | 3 Layout | 4 Header & nav | 5 Components
             6 Page sections | 7 Footer | 8 Breakpoints (768 / 1024 / 1280 / 1536)
   ========================================================================== */

/* 1. Tokens & fonts ------------------------------------------------------- */
@font-face {
  font-family: "Cabin";
  src: url("../fonts/cabin-latin.woff2") format("woff2");
  font-weight: 400 700;
  font-style: normal;
  font-display: swap;
}

@font-face {
  font-family: "Great Vibes";
  src: url("../fonts/great-vibes-latin.woff2") format("woff2");
  font-weight: 400;
  font-style: normal;
  font-display: swap;
}

:root {
  --color-primary: #05642e;
  --color-primary-hover: #08803d;
  --color-nav-bar: #045727;
  --color-link-hover: #035225;
  --color-text: #5e5e5e;
  --color-heading: #1b1b1b;
  --color-rule: #777777;
  --color-light: #c6c6c6;
  --color-footer-text: #fbfbfb;
  --color-drawer: #161616;
  --color-drawer-hover: #17db6d;
  --color-drawer-border: rgba(76, 76, 76, 0.5);
  --color-field-border: #e2e2e2;
  --color-field-label: #474747;
  --color-panel: #f6f6f6;

  --font-body: "Cabin", system-ui, sans-serif;
  --font-script: "Great Vibes", Georgia, serif;

  --gutter: 12px;
  --section-space: 32px;
  --container-width: 100%;
}

/* 2. Base ----------------------------------------------------------------- */
*,
*::before,
*::after {
  box-sizing: border-box;
}

html,
body {
  min-height: 100%;
}

html {
  font-size: 16px;
  -webkit-text-size-adjust: 100%;
  scroll-behavior: smooth;
}

body {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  margin: 0;
  font-family: var(--font-body);
  font-size: 1rem;
  line-height: 1.5;
  color: var(--color-text);
  background: #fff;
}

.site-footer {
  margin-top: auto;
}

body.nav-open {
  overflow: hidden;
}

img {
  display: block;
  max-width: 100%;
  height: auto;
}

h1, h2, h3, h4 {
  margin: 0;
  color: var(--color-heading);
}

p {
  margin: 0 0 1rem;
}

p:last-child {
  margin-bottom: 0;
}

a {
  color: var(--color-primary);
}

a:hover {
  color: var(--color-link-hover);
}

address {
  margin: 0 0 1rem;
  font-style: normal;
}

:focus-visible {
  outline: 3px solid #17db6d;
  outline-offset: 2px;
}

.visually-hidden {
  position: absolute;
  width: 1px;
  height: 1px;
  margin: -1px;
  padding: 0;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
  border: 0;
}

.skip-link {
  position: absolute;
  left: 8px;
  top: -100px;
  z-index: 100;
  padding: 8px 16px;
  background: #fff;
  color: var(--color-heading);
}

.skip-link:focus {
  top: 8px;
}

/* 3. Layout --------------------------------------------------------------- */
.container {
  width: 100%;
  max-width: var(--container-width);
  margin: 0 auto;
  padding: 0 24px;
}

.section {
  padding: var(--section-space) 0;
}

.section--tight {
  padding-top: 0;
}

.section-title {
  margin-bottom: 24px;
  padding-bottom: 16px;
  border-bottom: 1px solid var(--color-rule);
  font-size: 22px;
  font-weight: 700;
  line-height: 1.25;
  letter-spacing: 1px;
  text-transform: uppercase;
}

.subheading,
.card__title {
  margin-bottom: 8px;
  font-size: 22px;
  font-weight: 400;
  line-height: 1.25;
}

.note {
  margin-top: 16px;
  font-size: 14px;
}

/* Text beside a picture */
.stack {
  display: grid;
  gap: 24px;
}

.split {
  display: grid;
  gap: 24px;
  align-items: center;
}

.split__text > * + * {
  margin-top: 1rem;
}

.split__media img {
  width: 100%;
  margin: 0 auto;
}

/* Single column of text (trivia, links) */
.text-column {
  display: grid;
  gap: 32px;
}

.text-item > * + * {
  margin-top: 1rem;
}

.text-column > p,
.text-column > h2,
.text-column > h3 {
  margin: 0;
}

/* 4. Header & navigation -------------------------------------------------- */
.nav-bar {
  background: var(--color-nav-bar);
  color: #fff;
}

.nav-bar__inner {
  display: flex;
  align-items: center;
  min-height: 56px;
}

.nav-toggle,
.nav-close {
  display: none;
  padding: 12px;
  border: 0;
  background: none;
  color: #fff;
  cursor: pointer;
}

.site-nav__list {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 4px 32px;
  margin: 0;
  padding: 12px 0;
  list-style: none;
}

.site-nav {
  width: 100%;
}

.site-nav a {
  display: inline-block;
  padding: 4px 0;
  color: #fff;
  font-size: 14px;
  letter-spacing: 0.143em;
  text-decoration: none;
  text-transform: uppercase;
}

.site-nav a:hover {
  color: var(--color-light);
}

.site-nav a[aria-current="page"] {
  font-weight: 600;
}

.site-logo {
  display: block;
  margin: 24px 24px;
  color: var(--color-heading);
  font-family: var(--font-script);
  font-size: 26px;
  font-weight: 400;
  line-height: 1.2;
  text-align: center;
  text-decoration: none;
}

.site-logo:hover {
  color: var(--color-heading);
}

/* Below 1024px the menu becomes a full-screen drawer (only when JS is available;
   without JS the links simply stay visible in the bar). */
@media (max-width: 1023px) {
  .js .nav-toggle {
    display: block;
  }

  .js .site-nav {
    position: fixed;
    inset: 0;
    z-index: 50;
    display: none;
    padding: 24px;
    overflow-y: auto;
    background: var(--color-drawer);
  }

  .js .site-nav.is-open {
    display: block;
  }

  .js .nav-close {
    display: block;
    margin-left: auto;
  }

  .js .site-nav__list {
    display: block;
    padding: 0;
  }

  .js .site-nav li {
    border-bottom: 1px solid var(--color-drawer-border);
  }

  .js .site-nav a {
    display: block;
    padding: 16px 0;
    font-size: 22px;
  }

  .js .site-nav a:hover {
    color: var(--color-drawer-hover);
  }
}

/* 5. Components ----------------------------------------------------------- */
.button,
.link-button {
  font-family: inherit;
}

.button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  min-height: 56px;
  padding: 8px 32px;
  border: 0;
  background: var(--color-primary);
  color: #fff;
  font-size: 14px;
  font-weight: 600;
  letter-spacing: 0.143em;
  text-decoration: none;
  text-transform: uppercase;
  cursor: pointer;
  transition: background 0.3s;
}

.button:hover {
  background: var(--color-primary-hover);
  color: #fff;
}

.button--small {
  width: auto;
  min-height: 0;
  padding: 8px 16px;
  font-size: 12px;
}

.link-button {
  padding: 8px;
  border: 0;
  background: none;
  color: var(--color-primary);
  font-size: 16px;
  text-decoration: underline;
  cursor: pointer;
}

.link-button:hover {
  color: var(--color-link-hover);
}

.card {
  margin: 0;
  text-align: center;
}

.card__title {
  margin-bottom: 16px;
}

.card__image {
  margin: 0 auto 16px;
}

.card__image--tall {
  max-height: 403px;
  width: auto;
}

.cards {
  display: grid;
  gap: 24px;
}

.banner-strip {
  display: flex;
}

.banner-strip img {
  flex: 1 1 33.333%;
  min-width: 0;
  height: 130px;
  object-fit: cover;
}

/* Slideshow (js/main.js adds .is-enhanced) */
.slideshow__slides {
  display: grid;
  gap: 24px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.slideshow__slide figure {
  margin: 0;
  text-align: center;
}

.slideshow__slide img {
  margin: 0 auto 8px;
}

.slideshow.is-enhanced {
  position: relative;
}

.slideshow.is-enhanced .slideshow__slides {
  display: block;
}

.slideshow.is-enhanced .slideshow__slide {
  display: none;
}

.slideshow.is-enhanced .slideshow__slide.is-current {
  display: block;
}

.slideshow.is-enhanced .slideshow__slide img {
  height: 320px;
  width: auto;
  max-width: 100%;
  object-fit: contain;
}

.slideshow__arrow {
  position: absolute;
  top: 160px;
  z-index: 2;
  width: 44px;
  height: 44px;
  margin-top: -22px;
  border: 0;
  background: rgba(0, 0, 0, 0.55);
  color: #fff;
  font-size: 22px;
  line-height: 1;
  cursor: pointer;
}

.slideshow__arrow:hover {
  background: rgba(0, 0, 0, 0.8);
}

.slideshow__arrow--prev {
  left: 0;
}

.slideshow__arrow--next {
  right: 0;
}

.slideshow__thumbs {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 8px;
  margin: 16px 0 0;
  padding: 0;
  list-style: none;
}

.slideshow__thumb {
  padding: 0;
  border: 2px solid transparent;
  background: none;
  cursor: pointer;
  opacity: 0.6;
}

.slideshow__thumb[aria-current="true"] {
  border-color: var(--color-primary);
  opacity: 1;
}

.slideshow__thumb img {
  width: 64px;
  height: 48px;
  object-fit: cover;
}

/* Photo grid + lightbox */
.photo-grid {
  column-count: 2;
  column-gap: 4px;
}

.photo-grid a {
  display: block;
  margin-bottom: 4px;
  break-inside: avoid;
}

.photo-grid img {
  width: 100%;
}

.lightbox {
  width: 100%;
  max-width: none;
  height: 100%;
  max-height: none;
  padding: 0;
  border: 0;
  background: rgba(0, 0, 0, 0.92);
  color: #fff;
}

.lightbox[open] {
  display: flex;
  flex-direction: column;
}

.lightbox__stage {
  display: flex;
  flex: 1;
  align-items: center;
  justify-content: center;
  min-height: 0;
  padding: 56px 56px 16px;
}

.lightbox__stage img {
  max-width: 100%;
  max-height: 100%;
  object-fit: contain;
}

.lightbox__count {
  padding: 0 16px 16px;
  text-align: center;
  font-size: 14px;
}

.lightbox__button {
  position: absolute;
  z-index: 2;
  width: 44px;
  height: 44px;
  border: 0;
  background: rgba(255, 255, 255, 0.15);
  color: #fff;
  font-size: 24px;
  line-height: 1;
  cursor: pointer;
}

.lightbox__button:hover {
  background: rgba(255, 255, 255, 0.3);
}

.lightbox__close {
  top: 8px;
  right: 8px;
}

.lightbox__prev,
.lightbox__next {
  top: 50%;
  margin-top: -22px;
}

.lightbox__prev {
  left: 8px;
}

.lightbox__next {
  right: 8px;
}

/* 6. Page sections -------------------------------------------------------- */
.hero__inner {
  text-align: center;
}

.hero__image {
  width: auto;
  max-width: 100%;
  max-height: 500px;
  margin: 0 auto 24px;
  object-fit: contain;
}

.hero__tagline {
  margin-bottom: 24px;
  font-size: 22px;
}

.social-links {
  display: flex;
  justify-content: center;
  gap: 16px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.social-links img {
  width: 40px;
  height: 40px;
}

/* Contact: info beside map */
.contact {
  display: grid;
}

.contact__info {
  padding: 32px 24px;
}

.contact__content > * + * {
  margin-top: 1rem;
}

.contact__content .section-title {
  margin-bottom: 24px;
}

.contact__map {
  position: relative;
  order: -1;
  min-height: 300px;
}

.contact__map iframe {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  border: 0;
}

.map-directions {
  position: absolute;
  left: 12px;
  bottom: 12px;
}

.contact-toggle {
  display: none;
}

.js .contact-toggle {
  display: inline-flex;
}

.js .contact-toggle[hidden] {
  display: none;
}

.js .contact-form {
  display: none;
}

.js .contact-form.is-open {
  display: block;
}

.field {
  position: relative;
  margin-bottom: 16px;
}

.field input,
.field textarea {
  display: block;
  width: 100%;
  padding: 23px 8px 16px;
  border: 1px solid var(--color-field-border);
  border-radius: 0;
  background: #fff;
  color: var(--color-heading);
  font: inherit;
}

.field input:focus,
.field textarea:focus {
  outline: 0;
  box-shadow: inset 0 0 0 1px currentColor;
}

.field label {
  position: absolute;
  left: 9px;
  top: 16px;
  color: var(--color-field-label);
  font-size: 14px;
  pointer-events: none;
  transition: transform 0.15s;
  transform-origin: left top;
}

.field input:focus + label,
.field textarea:focus + label,
.field input:not(:placeholder-shown) + label,
.field textarea:not(:placeholder-shown) + label {
  color: var(--color-primary);
  transform: translateY(-10px) scale(0.86);
}

.form-note {
  font-size: 14px;
}

.form-actions {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  margin-top: 16px;
}

/* Schedule */
.pdf-block {
  text-align: center;
  font-size: 20px;
}

.pdf-block__title {
  margin-bottom: 16px;
  font-size: 28px;
  font-weight: 400;
}

.pdf-block__preview {
  display: block;
  max-width: 560px;
  margin: 24px auto 0;
  padding: 8px;
  background: var(--color-panel);
}

.pdf-block__download {
  font-weight: 600;
}

/* Events */
.event {
  padding-bottom: 24px;
  border-bottom: 1px solid #bfbfbf;
}

.event__date {
  margin-bottom: 8px;
  font-size: 28px;
  font-weight: 400;
}

.event__meta {
  margin-bottom: 8px;
}

.trivia-figure {
  margin: 0;
}

.trivia-figure .split__media img {
  width: auto;
  margin: 0;
}

/* 7. Footer --------------------------------------------------------------- */
.site-footer {
  padding: 32px 0;
  background: var(--color-primary);
  color: #fff;
  text-align: center;
}

.footer-nav {
  display: flex;
  flex-direction: column;
  margin: 0 0 16px;
  padding: 0;
  list-style: none;
}

.footer-nav a {
  display: inline-block;
  padding: 8px;
  color: #fff;
  font-size: 14px;
  letter-spacing: 0.143em;
  text-decoration: none;
  text-transform: uppercase;
}

.footer-nav a:hover {
  color: var(--color-light);
}

.footer-name {
  margin-bottom: 16px;
  color: #fff;
  font-weight: 600;
}

.footer-copy {
  color: var(--color-footer-text);
  font-size: 14px;
}

/* 8. Breakpoints ---------------------------------------------------------- */
@media (min-width: 768px) {
  :root {
    --gutter: 24px;
    --section-space: 40px;
  }

  .section-title {
    margin-bottom: 40px;
  }

  .stack {
    gap: 48px;
  }

  .split {
    grid-template-columns: 1fr 1fr;
    gap: var(--gutter);
  }

  .split--1-2 {
    grid-template-columns: 1fr 2fr;
  }

  .split--2-1 {
    grid-template-columns: 2fr 1fr;
  }

  .split--reverse .split__media {
    order: 2;
  }

  .cards {
    grid-template-columns: 1fr 1fr;
    row-gap: 48px;
    column-gap: var(--gutter);
  }

  .text-column {
    width: 83%;
  }

  .button {
    width: auto;
  }

  .banner-strip img {
    height: 200px;
  }

  .form-actions {
    flex-direction: row;
    justify-content: center;
    gap: 16px;
  }

  .footer-nav {
    flex-direction: row;
    flex-wrap: wrap;
    justify-content: center;
  }

  .site-footer {
    padding: 40px 0;
  }

  .site-logo {
    font-size: 33px;
  }

  .slideshow.is-enhanced .slideshow__slide img {
    height: 400px;
  }

  .slideshow__arrow {
    top: 200px;
  }
}

@media (min-width: 1024px) {
  :root {
    --container-width: 984px;
  }

  .site-logo {
    font-size: 38px;
  }

  .text-column {
    width: 66.67%;
  }

  .banner-strip img {
    height: 300px;
    transition: transform 0.3s, filter 0.3s;
  }

  .banner-strip {
    overflow: hidden;
  }

  .banner-strip img:hover {
    filter: brightness(0.9);
    transform: scale(1.05);
  }

  .photo-grid {
    column-count: 3;
  }

  .social-links {
    gap: 24px;
  }

  .social-links img {
    width: 48px;
    height: 48px;
  }

  .contact {
    grid-template-columns: 1fr 1fr;
  }

  .contact__info {
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 40px 24px;
  }

  .contact__content {
    max-width: 70%;
  }

  .contact__map {
    order: 0;
  }

  .footer-copy {
    text-align: left;
  }

  .slideshow.is-enhanced .slideshow__slide img {
    height: 480px;
  }

  .slideshow__arrow {
    top: 240px;
  }
}

@media (min-width: 1280px) {
  :root {
    --container-width: 1160px;
  }
}

@media (min-width: 1536px) {
  :root {
    --container-width: 1280px;
  }

  html {
    font-size: 18px;
  }
}

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

  * {
    transition: none !important;
  }
}
