/* Záborszky Család — stylesheet
   Palette: parchment cream, heraldic blue, muted burgundy, aged brass, deep green
*/

:root {
  --parchment: #F2ECDD;
  --parchment-deep: #E9E0C9;
  --ink: #241F19;
  --ink-soft: #4A4238;
  --blue: #1E3A5C;
  --blue-deep: #142943;
  --burgundy: #7A2A22;
  --burgundy-soft: #9A4335;
  --gold: #A9822F;
  --gold-soft: #C9A75B;
  --green: #3C5A3E;
  --hairline: rgba(36, 31, 25, 0.16);
  --hairline-on-blue: rgba(242, 236, 221, 0.22);
  --serif: "EB Garamond", "Iowan Old Style", Georgia, serif;
  --sans: "Inter", "Segoe UI", system-ui, sans-serif;
  --max: 1120px;
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  margin: 0;
  background: var(--parchment);
  color: var(--ink);
  font-family: var(--serif);
  font-size: 18px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

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

a { color: inherit; }

.wrap {
  max-width: var(--max);
  margin: 0 auto;
  padding: 0 32px;
}

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

.site-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 26px 32px;
  max-width: var(--max);
  margin: 0 auto;
}

.brand {
  display: flex;
  align-items: center;
  gap: 12px;
  text-decoration: none;
  color: var(--ink);
}

.brand img {
  width: 34px;
  height: 34px;
  border-radius: 50%;
  border: 1px solid var(--hairline);
  object-fit: cover;
}

.wordmark {
  font-family: var(--serif);
  font-size: 22px;
  letter-spacing: 0.02em;
  font-weight: 600;
}

.site-nav {
  display: flex;
  align-items: center;
  gap: 28px;
  font-family: var(--sans);
  font-size: 15px;
}

.site-nav a {
  text-decoration: none;
  color: var(--ink-soft);
  border-bottom: 1px solid transparent;
  padding-bottom: 2px;
  transition: color 0.15s ease, border-color 0.15s ease;
}

.site-nav a:hover,
.site-nav a:focus-visible {
  color: var(--burgundy);
  border-color: var(--burgundy);
}

.lang-switch {
  display: flex;
  gap: 6px;
  font-family: var(--sans);
  font-size: 14px;
}

.lang-switch a {
  text-decoration: none;
  padding: 4px 9px;
  border-radius: 3px;
  color: var(--ink-soft);
}

.lang-switch a.active {
  background: var(--ink);
  color: var(--parchment);
}

.lang-switch a:not(.active):hover { color: var(--burgundy); }

/* -------- Hero -------- */

.hero {
  background: linear-gradient(180deg, var(--blue) 0%, var(--blue-deep) 100%);
  color: var(--parchment);
  padding: 56px 0 70px;
}

.hero .wrap {
  display: grid;
  grid-template-columns: minmax(220px, 300px) 1fr;
  gap: 56px;
  align-items: center;
}

.hero-crest {
  width: 100%;
  max-width: 300px;
  margin: 0 auto;
}

.hero-crest img {
  width: 100%;
  height: auto;
  border-radius: 3px;
  box-shadow: 0 24px 60px rgba(0,0,0,0.4);
  border: 1px solid var(--hairline-on-blue);
}

.hero-text h1 {
  font-family: var(--serif);
  font-size: 58px;
  line-height: 1.05;
  margin: 0 0 6px;
  font-weight: 600;
  letter-spacing: 0.01em;
}

.hero-since {
  font-family: var(--sans);
  font-size: 15px;
  color: var(--gold-soft);
  margin: 0 0 26px;
}

.hero-text p.lead {
  font-size: 21px;
  max-width: 46ch;
  color: #EDE6D3;
  margin: 0;
}

/* -------- Sections -------- */

section {
  padding: 76px 0;
  border-bottom: 1px solid var(--hairline);
}

section:last-of-type { border-bottom: none; }

h2 {
  font-family: var(--serif);
  font-size: 34px;
  font-weight: 600;
  margin: 0 0 34px;
}

.prose {
  max-width: 68ch;
}

.prose p {
  margin: 0 0 20px;
}

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

.source-note {
  margin-top: 30px;
  font-family: var(--sans);
  font-size: 14px;
  font-style: italic;
  color: var(--ink-soft);
}

/* -------- Timeline -------- */

.timeline {
  list-style: none;
  margin: 0;
  padding: 0;
  border-left: 2px solid var(--gold-soft);
  max-width: 72ch;
}

.timeline li {
  position: relative;
  padding: 0 0 30px 30px;
}

.timeline li:last-child { padding-bottom: 0; }

.timeline li::before {
  content: "";
  position: absolute;
  left: -7px;
  top: 4px;
  width: 12px;
  height: 12px;
  border-radius: 50%;
  background: var(--parchment);
  border: 2px solid var(--burgundy);
}

.timeline .year {
  font-family: var(--sans);
  font-weight: 600;
  color: var(--burgundy);
  font-size: 15px;
  display: block;
  margin-bottom: 3px;
}

.timeline .desc {
  font-size: 17px;
  color: var(--ink);
}

/* -------- Crest showcase -------- */

.crest-showcase {
  background: var(--parchment-deep);
}

.crest-showcase .wrap {
  display: grid;
  grid-template-columns: minmax(240px, 340px) 1fr;
  gap: 56px;
  align-items: start;
}

.crest-showcase .crest-image {
  width: 100%;
  max-width: 340px;
}

.crest-showcase img {
  width: 100%;
  height: auto;
  border-radius: 3px;
  box-shadow: 0 18px 40px rgba(36,31,25,0.18);
}

.blazon h2 { margin-bottom: 22px; }

.blazon dl {
  margin: 0;
}

.blazon dt {
  font-family: var(--sans);
  font-size: 13px;
  letter-spacing: 0.02em;
  color: var(--gold);
  margin-top: 20px;
}

.blazon dt:first-child { margin-top: 0; }

.blazon dd {
  margin: 6px 0 0;
  font-size: 17px;
  line-height: 1.55;
  max-width: 46ch;
}

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

.faq-item {
  max-width: 72ch;
  padding: 22px 0;
  border-top: 1px solid var(--hairline);
}

.faq-item:first-child { border-top: none; padding-top: 0; }

.faq-item h3 {
  font-family: var(--serif);
  font-size: 21px;
  margin: 0 0 8px;
  font-weight: 600;
}

.faq-item p {
  margin: 0;
  color: var(--ink-soft);
}

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

footer {
  background: var(--blue-deep);
  color: #C9C2AC;
  padding: 54px 0 40px;
  font-family: var(--sans);
}

.footer-heading {
  font-family: var(--serif);
  color: var(--parchment);
  font-size: 19px;
  margin: 0 0 18px;
}

.footer-links {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 10px 24px;
  list-style: none;
  margin: 0 0 40px;
  padding: 0;
  font-size: 15px;
}

.footer-links a {
  text-decoration: none;
  color: #C9C2AC;
  border-bottom: 1px solid transparent;
}

.footer-links a:hover,
.footer-links a:focus-visible {
  color: var(--gold-soft);
  border-color: var(--gold-soft);
}

.footer-bottom {
  border-top: 1px solid var(--hairline-on-blue);
  padding-top: 24px;
  font-size: 13px;
  color: #8D8770;
  display: flex;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 10px;
}

.footer-bottom a { color: #8D8770; }

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

@media (max-width: 860px) {
  .hero .wrap { grid-template-columns: 1fr; gap: 32px; text-align: left; }
  .hero-crest { max-width: 220px; margin: 0; }
  .hero-text h1 { font-size: 42px; }
  .crest-showcase .wrap { grid-template-columns: 1fr; }
  .crest-showcase .crest-image { max-width: 280px; margin: 0 0 8px; }
  .footer-links { grid-template-columns: repeat(2, 1fr); }
  section { padding: 54px 0; }
  .site-header { flex-wrap: wrap; gap: 14px; }
}

@media (max-width: 480px) {
  body { font-size: 16.5px; }
  .hero-text h1 { font-size: 34px; }
  h2 { font-size: 27px; }
  .footer-links { grid-template-columns: 1fr 1fr; }
  .wrap { padding: 0 20px; }
  .site-header { padding: 18px 20px; gap: 12px; }
  .site-nav { gap: 16px; font-size: 14px; order: 3; width: 100%; }
  .brand { order: 1; }
  .lang-switch { order: 2; }
  .wordmark { font-size: 19px; }
  .brand img { width: 28px; height: 28px; }
  .hero { padding: 40px 0 50px; }
  .timeline .desc { font-size: 16px; }
  section { padding: 44px 0; }
}

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

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