/* Pete Giblin Portfolio — Cargo fidelity pass */
/* ---------------------------------------------------------------------------
 * FONTS
 *
 * The live Cargo site uses ABC Diatype Plus Variable (Dinamo), which is
 * licensed THROUGH CARGO and is NOT redistributable. Nothing here may be
 * fetched from or linked to Cargo's hosted font CDN.
 *
 * --font-stack  = Geist (SIL OFL 1.1) standing in for Diatype Variable.
 *                 x-height normalised to Diatype's 0.482em via font-size-adjust.
 *                 Used by: body/bodycopy, h1, .caption, menu links (weight 800).
 * --display-stack = Alte Haas Grotesk (freeware, Yann Le Coroller).
 *                 Used by: .title, h2. Only Regular (400) and Bold (700) exist.
 * ------------------------------------------------------------------------- */
@font-face {
  font-family: "Geist";
  src: url("../fonts/Geist-Variable.woff2") format("woff2");
  font-style: normal; font-weight: 100 900; font-display: block;
}
@font-face {
  font-family: "Alte Haas Grotesk";
  src: url("../fonts/AlteHaasGrotesk-Regular.woff2") format("woff2");
  font-style: normal; font-weight: 400; font-display: block;
}
@font-face {
  font-family: "Alte Haas Grotesk";
  src: url("../fonts/AlteHaasGrotesk-Bold.woff2") format("woff2");
  font-style: normal; font-weight: 700; font-display: block;
}
:root {
  --font-stack: "Geist", Arial, sans-serif;
  --display-stack: "Alte Haas Grotesk", "Geist", Arial, sans-serif;
  --accent: #ff0000;
  --ink: #000000;
  --muted-ink: rgba(0, 0, 0, 0.85);
  --page-padding: 2rem;
  --page-gutter: 2rem;
  --mobile-gutter: 1rem;
  --mobile-scale: 1.04;
  --mobile-padding-offset: 0.5;
  --menu-header-height: 60px;
  --menu-height: 20vh;
  --burger-top: calc(10px + 2rem);
  --burger-right: calc(16px + 2rem);
}
* { box-sizing: border-box; }
html, body { min-height: 100%; margin: 0; padding: 0; }
html {
  font-size: var(--base-size, 1.44vh);
  touch-action: manipulation;
  position: relative;
}
html.mobile { font-size: calc(var(--base-size, 1.44vh) * var(--mobile-scale)); }
body {
  --swatch-1: rgba(0,0,0,.85);
  --swatch-2: rgba(0,0,0,.75);
  --swatch-3: rgba(0,0,0,.6);
  --swatch-4: rgba(0,0,0,.4);
  --swatch-5: rgba(0,0,0,.25);
  --swatch-6: #ff0000;
  background: #fff;
  color: #000000;
  font-family: var(--font-stack);
  font-size: 1.2rem;
  font-weight: 500;
  line-height: 1.2;
  letter-spacing: 0;
  display: block;
  font-variation-settings: 'slnt' 0, 'MONO' 0;
  font-size-adjust: ex-height 0.482;
  -moz-osx-font-smoothing: grayscale;
  -webkit-font-smoothing: antialiased;
  -webkit-text-size-adjust: none;
}
bodycopy {
  display: block; font-family: var(--font-stack); font-size: 1.2rem; font-weight: 500;
  line-height: 1.2; letter-spacing: 0; color: #000000;
  font-variation-settings: 'slnt' 0, 'MONO' 0;
}
a { color: inherit; }
a:active, .reel-item:active, .site-title:active { opacity: 0.7; }
button { color: inherit; font: inherit; }
button:focus-visible, a:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; }
img { display: block; max-width: 100%; }

.site-title {
  position: fixed; top: 0; left: 0; right: 0; z-index: 40;
  padding: 2rem; pointer-events: none; color: #000000;
  font-family: var(--display-stack); font-size: 1.75rem; font-weight: 700;
  line-height: 1.2; letter-spacing: 0; text-decoration: none; display: block;
}
.site-title img { width: 16.2%; height: auto; display: block; pointer-events: auto; }
.site-title:active { opacity: 0.7; }

.site-menu-toggle {
  position: fixed; top: var(--burger-top); right: var(--burger-right); z-index: 41;
  display: inline-flex; width: 28px; height: 18px; margin: 0; padding: 0;
  align-items: center; justify-content: center; border: 0; background: transparent; cursor: pointer;
}
.site-menu-toggle svg { width: 22px; height: 16px; display: block; }
.site-menu {
  position: fixed; left: 0; right: 0; top: var(--menu-header-height);
  height: min(var(--menu-height), calc(100vh - var(--menu-header-height)));
  z-index: 30; pointer-events: none;
}
.site-menu__backdrop { position: absolute; inset: 0; background: transparent; border: 0; padding: 0; }
.site-menu__panel {
  position: absolute; inset: 0; overflow: auto; background: #fff; color: #000;
  border: 0; box-shadow: none; transform: translateY(-100%); transition: transform 220ms ease;
  padding: 10px calc(var(--burger-right) + 8px) clamp(36px, 4vh, 72px) clamp(20px, 2vw, 32px);
}
[data-menu]:not([hidden]) { pointer-events: auto; }
[data-menu]:not([hidden]) .site-menu__panel { transform: translateY(0); }
.site-menu__list {
  display: grid; gap: clamp(8px, 1.4vh, 14px); max-width: 100%; margin: 0;
  padding: clamp(8px, 1.5vh, 16px) 0 0; justify-items: end; list-style: none;
  font-family: var(--font-stack); font-size: clamp(18px, 2.6vh, 34px); font-weight: 800; line-height: 1;
}
.site-menu__list li { margin: 0; padding: 0; }
.site-menu__list a { display: block; color: #000; text-align: right; text-decoration: none; }
.site-menu__list a.active { color: #ff0000; }

.page-content { width: 100%; padding: var(--page-padding); }
.reel { display: grid; row-gap: 2rem; column-gap: 0; padding-top: var(--header-height, 12.25rem); }
.reel-row { display: flex; align-items: center; justify-content: center; gap: 2rem; margin-inline: auto; }
.reel-item { min-width: 0; width: var(--reel-item-width, auto); flex: 0 0 var(--reel-item-width, auto); color: inherit; text-decoration: none; }
.reel-item img { width: 100%; height: auto; transition: opacity 150ms ease; }
.reel-item:hover img { opacity: 0.78; }
.caption {
  display: block; margin-top: .5em; margin-bottom: 2em; color: rgba(0, 0, 0, 0.85);
  font-family: var(--font-stack); font-size: 1.2rem; font-weight: 500; line-height: 1.2;
  letter-spacing: 0; font-variation-settings: 'slnt' 0, 'MONO' 0;
}
.caption a { color: rgba(0, 0, 0, 0.85); text-decoration: underline; }

.project-page .page-content, .about-page .page-content,
.contact-page .page-content, .thanks-page .page-content {
  padding-top: calc(var(--header-height, 12.25rem) + 2rem);
}
.column-set {
  display: grid; grid-template-columns: repeat(var(--units, 3), minmax(0, 1fr));
  gap: var(--column-gutter, 2rem); align-items: start; margin-bottom: 2rem;
}
.column-unit { min-width: 0; }
.column-unit > *:first-child { margin-top: 0; }
.project-title, .project-title h1, h1 {
  margin: 0; font-family: var(--font-stack); font-size: 1.75rem; font-weight: 400;
  line-height: 1; letter-spacing: -0.02em; color: #000000;
  font-variation-settings: 'slnt' 0, 'MONO' 0;
}
.project-copy a, bodycopy a, .about-copy a { color: #000000; text-decoration: none; }
h2 {
  margin: 0; font-family: var(--display-stack); font-size: 2rem; font-weight: 400;
  line-height: 1.1; letter-spacing: 0; color: #ff0000;
}
h2 a { color: #ff0000; text-decoration: none; }
.page a.active { color: #ff0000; }
.small-caps { font-variant: small-caps; text-transform: lowercase; }
.contact-heading {
  margin: 0;
  font: inherit;
  font-weight: 500;
  line-height: 1.2;
}
.contact-heading b { font-weight: 700; }
.contact-form-block, .thanks-block {
  width: 100%;
  max-width: 32rem;
  margin-inline: auto;
}
.contact-form-block { display: grid; gap: 1.5rem; }
.contact-form {
  display: grid;
  gap: 1.5rem;
  margin: 0;
}
.contact-form__field { display: grid; gap: .5rem; }
.contact-form__field label { display: block; }
.contact-form input:not([type="hidden"]),
.contact-form textarea {
  display: block;
  width: 100%;
  min-width: 0;
  padding: .8rem;
  border: 1px solid var(--ink);
  border-radius: 0;
  box-shadow: none;
  background: #fff;
  color: var(--ink);
  font: inherit;
  font-size: max(1.2rem, 16px);
  line-height: 1.2;
}
.contact-form textarea { min-height: 10rem; resize: vertical; }
.contact-form input:not([type="hidden"]):focus,
.contact-form textarea:focus {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
}
.contact-form__submit {
  width: fit-content;
  padding: .8rem 1.2rem;
  border: 1px solid var(--ink);
  border-radius: 0;
  box-shadow: none;
  background: var(--ink);
  color: #fff;
  cursor: pointer;
  font: inherit;
  font-size: max(1.2rem, 16px);
  line-height: 1.2;
}
.contact-form__submit:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
.contact-form__honeypot {
  position: absolute;
  left: -10000px;
  width: 1px;
  height: 1px;
  overflow: hidden;
}
.contact-form__honeypot label { display: block; }
.contact-form__visually-hidden {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}
.thanks-copy { max-width: 32rem; }
sub { position: relative; vertical-align: baseline; top: 0.3em; }
sup { position: relative; vertical-align: baseline; top: -0.4em; }
ol { padding: 0 0 0 2.5em; }
ul { padding: 0 0 0 2.0em; }
ul.lineated { margin: 0 0 0 3em; text-indent: -3em; }
blockquote { padding: 0 0 0 2em; }

.gallery-grid {
  display: flex; flex-wrap: wrap; align-items: flex-start; gap: var(--gallery-gutter, 1rem);
}
.gallery-grid > * {
  flex: 0 0 calc((100% - (var(--columns, 1) - 1) * var(--gallery-gutter, 1rem)) / var(--columns, 1));
  width: calc((100% - (var(--columns, 1) - 1) * var(--gallery-gutter, 1rem)) / var(--columns, 1));
  margin: 0;
}
.gallery-columnized { columns: 2; column-gap: 1rem; }
.gallery-columnized > * { width: 100%; margin: 0 0 1rem; break-inside: avoid; }
.gallery-grid figure, .gallery-columnized figure { margin: 0; }
.gallery-grid img, .gallery-columnized img { width: 100%; height: auto; }
.zoomable:active img { opacity: 0.7; }
.video { margin: 0; }
.video__frame { position: relative; width: 100%; aspect-ratio: 16 / 9; background: #f3f3f3; }
.video__frame iframe, .video__frame video { display: block; width: 100%; height: 100%; border: 0; }
.video--external { display: grid; place-items: center; border: 1px solid rgba(0, 0, 0, 0.12); }
.video--external a { padding: 1rem; text-decoration: none; }

@media (max-width: 768px) {
  :root {
    --menu-header-height: calc(52px + env(safe-area-inset-top));
    --menu-height: 30vh;
    --burger-top: calc(10px + 1rem);
    --burger-right: calc(12px + 1rem + env(safe-area-inset-right));
  }
  .site-menu-toggle { width: 22px; height: 16px; }
  .site-menu-toggle svg { width: 20px; height: 14px; }
  .site-menu__panel {
    padding-top: 8px; padding-right: calc(var(--burger-right) + 6px);
    padding-left: clamp(16px, 4vw, 24px); padding-bottom: clamp(28px, 4vh, 56px);
  }
  .site-menu__list { gap: clamp(8px, 1.8vh, 14px); }
  .site-menu__list a { font-size: clamp(16px, 2.4vh, 22px); line-height: 1.05; }
}
@media (max-width: 768px) and (orientation: landscape) {
  :root { --menu-height: 40vh; }
  .site-menu__list a { font-size: clamp(14px, 3vh, 20px); }
}

.mobile .page-content { padding: calc(var(--mobile-padding-offset, 1) * 2rem); }
.mobile .reel { row-gap: 1rem; }
.mobile .reel-row { display: block; margin: 0; }
.mobile .reel-item {
  display: block; width: 100%; flex: none; margin: 0;
}
.mobile .column-set { grid-template-columns: 1fr; }
.mobile .gallery-grid { gap: var(--mobile-gallery-gutter, 1rem); }
.mobile .gallery-grid > * { width: 100%; }
.mobile .gallery-columnized { columns: 1; column-gap: var(--mobile-gallery-gutter, 1rem); }
.mobile h1, .mobile .project-title, .mobile .project-title h1 { font-size: 3rem; }
.mobile .contact-heading { font-size: 1.2rem; }
.mobile bodycopy { font-size: 1.20rem; }
.mobile .project-page .page-content, .mobile .about-page .page-content,
.mobile .contact-page .page-content, .mobile .thanks-page .page-content {
  padding-top: calc(var(--header-height, 12.25rem) + 2rem);
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { scroll-behavior: auto !important; transition-duration: 0.01ms !important; }
}
