
:root {
  --color-bg-page: #f5f5f7;
  --color-bg-header: #111827;
  --color-bg-hero: #ffffff;
  --color-brand-primary: #ffda1a; /* sárga, a logó hangulatához igazítva */
  --color-text-main: #111827;
  --color-text-muted: #4b5563;
  --color-link: #005f99;
  --color-plaque-bg: #3b3027;
  --color-plaque-text: #fefce8;
  --color-plaque-border: rgba(0,0,0,0.3);

  --tile-min-width: 260px;
  --tile-gap: 20px;
  --tile-radius: 14px;

  --shadow-soft: 0 10px 30px rgba(15, 23, 42, 0.18);
}

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

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  min-height: 100vh;
  font-family: "Inter", system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  font-size: 16px;
  line-height: 1.6;
  background-color: var(--color-bg-page);
  color: var(--color-text-main);
}

/* WCAG szintek – betűméret és olvashatóság */
body.wcag-none {
  font-size: 15px;
}

body.wcag-a {
  font-size: 16px;
}

body.wcag-aa {
  font-size: 17px;
}

body.wcag-aaa {
  font-size: 18px;
  letter-spacing: 0.02em;
}

/* Fókuszjelölés */
:focus-visible {
  outline: 2px solid var(--color-brand-primary);
  outline-offset: 3px;
}

body.wcag-aa :focus-visible,
body.wcag-aaa :focus-visible {
  outline-width: 3px;
}

/* Linkek */
a {
  color: var(--color-link);
  text-decoration: none;
}

body.wcag-aa a,
body.wcag-aaa a {
  text-decoration: underline;
  text-decoration-thickness: 0.12em;
}

/* Skip link */
.skip-link {
  position: absolute;
  left: -999px;
  top: 0;
  background: #000;
  color: #fff;
  padding: 0.5rem 0.75rem;
  border-radius: 0 0 0.75rem 0;
  z-index: 50;
}

.skip-link:focus {
  left: 0;
}

/* Header */
.site-header {
  position: sticky;
  top: 0;
  z-index: 40;
  background: radial-gradient(circle at top left, rgba(255,255,255,0.08), transparent 55%), var(--color-bg-header);
  color: #f9fafb;
  box-shadow: 0 6px 20px rgba(15, 23, 42, 0.55);
}

.header-top,
.header-bottom {
  max-width: 1120px;
  margin: 0 auto;
  padding: 0.4rem 1.25rem;
  display: flex;
  align-items: center;
  gap: 1rem;
}

.header-bottom {
  padding-bottom: 0.7rem;
  padding-top: 0.3rem;
  flex-wrap: wrap;
}

/* Brand */
.brand {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  flex: 1 1 auto;
  min-width: 0;
}

.brand-mark {
  width: 40px;
  height: 40px;
  border-radius: 999px;
  background:
    radial-gradient(circle at 25% 15%, #fff7b3 0, #ffda1a 35%, #b45309 70%, #3b2713 100%);
  box-shadow: 0 0 0 2px rgba(15, 23, 42, 0.7), 0 8px 16px rgba(15, 23, 42, 0.8);
  position: relative;
}

.brand-mark::before {
  content: "";
  position: absolute;
  inset: 8px 4px 10px 6px;
  border-radius: 999px;
  border: 2px solid rgba(0, 0, 0, 0.65);
  border-top-color: transparent;
  border-right-color: transparent;
  transform: rotate(-18deg);
}

.brand-mark::after {
  content: "";
  position: absolute;
  left: 14px;
  top: 13px;
  width: 7px;
  height: 7px;
  border-radius: 999px;
  background: #000;
}

.brand-text {
  display: flex;
  flex-direction: column;
  gap: 0.1rem;
  min-width: 0;
}

.brand-line1 {
  font-size: 0.9rem;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  font-weight: 600;
  color: #f9fafb;
  white-space: nowrap;
}

.brand-line2 {
  font-size: 0.8rem;
  color: #e5e7eb;
  white-space: nowrap;
  text-overflow: ellipsis;
  overflow: hidden;
}

/* Controls */
.controls {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  flex-wrap: wrap;
  justify-content: flex-end;
}

.control-group {
  display: flex;
  flex-direction: column;
  gap: 0.15rem;
}

.control-group label,
.control-label {
  font-size: 0.75rem;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  color: #e5e7eb;
}

.control-group select {
  border-radius: 999px;
  border: 1px solid rgba(148, 163, 184, 0.75);
  padding: 0.2rem 1.6rem 0.2rem 0.7rem;
  font-size: 0.8rem;
  background:
    radial-gradient(circle at 0 0, rgba(255,255,255,0.06), rgba(15,23,42,0.4)),
    rgba(15, 23, 42, 0.96);
  color: #e5e7eb;
  min-width: 150px;
  appearance: none;
  background-image:
    linear-gradient(45deg, transparent 50%, #f9fafb 50%),
    linear-gradient(135deg, #f9fafb 50%, transparent 50%);
  background-position:
    calc(100% - 14px) 52%,
    calc(100% - 9px) 52%;
  background-size: 7px 7px, 7px 7px;
  background-repeat: no-repeat;
}

/* Header bottom controls */
.control-inline .control-with-value {
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.control-inline input[type="range"] {
  width: 150px;
}

.control-with-value span {
  font-size: 0.8rem;
  color: #e5e7eb;
}

.color-group {
  flex: 1 1 260px;
}

.color-pickers {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
}

.color-pickers label {
  font-size: 0.7rem;
  text-transform: none;
  letter-spacing: 0;
  color: #e5e7eb;
  display: flex;
  align-items: center;
  gap: 0.25rem;
}

.color-pickers input[type="color"] {
  width: 30px;
  height: 26px;
  border-radius: 6px;
  border: 1px solid rgba(148,163,184,0.8);
  padding: 0;
  background: transparent;
}

.yaml-group {
  flex: 0 0 auto;
}

.yaml-buttons {
  display: flex;
  align-items: center;
  gap: 0.4rem;
}

.yaml-buttons button,
.yaml-import-label {
  font-size: 0.8rem;
  border-radius: 999px;
  border: 1px solid rgba(148, 163, 184, 0.85);
  padding: 0.25rem 0.8rem;
  background: rgba(15,23,42,0.9);
  color: #e5e7eb;
  cursor: pointer;
}

.yaml-import-label {
  display: inline-flex;
  align-items: center;
  gap: 0.3rem;
}

.yaml-import-label input[type="file"] {
  display: none;
}

/* WCAG figyelmeztetés */
.wcag-warning {
  max-width: 1120px;
  margin: 0.5rem auto 0;
  padding: 0.5rem 0.75rem;
  border-radius: 8px;
  background: #fef9c3;
  color: #854d0e;
  border: 1px solid #facc15;
  font-size: 0.85rem;
}

.wcag-warning[hidden] {
  display: none;
}

/* Main layout */
.page-main {
  max-width: 1120px;
  margin: 1.6rem auto 2.4rem;
  padding: 0 1.2rem;
}

/* Hero */
.hero {
  display: grid;
  grid-template-columns: minmax(0, 1.5fr) minmax(260px, 1fr);
  gap: 2.2rem;
  align-items: center;
  margin-bottom: 2.3rem;
}

.hero-text .eyebrow {
  text-transform: uppercase;
  letter-spacing: 0.16em;
  font-weight: 600;
  font-size: 0.78rem;
  color: var(--color-text-muted);
  margin: 0 0 0.35rem;
}

.hero h1 {
  font-family: "Merriweather", Georgia, "Times New Roman", serif;
  font-weight: 700;
  font-size: clamp(1.9rem, 2.6vw + 0.8rem, 2.4rem);
  line-height: 1.3;
  margin: 0 0 0.7rem;
  color: #111827;
}

.hero-lead {
  margin: 0 0 0.5rem;
  font-size: 0.98rem;
  color: var(--color-text-muted);
}

.hero-note {
  margin: 0;
  font-size: 0.85rem;
  color: #6b7280;
}

.hero-visual {
  display: flex;
  align-items: center;
  justify-content: center;
}

.hero-img {
  width: 260px;
  max-width: 100%;
  border-radius: 18px;
  box-shadow: var(--shadow-soft);
  display: block;
}

/* Intro */
.memorial-intro {
  max-width: 720px;
  margin-bottom: 1.8rem;
}

.memorial-intro h2 {
  font-family: "Merriweather", Georgia, "Times New Roman", serif;
  font-size: 1.4rem;
  margin: 0 0 0.4rem;
  color: #111827;
}

.memorial-intro p {
  margin: 0;
  font-size: 0.96rem;
  color: var(--color-text-muted);
}

/* Memorial grid – alap elrendezés */
.memorial-section {
  margin-bottom: 2.2rem;
}

.memorial-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(var(--tile-min-width), 1fr));
  gap: var(--tile-gap);
}

/* Emléktáblák */
.memorial-card {
  background: var(--color-plaque-bg);
  color: var(--color-plaque-text);
  border-radius: var(--tile-radius);
  padding: 1.1rem 1.1rem 1.05rem;
  border: 1px solid var(--color-plaque-border);
  box-shadow: var(--shadow-soft);
  position: relative;
  overflow: hidden;
}

.memorial-card::before {
  content: "";
  position: absolute;
  inset: -20%;
  background:
    radial-gradient(circle at 15% 0, rgba(255,255,255,0.22), transparent 56%),
    radial-gradient(circle at 110% 110%, rgba(0,0,0,0.35), transparent 60%);
  mix-blend-mode: soft-light;
  opacity: 0.9;
  pointer-events: none;
}

.memorial-header {
  position: relative;
  margin-bottom: 0.4rem;
}

.memorial-name {
  margin: 0 0 0.1rem;
  font-family: "Merriweather", Georgia, "Times New Roman", serif;
  font-size: 1.05rem;
  letter-spacing: 0.02em;
}

.memorial-meta {
  margin: 0;
  font-size: 0.8rem;
  text-transform: uppercase;
  letter-spacing: 0.16em;
  opacity: 0.9;
}

.memorial-body {
  margin: 0;
  font-size: 0.9rem;
}

/* Hover/focus kiemelés */
.memorial-card:hover,
.memorial-card:focus-within {
  box-shadow: 0 18px 32px rgba(15, 23, 42, 0.65);
  border-color: rgba(250, 204, 138, 0.9);
  transform: translateY(-2px);
}

/* Info szekció */
.info-section {
  border-radius: 16px;
  background: linear-gradient(135deg, #eff6ff, #dbeafe);
  border: 1px solid #bfdbfe;
  padding: 1.2rem 1.35rem;
  box-shadow: 0 16px 32px rgba(148, 163, 184, 0.35);
}

.info-section h2 {
  margin: 0 0 0.45rem;
  font-size: 1.1rem;
  color: #111827;
}

.info-section p {
  margin: 0 0 0.35rem;
  font-size: 0.9rem;
  color: #1f2937;
}

.info-note {
  font-size: 0.85rem;
  color: #4b5563;
}

/* Lábléc */
.site-footer {
  border-top: 1px solid rgba(15, 23, 42, 0.3);
  background: #020617;
  color: #9ca3af;
  font-size: 0.8rem;
  padding: 0.85rem 1.2rem 1rem;
}

.site-footer p {
  max-width: 1120px;
  margin: 0 auto;
}

/* Layout variációk */
/* Grid (alap) már definiálva */

/* Masonry */
body.layout-masonry .memorial-grid {
  display: block;
  column-count: 3;
  column-gap: var(--tile-gap);
}

body.layout-masonry .memorial-card {
  display: inline-block;
  width: 100%;
  margin: 0 0 var(--tile-gap);
}

/* Sávos (rows) */
body.layout-rows .memorial-grid {
  display: flex;
  flex-direction: column;
  gap: var(--tile-gap);
}

body.layout-rows .memorial-card {
  display: grid;
  grid-template-columns: minmax(0, 1.1fr) minmax(0, 2fr);
  gap: 0.4rem 1.2rem;
}

body.layout-rows .memorial-body {
  grid-column: 1 / -1;
}

/* Témák – alap koncepció, finomhangolható YAML-ből is */
body.theme-bronze {
  --color-plaque-bg: #3b3027;
  --color-plaque-border: #8b5a38;
  --color-plaque-text: #fefce8;
}

body.theme-corten {
  --color-plaque-bg: #4b2719;
  --color-plaque-border: #9a4e27;
  --color-plaque-text: #fff7ed;
}

body.theme-stone {
  --color-plaque-bg: #111827;
  --color-plaque-border: #4b5563;
  --color-plaque-text: #e5e7eb;
}

body.theme-light {
  --color-bg-page: #f9fafb;
  --color-plaque-bg: #ffffff;
  --color-plaque-border: #e5e7eb;
  --color-plaque-text: #111827;
}

/* Reszponzív töréspontok */
@media (max-width: 960px) {
  .header-top,
  .header-bottom {
    padding-inline: 1rem;
  }
}

@media (max-width: 860px) {
  .header-top {
    flex-wrap: wrap;
    row-gap: 0.7rem;
  }

  .brand-line2 {
    white-space: normal;
  }

  .controls {
    justify-content: flex-start;
  }

  body.layout-masonry .memorial-grid {
    column-count: 2;
  }
}

@media (max-width: 720px) {
  .hero {
    grid-template-columns: minmax(0, 1fr);
    gap: 1.6rem;
  }

  .hero-visual {
    justify-content: flex-start;
  }

  .hero-img {
    width: 220px;
  }

  .header-bottom {
    flex-direction: column;
    align-items: flex-start;
  }

  .color-group {
    width: 100%;
  }

  .color-pickers {
    justify-content: flex-start;
  }

  body.layout-masonry .memorial-grid {
    column-count: 1;
  }
}

@media (max-width: 520px) {
  .page-main {
    padding-inline: 0.9rem;
  }

  .controls {
    flex-direction: column;
    align-items: stretch;
  }

  .control-group select {
    width: 100%;
    min-width: 0;
  }

  .color-pickers {
    flex-direction: column;
    align-items: flex-start;
  }

  .hero-img {
    width: 200px;
  }
}
