/* Clearwater Rifles — shared styles
   Fonts are placeholders until final typefaces are chosen. */

:root {
  --paper: #fbf8f1;
  --ink: #1d1a16;
  --ink-soft: #4a443b;
  --ink-faint: #8a8275;
  --rule: #1d1a16;
  --rule-soft: #cfc7b8;
  --display: 'Playfair Display', Georgia, serif;
  --display-sc: 'Playfair Display SC', Georgia, serif;
  --script: 'Pinyon Script', cursive;
  --fell: 'IM Fell English SC', Georgia, serif;
  --body: 'Old Standard TT', Georgia, 'Times New Roman', serif;
}

* { box-sizing: border-box; }

html { background: var(--paper); }

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

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

.page {
  max-width: 860px;
  margin: 0 auto;
  padding: 1.5rem clamp(1rem, 4vw, 2.25rem) 2rem;
}

/* ---------- Masthead ---------- */

.masthead {
  border: 1.5px solid var(--rule);
  outline: 1px solid var(--rule);
  outline-offset: 4px;
  padding: 1rem 0.75rem 0.9rem;
  margin: 6px 6px 0;
  text-align: center;
}
.masthead a { text-decoration: none; color: inherit; display: block; }
.masthead .kicker {
  font-family: var(--fell);
  font-size: 12px;
  letter-spacing: 0.3em;
}
.masthead .ornament {
  font-size: 18px;
  color: var(--ink-soft);
  margin: 2px 0;
}
.masthead .name {
  font-family: var(--display);
  font-weight: 900;
  font-size: clamp(38px, 10vw, 68px);
  line-height: 0.95;
  letter-spacing: 0.04em;
}
.masthead .script {
  font-family: var(--script);
  font-size: clamp(32px, 8vw, 52px);
  line-height: 1;
  margin-top: -4px;
}
.masthead .rule-short {
  width: 55%;
  margin: 8px auto 6px;
  border-top: 1px solid var(--rule);
}
.masthead .tagline {
  font-family: var(--fell);
  font-size: 12.5px;
  letter-spacing: 0.22em;
}

/* ---------- Navigation ---------- */

.nav {
  text-align: center;
  font-family: var(--fell);
  font-size: 16px;
  letter-spacing: 0.06em;
  margin: 1.1rem 0 0.4rem;
  line-height: 2;
}
.nav a {
  text-decoration: none;
  padding: 0 0.15em;
}
.nav a[aria-current="page"] { border-bottom: 1px solid var(--ink); }
.nav a:hover { border-bottom: 1px dotted var(--ink-soft); }
.nav .sep { color: var(--ink-faint); margin: 0 0.6em; }

/* ---------- Rules ---------- */

.rule-double { border-top: 3px double var(--rule); margin: 0.5rem 0; }
.rule-single { border-top: 1px solid var(--rule); margin: 0.4rem 0; }
.rule-short-center { width: 48px; border-top: 1px solid var(--rule); margin: 1.75rem auto; }

/* ---------- Headings and text ---------- */

.section-title {
  font-family: var(--display-sc);
  font-weight: 700;
  font-size: 22px;
  letter-spacing: 0.12em;
  text-align: center;
  margin: 1.5rem 0 0.4rem;
}
.lede {
  font-style: italic;
  text-align: center;
  font-size: 18px;
  line-height: 1.55;
  max-width: 34em;
  margin: 0 auto 1.25rem;
}
.small-note {
  text-align: center;
  font-style: italic;
  font-size: 14.5px;
  color: var(--ink-soft);
  margin: 0.5rem auto;
}
.fell { font-family: var(--fell); letter-spacing: 0.06em; }

/* ---------- Catalogue entries ---------- */

.cols {
  column-width: 300px;
  column-gap: 2rem;
  column-rule: 1px solid var(--rule-soft);
  margin-top: 0.75rem;
}
.entry {
  break-inside: avoid;
  margin: 0 0 1.25rem;
}
.entry .no {
  font-size: 12.5px;
  letter-spacing: 0.05em;
  color: var(--ink-faint);
}
.entry .title {
  font-weight: 700;
  font-size: 18px;
  line-height: 1.25;
}
.entry .desc {
  font-size: 15.5px;
  line-height: 1.5;
  margin: 0.15rem 0 0;
}
.entry .price {
  font-size: 16px;
  margin-top: 0.2rem;
}

/* ---------- Steps (how it works) ---------- */

.steps {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 160px), 1fr));
  gap: 1.25rem 1.5rem;
  margin: 1rem 0 0.5rem;
}
.step { text-align: center; }
.step .numeral {
  font-family: var(--display);
  font-weight: 900;
  font-size: 26px;
  line-height: 1;
}
.step .label {
  font-family: var(--fell);
  font-size: 16px;
  letter-spacing: 0.06em;
  margin: 0.3rem 0 0.15rem;
}
.step p { margin: 0; font-size: 15px; line-height: 1.45; color: var(--ink-soft); }

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

.button {
  display: inline-block;
  font-family: var(--fell);
  font-size: 17px;
  letter-spacing: 0.1em;
  color: var(--ink);
  background: transparent;
  border: 1.5px solid var(--ink);
  outline: 1px solid var(--ink);
  outline-offset: 3px;
  padding: 0.55rem 1.4rem;
  margin: 4px;
  text-decoration: none;
  cursor: pointer;
}
.button:hover { background: var(--ink); color: var(--paper); }
.button.quiet {
  outline: none;
  border-width: 1px;
  font-size: 15px;
  padding: 0.4rem 1rem;
}
.center { text-align: center; }

/* ---------- Prose (About) ---------- */

.prose {
  max-width: 36em;
  margin: 0 auto;
  font-size: 18px;
  line-height: 1.65;
}
.prose p { margin: 0 0 1.1rem; }
.prose .dropcap::first-letter {
  font-family: var(--display);
  font-weight: 900;
  float: left;
  font-size: 3.4em;
  line-height: 0.85;
  padding: 0.08em 0.1em 0 0;
}

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

.footer {
  margin-top: 2.5rem;
  text-align: center;
  font-size: 15px;
}
.footer .name {
  font-family: var(--display-sc);
  font-weight: 700;
  letter-spacing: 0.14em;
  font-size: 17px;
  margin-top: 0.75rem;
}
.footer .line { margin: 0.2rem 0; }
.footer a { text-decoration: none; border-bottom: 1px dotted var(--ink-soft); }
.footer .fine { font-size: 12.5px; color: var(--ink-faint); margin-top: 0.75rem; }

/* ---------- Quote builder ---------- */

.builder, .quote-panel {
  border: 1px solid var(--rule);
  padding: 1.1rem clamp(0.9rem, 3vw, 1.5rem) 1.25rem;
  margin: 1.25rem 0;
  background: #fffdf8;
}
.builder-head {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: 1rem;
  flex-wrap: wrap;
}
.crumbs {
  font-size: 14px;
  font-style: italic;
  color: var(--ink-soft);
}
.builder h2, .quote-panel h2 {
  font-family: var(--display-sc);
  font-weight: 700;
  font-size: 20px;
  letter-spacing: 0.1em;
  margin: 0.4rem 0 0.6rem;
}
.choice {
  display: block;
  width: 100%;
  text-align: left;
  font-family: var(--body);
  font-size: 18px;
  color: var(--ink);
  background: transparent;
  border: 1px solid var(--rule-soft);
  padding: 0.7rem 0.9rem;
  margin: 0.5rem 0 0;
  cursor: pointer;
}
.choice:hover, .choice:focus-visible { border-color: var(--ink); background: #f6f1e6; }
.choice .sub {
  display: block;
  font-size: 14.5px;
  font-style: italic;
  color: var(--ink-soft);
}
.choice .row { display: flex; justify-content: space-between; gap: 1rem; align-items: baseline; }
.back {
  font-family: var(--body);
  font-size: 14px;
  background: none;
  border: none;
  padding: 0;
  color: var(--ink-soft);
  cursor: pointer;
  text-decoration: underline;
}
.note-box {
  border-left: 2px solid var(--ink);
  padding: 0.1rem 0 0.1rem 0.8rem;
  margin: 0.8rem 0;
  font-style: italic;
  font-size: 15px;
  color: var(--ink-soft);
}
.option {
  display: flex;
  gap: 0.7rem;
  align-items: flex-start;
  padding: 0.6rem 0;
  border-bottom: 1px solid var(--rule-soft);
  cursor: pointer;
  font-size: 16.5px;
}
.option input { margin-top: 0.35rem; width: 17px; height: 17px; accent-color: var(--ink); flex: none; }
.option .grow { flex: 1; }
.option .sub { display: block; font-size: 14px; font-style: italic; color: var(--ink-soft); }
.base-line { font-size: 17px; margin: 0.2rem 0 0.3rem; }
.subtotal {
  display: flex;
  justify-content: space-between;
  font-size: 18px;
  margin: 0.9rem 0 0.6rem;
}

.quote-meta {
  display: flex;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 0.5rem;
  font-size: 14px;
  color: var(--ink-soft);
}
.quote-list { list-style: none; padding: 0; margin: 0.5rem 0 0; }
.quote-list li {
  border-bottom: 1px solid var(--rule-soft);
  padding: 0.6rem 0;
}
.quote-list .line-main {
  display: flex;
  justify-content: space-between;
  gap: 1rem;
  font-weight: 700;
  font-size: 16.5px;
}
.quote-list .line-sub {
  display: flex;
  justify-content: space-between;
  gap: 1rem;
  font-size: 15px;
  color: var(--ink-soft);
  padding-left: 1rem;
}
.quote-list .remove {
  font-family: var(--body);
  font-size: 13px;
  background: none;
  border: none;
  color: var(--ink-faint);
  text-decoration: underline;
  cursor: pointer;
  padding: 0;
}
.quote-empty { font-style: italic; color: var(--ink-soft); margin: 0.5rem 0; }
.quote-total {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  font-family: var(--display-sc);
  font-weight: 700;
  font-size: 22px;
  letter-spacing: 0.06em;
  margin: 0.9rem 0 0.2rem;
}
.fields {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 230px), 1fr));
  gap: 0.6rem 1rem;
  margin: 1rem 0 0.5rem;
}
.fields label { font-size: 14px; color: var(--ink-soft); display: block; }
.fields input, .fields textarea {
  width: 100%;
  font-family: var(--body);
  font-size: 16px;
  color: var(--ink);
  background: var(--paper);
  border: 1px solid var(--rule-soft);
  padding: 0.45rem 0.55rem;
  margin-top: 0.15rem;
}
.fields input:focus, .fields textarea:focus { outline: 1px solid var(--ink); border-color: var(--ink); }
.fields .full { grid-column: 1 / -1; }
.form-error { color: #8b1d12; font-size: 14.5px; min-height: 1.2em; margin: 0.25rem 0; }
.actions { text-align: center; margin-top: 0.75rem; }

.hp { position: absolute; left: -9999px; width: 1px; height: 1px; overflow: hidden; }
.sent {
  border: 1.5px solid var(--ink);
  outline: 1px solid var(--ink);
  outline-offset: 3px;
  text-align: center;
  padding: 1rem;
  margin: 1rem 4px;
}
.sent .sent-title {
  font-family: var(--display-sc);
  font-weight: 700;
  font-size: 20px;
  letter-spacing: 0.1em;
}
.sent p { margin: 0.3rem 0 0; font-style: italic; }
.print-only { display: none; }

@media print {
  @page { size: letter; margin: 0.6in; }
  body { background: #fff; font-size: 12pt; }
  .page { padding: 0; max-width: none; }
  .nav, .builder, .actions, .footer, .remove, .no-print, .form-error { display: none !important; }
  .print-only { display: block; }
  .quote-panel { border: none; padding: 0; margin: 0.5rem 0; background: #fff; }
  .masthead { padding: 0.5rem; }
  .masthead .name { font-size: 40pt; }
  .masthead .script { font-size: 30pt; }
  .fields input, .fields textarea { border: none; border-bottom: 1px solid #000; background: #fff; padding-left: 0; resize: none; outline: none; }
  .fields input::placeholder, .fields textarea::placeholder { color: transparent; }
}
