/*
  Stylesheet for 79_JOHN_MOSS
  - Classic/Traditional UI
  - Pure CSS interactions
  - Accessibility-conscious
*/

:root {
  --navy: #0d1b2a;
  --oxford: #14213d;
  --gold: #b29155;
  --parchment: #f5f1e8;
  --gray: #d9d9d9;
  --ink: #111318;
  --container: 1120px;
  --radius: 8px;
  --shadow: 0 8px 20px rgba(13, 27, 42, 0.15);
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  color: var(--oxford);
  background: #ffffff;
  font-family: Lato, system-ui, -apple-system, Segoe UI, Roboto, Arial,
    sans-serif;
  line-height: 1.65;
}

h1,
h2,
h3,
h4 {
  font-family: "Playfair Display", Georgia, serif;
  color: var(--navy);
}

h1 {
  font-size: 2rem;
  margin: 0 0 0.25rem 0;
  letter-spacing: 0.5px;
}
.site-subtitle {
  margin: 0;
  color: var(--oxford);
  opacity: 0.85;
}

.container {
  max-width: var(--container);
  margin: 0 auto;
  padding: 0 1rem;
}
.section {
  padding: 4rem 0;
}
.section-header {
  text-align: center;
  margin-bottom: 2rem;
}
.section-header .eyebrow {
  color: var(--gold);
  letter-spacing: 0.08em;
  font-variant-caps: small-caps;
}

.skip-link {
  position: absolute;
  left: -9999px;
  top: auto;
  width: 1px;
  height: 1px;
  overflow: hidden;
}
.skip-link:focus {
  position: fixed;
  left: 1rem;
  top: 1rem;
  width: auto;
  height: auto;
  background: #fff;
  padding: 0.5rem 0.75rem;
  border: 1px solid var(--navy);
  z-index: 1000;
}

/* Heritage header bar */
.site-header {
  background: #fff;
  border-bottom: 1px solid var(--gray);
}
.heritage-bar {
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
  gap: 1rem;
  padding: 0.35rem 1rem;
  background: var(--parchment);
  border-bottom: 1px solid var(--gray);
}
.heritage-bar .crest {
  font-family: "Playfair Display", Georgia, serif;
  font-variant-caps: small-caps;
  color: var(--navy);
  letter-spacing: 0.12em;
}
.heritage-bar .rule-left,
.heritage-bar .rule-right {
  height: 1px;
  background: linear-gradient(90deg, transparent, var(--gray), transparent);
  display: block;
}

.brand {
  display: flex;
  align-items: center;
  gap: 1rem;
  padding: 1rem;
}
.logo {
  width: 60px;
  height: 60px;
  object-fit: cover;
  border: 1px solid var(--gray);
  border-radius: 6px;
}
.brand-text {
  display: grid;
}
.site-title {
  font-variant-caps: small-caps;
}

/* Ribbon tabs navigation */
.primary-nav ul {
  list-style: none;
  padding: 0 1rem 1rem;
  margin: 0;
  display: flex;
  gap: 0.5rem;
  flex-wrap: wrap;
}
.primary-nav a.ribbon {
  position: relative;
  color: var(--navy);
  text-decoration: none;
  background: #fff;
  border: 1px solid var(--gray);
  padding: 0.5rem 0.9rem;
  border-radius: 4px;
}
.primary-nav a.ribbon span {
  position: relative;
  z-index: 1;
}
.primary-nav a.ribbon::before,
.primary-nav a.ribbon::after {
  content: "";
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  width: 10px;
  height: 10px;
  background: #fff;
  border-left: 1px solid var(--gray);
  border-bottom: 1px solid var(--gray);
}
.primary-nav a.ribbon::before {
  left: -6px;
  transform: translateY(-50%) rotate(45deg);
}
.primary-nav a.ribbon::after {
  right: -6px;
  transform: translateY(-50%) rotate(225deg);
}
.primary-nav a.ribbon:hover,
.primary-nav a.ribbon:focus {
  outline: none;
  border-color: var(--gold);
  color: var(--navy);
  box-shadow: 0 0 0 2px rgba(178, 145, 85, 0.15);
}

/* Hero with vignette and parchment tint */
.hero {
  position: relative;
  color: var(--navy);
}
.hero-media {
  position: absolute;
  inset: 0;
  background: url("background.jpg") center/cover no-repeat, var(--parchment);
}
.hero::after {
  content: "";
  position: absolute;
  inset: 0;
  background: radial-gradient(
    ellipse at center,
    rgba(245, 241, 232, 0) 40%,
    rgba(13, 27, 42, 0.3) 100%
  );
  pointer-events: none;
}
.hero-inner {
  position: relative;
  padding: 6rem 1rem;
  text-align: center;
}
.hero-title {
  font-size: 2.25rem;
  margin: 0 0 0.75rem;
}
.hero-lead {
  max-width: 42rem;
  margin: 0 auto 1.25rem;
}

/* Buttons */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.6rem 1rem;
  border-radius: 6px;
  border: 1px solid var(--navy);
  text-decoration: none;
  color: #fff;
  background: var(--navy);
}
.btn-outline {
  color: var(--navy);
  background: transparent;
  border-color: var(--navy);
}
.btn-primary {
  background: var(--gold);
  border-color: var(--gold);
  color: #1a1a1a;
}
.btn:hover,
.btn:focus {
  filter: brightness(0.95);
}

/* About */
.about-grid {
  display: grid;
  grid-template-columns: 1.5fr 1fr;
  gap: 2rem;
  align-items: start;
}
.pull-quote {
  position: relative;
  padding: 1rem 1.25rem 1rem 2.25rem;
  background: #fff;
  border-left: 4px solid var(--gold);
  box-shadow: var(--shadow);
  margin: 1rem 0;
}
.pull-quote .quote-mark {
  position: absolute;
  left: 0.5rem;
  top: 0.35rem;
  font-size: 2rem;
  font-family: "Playfair Display", Georgia, serif;
  color: var(--gold);
  line-height: 1;
}
.pull-quote .quote-source {
  display: block;
  margin-top: 0.35rem;
  color: #555;
  font-variant-caps: small-caps;
}
.contact-facts {
  list-style: none;
  padding: 0;
  margin: 1rem 0 0;
  display: grid;
  gap: 0.35rem;
}
.contact-facts i {
  color: var(--gold);
  width: 1.25em;
  text-align: center;
}

/* Formal cards */
.card {
  background: #fff;
  border: 1px solid var(--gray);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: 1rem;
}
.card.formal h3 {
  margin-top: 0;
}
.card.formal figcaption {
  font-weight: 700;
  margin-bottom: 0.5rem;
  font-variant-caps: small-caps;
  color: var(--navy);
}
.dropcap::first-letter {
  font-family: "Playfair Display", Georgia, serif;
  font-size: 1.75em;
  color: var(--gold);
  padding-right: 0.15rem;
}

.card-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1rem;
}
.card .meta {
  list-style: none;
  padding: 0;
  margin: 0.75rem 0 0;
  display: grid;
  gap: 0.25rem;
  color: #334;
}
.card .meta .material-symbols-outlined {
  font-size: 1.1em;
  vertical-align: -2px;
  color: var(--gold);
}

/* Timeline */
.timeline {
  list-style: none;
  margin: 0;
  padding: 0;
  position: relative;
}
.timeline::before {
  content: "";
  position: absolute;
  left: 50%;
  top: 0;
  bottom: 0;
  width: 2px;
  background: var(--gray);
}
.timeline li {
  position: relative;
  display: grid;
  grid-template-columns: 1fr 1fr;
  margin: 1.25rem 0;
}
.timeline li:nth-child(odd) .timeline-card {
  grid-column: 1 / span 1;
  justify-self: end;
}
.timeline li:nth-child(even) .timeline-card {
  grid-column: 2 / span 1;
  justify-self: start;
}
.timeline-card {
  width: clamp(260px, 38vw, 460px);
  background: #fff;
  border: 1px solid var(--gray);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: 0.75rem 1rem;
  position: relative;
}
.timeline-card time {
  color: var(--gold);
  font-weight: 700;
}

/* Subscribe */
.subscribe-form {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 0.5rem;
  align-items: center;
  max-width: 560px;
  margin: 0 auto;
}
.subscribe-form input[type="email"] {
  padding: 0.65rem 0.75rem;
  border-radius: 6px;
  border: 1px solid var(--gray);
}
.subscribe-form .form-note {
  grid-column: 1 / -1;
  font-size: 0.9rem;
  color: #555;
}

/* Contact */
.contact-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1rem;
}
.contact-card ul {
  padding-left: 1rem;
}

/* Gallery */
.gallery-grid {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: 0.5rem;
}
.gallery-grid img {
  width: 100%;
  height: 140px;
  object-fit: cover;
  border: 1px solid var(--gray);
  border-radius: 4px;
}

/* Clipped small images (exclude hero background which uses CSS background) */
.clipped {
  clip-path: inset(0% 0% 5% 5%);
}

/* New illustrative image helpers */
.about-illustration {
  width: 100%;
  height: auto;
  margin-bottom: 0.5rem;
  border: 1px solid var(--gray);
  border-radius: 4px;
}
.card-illustration {
  width: 100%;
  height: 160px;
  object-fit: cover;
  margin-bottom: 0.5rem;
  border: 1px solid var(--gray);
  border-radius: 4px;
}
.timeline-illustration {
  width: 100%;
  height: 120px;
  object-fit: cover;
  margin-bottom: 0.5rem;
  border: 1px solid var(--gray);
  border-radius: 4px;
}
.contact-illustration {
  width: 100%;
  height: 160px;
  object-fit: cover;
  margin: 0.5rem 0;
  border: 1px solid var(--gray);
  border-radius: 4px;
}

/* Footer */
.site-footer {
  border-top: 1px solid var(--gray);
  background: #fff;
}
.footer-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 1rem;
  gap: 1rem;
}
.footer-nav a {
  color: var(--navy);
  text-decoration: none;
  margin-right: 0.75rem;
}
.footer-nav a:hover,
.footer-nav a:focus {
  text-decoration: underline;
}

/* Utilities */
.visually-hidden {
  position: absolute !important;
  clip: rect(1px, 1px, 1px, 1px);
  padding: 0 !important;
  border: 0 !important;
  height: 1px !important;
  width: 1px !important;
  overflow: hidden;
}

/* Responsive */
@media (max-width: 980px) {
  .about-grid {
    grid-template-columns: 1fr;
  }
  .card-grid {
    grid-template-columns: 1fr 1fr;
  }
  .contact-grid {
    grid-template-columns: 1fr;
  }
  .gallery-grid {
    grid-template-columns: repeat(3, 1fr);
  }
}
@media (max-width: 640px) {
  .hero-inner {
    padding: 4rem 1rem;
  }
  .card-grid {
    grid-template-columns: 1fr;
  }
  .gallery-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

/* Map embed */
.map-embed {
  position: relative;
  width: 100%;
  padding-bottom: 56.25%;
  background: #f7f7f7;
  border: 1px solid var(--gray);
  border-radius: 6px;
  overflow: hidden;
  margin: 0.5rem 0;
}
.map-embed iframe {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  border: 0;
}
.map-note {
  font-size: 0.9rem;
  color: #555;
  margin: 0;
}
