/* alonsorobots.com — self-hosted recreation of the Squarespace 7.1 site.
   Measurements in comments were taken from the live Squarespace site (see tools/). */

@font-face { font-family: "Hanken Grotesk"; font-style: normal; font-weight: 500; font-display: swap; src: url(/assets/fonts/hanken-grotesk-latin-500-normal.woff2) format("woff2"); }
@font-face { font-family: "Hanken Grotesk"; font-style: italic; font-weight: 500; font-display: swap; src: url(/assets/fonts/hanken-grotesk-latin-500-italic.woff2) format("woff2"); }
@font-face { font-family: "Hanken Grotesk"; font-style: normal; font-weight: 700; font-display: swap; src: url(/assets/fonts/hanken-grotesk-latin-700-normal.woff2) format("woff2"); }
@font-face { font-family: "Hanken Grotesk"; font-style: italic; font-weight: 700; font-display: swap; src: url(/assets/fonts/hanken-grotesk-latin-700-italic.woff2) format("woff2"); }
@font-face { font-family: "Archivo Black"; font-style: normal; font-weight: 400; font-display: swap; src: url(/assets/fonts/archivo-black-latin-400-normal.woff2) format("woff2"); }

:root {
  /* Squarespace site settings */
  --sqs-site-gutter: 6vw;
  --sqs-mobile-site-gutter: 6vw;
  --sqs-site-max-width: 1400px;
  --gutter: max(6vw, (100vw - 1400px) / 2);   /* left/right inset of all content */
  --vw: min(1vw, 14px);                         /* text scales with viewport, capped at 1400px */
  /* Proxima Nova is licensed to Squarespace; Hanken Grotesk was the closest free match by
     measured glyph widths. If you add an Adobe Fonts kit for proxima-nova it takes over. */
  --font-body: proxima-nova, "Hanken Grotesk", "Helvetica Neue", Arial, sans-serif;
  --font-heading: "Archivo Black", "Arial Black", sans-serif;
  --fs-title: calc(15px + 1.2 * var(--vw));   /* 31.8px @1440 */
  --fs-large: calc(15px + 0.6 * var(--vw));   /* 23.4px @1440 */
  --fs-normal: calc(15px + 0.24 * var(--vw)); /* 18.36px @1440 */
  --fs-small: 15px;
  --header-pad: 2vw;
  --header-h: calc(2 * var(--header-pad) + 1.4 * var(--fs-title));
  --ease-std: cubic-bezier(0.4, 0, 0.2, 1);
  --gallery-bg: rgb(238, 237, 235);
  /* Squarespace theme colour channels, referenced by per-block overlay styles */
  --black-hsl: 0, 0%, 0%;
  --white-hsl: 0, 0%, 100%;
}
@media (max-width: 767px) {
  :root { --fs-title: 25.8px; --fs-large: 20.4px; --fs-normal: 17.16px; }
}
/* burger layout: header padding is the site gutter; height = max(37px burger, title line).
   Squarespace uses it below 800px, and on touch devices (Modernizr "touch") up to 1024px. */
@media (max-width: 799px) {
  :root { --header-pad: 6vw; --header-h: calc(12vw + max(37px, 1.4 * var(--fs-title))); }
}
@media (max-width: 1024px) {
  html.touch { --header-pad: 6vw; --header-h: calc(12vw + max(37px, 1.4 * var(--fs-title))); }
}

*, *::before, *::after { box-sizing: border-box; }
html { font-size: 15px; -webkit-text-size-adjust: 100%; }
body {
  margin: 0; background: #fff; color: #000;
  font-family: var(--font-body); font-weight: 500; font-size: var(--fs-normal); line-height: 1.8;
  letter-spacing: -0.01em;   /* Hanken runs ~1-2% wider than Proxima Nova; tuned by tools/geometry.mjs */
  -webkit-font-smoothing: antialiased; -moz-osx-font-smoothing: grayscale;
  overflow-x: hidden;
}
img, video { display: block; max-width: 100%; }
a { color: inherit; }
button { font: inherit; color: inherit; background: none; border: 0; padding: 0; cursor: pointer; }

/* ---------- scroll fade-in (Squarespace "fade" site animation) ----------
   opacity 0 -> 1 over 1.5s ease; delay = DOM index * (0.6s / count); set in site.js */
.js [data-fade] { opacity: 0; transition: opacity 1.5s ease var(--fade-delay, 0s); }
.js [data-fade].is-in { opacity: 1; }
@media (prefers-reduced-motion: reduce) { .js [data-fade] { opacity: 1; transition: none; } }

/* ---------- header ---------- */
.header-skip-link {
  position: absolute; left: -9999px; top: 20px; z-index: 100;
  background: #000; color: #fff; font-family: var(--font-heading); font-size: 13.272px;
  padding: 12px 28.5px; border-radius: 300px; text-decoration: none;
}
.header-skip-link:focus { left: 20px; }
.header { position: absolute; top: 0; left: 0; right: 0; z-index: 20; }
.header-inner {
  display: flex; align-items: center; justify-content: space-between;
  padding: var(--header-pad) var(--gutter);
}
.header-title { position: relative; z-index: 2; }
.header-title a {
  display: block; font-family: var(--font-heading); font-weight: 400; letter-spacing: normal;
  font-size: var(--fs-title); line-height: 1.4; text-decoration: none; white-space: nowrap;
}
.header-nav { display: flex; flex-wrap: wrap; justify-content: flex-end; margin-left: 2em; }
.header-nav-item { margin-left: 1.5vw; }        /* measured gap: 15px @1024, 22px @1440, 29px @1920 */
.header-nav-item:first-child { margin-left: 0; }
.header-nav-item a {
  display: block; font-size: var(--fs-normal); line-height: 1.8; text-decoration: none; white-space: nowrap;
  padding: 0.1em 0;
}
/* active page: 1px line drawn with a background gradient, 0.1em above the box bottom */
.header-nav-item--active a {
  background-image: linear-gradient(currentColor, currentColor);
  background-size: 1px 1px; background-repeat: repeat-x;
  background-position: 0 calc(100% - 0.1em);
}

/* burger: two 35px lines that rotate into a 30px "X" */
.header-burger-btn { display: none; position: relative; z-index: 2; width: 47px; height: 37px; margin-right: -6px; }
.burger-box { position: absolute; left: 6px; top: 0; width: 35px; height: 37px; }
.burger-box > span {
  position: absolute; left: 0; top: 18px; width: 35px; height: 1px; background: currentColor;
  transition: transform 0.25s cubic-bezier(0.2, 0.6, 0.3, 1), width 0.25s cubic-bezier(0.2, 0.6, 0.3, 1);
}
.top-bun { transform: translateY(-5.5px); }
.bottom-bun { transform: translateY(5.5px); }
.menu-open .burger-box > span { width: 30px; left: 2.5px; }
.menu-open .top-bun { transform: rotate(-135deg); }
.menu-open .bottom-bun { transform: rotate(135deg); }

.header-menu {
  position: fixed; inset: 0; z-index: 15; background: #fff;
  display: flex; align-items: center; justify-content: center; text-align: center;
  padding-top: var(--header-h);   /* links are centred in the space below the header */
  opacity: 0; visibility: hidden;
  transition: visibility 0.6s var(--ease-std), opacity 0.4s var(--ease-std);
}
.menu-open .header-menu { opacity: 1; visibility: visible; }
.menu-open .header { position: fixed; }
.menu-open, .menu-open body { overflow: hidden; }
.header-menu-nav-item a { display: block; font-size: 33.15px; line-height: 1; padding: 0.36em 0; text-decoration: none; }  /* 57px pitch */

@media (max-width: 799px) {
  .header-nav { display: none; }
  .header-burger-btn { display: block; }
}
@media (max-width: 1024px) {
  .touch .header-nav { display: none; }
  .touch .header-burger-btn { display: block; }
}

/* ---------- sections ---------- */
/* page content gets its own stacking context so Squarespace's per-block z-indexes (30+ on
   Research) can never rise above the header (20) or the mobile menu (15) */
.sections { position: relative; z-index: 0; isolation: isolate; }
.page-section { position: relative; display: flex; flex-direction: column; justify-content: center; }
.content-wrapper { width: 100%; padding: var(--sec-pad, 0.1vw) 0; }
.page-section:first-child .content-wrapper { padding-top: calc(var(--header-h) + var(--sec-pad, 0.1vw)); }
.section-height--custom { --sec-pad: 0.1vw; }
.section-height--small { --sec-pad: 3.3vw; min-height: 33vh; }
.content { width: 100%; }

/* Squarespace Fluid Engine base. Per-page grid templates + block grid-areas are inlined. */
.fluid-engine { display: grid; position: relative; }
.fe-block { position: relative; min-width: 0; }
.fe-block > .sqs-block { display: flex; flex-direction: column; height: 100%; width: 100%; }

/* text blocks */
.sqs-html-content { width: 100%; }
.sqs-html-content p { margin: 1rem 0; font-size: var(--fs-normal); line-height: 1.8; }
.sqs-html-content > :first-child { margin-top: 0; }
.sqs-html-content > :last-child { margin-bottom: 0; }
.sqs-html-content .sqsrte-large { font-size: var(--fs-large); }
.sqs-html-content .sqsrte-small { font-size: var(--fs-small); }
.sqs-html-content strong { font-weight: 700; }
.sqs-html-content a {
  text-decoration: underline; text-decoration-thickness: 1px; text-underline-offset: 0.2em;
}
/* static "underline" text highlight (Photography intro): 0.15em square-capped stroke */
.sqsrte-text-highlight {
  background-image: linear-gradient(currentColor, currentColor);
  background-repeat: no-repeat; background-size: 100% 0.15em; background-position: 0 88%;
  padding-bottom: 0.1em;
}

/* image blocks */
.image-block .sqs-block-alignment-wrapper {
  display: flex; align-items: center; justify-content: center; width: 100%; height: 100%;
}
.fluid-image-container { position: relative; width: 100%; height: 100%; overflow: hidden; }
/* absolutely positioned so an image never stretches its grid rows (rows come from the grid) */
.fluid-image-container img, .fluid-image-container video { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; object-position: var(--image-component-focal-point, 50% 50%); }
.image-block[data-fit="contain"] .fluid-image-container img, .image-block[data-fit="contain"] .fluid-image-container video { object-fit: contain; }
.image-link { display: block; width: 100%; height: 100%; }
.fluidImageOverlay {
  position: absolute; inset: 0; pointer-events: none;
  background: var(--image-block-overlay-color, transparent);
  opacity: var(--image-component-overlay-opacity, 0);
  mix-blend-mode: var(--image-component-overlay-blend-mode, normal);
}

/* home-page section tiles: whole block fades to .6 (white page shows through) */
.image-block.hover-fade { transition: opacity 0.5s ease-in-out; }
.image-block.hover-fade:hover { opacity: 0.6; }

/* button blocks: black pill, Archivo Black 15px, 80% opacity on hover */
.button-block { justify-content: center; }
.button-container { display: flex; width: 100%; }
.button-container.align-center { justify-content: center; }
.button-container.align-left { justify-content: flex-start; }
.button-container.align-right { justify-content: flex-end; }
.sqs-button {
  display: inline-block; background: #000; color: #fff; text-decoration: none;
  font-family: var(--font-heading); font-weight: 400; font-size: 15px; line-height: 1.4; letter-spacing: normal;
  padding: 12px 28.5px; border-radius: 300px; text-align: center;
  transition: opacity 0.1s linear;
}
.sqs-button:hover { opacity: 0.8; }

/* video blocks (Plyr, the same player Squarespace uses) */
.video-block { justify-content: center; }
.video-wrapper { width: 100%; aspect-ratio: 16 / 9; background: #000; container-type: inline-size; }
.video-wrapper video { width: 100%; height: 100%; }
.video-block .plyr {
  --plyr-color-main: #fff;
  --plyr-video-control-color: rgb(231, 231, 231);
  --plyr-video-control-color-hover: #fff;
  --plyr-video-control-background-hover: transparent;
  --plyr-control-icon-size: 24px;
  --plyr-font-family: Clarkson, Arial, sans-serif;
  --plyr-font-size-time: 12px;
  --plyr-range-thumb-height: 0px;
  --plyr-range-track-height: 3px;
  --plyr-video-range-track-background: rgba(255, 255, 255, 0.5);
  --plyr-video-progress-buffered-background: rgba(255, 255, 255, 0.35);
  --plyr-tooltip-background: #fff;
  --plyr-tooltip-color: #000;
  height: 100%;
}
/* measured layout: row of [time ... mute settings fullscreen], progress bar on its own row */
.video-block .plyr--video .plyr__controls {
  flex-wrap: wrap; padding: 0 20px 16.5px; gap: 0; background: none;
  font-weight: 400;
}
.video-block .plyr--video .plyr__controls .plyr__time { padding: 0 3px 0 0; font-weight: 400; line-height: 20px; }
.video-block .plyr--video .plyr__controls .plyr__time + .plyr__time::before { content: "\2044"; margin-right: 3px; }
.video-block .plyr--video .plyr__controls .plyr__time + .plyr__time { margin-right: auto; }
.video-block .plyr--video .plyr__controls > .plyr__controls__item:first-child { margin-right: 0; }
/* bottom shade: measured ~210px tall on a 593px video, 0 -> ~80% black */
.video-block .plyr--video .plyr__video-wrapper::after {
  content: ""; position: absolute; z-index: 2; left: 0; right: 0; bottom: 0; height: 35.4%; pointer-events: none;
  background: linear-gradient(rgba(0, 0, 0, 0), rgba(0, 0, 0, 0.8)); transition: opacity 0.4s ease-in-out;
}
.video-block .plyr--hide-controls .plyr__video-wrapper::after { opacity: 0; }
.video-block .plyr--video .plyr__controls .plyr__control { padding: 0; border-radius: 4px; }
.video-block .plyr--video .plyr__controls > .plyr__control,
.video-block .plyr--video .plyr__controls > .plyr__controls__item:not(.plyr__time):not(.plyr__progress__container) { margin-left: 20px; }
.video-block .plyr--video .plyr__controls .plyr__control svg { width: 24px; height: 24px; }
.video-block .plyr--video .plyr__controls .plyr__progress__container { order: 1; flex: 1 0 100%; margin: 3px 0 0; padding: 0; height: 14px; }
.video-block .plyr--video .plyr__controls .plyr__progress { margin: 0 6px; height: 14px; }
.video-block .plyr--video .plyr__progress input[type=range] { margin: 0 -6px; width: calc(100% + 12px); }
.video-block .plyr--video .plyr__progress input[type=range]::-webkit-slider-thumb { opacity: 0; }
.video-block .plyr--video .plyr__progress input[type=range]::-moz-range-thumb { opacity: 0; }
/* volume: vertical dark pill above the mute button, shown on hover */
.video-block .plyr--video .plyr__volume { position: relative; min-width: 0; max-width: none; width: 24px; }
.video-block .plyr--video .plyr__volume input[type=range] {
  position: absolute; left: -31px; bottom: 60px; width: 86px; height: 28px; margin: 0; padding: 0 10px;
  transform: rotate(-90deg); transform-origin: center; border-radius: 6px;
  background: rgba(38, 38, 38, 0.9); color: #fff;
  --plyr-range-thumb-height: 0px; --plyr-range-track-height: 3px;
  opacity: 0; visibility: hidden; transition: opacity 0.2s, visibility 0.2s;
}
.video-block .plyr--video .plyr__volume:hover input[type=range], .video-block .plyr--video .plyr__volume:focus-within input[type=range] { opacity: 1; visibility: visible; }
.video-block .plyr--video .plyr__control--overlaid {
  width: 120px; height: 120px; padding: 15px; border-radius: 100%;
  background: rgba(0, 0, 0, 0.5); opacity: 0.9;
  display: flex; align-items: center; justify-content: center;
  transition: background 0.3s, opacity 0.3s;
}
.video-block .plyr--video .plyr__control--overlaid svg { width: 90px; height: 90px; left: 0; }
.video-block .plyr--video .plyr__control--overlaid:hover, .video-block .plyr--video .plyr__control--overlaid:focus-visible { background: rgba(0, 0, 0, 0.7); opacity: 1; }
.video-block .plyr--video .plyr__menu__container { font-family: var(--plyr-font-family); }


/* Squarespace scales the player chrome with the player's own width (measured):
   >=850px: 120px play button; 480-849px: 80px (48px icon); <480px: 44px (30px icon),
   tighter padding and no settings button. Duration is always shown. */
.video-block .plyr--video .plyr__controls .plyr__time + .plyr__time { display: block; }
@container (max-width: 849px) {
  .video-block .plyr--video .plyr__control--overlaid { width: 80px; height: 80px; padding: 16px; }
  .video-block .plyr--video .plyr__control--overlaid svg { width: 48px; height: 48px; }
}
@container (max-width: 479px) {
  .video-block .plyr--video .plyr__control--overlaid { width: 44px; height: 44px; padding: 7px; }
  .video-block .plyr--video .plyr__control--overlaid svg { width: 30px; height: 30px; }
  .video-block .plyr--video .plyr__controls { padding: 0 10px 3.5px; }
  .video-block .plyr--video .plyr__controls .plyr__menu { display: none; }
}

/* ---------- photography gallery (masonry, 2 columns at every width) ---------- */
.gallery-section { background: var(--gallery-bg); padding: 6vw var(--gutter); }
.gallery-masonry { --gap: calc((100vw - 2 * var(--gutter)) * 0.01); display: flex; gap: var(--gap); align-items: flex-start; }
.gallery-col { flex: 1 1 0; min-width: 0; display: flex; flex-direction: column; gap: var(--gap); }
.gallery-masonry-item { display: block; cursor: pointer; }
.gallery-masonry-item img { width: 100%; height: 100%; object-fit: cover; }

/* ---------- lightbox ---------- */
.gallery-lightbox { position: fixed; inset: 0; z-index: 9999; opacity: 0; visibility: hidden; transition: opacity 0.4s ease, visibility 0s linear 0.4s; }
.gallery-lightbox.is-open { opacity: 1; visibility: visible; transition: opacity 0.4s ease; }
.gallery-lightbox.is-closing { transition: none; }
/* Changed from the original's light translucent backdrop (owner request): very dark grey,
   barely-there radial vignette. */
.gallery-lightbox-background {
  position: absolute; inset: 0;
  background: radial-gradient(ellipse at center, #1b1b1b 0%, #181818 55%, #121212 100%);
}
.gallery-lightbox-list { position: absolute; top: 7vh; bottom: 7vh; left: calc(3vw + 56px); right: calc(3vw + 56px); }
.gallery-lightbox-item { position: absolute; inset: 0; margin: 0; opacity: 0; pointer-events: none; }
.gallery-lightbox-item.is-active { opacity: 1; }
.gallery-lightbox { touch-action: pan-y pinch-zoom; }
.gallery-lightbox-item img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: contain; }
.gallery-lightbox-item .lb-full { opacity: 0; transition: opacity 0.25s ease; }
.gallery-lightbox-item .lb-full.is-loaded { opacity: 1; }
.gallery-lightbox-item.snap-back { transition: transform 0.2s ease-out; }
.gallery-lightbox-item.enter-next { animation: lb-enter-next 0.28s ease-out; }
.gallery-lightbox-item.enter-prev { animation: lb-enter-prev 0.28s ease-out; }
@keyframes lb-enter-next { from { transform: translateX(12%); opacity: 0; } to { transform: none; opacity: 1; } }
@keyframes lb-enter-prev { from { transform: translateX(-12%); opacity: 0; } to { transform: none; opacity: 1; } }
@media (prefers-reduced-motion: reduce) { .gallery-lightbox-item.enter-next, .gallery-lightbox-item.enter-prev { animation: none; } }
/* "loading" pill, shown only when the full-size photo is slow */
.gallery-lightbox-loading {
  position: absolute; left: 50%; bottom: 3vh; transform: translateX(-50%); z-index: 3;
  display: flex; align-items: center; gap: 8px; padding: 6px 14px 6px 10px; border-radius: 999px;
  background: rgba(255, 255, 255, 0.1); color: rgba(255, 255, 255, 0.85);
  font-size: 13px; line-height: 1.4; letter-spacing: 0; pointer-events: none;
  opacity: 0; transition: opacity 0.2s ease;
}
.gallery-lightbox.is-loading .gallery-lightbox-loading { opacity: 1; }
.lb-spinner { width: 14px; height: 14px; border-radius: 50%; border: 2px solid rgba(255, 255, 255, 0.25); border-top-color: #fff; animation: lb-spin 0.8s linear infinite; }
@keyframes lb-spin { to { transform: rotate(360deg); } }
.gallery-lightbox-controls { position: absolute; top: 7vh; bottom: 7vh; left: 3vw; right: 3vw; display: flex; }
.gallery-lightbox-control { flex: 1 1 50%; display: flex; align-items: center; cursor: pointer; }
.gallery-lightbox-control[data-next] { justify-content: flex-end; }
.gallery-lightbox-control-btn, .gallery-lightbox-close-btn { opacity: 0.75; transition: opacity 0.6s var(--ease-std); }
.gallery-lightbox-control-btn:hover, .gallery-lightbox-close-btn:hover,
.gallery-lightbox-control-btn:focus-visible, .gallery-lightbox-close-btn:focus-visible { opacity: 1; }
.gallery-lightbox-control-btn { width: 13px; height: 24px; }
.gallery-lightbox-control-btn svg { width: 13px; height: 24px; stroke: #fff; stroke-width: 1px; overflow: visible; }
.gallery-lightbox-close-btn { color: #fff; position: absolute; top: 22px; right: 22px; z-index: 2; padding: 1px 6px; border-radius: 2.25px; }
.gallery-lightbox-close-btn svg { display: block; width: 20px; height: 20px; stroke: #fff; stroke-width: 4px; }
@media (max-width: 767px) {
  .gallery-lightbox-list { top: 43px; bottom: 44px; left: var(--gutter); right: var(--gutter); }
  .gallery-lightbox-controls { left: 0; right: 0; top: 43px; bottom: 44px; }
  .gallery-lightbox-control-btn { display: none; }
  .gallery-lightbox-loading { bottom: 6px; }
}
