/* John Orton — site styles */

:root {
  --paper: #EFE9DE;
  --ink: #1A1712;
  --night: #14120E;
  --night-deep: #0E0C09;
  --placeholder: #DED7CA;
  --hover-row: #E5DECF;
  --accent: #4B6BF5;
  --accent-hover: #3A57DD;

  --ink-72: rgba(26,23,18,.72);
  --ink-62: rgba(26,23,18,.62);
  --ink-55: rgba(26,23,18,.55);
  --rule-16: rgba(26,23,18,.16);
  --rule-14: rgba(26,23,18,.14);

  --paper-78: rgba(239,233,222,.78);
  --paper-70: rgba(239,233,222,.7);
  --paper-66: rgba(239,233,222,.66);
  --paper-50: rgba(239,233,222,.5);
  --paper-40: rgba(239,233,222,.4);

  --display: 'DM Sans', sans-serif; /* fallback only: headings use Adobe Futura PT / Neulis */
  --body: 'DM Sans', Helvetica, Arial, sans-serif;
  --mono: ui-monospace, SFMono-Regular, Menlo, monospace;
  --ease: cubic-bezier(.2,.8,.2,1);
  --gutter: 28px;
}

*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: var(--body);
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}
main { overflow-x: clip; }
a { color: inherit; text-decoration: none; }
a:hover { color: var(--accent); }
::selection { background: var(--accent); color: var(--paper); }
input, textarea, button { font-family: inherit; }
img, video { display: block; max-width: 100%; }

.mono { font-family: var(--mono); }
.wrap { max-width: 1400px; margin-left: auto; margin-right: auto; }
.dark { background: var(--night); color: var(--paper); }

/* Media: placeholders + real images/videos fill their box */
.ph, .hero-video,
.portrait > img, .film-media > img, .film-media > video, .film-media > iframe,
.player > video {
  position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover;
}
.ph {
  background: var(--placeholder);
  display: flex; align-items: flex-end; padding: 14px;
}
.ph::after {
  content: attr(data-label);
  font: 10px/1.3 var(--mono); letter-spacing: .02em;
  color: rgba(26,23,18,.4);
}
.hero .ph { background: #2A261F; align-items: flex-start; padding-top: 72px; }
.hero .ph::after { color: rgba(239,233,222,.35); }

/* Keyframes */
@keyframes revealUp { from { opacity: 0; transform: translateY(28px); } to { opacity: 1; transform: none; } }
@keyframes wipe { from { clip-path: inset(100% 0 0 0); } to { clip-path: inset(0 0 0 0); } }
@keyframes marquee { from { transform: translateX(0); } to { transform: translateX(-50%); } }
@keyframes bob { 0%,100% { transform: translateY(0); } 50% { transform: translateY(6px); } }

/* Cursor + grain */
.cursor {
  position: fixed; top: 0; left: 0; width: 56px; height: 56px; border-radius: 999px;
  background: #fff; mix-blend-mode: difference; pointer-events: none; opacity: 0;
  transition: opacity 300ms, width 250ms, height 250ms; z-index: 95; will-change: transform;
}
.has-cursor, .has-cursor * { cursor: none !important; }
.grain {
  position: fixed; inset: 0; z-index: 90; pointer-events: none; mix-blend-mode: multiply; opacity: .5;
  background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='160' height='160'><filter id='n'><feTurbulence type='fractalNoise' baseFrequency='0.85' numOctaves='3'/></filter><rect width='160' height='160' filter='url(%23n)' opacity='0.42'/></svg>");
}

/* 1. Header */
.site-header {
  position: fixed; top: 0; left: 0; right: 0; z-index: 80;
  display: flex; align-items: center; justify-content: space-between; gap: 24px;
  padding: 18px var(--gutter);
  mix-blend-mode: difference; color: var(--paper);
}
.site-header a { color: var(--paper); }
.brand {
  font-family: neulis-sans, var(--display); font-weight: 900; font-style: italic; font-size: 20px;
  letter-spacing: .02em; text-transform: uppercase; white-space: nowrap;
}
.site-nav { display: flex; gap: 22px; font-size: 12px; letter-spacing: .02em; }

/* 2. Hero */
.hero { position: relative; height: 100vh; height: 100svh; min-height: 620px; background: var(--night); }
.hero-media {
  position: absolute; inset: 0; overflow: hidden;
  background: var(--night) url("../assets/images/hero-loop-2026.jpg") center / cover no-repeat; /* still until the video's first frame */
  animation: wipe 900ms var(--ease) both;
}
.hero-overlay {
  position: absolute; inset: 0; display: flex; flex-direction: column; justify-content: flex-end;
  padding: 0 var(--gutter) 40px; pointer-events: none;
  background:
    linear-gradient(to bottom, rgba(20,18,14,.8) 0, rgba(20,18,14,.45) 70px, rgba(20,18,14,0) 170px), /* keeps the header readable over bright footage */
    linear-gradient(to top, rgba(20,18,14,.72) 0%, rgba(20,18,14,0) 46%);
}
.hero-foot {
  display: flex; align-items: flex-end; justify-content: space-between; gap: 16px; color: var(--paper);
}
/* Small-to-medium logo, bottom left: clear of the subjects in every clip of the hero loop */
.hero-logo { margin: 0; line-height: 0; animation: revealUp 600ms 200ms var(--ease) both; }
.hero-logo img { width: clamp(92px, 11vw, 170px); height: auto; }
.scroll-hint { font-size: 11px; letter-spacing: .02em; opacity: .72; animation: bob 2.4s ease-in-out infinite; }

/* Shared headings */
.section-pad { padding: 110px var(--gutter); }
.section-head {
  display: flex; flex-wrap: wrap; align-items: flex-end; justify-content: space-between;
  gap: 20px; margin-bottom: 32px;
}
.section-head--film { margin-bottom: 44px; }
.section-head--stills { margin-bottom: 36px; }
.h-big, .h-about, .h-contact {
  margin: 0; font-family: futura-pt-bold, var(--display); font-weight: 700; font-style: italic; /* Futura PT Bold Oblique (Adobe Fonts) */
  text-transform: uppercase; letter-spacing: -.01em;
}
.h-big { font-size: clamp(40px, 8vw, 130px); line-height: .86; }
.h-about { font-size: clamp(38px, 5vw, 78px); line-height: .9; margin-bottom: 28px; }
.h-contact { font-size: min(clamp(44px, 7vw, 112px), 100cqi / 5.6); line-height: .86; margin-bottom: 26px; } /* Futura is wide: stays on one line in its column */
.contact-grid > div:first-child { container-type: inline-size; }
.meta-muted { font-size: 11px; letter-spacing: .02em; color: var(--ink-55); }

/* 3. About */
.about-grid {
  display: grid; grid-template-columns: repeat(auto-fit, minmax(min(320px, 100%), 1fr));
  gap: 56px; align-items: start;
}
.portrait { position: relative; aspect-ratio: 4 / 5; background: var(--placeholder); overflow: hidden; }
.lead { margin: 0 0 22px; font-size: 17px; line-height: 1.65; max-width: 56ch; text-wrap: pretty; }
.lead.muted { color: var(--ink-72); margin-bottom: 34px; }
.stats {
  display: grid; grid-template-columns: repeat(auto-fit, minmax(140px, 1fr)); gap: 24px;
  padding-top: 26px; border-top: 1px solid var(--rule-16);
}
.stat-val { font-family: futura-pt-bold, var(--display); font-weight: 700; font-size: 40px; line-height: 1; }
.stat-label { font-size: 10px; line-height: 1.4; color: var(--ink-55); margin-top: 8px; }

/* 4. Clients */
.clients {
  padding: 56px 0 64px; overflow: hidden;
  border-top: 1px solid var(--rule-14); border-bottom: 1px solid var(--rule-14);
}
.clients-label { margin-bottom: 28px; padding: 0 var(--gutter); font-size: 11px; color: var(--ink-55); }
.marquee { display: flex; width: max-content; animation: marquee 34s linear infinite; }
.marquee-row {
  display: flex; gap: 40px; padding-right: 40px;
  font-family: futura-pt-bold, var(--display); font-weight: 700; font-size: clamp(28px, 4vw, 62px);
  white-space: nowrap; color: rgba(26,23,18,.82);
}
.marquee-row i { font-style: normal; color: var(--accent); }

/* 5. Showreel */
.reel { padding: 96px var(--gutter) 110px; }
.player { position: relative; aspect-ratio: 16 / 9; width: 100%; overflow: hidden; background: var(--night-deep); }
.player > video { background: var(--night-deep); }
.play-pill {
  position: absolute; left: 50%; top: 50%; transform: translate(-50%, -50%);
  display: flex; align-items: center; gap: 14px; padding: 16px 26px;
  border: 1px solid var(--paper-50); border-radius: 999px;
  -webkit-backdrop-filter: blur(6px); backdrop-filter: blur(6px);
  background: rgba(20,18,14,.28); color: var(--paper);
  font-size: 11px; letter-spacing: .02em; cursor: pointer; white-space: nowrap;
  transition: background 200ms;
}
.play-pill:hover { background: rgba(20,18,14,.5); }
.play-pill[disabled] { cursor: default; opacity: .7; }
.play-tri { display: block; width: 0; height: 0; border-left: 11px solid var(--paper); border-top: 7px solid transparent; border-bottom: 7px solid transparent; }
.player.is-playing .play-pill { display: none; }

/* 6. Film */
.film { padding: 110px var(--gutter) 40px; }
.film-grid { display: grid; grid-template-columns: repeat(12, 1fr); gap: 20px; }
.film-card { display: block; transition: opacity 200ms; }
.film-card:hover { opacity: .88; color: inherit; }
.span-4 { grid-column: span 4; }
.span-5 { grid-column: span 5; }
.span-6 { grid-column: span 6; }
.span-7 { grid-column: span 7; }
.span-12 { grid-column: 1 / -1; }
.film-media { position: relative; overflow: hidden; background: var(--placeholder); }
.r-16-9 { aspect-ratio: 16 / 9; }
.r-4-3 { aspect-ratio: 4 / 3; }
.r-3-2 { aspect-ratio: 3 / 2; }
.r-21-9 { aspect-ratio: 21 / 9; }
.film-cap {
  display: flex; align-items: baseline; justify-content: space-between; gap: 12px;
  margin-top: 12px; padding-bottom: 14px; border-bottom: 1px solid var(--rule-16);
}
.film-title { font-family: futura-pt-bold, var(--display); font-weight: 700; font-style: italic; font-size: clamp(20px, 2vw, 30px); line-height: 1.05; text-wrap: balance; } /* same face as the section headings, in normal case */
/* YouTube cards: local thumbnail until Play, then the player loads in place */
.film-media > iframe { border: 0; }
.film-more { margin-top: 20px; }
.film-more .film-title { font-size: clamp(18px, 1.5vw, 22px); }
/* Play button at the bottom instead of the middle, for thumbnails where a face sits in the centre */
.pill-low .play-pill { top: auto; bottom: 7%; transform: translateX(-50%); }
.more-btn {
  display: block; margin: 36px auto 0; padding: 14px 26px;
  border: 1px solid var(--rule-16); border-radius: 999px; background: none; color: inherit;
  font-size: 11px; letter-spacing: .02em; cursor: pointer;
}
.more-btn:hover { border-color: currentColor; }
.more-btn[hidden] { display: none; }

/* 7. Stills */
.stills { padding: 100px var(--gutter) 110px; }
.still { display: block; position: relative; overflow: hidden; background: var(--placeholder); cursor: zoom-in; }
.still > img { display: block; width: 100%; height: 100%; object-fit: cover; transition: transform 500ms var(--ease); }
.still:hover > img { transform: scale(1.03); }
.still:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; }
/* featured six: even 3:2 grid */
.stills-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; }
.stills-grid .still { aspect-ratio: 3 / 2; }
/* the rest: flowing columns, every photo keeps its own shape */
.stills-more { columns: 3; column-gap: 16px; margin-top: 16px; }
.stills-more .still { margin-bottom: 16px; break-inside: avoid; }
.stills-more .still > img { height: auto; }

/* Photo viewer: a horizontal scroll-snap strip, so photos slide with your finger */
.lightbox {
  position: fixed; inset: 0; z-index: 92; /* above header (80) and grain (90), below the custom cursor (95) */
  background: rgba(20,18,14,.95); color: var(--paper);
}
.lightbox[hidden] { display: none; }
.lb-track {
  position: absolute; inset: 0; display: flex; overflow-x: auto; overflow-y: hidden;
  scroll-snap-type: x mandatory; overscroll-behavior: contain; scrollbar-width: none;
  -webkit-overflow-scrolling: touch;
  touch-action: pan-x pinch-zoom; /* sideways swipes scroll the strip; downward drags are handled by the swipe-to-close script */
}
.lb-track::-webkit-scrollbar { display: none; }
.lb-slide {
  flex: 0 0 100%; height: 100%; box-sizing: border-box; padding: 56px 72px 52px;
  display: flex; align-items: center; justify-content: center;
  scroll-snap-align: center; scroll-snap-stop: always;
}
.lb-slide img { max-width: 100%; max-height: 100%; object-fit: contain; }
.lb-count { position: absolute; left: 50%; bottom: 18px; transform: translateX(-50%); font-size: 11px; letter-spacing: .02em; opacity: .6; }
.lb-close, .lb-nav { position: absolute; z-index: 1; background: none; border: 0; color: var(--paper); cursor: pointer; }
.lb-close { top: 18px; right: 22px; font-size: 12px; letter-spacing: .02em; padding: 8px; }
.lb-nav { top: 50%; transform: translateY(-50%); font-size: 28px; padding: 16px; opacity: .75; }
.lb-nav:hover, .lb-close:hover { opacity: 1; }
.lb-nav[disabled] { opacity: .2; cursor: default; }
.lb-prev { left: 8px; } .lb-next { right: 8px; }
body.lb-open { overflow: hidden; }

/* 9. Contact */
.contact { padding: 110px var(--gutter) 90px; }
.contact-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(320px, 100%), 1fr)); gap: 56px; }
.contact-links { display: grid; gap: 18px; font-size: 15px; justify-items: start; }
.contact-email {
  color: var(--paper); font-family: futura-pt-bold, var(--display); font-weight: 700; font-size: 26px;
  border-bottom: 1px solid rgba(239,233,222,.3); padding-bottom: 6px;
  overflow-wrap: anywhere;
}
.contact-phone { color: var(--paper); font-family: futura-pt-bold, var(--display); font-weight: 700; font-size: 26px; } /* matches the email address */
.enquiry { display: grid; gap: 22px; }
.hp { position: absolute; left: -9999px; }
.field { display: grid; gap: 8px; }
/* Small labels: Futura PT Book in spaced capitals (form, stats, "People I've worked with") */
.field-label, .btn, .stat-label, .clients-label { font-family: futura-pt, var(--display); font-weight: 400; text-transform: uppercase; letter-spacing: .14em; }
.field-label { font-size: 11px; color: var(--paper-66); }
.field input, .field textarea {
  width: 100%; background: transparent; border: none; border-bottom: 1px solid rgba(239,233,222,.28);
  border-radius: 0; color: var(--paper); font-size: 17px; padding: 8px 0; outline: none;
  transition: border-color 200ms;
}
.field textarea { resize: vertical; }
.field input:focus, .field textarea:focus { border-bottom-color: var(--accent); }
.field.invalid input, .field.invalid textarea { border-bottom-color: #E0674B; }
.form-error { margin: 0; font-size: 14px; color: #F08B73; }
.btn {
  justify-self: start; margin-top: 8px; padding: 15px 32px; border: none; border-radius: 999px;
  background: var(--accent); color: var(--paper); font-size: 12px;
  cursor: pointer; transition: transform 200ms, background 200ms;
}
.btn:hover { transform: translateY(-2px); background: var(--accent-hover); }
.btn[disabled] { opacity: .6; transform: none; cursor: wait; }
.form-sent {
  padding: 40px 0; font-family: futura-pt-bold, var(--display); font-weight: 700; font-style: italic; font-size: 32px;
  color: var(--accent);
}
.site-footer {
  display: flex; flex-wrap: wrap; gap: 18px; justify-content: space-between;
  margin-top: 90px; padding-top: 26px; border-top: 1px solid rgba(239,233,222,.16);
  font-size: 10px; letter-spacing: .02em; color: var(--paper-50);
}
.site-footer a { color: var(--paper-50); }

/* Scroll reveal (only hidden once JS confirms it can reveal them) */
.js [data-reveal] { opacity: 0; }
.js [data-reveal].revealed { animation: revealUp 800ms var(--ease) both; }

/* ---------- Mobile ---------- */
@media (max-width: 860px) {
  .stills-grid { grid-template-columns: repeat(2, 1fr); }
  .stills-more { columns: 2; }
  .film-grid { grid-template-columns: 1fr; gap: 28px; }
  .span-5, .span-6, .span-7, .span-12 { grid-column: auto; }
  .r-21-9 { aspect-ratio: 3 / 2; }
}

@media (max-width: 640px) {
  :root { --gutter: 18px; }
  .site-header { padding: 14px var(--gutter); gap: 12px; }
  .brand { font-size: 17px; }
  .site-nav { gap: 12px; font-size: 11px; letter-spacing: .02em; }
  .site-nav a[href="#about"] { display: none; } /* keep nav on one line on phones */

  .hero { min-height: 540px; }
  .hero-overlay { padding-bottom: 28px; }

  .section-pad, .film, .contact { padding-top: 80px; }
  .about.section-pad { padding-bottom: 24px; }
  .clients { padding: 22px 0 24px; }
  .clients-label { margin-bottom: 8px; }
  .reel { padding: 72px var(--gutter) 80px; }
  .stills { padding: 72px var(--gutter) 80px; }
  .about-grid, .contact-grid { gap: 40px; }

  .stat-val { font-size: 28px; }
  /* Stats sit centred between two full-width rules (the lower one is the Clients border) */
  .stats {
    grid-template-columns: repeat(3, 1fr); gap: 14px; padding: 24px var(--gutter) 0;
    margin: 0 calc(-1 * var(--gutter));
  }
  .stat-label { margin-top: 4px; }

  .play-pill { padding: 12px 20px; gap: 10px; }

  .stills-grid { grid-template-columns: repeat(2, 1fr); gap: 10px; }
  .stills-more { columns: 2; column-gap: 10px; margin-top: 10px; }
  .stills-more .still { margin-bottom: 10px; }
  .lb-slide { padding: 56px 0 52px; }   /* photos edge to edge on phones */
  .lb-nav { display: none; }             /* swipe instead */

  .contact-email, .contact-phone { font-size: 22px; }
  .site-footer { margin-top: 64px; flex-direction: column; gap: 10px; }
}

@media (max-width: 360px) {
  .site-nav { gap: 9px; }
}

/* ---------- Reduced motion ---------- */
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .hero-media, .hero-logo, .scroll-hint { animation: none !important; }
  .marquee { animation: none; width: auto; padding: 0 var(--gutter); }
  .marquee-row { white-space: normal; flex-wrap: wrap; gap: 6px 22px; padding: 0; }
  .marquee-row + .marquee-row { display: none; }
  .js [data-reveal] { opacity: 1; }
  .js [data-reveal].revealed { animation: none; }
}
