/* ============================================
   TOKENS
   ============================================ */
:root {
  --paper: #f2d1e3;
  --ink: #1a1720;
  --stone: #8c7480;
  --line: #e6bdd1;
  --accent: #1b2aff;
  --accent-soft: #e8eaff;

  --serif: "Fraunces", "Iowan Old Style", serif;
  --serif-alt: "Source Serif 4", "Source Serif Pro", serif;
  --sans: "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;

  --gutter: clamp(20px, 4vw, 56px);
  --max: 1400px;
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; }

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  * { animation-duration: 0.01ms !important; transition-duration: 0.01ms !important; }
}

body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: var(--sans);
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

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

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

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

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

/* ============================================
   HEADER / NAV
   ============================================ */
.site-header {
  position: sticky;
  top: 0;
  z-index: 40;
  background: var(--paper);
  border-bottom: 1px solid var(--line);
}

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

.wordmark {
  font-family: var(--serif);
  font-weight: 500;
  font-size: 20px;
  letter-spacing: -0.01em;
}

.main-nav {
  display: flex;
  align-items: center;
  gap: clamp(18px, 3vw, 36px);
  font-size: 15px;
}

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

.main-nav a::after {
  content: "";
  position: absolute;
  left: 0;
  right: 100%;
  bottom: -2px;
  height: 1px;
  background: var(--accent);
  transition: right 0.25s ease;
}

.main-nav a:hover::after,
.main-nav a[aria-current="page"]::after {
  right: 0;
}

.main-nav a[aria-current="page"] {
  color: var(--accent);
}

.nav-toggle {
  display: none;
  background: none;
  border: none;
  font-family: var(--sans);
  font-size: 15px;
  cursor: pointer;
  color: var(--ink);
}

@media (max-width: 720px) {
  .nav-toggle { display: block; }
  .main-nav {
    display: none;
    position: absolute;
    top: 72px;
    left: 0;
    right: 0;
    background: var(--paper);
    border-bottom: 1px solid var(--line);
    flex-direction: column;
    align-items: flex-start;
    gap: 0;
    padding: 8px var(--gutter) 20px;
  }
  .main-nav.open { display: flex; }
  .main-nav a {
    width: 100%;
    padding: 12px 0;
    border-bottom: 1px solid var(--line);
  }
  .main-nav a:last-child { border-bottom: none; }
}

/* ============================================
   PLACEHOLDER IMAGE BLOCKS
   ============================================ */
.ph {
  position: relative;
  overflow: hidden;
  background:
    repeating-linear-gradient(135deg, rgba(26,23,32,0.05) 0 1px, transparent 1px 14px),
    linear-gradient(155deg, #f3e1e6, #ecc9d3 55%, #f2e2e7);
  display: flex;
  align-items: flex-end;
  min-height: 160px;
}

.ph::before {
  content: "";
  position: absolute;
  inset: 0;
  border: 1px solid var(--line);
}

.ph-label {
  position: relative;
  margin: 14px;
  font-size: 11px;
  letter-spacing: 0.03em;
  color: var(--stone);
  background: var(--paper);
  border: 1px solid var(--line);
  padding: 5px 9px;
  font-family: var(--sans);
}

/* ============================================
   FOOTER
   ============================================ */
.site-footer {
  border-top: 1px solid var(--line);
  margin-top: clamp(60px, 10vw, 120px);
}

.site-footer .wrap {
  padding-top: 48px;
  padding-bottom: 48px;
  display: flex;
  flex-wrap: wrap;
  gap: 32px;
  justify-content: space-between;
  align-items: flex-end;
}

.footer-headline {
  font-family: var(--sans);
  font-style: normal;
  font-size: clamp(24px, 3vw, 34px);
  max-width: 480px;
  line-height: 1.25;
  font-weight: 700;
  letter-spacing: -0.02em;
}

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

.footer-links a { color: var(--stone); }
.footer-links a:hover { color: var(--accent); }

.footer-meta {
  padding-bottom: 32px;
  font-size: 13px;
  color: var(--stone);
  display: flex;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 8px;
}

/* ============================================
   GALLERY PAGE HEADER
   ============================================ */
.page-hero {
  padding-top: clamp(48px, 8vw, 88px);
  padding-bottom: clamp(32px, 6vw, 56px);
  border-bottom: 1px solid var(--line);
}

.page-kicker {
  font-size: 14px;
  color: var(--accent);
  font-family: var(--sans);
  margin-bottom: 14px;
}

a.page-kicker {
  display: inline-block;
  text-decoration: none;
}

a.page-kicker:hover,
a.page-kicker:focus-visible {
  text-decoration: underline;
}

.page-title {
  font-family: var(--sans);
  font-weight: 800;
  font-size: clamp(34px, 4.6vw, 54px);
  line-height: 1.05;
  letter-spacing: -0.02em;
  max-width: 22ch;
  font-style: normal;
}

.page-intro {
  margin-top: 20px;
  max-width: 52ch;
  font-size: 17px;
  color: var(--stone);
  line-height: 1.6;
}

.project-heading {
  font-family: var(--serif);
  font-style: italic;
  font-weight: 400;
  font-size: clamp(22px, 2.6vw, 30px);
  margin: 48px 0 0;
}

/* ============================================
   MASONRY (respects each image's natural ratio —
   used for project-cards and project photo galleries)
   ============================================ */
.masonry {
  columns: 3 280px;
  column-gap: clamp(16px, 2.4vw, 28px);
  padding-top: clamp(40px, 6vw, 64px);
  padding-bottom: clamp(20px, 4vw, 40px);
}

.masonry-item {
  display: block;
  break-inside: avoid;
  margin: 0 0 clamp(16px, 2.4vw, 28px);
  border: 1px solid var(--line);
  overflow: hidden;
}

.masonry-item img {
  width: 100%;
  height: auto;
  display: block;
  cursor: pointer;
}

/* ============================================
   SLIDES STRIP (horizontal filmstrip variant of .masonry —
   full pages shown edge to edge, no section labels)
   ============================================ */
.slides-strip.masonry {
  columns: unset;
  display: flex;
  flex-wrap: nowrap;
  align-items: flex-start;
  overflow-x: auto;
  gap: clamp(12px, 1.6vw, 20px);
  padding-top: clamp(24px, 4vw, 40px);
  padding-bottom: clamp(24px, 4vw, 40px);
  -webkit-overflow-scrolling: touch;
}

.slides-strip .masonry-item {
  flex: 0 0 auto;
  break-inside: unset;
  margin: 0;
}

.slides-strip .masonry-item img {
  height: 72vh;
  width: auto;
  max-width: none;
}

/* Phone: each page is sized to the screen width (never wider),
   swipe sideways and it snaps page by page */
@media (max-width: 720px) {
  .slides-strip.masonry {
    scroll-snap-type: x mandatory;
    scroll-padding-left: var(--gutter);
  }
  .slides-strip .masonry-item {
    scroll-snap-align: start;
  }
  .slides-strip .masonry-item img {
    width: calc(100vw - 2 * var(--gutter));
    height: auto;
    max-height: 70vh;
    object-fit: contain;
  }
}

/* ============================================
   LIGHTBOX (click a masonry image to open; swipe/keys to navigate, no arrows shown)
   ============================================ */
.lightbox {
  position: fixed;
  inset: 0;
  background: rgba(22, 21, 27, 0.94);
  display: none;
  align-items: center;
  justify-content: center;
  z-index: 200;
}

.lightbox.open { display: flex; }

.lightbox-image {
  max-width: 92vw;
  max-height: 88vh;
  width: auto;
  height: auto;
  object-fit: contain;
  user-select: none;
  -webkit-user-select: none;
  touch-action: pan-y;
  cursor: pointer;
}

.lightbox-close {
  position: absolute;
  top: 18px;
  right: 18px;
  width: 40px;
  height: 40px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 999px;
  background: rgba(251, 250, 247, 0.9);
  border: 1px solid var(--line);
  font-family: var(--sans);
  font-size: 18px;
  line-height: 1;
  color: var(--ink);
  cursor: pointer;
}
.lightbox-close:hover { background: #fff; }

.lightbox-counter {
  position: absolute;
  bottom: 20px;
  left: 50%;
  transform: translateX(-50%);
  font-family: var(--sans);
  font-size: 12px;
  color: #fff;
  background: rgba(22, 21, 27, 0.55);
  padding: 3px 10px;
}

/* ============================================
   PROJECT CARDS (category index pages)
   ============================================ */
.project-cards {
  columns: 4 230px;
  column-gap: clamp(24px, 3vw, 40px);
  padding-top: clamp(40px, 6vw, 64px);
  padding-bottom: clamp(20px, 4vw, 40px);
}

.project-card {
  display: block;
  break-inside: avoid;
  margin-bottom: clamp(30px, 3.6vw, 46px);
}

.project-card-cover {
  position: relative;
  display: block;
  border: 1px solid var(--line);
  overflow: hidden;
}

.project-card-cover img {
  width: 100%;
  height: auto;
  display: block;
}

.project-card-cover .ph {
  aspect-ratio: 4 / 5;
  width: 100%;
}

.project-card-name {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: flex-end;
  justify-content: center;
  margin: 0;
  padding: 20px 16px;
  text-align: center;
  background: linear-gradient(180deg, rgba(22, 21, 27, 0) 55%, rgba(22, 21, 27, 0.6) 100%);
  color: #fff;
  font-family: var(--serif);
  font-style: normal;
  font-weight: 400;
  font-size: clamp(18px, 2vw, 22px);
  opacity: 0;
  transition: opacity 0.25s ease;
  letter-spacing: 0;
}

.project-card:hover .project-card-name,
.project-card:focus-visible .project-card-name { opacity: 1; }

/* Touch screens (no hover): title sits as a small caption under the photo,
   so the image stays clean */
@media (hover: none), (pointer: coarse) {
  .project-card-cover { border: 0; overflow: visible; }
  .project-card-cover img { border: 1px solid var(--line); }
  .project-card-name {
    position: static;
    inset: auto;
    display: block;
    opacity: 1;
    background: none;
    color: var(--ink);
    padding: 8px 0 0;
    text-align: left;
    font-size: 15px;
    line-height: 1.3;
  }
}

/* ============================================
   CREATIVE VISION (design tab opener, mirrors the old site)
   ============================================ */
.cv {
  padding-top: clamp(40px, 7vw, 72px);
  padding-bottom: clamp(24px, 4vw, 40px);
}

.cv-heading {
  font-family: var(--sans);
  font-weight: 800;
  font-style: normal;
  letter-spacing: -0.01em;
  font-size: clamp(34px, 4.6vw, 54px);
  margin: 0 0 24px;
}

.cv-text {
  font-family: var(--serif);
  font-weight: 400;
  font-size: clamp(17px, 1.6vw, 20px);
  line-height: 1.6;
  color: var(--ink);
  max-width: 68ch;
  margin: 0;
}

.cv-quote {
  padding-top: clamp(16px, 3vw, 28px);
  padding-bottom: clamp(32px, 5vw, 56px);
}

.cv-quote-row {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: clamp(32px, 6vw, 96px);
}

.cv-media {
  flex: 0 1 520px;
  aspect-ratio: 16 / 9;
}

.cv-media img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
  border: 1px solid var(--line);
}

.cv-lines {
  flex: 1 1 260px;
  font-family: var(--sans);
  font-weight: 700;
  font-style: normal;
  font-size: clamp(21px, 2.4vw, 27px);
  line-height: 1.6;
  color: var(--ink);
  margin: 0;
}

/* ============================================
   SECTION HEADING (labeled sub-sections within a project page)
   ============================================ */
.section-heading {
  font-family: var(--serif);
  font-style: italic;
  font-weight: 400;
  font-size: clamp(20px, 2.2vw, 26px);
  margin: 0 0 18px;
}

/* ============================================
   VIDEO EMBED (music videos, short films)
   ============================================ */
.video-embed {
  position: relative;
  width: 100%;
  aspect-ratio: 16 / 9;
  background: #000;
  overflow: hidden;
}

.video-embed iframe {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  border: 0;
  display: block;
}

/* ============================================
   PROJECT META (type / date / location)
   ============================================ */
.meta-facts {
  margin: 22px 0 0;
  max-width: 480px;
  display: grid;
  gap: 10px;
}

.meta-facts > div {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  border-bottom: 1px solid var(--line);
  padding-bottom: 10px;
  font-size: 14px;
}

.meta-facts dt { color: var(--stone); margin: 0; }
.meta-facts dd { margin: 0; text-align: right; }

.back-link {
  display: inline-block;
  margin-top: 28px;
  font-size: 14px;
  color: var(--stone);
  text-decoration: underline;
  text-underline-offset: 0.15em;
}
.back-link:hover { color: var(--accent); }

/* ============================================
   GALLERY GRID (shared skeleton, density varies per page)
   ============================================ */
.gallery {
  padding-top: clamp(40px, 6vw, 64px);
  padding-bottom: clamp(20px, 4vw, 40px);
  display: grid;
  gap: clamp(16px, 2.4vw, 28px);
}

.g-cap {
  margin-top: 10px;
  display: flex;
  justify-content: space-between;
  gap: 12px;
  font-size: 14px;
}

.g-name { font-weight: 600; }
.g-tag { color: var(--stone); }

/* ============================================
   BUTTON / LINK-AS-BUTTON
   ============================================ */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  border: 1px solid var(--ink);
  padding: 12px 22px;
  font-size: 14px;
  font-family: var(--sans);
  background: transparent;
  transition: background 0.2s ease, color 0.2s ease, border-color 0.2s ease;
}

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

/* Video tile inside a masonry gallery (muted looping clip; not part of the lightbox) */
.masonry-video video {
  width: 100%;
  height: auto;
  display: block;
  background: #000;
}


/* ============================================
   CONTACT PAGE (Netlify Forms, emails Melina)
   ============================================ */
.contact {
  max-width: 720px;
  padding-top: clamp(56px, 10vh, 120px);
  padding-bottom: clamp(24px, 6vh, 64px);
}

.contact-heading {
  font-family: var(--sans);
  font-style: normal;
  font-weight: 800;
  font-size: clamp(36px, 5vw, 56px);
  line-height: 1.1;
  margin: 0 0 clamp(28px, 5vh, 44px);
  letter-spacing: -0.02em;
}

.contact-intro {
  font-family: var(--serif);
  font-size: clamp(17px, 1.6vw, 20px);
  line-height: 1.6;
  margin: 0 0 clamp(32px, 5vh, 48px);
  max-width: 52ch;
}

.contact-form { display: grid; gap: 28px; }
.contact-row { display: grid; grid-template-columns: 1fr 1fr; gap: 28px; }
@media (max-width: 600px) { .contact-row { grid-template-columns: 1fr; } }

.contact-field { display: grid; gap: 8px; }
.contact-field span {
  font-family: var(--sans);
  font-size: 13px;
  color: var(--stone);
}

.contact-field input,
.contact-field select,
.contact-field textarea {
  font: inherit;
  font-family: var(--serif);
  font-size: 18px;
  color: var(--ink);
  background: transparent;
  border: 0;
  border-bottom: 1px solid var(--ink);
  border-radius: 0;
  padding: 8px 0;
  width: 100%;
  -webkit-appearance: none;
  appearance: none;
}

.contact-field textarea {
  border: 1px solid var(--ink);
  padding: 12px;
  resize: vertical;
  min-height: 150px;
}

.contact-field select {
  cursor: pointer;
  background-image: linear-gradient(45deg, transparent 50%, var(--ink) 50%), linear-gradient(135deg, var(--ink) 50%, transparent 50%);
  background-position: calc(100% - 12px) 55%, calc(100% - 7px) 55%;
  background-size: 5px 5px;
  background-repeat: no-repeat;
}

.contact-field input:focus,
.contact-field select:focus,
.contact-field textarea:focus {
  outline: none;
  border-color: var(--accent);
}

.contact-send {
  justify-self: start;
  font-family: var(--sans);
  font-size: 15px;
  color: #fff;
  background: var(--ink);
  border: 0;
  padding: 14px 28px;
  cursor: pointer;
  transition: background 0.2s ease;
}
.contact-send:hover, .contact-send:focus-visible { background: var(--accent); }
.contact-send:disabled { opacity: 0.6; cursor: default; }

.contact-status { margin: 0; font-size: 15px; min-height: 1.4em; }
.contact-status.is-error { color: #a4133c; }

.contact-alt {
  margin-top: clamp(32px, 6vh, 56px);
  font-size: 15px;
  color: var(--stone);
}
.contact-alt a { color: var(--ink); text-decoration: underline; text-underline-offset: 0.15em; }
.contact-alt a:hover { color: var(--accent); }

.contact-hp { position: absolute; left: -9999px; }

.footer-headline em { font-style: normal; }
.footer-headline a { font-family: var(--serif); font-style: italic; font-weight: 400; letter-spacing: 0; }
.footer-headline a { text-decoration: underline; text-underline-offset: 0.12em; }
.footer-headline a:hover { color: var(--accent); }


/* Multi-section project pages (e.g. Designs / Development / Final product) */
.project-section { padding-top: clamp(32px, 5vw, 56px); }
.project-section + .project-section { border-top: 1px solid var(--line); margin-top: clamp(16px, 3vw, 32px); }
.project-section-heading {
  font-family: var(--sans);
  font-weight: 800;
  letter-spacing: -0.02em;
  font-size: clamp(24px, 2.6vw, 32px);
  line-height: 1.1;
  margin: 0;
}
.project-section .masonry,
.project-section .slides-strip.masonry { padding-top: clamp(16px, 2.4vw, 28px); }
