/* haijak.tv: one stylesheet for every page. Keeps the Wix site's charcoal + blue identity. */
@font-face { font-family: "Anton"; src: url(../fonts/anton.woff2) format("woff2"); font-display: swap; }
@font-face { font-family: "Open Sans"; src: url(../fonts/open-sans.woff2) format("woff2"); font-weight: 300 800; font-display: swap; }

:root {
  --bg: #1c1c1e;
  --panel: #2a2a2d;
  --line: #3d3d42;
  --text: #f2f2f2;
  --muted: #b9b9be;
  --blue: #4aa8ff;      /* lifted from Wix #3899EC so it passes 4.5:1 on --bg */
  --wrap: 1240px;
  --display: "Anton", Impact, "Arial Narrow", sans-serif;
  --body: "Open Sans", system-ui, -apple-system, "Segoe UI", Arial, sans-serif;
}
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body { margin: 0; background: var(--bg); color: var(--text); font: 16px/1.6 var(--body); }
img { max-width: 100%; height: auto; display: block; }
a { color: var(--blue); }
a:focus-visible, button:focus-visible { outline: 3px solid var(--blue); outline-offset: 3px; }
.wrap { width: min(100% - 2.5rem, var(--wrap)); margin-inline: auto; }
.skip { position: absolute; left: -999px; top: 0; background: var(--blue); color: #000; padding: .6rem 1rem; z-index: 20; }
.skip:focus { left: 1rem; }

/* header */
.site-head { position: sticky; top: 0; z-index: 10; background: rgba(20,20,22,.92); backdrop-filter: blur(8px); border-bottom: 1px solid var(--line); }
.site-head .wrap { display: flex; align-items: center; justify-content: space-between; gap: 1rem; min-height: 64px; flex-wrap: wrap; }
.brand { color: var(--text); text-decoration: none; font-family: var(--display); letter-spacing: .3em; font-size: 1.15rem; text-transform: uppercase; }
.nav { display: flex; gap: .25rem; flex-wrap: wrap; }
.nav a { color: var(--text); text-decoration: none; text-transform: uppercase; font-size: .8rem; font-weight: 600; letter-spacing: .12em; padding: .75rem .7rem; min-height: 44px; display: inline-flex; align-items: center; }
.nav a:hover, .nav a[aria-current="page"] { color: var(--blue); }

/* hero */
.hero { position: relative; display: grid; align-items: end; min-height: min(78vh, 760px); overflow: hidden; }
.hero > img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.hero::after { content: ""; position: absolute; inset: 0; background: linear-gradient(to top, var(--bg) 0%, rgba(28,28,30,.55) 45%, rgba(28,28,30,.1) 100%); }
.hero .wrap { position: relative; z-index: 1; padding-block: 3rem; }
.hero.short { min-height: min(46vh, 440px); }
.hero.focus-right > img { object-position: 74% 50%; } /* keeps the mech in frame on narrow screens */
h1, h2 { font-family: var(--display); font-weight: 400; text-transform: uppercase; line-height: 1.05; margin: 0 0 .5rem; }
h1 { font-size: clamp(2.4rem, 7vw, 5rem); letter-spacing: .12em; }
.tagline { color: var(--blue); font-family: var(--display); font-size: clamp(1.05rem, 2.6vw, 1.6rem); letter-spacing: .18em; text-transform: uppercase; margin: 0 0 1.5rem; line-height: 1.3; }
.btns { display: flex; gap: .75rem; flex-wrap: wrap; }
.btn { display: inline-flex; align-items: center; min-height: 48px; padding: .7rem 1.4rem; border-radius: 4px; font-weight: 700; text-decoration: none; text-transform: uppercase; letter-spacing: .08em; font-size: .85rem; border: 2px solid var(--blue); background: var(--blue); color: #08131f; cursor: pointer; font-family: var(--body); }
.btn.ghost { background: transparent; color: var(--text); }

/* sections */
.section { padding-block: 3.5rem; scroll-margin-top: 64px; }
.section > .wrap > h2 { font-size: clamp(1.6rem, 4vw, 2.4rem); letter-spacing: .08em; margin-bottom: 1.5rem; }

/* reel grid */
.reels { list-style: none; margin: 0; padding: 0; display: grid; gap: 2rem 1.5rem; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); }
.reel button { all: unset; cursor: pointer; display: block; width: 100%; }
.reel button:focus-visible { outline: 3px solid var(--blue); outline-offset: 4px; }
.thumb { display: block; position: relative; aspect-ratio: 16 / 9; background: #000; border-radius: 4px; overflow: hidden; }
.thumb img { width: 100%; height: 100%; object-fit: cover; transition: transform .3s; }
.reel button:hover .thumb img { transform: scale(1.04); }
.thumb .play { display: block; position: absolute; inset: 0; margin: auto; width: 56px; height: 56px; border-radius: 50%; background: rgba(0,0,0,.65); border: 2px solid #fff; }
.thumb .play::after { content: ""; position: absolute; left: 22px; top: 16px; border: 12px solid transparent; border-left: 18px solid #fff; border-right: 0; }
.dur { position: absolute; right: 6px; bottom: 6px; background: rgba(0,0,0,.75); color: #fff; font-size: .75rem; padding: 1px 6px; border-radius: 2px; }
.reel h3 { font-size: 1.05rem; line-height: 1.35; margin: .8rem 0 .3rem; overflow-wrap: anywhere; }
.reel p { color: var(--muted); font-size: .88rem; margin: 0; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }

/* player dialog */
dialog.player { width: min(100% - 1.5rem, 1100px); max-height: calc(100dvh - 1.5rem); padding: 0; border: 1px solid var(--line); background: var(--panel); color: var(--text); border-radius: 6px; }
dialog.player::backdrop { background: rgba(0,0,0,.85); }
.player .frame { aspect-ratio: 16 / 9; background: #000; }
.player iframe { width: 100%; height: 100%; border: 0; display: block; }
.player .meta { padding: 1rem 1.25rem 1.25rem; }
.player h3 { margin: 0 0 .5rem; font-size: 1.15rem; }
.player .desc { color: var(--muted); font-size: .9rem; white-space: pre-line; max-height: 30vh; overflow: auto; overflow-wrap: anywhere; }
.player .close { position: absolute; top: .4rem; right: .4rem; z-index: 2; width: 44px; height: 44px; border-radius: 50%; border: 0; background: rgba(0,0,0,.7); color: #fff; font-size: 1.6rem; line-height: 1; cursor: pointer; }

/* cards (cv, contact) */
.cards { display: grid; gap: 1.5rem; grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); }
.card { background: var(--panel); border: 1px solid var(--line); border-radius: 6px; padding: 1.5rem; }
.card h2 { font-size: 1.35rem; letter-spacing: .08em; color: var(--blue); }
.card ul { margin: 0; padding-left: 1.1rem; }
.card li { margin: .2rem 0; }
.social { list-style: none; padding: 0 !important; display: flex; flex-wrap: wrap; gap: .5rem; }
.social a { display: inline-flex; align-items: center; gap: .55rem; min-height: 44px; padding: .4rem .9rem .4rem .5rem; border: 1px solid var(--line); border-radius: 999px; color: var(--text); text-decoration: none; }
.social a:hover { border-color: var(--blue); }
.social img { width: 24px; height: 24px; object-fit: contain; }

/* footer */
.site-foot { border-top: 1px solid var(--line); background: #141416; color: var(--muted); font-size: .82rem; padding-block: 2rem; text-align: center; }
.site-foot p { margin: .25rem 0; }
.site-foot .social { justify-content: center; margin-bottom: 1rem; }

@media (max-width: 640px) {
  .site-head .wrap { justify-content: center; padding-block: .4rem; }
  .brand { font-size: 1rem; letter-spacing: .22em; }
  .nav a { padding: .6rem .55rem; font-size: .75rem; }
  .hero { min-height: 70vh; }
  .section { scroll-margin-top: 104px; }
}
@media (prefers-reduced-motion: reduce) { .thumb img { transition: none; } }
