:root {
  --petrol: #007D7D;
  --off-white: #F2F0EF;
  --gray: #A7AFAF;
  --text: var(--gray);
  --muted: var(--gray);
  --quiet: var(--gray);
  --line: rgba(167, 175, 175, 0.18);
  --line-soft: rgba(167, 175, 175, 0.12);
  --surface-line: rgba(0, 125, 125, 0.34);
  --max-width: 1240px;
  --content-gutter: clamp(28px, 4vw, 56px);
  --layout-edge: max(var(--content-gutter), calc((100vw - var(--max-width)) / 2 + 28px));
  --content-width: min(calc(100% - (var(--content-gutter) * 2)), calc(var(--max-width) - 56px));
  --side-rule-offset: max(18px, calc((100vw - var(--max-width)) / 2 - 18px));
  --progress-offset: max(14px, calc(var(--side-rule-offset) - 42px));
  --font-display: Montserrat, Arial, sans-serif;
  --font-body: "Cocomat Pro", "Cocomat", Montserrat, Arial, sans-serif;
}

@font-face {
  font-family: "Montserrat";
  src: url("assets/fonts/Montserrat-wght.ttf") format("truetype");
  font-weight: 100 900;
  font-style: normal;
  font-display: swap;
}

@font-face {
  font-family: "Cocomat Pro";
  src: local("Cocomat Pro"), local("CocomatPro");
  font-display: swap;
}

* {
  box-sizing: border-box;
}

html {
  overflow-x: hidden;
  scroll-behavior: smooth;
}

body {
  margin: 0;
  min-height: 100vh;
  overflow-x: hidden;
  background:
    radial-gradient(circle at 74% 18%, rgba(0, 125, 125, 0.11), transparent min(58vw, 42rem)),
    radial-gradient(circle at 52% 58%, rgba(0, 125, 125, 0.065), transparent min(70vw, 54rem)),
    linear-gradient(145deg, #020303 0%, #061211 54%, #030607 100%);
  background-attachment: fixed;
  background-position: center top, center center, center center;
  background-repeat: no-repeat;
  background-size: max(1600px, 128vw) max(920px, 118vh), max(1700px, 136vw) max(980px, 128vh), cover;
  color: var(--text);
  font-family: var(--font-body);
  letter-spacing: 0;
}

body::selection {
  background: rgba(0, 125, 125, 0.28);
  color: var(--off-white);
}

a {
  color: inherit;
  text-decoration: none;
}

.page-shell {
  position: relative;
  min-height: 100vh;
  overflow-x: clip;
}

.page-shell::before,
.page-shell::after {
  position: fixed;
  z-index: 0;
  top: 116px;
  bottom: 116px;
  width: 2px;
  content: "";
  background:
    linear-gradient(180deg, transparent, var(--surface-line) 16%, var(--line) 50%, var(--surface-line) 84%, transparent);
  pointer-events: none;
}

.page-shell::before {
  left: var(--side-rule-offset);
}

.page-shell::after {
  right: var(--side-rule-offset);
}

.site-header,
main {
  position: relative;
  z-index: 1;
}

main {
  overflow-x: clip;
}

.scroll-progress {
  position: fixed;
  z-index: 30;
  top: 116px;
  right: var(--progress-offset);
  width: 2px;
  height: calc(100svh - 232px);
  overflow: hidden;
  border-radius: 999px;
  background: transparent;
  pointer-events: none;
}

.scroll-progress span {
  display: block;
  width: 100%;
  height: 100%;
  border-radius: inherit;
  background: var(--petrol);
  transform: scaleY(var(--scroll-progress, 0));
  transform-origin: top;
}

.site-header {
  position: fixed;
  z-index: 20;
  top: 0;
  left: 0;
  right: 0;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  padding: 20px var(--layout-edge);
  background: linear-gradient(180deg, rgba(3, 6, 7, 0.82), rgba(3, 6, 7, 0));
}

.brand,
.nav-links {
  display: flex;
  align-items: center;
}

.brand {
  align-items: flex-start;
  flex-direction: column;
  gap: 4px;
  color: var(--off-white);
  font-family: var(--font-display);
  font-weight: 700;
  line-height: 1;
}

.brand-mark {
  display: grid;
  width: 31px;
  height: 23px;
  place-items: center;
}

.brand-mark img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: contain;
  filter: drop-shadow(0 0 10px rgba(0, 125, 125, 0.12));
}

.nav-links {
  gap: clamp(14px, 3vw, 34px);
  color: var(--muted);
  font-family: var(--font-display);
  font-size: 0.92rem;
  font-weight: 600;
}

.nav-links a {
  transition: color 180ms ease;
}

.nav-links a:hover {
  color: var(--off-white);
}

.hero {
  position: relative;
  min-height: 92svh;
  padding: 116px var(--layout-edge) 34px;
}

.hero-canvas {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  opacity: 0.18;
  pointer-events: none;
}

.hero-frame {
  position: relative;
  z-index: 2;
  display: grid;
  grid-template-rows: auto 1fr auto;
  width: var(--content-width);
  min-height: calc(92svh - 150px);
  margin: 0 auto;
  border-top: 2px solid var(--line);
  border-bottom: 2px solid var(--line);
  background: transparent;
}

.hero-meta {
  display: flex;
  justify-content: space-between;
  gap: 20px;
  padding: 18px 0;
  border-bottom: 2px solid var(--line-soft);
  color: var(--quiet);
  font-family: var(--font-display);
  font-size: 0.74rem;
  font-weight: 800;
  text-transform: uppercase;
}

.hero-layout {
  display: grid;
  grid-template-columns: minmax(0, 0.54fr) minmax(430px, 0.46fr);
  gap: clamp(42px, 6vw, 92px);
  align-items: center;
  padding: clamp(62px, 12vh, 130px) 0 clamp(42px, 9vh, 86px);
}

.identity-block {
  max-width: 820px;
}

.hero-title-lockup {
  display: grid;
  gap: clamp(16px, 2.2vw, 26px);
  justify-items: start;
}

.hero-logo-mark {
  display: block;
  width: clamp(68px, 6.6vw, 98px);
  height: auto;
  opacity: 0.94;
  filter: drop-shadow(0 20px 46px rgba(0, 0, 0, 0.34));
}

.eyebrow,
.panel-label {
  margin: 0 0 18px;
  color: var(--petrol);
  font-family: var(--font-display);
  font-size: 0.75rem;
  font-weight: 800;
  text-transform: uppercase;
}

h1,
h2,
h3,
p {
  margin-top: 0;
}

h1,
h2,
h3 {
  font-family: var(--font-display);
}

h1 {
  max-width: 650px;
  margin: 0;
  color: var(--off-white);
  font-size: clamp(2.65rem, 4.85vw, 4.8rem);
  line-height: 0.92;
  font-weight: 700;
  text-wrap: balance;
}

.person-name {
  margin: 24px 0 0;
  color: var(--muted);
  font-size: clamp(1.12rem, 1.8vw, 1.76rem);
  font-weight: 500;
}

.contact-panel {
  display: grid;
  align-self: center;
  justify-self: center;
  width: min(100%, clamp(430px, 36vw, 540px));
  min-width: 0;
}

.contact-list {
  display: grid;
  gap: 0;
  width: 100%;
  margin: 0;
  border-top: 2px solid var(--surface-line);
  border-bottom: 2px solid var(--surface-line);
}

.contact-list div {
  display: grid;
  grid-template-columns: 86px minmax(0, 1fr);
  gap: clamp(20px, 2.3vw, 34px);
  align-items: baseline;
  padding: 17px 0;
}

.contact-list div + div {
  border-top: 2px solid var(--line-soft);
}

.contact-list dt {
  color: var(--quiet);
  font-family: var(--font-display);
  font-size: 0.72rem;
  font-weight: 800;
  text-transform: uppercase;
}

.contact-list dd {
  margin: 0;
  color: var(--text);
  font-size: clamp(1.02rem, 1.18vw, 1.16rem);
  font-weight: 500;
  line-height: 1.35;
}

.contact-list a,
.contact-links a {
  overflow-wrap: anywhere;
  transition: color 180ms ease;
}

.contact-list a:hover,
.contact-links a:hover {
  color: var(--off-white);
}

.scroll-cue {
  display: inline-grid;
  gap: 8px;
  grid-template-columns: max-content;
  width: fit-content;
  padding: 18px 0;
  color: var(--quiet);
  font-family: var(--font-display);
  font-size: 0.74rem;
  font-weight: 800;
  text-transform: uppercase;
}

.scroll-cue > span:first-child {
  white-space: nowrap;
}

.scroll-track {
  position: relative;
  display: block;
  justify-self: stretch;
  height: 2px;
  overflow: hidden;
  background: rgba(167, 175, 175, 0.14);
}

.scroll-track span {
  position: absolute;
  inset: 0;
  background: var(--petrol);
  animation: scroll-line 1.8s ease-in-out infinite;
}

h2 {
  margin-bottom: 0;
  color: var(--off-white);
  font-size: clamp(2.25rem, 5vw, 5.2rem);
  line-height: 0.98;
  font-weight: 800;
  text-wrap: balance;
}

.scroll-story {
  position: relative;
  overflow: visible;
  padding: clamp(96px, 12vw, 154px) 0 clamp(72px, 9vw, 118px);
  background: transparent;
}

.story-sticky {
  position: relative;
  display: grid;
  gap: clamp(22px, 3.2vh, 34px);
  width: var(--content-width);
  margin: 0 auto;
}

.story-intro {
  max-width: 660px;
}

.story-intro h2,
.gallery-heading h2,
.contact-band h2 {
  max-width: 760px;
  font-size: clamp(2.6rem, 3.75vw, 3.75rem);
  line-height: 0.98;
}

.story-grid {
  --story-card-min-height: clamp(178px, 14.5vw, 202px);
  --story-visual-width: clamp(178px, 16.5vw, 220px);
  --story-visual-height: clamp(126px, 11.7vw, 156px);
  --story-card-gap: clamp(28px, 2.6vw, 36px);
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: clamp(14px, 1.8vw, 22px);
  align-items: center;
}

.story-item {
  --item-progress: 0;
  --from-x: 0px;
  --from-y: 0px;
  position: relative;
  z-index: 1;
  display: flex;
  gap: var(--story-card-gap);
  align-items: center;
  min-width: 0;
  min-height: var(--story-card-min-height);
  padding: clamp(14px, 1.5vw, 20px);
  overflow: hidden;
  background:
    linear-gradient(135deg, rgba(0, 125, 125, 0.045), transparent 38%),
    rgba(3, 6, 7, 0.78);
  box-shadow: 0 24px 80px rgba(0, 0, 0, 0.22);
  opacity: calc(0.16 + (var(--item-progress) * 0.84));
  transform:
    translate3d(
      calc(var(--from-x) * (1 - var(--item-progress))),
      calc(var(--from-y) * (1 - var(--item-progress))),
      0
    )
    scale(calc(0.985 + (var(--item-progress) * 0.015)));
  transition:
    opacity 900ms ease,
    transform 1150ms cubic-bezier(0.16, 1, 0.3, 1);
  backface-visibility: hidden;
  will-change: transform, opacity;
}

.scroll-story.is-active .story-item {
  --item-progress: 1;
}

.story-item.from-left {
  --from-x: clamp(-92px, -7vw, -48px);
}

.story-item.from-right {
  --from-x: clamp(48px, 7vw, 92px);
}

.story-visual {
  position: relative;
  z-index: 0;
  display: grid;
  flex: 0 0 var(--story-visual-width);
  width: var(--story-visual-width);
  min-width: var(--story-visual-width);
  max-width: var(--story-visual-width);
  height: var(--story-visual-height);
  min-height: var(--story-visual-height);
  max-height: var(--story-visual-height);
  align-self: center;
  place-items: stretch;
  overflow: hidden;
  contain: paint;
  background:
    linear-gradient(135deg, rgba(0, 125, 125, 0.14), rgba(0, 125, 125, 0)),
    rgba(7, 17, 17, 0.84);
}

.story-visual img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
  opacity: 0.94;
  filter: saturate(0.95) contrast(1.04);
}

.story-copy {
  position: relative;
  z-index: 1;
  flex: 1 1 0;
  min-width: 0;
}

.story-copy span {
  display: block;
  margin-bottom: 12px;
  color: var(--petrol);
  font-family: var(--font-display);
  font-size: 0.74rem;
  font-weight: 800;
  text-transform: uppercase;
  overflow-wrap: break-word;
}

.story-copy h3 {
  margin: 0;
  color: var(--off-white);
  font-size: clamp(1.16rem, 1.75vw, 1.68rem);
  line-height: 1.08;
  font-weight: 700;
  text-wrap: balance;
  overflow-wrap: break-word;
  hyphens: auto;
}

.gallery-banner {
  width: var(--content-width);
  margin: 0 auto;
  padding: clamp(54px, 8vw, 96px) 0 clamp(76px, 10vw, 124px);
}

.gallery-heading {
  max-width: 760px;
  margin-bottom: clamp(30px, 5vw, 58px);
}

.project-gallery {
  display: grid;
  gap: clamp(30px, 4vw, 54px);
  padding: clamp(18px, 2.2vw, 28px);
  border: 2px solid var(--line-soft);
  background: rgba(3, 6, 7, 0.38);
}

.project-group {
  display: grid;
  gap: clamp(16px, 2vw, 24px);
}

.project-group + .project-group {
  padding-top: clamp(24px, 3vw, 38px);
  border-top: 2px solid var(--line-soft);
}

.project-group-heading {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 24px;
  color: var(--petrol);
  font-family: var(--font-display);
  text-transform: uppercase;
}

.project-group-heading span {
  color: var(--quiet);
  font-size: 0.72rem;
  font-weight: 800;
}

.project-group-heading h3 {
  margin: 0;
  color: var(--petrol);
  font-size: clamp(0.78rem, 1vw, 0.94rem);
  font-weight: 800;
  letter-spacing: 0.02em;
}

.project-grid {
  display: grid;
  gap: clamp(12px, 1.45vw, 18px);
}

.project-grid-three {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.project-grid-two {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.project-card {
  position: relative;
  min-width: 0;
  margin: 0;
  overflow: hidden;
  aspect-ratio: 4 / 3;
  background:
    linear-gradient(135deg, rgba(0, 125, 125, 0.08), rgba(0, 125, 125, 0)),
    rgba(7, 17, 17, 0.82);
}

.project-card-wide {
  aspect-ratio: 16 / 10;
}

.project-card-car {
  aspect-ratio: 4 / 3;
}

.project-card-contain {
  background:
    linear-gradient(135deg, rgba(0, 125, 125, 0.06), rgba(0, 125, 125, 0)),
    rgba(3, 6, 7, 0.86);
}

.project-card img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
  filter: saturate(0.92) contrast(1.02);
  transition: transform 700ms ease, filter 700ms ease;
}

.project-card-contain img {
  object-fit: contain;
}

.project-card figcaption {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
}

.project-card:hover img {
  filter: saturate(1) contrast(1.06);
  transform: scale(1.018);
}

.contact-band {
  position: relative;
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(280px, 0.42fr);
  gap: clamp(34px, 7vw, 104px);
  align-items: end;
  width: var(--content-width);
  margin: 0 auto;
  padding: clamp(76px, 11vw, 138px) 0;
}

.contact-band::before {
  position: absolute;
  top: 0;
  left: clamp(34px, 5vw, 76px);
  right: clamp(34px, 5vw, 76px);
  height: 2px;
  content: "";
  background:
    linear-gradient(90deg, transparent, var(--line) 8%, var(--surface-line) 50%, var(--line) 92%, transparent);
}

.contact-links {
  display: grid;
  gap: 14px;
  justify-items: start;
  color: var(--muted);
  font-size: clamp(1rem, 1.5vw, 1.18rem);
  font-weight: 500;
}

.contact-links span {
  color: var(--quiet);
}

.reveal {
  opacity: 0;
  transform: translateY(28px);
  transition:
    opacity 700ms ease,
    transform 700ms ease;
}

.reveal.is-visible {
  opacity: 1;
  transform: translateY(0);
}

@keyframes scroll-line {
  0% {
    transform: translateX(-100%);
  }

  45%,
  55% {
    transform: translateX(0);
  }

  100% {
    transform: translateX(100%);
  }
}

@media (max-width: 980px) {
  :root {
    --content-gutter: clamp(22px, 5vw, 38px);
    --layout-edge: var(--content-gutter);
    --content-width: calc(100% - (var(--content-gutter) * 2));
    --side-rule-offset: clamp(10px, 2.2vw, 18px);
    --progress-offset: calc(var(--side-rule-offset) + 8px);
  }

  .site-header {
    position: sticky;
    padding: 16px var(--layout-edge);
  }

  .scroll-progress {
    top: 92px;
    right: var(--progress-offset);
    display: block;
    height: calc(100svh - 184px);
  }

  .page-shell::before,
  .page-shell::after {
    top: 92px;
    bottom: 72px;
    display: block;
  }

  .page-shell::before {
    left: var(--side-rule-offset);
  }

  .page-shell::after {
    right: var(--side-rule-offset);
  }

  .hero {
    min-height: calc(100svh - 68px);
    padding: 42px var(--layout-edge) 28px;
  }

  .hero-frame {
    width: 100%;
    min-height: calc(100svh - 138px);
  }

  .hero-layout,
  .contact-band {
    grid-template-columns: 1fr;
  }

  .hero-layout {
    gap: clamp(34px, 7vw, 54px);
    padding: clamp(58px, 10vw, 76px) 0 clamp(38px, 8vw, 52px);
  }

  .contact-panel {
    justify-self: start;
    width: min(100%, 540px);
    padding: 28px 0 0;
  }

  .contact-list div {
    grid-template-columns: 82px minmax(0, 1fr);
  }

  h1 {
    max-width: 720px;
    font-size: clamp(3rem, 12vw, 5.1rem);
  }

  .story-sticky,
  .gallery-banner,
  .contact-band {
    width: var(--content-width);
    margin-inline: auto;
  }

  .story-grid {
    --story-card-min-height: clamp(210px, 24vw, 240px);
    --story-visual-width: clamp(206px, 28vw, 240px);
    --story-visual-height: clamp(150px, 20.5vw, 176px);
    --story-card-gap: clamp(22px, 4vw, 34px);
    grid-template-columns: 1fr;
  }

  .story-item {
    --item-progress: 1 !important;
    min-height: var(--story-card-min-height);
  }

  .project-gallery {
    padding: 16px;
  }

  .project-grid-three,
  .project-grid-two {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .project-card,
  .project-card-wide {
    aspect-ratio: 4 / 3;
  }
}

@media (max-width: 620px) {
  :root {
    --content-gutter: 24px;
    --side-rule-offset: 10px;
    --progress-offset: 18px;
  }

  .site-header {
    position: sticky;
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    gap: 18px;
    width: 100dvw;
    max-width: 100dvw;
    padding-block: 16px;
  }

  .brand {
    min-width: 0;
  }

  .brand-mark {
    width: 30px;
    height: 22px;
  }

  .nav-links {
    position: fixed;
    top: 28px;
    right: var(--layout-edge);
    left: auto;
    z-index: 25;
    min-width: max-content;
    justify-content: end;
    font-size: 0.86rem;
  }

  .hero-title-lockup {
    gap: 18px;
  }

  .hero-logo-mark {
    width: 64px;
  }

  .hero-meta,
  .scroll-cue {
    font-size: 0.68rem;
  }

  .hero-meta {
    align-items: flex-start;
    flex-direction: column;
    gap: 8px;
  }

  h1 {
    font-size: clamp(2.35rem, 12vw, 3.75rem);
  }

  h2,
  .story-intro h2,
  .gallery-heading h2,
  .contact-band h2 {
    max-width: 100%;
    font-size: clamp(2.05rem, 10vw, 2.55rem);
    line-height: 1.02;
  }

  .person-name {
    margin-top: 18px;
  }

  .contact-list div {
    grid-template-columns: 1fr;
    gap: 6px;
  }

  .story-sticky {
    padding-top: 52px;
  }

  .story-item {
    flex-direction: column;
    align-items: stretch;
    min-height: auto;
    gap: 18px;
    padding: 16px;
  }

  .story-visual {
    flex-basis: auto;
    width: 100%;
    min-width: 0;
    max-width: none;
    height: auto;
    min-height: 170px;
    max-height: none;
    aspect-ratio: 1.9;
  }

  .story-copy span {
    margin-bottom: 8px;
  }

  .project-grid-three,
  .project-grid-two {
    grid-template-columns: 1fr;
  }

  .project-gallery {
    padding: 14px;
  }

  .project-card {
    aspect-ratio: 4 / 3;
  }

  .project-card-wide {
    aspect-ratio: 16 / 10;
  }

  .project-card-car {
    aspect-ratio: 4 / 3;
  }

  .contact-band {
    gap: 24px;
    padding: 72px 0 88px;
  }

  .contact-band::before {
    left: 22px;
    right: 22px;
  }
}

@media (max-width: 520px) {
  .nav-links {
    right: auto;
    left: min(276px, calc(100dvw - 108px));
  }
}

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }

  .reveal {
    opacity: 1;
    transform: none;
    transition: none;
  }

  .scroll-track span {
    animation: none;
  }

  .nav-links a,
  .contact-list a,
  .contact-links a {
    transition: none;
  }
}
