/* =====================================================================
   FINFLIX — shared design system
   Maastricht University 2026 identity, Netflix-inspired episode platform.
   One stylesheet, four independent pages. No build step, no framework.
   ===================================================================== */

:root {
  /* --- surface --------------------------------------------------- */
  --navy:      #00072f;
  --deep:      #000521;
  --ink:       #000830;
  --navy-1:    #0a1747;
  --navy-2:    #081038;
  --navy-3:    #0e1c55;
  --navy-4:    #060d33;

  /* --- text ------------------------------------------------------ */
  --white:     #fcfcfc;
  --sky:       #beddf7;
  --sky-soft:  #d9e9fa;
  --muted:     #a3bfdd;
  --muted-2:   #8ba5c7;

  /* --- accents --------------------------------------------------- */
  --pink:      #f9c3b8;
  --pink-hi:   #fcd6cd;
  --yellow:    #f1e798;
  --gold:      #e0a860;   /* from the logo — brand mark + map spine */

  /* --- lines ----------------------------------------------------- */
  --border:    #2a3a66;
  --hair:      rgba(255,255,255,.08);
  --panel:     rgba(255,255,255,.04);
  --panel-2:   rgba(255,255,255,.07);

  /* --- geometry -------------------------------------------------- */
  --r-img:     24px;
  --r-panel:   16px;
  --r-btn:     12px;
  --gutter:    56px;
  --maxw:      1240px;

  --font: "Aptos", "Segoe UI", "Helvetica Neue", system-ui, sans-serif;
  --mono: ui-monospace, Menlo, Consolas, monospace;

  --sh-card:   0 14px 40px rgba(0,0,0,.55);
  --sh-hero:   0 30px 80px rgba(0,0,0,.7);
  --ease:      cubic-bezier(.2,.8,.2,1);
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }

body {
  margin: 0;
  background: var(--navy);
  color: var(--white);
  font-family: var(--font);
  line-height: 1.6;
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

a { color: var(--white); text-decoration: none; transition: color .25s; }
a:hover { color: var(--pink); }
img { max-width: 100%; }
::selection { background: rgba(249,195,184,.3); color: #fff; }

/* thin scrollbars rather than hidden — hiding them costs discoverability */
* { scrollbar-width: thin; scrollbar-color: var(--border) transparent; }
::-webkit-scrollbar { height: 8px; width: 8px; }
::-webkit-scrollbar-thumb { background: var(--border); border-radius: 99px; }
::-webkit-scrollbar-track { background: transparent; }

/* ---------------------------------------------------------------- *
   Animation
 * ---------------------------------------------------------------- */
@keyframes fadeUp   { from { opacity:0; transform: translateY(28px) } to { opacity:1; transform:none } }
@keyframes floatY   { 0%,100% { transform: translateY(0) } 50% { transform: translateY(-8px) } }
@keyframes floatDrift {
  0%,100% { transform: translateY(0) rotate(0) }
  50%     { transform: translateY(-14px) rotate(1.2deg) }
}
@keyframes heroZoom { from { transform: scale(1.06) } to { transform: scale(1) } }
@keyframes slideInL { from { opacity:0; transform: translateX(-60px) } to { opacity:1; transform:none } }
@keyframes slideInR { from { opacity:0; transform: translateX(60px) }  to { opacity:1; transform:none } }

.fade-up { animation: fadeUp .8s var(--ease) both; }

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: .001ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: .001ms !important;
    scroll-behavior: auto !important;
  }
}

/* ---------------------------------------------------------------- *
   Utility
 * ---------------------------------------------------------------- */
.wrap  { width: min(var(--maxw), 100% - var(--gutter) * 2); margin-inline: auto; }
.mono  { font-family: var(--mono); letter-spacing: 3px; font-size: 12px; text-transform: uppercase; }
.eyebrow { font-family: var(--mono); font-size: 13px; letter-spacing: 4px; color: var(--pink); margin: 0 0 12px; }
.muted { color: var(--muted); }
.center { text-align: center; }

h1,h2,h3 { text-wrap: balance; margin: 0; }
p { text-wrap: pretty; }

.skip {
  position: absolute; left: -9999px; top: 0; z-index: 999;
  background: var(--pink); color: var(--navy); padding: 12px 20px;
  border-radius: 0 0 var(--r-btn) 0; font-weight: 700;
}
.skip:focus { left: 0; }

:where(a, button, [tabindex]):focus-visible {
  outline: 2px solid var(--pink);
  outline-offset: 3px;
  border-radius: 4px;
}

/* ---------------------------------------------------------------- *
   Navigation — shared across all four sites
 * ---------------------------------------------------------------- */
.nav {
  position: fixed; inset: 0 0 auto 0; z-index: 50;
  display: flex; align-items: center; gap: 28px;
  padding: 14px var(--gutter);
  background: linear-gradient(180deg, rgba(0,5,31,.94), rgba(0,5,31,0));
  transition: background .35s;
}
.nav.solid { background: rgba(0,5,31,.97); border-bottom: 1px solid var(--hair); }
.nav--static { position: sticky; background: rgba(0,5,31,.97); border-bottom: 1px solid var(--hair); }

.brand { display: flex; align-items: center; gap: 11px; flex: none; }
.brand:hover { color: var(--white); }
.brand img { width: 30px; height: 40px; object-fit: contain; display: block; }
.brand span {
  font-weight: 900; font-size: 25px; letter-spacing: 3px;
  color: var(--pink); line-height: 1;
}

.navlinks { display: flex; gap: 22px; font-size: 14px; color: var(--sky); }
.navlinks a[aria-current="page"] { color: #fff; font-weight: 600; }

.navmeta {
  margin-left: auto; display: flex; align-items: center; gap: 16px;
  font-size: 13px; color: var(--muted-2);
}
.navmeta .tag { letter-spacing: 1px; }
.navmeta .avatar {
  width: 32px; height: 32px; border-radius: 10px;
  background: linear-gradient(135deg, var(--pink), #8a5a1c);
}

.navtoggle {
  display: none; margin-left: auto; background: none; border: 1px solid var(--border);
  color: var(--sky); border-radius: 10px; padding: 7px 12px; font-size: 15px; cursor: pointer;
}

.backlink {
  width: 40px; height: 40px; border-radius: 50%; flex: none;
  border: 2px solid var(--border);
  display: grid; place-items: center; font-size: 19px; color: var(--sky);
  transition: border-color .25s, color .25s;
}
.backlink:hover { border-color: var(--pink); color: var(--pink); }

@media (max-width: 860px) {
  :root { --gutter: 22px; }
  .navmeta { display: none; }
  .navtoggle { display: block; }
  .navlinks {
    position: absolute; top: 100%; left: 0; right: 0;
    flex-direction: column; gap: 0;
    background: rgba(0,5,31,.99); border-bottom: 1px solid var(--hair);
    max-height: 0; overflow: hidden; transition: max-height .35s var(--ease);
  }
  .navlinks.open { max-height: 320px; }
  .navlinks a { padding: 14px var(--gutter); border-top: 1px solid var(--hair); }
}

/* ---------------------------------------------------------------- *
   Buttons
 * ---------------------------------------------------------------- */
.btn {
  display: inline-flex; align-items: center; gap: 10px;
  font-weight: 700; font-size: 16px; padding: 12px 26px;
  border-radius: var(--r-btn); border: 1px solid transparent;
  cursor: pointer; transition: transform .2s var(--ease), background .25s, border-color .25s;
}
.btn:hover { transform: scale(1.05); }
.btn-primary { background: #fff; color: var(--navy); box-shadow: 0 10px 30px rgba(0,0,0,.45); }
.btn-primary:hover { background: var(--pink); color: var(--navy); }
.btn-accent  { background: var(--pink); color: var(--navy); }
.btn-accent:hover { background: var(--pink-hi); color: var(--navy); }
.btn-ghost {
  background: rgba(109,125,140,.4); color: #fff;
  backdrop-filter: blur(6px); font-weight: 600;
}
.btn-ghost:hover { background: rgba(109,125,140,.6); color: #fff; }
.btn-outline { border-color: var(--border); color: #fff; font-weight: 600; }
.btn-outline:hover { border-color: var(--pink); color: var(--pink); }

/* ---------------------------------------------------------------- *
   Poster card — the atom of the whole platform
 * ---------------------------------------------------------------- */
.poster {
  position: relative; display: block;
  border-radius: var(--r-img); overflow: hidden;
  aspect-ratio: 2 / 3; background: var(--navy-2);
  box-shadow: var(--sh-card);
  transition: transform .35s var(--ease), box-shadow .35s;
}
.poster img {
  position: absolute; inset: 0; width: 100%; height: 100%;
  object-fit: cover; object-position: 50% 32%;
}
.poster::after {
  content: ""; position: absolute; inset: 0;
  background: linear-gradient(0deg, rgba(0,5,31,.9) 4%, rgba(0,5,31,.15) 45%, transparent 70%);
}
.poster-text { position: absolute; left: 16px; right: 16px; bottom: 15px; z-index: 2; }
.poster-no {
  font-family: var(--mono); font-size: 11px; letter-spacing: 3px;
  color: var(--sky); margin: 0 0 5px;
}
.poster-title { font-size: 18px; font-weight: 700; line-height: 1.15; }
.poster-title .acc { color: var(--ep-accent, var(--pink)); }

a:hover > .poster,
a:focus-visible > .poster {
  transform: scale(1.06) translateY(-8px);
  box-shadow: 0 22px 54px rgba(0,0,0,.7), 0 0 0 2px var(--ep-accent, var(--pink));
}

/* ---------------------------------------------------------------- *
   Rails & grids
 * ---------------------------------------------------------------- */
.railwrap { position: relative; }
.rail {
  display: flex; gap: 20px; overflow-x: auto; scroll-behavior: smooth;
  padding: 20px var(--gutter) 26px; scroll-snap-type: x proximity;
}
.rail > * { flex: none; width: 230px; scroll-snap-align: start; }
.railbtn {
  position: absolute; top: 0; bottom: 26px; width: 52px; z-index: 20;
  border: none; cursor: pointer; color: #fff; font-size: 30px; line-height: 1;
  transition: color .25s, opacity .3s;
}
.railbtn:hover { color: var(--pink); }
.railbtn[disabled] { opacity: 0; pointer-events: none; }
.railbtn.prev { left: 0; background: linear-gradient(90deg, rgba(0,7,47,.95), transparent); }
.railbtn.next { right: 0; background: linear-gradient(270deg, rgba(0,7,47,.95), transparent); }
@media (max-width: 860px) { .railbtn { display: none; } }

.grid-posters {
  display: grid; gap: 26px;
  grid-template-columns: repeat(auto-fill, minmax(210px, 1fr));
}

/* ---------------------------------------------------------------- *
   Panels
 * ---------------------------------------------------------------- */
.panel {
  background: var(--panel); border: 1px solid var(--hair);
  border-radius: var(--r-img); padding: 24px;
  transition: transform .3s var(--ease), border-color .3s, background .3s;
}
.panel:hover { transform: translateY(-8px); border-color: rgba(249,195,184,.5); }

.band {
  display: flex; align-items: center; justify-content: space-between;
  gap: 30px; flex-wrap: wrap;
  background: linear-gradient(120deg, var(--navy-2), var(--navy-3));
  border: 1px solid rgba(249,195,184,.28);
  border-radius: var(--r-panel); padding: 30px 40px;
}

.sec-title { font-size: clamp(22px, 2.6vw, 30px); font-weight: 800; margin: 0 0 6px; }
.sec-lede  { color: var(--muted); font-size: 15px; margin: 0 0 22px; max-width: 70ch; }
.sechead {
  display: flex; align-items: baseline; justify-content: space-between;
  gap: 20px; padding-bottom: 12px;
}
.sechead h2 { font-size: 22px; font-weight: 700; }
.seemore { font-size: 13px; color: var(--muted-2); letter-spacing: 1px; }

/* ---------------------------------------------------------------- *
   Footer
 * ---------------------------------------------------------------- */
.foot {
  border-top: 1px solid var(--hair); margin-top: 70px;
  padding: 36px var(--gutter) 46px;
  color: var(--muted-2); font-size: 13px;
}
.foot-inner {
  display: flex; gap: 20px 40px; flex-wrap: wrap;
  align-items: center; justify-content: space-between;
  width: min(var(--maxw), 100%); margin-inline: auto;
}
.foot nav { display: flex; gap: 18px; flex-wrap: wrap; }
