/* The Society of the Thirteen Colonies of America and Its Wars
   Public site styles. Heritage institution look: parchment, navy, crimson, gold. */

:root {
  --ivory: #f6f0e3;
  --ivory-light: #fbf7ef;
  --parchment: #efe6d2;
  --navy: #12203a;
  --navy-deep: #0b1628;
  --navy-mid: #1c2e4a;
  --crimson: #7a1f2b;
  --crimson-deep: #5c1720;
  --gold: #c5a25a;
  --gold-bright: #d4b56a;
  --gold-deep: #9a7b3c;
  --ink: #1e1a14;
  --ink-soft: #4a4338;
  --rule: #d4c4a0;
  --rule-strong: #c5a25a;
  --focus: #7a1f2b;
  --shadow: 0 18px 40px rgba(18, 32, 58, 0.08);
  --measure: 40rem;
  --wide: 72rem;
  --header-serif: "Cormorant Garamond", "Times New Roman", Times, serif;
  --small-caps: "Cormorant SC", "Cormorant Garamond", "Times New Roman", Times, serif;
  --body-serif: "EB Garamond", "Cormorant Garamond", "Times New Roman", Times, serif;
}

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

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  color: var(--ink);
  font-family: var(--body-serif);
  font-size: 1.125rem;
  font-weight: 450;
  line-height: 1.65;
  background-color: var(--ivory);
  background-image:
    radial-gradient(ellipse at 50% -10%, rgba(197, 162, 90, 0.1), transparent 46%),
    radial-gradient(ellipse at 100% 100%, rgba(18, 32, 58, 0.04), transparent 42%),
    repeating-linear-gradient(
      0deg,
      transparent,
      transparent 3px,
      rgba(80, 60, 30, 0.012) 3px,
      rgba(80, 60, 30, 0.012) 4px
    );
  min-height: 100vh;
}

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

a {
  color: var(--crimson);
  text-decoration-thickness: 1px;
  text-underline-offset: 0.18em;
}

a:hover {
  color: var(--crimson-deep);
}

:focus-visible {
  outline: 2px solid var(--focus);
  outline-offset: 3px;
}

.skip-link {
  position: absolute;
  left: 1rem;
  top: -4rem;
  background: var(--navy);
  color: var(--ivory-light);
  padding: 0.5rem 0.9rem;
  z-index: 100;
}

.skip-link:focus {
  top: 0.75rem;
}

/* ----- Header ----- */

.top-trim {
  height: 7px;
  background:
    linear-gradient(var(--gold-bright), var(--gold) 40%, var(--gold-deep));
  border-bottom: 3px solid var(--navy-deep);
}

.site-header {
  background: linear-gradient(180deg, var(--ivory-light) 0%, var(--ivory) 100%);
  border-bottom: 1px solid var(--rule);
}

.masthead {
  width: min(var(--wide), calc(100% - 2.5rem));
  margin: 0 auto;
  padding: 1.6rem 0 1.15rem;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 1.25rem;
  text-align: left;
  text-decoration: none;
  color: var(--navy);
}

.masthead:hover {
  color: var(--navy);
}

.masthead-seal {
  width: 86px;
  height: 86px;
  flex: 0 0 86px;
  filter: drop-shadow(0 2px 4px rgba(18, 32, 58, 0.18));
}

.masthead-text {
  max-width: 28rem;
}

.masthead-kicker {
  margin: 0 0 0.2rem;
  font-family: var(--small-caps);
  font-size: 0.68rem;
  font-weight: 600;
  letter-spacing: 0.22em;
  text-transform: lowercase;
  font-variant: small-caps;
  color: var(--gold-deep);
}

.masthead-name {
  margin: 0;
  font-family: var(--header-serif);
  font-weight: 600;
  font-size: clamp(1.35rem, 2.4vw, 1.85rem);
  line-height: 1.12;
  letter-spacing: 0.01em;
  color: var(--navy);
}

.masthead-motto {
  margin: 0.35rem 0 0;
  font-style: italic;
  font-size: 0.95rem;
  color: var(--ink-soft);
}

.masthead-motto cite {
  font-style: italic;
  font-size: 0.82rem;
  letter-spacing: 0.04em;
}

/* ----- Nav ----- */

.nav-wrap {
  border-top: 1px solid var(--rule);
  background: rgba(251, 247, 239, 0.7);
}

.nav-inner {
  width: min(var(--wide), calc(100% - 2.5rem));
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
  min-height: 3.1rem;
}

.nav-toggle {
  display: none;
  background: none;
  border: 1px solid var(--navy);
  color: var(--navy);
  font-family: var(--small-caps);
  font-size: 0.78rem;
  letter-spacing: 0.16em;
  padding: 0.4rem 0.7rem;
  cursor: pointer;
}

.site-nav ul {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 0.15rem 0.1rem;
}

.site-nav a {
  display: inline-block;
  padding: 0.7rem 0.8rem;
  color: var(--navy);
  text-decoration: none;
  font-family: var(--small-caps);
  font-size: 0.86rem;
  font-weight: 600;
  letter-spacing: 0.12em;
  text-transform: lowercase;
  font-variant: small-caps;
  border-bottom: 2px solid transparent;
}

.site-nav a:hover,
.site-nav a[aria-current="page"] {
  color: var(--crimson);
  border-bottom-color: var(--gold);
}

.site-nav a.apply-link {
  margin-left: 0.35rem;
  padding: 0.38rem 0.85rem;
  border: 1px solid var(--crimson);
  background: var(--crimson);
  color: var(--ivory-light);
  border-bottom: 1px solid var(--crimson);
  letter-spacing: 0.14em;
}

.site-nav a.apply-link:hover,
.site-nav a.apply-link[aria-current="page"] {
  background: var(--crimson-deep);
  color: var(--ivory-light);
  border-color: var(--crimson-deep);
}

/* ----- Layout ----- */

.main {
  width: min(var(--wide), calc(100% - 2.5rem));
  margin: 0 auto;
  padding: 2.6rem 0 4.5rem;
}

.page-intro {
  max-width: 44rem;
  margin: 0 auto 2.8rem;
  text-align: center;
}

.eyebrow {
  margin: 0 0 0.55rem;
  font-family: var(--small-caps);
  font-size: 0.8rem;
  font-weight: 600;
  letter-spacing: 0.22em;
  color: var(--gold-deep);
  text-transform: lowercase;
  font-variant: small-caps;
}

.page-title,
h1 {
  margin: 0 0 0.8rem;
  font-family: var(--header-serif);
  font-weight: 600;
  font-size: clamp(2.1rem, 4.4vw, 3.25rem);
  line-height: 1.12;
  color: var(--navy);
  letter-spacing: 0.01em;
}

h2 {
  margin: 0 0 0.85rem;
  font-family: var(--header-serif);
  font-weight: 600;
  font-size: clamp(1.6rem, 2.6vw, 2.15rem);
  line-height: 1.2;
  color: var(--navy);
}

h3 {
  margin: 0 0 0.5rem;
  font-family: var(--header-serif);
  font-weight: 600;
  font-size: 1.4rem;
  color: var(--navy);
}

.lede,
.page-intro p.lede {
  font-size: 1.28rem;
  line-height: 1.55;
  color: var(--ink);
}

.founded-line {
  margin: 1rem 0 0;
  font-family: var(--small-caps);
  font-size: 0.95rem;
  letter-spacing: 0.12em;
  color: var(--navy-mid);
  text-transform: lowercase;
  font-variant: small-caps;
}

p {
  margin: 0 0 1rem;
}

.prose {
  max-width: var(--measure);
  margin-left: auto;
  margin-right: auto;
}

.prose-wide {
  max-width: 46rem;
  margin-left: auto;
  margin-right: auto;
}

/* ----- Ornaments ----- */

.ornament {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.75rem;
  margin: 1.4rem auto;
  max-width: 22rem;
}

.ornament span.rule {
  flex: 1;
  height: 1px;
  background: linear-gradient(90deg, transparent, var(--gold), transparent);
  display: block;
}

.ornament .star {
  width: 8px;
  height: 8px;
  background: var(--gold);
  clip-path: polygon(
    50% 0%,
    61% 35%,
    98% 35%,
    68% 57%,
    79% 91%,
    50% 70%,
    21% 91%,
    32% 57%,
    2% 35%,
    39% 35%
  );
}

/* ----- Buttons ----- */

.btn-row {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem 1rem;
  justify-content: center;
  margin-top: 1.6rem;
}

.btn {
  display: inline-block;
  text-decoration: none;
  font-family: var(--small-caps);
  font-size: 0.92rem;
  font-weight: 600;
  letter-spacing: 0.14em;
  text-transform: lowercase;
  font-variant: small-caps;
  padding: 0.7rem 1.35rem;
  border: 1px solid var(--crimson);
  cursor: pointer;
  line-height: 1.2;
}

.btn-primary {
  background: var(--crimson);
  color: var(--ivory-light);
}

.btn-primary:hover {
  background: var(--crimson-deep);
  color: var(--ivory-light);
  border-color: var(--crimson-deep);
}

.btn-ghost {
  background: transparent;
  color: var(--navy);
  border-color: var(--navy);
}

.btn-ghost:hover {
  background: var(--navy);
  color: var(--ivory-light);
}

.btn-gold {
  background: transparent;
  color: var(--ivory-light);
  border-color: var(--gold);
}

.btn-gold:hover {
  background: var(--gold);
  color: var(--navy-deep);
  border-color: var(--gold);
}

/* ----- Cards & sections ----- */

.section {
  margin: 3.2rem 0 0;
}

.section-head {
  text-align: center;
  max-width: 40rem;
  margin: 0 auto 1.8rem;
}

.card-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 1.4rem;
}

.card-grid.three {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.card {
  background: var(--ivory-light);
  border: 1px solid var(--rule);
  box-shadow: var(--shadow);
  padding: 1.6rem 1.55rem 1.7rem;
  position: relative;
}

.card::before {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  top: 0;
  height: 3px;
  background: linear-gradient(90deg, var(--gold-deep), var(--gold-bright), var(--gold-deep));
}

.card h2,
.card h3 {
  margin-top: 0.2rem;
}

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

.panel {
  background: var(--navy);
  color: var(--ivory);
  padding: 2.2rem 2rem;
  text-align: center;
  box-shadow: var(--shadow);
}

.panel h2,
.panel .founded-line,
.panel p {
  color: var(--ivory-light);
}

.panel p {
  max-width: 38rem;
  margin-left: auto;
  margin-right: auto;
}

.panel .eyebrow {
  color: var(--gold-bright);
}

.fee-figure {
  font-family: var(--header-serif);
  font-size: clamp(2.6rem, 5vw, 3.6rem);
  font-weight: 600;
  color: var(--gold-bright);
  line-height: 1;
  margin: 0.4rem 0 0.5rem;
}

.fee-figure small {
  display: block;
  margin-top: 0.45rem;
  font-family: var(--small-caps);
  font-size: 0.85rem;
  letter-spacing: 0.16em;
  font-weight: 600;
  color: var(--ivory);
}

/* ----- Steps ----- */

.steps {
  list-style: none;
  margin: 0;
  padding: 0;
  counter-reset: step;
  display: grid;
  gap: 1.15rem;
}

.steps li {
  display: grid;
  grid-template-columns: 2.6rem 1fr;
  gap: 1rem;
  align-items: start;
  background: var(--ivory-light);
  border: 1px solid var(--rule);
  padding: 1.15rem 1.2rem 1.2rem;
}

.steps li::before {
  counter-increment: step;
  content: counter(step, upper-roman);
  font-family: var(--header-serif);
  font-size: 1.35rem;
  letter-spacing: 0.04em;
  color: var(--navy);
  font-weight: 600;
  padding-top: 0.05rem;
  line-height: 1;
}

.steps h3 {
  margin-bottom: 0.25rem;
}

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

/* ----- FAQ ----- */

.faq {
  max-width: 46rem;
  margin: 0 auto;
}

.faq-item {
  border-top: 1px solid var(--rule);
  padding: 1.2rem 0 1.05rem;
}

.faq-item:last-child {
  border-bottom: 1px solid var(--rule);
}

.faq-item h2 {
  font-size: 1.45rem;
  margin-bottom: 0.45rem;
}

/* ----- Forms ----- */

.form-shell {
  max-width: 38rem;
  margin: 0 auto;
  background: var(--ivory-light);
  border: 1px solid var(--rule);
  box-shadow: var(--shadow);
  padding: 2rem 1.7rem 2.1rem;
  position: relative;
}

.form-shell::before {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  top: 0;
  height: 3px;
  background: linear-gradient(90deg, var(--gold-deep), var(--gold-bright), var(--gold-deep));
}

.form-note {
  font-size: 1.02rem;
  color: var(--ink-soft);
  margin-bottom: 1.4rem;
}

label {
  display: block;
  font-family: var(--small-caps);
  font-size: 0.86rem;
  letter-spacing: 0.12em;
  font-weight: 600;
  color: var(--navy);
  margin: 0 0 0.35rem;
  text-transform: lowercase;
  font-variant: small-caps;
}

.field {
  margin-bottom: 1.1rem;
}

.hint {
  display: block;
  margin: 0.3rem 0 0;
  font-size: 0.92rem;
  color: var(--ink-soft);
  font-style: italic;
}

input[type="text"],
input[type="email"],
select,
textarea,
input[type="file"] {
  width: 100%;
  font: inherit;
  color: var(--ink);
  background: #fffcf6;
  border: 1px solid #cbbd9e;
  padding: 0.55rem 0.7rem;
  border-radius: 0;
}

textarea {
  min-height: 10rem;
  resize: vertical;
}

input[type="file"] {
  padding: 0.55rem;
  background: var(--parchment);
}

.pay-row {
  margin-top: 1.5rem;
  text-align: center;
}

.todo-comment {
  /* Public pages stay clean; TODOs live in HTML comments and this helper for implementers. */
}

/* ----- Certificate ----- */

.certificate-stage {
  margin: 0 auto 2rem;
  max-width: 52rem;
}

.certificate {
  background:
    linear-gradient(180deg, rgba(197, 162, 90, 0.06), transparent 20%),
    #f8f3e6;
  border: 10px solid var(--navy);
  box-shadow:
    inset 0 0 0 2px var(--gold),
    inset 0 0 0 8px var(--navy-mid),
    0 20px 40px rgba(18, 32, 58, 0.12);
  padding: 2.1rem 2rem 1.8rem;
  text-align: center;
  color: var(--navy);
  position: relative;
}

.certificate::after {
  content: "";
  position: absolute;
  inset: 14px;
  border: 1px solid rgba(197, 162, 90, 0.55);
  pointer-events: none;
}

.certificate-seal {
  width: 110px;
  height: 110px;
  margin: 0 auto 0.7rem;
}

.certificate .org {
  font-family: var(--header-serif);
  font-weight: 600;
  font-size: clamp(1.25rem, 2.6vw, 1.75rem);
  line-height: 1.2;
  letter-spacing: 0.02em;
  margin: 0 0 0.35rem;
}

.certificate .doc-label {
  font-family: var(--small-caps);
  letter-spacing: 0.22em;
  font-size: 0.78rem;
  color: var(--gold-deep);
  margin: 0.2rem 0 1rem;
}

.certificate .certify {
  font-style: italic;
  font-size: 1.12rem;
  margin: 0 0 0.4rem;
}

.certificate .person,
.certificate .ancestor {
  font-family: var(--header-serif);
  font-weight: 600;
  font-size: clamp(1.7rem, 3.4vw, 2.35rem);
  line-height: 1.15;
  margin: 0.15rem 0 0.35rem;
  color: var(--crimson-deep);
}

.certificate .placeholder-note {
  font-family: var(--small-caps);
  font-size: 0.7rem;
  letter-spacing: 0.14em;
  color: var(--ink-soft);
  margin: 0 0 0.7rem;
}

.certificate .body-line {
  max-width: 32rem;
  margin: 0 auto 0.7rem;
  font-size: 1.08rem;
}

.certificate .motto {
  margin: 1.1rem 0 1.3rem;
  font-style: italic;
}

.certificate .sigs {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 2rem;
  max-width: 28rem;
  margin: 0 auto;
  position: relative;
  z-index: 1;
}

.sig {
  padding-top: 1.6rem;
}

.sig .line {
  border-top: 1px solid var(--navy);
  margin: 0 auto 0.3rem;
  width: 80%;
}

.sig .title {
  font-family: var(--small-caps);
  letter-spacing: 0.16em;
  font-size: 0.78rem;
  margin: 0;
}

.certificate-caption {
  text-align: center;
  font-size: 0.98rem;
  color: var(--ink-soft);
  font-style: italic;
  max-width: 36rem;
  margin: 1rem auto 0;
}

/* ----- Contact ----- */

.contact-block {
  max-width: 36rem;
  margin: 0 auto;
  text-align: center;
  background: var(--ivory-light);
  border: 1px solid var(--rule);
  padding: 2rem 1.5rem;
  box-shadow: var(--shadow);
}

.contact-block .office {
  font-family: var(--small-caps);
  letter-spacing: 0.16em;
  color: var(--gold-deep);
  margin-bottom: 0.4rem;
}

.contact-email {
  font-family: var(--header-serif);
  font-size: 1.45rem;
  font-weight: 600;
  color: var(--navy);
  text-decoration: none;
  display: inline-block;
  margin: 0.3rem 0 0.8rem;
}

.contact-email:hover {
  color: var(--crimson);
}

/* ----- Footer ----- */

.site-footer {
  background: var(--navy-deep);
  color: #d8d2c4;
  padding: 2.6rem 0 1.8rem;
  border-top: 4px solid var(--gold);
}

.footer-inner {
  width: min(var(--wide), calc(100% - 2.5rem));
  margin: 0 auto;
  text-align: center;
}

.footer-seal {
  width: 68px;
  height: 68px;
  margin: 0 auto 0.9rem;
}

.footer-name {
  font-family: var(--header-serif);
  font-size: 1.25rem;
  font-weight: 600;
  color: var(--ivory-light);
  margin: 0 0 0.25rem;
}

.footer-nick {
  margin: 0 0 0.35rem;
  font-size: 0.95rem;
  font-style: italic;
  color: #b9b1a0;
}

.footer-motto {
  margin: 0 0 1rem;
  font-family: var(--small-caps);
  letter-spacing: 0.18em;
  font-size: 0.78rem;
  color: var(--gold);
}

.footer-nav {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 0.2rem 1rem;
  margin: 0 0 1.1rem;
}

.footer-nav a {
  color: #d8d2c4;
  text-decoration: none;
  font-family: var(--small-caps);
  letter-spacing: 0.1em;
  font-size: 0.8rem;
}

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

.copyright {
  margin: 0;
  font-size: 0.9rem;
  color: #9b9486;
}

/* ----- Home hero extras ----- */

.hero {
  text-align: center;
  padding: 0.4rem 0 0.5rem;
}

.hero-seal {
  width: 148px;
  height: 148px;
  margin: 0 auto 1.1rem;
  filter: drop-shadow(0 6px 14px rgba(18, 32, 58, 0.18));
}

.hero h1 {
  max-width: 22ch;
  margin-left: auto;
  margin-right: auto;
}

.mission {
  max-width: 40rem;
  margin: 0.2rem auto 0;
  font-size: 1.28rem;
  line-height: 1.55;
}

blockquote.mission-quote {
  margin: 0 auto;
  max-width: 40rem;
  padding: 0;
  border: 0;
  font-size: 1.28rem;
  line-height: 1.55;
}

blockquote.mission-quote p {
  margin: 0;
}


.prose-wide ul,
.prose ul {
  margin: 0 0 1.15rem;
  padding-left: 1.15rem;
}

.prose-wide li,
.prose li {
  margin-bottom: 0.4rem;
}

/* ----- Responsive ----- */

@media (max-width: 860px) {
  .card-grid,
  .card-grid.three {
    grid-template-columns: 1fr;
  }

  .masthead {
    flex-direction: column;
    text-align: center;
    gap: 0.7rem;
    padding-top: 1.25rem;
  }

  .masthead-text {
    max-width: 22rem;
  }

  .masthead-seal {
    width: 74px;
    height: 74px;
    flex-basis: 74px;
  }
}

@media (max-width: 720px) {
  body {
    font-size: 1.08rem;
  }

  .main {
    width: min(var(--wide), calc(100% - 1.5rem));
    padding-top: 1.8rem;
  }

  .nav-inner {
    width: min(var(--wide), calc(100% - 1.5rem));
    justify-content: flex-end;
    min-height: 2.8rem;
    padding: 0.35rem 0;
  }

  .nav-toggle {
    display: inline-block;
  }

  .site-nav {
    display: none;
    position: absolute;
    top: 100%;
    left: 50%;
    transform: translateX(-50%);
    width: min(var(--wide), calc(100vw - 1.5rem));
    background: var(--ivory-light);
    border: 1px solid var(--rule);
    box-shadow: var(--shadow);
    z-index: 20;
  }

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

  .site-nav ul {
    flex-direction: column;
    align-items: stretch;
    padding: 0.4rem 0;
  }

  .site-nav a,
  .site-nav a.apply-link {
    display: block;
    margin: 0;
    border-bottom: 0;
    border: 0;
    background: transparent;
    color: var(--navy);
    padding: 0.7rem 1rem;
  }

  .site-nav a.apply-link {
    color: var(--crimson);
  }

  .site-nav a[aria-current="page"] {
    background: var(--parchment);
  }

  .certificate {
    padding: 1.3rem 0.9rem 1.2rem;
    border-width: 7px;
  }

  .certificate::after {
    inset: 9px;
  }

  .certificate .sigs {
    gap: 1rem;
  }

  .form-shell,
  .panel,
  .card,
  .contact-block {
    padding-left: 1.15rem;
    padding-right: 1.15rem;
  }
}

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