/* samz-site.com */

@font-face { font-family: "OCR-A"; src: url("../fonts/OCR-A.ttf") format("truetype"); font-weight: 400; font-style: normal; font-display: swap; }
@font-face { font-family: "Inter"; src: url("../fonts/Inter-Regular.woff2") format("woff2"); font-weight: 400; font-style: normal; font-display: swap; }
@font-face { font-family: "Inter"; src: url("../fonts/Inter-Medium.woff2") format("woff2"); font-weight: 500; font-style: normal; font-display: swap; }

:root {
  --read: "Inter", system-ui, -apple-system, "Segoe UI", Roboto, Arial, sans-serif;  /* readable body text; titles stay OCR-A */
  --bg: #000000;       /* black: main */
  --accent: #ff1f1f;   /* red: menu and accents */
  --white: #ffffff;    /* text */
  --muted: #fff;       /* body text is white (sam) */
  --frame: #1c1c1c;    /* dark grey: alternative accent */
  --line: #2a2a2a;     /* dark grey: lines */
  --menu: #242424;     /* grey menu bar */

  --gutter: clamp(20px, 4vw, 56px);
  --nav-h: 112px;
}

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

html { -webkit-text-size-adjust: 100%; }

body {
  margin: 0;
  background: var(--bg);
  color: var(--white);
  font-family: "OCR-A", "OCR A Std", "Courier New", monospace;
  font-size: 18px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}
body.menu-open { overflow: hidden; }

a { color: inherit; text-decoration: none; }
h1, h2, h3 { font-weight: 400; }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 4px; }
::selection { background: var(--accent); color: var(--bg); }

.wrap { width: 100%; padding: 0 var(--gutter); }

.skip-link { position: absolute; left: 12px; top: -60px; z-index: 200; padding: 10px 16px; background: var(--accent); color: var(--bg); }
.skip-link:focus { top: 12px; }

/* Header */

.site-header { position: sticky; top: 0; z-index: 50; background: var(--menu); }
.nav { height: var(--nav-h); display: grid; grid-template-columns: minmax(0, 1fr) auto minmax(0, 1fr); align-items: center; gap: 24px; }
.logo { grid-column: 2; font-size: clamp(24px, 2vw, 34px); color: var(--accent); text-decoration: line-through; text-decoration-thickness: 2px; white-space: nowrap; }
.nav-social { grid-column: 3; justify-self: end; display: flex; align-items: center; gap: clamp(14px, 1.4vw, 24px); margin: 0; padding: 0; list-style: none; }
.nav-social a { display: block; color: var(--accent); transition: color .2s; }
.nav-social a:hover { color: var(--white); }
.nav-social svg { display: block; width: clamp(22px, 1.8vw, 30px); height: clamp(22px, 1.8vw, 30px); }

.nav-links { display: flex; gap: clamp(20px, 2.4vw, 48px); margin: 0; padding: 0; list-style: none; }
.nav-links a { font-size: clamp(20px, 1.8vw, 32px); color: var(--accent); text-decoration-thickness: 2px; text-underline-offset: 8px; transition: color .2s; }
.nav-links a:hover { color: var(--white); }
.nav-links a[aria-current="page"] { text-decoration-line: underline; }

.menu-toggle { display: none; width: 48px; height: 48px; margin-right: -12px; padding: 0; align-items: center; justify-content: center; background: none; border: 0; color: var(--accent); cursor: pointer; }
.menu-toggle svg { width: 32px; height: 32px; }
.nav .menu-toggle { grid-column: 3; justify-self: end; }

/* Full-page mobile menu */

.mobile-menu {
  position: fixed; inset: 0; z-index: 100;
  display: flex; flex-direction: column;
  padding: 0 var(--gutter) 40px;
  background: var(--menu);
  opacity: 0; visibility: hidden;
  transition: opacity .25s, visibility 0s .25s;
}
.mobile-menu.is-open { opacity: 1; visibility: visible; transition: opacity .25s; }
.mobile-menu__top { height: var(--nav-h); flex-shrink: 0; display: flex; align-items: center; justify-content: flex-end; }
.mobile-menu nav { flex-grow: 1; display: flex; align-items: center; justify-content: center; padding-bottom: var(--nav-h); }
.mobile-menu__links { margin: 0; padding: 0; list-style: none; text-align: center; }
.mobile-menu__links a { display: block; padding: 10px 0; font-size: clamp(40px, 13vw, 80px); line-height: 1.1; color: var(--accent); text-decoration-thickness: 3px; text-underline-offset: 10px; }
.mobile-menu__links a[aria-current="page"] { text-decoration-line: underline; }
.mobile-menu .nav-social { display: flex; justify-content: center; gap: 28px; }
.mobile-menu .nav-social svg { width: 30px; height: 30px; }

@media (max-width: 1100px) {   /* below this the nav, logo and icons don't fit on one line */
  :root { --nav-h: 80px; }
  .nav-links, .nav-social { display: none; }
  .menu-toggle { display: inline-flex; }
}

/* Type */

.title { margin: 0; line-height: 1; }
.title--xl { font-size: clamp(64px, 13vw, 184px); }
.title--lg { font-size: clamp(30px, 7vw, 96px); overflow-wrap: anywhere; }

.muted { color: var(--muted); }

/* Layout */

.page { padding-top: clamp(48px, 9vw, 120px); padding-bottom: clamp(80px, 11vw, 160px); }
.page > .title { margin-bottom: clamp(48px, 7vw, 96px); }

/* Projects */

.grid { display: grid; gap: clamp(48px, 5vw, 64px) clamp(20px, 3vw, 40px); }
.grid--2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.grid--3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }   /* 3 projects per row */
@media (max-width: 900px) { .grid--3 { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 560px) { .grid--3 { grid-template-columns: minmax(0, 1fr); } }

.card { display: flex; flex-direction: column; gap: 16px; }
.frame { aspect-ratio: 4 / 3; background: var(--frame); border: 1px solid var(--line); transition: border-color .2s; }
.card:hover .frame { border-color: var(--accent); }
.card__row { display: flex; align-items: baseline; justify-content: space-between; gap: 16px; }
.card__title { margin: 0; font-size: clamp(20px, 2vw, 24px); }
.card__meta { font-size: 15px; color: var(--muted); white-space: nowrap; }

.home { min-height: calc(100vh - var(--nav-h) - 88px); min-height: calc(100svh - var(--nav-h) - 88px); }

/* About */

.about { display: grid; grid-template-columns: minmax(0, 5fr) minmax(0, 7fr); gap: clamp(40px, 7vw, 112px); align-items: start; }
.about .frame { aspect-ratio: 4 / 5; }
.about p { margin: 0 0 1.2em; font-family: var(--read); font-size: clamp(18px, 1.5vw, 26px); line-height: 1.65; }

/* Contact */

.contact p { margin: 0 0 clamp(40px, 6vw, 72px); font-family: var(--read); font-size: clamp(18px, 1.5vw, 26px); color: var(--muted); }
.email { display: inline-block; font-size: clamp(28px, 5vw, 64px); line-height: 1.1; word-break: break-word; border-bottom: 3px solid var(--accent); padding-bottom: 6px; transition: color .2s; }
.email:hover { color: var(--accent); }
.socials { display: flex; flex-wrap: wrap; gap: 12px 40px; margin: clamp(48px, 7vw, 88px) 0 0; padding: 0; list-style: none; }
.socials a { font-size: 20px; color: var(--muted); transition: color .2s; }
.socials a:hover { color: var(--accent); }

/* Footer */

.site-footer .wrap { padding-top: 32px; padding-bottom: 32px; font-size: 15px; color: var(--muted); }

/* Responsive */

@media (max-width: 900px) {
  .about { grid-template-columns: minmax(0, 1fr); }
  .about .frame { max-width: 460px; }
}
@media (max-width: 700px) {
  body { font-size: 17px; }
  .grid--2 { grid-template-columns: minmax(0, 1fr); }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { transition: none !important; }
}

/* Images */

img { display: block; max-width: 100%; height: auto; }
.frame { overflow: hidden; }
.frame img { width: 100%; height: 100%; object-fit: cover; transition: opacity .3s; }
a.card:hover .frame img { opacity: .85; }
a.card:hover .card__title { color: var(--accent); }
.card__title { transition: color .2s; }
.home .frame { aspect-ratio: 3 / 2; }

/* Project pages */



.project-nav { display: flex; justify-content: space-between; gap: 24px; margin-top: clamp(48px, 7vw, 96px); padding-top: 24px; border-top: 1px solid var(--line); }
.project-nav a { color: var(--accent); }
.project-nav a:hover { color: var(--white); }


/* ---- v4: clean URLs, justified galleries, lightbox ---- */

.visually-hidden { position: absolute !important; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }

.label { margin: 0 0 14px; font-size: clamp(15px, 1.2vw, 20px); letter-spacing: .12em; text-transform: uppercase; color: var(--accent); }

.project .title { margin-bottom: clamp(32px, 5vw, 64px); }
.project-text { margin: 0 0 clamp(40px, 6vw, 80px); }
.project-text p { margin: 0 0 1.2em; color: var(--white); font-family: var(--read); font-size: clamp(18px, 1.5vw, 26px); line-height: 1.65; }
.project-text .label + p { margin-bottom: 2em; }
.gallery + .project-text, .gallery + .credits { margin-top: clamp(48px, 7vw, 96px); }

/* Justified rows: each image grows by its aspect ratio, so rows stay in order */
.gallery { display: flex; flex-wrap: wrap; gap: clamp(8px, 1vw, 16px); }
.gallery::after { content: ""; flex-grow: 999999; }
.gallery__item { display: block; margin: 0; flex-grow: calc(var(--r) * 100); flex-basis: calc(var(--r) * 300px); background: var(--frame); overflow: hidden; }
.gallery__item img { width: 100%; height: auto; aspect-ratio: var(--r); object-fit: cover; transition: opacity .3s; }
.gallery__item:hover img { opacity: .85; }
@media (max-width: 700px) {
  .gallery__item { flex-basis: calc(var(--r) * 220px); }
}

.credits { margin-top: clamp(48px, 7vw, 96px); }
.credits dl { margin: 0; }
.credits dl div { display: grid; grid-template-columns: minmax(0, 2fr) minmax(0, 3fr); gap: 8px 32px; padding: 16px 0; border-top: 1px solid var(--line); }
.credits dt { color: var(--white); font-size: clamp(16px, 1.4vw, 24px); }
.credits dd { margin: 0; font-family: var(--read); font-size: clamp(16px, 1.3vw, 22px); }
@media (max-width: 700px) { .credits dl div { grid-template-columns: minmax(0, 1fr); } }

/* lightGallery in the site's font and colours */
.lg-backdrop { background-color: #000; }
.lg-outer, .lg-outer .lg-sub-html { font-family: "OCR-A", "Courier New", monospace; }
.lg-outer .lg-sub-html { background: none; }
.lg-outer .lg-thumb-outer { background-color: #000; }
.lg-outer .lg-thumb-item.active, .lg-outer .lg-thumb-item:hover { border-color: var(--accent); }
.lg-toolbar .lg-icon:hover, .lg-next:hover:not(.disabled), .lg-prev:hover:not(.disabled) { color: var(--accent); }
.lg-counter { color: var(--muted); }

/* Once the script has sized every photo, use those exact sizes */
.gallery.is-justified .gallery__item { flex: none; }
.gallery.is-justified .gallery__item img { width: 100%; height: 100%; aspect-ratio: auto; object-fit: cover; }
@media (max-width: 700px) {
  .gallery { gap: 6px; }
}

/* ---- Home tiles: sam's finished covers, title included in the image ---- */
.tiles { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: clamp(6px, .6vw, 10px); }
.tile { display: block; aspect-ratio: 16 / 9; overflow: hidden; background: var(--frame); }
.tile img { width: 100%; height: 100%; object-fit: cover; transition: transform .8s ease, opacity .4s ease; }
.tile:hover img, .tile:focus-visible img { transform: scale(1.03); opacity: .9; }
@media (max-width: 700px) {
  .tiles { grid-template-columns: minmax(0, 1fr); }
}
@media (hover: none) { .tile:hover img { transform: none; opacity: 1; } }
.tile--cat { aspect-ratio: 4 / 3; }          /* category covers on the Projects page */
.grid--tiles { gap: clamp(6px, .6vw, 10px); }

/* ---- Video work: click-to-play YouTube embeds ---- */

.videos { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 520px), 1fr)); gap: clamp(32px, 4vw, 56px) clamp(12px, 1.6vw, 24px); }
.video { margin: 0; }
.video__play, .video iframe { position: relative; display: block; width: 100%; aspect-ratio: 16 / 9; border: 0; padding: 0; background: var(--frame); cursor: pointer; overflow: hidden; }
.video__play img { width: 100%; height: 100%; object-fit: cover; transition: transform .6s ease, opacity .3s; }
.video__icon { position: absolute; left: 50%; top: 50%; width: 76px; height: 54px; transform: translate(-50%, -50%); display: flex; align-items: center; justify-content: center; border: 2px solid var(--white); background: rgba(0, 0, 0, .55); color: var(--white); transition: background-color .3s, border-color .3s; }
.video__icon svg { width: 100%; height: 100%; }
.video__play:hover img, .video__play:focus-visible img { transform: scale(1.03); opacity: .85; }
.video__play:hover .video__icon, .video__play:focus-visible .video__icon { background: var(--accent); border-color: var(--accent); }
.video figcaption { margin-top: 14px; font-family: var(--read); font-size: clamp(15px, 1.3vw, 18px); }

/* Normal cursor everywhere (no zoom/grab cursors from the lightbox) */
.lg-outer, .lg-outer .lg-object, .lg-outer .lg-item, .lg-outer.lg-grab img.lg-object, .lg-outer.lg-grabbing img.lg-object,
.lg-outer.lg-zoomed .lg-object, .lg-outer .lg-img-wrap, .lg-outer .lg-image { cursor: default !important; }
.lg-outer button, .lg-outer .lg-thumb-item { cursor: pointer !important; }

/* Phones: no prev/next arrows in the lightbox, swipe instead */
@media (max-width: 700px), (hover: none) and (pointer: coarse) {
  .lg-outer .lg-prev, .lg-outer .lg-next { display: none !important; }
}

/* ---- Web design case studies: full width, compact ---- */
.case__top { display: flex; flex-wrap: wrap; align-items: baseline; justify-content: space-between; gap: 12px 40px; margin: 0 0 clamp(20px, 2.4vw, 36px); }
.case__lede { margin: 0; flex: 1 1 520px; font-family: var(--read); font-size: clamp(18px, 1.5vw, 26px); line-height: 1.5; }
.case__visit { flex: none; color: var(--accent); font-size: clamp(18px, 1.6vw, 28px); border-bottom: 2px solid var(--accent); }
.case__visit:hover { color: var(--white); border-color: var(--white); }
.shot { display: block; position: relative; border: 1px solid var(--line); background: var(--frame); overflow: hidden; }
.shot img { width: 100%; height: auto; transition: opacity .3s; }
.shot:hover img { opacity: .88; }
.shot__bar { display: flex; gap: 6px; padding: 7px 10px; background: var(--frame); border-bottom: 1px solid var(--line); }
.shot__bar i { width: 7px; height: 7px; border-radius: 50%; background: #3a3a3a; }
.case__grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: clamp(18px, 2vw, 32px) clamp(10px, 1.2vw, 20px); align-items: start; }
.case__fig { margin: 0; }
.case__fig--hero, .case__fig--phones { grid-column: span 2; }
.case__fig h2 { margin: 10px 0 0; font-size: clamp(16px, 1.3vw, 22px); font-weight: 400; color: var(--accent); }
.case__fig p { margin: 2px 0 0; font-family: var(--read); font-size: clamp(14px, 1.05vw, 18px); line-height: 1.4; }
.case__row { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: clamp(6px, .8vw, 14px); }
.shot--phone { border-radius: 12px; }
@media (max-width: 1100px) {
  .case__grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 700px) {
  .case__fig p { display: none; }
  .case__fig h2 { font-size: 15px; }
}
