/* ============================================================
   Nick Sanders — site styles
   ============================================================ */

:root {
  --bg: #121212;
  --bg-raised: #181818;
  --line: #2e2e2e;
  --text: #f4f4f2;
  --muted: #a3a3a0;
  --light: #f7f7f5;
  --ink: #111;
  --accent: #e2483f;

  --display: "Anton", "Bebas Neue", Impact, "Arial Narrow", sans-serif;
  --body: "Inter", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;

  --gutter: clamp(16px, 3.2vw, 40px);
  --max: 1440px;
  --radius: 6px;
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: var(--body);
  font-size: 16px;
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}
body.no-scroll { overflow: hidden; }

img { display: block; max-width: 100%; }
a { color: inherit; }
button { font: inherit; color: inherit; }

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

.display {
  font-family: var(--display);
  font-weight: 400;
  text-transform: uppercase;
  letter-spacing: -0.01em;
  line-height: 0.92;
  margin: 0;
}

/* ---------- Pills (the small rounded buttons with a dot) ---------- */
.pill {
  display: inline-flex;
  align-items: center;
  gap: 0.5em;
  padding: 0.38em 0.75em;
  border: 1px solid currentColor;
  border-radius: 5px;
  font-size: 13px;
  line-height: 1.2;
  text-decoration: none;
  white-space: nowrap;
  background: transparent;
  cursor: pointer;
  transition: background 0.2s, color 0.2s, border-color 0.2s;
}
.pill::after {
  content: "";
  width: 6px; height: 6px;
  border-radius: 50%;
  background: currentColor;
  flex: none;
}
.pill:hover { background: var(--text); color: var(--ink); border-color: var(--text); }

.pill--solid { background: var(--light); color: var(--ink); border-color: var(--light); }
.pill--solid:hover { background: transparent; color: var(--text); border-color: var(--text); }

.pill--red { background: var(--accent); color: #fff; border-color: var(--accent); }
.pill--red:hover { background: #fff; color: var(--accent); border-color: #fff; }

.pill--dark { background: var(--ink); color: #fff; border-color: var(--ink); }
.pill--dark:hover { background: transparent; color: var(--ink); }

.pill--outline-dark { color: var(--ink); }
.pill--outline-dark:hover { background: var(--ink); color: #fff; border-color: var(--ink); }

.pill--lg { font-size: 15px; padding: 0.5em 0.95em; }

:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; }

/* ---------- Header ---------- */
.site-header {
  position: fixed;
  inset: 0 0 auto 0;
  z-index: 50;
  pointer-events: none;
}
.site-header .wrap {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding-top: 18px;
  padding-bottom: 18px;
}
.site-header a, .site-header button { pointer-events: auto; }

.menu-btn {
  width: 44px; height: 44px;
  display: grid; place-items: center;
  background: rgba(18,18,18,0.55);
  -webkit-backdrop-filter: blur(8px);
  backdrop-filter: blur(8px);
  border: 0;
  border-radius: 8px;
  cursor: pointer;
}
.menu-btn span, .menu-btn span::before, .menu-btn span::after {
  display: block;
  width: 24px; height: 2px;
  background: var(--text);
  position: relative;
  content: "";
}
.menu-btn span::before { position: absolute; top: -8px; }
.menu-btn span::after { position: absolute; top: 8px; }

/* ---------- Slide-out menu ---------- */
.menu-backdrop {
  position: fixed; inset: 0;
  background: rgba(0,0,0,0.5);
  opacity: 0; visibility: hidden;
  transition: opacity 0.3s, visibility 0.3s;
  z-index: 90;
}
.menu {
  position: fixed;
  top: 0; right: 0; bottom: 0;
  width: min(440px, 100%);
  background: var(--light);
  color: var(--ink);
  z-index: 100;
  transform: translateX(100%);
  visibility: hidden;
  transition: transform 0.45s cubic-bezier(.7,0,.2,1), visibility 0s linear 0.45s;
  display: flex;
  flex-direction: column;
  padding: 22px 32px 40px;
  overflow-y: auto;
}
.menu-open .menu { transform: none; visibility: visible; transition: transform 0.45s cubic-bezier(.7,0,.2,1); }
.menu-open .menu-backdrop { opacity: 1; visibility: visible; }

.menu-close {
  align-self: flex-end;
  width: 44px; height: 44px;
  border: 0; background: none;
  font-size: 30px; line-height: 1;
  cursor: pointer;
  color: var(--ink);
}
.menu nav { margin-top: 24px; display: flex; flex-direction: column; align-items: flex-end; }
.menu nav a {
  display: flex;
  align-items: flex-start;
  gap: 14px;
  text-decoration: none;
  font-family: var(--display);
  text-transform: uppercase;
  font-size: clamp(44px, 9vw, 60px);
  line-height: 1.05;
}
.menu nav a small {
  font-family: var(--body);
  font-size: 11px;
  color: #999;
  margin-top: 8px;
}
.menu nav a:hover, .menu nav a[aria-current="page"] { color: var(--accent); }
.menu .menu-contact {
  margin-top: 40px;
  align-self: flex-end;
  display: inline-flex; align-items: center; gap: 12px;
  background: var(--ink); color: #fff;
  text-decoration: none;
  font-weight: 600;
  padding: 10px 18px;
  border-radius: 6px;
}
.menu .menu-contact:hover { background: var(--accent); }

/* ---------- Hero (home) ---------- */
.hero {
  position: relative;
  min-height: 100svh;
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  padding-top: 90px;
}
.hero-name {
  font-size: clamp(56px, 14vw, 220px);
  overflow: hidden;
  white-space: nowrap;
  padding: 0 var(--gutter);
  max-width: var(--max);
  width: 100%;
  margin: 0 auto;
}
.hero-name span { display: inline-block; }
.hero-grid {
  display: block;
  width: 100%;
  height: clamp(200px, 38vh, 380px);
  margin-top: clamp(16px, 3vw, 36px);
}
.hero-tagline {
  text-align: center;
  font-size: clamp(14px, 1.6vw, 18px);
  padding: 28px var(--gutter) 0;
  margin: 0;
}
.hero-tagline span { white-space: nowrap; }

/* ---------- Intro ---------- */
.intro {
  display: grid;
  grid-template-columns: 1fr 2fr;
  gap: 24px 40px;
  padding-top: clamp(48px, 8vw, 100px);
  padding-bottom: clamp(64px, 10vw, 140px);
  align-items: start;
}
.intro p {
  margin: 0;
  font-size: clamp(17px, 1.9vw, 22px);
  line-height: 1.4;
  max-width: 34ch;
}

/* ---------- Section heading rows ---------- */
.section { padding-bottom: clamp(64px, 10vw, 140px); }
.section-title { font-size: clamp(44px, 6.4vw, 92px); }
.section-head {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-end;
  justify-content: space-between;
  gap: 24px 48px;
  margin-bottom: clamp(32px, 5vw, 64px);
}
.section-head .title-block { display: flex; flex-direction: column; align-items: flex-start; gap: 14px; }

.stats { display: flex; gap: clamp(28px, 5vw, 72px); }
.stat strong {
  display: block;
  font-family: var(--display);
  font-weight: 400;
  font-size: clamp(40px, 5vw, 68px);
  line-height: 1;
}
.stat span { color: var(--muted); font-size: 15px; }

/* ---------- Project cards ---------- */
.project-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: clamp(32px, 4vw, 56px) clamp(20px, 2.5vw, 32px);
}
.project-grid--three { grid-template-columns: repeat(3, 1fr); }

.card h3 {
  margin: 0 0 12px;
  font-weight: 500;
  font-size: clamp(20px, 2.1vw, 30px);
  line-height: 1.15;
}
.card-meta {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px 22px;
  font-size: 14px;
  color: #d8d8d5;
  margin-bottom: 20px;
}
.thumb {
  position: relative;
  display: block;
  width: 100%;
  aspect-ratio: 16 / 9;
  border-radius: var(--radius);
  overflow: hidden;
  border: 0;
  padding: 0;
  cursor: pointer;
  background: #1d1d1d;
}
.thumb img { width: 100%; height: 100%; object-fit: cover; }
.thumb img, .thumb .placeholder { transition: transform 0.7s cubic-bezier(.2,.7,.2,1); }
@media (hover: hover) {
  .thumb:hover img, .thumb:hover .placeholder { transform: scale(1.045); }
}
.thumb .play {
  position: absolute; inset: 0;
  display: grid; place-items: center;
  background: rgba(0,0,0,0.15);
  opacity: 0.9;
  transition: background 0.3s, opacity 0.3s;
}
.thumb:hover .play { background: rgba(0,0,0,0.35); opacity: 1; }
.thumb .play svg { width: clamp(48px, 7vw, 76px); height: auto; filter: drop-shadow(0 4px 18px rgba(0,0,0,.45)); }

.placeholder {
  position: absolute; inset: 0;
  background:
    repeating-linear-gradient(135deg, #262626 0 1px, transparent 1px 14px),
    #1f1f1f;
  display: flex; align-items: flex-end;
  padding: 16px;
  color: #777;
  font-size: 12px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

/* ---------- Services ---------- */
.services {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 16px;
  max-width: 940px;
}
.service {
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: clamp(20px, 2.4vw, 32px);
  background: var(--bg-raised);
}
.service .num { font-size: 13px; color: var(--muted); }
.service h3 { margin: 22px 0 16px; font-weight: 500; font-size: clamp(19px, 1.8vw, 24px); line-height: 1.2; }
.service ul { margin: 0; padding: 0; list-style: none; font-size: 14px; color: #c9c9c6; }
.service li { padding: 2px 0; }
.service li::before { content: "* "; color: var(--muted); }

/* ---------- Modern Post Aesthetic ---------- */
.aesthetic-head { display: flex; justify-content: space-between; align-items: flex-start; gap: 20px; margin-bottom: 40px; }
.aesthetic { display: grid; gap: 30px; max-width: 980px; }
.aesthetic h3 { margin: 0 0 6px; font-size: 17px; font-weight: 700; }
.aesthetic p { margin: 0; color: #c9c9c6; font-size: 15px; }

/* ---------- Page headers (inner pages) ---------- */
.page-top { padding-top: clamp(110px, 14vw, 170px); }
.page-title { font-size: clamp(56px, 9vw, 128px); margin-bottom: clamp(36px, 6vw, 80px); }

/* ---------- Project detail ---------- */
.detail-head {
  display: grid;
  grid-template-columns: 1.4fr 1fr;
  gap: 24px 40px;
  align-items: start;
  margin-bottom: clamp(32px, 4vw, 48px);
}
.detail-head h1 { font-size: clamp(48px, 7vw, 96px); }
.detail-meta { display: flex; gap: clamp(32px, 6vw, 96px); padding-top: 8px; }
.detail-meta dt { font-size: 12px; letter-spacing: 0.08em; color: var(--muted); text-transform: uppercase; }
.detail-meta dd { margin: 4px 0 0; font-size: 15px; }

.detail-media {
  display: grid;
  grid-template-columns: 1.4fr 1fr;
  gap: 16px;
  margin-bottom: clamp(56px, 8vw, 110px);
}
.video-frame {
  position: relative;
  aspect-ratio: 16 / 9;
  border-radius: var(--radius);
  overflow: hidden;
  background: #000;
}
.video-frame iframe {
  position: absolute; inset: 0;
  width: 100%; height: 100%;
  border: 0;
}
.video-cell { display: flex; justify-content: center; align-items: flex-start; background: #0c0c0c; border-radius: var(--radius); }
.video-cell .video-frame { flex: none; }
.still {
  position: relative;
  border-radius: var(--radius);
  overflow: hidden;
  aspect-ratio: 16 / 9;
  background: #1d1d1d;
}
.still img { width: 100%; height: 100%; object-fit: cover; }

.project-info {
  display: grid;
  grid-template-columns: 1fr 1.25fr;
  gap: 24px 40px;
  margin-bottom: clamp(48px, 7vw, 96px);
}
.project-info h2 { font-size: clamp(44px, 6vw, 80px); }
.project-info p { margin: 0; font-size: clamp(17px, 1.6vw, 20px); line-height: 1.45; }

.gallery { display: grid; grid-template-columns: repeat(2, 1fr); gap: 16px; }

.pager { display: flex; justify-content: space-between; gap: 16px; padding: clamp(48px, 7vw, 96px) 0 clamp(64px, 9vw, 120px); }

/* ---------- About ---------- */
.about {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 260px;
  gap: 32px 48px;
  align-items: start;
  padding-bottom: clamp(64px, 9vw, 120px);
}
.about-text p { margin: 0 0 1.1em; font-size: clamp(17px, 1.75vw, 22px); line-height: 1.42; max-width: 40em; }
.about-text .sig { margin-top: 1.6em; }
.about-photo { border-radius: var(--radius); overflow: hidden; position: sticky; top: 100px; }
.about-photo img { width: 100%; height: auto; }

.divider { border: 0; border-top: 1px solid var(--line); margin: 0 0 clamp(56px, 8vw, 110px); }

.exp-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 16px;
  max-width: 1100px;
  padding-bottom: clamp(64px, 9vw, 120px);
}
.exp {
  text-align: left;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--bg-raised);
  padding: clamp(22px, 2.6vw, 34px);
  min-height: 220px;
  display: flex; flex-direction: column;
  cursor: pointer;
  transition: border-color 0.25s, background 0.25s, transform 0.25s;
  position: relative;
}
.exp:hover { border-color: #5a5a5a; background: #1c1c1c; transform: translateY(-2px); }
.exp .when { font-size: 14px; color: #d8d8d5; }
.exp h3 { margin: auto 0 0; padding-top: 28px; font-weight: 500; font-size: clamp(21px, 2.1vw, 28px); line-height: 1.15; }
.exp .where { margin-top: 26px; font-size: 14px; color: var(--muted); }
.exp .more {
  position: absolute; top: clamp(20px, 2.4vw, 30px); right: clamp(20px, 2.4vw, 30px);
  width: 28px; height: 28px; border-radius: 50%;
  border: 1px solid #555;
  display: grid; place-items: center;
  font-size: 18px; line-height: 1; color: #ccc;
  transition: background 0.25s, color 0.25s;
}
.exp:hover .more { background: var(--text); color: var(--ink); }

/* ---------- Modals (video + experience) ---------- */
.modal {
  position: fixed; inset: 0;
  z-index: 200;
  display: none;
  align-items: center; justify-content: center;
  padding: clamp(12px, 3vw, 40px);
  background: rgba(0,0,0,0.86);
}
.modal.open { display: flex; animation: fade 0.25s ease; }
@keyframes fade { from { opacity: 0; } to { opacity: 1; } }

.modal-close {
  position: absolute; top: 12px; right: 12px;
  width: 44px; height: 44px;
  border: 0; border-radius: 50%;
  background: rgba(255,255,255,0.1);
  color: #fff; font-size: 28px; line-height: 1;
  cursor: pointer;
  z-index: 2;
}
.modal-close:hover { background: rgba(255,255,255,0.22); }

.video-modal .video-frame { width: min(1200px, 100%); flex: none; }
.video-modal .empty {
  position: absolute; inset: 0;
  display: grid; place-items: center; text-align: center;
  color: var(--muted); padding: 24px;
}

.info-modal .panel {
  position: relative;
  width: min(760px, 100%);
  max-height: 88vh;
  overflow-y: auto;
  background: var(--light);
  color: var(--ink);
  border-radius: 10px;
  padding: clamp(28px, 4.5vw, 56px);
}
.info-modal .modal-close { background: rgba(0,0,0,0.06); color: var(--ink); }
.info-modal .modal-close:hover { background: rgba(0,0,0,0.12); }
.info-modal .when { font-size: 14px; color: #666; }
.info-modal h2 { margin: 10px 0 4px; font-size: clamp(24px, 3vw, 34px); line-height: 1.15; font-weight: 600; padding-right: 40px; }
.info-modal .where { color: #555; margin-bottom: 26px; }
.info-modal p { margin: 0 0 1em; font-size: 16.5px; line-height: 1.6; }

/* ---------- Contact ---------- */
.contact {
  display: grid;
  grid-template-columns: 1fr 1.2fr;
  gap: 40px clamp(40px, 6vw, 96px);
  padding-bottom: clamp(64px, 9vw, 120px);
}
.contact-intro p { font-size: clamp(17px, 1.8vw, 22px); line-height: 1.42; margin: 0 0 1em; max-width: 30ch; }
.form { display: grid; gap: 18px; }
.form label { display: grid; gap: 6px; font-size: 13px; color: var(--muted); letter-spacing: 0.04em; text-transform: uppercase; }
.form input, .form textarea {
  width: 100%;
  font: inherit;
  font-size: 16px;
  color: var(--text);
  background: var(--bg-raised);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 14px 16px;
  transition: border-color 0.2s;
}
.form textarea { min-height: 180px; resize: vertical; }
.form input:focus, .form textarea:focus { outline: none; border-color: #777; }
.form .hp { position: absolute; left: -9999px; }
.form button { justify-self: start; }
.form-status { min-height: 1.5em; font-size: 15px; margin: 0; }
.form-status.ok { color: #7bd88f; }
.form-status.err { color: #ff8a80; }

/* ---------- Footer ---------- */
.site-footer {
  background: var(--light);
  color: var(--ink);
}
.site-footer .wrap {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  align-items: center;
  gap: 16px;
  padding-top: 26px;
  padding-bottom: 26px;
}
.site-footer nav { display: flex; flex-wrap: wrap; gap: 12px; }
.site-footer .copy { width: 100%; font-size: 12px; color: #888; margin: 0; }

/* ---------- Scroll reveal ---------- */
.reveal { opacity: 0; transform: translateY(18px); transition: opacity 0.7s ease, transform 0.7s ease; }
.reveal.in { opacity: 1; transform: none; }
@media (prefers-reduced-motion: reduce) { .reveal { opacity: 1; transform: none; transition: none; } }

/* ============================================================
   Tablet
   ============================================================ */
@media (max-width: 1024px) {
  .hero { min-height: auto; padding-top: 120px; }
  .project-grid--three { grid-template-columns: repeat(2, 1fr); }
  .about { grid-template-columns: minmax(0, 1fr) 200px; }
  .detail-head, .detail-media, .project-info { grid-template-columns: 1fr; }
}

/* ============================================================
   Phone
   ============================================================ */
@media (max-width: 720px) {
  .hero { min-height: auto; padding-top: 110px; }
  .hero-grid { height: 190px; }
  .hero-tagline span { white-space: normal; }
  .intro { grid-template-columns: 1fr; }
  .intro .pill { order: 2; justify-self: start; }
  .project-grid, .project-grid--three, .services, .exp-grid, .gallery, .contact { grid-template-columns: 1fr; }
  .about { grid-template-columns: 1fr; }
  .about-photo { position: static; width: 180px; order: -1; }
  .exp { min-height: 180px; }
  .stats { width: 100%; justify-content: space-between; }
  .aesthetic-head .pill { display: none; }
  .site-footer .wrap { flex-direction: column; align-items: flex-start; }
}

.intro > .pill { justify-self: start; }

/* ============================================================
   Project View page — showcase + gallery
   ============================================================ */
.still { margin: 0; }
.showcase { display: grid; gap: 16px; margin-bottom: clamp(56px, 8vw, 110px); }
.showcase .video-frame { width: 100%; }

/* landscape video: video spans two-thirds, two stills stacked beside it */
.showcase--wide { grid-template-columns: 2fr 1fr; grid-template-rows: 1fr 1fr; }
.showcase--wide .sc-video { grid-row: 1 / 3; }
.showcase--wide .still { aspect-ratio: auto; height: 100%; min-height: 0; }
.showcase--solo { grid-template-columns: 1fr; grid-template-rows: auto; }

/* vertical video: video plus stills side by side, all 9:16 */
.showcase--tall { grid-template-columns: repeat(var(--cols, 4), 1fr); align-items: start; }
.showcase--tall .still, .gallery--tall .still { aspect-ratio: 9 / 16; }

.gallery { display: grid; grid-template-columns: repeat(2, 1fr); gap: 16px; }
.gallery--tall { grid-template-columns: repeat(3, 1fr); }
.still--wide { grid-column: 1 / -1; aspect-ratio: 16 / 9; }

@media (max-width: 720px) {
  .showcase--wide { grid-template-columns: 1fr 1fr; grid-template-rows: auto; }
  .showcase--wide .sc-video { grid-column: 1 / -1; grid-row: auto; }
  .showcase--wide .still { aspect-ratio: 16 / 9; height: auto; }
  .showcase--tall { grid-template-columns: repeat(3, 1fr); }
  .showcase--tall .sc-video { grid-column: 1 / -1; grid-row: auto; justify-self: center; width: min(100%, calc(72vh * 9 / 16)); }
  .gallery { grid-template-columns: 1fr 1fr; gap: 10px; }
  .showcase { gap: 10px; }
  .still--wide { aspect-ratio: 16 / 9; }
}

/* keep thumbnails aligned when a title or services line wraps */
.card { display: flex; flex-direction: column; }
.card .thumb { margin-top: auto; }

/* Projects page, computer/tablet widths: a hairline above every card so
   each title clearly belongs to the video below it (works for rows of 2 or 3) */
@media (min-width: 721px) {
  .project-grid--three { row-gap: clamp(48px, 5vw, 72px); }
  .project-grid--three .card {
    border-top: 1px solid #333;
    padding-top: 22px;
  }
}
