/* iliil — site styles */

/* ---------- Fonts ---------- */

@font-face {
  font-family: "Gibson";
  src: url("../fonts/Gibson/Gibson.otf") format("opentype");
  font-weight: 400;
  font-display: swap;
}
@font-face {
  font-family: "Gibson";
  src: url("../fonts/Gibson/Gibson-SemiBold.otf") format("opentype");
  font-weight: 600;
  font-display: swap;
}
@font-face {
  font-family: "Gibson";
  src: url("../fonts/Gibson/Gibson-Bold.otf") format("opentype");
  font-weight: 700;
  font-display: swap;
}

/* ---------- Base ---------- */

:root {
  --nav-height: 80px;
  --gray-bg: #f5f6f7;
  --gray-text: #a1a5ad;
  --nav-link: #b5b8bb;
  --dark: #21282f;
  --font-text: "Helvetica Neue", Helvetica, Arial, sans-serif;
  --font-display: "Gibson", "Helvetica Neue", Helvetica, Arial, sans-serif;
}

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

html { overflow-x: hidden; -webkit-text-size-adjust: 100%; }

body {
  margin: 0;
  overflow-x: hidden;
  background: #fff;
  color: #333;
  font-family: var(--font-text);
  font-size: 14px;
  line-height: 1.43;
}

h1, h2, h3, h4, p, ul { margin: 0; }
ul { padding: 0; list-style: none; }
img, svg { display: block; }

a {
  color: inherit;
  text-decoration: none;
  transition: color 0.3s ease-in-out;
}
a:focus-visible, button:focus-visible { outline: 2px solid var(--dark); outline-offset: 3px; }

::selection { background: #000; color: #fff; }

.container {
  width: 100%;
  max-width: 1170px;
  margin: 0 auto;
  padding: 0 15px;
}

.sr-only {
  position: absolute;
  width: 1px; height: 1px;
  padding: 0; margin: -1px;
  overflow: hidden; clip: rect(0, 0, 0, 0);
  white-space: nowrap; border: 0;
}

/* ---------- Navigation (Headroom) ---------- */

.navbar {
  position: fixed;
  top: 0; left: 0; right: 0;
  z-index: 100;
  height: var(--nav-height);
  background: #fff;
  box-shadow: 1px 0 5px rgba(0, 0, 0, 0.1);
  transition: transform 0.3s ease-in-out, box-shadow 0.3s ease-in-out;
}
.navbar.headroom             { transform: translateY(-100%); }
.navbar.headroom--pinned     { transform: translateY(0); }
.navbar.headroom--unpinned   { transform: translateY(-100%); box-shadow: none; }
.navbar.headroom--top        { box-shadow: none; }

.navbar-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 100%;
}

.navbar-brand {
  display: block;
  padding: 10px 0;
  transition: opacity 0.4s ease, visibility 0.4s;
}
.navbar-brand img { width: 42px; height: 38px; }
.navbar-brand.is-hidden { opacity: 0; visibility: hidden; }

.main-nav { display: flex; margin-right: -15px; }
.main-nav a {
  display: block;
  padding: 0 15px;
  line-height: var(--nav-height);
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 26px;
  color: var(--nav-link);
}
.main-nav a:hover, .main-nav a:focus-visible { color: var(--dark); }

.navbar-toggle {
  display: none;
  width: 55px; height: 50px;
  margin-right: -12px;
  padding: 9px 12px;
  border: 0;
  background: transparent;
  cursor: pointer;
}
.navbar-toggle .icon-bar {
  display: block;
  width: 29px; height: 5px;
  background: #000;
}
.navbar-toggle .icon-bar + .icon-bar { margin-top: 4px; }

@media (max-width: 767px) {
  .navbar-toggle { display: block; }
  .main-nav {
    display: none;
    position: absolute;
    top: var(--nav-height); left: 0; right: 0;
    margin: 0;
    padding: 10px 0 20px;
    flex-direction: column;
    background: #fff;
    box-shadow: 0 5px 5px rgba(0, 0, 0, 0.08);
  }
  .navbar.menu-open .main-nav { display: flex; }
  .main-nav a { padding: 0 15px; line-height: 60px; }
}

/* ---------- Hero: logo with cranes ---------- */

#hero {
  position: fixed;
  top: 0; left: 0;
  width: 100%;
}

#game-wrapper {
  position: relative;
  height: 100vh;
  height: 100svh;
  min-height: 400px;
}

#gameboard {
  position: absolute;
  top: 50%; left: 0;
  width: 100%;
  height: auto;
  aspect-ratio: 1200 / 252;
  transform: translateY(calc(-50% - 30px));
}

#btn-go,
#f-bottom {
  position: absolute;
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.6s ease, visibility 0.6s, color 0.3s ease-in-out;
}
.intro-done #btn-go,
.intro-done #f-bottom { opacity: 1; visibility: visible; }
.intro-done #btn-go.is-hidden { opacity: 0; visibility: hidden; }

#btn-go {
  bottom: 12%;
  left: 50%;
  transform: translateX(-50%);
  padding: 10px;
  color: var(--nav-link);
}
#btn-go:hover { color: #000; }

#f-bottom {
  bottom: 2%;
  left: 0; right: 0;
  padding: 0 15px;
  text-align: center;
  font-size: 12px;
  font-weight: 400;
  line-height: 1.6;
  color: #bbb;
}
#f-bottom b { font-weight: 700; }
#f-bottom span { text-transform: uppercase; letter-spacing: 3px; }

/* transparent spacer the content slides over the fixed hero */
#mask {
  height: calc(100vh + 200px);
  height: calc(100svh + 200px);
}

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

#content, .footer {
  position: relative;
  z-index: 10;
}

.section {
  padding: 60px 0;
  min-height: 60vh;          /* temporary, until content is added */
  background: #fff;
}
.section--first {
  min-height: 100vh;
  min-height: 100svh;
  padding-top: calc(var(--nav-height) + 40px);
}
#latest, #contact { background: var(--gray-bg); }

.section-title {
  position: relative;
  margin-bottom: 52px;
  padding-bottom: 10px;
  border-bottom: 1px solid rgba(0, 0, 0, 0.1);
  color: var(--gray-text);
  font-size: 13px;
  font-weight: 700;
  line-height: 13px;
  text-transform: uppercase;
}

/* About intro: flock of birds */
#about { padding-top: 0; }
.flock {
  position: relative;
  overflow: hidden;
  background: url("../img/grad.jpg") center / cover no-repeat;
}
.flock canvas {
  display: block;
  width: 100%;
  height: auto;
  aspect-ratio: 1360 / 300;
  min-height: 154px;
}
.flock + .container { padding-top: 60px; }

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

.footer {
  padding: 50px 0;
  background: #000;
  color: #7b7c7e;
  font-size: 16px;
}

/* ---------- Works ---------- */

.work + .work { margin-top: 90px; }

.work-title {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 40px;
  line-height: 1.1;
  letter-spacing: -0.01em;
  color: var(--dark);
}
.work-meta {
  margin-top: 12px;
  font-size: 12px;
  letter-spacing: 3px;
  text-transform: uppercase;
  color: var(--gray-text);
}
.work-body p { max-width: 640px; }
.work-body p + p { margin-top: 18px; }
.work-body > p:first-child { font-size: 19px; line-height: 1.55; color: #333; }
.work-credits { font-size: 14px; line-height: 1.6; color: #7b7c7e; }

.work-links { display: flex; flex-wrap: wrap; gap: 8px 28px; }
.work-links a {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 18px;
  color: var(--dark);
  border-bottom: 2px solid currentColor;
  padding-bottom: 2px;
}
.work-links a:hover { color: var(--nav-link); }

.work--featured .work-info {
  display: grid;
  grid-template-columns: 1fr;
  gap: 24px;
  margin: 40px 0 50px;
}
@media (min-width: 992px) {
  .work--featured .work-info { grid-template-columns: 4fr 8fr; gap: 30px; }
}

/* video with poster; the YouTube player loads only on click */
.video {
  position: relative;
  aspect-ratio: 16 / 9;
  background: #000;
  overflow: hidden;
}
.video iframe, .video-play {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  border: 0;
}
.video-play { padding: 0; background: #000; cursor: pointer; }
.video-play img { width: 100%; height: 100%; object-fit: contain; transition: opacity 0.3s ease; }
.video-play:hover img { opacity: 0.8; }
.video-play-icon {
  position: absolute;
  top: 50%; left: 50%;
  width: 88px; height: 88px;
  margin: -44px 0 0 -44px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.92);
  transition: transform 0.3s ease, background 0.3s ease;
}
.video-play-icon::after {
  content: "";
  position: absolute;
  top: 50%; left: 50%;
  margin: -14px 0 0 -8px;
  border-style: solid;
  border-width: 14px 0 14px 24px;
  border-color: transparent transparent transparent #000;
}
.video-play:hover .video-play-icon { transform: scale(1.08); background: #fff; }

/* gallery */
.gallery {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 30px;
}
.gallery-item { display: block; overflow: hidden; background: #000; cursor: zoom-in; }
.gallery-item img { width: 100%; height: auto; transition: opacity 0.3s ease, transform 0.6s ease; }
.gallery-item:hover img { opacity: 0.85; transform: scale(1.02); }
.gallery-item--wide { grid-column: 1 / -1; }
@media (max-width: 767px) {
  .gallery { grid-template-columns: 1fr; gap: 15px; }
}

/* lightbox */
.lightbox {
  position: fixed;
  inset: 0;
  z-index: 200;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 60px 70px 40px;
  background: rgba(0, 0, 0, 0.94);
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.3s ease, visibility 0.3s;
}
.lightbox.is-open { opacity: 1; visibility: visible; }
.lightbox img {
  max-width: 100%;
  max-height: calc(100% - 40px);
  width: auto; height: auto;
  object-fit: contain;
}
.lightbox-caption {
  margin-top: 14px;
  min-height: 20px;
  color: #9a9da2;
  font-size: 13px;
  text-align: center;
}
.lightbox button {
  position: absolute;
  border: 0;
  background: transparent;
  color: #b5b8bb;
  cursor: pointer;
  font-family: var(--font-text);
  line-height: 1;
  transition: color 0.3s ease;
}
.lightbox button:hover { color: #fff; }
.lightbox-close { top: 14px; right: 18px; font-size: 40px; padding: 6px 10px; }
.lightbox-prev, .lightbox-next { top: 50%; margin-top: -30px; font-size: 44px; padding: 8px 14px; }
.lightbox-prev { left: 8px; }
.lightbox-next { right: 8px; }
@media (max-width: 767px) {
  .lightbox { padding: 60px 10px 30px; }
  .lightbox-prev, .lightbox-next { top: auto; bottom: 10px; margin: 0; }
}
html.no-scroll { overflow: hidden; }

#latest { min-height: 0; }
@media (max-width: 767px) {
  .work-title { font-size: 32px; }
  .work-body > p:first-child { font-size: 17px; }
  .video-play-icon { width: 64px; height: 64px; margin: -32px 0 0 -32px; }
  .video-play-icon::after { margin: -11px 0 0 -6px; border-width: 11px 0 11px 19px; }
}

/* ---------- Bio chapters ---------- */

.bio-chapter + .bio-chapter { margin-top: 90px; }
.bio-head { margin-bottom: 36px; }

.bio-row {
  display: grid;
  grid-template-columns: 1fr;
  gap: 18px;
  padding: 28px 0;
  border-top: 1px solid rgba(0, 0, 0, 0.08);
}
.bio-row:first-of-type { border-top: 0; padding-top: 0; }
@media (min-width: 992px) {
  .bio-row { grid-template-columns: minmax(0, 7fr) minmax(0, 5fr); gap: 40px; }
}

.bio-text p { max-width: 640px; font-size: 16px; line-height: 1.65; color: #333; }
.bio-text p + p { margin-top: 14px; }
.bio-lead { font-size: 19px !important; line-height: 1.55 !important; }

.bio-subhead {
  margin-bottom: 8px;
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 18px;
  color: var(--dark);
}

/* small archive images, shown at their own size (never enlarged) */
.bio-figures { display: flex; flex-wrap: wrap; gap: 20px; align-items: flex-start; }
.bio-figures figure { margin: 0; max-width: 100%; }
.bio-figures .gallery-item { display: inline-block; max-width: 100%; vertical-align: top; }
.bio-figures img { width: auto; max-width: 100%; height: auto; max-height: 220px; }
.bio-figures figcaption {
  margin-top: 6px;
  font-size: 12px;
  line-height: 1.4;
  color: #7b7c7e;
}

/* list of released games */
.bio-list-head { margin-top: 50px; padding-top: 28px; border-top: 1px solid rgba(0, 0, 0, 0.08); }
.game-list { margin: 14px 0 0; padding: 0; list-style: none; }
.game-list li {
  display: grid;
  grid-template-columns: 54px 60px minmax(0, 1fr) minmax(0, 1fr);
  gap: 18px;
  align-items: center;
  padding: 10px 0;
  border-bottom: 1px solid rgba(0, 0, 0, 0.06);
}
.game-cover { display: block; width: 54px; background: none; }
.game-cover img { width: 54px; height: auto; }
a.game-cover { cursor: zoom-in; }
.game-year { font-size: 14px; color: var(--gray-text); }
.game-title { font-family: var(--font-display); font-weight: 700; font-size: 17px; color: var(--dark); }
.game-role { display: block; margin-top: 2px; font-family: var(--font-text); font-weight: 400; font-size: 14px; color: #555; }
.game-studio { font-size: 13px; color: #7b7c7e; }
.game-note { margin-top: 14px; font-size: 12px; color: #7b7c7e; }
@media (max-width: 767px) {
  .game-list li { grid-template-columns: 54px minmax(0, 1fr); gap: 4px 16px; align-items: start; }
  .game-cover { grid-row: span 3; }
  .game-year, .game-title, .game-studio { grid-column: 2; }
}
.gallery-item[hidden] { display: none; }

/* projects inside bio chapters */
.project-meta {
  margin: -2px 0 14px;
  font-size: 12px !important;
  letter-spacing: 2px;
  text-transform: uppercase;
  color: var(--gray-text) !important;
}
.project-credit { font-size: 12px !important; color: #7b7c7e !important; }
.project-media { display: flex; flex-direction: column; gap: 12px; }
.project-media .video { margin-bottom: 4px; }
.project-main img { width: 100%; height: auto; max-height: 560px; object-fit: contain; background: #000; }
.project-thumbs { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.project-thumbs img { width: 100%; height: auto; aspect-ratio: 4 / 3; object-fit: cover; }
.text-link { color: var(--dark); border-bottom: 1px solid currentColor; }
.text-link:hover { color: var(--nav-link); }
.video--photo .video-play img { object-fit: cover; }
.project-thumbs .thumb-top { object-position: center 20%; }
.project-media .project-credit { margin-top: -4px; }
.project-xref {
  margin-top: 16px !important;
  font-size: 12px !important;
  letter-spacing: 1.5px;
  text-transform: uppercase;
  color: var(--gray-text) !important;
}
.project-xref a { color: var(--dark); border-bottom: 1px solid currentColor; }
.project-xref a:hover { color: var(--nav-link); }

/* technology list (Software) */
.tech-list { margin: 0; align-self: start; border-top: 1px solid rgba(0,0,0,0.12); }
.tech-list div { display: grid; grid-template-columns: 120px 1fr; gap: 12px; padding: 12px 0; border-bottom: 1px solid rgba(0,0,0,0.08); }
.tech-list dt { font-size: 11px; letter-spacing: 2px; text-transform: uppercase; color: var(--gray-text); padding-top: 3px; }
.tech-list dd { margin: 0; font-family: var(--font-display); font-weight: 700; font-size: 16px; color: var(--dark); }
.tech-line { margin-top: 18px !important; padding-top: 14px; border-top: 1px solid rgba(0,0,0,0.08); font-size: 14px !important; line-height: 1.7 !important; color: #555 !important; }
.tech-line span { display: block; margin-bottom: 2px; font-size: 11px; letter-spacing: 2px; text-transform: uppercase; color: var(--gray-text); }

/* About header over the flock */
.flock-caption {
  position: absolute; left: 0; right: 0; bottom: 0; top: 0;
  display: flex; align-items: flex-end;
  padding-bottom: 34px;
  pointer-events: none;
}
.flock-title {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 56px;
  line-height: 1;
  letter-spacing: -0.02em;
  color: #fff;
  text-shadow: 0 1px 12px rgba(0, 0, 0, 0.25);
}
.flock-sub {
  margin-top: 12px;
  font-size: 12px;
  letter-spacing: 3px;
  text-transform: uppercase;
  color: rgba(255, 255, 255, 0.85);
  text-shadow: 0 1px 8px rgba(0, 0, 0, 0.3);
}
.about-summary {
  max-width: 820px;
  margin-bottom: 90px;
  font-size: 22px;
  line-height: 1.55;
  color: var(--dark);
}
@media (max-width: 767px) {
  .flock canvas { min-height: 220px; }
  .flock-caption { padding-bottom: 22px; }
  .flock-title { font-size: 38px; }
  .flock-sub { font-size: 10px; letter-spacing: 2px; }
  .about-summary { font-size: 18px; margin-bottom: 60px; }
}

/* ---------- Contact ---------- */

#contact { min-height: 0; }
.contact { display: grid; grid-template-columns: 1fr; gap: 30px; }
@media (min-width: 992px) { .contact { grid-template-columns: 4fr 8fr; gap: 30px; } }
.contact-intro p { margin-top: 16px; max-width: 340px; font-size: 16px; line-height: 1.6; color: #555; }

.contact-form { max-width: 720px; }
.field-row { display: grid; grid-template-columns: 1fr 1fr; gap: 0 24px; }
@media (max-width: 767px) { .field-row { grid-template-columns: 1fr; } }
.field { margin-bottom: 22px; }
.field label {
  display: block; margin-bottom: 6px;
  font-size: 11px; letter-spacing: 2px; text-transform: uppercase; color: var(--gray-text);
}
.field input, .field select, .field textarea {
  width: 100%;
  padding: 10px 0;
  border: 0; border-bottom: 2px solid #d2d5db; border-radius: 0;
  background: transparent;
  font: inherit; font-size: 17px; color: var(--dark);
  transition: border-color 0.3s ease;
  -webkit-appearance: none; appearance: none;
}
.field textarea { resize: vertical; min-height: 140px; line-height: 1.55; }
.field input:focus, .field select:focus, .field textarea:focus { outline: 0; border-bottom-color: var(--dark); }
.field .is-invalid { border-bottom-color: #c0392b; }
.select { position: relative; }
.select select { padding-right: 28px; cursor: pointer; }
.select select:invalid { color: #9a9da2; }
.select::after {
  content: ""; position: absolute; right: 4px; top: 50%;
  width: 9px; height: 9px; margin-top: -7px;
  border-right: 2px solid var(--dark); border-bottom: 2px solid var(--dark);
  transform: rotate(45deg); pointer-events: none;
}
.hp { position: absolute !important; left: -9999px; width: 1px; height: 1px; overflow: hidden; }
.cf-turnstile { margin-bottom: 10px; }

.form-foot { display: flex; flex-wrap: wrap; align-items: center; gap: 14px 28px; margin-top: 8px; }
.btn-send {
  padding: 14px 30px;
  border: 0; border-radius: 0;
  background: var(--dark); color: #fff;
  font-family: var(--font-display); font-weight: 700; font-size: 18px;
  cursor: pointer;
  transition: background 0.3s ease;
}
.btn-send:hover { background: #000; }
.btn-send:disabled { background: var(--nav-link); cursor: wait; }
.form-note { font-size: 12px; color: #7b7c7e; }
.form-status { min-height: 22px; margin-top: 16px; font-size: 15px; }
.form-status.is-ok { color: var(--dark); }
.form-status.is-error { color: #c0392b; }

/* ---------- Chapter separators ---------- */
#about .container { counter-reset: chapter; }
.bio-chapter { counter-increment: chapter; }
.bio-chapter + .bio-chapter {
  margin-top: 110px;
  padding-top: 56px;
  border-top: 4px solid var(--dark);
}
.bio-chapter:first-of-type { padding-top: 56px; border-top: 4px solid var(--dark); }
.bio-head { position: relative; }
.bio-head::before {
  content: counter(chapter, decimal-leading-zero) " / 05";
  display: block;
  margin-bottom: 18px;
  font-size: 12px;
  letter-spacing: 3px;
  color: var(--gray-text);
}
@media (max-width: 767px) {
  .bio-chapter + .bio-chapter { margin-top: 70px; padding-top: 40px; }
  .work-title { font-size: 30px; }
}
.footer-inner { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 16px; }
.social { display: flex; gap: 18px; margin: 0; padding: 0; list-style: none; }
.social a { display: block; color: #7b7c7e; }
.social a:hover { color: #fff; }
.contact-social { margin-top: 14px !important; font-size: 15px !important; }
