/* =========================================================
   _contora — single-screen suprematist poster
   Pixel-perfect to Figma (canvas 1536×1024, aspect 3:2)
   ========================================================= */

/* ---------- TOKENS ---------- */
:root {
  --bg:        #FBFAF8;
  --black:     #000000;
  --ink:       #000000;
  --light:     #D4CFC7;
  --light-dk:  #CFCBC0;   /* Rectangle 10 */
  --line:      #000000;
  --red:       #C02928;   /* Rectangle 4 (main red square) */
  --red-mid:   #BE2A25;   /* Rectangle 8 (small red accent) */
  --red-dk:    #B72421;   /* Rectangle 7 (tall red bar) */

  --mono:    "Intel One Mono", "IBM Plex Mono", ui-monospace, SFMono-Regular, Menlo, monospace;
  --display: "Inter", "Helvetica Neue", Arial, sans-serif;
  --ease:    cubic-bezier(.22,.61,.36,1);
}

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

html, body {
  margin: 0;
  padding: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: var(--mono);
  font-size: 14px;
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

body { overflow-x: hidden; }
img { max-width: 100%; display: block; }

a {
  color: inherit;
  text-decoration: none;
  transition: transform .25s var(--ease), color .25s var(--ease);
}

button {
  font: inherit; color: inherit; background: none; border: 0; cursor: pointer;
}

::selection { background: var(--red); color: var(--bg); }


/* =========================================================
   POSTER — fixed aspect ratio matching Figma 1536×1024
   ========================================================= */
.poster {
  position: relative;
  width: 100vw;
  aspect-ratio: 1536 / 1024;
  background: var(--bg);
  overflow: hidden;
  /* every absolute child is positioned in % so the layout scales 1:1 */
}

/* font sizes scale with viewport width relative to 1536px canvas */
:root {
  --fs-nav:    clamp(12px, 0.98vw, 15px);
  --fs-mark:   clamp(10px, 0.78vw, 13px);
  --fs-body:   clamp(11px, 0.82vw, 13px);
  --fs-meta:   clamp(10px, 0.72vw, 12px);
  --fs-logo:   11.85vw;        /* compensates for browser rendering Inter narrower than Figma's reference */
  --fs-slogan: clamp(11px, 0.92vw, 15px);
  --fs-name:   clamp(12px, 0.95vw, 15px);
  --fs-role:   clamp(10px, 0.85vw, 13px);
}


/* =========================================================
   TOP NAV (absolutely positioned per Figma — children anchored to .poster)
   ========================================================= */
.nav {
  /* purely a wrapper; children position themselves against .poster */
  display: contents;
  font-size: var(--fs-nav);
  letter-spacing: .04em;
  color: var(--ink);
}

.nav__index {
  /* Figma /01: L:0.78% T:11.82% — moved below the new pixel logomark + divider */
  position: absolute;
  left: 0.78%;
  top: 11.82%;
  z-index: 30;
  font-size: var(--fs-nav);
  color: var(--ink);
}

/* ---- Pixel logomark (Figma Vector 6:21) ---- */
.logomark {
  position: absolute;
  /* L:1.50% T:0.78% W:3.58% H:5.37% — bbox 55×55 in canvas units */
  left: 1.50%;
  top: 0.78%;
  width: 3.58%;
  /* aspect 1:1 — height equals width on canvas (55×55, 0.78%+5.37%=6.15% ≈ width × canvas-w/canvas-h = 3.58% × 1.5 = 5.37%) */
  aspect-ratio: 1 / 1;
  display: block;
  color: var(--ink);
  z-index: 30;
  transition: transform .25s var(--ease), color .25s var(--ease);
}
.logomark svg { width: 100%; height: 100%; display: block; }
.logomark:hover { color: var(--red); transform: translateX(2px); }

/* ---- Horizontal divider under top nav (Figma Line 7) ---- */
.nav__divider {
  position: absolute;
  /* T:6.93% spanning the full canvas width */
  left: 0;
  right: 0;
  top: 6.93%;
  height: 1px;
  background: var(--ink);
  z-index: 28;
}

.nav__center {
  position: absolute;
  top: 3.61%;
  left: 15.36%;
  right: 7%;
  display: flex;
  gap: clamp(20px, 2.4vw, 38px);
  z-index: 30;
  font-size: var(--fs-nav);
  color: var(--ink);
}

.nav__center a {
  position: relative;
  padding: 0;
}
.nav__center a::after {
  content: "";
  position: absolute; left: 0; bottom: -2px;
  width: 0; height: 1px;
  background: currentColor;
  transition: width .3s var(--ease);
}
.nav__center a:hover { transform: translateX(4px); }
.nav__center a:hover::after { width: 100%; }

.nav__brackets {
  position: absolute;
  /* Figma: L:94.92% T:3.91% — anchored to poster */
  top: 3.91%;
  left: 94.92%;
  z-index: 30;
  font-size: clamp(12px, 0.98vw, 15px);
  letter-spacing: 0;
  color: var(--ink);
}


/* =========================================================
   GUIDE — left vertical rule with /02 /03 marks
   ========================================================= */
.guide {
  position: absolute;
  /* Figma Line 1 (updated): T:14.75% H:34.18% — shorter, starts below /01 */
  top: 14.75%;
  left: 1.53%;
  width: 1px;
  height: 34.18%;
  background: var(--ink);
  z-index: 5;
}

.guide__mark {
  position: absolute;
  font-size: var(--fs-mark);
  color: var(--ink);
  letter-spacing: .04em;
}
.guide__mark--top {
  /* /02 at L:0.78% T:52.64% — placed independently */
  top: 13560%; /* unused */
  display: none;
}

/* render /02 and /03 as standalone elements (positioned via .mark--XX) */
.mark {
  position: absolute;
  font-family: var(--mono);
  font-size: var(--fs-mark);
  color: var(--ink);
  letter-spacing: .04em;
  z-index: 5;
}
.mark--02 { left: 0.78%; top: 52.64%; }
.mark--03 { left: 0.78%; top: 80.08%; }


/* =========================================================
   HERO — logo + slogan stacked
   ========================================================= */
.hero {
  position: absolute;
  left: 18.88%;
  top: 16.50%;
  width: 60%;
  z-index: 12;
}

.logo {
  margin: 0;
  /* Figma uses Inter 700, 155px */
  font-family: var(--display);
  font-weight: 700;
  font-size: var(--fs-logo);
  line-height: 1.21;        /* Figma: lh 187.6 / 155 = 1.21 */
  letter-spacing: -0.04em;
  color: var(--ink);
  position: relative;
  white-space: nowrap;
}

.tag {
  /* slogan UNDER the logo, anchored to .poster — Figma: L:25.72% T:34.08% */
  position: absolute;
  top: 34.08%;
  left: 25.72%;
  margin: 0;
  text-transform: uppercase;
  font-family: var(--mono);
  font-size: var(--fs-slogan);
  letter-spacing: .02em;
  line-height: 1.82;
  color: var(--ink);
  white-space: nowrap;
}

/* legacy bar under "_" — disabled (not in Figma) */
.logo__bar { display: none; }
.logo::before { content: none; }


/* =========================================================
   RIGHT COMPOSITION — black square + red square + small bar
   ========================================================= */
.comp--right {
  position: absolute;
  inset: 0;
  pointer-events: none;
  z-index: 6;
}

.comp__black {
  position: absolute;
  /* L:73.63% T:9.77% W:14.13% H:26.95% */
  left: 73.63%;
  top: 9.77%;
  width: 14.13%;
  height: 26.95%;
  background: var(--black);
}

.comp__red {
  /* L:87.76% T:27.44% W:8.20% H:14.45% */
  position: absolute;
  left: 87.76%;
  top: 27.44%;
  width: 8.20%;
  height: 14.45%;
  background: var(--red);
}

.comp__bar {
  /* small black bar attached to bottom-left of black square
     L:66.60% T:36.72% W:9.83% H:1.76% */
  position: absolute;
  left: 66.60%;
  top: 36.72%;
  width: 9.83%;
  height: 1.76%;
  background: var(--ink);
}

.comp__line {
  /* Vertical line ALONG left edge of black square — Figma strokeWeight: 2
     L:73.76% T:9.77% H:39.65% */
  position: absolute;
  left: 73.76%;
  top: 9.77%;
  width: 2px;
  height: 39.65%;
  background: var(--ink);
}


/* =========================================================
   LEFT COMPOSITION — tall black + tall grey + diagonal
   ========================================================= */
.comp__tall-black {
  /* L:6.51% T:41.99% W:9.96% H:31.25% */
  position: absolute;
  left: 6.51%;
  top: 41.99%;
  width: 9.96%;
  height: 31.25%;
  background: var(--black);
}

.comp__tall-grey {
  /* L:15.36% T:48.24% W:11.07% H:33.59% */
  position: absolute;
  left: 15.36%;
  top: 48.24%;
  width: 11.07%;
  height: 33.59%;
  background: var(--light);
}

/* SVG diagonal — Line 2: L:2.28% T:55.57% W:28.58% H:16.11%
   from (35,569) to (474,569) — bottom-left to top-right, Figma idx 36 (above shapes) */
.comp__diag {
  position: absolute;
  left: 2.28%;
  top: 55.57%;
  width: 28.58%;
  height: 16.11%;
  pointer-events: none;
  overflow: visible;
  z-index: 8;   /* above tall-black/grey (default 0) */
}
.comp__diag svg { width: 100%; height: 100%; display: block; overflow: visible; }
.comp__diag svg line {
  stroke: var(--ink);
  stroke-width: 2;
  /* don't let preserveAspectRatio="none" squash the stroke when the
     wrapper is scaled — keep 2px screen-pixels regardless of viewBox */
  vector-effect: non-scaling-stroke;
}


/* =========================================================
   STANDALONE ACCENTS
   ========================================================= */
.accent {
  position: absolute;
  pointer-events: none;
  z-index: 10;   /* above .comp--right (z:6) and other decorations */
}

.accent--red-l {
  /* Rectangle 8: L:1.43% T:57.03% W:1.95% H:3.52% */
  left: 1.43%;
  top: 57.03%;
  width: 1.95%;
  height: 3.52%;
  background: var(--red-mid);
}

.accent--grey-l {
  /* Rectangle 9: L:29.43% T:68.65% W:1.95% H:5.57% */
  left: 29.43%;
  top: 68.65%;
  width: 1.95%;
  height: 5.57%;
  background: var(--light);
}

.accent--grey-tiny {
  /* Rectangle 10: L:1.11% T:84.08% W:0.98% H:1.56% */
  left: 1.11%;
  top: 84.08%;
  width: 0.98%;
  height: 1.56%;
  background: var(--light-dk);
}

.accent--red-tall {
  /* Rectangle 7: L:76.04% T:53.91% W:1.04% H:29.20% */
  left: 76.04%;
  top: 53.91%;
  width: 1.04%;
  height: 29.20%;
  background: var(--red-dk);
}


/* =========================================================
   SECTION HEADERS (label + line) — positioned absolutely
   ========================================================= */
.head {
  display: contents; /* children are positioned individually */
}

.section-label {
  position: absolute;
  font-family: var(--mono);
  font-size: var(--fs-body);
  font-weight: 500;
  color: var(--ink);
  letter-spacing: .02em;
  z-index: 8;
}

.section-line {
  position: absolute;
  height: 1px;
  background: var(--ink);
  z-index: 7;
}


/* /services label + line */
.label--services {
  /* L:33.79% T:53.22% */
  left: 33.79%;
  top: 53.22%;
}
.line--services {
  /* L:40.49% T:54.88% W:30.27% */
  left: 40.49%;
  top: 54.88%;
  width: 30.27%;
}

/* /portfolio label + line + arrows */
.label--portfolio {
  /* L:33.79% T:75.98% */
  left: 33.79%;
  top: 75.98%;
}
.line--portfolio {
  /* L:41.02% T:77.64% W:24.67% */
  left: 41.02%;
  top: 77.64%;
  width: 24.67%;
}
.arrow {
  position: absolute;
  /* Figma vector y=793 is the stroke line of the arrow.
     Anchor box-center to that y by placing top at 793/1024=77.44% then translating -50%. */
  top: 77.44%;
  transform: translateY(-50%);
  font-family: var(--mono);
  font-size: clamp(13px, 1.1vw, 18px);
  font-weight: 600;
  color: var(--ink);
  line-height: 1;
  z-index: 12;   /* Figma idx 45-46 — top-most layer */
  cursor: pointer;
  transition: transform .2s var(--ease), color .2s var(--ease);
}
.arrow:hover { color: var(--red); transform: translateY(-50%) translateX(2px); }
.arrow--prev { left: 67.45%; }
.arrow--next { left: 70.83%; }

/* /team label + line */
.label--team {
  /* L:80.53% T:56.74% */
  left: 80.53%;
  top: 56.74%;
}
.line--team {
  /* L:80.73% T:54.88% W:10.55% */
  left: 80.73%;
  top: 54.88%;
  width: 10.55%;
}


/* =========================================================
   SERVICES — 3 columns at fixed positions
   ========================================================= */
.service {
  position: absolute;
  width: 11.59%;
  z-index: 8;
}
.service--01 { left: 33.79%; top: 57.71%; }
.service--02 { left: 48.05%; top: 57.71%; }
.service--03 { left: 61.59%; top: 57.71%; }

.service__title {
  margin: 0 0 .8em;
  font-family: var(--mono);
  font-weight: 600;
  font-size: var(--fs-body);
  color: var(--ink);
  letter-spacing: .01em;
}

.service__copy {
  margin: 0;
  font-size: var(--fs-body);
  color: var(--ink);
  opacity: .85;
  line-height: 1.55;
}

.cmd {
  position: absolute;
  display: inline-flex;
  gap: 6px;
  align-items: center;
  font-family: var(--mono);
  font-size: var(--fs-body);
  letter-spacing: .02em;
  color: var(--ink);
  white-space: nowrap;
  z-index: 8;
  padding-bottom: 2px;
}
.cmd::after {
  content: "";
  position: absolute; left: 0; bottom: 0;
  width: 100%; height: 1px;
  background: currentColor;
  transform: scaleX(0);
  transform-origin: left;
  transition: transform .3s var(--ease);
}
.cmd:hover { color: var(--red); transform: translateX(4px); }
.cmd:hover::after { transform: scaleX(1); }
.cmd:hover .cmd__arrow { transform: translateX(2px); }
.cmd__arrow { transition: transform .2s var(--ease); }

.cmd--01 { left: 33.79%; top: 69.34%; }
.cmd--02 { left: 48.05%; top: 69.34%; }
.cmd--03 { left: 61.59%; top: 69.34%; }


/* =========================================================
   TEAM MINI — vertical list on the right
   ========================================================= */
.team-mini {
  position: absolute;
  z-index: 9;
}

.team-row {
  position: absolute;
  width: 13%;
}

.team-row__line {
  display: flex;
  align-items: baseline;
  gap: 8px;
  font-family: var(--mono);
  font-size: var(--fs-body);
  color: var(--ink);
}
.team-row__num { width: 12px; }
.team-row__name { white-space: nowrap; }

.team-row__role {
  margin: 4px 0 0 24px;
  font-size: var(--fs-role);
  color: var(--ink);
  opacity: .65;
  letter-spacing: .02em;
}

.team-row--0 { left: 80.53%; top: 62.50%; }
.team-row--1 { left: 80.53%; top: 69.53%; }
.team-row--2 { left: 80.53%; top: 76.56%; }


/* =========================================================
   Mini brand / meta footer (small, in poster corners)
   These do not exist in Figma but feel natural — kept subtle.
   ========================================================= */
.brand-mini {
  position: absolute;
  left: 1.56%;
  bottom: 2.5%;
  display: none; /* hidden — not present in Figma */
}
.meta-mini {
  position: absolute;
  right: 1.56%;
  bottom: 2.5%;
  display: none; /* hidden — not present in Figma */
}


/* =========================================================
   EXPANDED TEAM (below the fold, with photos)
   ========================================================= */
.team-full {
  padding: clamp(60px, 9vh, 120px) clamp(20px, 3.2vw, 56px) clamp(40px, 6vh, 80px);
  background: var(--bg);
}

.section-head {
  display: grid;
  grid-template-columns: auto 1fr auto;
  align-items: center;
  gap: clamp(16px, 2vw, 32px);
  margin-bottom: clamp(28px, 4vh, 48px);
  font-size: 12px;
}
.section-head__label { font-size: 14px; font-weight: 500; }
.section-head__line  { height: 1px; background: var(--ink); }
.section-head__count { font-size: 11px; color: var(--ink); opacity: .55; letter-spacing: .14em; text-transform: uppercase; }

.team__list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: clamp(16px, 2vw, 28px);
}

.member { display: flex; flex-direction: column; gap: 8px; }

.member__num {
  font-size: 10px;
  letter-spacing: .14em;
  color: var(--ink);
  opacity: .55;
}

.member__photo {
  position: relative;
  margin: 0;
  aspect-ratio: 1 / 1.1;
  overflow: hidden;
  background: var(--light);
  border: 1px solid var(--ink);
}

.member__photo img {
  width: 100%; height: 100%;
  object-fit: cover;
  filter: grayscale(1) contrast(1.18) brightness(.97);
  mix-blend-mode: multiply;
  transition: filter .4s var(--ease), transform .6s var(--ease);
}

.member__photo::before {
  content: "";
  position: absolute;
  inset: 0;
  background-image: radial-gradient(circle, rgba(0,0,0,.55) 0.6px, transparent 1px);
  background-size: 3px 3px;
  mix-blend-mode: screen;
  opacity: .55;
  pointer-events: none;
  transition: opacity .35s var(--ease);
  z-index: 2;
}

.member__plate {
  position: absolute;
  right: 12px; bottom: 12px;
  width: 22px; height: 22px;
  background: var(--ink);
  z-index: 3;
}
.member__plate--red { background: var(--red); }

.member:hover .member__photo img {
  filter: grayscale(.55) contrast(1.05);
  transform: scale(1.02);
}
.member:hover .member__photo::before { opacity: .15; }

.member__name {
  margin: 4px 0 0;
  font-size: 13px;
  font-weight: 500;
}

.member__role {
  margin: 2px 0 0;
  font-size: 11px;
  letter-spacing: .04em;
  color: var(--ink);
  opacity: .65;
  text-transform: uppercase;
}


/* =========================================================
   FOOTER (extended)
   ========================================================= */
.foot {
  padding: clamp(40px, 5vh, 80px) clamp(20px, 3.2vw, 56px) clamp(28px, 4vh, 48px);
  background: var(--bg);
  border-top: 1px solid var(--ink);
}

.foot__rule { display: none; }

.foot__row {
  display: grid;
  grid-template-columns: 2fr 1fr 1fr 1.4fr;
  gap: clamp(20px, 3vw, 48px);
  align-items: start;
}

.foot__col { display: flex; flex-direction: column; gap: 10px; }

.foot__logo {
  font-family: var(--mono);
  font-weight: 700;
  font-size: clamp(22px, 2vw, 32px);
  letter-spacing: -.02em;
  line-height: 1;
}

.foot__line { margin: 0; font-size: 12px; opacity: .8; max-width: 28ch; }

.foot__mail {
  font-size: 13px;
  border-bottom: 1px solid var(--ink);
  padding-bottom: 1px;
  width: fit-content;
}
.foot__mail:hover { color: var(--red); border-color: var(--red); transform: translateX(4px); }

.foot__label {
  font-size: 10px;
  letter-spacing: .14em;
  color: var(--ink);
  opacity: .55;
  text-transform: uppercase;
}

.foot__col a { font-size: 12px; width: fit-content; }
.foot__col a:hover { transform: translateX(4px); color: var(--red); }

.foot__col--meta {
  font-size: 11px;
  letter-spacing: .08em;
  opacity: .65;
  text-transform: uppercase;
  align-items: flex-end;
  text-align: right;
}


/* =========================================================
   REVEAL ANIMATION — opacity-only so layout stays exactly at
   Figma coords even before IntersectionObserver fires.
   ========================================================= */
[data-reveal] {
  opacity: 0;
  transition: opacity .7s var(--ease);
}
[data-reveal].is-in {
  opacity: 1;
}

@media (prefers-reduced-motion: reduce) {
  [data-reveal] { opacity: 1; transform: none; transition: none; }
  *, *::before, *::after {
    animation-duration: .001ms !important;
    transition-duration: .001ms !important;
  }
}


/* =========================================================
   RESPONSIVE — break poster into a vertical stack
   ========================================================= */
@media (max-width: 1180px) {
  .poster {
    aspect-ratio: auto;
    height: auto;
    min-height: 100vh;
    padding: 24px 24px 80px;
  }
  /* most absolute children become flow elements on small screens */
  .nav, .nav__index, .nav__center, .nav__brackets,
  .hero, .tag, .comp__black, .comp__red, .comp__bar, .comp__line,
  .comp__tall-black, .comp__tall-grey, .comp__diag,
  .accent, .guide, .mark,
  .label--services, .line--services, .label--portfolio, .line--portfolio,
  .label--team, .line--team, .arrow,
  .service, .cmd, .team-row {
    position: static;
    display: revert;
    width: auto;
    height: auto;
  }
  .nav { display: flex; justify-content: space-between; padding-bottom: 24px; }
  .nav__center { display: flex; gap: 16px; overflow-x: auto; }
  .hero { margin-top: 24px; }
  .logo { font-size: clamp(48px, 14vw, 110px); white-space: nowrap; }
  .tag {
    margin-top: 18px;
    white-space: normal;
    font-size: clamp(11px, 2.4vw, 14px);
  }
  .comp__black, .comp__red, .comp__bar, .comp__line,
  .comp__tall-black, .comp__tall-grey, .comp__diag,
  .accent, .guide, .mark, .arrow {
    display: none;
  }
  .label--services, .label--portfolio, .label--team {
    display: block;
    margin-top: 32px;
    font-weight: 500;
  }
  .line--services, .line--portfolio, .line--team {
    display: block;
    width: 100% !important;
    margin: 6px 0 16px;
  }
  .service {
    display: block;
    width: 100%;
    margin-bottom: 32px;
  }
  .cmd { display: inline-flex; margin-top: 8px; }
  .team-row {
    display: block;
    width: 100%;
    margin-bottom: 16px;
  }
  .team-row__line { font-size: 14px; }
  .team-row__role { font-size: 12px; }
}

@media (max-width: 720px) {
  .team__list { grid-template-columns: repeat(2, 1fr); }
  .foot__row { grid-template-columns: 1fr; }
  .foot__col--meta { align-items: flex-start; text-align: left; }
}
