/* ==========================================================================
   The Flying Knights of Hamburg, NY — site styles
   One stylesheet for the whole site. Edit colours in :root below.
   ========================================================================== */

:root {
  --blue-900: #071a63;
  --blue-800: #0b219a;   /* the blue from the club logo */
  --blue-700: #142db3;
  --blue-600: #2a46d6;
  --blue-100: #e5eaff;
  --blue-050: #f2f5ff;

  --ink:      #16181d;
  --ink-soft: #4a5060;
  --ink-mute: #6d7488;

  --paper:    #ffffff;
  --shell:    #f6f7fb;
  --line:     #e2e5ee;

  --gold:     #d8a02a;

  --wrap: 1120px;
  --radius: 12px;
  --radius-lg: 18px;
  --shadow-sm: 0 1px 2px rgba(11, 33, 154, .06), 0 2px 8px rgba(11, 33, 154, .05);
  --shadow-md: 0 2px 6px rgba(11, 33, 154, .07), 0 12px 28px rgba(11, 33, 154, .09);

  --sans: ui-sans-serif, system-ui, -apple-system, "Segoe UI", Roboto,
          "Helvetica Neue", Arial, sans-serif;
}

/* --------------------------------------------------------- reset + base -- */

*, *::before, *::after { box-sizing: border-box; }

/* Keep the hidden attribute authoritative over any display rule below. */
[hidden] { display: none !important; }

html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { animation-duration: .01ms !important; transition-duration: .01ms !important; }
}

body {
  margin: 0;
  font-family: var(--sans);
  font-size: 17px;
  line-height: 1.65;
  color: var(--ink);
  background: var(--paper);
  -webkit-font-smoothing: antialiased;
}

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

a { color: var(--blue-700); text-underline-offset: 3px; }
a:hover { color: var(--blue-600); }

h1, h2, h3, h4 {
  line-height: 1.2;
  letter-spacing: -.015em;
  color: var(--blue-900);
  margin: 0 0 .5em;
  font-weight: 700;
}
h1 { font-size: clamp(2rem, 1.4rem + 2.6vw, 3.1rem); }
h2 { font-size: clamp(1.5rem, 1.2rem + 1.3vw, 2.1rem); }
h3 { font-size: 1.2rem; }

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

:focus-visible {
  outline: 3px solid var(--blue-600);
  outline-offset: 2px;
  border-radius: 4px;
}

.wrap { width: min(100% - 2.5rem, var(--wrap)); margin-inline: auto; }
.wrap--narrow { width: min(100% - 2.5rem, 760px); margin-inline: auto; }

.skip-link {
  position: absolute; left: -9999px;
  background: var(--blue-800); color: #fff;
  padding: .7rem 1.1rem; border-radius: 0 0 8px 0; z-index: 999;
}
.skip-link:focus { left: 0; top: 0; }

.visually-hidden {
  position: absolute; width: 1px; height: 1px; overflow: hidden;
  clip: rect(0 0 0 0); clip-path: inset(50%); white-space: nowrap;
}

/* -------------------------------------------------------------- header --- */

.site-header {
  position: sticky; top: 0; z-index: 100;
  background: rgba(255, 255, 255, .92);
  backdrop-filter: saturate(160%) blur(10px);
  border-bottom: 1px solid var(--line);
}

.site-header__inner {
  display: flex; align-items: center; gap: 1rem;
  min-height: 74px;
}

.brand {
  display: flex; align-items: center; gap: .75rem;
  text-decoration: none; color: inherit;
  margin-right: auto; padding: .35rem 0;
}
.brand__mark {
  width: 46px; height: 46px; flex: none;
  object-fit: contain;
}
.brand__text { display: flex; flex-direction: column; line-height: 1.15; }
.brand__name {
  font-weight: 800; font-size: 1.02rem; letter-spacing: -.01em;
  color: var(--blue-900);
}
.brand__place {
  font-size: .74rem; letter-spacing: .13em; text-transform: uppercase;
  color: var(--ink-mute); font-weight: 600;
}

.nav-toggle {
  display: none;
  background: none; border: 1px solid var(--line); border-radius: 9px;
  width: 44px; height: 40px; cursor: pointer; color: var(--blue-900);
  align-items: center; justify-content: center;
}
.nav-toggle svg { width: 22px; height: 22px; }
.nav-toggle .icon-close { display: none; }
.nav-toggle[aria-expanded="true"] .icon-close { display: block; }
.nav-toggle[aria-expanded="true"] .icon-open { display: none; }

.nav ul {
  display: flex; align-items: center; gap: .25rem;
  list-style: none; margin: 0; padding: 0;
}
.nav a {
  display: block; padding: .55rem .8rem;
  font-size: .93rem; font-weight: 600; letter-spacing: .01em;
  color: var(--ink-soft); text-decoration: none; border-radius: 8px;
}
.nav a:hover { color: var(--blue-800); background: var(--blue-050); }
.nav a[aria-current="page"] { color: var(--blue-800); background: var(--blue-100); }

@media (max-width: 820px) {
  .nav-toggle { display: inline-flex; }
  .nav {
    position: absolute; left: 0; right: 0; top: 100%;
    background: var(--paper); border-bottom: 1px solid var(--line);
    box-shadow: var(--shadow-md);
    display: none;
  }
  .nav.is-open { display: block; }
  .nav ul { flex-direction: column; align-items: stretch; gap: 0; padding: .5rem 1.25rem 1rem; }
  .nav a { padding: .8rem .6rem; font-size: 1rem; border-radius: 8px; }
}

/* --------------------------------------------------------------- hero --- */

.hero {
  position: relative; overflow: hidden;
  background:
    radial-gradient(1000px 480px at 78% -10%, rgba(42, 70, 214, .55), transparent 62%),
    linear-gradient(168deg, var(--blue-800) 0%, var(--blue-900) 72%);
  color: #fff;
  padding: clamp(3rem, 2rem + 6vw, 6rem) 0 clamp(3.5rem, 2rem + 7vw, 6.5rem);
}
.hero::after {
  /* soft horizon glow */
  content: ""; position: absolute; inset: auto 0 -60% 0; height: 70%;
  background: radial-gradient(60% 100% at 50% 0%, rgba(255,255,255,.14), transparent 70%);
  pointer-events: none;
}
.hero__inner { position: relative; z-index: 1; display: grid; gap: 2.5rem; align-items: center; }
@media (min-width: 900px) {
  .hero__inner { grid-template-columns: 1.15fr .85fr; gap: 3.5rem; }
}
.hero h1 { color: #fff; margin-bottom: .35em; }
.hero__eyebrow {
  display: inline-block; margin-bottom: 1rem;
  font-size: .76rem; font-weight: 700; letter-spacing: .16em; text-transform: uppercase;
  color: #b9c6ff;
}
.hero__lede {
  font-size: clamp(1.02rem, .96rem + .3vw, 1.15rem);
  color: #dfe5ff; max-width: 54ch;
}
.hero__mark {
  width: min(300px, 70%); margin-inline: auto;
  filter: drop-shadow(0 18px 30px rgba(0, 0, 0, .35));
}
.hero__mark--plate {
  background: #fff; border-radius: 50%; padding: 1.6rem;
  width: min(280px, 66%); aspect-ratio: 1; object-fit: contain;
}

.btn-row { display: flex; flex-wrap: wrap; gap: .75rem; margin-top: 1.75rem; }

.btn {
  display: inline-flex; align-items: center; gap: .5rem;
  padding: .72rem 1.25rem; border-radius: 999px;
  font-size: .95rem; font-weight: 700; text-decoration: none;
  border: 1.5px solid transparent; cursor: pointer;
  transition: transform .12s ease, background-color .12s ease, border-color .12s ease;
}
.btn:active { transform: translateY(1px); }
.btn--primary { background: #fff; color: var(--blue-800); }
.btn--primary:hover { background: var(--blue-050); color: var(--blue-900); }
.btn--ghost { border-color: rgba(255,255,255,.45); color: #fff; }
.btn--ghost:hover { background: rgba(255,255,255,.12); color: #fff; }
.btn--solid { background: var(--blue-800); color: #fff; }
.btn--solid:hover { background: var(--blue-700); color: #fff; }
.btn--outline { border-color: var(--blue-800); color: var(--blue-800); }
.btn--outline:hover { background: var(--blue-050); }
.btn--sm { padding: .45rem .9rem; font-size: .85rem; }

/* ------------------------------------------------------------ page head -- */

.page-head {
  background: linear-gradient(168deg, var(--blue-800), var(--blue-900));
  color: #fff; padding: clamp(2.5rem, 2rem + 3vw, 4rem) 0;
}
.page-head h1 { color: #fff; margin-bottom: .25em; }
.page-head p { color: #d7ddff; max-width: 60ch; margin: 0; }

/* -------------------------------------------------------------- layout --- */

.section { padding: clamp(2.75rem, 2rem + 3.5vw, 4.5rem) 0; }
.section--shell { background: var(--shell); border-block: 1px solid var(--line); }
.section__head { margin-bottom: 2rem; }
.section__head p { color: var(--ink-soft); max-width: 62ch; margin: 0; }

.grid { display: grid; gap: 1.25rem; }
@media (min-width: 700px)  { .grid--2 { grid-template-columns: repeat(2, 1fr); } }
@media (min-width: 900px)  { .grid--3 { grid-template-columns: repeat(3, 1fr); } }

.card {
  background: var(--paper); border: 1px solid var(--line);
  border-radius: var(--radius-lg); padding: 1.5rem;
  box-shadow: var(--shadow-sm);
}
.card h3 { margin-bottom: .4rem; }
.card p { color: var(--ink-soft); }

/* ------------------------------------------------------ meeting callout -- */

.callout {
  display: grid; gap: 1.5rem; align-items: center;
  background: var(--blue-050); border: 1px solid var(--blue-100);
  border-radius: var(--radius-lg); padding: clamp(1.5rem, 1rem + 2vw, 2.5rem);
}
@media (min-width: 820px) { .callout { grid-template-columns: 1.4fr 1fr; } }
/* If the club photo hasn't been downloaded yet, don't leave a gap for it. */
.callout:has(> figure[hidden]) { grid-template-columns: 1fr; }
.callout h2 { margin-bottom: .35em; }
.callout dl { margin: 0; display: grid; gap: .6rem; }
.callout dt {
  font-size: .74rem; letter-spacing: .12em; text-transform: uppercase;
  color: var(--ink-mute); font-weight: 700;
}
.callout dd { margin: 0 0 .6rem; font-weight: 600; color: var(--ink); }
.callout dd:last-child { margin-bottom: 0; }

.photo-frame {
  border-radius: var(--radius); overflow: hidden;
  border: 1px solid var(--line); background: #fff;
  box-shadow: var(--shadow-md);
}
.photo-frame img { width: 100%; }
.photo-frame figcaption {
  padding: .7rem 1rem; font-size: .85rem; color: var(--ink-mute);
  border-top: 1px solid var(--line);
}

/* -------------------------------------------------------------- fields --- */

.field-card {
  background: var(--paper); border: 1px solid var(--line);
  border-radius: var(--radius-lg); overflow: hidden;
  box-shadow: var(--shadow-sm); display: flex; flex-direction: column;
}
.field-card__body { padding: 1.35rem 1.5rem; }
.field-card__body h2 { font-size: 1.35rem; margin-bottom: .15em; }
.field-card__meta { color: var(--ink-soft); font-size: .93rem; margin-bottom: 1rem; }
.field-card__links { display: flex; flex-wrap: wrap; gap: .5rem; }
.field-card__map {
  position: relative; aspect-ratio: 16 / 10; background: var(--blue-050);
  border-top: 1px solid var(--line);
}
.field-card__map iframe { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; }

/* ------------------------------------------------------------- schedule -- */

.sched-toolbar {
  display: flex; flex-wrap: wrap; gap: .75rem; align-items: center;
  justify-content: space-between; margin-bottom: 1.75rem;
}
.seg {
  display: inline-flex; background: var(--shell);
  border: 1px solid var(--line); border-radius: 999px; padding: 3px;
}
.seg button {
  border: 0; background: none; cursor: pointer;
  padding: .45rem 1rem; border-radius: 999px;
  font: inherit; font-size: .9rem; font-weight: 650; color: var(--ink-soft);
}
.seg button[aria-pressed="true"] { background: var(--blue-800); color: #fff; }

.feed-status {
  margin: 0 0 1.25rem; padding: .7rem 1rem; border-radius: 10px;
  font-size: .9rem; font-weight: 600; border: 1px solid;
}
.feed-status--ok   { background: #edfaf1; border-color: #b9e3c6; color: #17693a; }
.feed-status--warn { background: #fff6e0; border-color: #f0d698; color: #7a5410; }

.subscribe-card {
  background: var(--paper); border: 1px solid var(--line);
  border-radius: var(--radius-lg); padding: clamp(1.5rem, 1rem + 2vw, 2.25rem);
  box-shadow: var(--shadow-sm);
}
.subscribe-card h2 { margin-bottom: .5em; }
.subscribe-card p { color: var(--ink-soft); }
.subscribe-card .btn-row { margin-top: 1.5rem; }
.subscribe-card__note {
  margin-top: 1.25rem; font-size: .88rem; color: var(--ink-mute);
}

.event-list { list-style: none; margin: 0; padding: 0; display: grid; gap: .85rem; }

.event {
  display: grid; grid-template-columns: 74px 1fr; gap: 1.15rem;
  align-items: start;
  background: var(--paper); border: 1px solid var(--line);
  border-radius: var(--radius); padding: 1.05rem 1.25rem;
  box-shadow: var(--shadow-sm);
}
.event--past { opacity: .62; }
.event__date {
  text-align: center; border-radius: 10px; overflow: hidden;
  border: 1px solid var(--blue-100); background: var(--blue-050);
}
.event__month {
  display: block; background: var(--blue-800); color: #fff;
  font-size: .68rem; font-weight: 800; letter-spacing: .1em;
  text-transform: uppercase; padding: .22rem 0;
}
.event__day {
  display: block; font-size: 1.55rem; font-weight: 800;
  color: var(--blue-900); line-height: 1.5;
}
.event__title { font-size: 1.1rem; font-weight: 700; color: var(--blue-900); margin: 0 0 .2rem; }
.event__when, .event__where { font-size: .92rem; color: var(--ink-soft); margin: 0; }
.event__where { font-weight: 600; }
.event__note { font-size: .92rem; color: var(--ink-soft); margin: .5rem 0 0; }
.event__actions { margin-top: .7rem; display: flex; flex-wrap: wrap; gap: .5rem; }
.tag {
  display: inline-block; font-size: .68rem; font-weight: 800; letter-spacing: .09em;
  text-transform: uppercase; padding: .18rem .5rem; border-radius: 5px;
  background: var(--blue-100); color: var(--blue-800); vertical-align: 2px; margin-left: .5rem;
}
.tag--event { background: #fdf1d6; color: #8a6111; }

.empty-note {
  border: 1px dashed var(--line); border-radius: var(--radius);
  padding: 2rem; text-align: center; color: var(--ink-mute);
}

/* month grid */
.month-nav {
  display: flex; align-items: center; justify-content: center;
  gap: 1rem; margin-bottom: 1.25rem;
}
.month-nav h2 { margin: 0; font-size: 1.3rem; min-width: 12ch; text-align: center; }
.month-nav button {
  width: 38px; height: 38px; border-radius: 50%;
  border: 1px solid var(--line); background: var(--paper);
  cursor: pointer; color: var(--blue-800); font-size: 1.1rem; line-height: 1;
}
.month-nav button:hover { background: var(--blue-050); }

.cal { width: 100%; border-collapse: collapse; table-layout: fixed; }
.cal th {
  font-size: .7rem; letter-spacing: .1em; text-transform: uppercase;
  color: var(--ink-mute); padding: .5rem 0; font-weight: 700;
}
.cal td {
  border: 1px solid var(--line); vertical-align: top;
  height: 108px; padding: .4rem; font-size: .8rem;
}
.cal td.is-blank { background: var(--shell); }
.cal .daynum { font-weight: 700; color: var(--ink-mute); font-size: .78rem; }
.cal td.is-today { background: var(--blue-050); }
.cal td.is-today .daynum { color: var(--blue-800); }
.cal .chip {
  display: block; margin-top: .25rem; padding: .18rem .35rem;
  background: var(--blue-800); color: #fff; border-radius: 5px;
  font-size: .7rem; font-weight: 650; line-height: 1.3;
  overflow: hidden; text-overflow: ellipsis;
}
.cal .chip--event { background: var(--gold); color: #241a02; }
@media (max-width: 700px) {
  .cal td { height: 76px; font-size: .72rem; }
  .cal .chip { font-size: .6rem; }
}
.table-scroll { overflow-x: auto; }

/* ------------------------------------------------------------ resources -- */

.doc-list { list-style: none; margin: 0; padding: 0; display: grid; gap: .85rem; }
.doc {
  display: flex; align-items: center; gap: 1rem;
  background: var(--paper); border: 1px solid var(--line);
  border-radius: var(--radius); padding: 1rem 1.25rem;
  text-decoration: none; color: inherit; box-shadow: var(--shadow-sm);
  transition: border-color .12s ease, transform .12s ease;
}
.doc:hover { border-color: var(--blue-600); transform: translateY(-1px); color: inherit; }
.doc__icon {
  flex: none; width: 42px; height: 42px; border-radius: 10px;
  background: var(--blue-050); color: var(--blue-800);
  display: grid; place-items: center; font-size: .64rem; font-weight: 800; letter-spacing: .04em;
}
.doc__icon--link { background: #fdf1d6; color: #8a6111; }
.doc__text { min-width: 0; }
.doc__title { font-weight: 700; color: var(--blue-900); display: block; }
.doc__sub { font-size: .88rem; color: var(--ink-mute); }
.doc__arrow { margin-left: auto; color: var(--ink-mute); flex: none; }

/* --------------------------------------------------------------- prose --- */

.prose { max-width: 68ch; }
.prose h2 { margin-top: 2rem; }
.prose ul { padding-left: 1.2rem; }
.prose li { margin-bottom: .4rem; }

/* ----------------------------------------------------------- galleries --- */

.gallery + .gallery {
  margin-top: 3.5rem; padding-top: 3rem; border-top: 1px solid var(--line);
}
.gallery__head { margin-bottom: 1.35rem; max-width: 68ch; }
.gallery__head h2 { margin-bottom: .2em; }
.gallery__head p { color: var(--ink-soft); }
.gallery__date {
  font-size: .74rem; letter-spacing: .12em; text-transform: uppercase;
  color: var(--ink-mute); font-weight: 700; margin-bottom: .35rem;
}

.gallery__grid {
  list-style: none; margin: 0; padding: 0; display: grid; gap: .6rem;
  grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
}
@media (min-width: 700px) {
  .gallery__grid { gap: .8rem; grid-template-columns: repeat(auto-fill, minmax(210px, 1fr)); }
}
.gallery__item {
  display: block; width: 100%; padding: 0; border: 0; cursor: pointer;
  background: var(--shell); border-radius: 10px; overflow: hidden;
  aspect-ratio: 1; box-shadow: var(--shadow-sm);
}
.gallery__item img {
  width: 100%; height: 100%; object-fit: cover; display: block;
  transition: transform .25s ease;
}
.gallery__item:hover img,
.gallery__item:focus-visible img { transform: scale(1.05); }

/* lightbox */
.lightbox {
  position: fixed; inset: 0; z-index: 200;
  background: rgba(6, 10, 26, .93);
  display: grid; grid-template-rows: 1fr auto; justify-items: center; align-content: center;
  gap: .75rem; padding: clamp(.75rem, 3vw, 2.5rem);
}
.lightbox__img {
  max-width: 100%; max-height: 82vh; width: auto; object-fit: contain;
  border-radius: 6px; box-shadow: 0 20px 60px rgba(0, 0, 0, .5);
}
.lightbox__cap {
  color: #cdd5f2; font-size: .9rem; text-align: center; margin: 0;
  min-height: 1.2em; max-width: 60ch;
}
.lightbox__btn {
  position: absolute; width: 46px; height: 46px; border-radius: 50%;
  border: 0; background: rgba(255, 255, 255, .14); color: #fff;
  font-size: 1.6rem; line-height: 1; cursor: pointer;
  display: grid; place-items: center;
}
.lightbox__btn:hover { background: rgba(255, 255, 255, .28); }
.lightbox__btn--prev { left: clamp(.5rem, 2vw, 1.75rem); top: 50%; transform: translateY(-50%); }
.lightbox__btn--next { right: clamp(.5rem, 2vw, 1.75rem); top: 50%; transform: translateY(-50%); }
.lightbox__close { top: clamp(.5rem, 2vw, 1.5rem); right: clamp(.5rem, 2vw, 1.5rem); }
@media (max-width: 600px) {
  .lightbox__btn { width: 40px; height: 40px; font-size: 1.35rem; }
}

/* -------------------------------------------------------------- footer --- */

.site-footer {
  background: var(--blue-900); color: #c3ccf5;
  padding: 3rem 0 2rem; margin-top: 0;
  font-size: .92rem;
}
.site-footer a { color: #fff; }
.site-footer__grid { display: grid; gap: 2rem; }
@media (min-width: 760px) { .site-footer__grid { grid-template-columns: 1.4fr 1fr 1fr; } }
.site-footer h2 {
  color: #fff; font-size: .76rem; letter-spacing: .14em; text-transform: uppercase;
  margin-bottom: .9rem;
}
.site-footer ul { list-style: none; margin: 0; padding: 0; display: grid; gap: .5rem; }
.site-footer__brand { display: flex; gap: .85rem; align-items: flex-start; }
.site-footer__brand img { width: 52px; flex: none; background: #fff; border-radius: 10px; padding: 5px; }
.site-footer__legal {
  margin-top: 2.5rem; padding-top: 1.25rem;
  border-top: 1px solid rgba(255,255,255,.15);
  display: flex; flex-wrap: wrap; gap: .75rem 1.5rem; justify-content: space-between;
  font-size: .85rem; color: #93a0d8;
}
