:root {
  --bg: #dfe3e8;
  --surface: #ffffff;
  --surface-muted: #ececec;
  --text: #474747;
  --text-strong: #1f1f1f;
  --muted: #8a8a8a;
  --brand: #df3331;
  --brand-dark: #7d0c0b;
  --accent: #7ea6ff;
  --border: #d8d8d8;
  --footer-bg: #dbdbdb;
  --container: 1140px;
  --shadow: 0 0 0 1px rgba(126, 166, 255, 0.25);
  --font-sans: "Segoe UI", "Helvetica Neue", Arial, sans-serif;
  --font-display: Georgia, "Times New Roman", serif;
}

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

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  font-family: var(--font-sans);
  background: var(--bg) url("../img/background-pattern.png") center top / 1200px auto no-repeat;
  color: var(--text);
  line-height: 1.7;
}

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

a {
  color: inherit;
  text-decoration: none;
}

iframe {
  max-width: 100%;
  border: 0;
}

.page-shell {
  width: min(calc(100% - 24px), 1248px);
  margin: 20px auto 28px;
  background: var(--surface);
  border: 1px solid rgba(126, 166, 255, 0.4);
}

.site-topline,
.site-header,
.site-main,
.site-footer-inner,
.site-footer-bottom {
  width: min(calc(100% - 44px), var(--container));
  margin: 0 auto;
}

.site-topline {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  padding: 14px 0 10px;
  font-size: 0.92rem;
  color: var(--muted);
}

.site-topline-copy,
.site-topline-meta {
  display: flex;
  align-items: center;
  gap: 14px;
  flex-wrap: wrap;
}

.site-topline-social {
  color: #2f6fdd;
  font-weight: 700;
}

.site-header {
  border-top: 1px solid transparent;
  border-bottom: 1px solid #ececec;
}

.brand-lockup {
  display: grid;
  place-items: center;
  padding: 14px 0 6px;
}

.brand-lockup img {
  width: min(350px, 78vw);
}

.nav-bar {
  position: relative;
  display: flex;
  justify-content: center;
}

.nav-toggle {
  display: none;
  align-items: center;
  justify-content: center;
  width: 52px;
  height: 52px;
  margin: 0 0 12px auto;
  border: 1px solid var(--border);
  background: var(--surface);
  color: var(--text-strong);
}

.nav-toggle-lines,
.nav-toggle-lines::before,
.nav-toggle-lines::after {
  display: block;
  width: 22px;
  height: 2px;
  background: currentColor;
  content: "";
  transition: transform 0.2s ease, opacity 0.2s ease;
}

.nav-toggle-lines::before {
  transform: translateY(-7px);
}

.nav-toggle-lines::after {
  transform: translateY(5px);
}

.nav-toggle[aria-expanded="true"] .nav-toggle-lines {
  background: transparent;
}

.nav-toggle[aria-expanded="true"] .nav-toggle-lines::before {
  transform: translateY(0) rotate(45deg);
}

.nav-toggle[aria-expanded="true"] .nav-toggle-lines::after {
  transform: translateY(-2px) rotate(-45deg);
}

.site-nav {
  display: flex;
  justify-content: center;
  list-style: none;
  margin: 0;
  padding: 0;
}

.site-nav li {
  border-left: 1px solid #ededed;
}

.site-nav li:last-child {
  border-right: 1px solid #ededed;
}

.site-nav a {
  display: flex;
  align-items: center;
  justify-content: center;
  min-width: 136px;
  padding: 24px 18px;
  border-top: 3px solid transparent;
  color: #3f3f3f;
  font-size: 1.02rem;
  transition: color 0.2s ease, border-color 0.2s ease;
}

.site-nav a[aria-current="page"],
.site-nav a:hover,
.site-nav a:focus-visible {
  color: var(--brand-dark);
  border-top-color: var(--brand-dark);
}

.site-main {
  padding-bottom: 0;
}

.hero {
  position: relative;
  min-height: 465px;
  margin-bottom: 0;
  overflow: hidden;
}

.hero img {
  width: 100%;
  height: 465px;
  object-fit: cover;
}

.hero-copy {
  position: absolute;
  inset: auto auto 64px 18px;
  max-width: 620px;
  color: #fff;
  text-shadow: 0 3px 8px rgba(0, 0, 0, 0.22);
}

.hero-copy p {
  margin: 0;
  font-family: var(--font-display);
  font-size: clamp(2.8rem, 6vw, 5.1rem);
  line-height: 0.96;
  letter-spacing: -0.04em;
}

.intro-slab {
  display: grid;
  grid-template-columns: 1.1fr 1fr;
  border-top: 1px solid rgba(126, 166, 255, 0.35);
  border-bottom: 1px solid rgba(126, 166, 255, 0.35);
}

.intro-story {
  padding: 52px 38px 44px;
  border-right: 1px solid rgba(126, 166, 255, 0.35);
}

.intro-story h1,
.page-title {
  margin: 0 0 22px;
  color: var(--brand);
  font-size: clamp(2rem, 3vw, 3.3rem);
  line-height: 1.08;
  letter-spacing: -0.03em;
}

.highlight-chip {
  display: inline-block;
  padding: 2px 6px;
  background: var(--brand);
  color: #fff;
  line-height: 1;
}

.intro-cards {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 22px;
  padding: 52px 30px 44px;
}

.story-card h2,
.story-card h3,
.section-heading {
  margin: 14px 0 10px;
  color: var(--text-strong);
  font-size: 1.8rem;
  line-height: 1.15;
}

.story-card h3 {
  font-size: 1.7rem;
}

.story-card p,
.intro-story p,
.lede,
.ref-card p,
.footer-column p,
.footer-links a,
.contact-detail,
.page-copy p {
  font-size: 1.08rem;
  color: #787878;
}

.story-link,
.button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  margin-top: 12px;
  padding: 14px 24px;
  background: var(--brand);
  color: #fff;
  font-weight: 600;
  transition: background 0.2s ease;
}

.story-link:hover,
.story-link:focus-visible,
.button:hover,
.button:focus-visible {
  background: #c72724;
}

.mission-band {
  padding: 64px 18px 54px;
  text-align: center;
}

.mission-band::before {
  display: block;
  width: 54px;
  height: 5px;
  margin: 0 auto 34px;
  background: var(--brand);
  content: "";
}

.mission-band h2 {
  margin: 0 auto 18px;
  max-width: 940px;
  color: var(--brand);
  font-size: clamp(1.9rem, 3vw, 3rem);
  line-height: 1.2;
}

.mission-band p {
  margin: 0 auto;
  max-width: 760px;
  color: #9a9a9a;
}

.photo-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 18px;
  padding: 0 42px 48px;
}

.photo-grid img,
.ref-card img,
.about-visual img {
  width: 100%;
  object-fit: cover;
}

.page-section {
  padding: 64px 44px;
}

.about-grid {
  display: grid;
  grid-template-columns: minmax(0, 0.95fr) minmax(320px, 1fr) minmax(220px, 0.72fr);
  gap: 34px;
  align-items: start;
}

.about-copy {
  padding-top: 8px;
}

.about-copy .page-title {
  margin-bottom: 18px;
}

.about-copy p strong {
  color: var(--text-strong);
}

.about-visual img {
  min-height: 456px;
}

.aside-note {
  padding-top: 18px;
}

.aside-note p {
  margin: 0 0 18px;
}

.contact-layout {
  display: grid;
  grid-template-columns: minmax(0, 1.6fr) minmax(260px, 0.9fr);
  gap: 52px;
}

.map-frame {
  width: 100%;
  height: 310px;
}

.map-shell {
  margin: 0 -44px 58px;
}

.map-shell iframe {
  display: block;
}

.contact-form {
  display: grid;
  gap: 14px;
}

.contact-form-row {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 16px;
}

.field,
.textarea {
  width: 100%;
  padding: 16px 14px;
  border: 1px solid rgba(126, 166, 255, 0.55);
  background: #f8fbff;
  color: var(--text-strong);
  font: inherit;
}

.textarea {
  min-height: 180px;
  resize: vertical;
}

.field:focus,
.textarea:focus {
  outline: 2px solid rgba(223, 51, 49, 0.18);
  border-color: var(--brand);
}

.contact-side h2,
.contact-side h3 {
  color: var(--brand);
  margin: 0 0 16px;
  font-size: clamp(2rem, 3vw, 3rem);
}

.contact-block {
  margin-bottom: 28px;
}

.contact-block strong {
  display: block;
  color: var(--text-strong);
  font-size: 1.25rem;
  line-height: 1.35;
  margin-bottom: 10px;
}

.social-square {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 44px;
  height: 44px;
  background: #efefef;
  color: #333;
  font-size: 1.5rem;
  font-weight: 700;
}

.ref-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 36px 28px;
}

.ref-card h2 {
  margin: 18px 0 8px;
  font-size: 1.55rem;
  color: var(--text-strong);
}

.ref-card::after {
  display: block;
  width: 20px;
  height: 3px;
  margin-top: 14px;
  background: var(--accent);
  content: "";
}

.site-footer {
  margin-top: 0;
  background: var(--footer-bg);
  border-top: 1px solid rgba(126, 166, 255, 0.35);
}

.site-footer-inner {
  display: grid;
  grid-template-columns: 1.1fr 1fr 1.2fr 1.1fr;
  gap: 36px;
  padding: 58px 0 70px;
}

.footer-brand img {
  width: min(240px, 100%);
}

.footer-column h2,
.footer-column h3 {
  margin: 0 0 20px;
  color: #777;
  font-size: 2rem;
}

.footer-links {
  display: grid;
  gap: 10px;
}

.footer-links a::before {
  content: "›";
  margin-right: 10px;
  color: var(--accent);
  font-weight: 700;
}

.site-footer-bottom {
  display: grid;
  justify-items: center;
  gap: 12px;
  padding: 0 0 26px;
  color: #8c8c8c;
  text-align: center;
}

.site-footer-bottom p {
  margin: 0;
}

.site-footer-bottom .credit {
  color: var(--text-strong);
  font-weight: 600;
}

.social-bottom {
  color: #444;
  font-weight: 700;
}

.visually-hidden {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

.page-copy p {
  margin-top: 0;
}

.not-found {
  display: grid;
  place-items: center;
  min-height: 65vh;
  text-align: center;
  padding: 42px 18px;
}

.not-found h1 {
  margin: 0 0 12px;
  font-size: clamp(2.8rem, 7vw, 5rem);
  color: var(--brand);
}

@media (max-width: 1024px) {
  .hero img {
    height: 390px;
  }

  .intro-slab,
  .about-grid,
  .contact-layout,
  .site-footer-inner,
  .ref-grid {
    grid-template-columns: 1fr;
  }

  .intro-story {
    border-right: 0;
    border-bottom: 1px solid rgba(126, 166, 255, 0.35);
  }

  .photo-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    padding-inline: 24px;
  }

  .site-footer-inner {
    gap: 24px;
  }

  .map-shell {
    margin-inline: 0;
  }
}

@media (max-width: 768px) {
  .page-shell {
    width: min(calc(100% - 12px), 1248px);
    margin-top: 6px;
  }

  .site-topline,
  .site-header,
  .site-main,
  .site-footer-inner,
  .site-footer-bottom {
    width: min(calc(100% - 26px), var(--container));
  }

  .site-topline {
    flex-direction: column;
    align-items: flex-start;
    padding-bottom: 14px;
    font-size: 0.84rem;
  }

  .brand-lockup {
    padding-top: 6px;
  }

  .nav-bar {
    display: block;
  }

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

  .site-nav {
    display: none;
    flex-direction: column;
    border-top: 1px solid #ededed;
    margin-bottom: 12px;
  }

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

  .site-nav li,
  .site-nav li:last-child {
    border-inline: 0;
    border-bottom: 1px solid #ededed;
  }

  .site-nav a {
    justify-content: flex-start;
    min-width: 0;
    padding: 16px 12px;
    border-top-width: 0;
    border-left: 3px solid transparent;
  }

  .site-nav a[aria-current="page"],
  .site-nav a:hover,
  .site-nav a:focus-visible {
    border-left-color: var(--brand-dark);
    border-top-color: transparent;
  }

  .hero {
    min-height: 280px;
  }

  .hero img {
    height: 280px;
  }

  .hero-copy {
    left: 14px;
    right: 14px;
    bottom: 28px;
  }

  .intro-story,
  .intro-cards,
  .page-section {
    padding-inline: 18px;
  }

  .intro-cards,
  .contact-form-row {
    grid-template-columns: 1fr;
  }

  .mission-band {
    padding: 48px 18px 40px;
  }

  .photo-grid,
  .ref-grid {
    grid-template-columns: 1fr;
    gap: 22px;
    padding-inline: 18px;
  }

  .about-visual img {
    min-height: 0;
  }

  .map-frame {
    height: 240px;
  }

  .footer-column h2,
  .footer-column h3 {
    font-size: 1.6rem;
  }
}

@media (max-width: 414px) {
  body {
    background-size: 880px auto;
  }

  .site-topline-copy,
  .site-topline-meta {
    gap: 8px;
  }

  .hero-copy p {
    font-size: 2.55rem;
  }

  .intro-story h1,
  .page-title,
  .contact-side h2,
  .contact-side h3,
  .mission-band h2 {
    font-size: 1.95rem;
  }

  .story-card h2,
  .story-card h3,
  .section-heading,
  .ref-card h2 {
    font-size: 1.35rem;
  }

  .story-card p,
  .intro-story p,
  .lede,
  .ref-card p,
  .footer-column p,
  .footer-links a,
  .contact-detail,
  .page-copy p {
    font-size: 0.99rem;
  }
}
