/* Slate: a showreel website template for filmmakers and videographers.
   Rebrand by editing the tokens in :root. Nothing else needs to change. */

:root {
  --bg: #f1f1ee;
  --surface: #e3e3df;
  --ink: #0e0e0e;
  --muted: #5b5b58;
  --line: rgb(14 14 14 / 0.16);
  --accent: #c5f02c;
  --accent-ink: #0e0e0e;

  --font-display: "Big Shoulders Display", "Arial Narrow", Arial, sans-serif;
  --font-body: "DM Sans", "Helvetica Neue", Arial, sans-serif;

  /* Shape rule: every corner on the site uses this one value. */
  --radius: 0px;

  --wrap: 1320px;
  --gutter: clamp(1rem, 4vw, 3rem);
  --gap: clamp(1rem, 2vw, 1.5rem);
  --section: clamp(4.5rem, 10vw, 9rem);
  --header: 68px;
  --ease: cubic-bezier(0.16, 1, 0.3, 1);

  /* Layers: header 10, mobile menu 20. */
  color-scheme: light dark;
  accent-color: var(--accent);
}

/* Dark theme follows the visitor's system setting.
   To lock one theme, delete this block (light) or move its values into :root (dark). */
@media (prefers-color-scheme: dark) {
  :root {
    --bg: #0c0c0c;
    --surface: #1a1a19;
    --ink: #f1f1ee;
    --muted: #a3a39e;
    --line: rgb(241 241 238 / 0.18);
    --accent: #d7ff3f;
    --accent-ink: #0c0c0c;
  }
}

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

html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; scroll-padding-top: var(--header); }

body {
  background: var(--bg);
  color: var(--ink);
  font-family: var(--font-body);
  font-size: 1.0625rem;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

img, video { display: block; max-width: 100%; height: auto; }
a { color: inherit; text-decoration: none; }
ul { list-style: none; padding: 0; }
button { font: inherit; color: inherit; }
::selection { background: var(--accent); color: var(--accent-ink); }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; }

h1, h2, h3 {
  font-family: var(--font-display);
  font-weight: 800;
  letter-spacing: 0.005em;
  line-height: 0.92;
  text-transform: uppercase;
  text-wrap: balance;
}
h2 { font-size: clamp(2.4rem, 6vw, 5rem); }

.wrap { max-width: var(--wrap); margin-inline: auto; padding-inline: var(--gutter); }
.section { padding-block: var(--section); }
.section > h2 { margin-bottom: clamp(2rem, 4.5vw, 3.5rem); }
.muted { color: var(--muted); }

.skip {
  position: absolute; left: var(--gutter); top: -4rem; z-index: 20;
  background: var(--ink); color: var(--bg); padding: 0.6rem 1rem; border-radius: var(--radius);
}
.skip:focus { top: 0.75rem; }

/* Header */
.site-header { position: sticky; top: 0; z-index: 10; background: var(--bg); }
.site-header__inner { height: var(--header); display: flex; align-items: center; justify-content: space-between; }
.wordmark { font-family: var(--font-display); font-weight: 800; font-size: 1.5rem; letter-spacing: 0.005em; text-transform: uppercase; }
.nav { display: flex; align-items: center; gap: 2rem; }
.nav a:not(.btn), .link {
  background: linear-gradient(currentColor, currentColor) 0 100% / 0 1px no-repeat;
  transition: background-size 0.4s var(--ease);
}
.nav a:not(.btn):hover, .link:hover { background-size: 100% 1px; }
.menu-toggle {
  display: none; background: none; cursor: pointer;
  border: 0; box-shadow: inset 0 0 0 1px var(--line); border-radius: var(--radius); padding: 0.5rem 1rem;
}

/* Buttons */
.btn {
  display: inline-flex; align-items: center; justify-content: center;
  padding: 0.8rem 1.4rem; border-radius: var(--radius);
  font-weight: 500; white-space: nowrap;
  transition: transform 0.2s var(--ease), background-color 0.25s, color 0.25s, box-shadow 0.25s;
}
.btn:active { transform: scale(0.98); }
.btn--primary { background: var(--accent); color: var(--accent-ink); }
.btn--primary:hover { background: var(--ink); color: var(--bg); }
.btn--ghost { box-shadow: inset 0 0 0 1px var(--line); }
.btn--ghost:hover { box-shadow: inset 0 0 0 1px var(--ink); }
.btn--small { padding: 0.55rem 1.1rem; }
.actions { display: flex; flex-wrap: wrap; gap: 0.75rem; }

/* Media */
.media { overflow: hidden; border-radius: var(--radius); background: var(--surface); }
.media img { width: 100%; height: 100%; object-fit: cover; }

/* Rows: a title on the left, a line of text on the right. */
.rows li {
  display: grid; grid-template-columns: repeat(12, 1fr); gap: var(--gap); align-items: baseline;
  padding-block: clamp(1.25rem, 2.6vw, 2rem); border-top: 1px solid var(--line);
}
.rows h3 { grid-column: 1 / span 5; font-size: clamp(1.9rem, 4vw, 3.25rem); }
.rows p { grid-column: 7 / span 6; color: var(--muted); }

/* Split: an image beside text. */
.split { display: grid; grid-template-columns: repeat(12, 1fr); gap: var(--gap); align-items: center; }
.split__media { grid-column: 1 / span 5; aspect-ratio: 4 / 5; }
.split__copy { grid-column: 7 / span 6; }
.split__copy h2 { margin-bottom: 1.75rem; }
.split__copy p { max-width: 52ch; color: var(--muted); }
.split__copy p + p { margin-top: 1rem; }

/* Quote */
.quote blockquote { max-width: 22ch; font-family: var(--font-display); font-weight: 800; font-size: clamp(2.2rem, 5.4vw, 4.5rem); letter-spacing: 0.005em; line-height: 1.1; text-transform: uppercase; }
.quote footer { margin-top: 2rem; font-family: var(--font-body); font-size: 1rem; font-weight: 400; letter-spacing: 0; line-height: 1.5; text-transform: none; }
.quote footer strong { display: block; font-weight: 600; }
.quote footer span { color: var(--muted); }

/* Contact */
.contact { border-top: 1px solid var(--line); }
.contact p { max-width: 44ch; color: var(--muted); }
.contact__mail {
  display: inline-block; margin-top: clamp(2rem, 4vw, 3rem);
  font-family: var(--font-display); font-weight: 800; font-size: clamp(2rem, 6.4vw, 5.5rem);
  letter-spacing: 0.005em; line-height: 1.1; text-transform: uppercase;
  background: linear-gradient(var(--accent), var(--accent)) 0 100% / 100% 3px no-repeat;
  overflow-wrap: anywhere;
}

/* Footer */
.site-footer { border-top: 1px solid var(--line); padding-block: 2.5rem; font-size: 0.95rem; }
.site-footer__inner { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 1rem 2rem; }
.site-footer ul { display: flex; flex-wrap: wrap; gap: 0.5rem 1.5rem; }
.site-footer small { flex-basis: 100%; color: var(--muted); font-size: 0.875rem; }

/* Reveal on scroll. Content stays visible when JavaScript is off. */
.js [data-reveal] {
  opacity: 0; transform: translateY(20px);
  transition: opacity 0.8s var(--ease), transform 0.8s var(--ease);
  transition-delay: calc(var(--i, 0) * 80ms);
}
.js [data-reveal].is-in { opacity: 1; transform: none; }

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .js [data-reveal] { opacity: 1; transform: none; transition: none; }
  .btn, .media img { transition: none; }
}

/* Small screens: every grid becomes one column. */
@media (max-width: 767px) {
  .menu-toggle { display: inline-flex; }
  .nav {
    display: none; position: absolute; z-index: 20; top: var(--header); left: 0; right: 0;
    flex-direction: column; align-items: flex-start; gap: 1.1rem;
    padding: 1rem var(--gutter) 2rem; background: var(--bg); border-bottom: 1px solid var(--line);
    font-size: 1.25rem;
  }
  .nav.is-open { display: flex; }
  .rows li, .split { display: block; }
  .rows p { margin-top: 0.5rem; }
  .split__copy { margin-top: 2.5rem; }
}

/* Hero */
.hero { padding-top: clamp(2rem, 5vw, 3.5rem); }
.hero h1 { font-size: clamp(3rem, 9.2vw, 8.5rem); }
.hero__row { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: end; gap: 1.5rem 3rem; margin-top: 1.5rem; }
.hero__row p { max-width: 44ch; font-size: 1.15rem; color: var(--muted); }
.reel { margin-top: clamp(2rem, 4vw, 3rem); }

/* Films. Each one is a link to its video, so it still works without JavaScript. */
.film { display: block; }
.film .media { position: relative; aspect-ratio: 16 / 9; }
.film .media img { transition: transform 0.9s var(--ease); }
.film:hover .media img { transform: scale(1.04); }
.film__meta { display: flex; justify-content: space-between; align-items: baseline; gap: 1rem; margin-top: 0.9rem; }
.film__meta h3 { font-size: clamp(1.5rem, 2.6vw, 2.1rem); }
.film__meta p { color: var(--muted); font-size: 0.95rem; text-align: right; }
/* Play badge, drawn with a border triangle. */
.film .media::after {
  content: ""; position: absolute; left: 50%; top: 50%; width: 4.5rem; height: 4.5rem;
  transform: translate(-50%, -50%) scale(0.9); opacity: 0;
  background: var(--accent)
    conic-gradient(from 240deg at 68% 50%, var(--accent-ink) 0 60deg, transparent 0) center / 1.5rem 1.5rem no-repeat;
  transition: opacity 0.3s, transform 0.4s var(--ease);
}
.film:hover .media::after, .film:focus-visible .media::after, .reel .media::after { opacity: 1; transform: translate(-50%, -50%); }
.films { display: grid; grid-template-columns: 1fr 1fr; gap: clamp(2rem, 4vw, 3.5rem) var(--gap); }
.films .film--wide { grid-column: 1 / -1; }

/* Kit list */
.kit { display: grid; grid-template-columns: auto 1fr; gap: 0.4rem 1.5rem; margin-top: 2rem; padding-top: 1.5rem; border-top: 1px solid var(--line); }
.kit dt { color: var(--muted); }

/* Video player */
/* margin: auto centres the dialog; the reset at the top of this file removes the browser's own. */
.player { width: min(92vw, 1280px); aspect-ratio: 16 / 9; max-height: 80dvh; margin: auto; padding: 0; border: 0; background: #000; overflow: visible; }
.player::backdrop { background: rgb(0 0 0 / 0.86); }
.player video, .player iframe { width: 100%; height: 100%; border: 0; }
.player__close {
  position: absolute; right: 0; bottom: calc(100% + 0.75rem); cursor: pointer;
  border: 0; background: var(--accent); color: var(--accent-ink); padding: 0.5rem 1rem; font-weight: 500;
}

@media (max-width: 767px) {
  .films { grid-template-columns: 1fr; }
  .film__meta { display: block; }
  .film__meta p { text-align: left; margin-top: 0.2rem; }
}
