/* The Dallin Chronicle — site styles */

@import url('https://fonts.googleapis.com/css2?family=Playfair+Display:ital,wght@0,600;0,700;0,900;1,600&family=Libre+Franklin:ital,wght@0,400;0,500;0,600;0,700;1,400&display=swap');

:root {
  --ink: #1e1a2e;
  --paper: #faf8f3;
  --paper-dim: #f1ede1;
  --rule: #c7bfa8;
  --rust: #6b2436;
  --rust-dark: #4a1826;
  --hoodoo: #8a6a3f;
  --sage: #46503e;
  --shadow: rgba(20, 16, 12, 0.12);
  --gold: #b8923f;
  --maxw: 1080px;
}

@media (prefers-color-scheme: dark) {
  :root {
    --ink: #ece7da;
    --paper: #17151c;
    --paper-dim: #1e1b24;
    --rule: #3c3730;
    --rust: #c97a8c;
    --rust-dark: #e3a0ae;
    --hoodoo: #cba869;
    --sage: #8fa07f;
    --shadow: rgba(0, 0, 0, 0.4);
  }
  .masthead .top-row,
  .masthead .tagline,
  .dateline,
  .edition-bar,
  .dropcap:first-letter {
    color: var(--ink);
  }
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: 'Libre Franklin', system-ui, sans-serif;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

a { color: var(--rust-dark); text-decoration: none; }
a:hover { text-decoration: underline; }

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

.wrap {
  max-width: var(--maxw);
  margin: 0 auto;
  padding: 0 1.25rem;
}

/* Breaking banner */
.breaking {
  background: var(--ink);
  color: var(--paper);
  overflow: hidden;
  white-space: nowrap;
  font-family: 'Libre Franklin', sans-serif;
  font-weight: 500;
  font-size: 0.76rem;
  letter-spacing: 0.02em;
  border-bottom: 1px solid var(--gold);
}
.breaking .wrap { display: flex; align-items: center; gap: 0.75rem; padding: 0.4rem 1.25rem; }
.breaking .tag {
  border: 1px solid var(--gold);
  color: var(--gold);
  padding: 0.1rem 0.5rem;
  border-radius: 2px;
  font-size: 0.64rem;
  letter-spacing: 0.1em;
  flex-shrink: 0;
  text-transform: uppercase;
}
.breaking .ticker-track {
  overflow: hidden;
  flex: 1;
}
.breaking .ticker-text {
  display: inline-block;
  white-space: nowrap;
  animation: ticker 26s linear infinite;
  padding-left: 100%;
}
@media (prefers-reduced-motion: reduce) {
  .breaking .ticker-text { animation: none; padding-left: 0; }
}
@keyframes ticker {
  0% { transform: translateX(0); }
  100% { transform: translateX(-100%); }
}

/* Masthead */
.masthead {
  border-bottom: 4px double var(--ink);
  padding: 1.6rem 0 0.9rem;
}
.masthead .top-row {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  font-size: 0.72rem;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--rust-dark);
  margin-bottom: 0.6rem;
}
.masthead h1 {
  font-family: 'Playfair Display', Georgia, serif;
  font-weight: 900;
  font-size: clamp(2.4rem, 7vw, 4.4rem);
  text-align: center;
  margin: 0;
  letter-spacing: 0.01em;
}
.masthead .tagline {
  text-align: center;
  font-family: 'Playfair Display', Georgia, serif;
  font-style: italic;
  font-size: 1.02rem;
  color: var(--rust-dark);
  margin-top: 0.35rem;
}
.masthead .by-author {
  text-align: center;
  font-size: 0.72rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--ink);
  opacity: 0.65;
  margin: 0.55rem 0 0;
}

/* Nav */
nav.sitenav {
  background: var(--ink);
  position: sticky;
  top: 0;
  z-index: 40;
}
nav.sitenav .wrap {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0;
}
nav.sitenav ul {
  list-style: none;
  display: flex;
  margin: 0;
  padding: 0;
  flex-wrap: wrap;
}
nav.sitenav a {
  display: block;
  color: var(--paper);
  padding: 0.75rem 0.9rem;
  font-size: 0.85rem;
  font-weight: 600;
  letter-spacing: 0.02em;
}
nav.sitenav a:hover { background: var(--rust); text-decoration: none; }
nav.sitenav .brand-mini {
  color: var(--paper);
  font-family: 'Playfair Display', serif;
  font-weight: 700;
  padding: 0.7rem 0.9rem;
  display: none;
}
.nav-toggle {
  display: none;
  background: none;
  border: none;
  color: var(--paper);
  font-size: 1.4rem;
  padding: 0.6rem 0.9rem;
  cursor: pointer;
}
@media (max-width: 760px) {
  .nav-toggle { display: block; }
  nav.sitenav ul {
    flex-direction: column;
    width: 100%;
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.3s ease;
  }
  nav.sitenav ul.open { max-height: 480px; }
  nav.sitenav .wrap { flex-wrap: wrap; }
}

/* Edition bar */
.edition-bar {
  background: var(--paper-dim);
  border-bottom: 1px solid var(--rule);
  font-size: 0.74rem;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--rust-dark);
  font-weight: 700;
}
.edition-bar .wrap {
  display: flex;
  justify-content: space-between;
  padding: 0.5rem 1.25rem;
}

/* Dept tag */
.dept-tag {
  display: inline-block;
  font-size: 0.68rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--paper);
  background: var(--rust);
  padding: 0.2rem 0.6rem;
  border-radius: 2px;
  margin-bottom: 0.7rem;
  font-weight: 700;
}
.dept-tag.small {
  background: var(--sage);
  font-size: 0.62rem;
  padding: 0.15rem 0.45rem;
  margin-bottom: 0.4rem;
}

/* Lead story */
.lead-photo { margin-bottom: 1rem; }
.lead-photo img {
  width: 100%;
  aspect-ratio: 12 / 7;
  object-fit: cover;
  border-radius: 3px;
  box-shadow: 0 12px 28px var(--shadow);
}
.lead-photo .photo-cap {
  font-size: 0.78rem;
  opacity: 0.7;
  margin: 0.5rem 0 0;
  font-style: italic;
}
.lead-photo .photo-cap span { font-style: normal; opacity: 0.8; }

.also-in-issue {
  margin-top: 1.6rem;
  padding-top: 1.1rem;
  border-top: 1px solid var(--rule);
  font-size: 0.85rem;
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem 0.9rem;
  align-items: baseline;
}
.also-in-issue span {
  font-weight: 700;
  text-transform: uppercase;
  font-size: 0.7rem;
  letter-spacing: 0.06em;
  color: var(--ink);
  opacity: 0.6;
  width: 100%;
}
@media (min-width: 480px) {
  .also-in-issue span { width: auto; }
}
.also-in-issue a { font-weight: 600; }

/* Top-stories rail */
.rail {
  background: var(--paper-dim);
  border: 1px solid var(--rule);
  border-radius: 3px;
  padding: 1.1rem 1.2rem 0.3rem;
  margin-bottom: 1.5rem;
}
.rail-head {
  font-family: 'Playfair Display', serif;
  font-size: 1rem;
  margin: 0 0 0.9rem;
  padding-bottom: 0.5rem;
  border-bottom: 2px solid var(--ink);
}
.story-line {
  display: block;
  padding-bottom: 0.9rem;
  margin-bottom: 0.9rem;
  border-bottom: 1px solid var(--rule);
  color: var(--ink);
}
.story-line:last-child { border-bottom: none; margin-bottom: 0; }
.story-line:hover { text-decoration: none; }
.story-line:hover h4 { color: var(--rust-dark); }
.story-line h4 {
  font-family: 'Playfair Display', serif;
  font-size: 0.98rem;
  margin: 0 0 0.3rem;
  line-height: 1.25;
  transition: color 0.15s ease;
}
.story-line p {
  font-size: 0.82rem;
  margin: 0;
  opacity: 0.8;
  color: var(--ink);
}

/* Layout grid */
.layout {
  display: grid;
  grid-template-columns: 2fr 1fr;
  gap: 2.25rem;
  padding: 2.25rem 0;
}
@media (max-width: 820px) {
  .layout { grid-template-columns: 1fr; }
}

.lede {
  font-family: 'Playfair Display', Georgia, serif;
  font-weight: 700;
  font-size: clamp(1.7rem, 3.4vw, 2.5rem);
  line-height: 1.15;
  margin: 0 0 0.6rem;
}
.dateline {
  font-size: 0.78rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--rust-dark);
  font-weight: 700;
  margin-bottom: 0.6rem;
}
.byline {
  font-size: 0.85rem;
  font-style: italic;
  color: var(--ink);
  opacity: 0.75;
  margin-bottom: 1rem;
}
.dropcap:first-letter {
  font-family: 'Playfair Display', serif;
  font-weight: 900;
  font-size: 3.2rem;
  float: left;
  line-height: 0.8;
  padding: 0.08em 0.1em 0 0;
  color: var(--rust);
}

.card {
  background: var(--paper-dim);
  border: 1px solid var(--rule);
  padding: 1.1rem 1.2rem;
  margin-bottom: 1.5rem;
  border-radius: 3px;
}
.card h3 {
  font-family: 'Playfair Display', serif;
  margin: 0 0 0.5rem;
  font-size: 1.15rem;
}
.card p { margin: 0.3rem 0; font-size: 0.93rem; }
.card ul { margin: 0.4rem 0 0; padding-left: 1.1rem; font-size: 0.9rem; }
.card ul li { margin-bottom: 0.35rem; }

.rule { border: none; border-top: 1px solid var(--rule); margin: 2rem 0; }
.rule-thick { border: none; border-top: 3px double var(--ink); margin: 2.25rem 0; }

.section-head {
  font-family: 'Playfair Display', serif;
  font-weight: 700;
  font-size: 1.35rem;
  border-bottom: 2px solid var(--ink);
  padding-bottom: 0.35rem;
  margin: 0 0 1.1rem;
}

.grid-3 {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1.5rem;
}
@media (max-width: 760px) { .grid-3 { grid-template-columns: 1fr; } }

.teaser h4 {
  font-family: 'Playfair Display', serif;
  font-size: 1.05rem;
  margin: 0 0 0.35rem;
}
.teaser .dept {
  display: inline-block;
  font-size: 0.68rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--paper);
  background: var(--sage);
  padding: 0.15rem 0.5rem;
  border-radius: 2px;
  margin-bottom: 0.5rem;
}
.teaser p { font-size: 0.88rem; margin: 0.3rem 0; }

/* Letters / columns */
.letter {
  background: var(--paper-dim);
  border-left: 4px solid var(--rust);
  padding: 1.1rem 1.3rem;
  margin: 1.2rem 0;
  font-size: 0.96rem;
}
.letter .sign { font-style: italic; }
.response-head {
  font-family: 'Playfair Display', serif;
  font-weight: 700;
  margin: 1.6rem 0 0.6rem;
  font-size: 1.05rem;
  color: var(--rust-dark);
}

/* Buttons / forms */
.btn {
  display: inline-block;
  background: var(--rust);
  color: var(--paper);
  padding: 0.65rem 1.3rem;
  border-radius: 3px;
  font-weight: 700;
  font-size: 0.9rem;
  letter-spacing: 0.02em;
  border: none;
  cursor: pointer;
  transition: transform 0.15s ease, background 0.15s ease;
}
.btn:hover { background: var(--rust-dark); text-decoration: none; transform: translateY(-1px); }

form.stationery {
  background: var(--paper-dim);
  border: 1px solid var(--rule);
  padding: 1.5rem;
  border-radius: 4px;
  max-width: 560px;
}
form.stationery label {
  display: block;
  font-weight: 600;
  font-size: 0.85rem;
  margin: 0.9rem 0 0.3rem;
}
form.stationery input,
form.stationery textarea,
form.stationery select {
  width: 100%;
  padding: 0.55rem 0.6rem;
  border: 1px solid var(--rule);
  border-radius: 3px;
  background: var(--paper);
  color: var(--ink);
  font-family: inherit;
  font-size: 0.92rem;
}
form.stationery textarea { min-height: 120px; resize: vertical; }
.poll-option {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  background: var(--paper);
  border: 1px solid var(--rule);
  padding: 0.65rem 0.8rem;
  border-radius: 3px;
  margin-bottom: 0.6rem;
  cursor: pointer;
  transition: border-color 0.15s ease, background 0.15s ease;
}
.poll-option:hover { border-color: var(--rust); }
.poll-option input { width: auto; }
.form-msg {
  display: none;
  margin-top: 1rem;
  padding: 0.8rem 1rem;
  background: var(--sage);
  color: var(--paper);
  border-radius: 3px;
  font-size: 0.9rem;
}
.form-msg.show { display: block; }

/* Footer */
footer {
  border-top: 4px double var(--ink);
  margin-top: 3rem;
  padding: 2.25rem 0 1.25rem;
  font-size: 0.85rem;
  color: var(--ink);
}
footer .wrap { display: flex; justify-content: space-between; flex-wrap: wrap; gap: 1rem; }
footer .footer-grid { align-items: flex-start; padding-bottom: 1.5rem; }
footer .footer-about { max-width: 480px; }
footer .footer-title {
  font-family: 'Playfair Display', serif;
  font-weight: 700;
  font-size: 1rem;
  margin: 0 0 0.5rem;
}
footer .footer-about p { margin: 0.35rem 0; opacity: 0.85; }
footer .footer-links { display: flex; flex-direction: column; gap: 0.4rem; text-align: right; }
footer .footer-copy {
  border-top: 1px solid var(--rule);
  padding-top: 1rem;
  font-size: 0.75rem;
  opacity: 0.65;
}

.subscribe-cta {
  background: linear-gradient(135deg, var(--rust) 0%, var(--hoodoo) 100%);
  color: var(--paper);
  padding: 1.4rem 1.5rem;
  border-radius: 4px;
  margin-bottom: 1.5rem;
}
.subscribe-cta h3 { font-family: 'Playfair Display', serif; margin: 0 0 0.4rem; }
.subscribe-cta p { margin: 0 0 0.9rem; font-size: 0.92rem; }
.subscribe-cta .btn { background: var(--ink); }
.subscribe-cta .btn:hover { background: #000; }

.reveal {
  opacity: 0;
  transform: translateY(14px);
  transition: opacity 0.6s ease, transform 0.6s ease;
}
.reveal.in { opacity: 1; transform: translateY(0); }

/* Halloween issue hero */
.halloween-hero {
  position: relative;
  width: 100%;
  min-height: 220px;
  background: url('images/halloween-hero.jpg') center 35%/cover no-repeat;
  display: flex;
  align-items: center;
}
.halloween-hero-inner {
  max-width: var(--maxw);
  margin: 0 auto;
  padding: 1.75rem 1.25rem;
  width: 100%;
}
.halloween-hero-eyebrow {
  display: inline-block;
  font-size: 0.72rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: #e3a35c;
  margin-bottom: 0.5rem;
  font-weight: 700;
}
.halloween-hero h2 {
  font-family: 'Playfair Display', serif;
  font-weight: 700;
  font-size: clamp(1.5rem, 4vw, 2.5rem);
  margin: 0;
  color: #f6ead9;
  text-shadow: 0 2px 14px rgba(0, 0, 0, 0.7);
  max-width: 520px;
  line-height: 1.2;
}
@media (min-width: 700px) {
  .halloween-hero { min-height: 280px; }
}

/* Local ads */
.ad-box {
  background: var(--paper);
  border: 1px dashed var(--rule);
  padding: 1rem 1.1rem;
  margin-bottom: 1.5rem;
  border-radius: 3px;
  text-align: center;
}
.ad-box .ad-label {
  display: block;
  font-size: 0.62rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--ink);
  opacity: 0.45;
  margin-bottom: 0.6rem;
}
.ad-box h4 {
  font-family: 'Playfair Display', serif;
  font-size: 1.05rem;
  margin: 0 0 0.4rem;
  color: var(--rust-dark);
}
.ad-box p {
  font-size: 0.85rem;
  margin: 0 0 0.7rem;
  opacity: 0.85;
}

.masthead-vol {
  text-align: center;
  font-size: 0.75rem;
  letter-spacing: 0.06em;
  color: var(--ink);
  opacity: 0.7;
  margin-top: 0.5rem;
}
