/* facultas.hu nyitólap: a régi oldal (bordó sáv, kör alakú embléma, négy képes kártya, idézet) modernizálva.
   WCAG 2.1 AA: a szövegek kontrasztja legalább 4,5:1, látható fókusz, telefonon egy oszlop. */
@font-face { font-family: "Source Sans 3"; font-style: normal; font-weight: 400; font-display: swap; src: url(fonts/source-sans-3-latin-400-normal.0f73f35e.woff2) format("woff2"); unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD; }
@font-face { font-family: "Source Sans 3"; font-style: normal; font-weight: 400; font-display: swap; src: url(fonts/source-sans-3-latin-ext-400-normal.f5706bb0.woff2) format("woff2"); unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C4, U+2113, U+2C60-2C7F, U+A720-A7FF; }
@font-face { font-family: "Source Sans 3"; font-style: italic; font-weight: 400; font-display: swap; src: url(fonts/source-sans-3-latin-400-italic.3c230c03.woff2) format("woff2"); unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+2000-206F; }
@font-face { font-family: "Source Sans 3"; font-style: italic; font-weight: 400; font-display: swap; src: url(fonts/source-sans-3-latin-ext-400-italic.97f4d6bf.woff2) format("woff2"); unicode-range: U+0100-02BA, U+02BD-02C5, U+1E00-1E9F; }
@font-face { font-family: "Source Sans 3"; font-style: normal; font-weight: 600; font-display: swap; src: url(fonts/source-sans-3-latin-600-normal.14527d19.woff2) format("woff2"); unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD; }
@font-face { font-family: "Source Sans 3"; font-style: normal; font-weight: 600; font-display: swap; src: url(fonts/source-sans-3-latin-ext-600-normal.5727d1da.woff2) format("woff2"); unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C4, U+2113, U+2C60-2C7F, U+A720-A7FF; }
@font-face { font-family: "Source Sans 3"; font-style: normal; font-weight: 700; font-display: swap; src: url(fonts/source-sans-3-latin-700-normal.ae35266f.woff2) format("woff2"); unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+2000-206F; }
@font-face { font-family: "Source Sans 3"; font-style: normal; font-weight: 700; font-display: swap; src: url(fonts/source-sans-3-latin-ext-700-normal.6a9fd742.woff2) format("woff2"); unicode-range: U+0100-02BA, U+02BD-02C5, U+1E00-1E9F; }

:root {
  --bordo: #78001b;     /* a régi oldal színe; fehér szöveggel 12:1 */
  --bordo-d: #5a0014;
  --text: #1f2328;
  --muted: #545b64;
  --line: #e2e4e8;
  --focus: #ffbf47;
}
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; text-size-adjust: 100%; }
body {
  margin: 0; min-height: 100vh; display: flex; flex-direction: column;
  font-family: "Source Sans 3", "Segoe UI", system-ui, Arial, sans-serif; font-size: 1.0625rem; line-height: 1.6; color: var(--text);
  background: #fff url(img/hatter-1600.11315ca8.webp) center top / cover fixed;
}
img { max-width: 100%; height: auto; }
a { color: var(--bordo); text-underline-offset: 0.18em; }
:focus-visible { outline: 3px solid var(--text); outline-offset: 2px; box-shadow: 0 0 0 6px var(--focus); border-radius: 2px; }
main:focus { outline: none; }
.wrap { width: 100%; max-width: 1200px; margin-inline: auto; padding-inline: max(16px, env(safe-area-inset-left)); }
.skip { position: absolute; left: 1rem; top: -100px; z-index: 10; background: var(--text); color: #fff; padding: 0.6rem 1rem; font-weight: 600; border-radius: 0 0 8px 8px; }
.skip:focus { top: 0; color: #fff; }

.topbar { background: var(--bordo); color: #fff; }
.topbar-in { display: flex; align-items: center; justify-content: space-between; gap: 1rem; min-height: 56px; }
.brand { margin: 0; font-size: 1.25rem; font-weight: 600; letter-spacing: 0.02em; }
.toplinks { display: flex; gap: 1.25rem; list-style: none; margin: 0; padding: 0; }
.toplinks a { display: inline-flex; align-items: center; gap: 0.4rem; min-height: 44px; color: #fff; font-weight: 600; text-decoration: none; }
.toplinks a:hover { text-decoration: underline; }
.toplinks svg { fill: currentColor; }

/* Az első képernyő: fejrész + kártyák + idézet együtt kitölti, a lábléc görgetés után jön. */
main { flex: 1; min-height: calc(100vh - 56px); min-height: calc(100svh - 56px); display: flex; flex-direction: column; justify-content: center; padding-block: clamp(0.5rem, 2vh, 1.5rem) clamp(1rem, 3vh, 2.5rem); }

/* Fejrész: tömörebb, hogy a kártyák és az idézet egy képernyőn elférjenek */
.hero { display: flex; flex-direction: column; align-items: center; text-align: center; padding: 0 1rem clamp(0.6rem, 2.4vh, 2rem); }
.logo { width: clamp(80px, 13vh, 160px); height: auto; aspect-ratio: 1; border-radius: 50%; background: #fff; box-shadow: 0 6px 20px rgba(0, 0, 0, 0.15); }
h1 { margin: clamp(0.4rem, 1.2vh, 1rem) 0 0; font-size: clamp(1.6rem, 0.9rem + 2.4vh, 2.8rem); line-height: 1.15; color: var(--bordo); }
.lead { margin: 0.15rem 0 0; font-size: clamp(1.05rem, 0.8rem + 0.8vh, 1.3rem); color: var(--muted); }

.cards { list-style: none; margin: 0 auto; display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: clamp(1rem, 1.6vw, 1.5rem); }
.card a { position: relative; display: flex; flex-direction: column; height: 100%; overflow: hidden; background: #fff; border-radius: 14px; box-shadow: 0 6px 18px rgba(20, 20, 30, 0.12); color: var(--text); text-decoration: none; transition: transform 0.35s cubic-bezier(.2, .8, .2, 1), box-shadow 0.35s; }
.card a:hover, .card a:focus-visible { transform: translateY(-6px); box-shadow: 0 18px 36px rgba(60, 0, 15, 0.22); }
.card .img { display: block; overflow: hidden; }
.card img { display: block; width: 100%; aspect-ratio: 3 / 4; max-height: max(180px, calc(100vh - 505px)); max-height: max(180px, calc(100svh - 505px)); object-fit: cover; transition: transform 0.6s cubic-bezier(.2, .8, .2, 1); }
.card a:hover img, .card a:focus-visible img { transform: scale(1.06); }
.card-title { flex: 1; display: flex; align-items: center; justify-content: center; padding: 0.75rem 1rem; text-align: center; font-weight: 600; font-size: 1.05rem; line-height: 1.3; background: var(--bordo); color: #fff; }
.card a:hover .card-title { background: var(--bordo-d); text-decoration: underline; }

/* Idézet: a szerző is a dobozban; a bal oldali csík betöltéskor kirajzolódik */
.quote { position: relative; width: calc(100% - 32px); max-width: 50rem; margin: clamp(0.6rem, 2.4vh, 2.5rem) auto 0; padding: 0.6rem 1.25rem 0.5rem 1.5rem; background: rgba(255, 255, 255, 0.94); border-radius: 10px; box-shadow: 0 4px 16px rgba(20, 20, 30, 0.08); }
.quote::before { content: ""; position: absolute; left: 0; top: 0; bottom: 0; width: 5px; border-radius: 10px 0 0 10px; background: var(--bordo); transform-origin: top; }
.quote blockquote { margin: 0; font-size: 1.15rem; font-style: italic; line-height: 1.4; }
.quote blockquote p { margin: 0; }
.quote blockquote p::before { content: "„"; }
.quote blockquote p::after { content: "”"; }
.quote figcaption { margin-top: 0.1rem; font-size: 0.95rem; text-align: right; font-weight: 600; color: var(--muted); }
.quote figcaption::before { content: "— "; }

/* Betöltési effekt: az elemek egymás után, elmosódásból úsznak be; a kártyák képe finoman „beáll” */
@keyframes rise { from { opacity: 0; transform: translateY(26px); filter: blur(8px); } to { opacity: 1; transform: none; filter: none; } }
@keyframes pop { 0% { opacity: 0; transform: scale(0.7) rotate(-8deg); } 70% { opacity: 1; transform: scale(1.04) rotate(1deg); } 100% { opacity: 1; transform: none; } }
@keyframes settle { from { transform: scale(1.18); } to { transform: scale(1); } }
@keyframes draw { from { transform: scaleY(0); } to { transform: scaleY(1); } }
.logo { animation: pop 0.8s cubic-bezier(.2, .8, .2, 1) both; }
.hero h1 { animation: rise 0.7s 0.15s cubic-bezier(.2, .8, .2, 1) both; }
.hero .lead { animation: rise 0.7s 0.28s cubic-bezier(.2, .8, .2, 1) both; }
.card { animation: rise 0.8s cubic-bezier(.2, .8, .2, 1) both; }
.card:nth-child(1) { animation-delay: 0.4s; }
.card:nth-child(2) { animation-delay: 0.52s; }
.card:nth-child(3) { animation-delay: 0.64s; }
.card:nth-child(4) { animation-delay: 0.76s; }
.card img { animation: settle 1.6s cubic-bezier(.2, .8, .2, 1) both; }
.card:nth-child(1) img { animation-delay: 0.4s; }
.card:nth-child(2) img { animation-delay: 0.52s; }
.card:nth-child(3) img { animation-delay: 0.64s; }
.card:nth-child(4) img { animation-delay: 0.76s; }
.quote { animation: rise 0.9s 1s cubic-bezier(.2, .8, .2, 1) both; }
.quote::before { animation: draw 0.7s 1.45s cubic-bezier(.2, .8, .2, 1) both; }

.footer { background: var(--bordo); color: #fff; border-top: 4px solid #a0263f; text-align: center; padding-block: 1.25rem; }
.footer p { margin: 0.25rem 0; }
.footer a { color: #fff; }
.footer .copy { margin-top: 0.75rem; font-size: 0.95rem; }
.footer .contact { display: flex; flex-wrap: wrap; justify-content: center; gap: 0.4rem 1.75rem; margin-top: 0.5rem; }
.footer .contact a { display: inline-flex; align-items: center; gap: 0.45rem; min-height: 44px; }
.footer .contact svg { fill: currentColor; flex-shrink: 0; }
.sr-only { position: absolute !important; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0; }

@media (min-width: 1500px) { .cards { max-width: 1320px; } } /* nagy képernyőn szélesebb kártyák */
@media (max-width: 900px) { .cards { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 520px) {
  .cards { grid-template-columns: 1fr; max-width: 360px; }
  .card img { aspect-ratio: 4 / 3; }
  .toplinks { gap: 0.75rem; }
  body { background-attachment: scroll; }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; }
  .card a:hover, .card a:hover img { transform: none; }
}
