/* Sovereign Military Order of Knights Templar — knightstemplarofamerica.org */
@font-face { font-family: "EB Garamond"; font-style: normal; font-weight: 400 800; font-display: swap; src: url("../fonts/eb-garamond-normal.woff2") format("woff2"); }
@font-face { font-family: "EB Garamond"; font-style: italic; font-weight: 400 800; font-display: swap; src: url("../fonts/eb-garamond-italic.woff2") format("woff2"); }

:root {
  --cream: #fbf7ec;
  --sand: #f4ede3;
  --card: #d4d0c4;
  --stone: #a8a998;
  --olive-light: #878a75;
  --olive: #676b56;
  --olive-dark: #6c6f5a;
  --text: #55564b;
  --ink: #2d2f25;
  --leather: #4f3b2a;
  --shadow: 0 2px 6px rgba(0, 0, 0, .45);
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
body {
  margin: 0;
  background: var(--cream);
  color: var(--text);
  font-family: "EB Garamond", Garamond, "Times New Roman", serif;
  font-size: 1.25rem;
  line-height: 1.4;
}
img, video { display: block; max-width: 100%; height: auto; }
a { color: var(--ink); }
a:focus-visible, button:focus-visible, input:focus-visible, textarea:focus-visible, .nav-toggle:focus-visible + .nav-button {
  outline: 3px solid #9e3b1b; outline-offset: 2px;
}
h1, h2 { font-weight: 400; color: var(--text); line-height: 1.15; margin: 0 0 .6em; text-wrap: balance; }
h1 { font-size: clamp(2.2rem, 5vw, 3rem); }
h2 { font-size: clamp(1.9rem, 4.2vw, 2.5rem); }
p { margin: 0 0 1.2em; }
.center { text-align: center; }
.visually-hidden, .hp { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }
.skip { position: absolute; left: -999px; top: 0; background: var(--ink); color: #fff; padding: .5em 1em; z-index: 10; }
.skip:focus { left: 0; }

/* Header */
.site-header { background: var(--cream); }
.header-inner { max-width: 1240px; margin: 0 auto; padding: 1.1rem 1.5rem; display: flex; align-items: center; gap: 1rem 2rem; flex-wrap: wrap; }
.brand { display: flex; align-items: center; gap: .9rem; text-decoration: none; color: var(--text); font-size: 1.3rem; line-height: 1.15; margin-right: auto; }
.brand img { width: 62px; height: 40px; object-fit: cover; box-shadow: 0 1px 3px rgba(0, 0, 0, .3); flex: none; }
.site-nav ul { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; gap: .2rem 1.5rem; }
.site-nav a { text-decoration: none; color: var(--text); font-size: 1.1rem; padding: .25rem 0; border-bottom: 1px solid transparent; }
.site-nav a:hover, .site-nav a[aria-current="page"] { color: var(--ink); border-bottom-color: currentColor; }
.nav-toggle { position: absolute; opacity: 0; pointer-events: none; }
.nav-button { display: none; cursor: pointer; padding: .6rem .3rem; }
.nav-button span { display: block; width: 26px; height: 2px; background: var(--text); margin: 5px 0; }

/* Bands and cards */
.band { padding: clamp(1.5rem, 4vw, 3.5rem) 1rem; }
.band-tight { padding-top: 1rem; }
.band-light { background: linear-gradient(var(--card), #b4b2a4); padding: .6rem 0 0; }
.band-olive { background: var(--olive-light); }
.band-stone { background: var(--stone); }
.band-cream { background: var(--cream); }
.card { background: linear-gradient(var(--card) 85%, #bdbaad); box-shadow: var(--shadow); margin: 0 auto; padding: clamp(1.5rem, 4vw, 3rem) clamp(1rem, 4vw, 2.75rem); }
.card-wide { max-width: none; margin: 0 .2rem; border: 1px solid rgba(255, 255, 255, .5); padding-top: 1.5rem; }
.card-narrow { max-width: 950px; }
.card > :last-child, .card p:last-child { margin-bottom: 0; }
.lead { max-width: 56rem; margin-inline: auto; font-size: 1.35rem; }
.declare { font-weight: 700; letter-spacing: .03em; color: var(--ink); }
.sub { font-size: 1.6rem; font-style: italic; margin-bottom: .4em; }
.prose p { max-width: 54rem; margin-inline: auto; }
.prose strong { color: #4a4b40; }
.emblem { margin: .5rem auto 1.5rem; width: 180px; }

.btn { display: inline-block; background: var(--olive); color: var(--cream); text-decoration: none; font-size: 1.05rem; padding: .55em 2.1em; border: 1px solid #55594a; border-radius: 4px; box-shadow: 0 1px 4px rgba(0, 0, 0, .4); transition: background .2s; }
.btn:hover { background: var(--ink); }
.btn-block { display: block; text-align: center; border-radius: 0; padding: .8em 1em; }

/* Hero video (home) */
.hero { background: #17110c url("../img/leather.jpg") center / cover; padding: .7rem 0 1.6rem; }
.hero video { width: 100%; aspect-ratio: 16 / 9; max-height: 82vh; object-fit: cover; background: #000; border-block: 6px solid #000; }

/* Leather frames */
.frame { background: var(--leather) url("../img/leather.jpg") center / cover; padding: clamp(.8rem, 3vw, 2rem) clamp(.9rem, 3.5vw, 3rem); margin: 2rem auto 0; box-shadow: var(--shadow); }
.frame video, .frame img { width: 100%; object-fit: cover; background: #000; box-shadow: 6px 8px 14px rgba(0, 0, 0, .6); }
.frame-square { max-width: 820px; }
.frame-square video { aspect-ratio: 1 / 1; }
.frame-video { max-width: 620px; padding: clamp(.8rem, 3vw, 1.9rem); }
.frame-video video { aspect-ratio: 1 / 1; }
.frame-dark { background: #4a4d3c; padding: clamp(.4rem, 1.2vw, 1rem); max-width: 1190px; margin: 0 auto 1.8rem; }
.frame-dark video { aspect-ratio: 16 / 9; max-height: 70vh; box-shadow: none; }
.band-light .frame { margin-bottom: clamp(1rem, 3vw, 2.5rem); }
.shop-banner { display: block; margin: 2.5rem calc(clamp(1rem, 4vw, 2.75rem) * -.7) 0; box-shadow: var(--shadow); }
.shop-banner img, .shop-banner-static { width: 100%; }
.shop-banner-static { margin-bottom: 1.5rem; box-shadow: var(--shadow); }

/* Contact */
.split { display: grid; grid-template-columns: 2fr 3fr; max-width: 1130px; padding: 0; background: var(--card); box-shadow: 3px 4px 8px rgba(0, 0, 0, .6); }
.split-text { padding: clamp(1.5rem, 4vw, 3rem); align-self: center; }
.split img { width: 100%; height: 100%; min-height: 320px; object-fit: cover; }
.form-card { max-width: 570px; margin: 0 auto; background: var(--sand); border: 1px solid #7d7a6c; box-shadow: var(--shadow); padding: 2.8rem .9rem; }
.form-inner { background: #fff; padding: 1.8rem 1.5rem; color: #000; font-family: Helvetica, Arial, sans-serif; font-size: .95rem; }
.form-inner h2 { color: #000; font-family: "Century Gothic", Futura, "Trebuchet MS", Helvetica, sans-serif; font-size: 1.9rem; margin-bottom: .8em; }
.form-inner label { display: block; font-size: .85rem; margin-bottom: 1.3rem; }
.form-inner .row { display: grid; grid-template-columns: 1fr 1fr; gap: 0 1.5rem; }
.form-inner input, .form-inner textarea { display: block; width: 100%; margin-top: .4rem; padding: .5rem .2rem; font: inherit; font-size: 1rem; color: #000; background: transparent; border: 0; border-bottom: 2px solid #000; border-radius: 0; }
.form-inner textarea { resize: vertical; min-height: 6rem; }
.form-inner button { background: #000; color: #fff; font: inherit; font-size: 1rem; border: 0; border-radius: 999px; padding: .7em 3.2em; cursor: pointer; }
.form-inner button:hover { background: #333; }
.form-errors { color: #9e1b1b; padding-left: 1.2em; margin: 0 0 1.3rem; }

/* Donate */
.donate { display: grid; grid-template-columns: minmax(0, 6fr) minmax(0, 5fr); gap: clamp(1.5rem, 4vw, 3rem); max-width: 1180px; margin: 0 auto; align-items: start; }
.donate img { width: 100%; box-shadow: var(--shadow); }
.donate-text { padding-top: 2rem; }

/* Footer */
.site-footer { background: var(--olive-dark); color: var(--cream); text-align: center; padding: clamp(2.5rem, 7vw, 5rem) 1rem; box-shadow: inset 0 6px 8px -6px rgba(0, 0, 0, .4); }
.site-footer p { margin: 0 0 .3em; }
.footer-flag { width: min(405px, 80%); margin: 0 auto 2rem; box-shadow: 0 12px 10px -8px rgba(0, 0, 0, .7); }
.footer-name { font-size: 1.6rem; }
.footer-motto { font-size: 1.35rem; font-style: italic; }
.site-footer .footer-copy { font-size: 1rem; margin-top: 1.4em; opacity: .9; }

@media (max-width: 900px) {
  .header-inner { padding: .8rem 1rem; }
  .brand { font-size: 1.1rem; }
  .nav-button { display: block; }
  .site-nav { display: none; flex-basis: 100%; }
  .nav-toggle:checked ~ .site-nav { display: block; }
  .site-nav ul { flex-direction: column; gap: 0; }
  .site-nav a { display: block; padding: .7rem 0; border-bottom: 1px solid rgba(0, 0, 0, .12); font-size: 1.2rem; }
  .split, .donate { grid-template-columns: 1fr; }
  .split img { min-height: 0; aspect-ratio: 16 / 10; }
  .donate-text { padding-top: 0; }
  .shop-banner { margin-inline: 0; }
}
@media (max-width: 480px) {
  body { font-size: 1.15rem; }
  .form-inner .row { grid-template-columns: 1fr; }
}
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
}

/* Application form (Join Us) */
.apply { margin-top: clamp(1.5rem, 4vw, 3rem); }
.apply .note { font-size: 1.05rem; margin: 0; }
.req { color: #9e1b1b; }
.apply-form { margin-top: 1.5rem; }
.step { display: grid; grid-template-columns: repeat(6, 1fr); gap: 1.3rem 1.2rem; margin: 0 0 2.5rem; }
.step > * { grid-column: 1 / -1; margin: 0; min-width: 0; }
.step > .half { grid-column: span 3; }
.step > .third { grid-column: span 2; }
.step h3 { font-size: 1.7rem; font-weight: 400; line-height: 1.2; border-bottom: 1px solid #8f8c7d; padding-bottom: .4rem; outline: 0; }
.step h3 small { display: block; font-size: 1rem; letter-spacing: .08em; text-transform: uppercase; color: var(--olive); }
.step ul { padding-left: 1.3em; }
.step li { margin-bottom: .35em; }
.apply-form label, .apply-form legend { font-weight: 600; color: var(--ink); padding: 0; }
.apply-form fieldset { border: 0; padding: 0; }
.apply-form input:not([type=radio]):not([type=checkbox]):not([type=file]), .apply-form select, .apply-form textarea {
  display: block; width: 100%; margin-top: .35rem; padding: .6rem .7rem; font: inherit; font-size: 1.15rem;
  color: var(--ink); background: var(--cream); border: 1px solid #7d7a6c; border-radius: 3px;
}
.apply-form textarea { resize: vertical; min-height: 7rem; }
.apply-form .choice label { display: inline-flex; align-items: center; gap: .5rem; font-weight: 400; margin: .35rem 1.8rem 0 0; padding: .3rem 0; cursor: pointer; }
.apply-form .choice.stack label { display: flex; margin-right: 0; }
.apply-form input[type=radio], .apply-form input[type=checkbox] { width: 1.3rem; height: 1.3rem; accent-color: var(--olive); flex: none; margin: 0; }
.photo { background: rgba(255, 255, 255, .3); border: 1px dashed #7d7a6c; padding: 1.1rem; }
.photo label { display: block; font-size: 1.3rem; }
.photo .note { margin: .2rem 0 .8rem; }
.photo input[type=file] { display: block; width: 100%; font: inherit; font-size: 1.05rem; }
.photo input[type=file]::file-selector-button { font: inherit; background: var(--olive); color: var(--cream); border: 1px solid #55594a; border-radius: 4px; padding: .55em 1.1em; margin-right: .8em; cursor: pointer; }
.photo .preview { margin-top: .9rem; max-height: 240px; width: auto; border: 3px solid #fff; box-shadow: var(--shadow); }
.consent { display: flex; gap: .8rem; align-items: flex-start; font-weight: 400 !important; cursor: pointer; }
.consent input { margin-top: .2rem !important; }
.form-nav { display: flex; gap: 1rem; justify-content: space-between; align-items: center; }
.form-nav button { cursor: pointer; font: inherit; font-size: 1.2rem; padding: .7em 2em; }
.form-nav button:disabled { opacity: .6; cursor: progress; }
.form-nav [data-back] { background: transparent; color: var(--ink); box-shadow: none; }
.form-nav [data-back], .form-nav [data-next], .progress-wrap, .phone-gate { display: none; }
.form-nav [type=submit] { margin-left: auto; }
/* With JavaScript: one step at a time */
.apply-form.js .step { display: none; margin-bottom: 1.8rem; }
.apply-form.js .step.active { display: grid; }
.apply-form.js .form-nav [data-back], .apply-form.js .form-nav [data-next] { display: inline-block; }
.apply-form.js .form-nav [hidden] { display: none; }
.apply-form.js .progress-wrap { display: block; margin-bottom: 1.6rem; }
.progress { height: 8px; background: rgba(0, 0, 0, .15); border-radius: 4px; overflow: hidden; }
.progress span { display: block; height: 100%; width: 20%; background: var(--olive); transition: width .25s; }
.apply.gated .apply-form, .apply.gated > .note { display: none; }
.apply.gated .phone-gate { display: block; text-align: center; }
.gate-qr { margin: 0 auto 1.2rem; width: 220px; height: 220px; background: #fff; border: 6px solid #fff; box-shadow: var(--shadow); image-rendering: pixelated; }
.gate-url { font-size: 1.5rem; font-weight: 600; color: var(--ink); word-break: break-word; }
.linklike { background: none; border: 0; padding: 0; font: inherit; font-size: 1.05rem; color: var(--ink); text-decoration: underline; cursor: pointer; }
.apply .form-errors { font-size: 1.1rem; background: #f6e4dd; border: 1px solid #9e3b1b; padding: 1rem 1rem 1rem 2.2rem; }
@media (max-width: 700px) {
  .step > .half, .step > .third { grid-column: 1 / -1; }
  .form-nav button { padding: .8em 1.4em; }
}

/* Non-Recruiting Agreement: read, then sign with a finger. */
.agreement { max-height: 22rem; overflow-y: auto; -webkit-overflow-scrolling: touch; background: #fff; border: 1px solid #b9b5a6; border-radius: 4px; padding: 1rem 1.1rem; font-size: 1rem; line-height: 1.5; text-align: left; }
.agreement h4 { margin: 0 0 .8rem; text-align: center; font-size: 1.25rem; text-transform: uppercase; letter-spacing: .04em; }
.agreement h4 small { display: block; font-size: .95rem; font-style: italic; font-weight: 400; text-transform: none; letter-spacing: 0; }
.agreement h5 { margin: 1rem 0 .3rem; font-size: 1.05rem; }
.agreement p { margin: 0 0 .6rem; }
.agreement ul, .agreement ol { margin: 0 0 .6rem; padding-left: 1.4rem; }
.agreement li { margin-bottom: .3rem; }
.sigpad { margin: 1.2rem 0 .4rem; }
.sigpad label { display: block; margin-bottom: .4rem; }
.sigpad canvas { display: block; width: 100%; height: 11rem; background: #fff linear-gradient(#8a8674, #8a8674) no-repeat 5% 78% / 90% 1px; border: 2px dashed #8a8674; border-radius: 4px; touch-action: none; cursor: crosshair; -webkit-user-select: none; user-select: none; }
.sig-tools { margin: .4rem 0 0; display: flex; flex-wrap: wrap; gap: .4rem 1rem; align-items: center; }
.sig-error { color: #8a1c1c; font-weight: 600; }
.sig-error[hidden] { display: none; }
