/* ==========================================================================
   Beetje Oranje — shared styles
   ========================================================================== */

:root {
  --color-orange: #FD9800;
  --color-orange-dark: #E98C00;
  --color-navy: #0F172A;
  --color-ink: #141006;
  --color-text: #454F5E;
  --color-cream: #FEF9E1;
  --color-cream-2: #F9F0C8;
  --color-white: #FFFFFF;

  --font-body: 'Poppins', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  --font-hand: 'Caveat', cursive;

  --max-width: 1120px;
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  margin: 0;
  font-family: var(--font-body);
  color: var(--color-text);
  background: var(--color-white);
  font-size: 17px;
  line-height: 1.6;
}

img { max-width: 100%; display: block; }

a { color: inherit; text-decoration: none; }

.wrap {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 0 32px;
}

h1, h2, h3 {
  color: var(--color-ink);
  line-height: 1.15;
  margin: 0 0 0.5em;
  font-weight: 600;
}

/* ---------------- Header ---------------- */

.site-header {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  z-index: 50;
  padding: 28px 0;
}

.site-header.is-solid {
  position: sticky;
  background: rgba(255, 255, 255, 0.98);
  box-shadow: 0 1px 0 rgba(20, 16, 6, 0.06);
  padding: 16px 0;
}

.site-header .wrap {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
}

.logo {
  display: inline-flex;
  align-items: center;
  transition: opacity 0.2s ease;
}

.logo img {
  display: block;
  height: 80px;
  width: auto;
}

/* On the homepage the hero video already carries the wordmark, so the
   text logo only appears once the header goes solid (i.e. on scroll). */
.hero-header:not(.is-solid) .logo {
  opacity: 0;
  pointer-events: none;
}

.main-nav {
  display: flex;
  align-items: center;
  gap: 36px;
}

.main-nav ul {
  list-style: none;
  display: flex;
  gap: 32px;
  margin: 0;
  padding: 0;
}

.main-nav a {
  font-size: 16px;
  font-weight: 500;
  color: var(--color-ink);
  position: relative;
  padding: 4px 0;
}

.main-nav a.is-active,
.main-nav a:hover {
  color: var(--color-orange);
}

.main-nav a.is-active::after {
  content: '';
  position: absolute;
  left: 0;
  right: 0;
  bottom: -2px;
  height: 2px;
  background: var(--color-orange);
}

.btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: var(--color-orange);
  color: var(--color-white);
  font-weight: 600;
  font-size: 15px;
  padding: 12px 22px;
  border-radius: 999px;
  transition: background 0.2s ease, transform 0.2s ease;
  white-space: nowrap;
}

.btn:hover {
  background: var(--color-orange-dark);
  transform: translateY(-1px);
}

.nav-only-mobile { display: none; }

.header-actions {
  display: flex;
  align-items: center;
  gap: 16px;
}

.menu-toggle {
  display: none;
  background: var(--color-orange);
  color: var(--color-white);
  border: none;
  width: 44px;
  height: 44px;
  border-radius: 50%;
  align-items: center;
  justify-content: center;
  cursor: pointer;
}

.menu-toggle span,
.menu-toggle span::before,
.menu-toggle span::after {
  content: '';
  display: block;
  width: 18px;
  height: 2px;
  background: var(--color-white);
  position: relative;
  transition: all 0.2s ease;
}

.menu-toggle span::before { position: absolute; top: -6px; }
.menu-toggle span::after { position: absolute; top: 6px; }

.main-nav.is-open ~ .header-actions .menu-toggle span { background: transparent; }
.main-nav.is-open ~ .header-actions .menu-toggle span::before { top: 0; transform: rotate(45deg); }
.main-nav.is-open ~ .header-actions .menu-toggle span::after { top: 0; transform: rotate(-45deg); }

/* ---------------- Hero video ---------------- */

.hero-video {
  position: relative;
  width: 100%;
  aspect-ratio: 16 / 9;
  overflow: hidden;
  background: var(--color-cream-2);
}

.hero-video video {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

/* ---------------- Hero intro (text under the video) ---------------- */

.hero-intro {
  padding: 56px 0 48px;
  text-align: center;
  background: linear-gradient(180deg, var(--color-cream) 0%, var(--color-white) 100%);
}

.hero-intro .wrap {
  max-width: 720px;
}

.hero-eyebrow {
  font-family: var(--font-hand);
  font-size: 22px;
  color: var(--color-orange-dark);
  margin-bottom: 4px;
  display: block;
}

.hero-intro h1 {
  font-size: 40px;
  margin-bottom: 18px;
}

.hero-intro h1 em {
  font-style: normal;
  color: var(--color-orange);
  display: inline-block;
  animation: hero-wiggle 1.1s ease-in-out infinite;
  transform-origin: 50% 70%;
}

@keyframes hero-wiggle {
  0%   { transform: translate(0, 0) rotate(0deg) scale(1); }
  10%  { transform: translate(-1px, -2.5px) rotate(-3.5deg) scale(1.015); }
  20%  { transform: translate(1px, 1.5px) rotate(3deg) scale(0.99); }
  30%  { transform: translate(-1.5px, 1px) rotate(-2.5deg) scale(1.01); }
  40%  { transform: translate(1.5px, -2px) rotate(3.5deg) scale(1); }
  50%  { transform: translate(-1px, 0) rotate(-2deg) scale(1.015); }
  60%  { transform: translate(1px, -1.5px) rotate(2.5deg) scale(0.995); }
  70%  { transform: translate(-1.5px, 1.5px) rotate(-3deg) scale(1.01); }
  80%  { transform: translate(1.5px, 0) rotate(2deg) scale(1); }
  90%  { transform: translate(-0.5px, -1px) rotate(-1.5deg) scale(1.005); }
  100% { transform: translate(0, 0) rotate(0deg) scale(1); }
}

@media (prefers-reduced-motion: reduce) {
  .hero-intro h1 em {
    animation: none;
  }
}

.hero-intro p {
  font-size: 18px;
  max-width: 52ch;
  margin: 0 auto 28px;
}

.hero-actions {
  display: flex;
  gap: 16px;
  flex-wrap: wrap;
  justify-content: center;
}

.btn-outline {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  border: 2px solid var(--color-ink);
  color: var(--color-ink);
  font-weight: 600;
  font-size: 15px;
  padding: 10px 22px;
  border-radius: 999px;
}

.btn-outline:hover {
  border-color: var(--color-orange);
  color: var(--color-orange);
}

/* ---------------- Intro / About section ---------------- */

.about {
  padding: 100px 0;
}

.about .wrap {
  display: grid;
  grid-template-columns: 0.85fr 1.15fr;
  gap: 64px;
  align-items: center;
}

.about-visual {
  width: 100%;
  aspect-ratio: 4 / 5;
  border-radius: 24px;
  overflow: hidden;
  background: linear-gradient(160deg, var(--color-cream-2), var(--color-cream));
}

/* Scroll-in reveal for the About section: photo and body paragraphs fade
   up into place; the heading types itself out (see .type-heading). Both
   start hidden and get their .is-visible class from script.js once the
   section scrolls into view. */
.about-anim {
  opacity: 0;
  transform: translateY(28px);
  transition: opacity 0.7s ease, transform 0.7s ease;
}

.about-anim.is-visible {
  opacity: 1;
  transform: translateY(0);
}

.type-heading {
  display: inline-block;
  overflow: hidden;
  white-space: normal;
}

.type-heading.is-typing::after {
  content: '';
  display: inline-block;
  width: 3px;
  height: 0.9em;
  margin-left: 3px;
  background: var(--color-orange);
  vertical-align: -0.1em;
  animation: type-caret-blink 0.8s step-end infinite;
}

@keyframes type-caret-blink {
  50% { opacity: 0; }
}

@media (prefers-reduced-motion: reduce) {
  .about-anim {
    opacity: 1;
    transform: none;
    transition: none;
  }
}

.about-visual img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.eyebrow {
  font-family: var(--font-hand);
  font-size: 22px;
  color: var(--color-orange-dark);
  display: block;
  margin-bottom: 6px;
}

.about h2 {
  font-size: 32px;
  margin-bottom: 18px;
}

.about p {
  margin-bottom: 18px;
}

.about p:last-of-type {
  margin-bottom: 28px;
}

/* ---------------- CTA band ---------------- */

.cta-band {
  background: var(--color-ink);
  color: var(--color-cream);
  padding: 72px 0;
  text-align: center;
}

.cta-band h2 {
  color: var(--color-white);
  font-size: 30px;
}


.cta-band p {
  color: rgba(254, 249, 225, 0.75);
  max-width: 50ch;
  margin: 0 auto 28px;
}

/* ---------------- Work / Portfolio page ---------------- */

.page-header {
  padding: 170px 0 30px;
  background: linear-gradient(180deg, var(--color-cream) 0%, var(--color-white) 100%);
}

.page-header .eyebrow { margin-bottom: 8px; }

.page-header h1 {
  font-size: 40px;
  max-width: 22ch;
}

.page-header p {
  max-width: 55ch;
  font-size: 17px;
}

.portfolio-grid {
  padding: 0 0 100px;
}

.portfolio-grid .grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  align-items: start;
  gap: 28px;
}

.portfolio-card {
  position: relative;
  border-radius: 20px;
  overflow: hidden;
}

/* Every card is just its 16:9 thumbnail now — no separate text bar
   underneath. Title/tag/description live in an overlay that fades in
   on hover (see .thumb-overlay below). */
.portfolio-card .thumb {
  position: relative;
  aspect-ratio: 16 / 9;
  background: linear-gradient(160deg, var(--color-cream-2), #ffe6b3);
}

/* Empty-state cards (no footage yet) keep a dashed placeholder look. */
.portfolio-card .thumb:not(.is-media) {
  border: 2px dashed rgba(20,16,6,0.15);
}

.thumb-empty-label {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
  color: rgba(20,16,6,0.4);
  font-size: 14px;
  text-align: center;
  transition: opacity 0.2s ease;
}

.portfolio-card .thumb:hover .thumb-empty-label,
.portfolio-card .thumb:focus-visible .thumb-empty-label {
  opacity: 0;
}

/* Real video thumbnail (autoplaying preview GIF) that opens the lightbox.
   Same 16:9 frame as the placeholder thumbs above, so every card in the
   grid lines up at the same size regardless of the source footage. */
.portfolio-card .thumb.is-media {
  all: unset;
  box-sizing: border-box;
  position: relative;
  display: block;
  width: 100%;
  aspect-ratio: 16 / 9;
  overflow: hidden;
  background: var(--color-ink);
  cursor: pointer;
}

.portfolio-card .thumb.is-media img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.35s ease;
}

.portfolio-card .thumb.is-media:hover img,
.portfolio-card .thumb.is-media:focus-visible img {
  transform: scale(1.04);
}

/* Title/tag/description overlay — hidden by default, fades in over the
   gif on hover or keyboard focus so the card itself stays clean. */
.thumb-overlay {
  position: absolute;
  inset: 0;
  z-index: 1;
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  padding: 18px 20px;
  background: linear-gradient(180deg, rgba(20,16,6,0) 40%, rgba(20,16,6,0.88) 100%);
  opacity: 0;
  transform: translateY(6px);
  transition: opacity 0.25s ease, transform 0.25s ease;
  pointer-events: none;
  text-align: left;
}

.portfolio-card .thumb:hover .thumb-overlay,
.portfolio-card .thumb:focus-visible .thumb-overlay {
  opacity: 1;
  transform: translateY(0);
}

.thumb-overlay .tag {
  display: inline-block;
  font-size: 11px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--color-orange);
  margin-bottom: 4px;
}

.thumb-overlay h3 {
  color: var(--color-white);
  font-size: 17px;
  margin: 0 0 4px;
}

.thumb-overlay p {
  margin: 0;
  font-size: 13px;
  color: rgba(255,255,255,0.85);
}

/* Reusable play-icon badge (circle + triangle). Used inside the lightbox
   only — the grid thumbnails stay clean and just play their preview gif. */
.play-badge {
  position: relative;
  display: block;
  width: 64px;
  height: 64px;
  border-radius: 50%;
  background: rgba(20, 16, 6, 0.55);
  backdrop-filter: blur(1px);
  transition: transform 0.2s ease, background 0.2s ease;
}

.play-badge::after {
  content: '';
  position: absolute;
  top: 50%;
  left: 50%;
  border-style: solid;
  border-width: 11px 0 11px 18px;
  border-color: transparent transparent transparent var(--color-white);
  transform: translate(-42%, -50%);
}

.portfolio-note {
  margin-top: 40px;
  padding: 20px 24px;
  border-radius: 16px;
  background: var(--color-cream);
  border: 1px solid var(--color-cream-2);
  font-size: 14.5px;
  color: var(--color-text);
}

/* ---------------- Lightbox (project video popup) ---------------- */

.lightbox {
  position: fixed;
  inset: 0;
  z-index: 200;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px;
}

.lightbox[hidden] {
  display: none;
}

.lightbox-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(15, 23, 42, 0.85);
}

.lightbox-panel {
  position: relative;
  z-index: 1;
  width: 100%;
  max-width: 760px;
  max-height: 88vh;
  display: flex;
  flex-direction: row;
  align-items: stretch;
  background: var(--color-white);
  border-radius: 20px;
  overflow: hidden;
  box-shadow: 0 30px 70px rgba(20, 16, 6, 0.45);
}

/* Landscape footage (16:9) gets a wider panel with the video sized by
   width instead of height, so it isn't squeezed into a portrait column. */
.lightbox-panel.is-landscape {
  max-width: 1100px;
}

.lightbox-close {
  position: absolute;
  top: 12px;
  right: 12px;
  z-index: 2;
  width: 36px;
  height: 36px;
  display: flex;
  align-items: center;
  justify-content: center;
  border: 0;
  border-radius: 50%;
  background: rgba(20, 16, 6, 0.55);
  color: var(--color-white);
  font-size: 20px;
  line-height: 1;
  cursor: pointer;
}

.lightbox-close:hover {
  background: var(--color-orange);
}

.lightbox-video {
  position: relative;
  flex: 0 0 auto;
  width: 340px;
  aspect-ratio: 9 / 16;
  max-height: 88vh;
  background: var(--color-ink);
}

/* Landscape variant: sized by width, centered in the row instead of
   stretched to the full panel height. */
.lightbox-panel.is-landscape .lightbox-video {
  align-self: center;
  width: min(700px, 62vw);
  aspect-ratio: 16 / 9;
  max-height: 78vh;
}

.lightbox-video video {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: contain;
}

.lightbox-play {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  border: 0;
  padding: 0;
  background: rgba(15, 23, 42, 0.15);
  cursor: pointer;
}

.lightbox-play:hover .play-badge,
.lightbox-play:focus-visible .play-badge {
  transform: scale(1.08);
  background: var(--color-orange);
}

.lightbox-play[hidden] {
  display: none;
}

.lightbox-info {
  flex: 1 1 320px;
  min-width: 260px;
  padding: 32px 36px;
  overflow-y: auto;
  display: flex;
  flex-direction: column;
  justify-content: center;
}

.lightbox-info .tag {
  display: inline-block;
  font-size: 12px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--color-orange-dark);
  margin-bottom: 6px;
}

.lightbox-info h3 {
  font-size: 20px;
  margin-bottom: 8px;
}

.lightbox-info p {
  margin: 0;
  font-size: 14.5px;
}

body.lightbox-open {
  overflow: hidden;
}

@media (max-width: 700px) {
  .lightbox { padding: 12px; }
  .lightbox-panel {
    max-width: 100%;
    max-height: 92vh;
    flex-direction: column;
    overflow-y: auto;
  }
  .lightbox-video,
  .lightbox-panel.is-landscape .lightbox-video {
    width: 100%;
    max-height: 60vh;
  }
  .lightbox-info {
    padding: 20px 24px 24px;
  }
}

/* ---------------- Footer ---------------- */

.site-footer {
  background: var(--color-white);
  color: rgba(20, 16, 6, 0.55);
  padding: 40px 0;
  border-top: 1px solid rgba(20, 16, 6, 0.08);
}

.site-footer .wrap {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  flex-wrap: wrap;
}

.site-footer .logo img { height: 64px; }

.site-footer a { color: var(--color-ink); }

.site-footer a:hover { color: var(--color-orange); }

.footer-links {
  display: flex;
  gap: 24px;
  font-size: 14px;
}

/* ---------------- Responsive ---------------- */

@media (max-width: 900px) {
  .about .wrap {
    grid-template-columns: 1fr;
  }

  .portfolio-grid .grid { grid-template-columns: repeat(2, 1fr); }
}

@media (max-width: 640px) {
  .portfolio-grid .grid { grid-template-columns: 1fr; }
}

@media (max-width: 600px) {
  /* The source video is a fixed 16:9 illustration with the character and
     wordmark placed for that wide frame — cropping it into a taller 4:5
     box (as before) cut off part of the artwork. Keep its own ratio on
     mobile instead, so the full video is always in view. */
  .hero-video { aspect-ratio: 16 / 9; }

  /* On mobile, script.js swaps in a dedicated vertical export of the video
     instead of the widescreen one — give its container that video's own
     ratio so nothing is cropped or padded. */
  .hero-video.is-vertical { aspect-ratio: 1080 / 960; }
}

@media (max-width: 720px) {
  /* The header stays transparent with the logo hidden over the hero video
     here too, same as desktop — the vertical export used on mobile already
     shows its own baked-in wordmark, so the header only needs to become
     solid (and show the logo) once the visitor scrolls past it. */
  .main-nav { position: fixed; inset: 0; top: 0; background: var(--color-white); flex-direction: column; justify-content: center; align-items: center; gap: 40px; transform: translateY(-100%); transition: transform 0.25s ease; z-index: 40; }
  .main-nav.is-open { transform: translateY(0); }
  .main-nav ul { flex-direction: column; align-items: center; gap: 28px; }
  .main-nav ul a { font-size: 22px; }
  .menu-toggle { display: flex; position: relative; z-index: 60; }
  .site-header .wrap { padding-right: 4px; }
  .header-actions .btn { display: none; }
  .nav-only-mobile { display: block; margin-top: 12px; }
  .nav-only-mobile .btn { font-size: 17px; padding: 14px 26px; }
  .hero-intro h1 { font-size: 30px; }
  .hero-intro p { font-size: 16px; }
  .about { padding: 70px 0; }
  .page-header { padding: 140px 0 40px; }
  .page-header h1 { font-size: 30px; }
}
