/* ==========================================================
   Eric Pinch portfolio
   Change the look here: every color, font and size is a token.
   ========================================================== */
:root {
  --bg: #000;
  --accent: #e8352a;                  /* the red from the Wix home page */
  --text: var(--accent);
  --muted: rgba(232, 53, 42, 0.7);
  --overlay: rgba(0, 0, 0, 0);        /* raise the last number (e.g. 0.35) to darken the hover videos */
  --rule: rgba(232, 53, 42, 0.3);

  --font-display: "Bitter", Georgia, serif;   /* name: Bitter Black (900) */
  --font-body: "Bitter", Georgia, serif;      /* links and text: Bitter Regular (400) */

  --name-size: clamp(3rem, 10.3vw, 13rem);
  --name-tracking: 0.02em;
  --nav-size: clamp(0.95rem, 1.3vw, 1.6rem);
  --nav-tracking: 0.06em;

  --gutter: clamp(16px, 4vw, 48px);
  --max: 1200px;
}

@font-face { font-family: "Bitter"; font-weight: 900; font-display: swap; src: url("../fonts/bitter-latin-900-normal.woff2") format("woff2"); }
@font-face { font-family: "Bitter"; font-weight: 400; font-display: swap; src: url("../fonts/bitter-latin-400-normal.woff2") format("woff2"); }

* { box-sizing: border-box; margin: 0; padding: 0; }
html { -webkit-text-size-adjust: 100%; }
body {
  background: var(--bg);
  color: var(--text);
  font-family: var(--font-body);
  font-weight: 400;
  line-height: 1.5;
}
a { color: inherit; text-decoration: none; }
img, video, iframe { display: block; max-width: 100%; }

/* ---------- Home: black page, a full-screen video plays while a tab is hovered ---------- */
.home {
  position: relative;
  min-height: 100vh;
  min-height: 100svh;
  display: grid;
  place-items: center;
  overflow: hidden;
}
.bg-video {
  position: fixed; inset: 0;
  width: 100%; height: 100%;
  object-fit: cover;
  opacity: 0;
  transition: opacity 0s;            /* instant cut, like the Wix version; try .4s for a fade */
  pointer-events: none;
}
.bg-video.is-on { opacity: 1; }
.home::after {                      /* --overlay darkens the video so the name stays readable */
  content: ""; position: fixed; inset: 0; pointer-events: none;
  background: var(--overlay); opacity: 0;
}
.home:has(.bg-video.is-on)::after { opacity: 1; }
.hero__content {
  position: relative; z-index: 1;
  display: inline-flex; flex-direction: column;
  padding: 0 var(--gutter);
}
.hero__name {
  font-family: var(--font-display);
  font-size: var(--name-size);
  font-weight: 900;
  letter-spacing: var(--name-tracking);
  line-height: 0.95;
  text-transform: uppercase;
  white-space: nowrap;
}
.hero__nav {                      /* links spread across the width of the name */
  margin-top: 0.35em;
  padding: 0 4%;
  display: flex; justify-content: space-between; gap: 1em;
  font-size: var(--nav-size);
  letter-spacing: var(--nav-tracking);
}
.hero__nav a { text-decoration: underline; text-underline-offset: 0.18em; text-decoration-thickness: 1px; }
.hero__nav a:hover, .hero__nav a:focus-visible { color: #fff; }  /* hovered tab turns white over its video */

/* ---------- Inner pages ---------- */
.site-header {
  display: flex; align-items: center; justify-content: space-between; gap: 16px;
  padding: 28px var(--gutter);
  max-width: var(--max); margin: 0 auto;
}
.site-header__name {
  font-family: var(--font-display);
  font-weight: 900; font-size: 1.6rem;
  letter-spacing: var(--name-tracking);
  text-transform: uppercase;
}
.site-nav { display: flex; flex-wrap: wrap; gap: 0.4em 1.8em; font-size: 1rem; letter-spacing: var(--nav-tracking); }
.site-nav a { color: var(--muted); transition: color .2s; }
.site-nav a:hover, .site-nav a[aria-current="page"] { color: var(--text); text-decoration: underline; text-underline-offset: 0.18em; }

main.page { max-width: var(--max); margin: 0 auto; padding: 24px var(--gutter) 96px; }
.page__title {
  font-family: var(--font-display);
  font-size: clamp(1.8rem, 4vw, 3rem);
  font-weight: 900; letter-spacing: 0.02em; text-transform: uppercase;
  margin-bottom: 48px;
}
.page__head { margin-bottom: 40px; }
.page__head .page__title { margin-bottom: 12px; }
.page__role { font-size: clamp(1rem, 1.6vw, 1.25rem); letter-spacing: var(--nav-tracking); color: var(--text); }   /* smaller than the title, still easy to read */
.page__company { margin-top: 2px; font-size: 0.9rem; letter-spacing: var(--nav-tracking); color: var(--muted); }

.project { display: block; padding: 28px 0; border-top: 1px solid var(--rule); }
.project:last-child { border-bottom: 1px solid var(--rule); }
.project__stills { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; align-items: start; }
.project__stills img { width: 100%; height: auto; background: #111; min-height: 40px;  /* shows the whole still at its own shape, no cropping */ transition: opacity .25s; }
.project:hover .project__stills img { opacity: .8; }
.project__title { margin-top: 14px; font-size: 1.1rem; font-weight: 400; letter-spacing: 0.06em; }

.video { position: relative; aspect-ratio: 16 / 9; background: #111; }
.video iframe, .video video { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; }
.video__placeholder { position: absolute; inset: 0; display: grid; place-items: center; color: var(--muted); font-size: .85rem; letter-spacing: .15em; text-transform: uppercase; text-align: center; padding: 16px; }

.coming-soon { color: var(--muted); letter-spacing: var(--nav-tracking); text-transform: uppercase; }

.site-footer { text-align: center; padding: 32px var(--gutter); font-size: .75rem; color: var(--muted); letter-spacing: .15em; }

@media (max-width: 640px) {
  :root { --name-size: 15vw; --nav-size: 0.85rem; }
  .hero__nav { padding: 0; }
  .site-header { flex-direction: column; align-items: flex-start; }
  .project__stills { gap: 4px; }
}
@media (prefers-reduced-motion: reduce) {
  .bg-video { transition: none; }
}
