/* Kita Kaze Budo Association — sumi ink, washi paper, vermilion seal */

:root {
  --ink: #1b2030;
  --ink-soft: #3a4156;
  --muted: #666d80;
  --paper: #f7f3ea;
  --card: #fffdf8;
  --line: #ded7c7;
  --seal: #a8261d;
  --seal-dark: #861a13;
  --ok: #1f6b45;
  --warn: #8a5a00;
  --radius: 6px;
  --serif: "Iowan Old Style", "Palatino Linotype", Palatino, Georgia, serif;
  --sans: system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
}

* { box-sizing: border-box; }

html { -webkit-text-size-adjust: 100%; }

body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font: 16px/1.6 var(--sans);
}

.wrap { width: min(1100px, 100% - 2rem); margin-inline: auto; }

a { color: var(--seal-dark); text-underline-offset: 2px; }
a:hover { color: var(--seal); }

h1, h2, h3 { font-family: var(--serif); line-height: 1.2; margin: 0 0 .6rem; font-weight: 600; }
h1 { font-size: clamp(1.8rem, 4vw, 2.6rem); }
h2 { font-size: 1.5rem; margin-top: 2rem; }
h3 { font-size: 1.15rem; }
p { margin: 0 0 1rem; }

.skip { position: absolute; left: -999px; }
.skip:focus { left: .5rem; top: .5rem; background: #fff; padding: .5rem 1rem; z-index: 10; }

/* ---------- header ---------- */
.site-header { background: var(--ink); color: #fff; border-bottom: 3px solid var(--seal); }
.site-header .bar { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: .5rem 1.5rem; padding: .75rem 0; }
.brand { display: flex; align-items: center; gap: .75rem; color: #fff; text-decoration: none; }
.brand-mark {
  display: grid; place-items: center; width: 2.6rem; height: 2.6rem;
  background: var(--seal); color: #fff; border-radius: 4px;
  font: 700 1.05rem/1 var(--serif); letter-spacing: -.05em;
}
.brand-name { font: 600 1.15rem/1.1 var(--serif); }
.brand-name small { display: block; font: 500 .7rem/1.4 var(--sans); letter-spacing: .14em; text-transform: uppercase; color: #c9cddb; }
.site-header nav { display: flex; flex-wrap: wrap; align-items: center; gap: .25rem 1.25rem; }
.site-header nav a, .site-header nav button.link { color: #e8eaf2; text-decoration: none; padding: .25rem 0; border-bottom: 2px solid transparent; }
.site-header nav a:hover, .site-header nav button.link:hover { border-bottom-color: var(--seal); color: #fff; }
.site-header nav a[aria-current] { border-bottom-color: var(--seal); color: #fff; }

button.link { background: none; border: 0; font: inherit; cursor: pointer; padding: 0; }
form.inline { display: inline; margin: 0; }

main { min-height: 60vh; padding-bottom: 3rem; }
.site-footer { border-top: 1px solid var(--line); color: var(--muted); font-size: .9rem; padding: 1.25rem 0; }

/* ---------- landing ---------- */
.hero { padding: 4rem 0 3rem; border-bottom: 1px solid var(--line); background:
  linear-gradient(180deg, rgba(168,38,29,.05), transparent 60%); }
.hero .eyebrow { letter-spacing: .16em; text-transform: uppercase; font-size: .8rem; color: var(--seal-dark); font-weight: 600; margin-bottom: .75rem; }
.hero p.lead { font-size: 1.2rem; color: var(--ink-soft); max-width: 40rem; }

.arts { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 1rem; margin-top: 1rem; }
.art-card { background: var(--card); border: 1px solid var(--line); border-left: 4px solid var(--seal); border-radius: var(--radius); padding: 1.1rem 1.25rem; }
.art-card h3 { margin-bottom: .15rem; }
.art-card .fed { color: var(--muted); font-size: .9rem; margin-bottom: .9rem; }

.about { max-width: 44rem; }
.about-title { margin-top: 2.5rem; }

/* ---------- buttons ---------- */
.btn, button.btn {
  display: inline-block; padding: .55rem 1.1rem; border-radius: var(--radius);
  background: var(--seal); color: #fff; border: 1px solid var(--seal-dark);
  font: 600 .95rem/1.3 var(--sans); text-decoration: none; cursor: pointer;
}
.btn:hover { background: var(--seal-dark); color: #fff; }
.btn.secondary { background: transparent; color: var(--ink); border-color: var(--ink-soft); }
.btn.secondary:hover { background: var(--ink); color: #fff; }
.btn.danger { background: #fff; color: var(--seal-dark); border-color: var(--seal); }
.btn.danger:hover { background: var(--seal); color: #fff; }
.btn.small { padding: .25rem .65rem; font-size: .85rem; }

/* ---------- flash ---------- */
.flash { margin: 1rem 0 0; padding: .7rem 1rem; border-radius: var(--radius); border: 1px solid; font-weight: 500; }
.flash-ok { background: #eaf5ee; border-color: #a9d3b8; color: var(--ok); }
.flash-warn { background: #fff5dd; border-color: #e5c97a; color: var(--warn); }
.flash-error { background: #fdecea; border-color: #e2a8a3; color: var(--seal-dark); }

/* ---------- page + cards ---------- */
.page-head { padding: 2rem 0 .5rem; }
.page-head p { color: var(--muted); }
.card { background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); padding: 1.25rem 1.4rem; margin: 1rem 0; }
.card > h2:first-child, .card > h3:first-child { margin-top: 0; }
.grid { display: grid; gap: 1rem; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); }
.grid-2 { display: grid; gap: 1rem 1.5rem; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); }
.stat { background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); padding: 1rem 1.2rem; }
.stat b { display: block; font: 600 1.8rem/1.1 var(--serif); }
.stat span { color: var(--muted); font-size: .9rem; }
.row { display: flex; flex-wrap: wrap; gap: .5rem; align-items: center; }
.row.between { justify-content: space-between; }
.muted { color: var(--muted); }

dl.details { display: grid; grid-template-columns: max-content 1fr; gap: .25rem 1.25rem; margin: 0; }
dl.details dt { color: var(--muted); }
dl.details dd { margin: 0; }

/* ---------- sub navigation ---------- */
.subnav { display: flex; flex-wrap: wrap; gap: .25rem 1.25rem; border-bottom: 1px solid var(--line); margin: 1.25rem 0 0; padding-bottom: .5rem; }
.subnav a { text-decoration: none; color: var(--ink-soft); padding: .2rem 0; border-bottom: 2px solid transparent; }
.subnav a[aria-current] { border-bottom-color: var(--seal); color: var(--ink); font-weight: 600; }

/* ---------- tables ---------- */
.table-wrap { overflow-x: auto; margin: 1rem 0; border: 1px solid var(--line); border-radius: var(--radius); background: var(--card); }
table { width: 100%; border-collapse: collapse; font-size: .95rem; }
th, td { text-align: left; padding: .6rem .8rem; border-bottom: 1px solid var(--line); vertical-align: top; }
th { background: #f0ebdd; font-size: .8rem; letter-spacing: .06em; text-transform: uppercase; color: var(--ink-soft); white-space: nowrap; }
tr:last-child td { border-bottom: 0; }
td.num, th.num { text-align: right; font-variant-numeric: tabular-nums; }

.badge { display: inline-block; padding: .05rem .55rem; border-radius: 99px; font-size: .78rem; font-weight: 600; background: #e9e5d8; color: var(--ink-soft); }
.badge.active, .badge.paid { background: #e0f0e6; color: var(--ok); }
.badge.injured, .badge.warn { background: #fff0cc; color: var(--warn); }
.badge.inactive { background: #ececec; color: #666; }
.badge.due { background: #fbe3e0; color: var(--seal-dark); }

/* ---------- forms ---------- */
form.stack { display: grid; gap: .9rem; }
.field { display: grid; gap: .25rem; }
.field label { font-weight: 600; font-size: .9rem; }
.field-check label { display: flex; gap: .5rem; align-items: center; font-weight: 500; }
.req { color: var(--seal); }
.help { color: var(--muted); font-size: .85rem; margin: 0; }
input[type=text], input[type=email], input[type=password], input[type=date], input[type=number], input[type=search], select, textarea {
  width: 100%; padding: .5rem .65rem; font: inherit; color: inherit;
  background: #fff; border: 1px solid #bdb6a3; border-radius: var(--radius);
}
input:focus, select:focus, textarea:focus, .btn:focus-visible, a:focus-visible, button:focus-visible {
  outline: 3px solid rgba(168,38,29,.35); outline-offset: 1px;
}
.filters { display: flex; flex-wrap: wrap; gap: .75rem; align-items: end; margin: 1rem 0; }
.filters .field { min-width: 160px; }
.login-card { max-width: 26rem; margin: 3rem auto; }

details.edit { margin: .6rem 0; }
details.edit > summary { cursor: pointer; font-weight: 600; color: var(--seal-dark); }

@media (max-width: 640px) {
  .hero { padding: 2.5rem 0 2rem; }
  dl.details { grid-template-columns: 1fr; }
  dl.details dd { margin-bottom: .5rem; }
}

/* ---------- payment box ---------- */
.pay-box { position: sticky; bottom: .75rem; border-color: var(--seal); box-shadow: 0 4px 14px rgba(27,32,48,.12); }
.pay-box p { margin-bottom: .6rem; }
.rentals { margin: .5rem 0 1rem; }

/* ---------- club sites (Edmonton Kendo, Edmonton Iaido) ---------- */
.club-grid { display: grid; gap: 1.5rem 2.5rem; grid-template-columns: minmax(0, 3fr) minmax(0, 2fr); align-items: start; margin-top: 1.5rem; }
.club-grid h2:first-child { margin-top: 0; }
.club-aside .card:first-child { margin-top: 0; }
.club-hero { display: grid; gap: 1.5rem 2.5rem; grid-template-columns: minmax(0, 3fr) minmax(0, 2fr); align-items: center; }
.club-photo, .portrait, .venue-photo { display: block; width: 100%; height: auto; border-radius: var(--radius); border: 1px solid var(--line); }
.portrait { margin-bottom: .75rem; }
.venue-photo { margin-top: .75rem; }
ul.plain { list-style: none; margin: 0 0 1rem; padding: 0; display: grid; gap: .75rem; }

.fb-embed { display: block; width: 100%; max-width: 500px; height: 700px; border: 0; overflow: hidden; }

.steps { list-style: none; counter-reset: step; margin: 1rem 0 1.5rem; padding: 0; display: grid; gap: 1rem; }
.steps li { counter-increment: step; position: relative; padding: .9rem 1.1rem .9rem 3.4rem; background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); }
.steps li::before { content: counter(step); position: absolute; left: 1rem; top: .85rem; width: 1.7rem; height: 1.7rem; display: grid; place-items: center; background: var(--seal); color: #fff; border-radius: 50%; font: 600 .95rem/1 var(--serif); }
.steps h3 { margin-bottom: .2rem; }
.steps li > div > :last-child { margin-bottom: 0; }

.event-date { color: var(--seal-dark); font-weight: 600; font-size: .9rem; letter-spacing: .04em; margin-bottom: .25rem; }
.card.event h3, .card.class h3, .instructor h3 { margin-bottom: .3rem; }

.venue-grid { display: grid; gap: 1rem 2rem; grid-template-columns: minmax(0, 2fr) minmax(0, 3fr); align-items: start; }
.venue h3 { font-size: 1.3rem; }
.map-toggle { display: flex; flex-wrap: wrap; gap: .5rem; margin-bottom: .6rem; }
.map-toggle .btn[aria-pressed="true"] { background: var(--ink); border-color: var(--ink); color: #fff; }
.map-frame { display: block; width: 100%; height: 340px; border: 1px solid var(--line); border-radius: var(--radius); background: #eee; }

.captcha-img { display: block; border: 1px solid var(--line); border-radius: var(--radius); background: #fff; margin: .15rem 0 .4rem; }
.field.captcha input { max-width: 14rem; }
.grid-2 > .field { align-content: start; }
.hp { position: absolute; left: -9999px; width: 1px; height: 1px; overflow: hidden; }

@media (max-width: 760px) {
  .club-grid, .club-hero, .venue-grid { grid-template-columns: 1fr; }
  .map-frame { height: 280px; }
}

/* ---------- calendar page ---------- */
.cal-bar { display: flex; flex-wrap: wrap; gap: .5rem 1.5rem; align-items: center; justify-content: space-between; margin: 1rem 0 .6rem; }
.cal-bar .map-toggle { margin: 0; }
.cal-legend { display: flex; flex-wrap: wrap; gap: .25rem 1.25rem; list-style: none; margin: 0; padding: 0; font-size: .9rem; color: var(--ink-soft); }
.cal-legend .swatch { display: inline-block; width: .8rem; height: .8rem; border-radius: 2px; margin-right: .4rem; vertical-align: -.05rem; }
.cal-frame { display: block; width: 100%; height: 700px; border: 1px solid var(--line); border-radius: var(--radius); background: #fff; }
.cal-text { margin: 1rem 0; }
.subscribe .field .row { flex-wrap: nowrap; }
.subscribe input[type=text] { font-size: .85rem; }
@media (max-width: 760px) { .cal-frame { height: 560px; } }

/* Logo to the left of the landing page title */
.title-row { display: flex; align-items: center; gap: 1.1rem; margin-bottom: .5rem; }
.title-row h1 { margin: 0; }
.title-logo { width: 96px; height: 96px; flex: none; display: block; }
@media (max-width: 640px) {
  .title-row { gap: .75rem; }
  .title-logo { width: 64px; height: 64px; }
}
