/* =========================================================
   Chroma Cognitas – Website
   Values taken from Mockup V1 (styleguide)
   ========================================================= */

/* ---------- Fonts (self-hosted, no request to Google) ---------- */
@font-face { font-family: "Jost"; font-weight: 300; font-display: swap; src: url("../fonts/jost-latin-300-normal.woff2") format("woff2"); }
@font-face { font-family: "Jost"; font-weight: 400; font-display: swap; src: url("../fonts/jost-latin-400-normal.woff2") format("woff2"); }
@font-face { font-family: "Jost"; font-weight: 500; font-display: swap; src: url("../fonts/jost-latin-500-normal.woff2") format("woff2"); }
@font-face { font-family: "IBM Plex Mono"; font-weight: 400; font-display: swap; src: url("../fonts/ibm-plex-mono-latin-400-normal.woff2") format("woff2"); }

/* ---------- Design tokens ---------- */
:root {
  /* Neutrals */
  --bg:        #ECEBE7;
  --bg-light:  #F7F6F2;
  --white:     #FFFFFF;
  --line:      #D3D1CA;
  --black:     #1A1A1A;
  --text-2:    #3A3935;
  --text-3:    #55544F;
  --on-dark:   #ECEBE7;
  --on-dark-2: #CFCDC6;
  --on-dark-3: #A3A19A;
  --video-bg:  #2A2A28;

  /* Accents (icons and team bars only; exact values from the logo) */
  --red:    #E02527;
  --blue:   #4054A5;
  --green:  #1EA05B;
  --yellow: #F5C459;
  --violet: #8637BE;

  /* Light tones of the accents (exact values from the logo, see styleguide) */
  --red-light:    #F15B41;
  --blue-light:   #5173B9;
  --green-light:  #60BE7C;
  --yellow-light: #FCE695;
  --grey:         #8C8C8C;  /* illustrations only, not for text */

  /* Type */
  --font-sans: "Jost", system-ui, sans-serif;
  --font-mono: "IBM Plex Mono", ui-monospace, monospace;

  /* Layout */
  --content: 1200px;
  --gutter: 24px;
  --radius: 2px;
  --header-h: 68px;
}

/* ---------- Base ---------- */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; scroll-padding-top: var(--header-h); }
body {
  background: var(--bg);
  color: var(--black);
  font-family: var(--font-sans);
  font-size: 18px;
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
}
img, svg { display: block; max-width: 100%; }
a { color: inherit; }
ul { list-style: none; }
.hidden { display: none; }

.container {
  width: 100%;
  max-width: calc(var(--content) + 2 * var(--gutter));
  margin: 0 auto;
  padding: 0 var(--gutter);
}
.narrow { max-width: calc(712px + 2 * var(--gutter)); }

/* Vertical stacks with fixed gaps (like Auto Layout in Figma) */
.stack-14, .stack-16, .stack-18, .stack-36, .stack-56 { display: flex; flex-direction: column; }
.stack-14 { gap: 14px; }
.stack-16 { gap: 16px; }
.stack-18 { gap: 18px; }
.stack-36 { gap: 36px; }
.stack-56 { gap: 56px; }

/* ---------- Text styles ---------- */
.display {
  font-weight: 300;
  font-size: clamp(40px, 6vw, 84px);
  line-height: 1;
  letter-spacing: -0.01em;
  text-wrap: balance;
}
.h2 {
  font-weight: 300;
  font-size: clamp(32px, 4.2vw, 50px);
  line-height: 1.08;
  text-wrap: balance;
}
.h2-s {
  font-weight: 300;
  font-size: clamp(28px, 3.4vw, 40px);
  line-height: 1.1;
}
.h3 { font-weight: 500; font-size: 22px; line-height: 1.25; }
.body-l { font-size: 19px; line-height: 1.55; color: var(--text-2); }
.body   { font-size: 18px; line-height: 1.65; color: var(--text-2); }
.body-s { font-size: 16px; line-height: 1.6;  color: var(--text-2); }
.small  { font-size: 14px; line-height: 1.5;  color: var(--text-3); }
.overline {
  font-family: var(--font-mono);
  font-size: 13px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--text-3);
}
.caption { font-family: var(--font-mono); font-size: 13px; }
.label { font-weight: 500; font-size: 15px; }
.link { font-weight: 500; font-size: 16px; text-underline-offset: 4px; }

/* Numbered section label: "01 —— The Game". The number takes the color of the game's
   progression (red → blue → green → yellow), the only place where accents appear in text. */
.label-num { display: flex; align-items: center; gap: 12px; }
.label-num.center { justify-content: center; }
.label-num .num { color: var(--c); }
.label-num .rule { width: 28px; height: 1px; background: currentColor; opacity: .5; }
.section-dark .label-num { color: var(--on-dark-3); }
.section-dark .label-num .num { color: color-mix(in srgb, var(--c) 55%, white); }

/* Hero overline: three small dots in the order the colors appear in the game */
.hero-over { display: inline-flex; align-items: center; gap: 14px; }
.dots { display: inline-flex; gap: 6px; }
.dots i { width: 6px; height: 6px; border-radius: 50%; background: var(--c); }

/* ---------- Buttons ---------- */
.btn {
  display: inline-block;
  background: var(--black);
  color: var(--white);
  font-family: inherit;
  font-weight: 500;
  font-size: 15px;
  line-height: 1.2;
  letter-spacing: 0.04em;
  text-decoration: none;
  padding: 12px 20px;
  border: 0;
  border-radius: var(--radius);
  cursor: pointer;
  transition: background 0.2s;
}
.btn:hover { background: var(--text-2); }
.btn-l { font-size: 17px; padding: 16px 30px; }

/* ---------- Sections ---------- */
.section { padding: 96px 0; }
.section-light { background: var(--bg-light); border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); }
.section-dark  { background: var(--black); color: var(--on-dark); }
.row-between { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: flex-end; gap: 12px; }

/* ---------- ① Header ---------- */
.site-header {
  position: sticky;
  top: 0;
  z-index: 10;
  background: rgba(236, 235, 231, 0.95);
  border-bottom: 1px solid var(--line);
  backdrop-filter: blur(6px);
}
.header-inner {
  height: var(--header-h);
  display: flex;
  align-items: center;
  justify-content: space-between;
}
.brand { display: flex; align-items: center; gap: 12px; text-decoration: none; }
.diamond { width: 28px; height: 28px; }
.wordmark { font-size: 15px; letter-spacing: 0.32em; text-transform: uppercase; }
.main-nav { display: flex; align-items: center; gap: 26px; }
.main-nav a:not(.btn) { font-weight: 500; font-size: 15px; text-decoration: none; }
.main-nav a:not(.btn):hover { text-decoration: underline; text-underline-offset: 4px; }
.menu-toggle { display: none; }

/* ---------- ② Hero ---------- */
.hero { padding: 72px 0 88px; text-align: center; }
.hero-text {
  max-width: 820px;
  margin: 0 auto;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 20px;
}
.hero .body-l { max-width: 680px; }
.trailer {
  position: relative;
  margin-top: 40px;
  aspect-ratio: 16 / 9;
  background: var(--video-bg);
  border-radius: var(--radius);
  overflow: hidden;
  display: grid;
  place-items: center;
}
a.trailer { color: inherit; text-decoration: none; }
.trailer img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.trailer .play { position: relative; }
a.trailer:hover .play, a.trailer:focus-visible .play { transform: scale(1.05); }
.play {
  width: 92px;
  height: 92px;
  border-radius: 50%;
  border: 2px solid var(--on-dark);
  background: rgba(26, 26, 26, 0.6);
  color: var(--white);
  display: grid;
  place-items: center;
  cursor: pointer;
  transition: transform 0.2s;
}
.play:hover { transform: scale(1.05); }
.play svg { width: 36px; height: 36px; margin-left: 4px; }
.trailer .caption { position: absolute; left: 20px; bottom: 14px; color: var(--on-dark-2); }

/* ---------- ③ The Game ---------- */
.two-col { display: grid; grid-template-columns: 1fr 1fr; gap: 72px; }
.cards { display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px; }
.card {
  background: var(--white);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 28px;
  display: flex;
  flex-direction: column;
  gap: 14px;
}
.card-icon { width: 32px; height: 32px; }
.facts { display: grid; grid-template-columns: repeat(4, 1fr); border-top: 1px solid var(--black); }
.facts div { padding: 18px 16px 18px 0; border-bottom: 1px solid var(--line); }
.facts dt {
  font-family: var(--font-mono);
  font-size: 12px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--text-3);
}
.facts dd { margin-top: 6px; font-weight: 500; font-size: 17px; }

/* ---------- ④ Screenshots ---------- */
.section-dark .link { color: var(--on-dark); }
.shots { display: grid; grid-template-columns: repeat(3, 1fr); gap: 14px; }
.shot {
  aspect-ratio: 16 / 9;
  background: var(--c);
  display: flex;
  align-items: flex-end;
  padding: 14px;
  overflow: hidden;
}
.shot img { width: 100%; height: 100%; object-fit: cover; }
.shot figcaption { font-family: var(--font-mono); font-size: 13px; color: var(--on-dark-2); }

/* ---------- ⑤ Team ---------- */
.team { display: grid; grid-template-columns: repeat(5, 1fr); border-top: 1px solid var(--black); }
.team li {
  padding: 22px 20px 22px 0;
  display: flex;
  flex-direction: column;
  gap: 8px;
  border-bottom: 1px solid var(--line);
}
.team .bar { width: 28px; height: 4px; background: var(--c); }
.team .name { font-weight: 500; font-size: 20px; line-height: 1.3; }
.team .role { font-size: 15px; line-height: 1.5; color: var(--text-3); }

/* ---------- ⑥ Newsletter ---------- */
.newsletter { padding: 88px 0; border-bottom: 0; }
.newsletter .h2-s, .newsletter > .container > .body { text-align: center; }
.form { display: flex; flex-direction: column; gap: 8px; margin-top: 8px; }
.form-row { display: flex; gap: 10px; }
.form input[type="email"] {
  flex: 1;
  min-width: 0;
  height: 50px;
  padding: 0 16px;
  font: inherit;
  font-size: 16px;
  background: var(--white);
  color: var(--black);
  border: 1.5px solid var(--black);
  border-radius: var(--radius);
}
.btn-form { height: 50px; padding: 0 26px; font-size: 16px; }
.small a { color: var(--text-3); text-underline-offset: 3px; }

/* ---------- ⑦ Footer ---------- */
.site-footer { background: var(--black); color: var(--on-dark-2); padding: 56px 0 32px; }
.footer-inner { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 32px; }
.footer-brand { display: flex; flex-direction: column; gap: 10px; }
.footer-brand .wordmark { color: var(--on-dark); }
.footer-links { display: flex; flex-wrap: wrap; gap: 4px 24px; }
.footer-links a { color: var(--on-dark); font-weight: 500; font-size: 15px; text-underline-offset: 4px; }
.copyright { margin-top: 40px; font-family: var(--font-mono); font-size: 12px; color: var(--on-dark-3); }

/* ---------- Tablet ---------- */
@media (max-width: 1024px) {
  .team { grid-template-columns: repeat(3, 1fr); }
  .shots { grid-template-columns: repeat(2, 1fr); }
  .facts { grid-template-columns: repeat(2, 1fr); }
}

/* ---------- Mobile ---------- */
@media (max-width: 860px) {
  .menu-toggle {
    display: flex;
    flex-direction: column;
    justify-content: center;
    gap: 5px;
    width: 40px;
    height: 40px;
    background: none;
    border: 0;
    cursor: pointer;
  }
  .menu-toggle span { display: block; height: 2px; background: var(--black); transition: transform 0.2s, opacity 0.2s; }
  .menu-toggle[aria-expanded="true"] span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
  .menu-toggle[aria-expanded="true"] span:nth-child(2) { opacity: 0; }
  .menu-toggle[aria-expanded="true"] span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

  .main-nav {
    display: none;
    position: absolute;
    top: var(--header-h);
    left: 0;
    right: 0;
    flex-direction: column;
    align-items: stretch;
    gap: 0;
    padding: 8px var(--gutter) 24px;
    background: var(--bg);
    border-bottom: 1px solid var(--line);
  }
  .main-nav.open { display: flex; }
  .main-nav a:not(.btn) { padding: 14px 0; border-bottom: 1px solid var(--line); font-size: 17px; }
  .main-nav .btn { margin-top: 20px; text-align: center; }

  .hero { padding: 48px 0 64px; }
  .play { width: 64px; height: 64px; }
  .play svg { width: 26px; height: 26px; }

  .section { padding: 64px 0; }
  .newsletter { padding: 64px 0; }
  .two-col { grid-template-columns: 1fr; gap: 24px; }
  .cards, .shots, .team, .facts { grid-template-columns: 1fr; }
  .form-row { flex-direction: column; }
  .footer-inner { flex-direction: column; }
}

/* =========================================================
   PROJECT PAGE (project.html)
   ========================================================= */
.project-hero { padding: 72px 0 64px; }
.hero-left { max-width: 900px; display: flex; flex-direction: column; gap: 20px; }
.hero-left .body-l { max-width: 760px; }
.updated {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-family: var(--font-mono);
  font-size: 13px;
  color: var(--text-2);
}
.updated .dot { width: 8px; height: 8px; border-radius: 50%; background: var(--green); box-shadow: 0 0 0 4px rgba(33,160,88,0.18); }
strong { font-weight: 500; color: var(--black); }

/* Requirements list */
.req-list { border-top: 1px solid var(--black); }
.req-list li {
  display: grid;
  grid-template-columns: 76px 1fr;
  gap: 12px;
  padding: 12px 0;
  border-bottom: 1px solid var(--line);
  font-size: 16px;
  line-height: 1.5;
  color: var(--text-2);
}
.req-list span { font-family: var(--font-mono); font-size: 12px; color: var(--text-3); padding-top: 3px; }

/* Team members */
.members { display: grid; grid-template-columns: repeat(5, 1fr); gap: 20px; }
.member { display: flex; flex-direction: column; background: var(--white); border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; }
.member .photo {
  width: 100%;
  aspect-ratio: 1 / 1;
  object-fit: cover;
  display: grid;
  place-items: center;
  background: color-mix(in srgb, var(--c) 14%, var(--bg));
  color: color-mix(in srgb, var(--c) 70%, var(--black));
  font-weight: 300;
  font-size: 44px;
  letter-spacing: 0.06em;
}
img.photo { height: auto; }
.member-body { padding: 20px; display: flex; flex-direction: column; gap: 8px; flex: 1; }
.member .bar { width: 28px; height: 4px; background: var(--c); }
.member .name { font-weight: 500; font-size: 19px; line-height: 1.3; }
.member .role { font-family: var(--font-mono); font-size: 12px; letter-spacing: 0.06em; text-transform: uppercase; color: var(--text-3); }
.member .body-s { font-size: 15px; }
.member .mail { margin-top: auto; padding-top: 8px; font-size: 14px; font-weight: 500; word-break: break-all; text-underline-offset: 3px; }
.supervisor strong { color: var(--black); }

/* Milestones */
.milestones { list-style: none; display: grid; grid-template-columns: repeat(7, 1fr); border-top: 1px solid var(--black); }
.milestones li { position: relative; padding: 18px 14px 18px 0; border-bottom: 1px solid var(--line); display: flex; flex-direction: column; gap: 6px; }
.milestones time { font-family: var(--font-mono); font-size: 13px; color: var(--text-3); }
.milestones p { font-size: 14px; line-height: 1.45; color: var(--text-2); }
.milestones li.is-next { border-bottom: 3px solid var(--black); }
.milestones li.is-next time { color: var(--black); font-weight: 500; }
.badge {
  align-self: flex-start;
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  background: var(--black);
  color: var(--white);
  padding: 2px 8px;
  border-radius: var(--radius);
}

/* Filter chips */
.filters { display: flex; flex-wrap: wrap; gap: 8px; }
.chip {
  font: inherit;
  font-size: 14px;
  font-weight: 500;
  padding: 7px 14px;
  border: 1.5px solid var(--black);
  border-radius: 999px;
  background: transparent;
  color: var(--black);
  cursor: pointer;
}
.chip:hover { background: var(--white); }
.chip.is-active { background: var(--black); color: var(--white); }

/* Log entries */
.log { border-top: 1px solid var(--black); }
.entry { display: grid; grid-template-columns: 140px 1fr; gap: 24px; padding: 28px 0; border-bottom: 1px solid var(--line); }
.entry[hidden] { display: none; }
.entry > time { font-family: var(--font-mono); font-size: 14px; color: var(--text-3); padding-top: 2px; }
.entry-body { display: flex; flex-direction: column; gap: 10px; max-width: 820px; }
.tag { display: flex; align-items: center; gap: 8px; font-family: var(--font-mono); font-size: 12px; letter-spacing: 0.06em; text-transform: uppercase; color: var(--text-3); }
.tag::before { content: ""; width: 10px; height: 10px; background: var(--c); transform: rotate(45deg); flex: none; }
.entry-title { font-weight: 500; font-size: 22px; line-height: 1.3; }
.gallery { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; margin-top: 6px; }
.gallery-1 { grid-template-columns: minmax(0, 520px); }
.thumb { display: block; padding: 0; border: 1px solid var(--line); background: var(--white); cursor: zoom-in; border-radius: var(--radius); overflow: hidden; }
.thumb img { width: 100%; aspect-ratio: 16 / 9; object-fit: cover; transition: transform 0.25s; }
.thumb:hover img { transform: scale(1.03); }
.thumb-logo { max-width: 200px; }
.thumb-logo img { aspect-ratio: auto; object-fit: contain; padding: 16px; background: var(--bg); }

/* Lightbox */
.lightbox { margin: auto; padding: 0; border: 0; background: transparent; max-width: 92vw; max-height: 92vh; overflow: visible; }
.lightbox::backdrop { background: rgba(26, 26, 26, 0.85); }
.lightbox img { max-width: 92vw; max-height: 86vh; width: auto; background: var(--white); border-radius: var(--radius); }
.lightbox-close {
  position: absolute; top: -18px; right: -18px;
  width: 40px; height: 40px; border-radius: 50%;
  border: 0; background: var(--white); color: var(--black);
  font-size: 24px; line-height: 1; cursor: pointer;
}

/* Contact */
.contact { display: grid; grid-template-columns: 1fr auto; gap: 72px; align-items: center; }
.contact-list { border-top: 1px solid var(--black); margin-top: 8px; }
.contact-list div { display: grid; grid-template-columns: 170px 1fr; gap: 16px; padding: 14px 0; border-bottom: 1px solid var(--line); }
.contact-list dt { font-family: var(--font-mono); font-size: 12px; letter-spacing: 0.12em; text-transform: uppercase; color: var(--text-3); padding-top: 4px; }
.contact-list dd { font-size: 17px; }
.contact-list a { font-weight: 500; text-underline-offset: 3px; }
.qr-card {
  background: var(--white);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 28px;
  display: flex; flex-direction: column; align-items: center; gap: 16px;
  text-align: center;
}
.qr-card img { width: 180px; height: 180px; }
.qr-card figcaption { display: flex; flex-direction: column; gap: 4px; }
.qr-card .caption { color: var(--text-3); }

@media (max-width: 1100px) {
  .members { grid-template-columns: repeat(3, 1fr); }
  .milestones { grid-template-columns: repeat(4, 1fr); }
}
@media (max-width: 860px) {
  .project-hero { padding: 48px 0 40px; }
  .members { grid-template-columns: 1fr 1fr; gap: 14px; }
  .milestones { grid-template-columns: 1fr; }
  .milestones li { flex-direction: row; flex-wrap: wrap; gap: 4px 14px; padding-right: 0; }
  .milestones p { flex-basis: 100%; }
  .entry { grid-template-columns: 1fr; gap: 8px; padding: 24px 0; }
  .gallery { grid-template-columns: 1fr 1fr; }
  .contact { grid-template-columns: 1fr; gap: 36px; }
  .contact-list div { grid-template-columns: 1fr; gap: 2px; }
  .qr-card { justify-self: start; }
}
@media (max-width: 480px) {
  .members { grid-template-columns: 1fr; }
  .member { flex-direction: row; }
  .member .photo { width: 96px; min-width: 96px; aspect-ratio: auto; font-size: 26px; }
}

/* Print (e.g. handout for a company event) */
@media print {
  .site-header, .filters, .lightbox, .menu-toggle { display: none !important; }
  body, .section-light, .site-footer { background: #fff !important; color: #000; }
  .section { padding: 28px 0; }
  .entry, .member, .card { break-inside: avoid; }
}
.gallery-1 .thumb img { object-position: top; }
.thumb-logo { max-width: 150px; }
