/* ============================================
   PORTFOLIO LAYOUT
   Layered on top of style.css.
   ============================================ */

:root {
  --ink: #1D4E52;
  --blush: #D4A5A5;
  --paper: #F7F3EF;
  --teal: #7B9E9E;
  --char: #2C2C2C;
  --rule: #e0dbd4;
}

/* larger base type — every rem size scales from this */
html { font-size: 112.5%; }
body { background: var(--paper); }

/* --- placeholder marker --- */
.ph {
  background: repeating-linear-gradient(45deg,#d8d0c6,#d8d0c6 10px,#cfc6bb 10px,#cfc6bb 20px);
  display: flex; align-items: center; justify-content: center;
  font-family: var(--font-body); font-size: 0.84rem; letter-spacing: .12em;
  text-transform: uppercase; color: #6b6156; text-align: center; padding: 1rem;
}

/* --- nav --- */
.d-nav {
  position: sticky; top: 0; z-index: 50;
  display: flex; align-items: center; justify-content: space-between;
  gap: 2rem; padding: .7rem clamp(1.25rem, 5vw, 4rem);
  background: rgba(247,243,239,.92); backdrop-filter: blur(8px);
  border-bottom: 1px solid var(--rule);
}
.d-nav-name {
  font-family: var(--font-heading); font-size: 1.35rem;
  color: var(--ink); letter-spacing: .02em; white-space: nowrap; line-height: 1.2;
}
.d-nav-name small {
  display: block; font-family: var(--font-body); font-size: 0.72rem;
  letter-spacing: .22em; text-transform: uppercase; color: var(--teal); margin-top: 0;
}
.d-nav ul { display: flex; gap: clamp(1rem,3vw,2.5rem); list-style: none; }
.d-nav a.d-link, .d-nav .d-link {
  font-size: 0.94rem; letter-spacing: .16em; text-transform: uppercase;
  color: var(--char); padding-bottom: .25rem;
  border-bottom: 1px solid transparent; transition: all .3s ease;
}
.d-nav a.d-link:hover, .d-nav a.d-link:focus-visible { border-bottom-color: var(--blush); }

/* --- hero --- */
.d-hero { position: relative; height: 78vh; min-height: 460px; overflow: hidden; background: var(--char); }
.d-hero img { width: 100%; height: 100%; object-fit: cover; }
.d-hero-cap {
  position: absolute; left: 0; right: 0; bottom: 0; padding: clamp(2rem,6vw,4.5rem);
  background: linear-gradient(to top, rgba(29,78,82,.78), rgba(29,78,82,0));
}
.d-hero-cap h1 {
  font-family: var(--font-heading); color: #fff; font-weight: 400;
  font-size: clamp(2rem, 5.5vw, 3.6rem); line-height: 1.15; max-width: 16ch;
}
.d-hero-cap p {
  color: rgba(255,255,255,.86); font-size: 0.86rem;
  letter-spacing: .26em; text-transform: uppercase; margin-top: 1rem;
}

/* --- section shell --- */
.d-sec { max-width: 1240px; margin: 0 auto; padding: clamp(2rem,4.5vw,3.25rem) clamp(1.25rem,5vw,3rem); }
.d-label {
  font-size: 1.15rem; font-weight: 500; letter-spacing: .3em; text-transform: uppercase;
  color: var(--teal); margin-bottom: 1.75rem; text-align: center;
}
.d-rule { border: 0; border-top: 1px solid var(--rule); max-width: 1240px; margin: 0 auto; }

/* --- category rows --- */
.d-cat {
  display: grid; grid-template-columns: 1fr; gap: 1.25rem;
  margin-bottom: clamp(2rem,4vw,3rem);
}
.d-cat:last-child { margin-bottom: 0; }
/* covers keep their own shape — no cropping */
.d-cat-img { position: relative; overflow: hidden; }
.d-cat-img img {
  display: block; width: auto; max-width: 100%; height: auto; max-height: 72vh;
  margin: 0 auto; transition: transform 1s ease;
}
.d-cat:hover .d-cat-img img { transform: scale(1.04); }
.d-cat-txt { align-self: center; }
.d-cat-txt h2 {
  font-family: var(--font-heading); font-size: clamp(1.6rem,3vw,2.3rem);
  font-weight: 400; color: var(--ink); line-height: 1.2;
}
.d-cat-txt .d-kicker {
  font-size: 0.79rem; letter-spacing: .24em; text-transform: uppercase;
  color: var(--teal); margin-bottom: .6rem;
}
.d-cat-txt p.d-body {
  margin-top: 1rem; max-width: 46ch; color: #4a4a4a; font-size: .98rem; line-height: 1.8;
}
.d-cat-txt a.d-more {
  display: inline-block; margin-top: 1.5rem; font-size: 0.86rem;
  letter-spacing: .2em; text-transform: uppercase; color: var(--ink);
  border-bottom: 1px solid var(--blush); padding-bottom: .3rem; transition: all .3s ease;
}
.d-cat-txt a.d-more:hover { color: var(--blush); }

@media (min-width: 820px) {
  /* image column shrinks to the photo's own width, so no empty space beside a tall cover */
  .d-cat { grid-template-columns: minmax(0,auto) minmax(18rem,1fr); gap: clamp(2rem,3.5vw,3rem); align-items: center; }
  .d-cat.flip .d-cat-img { order: 2; }
  .d-cat.flip .d-cat-txt { order: 1; }
}

/* --- about --- */
.d-about { background: #efe9e2; }
.d-about-in {
  max-width: 1240px; margin: 0 auto; display: grid; grid-template-columns: 1fr; gap: 2.5rem;
  padding: clamp(3.5rem,8vw,6rem) clamp(1.25rem,5vw,3rem); align-items: center;
}

.d-about-photo img { width: 100%; height: 100%; object-fit: cover; }
.d-about-txt h2 {
  font-family: var(--font-heading); font-weight: 400;
  font-size: clamp(1.8rem,3.5vw,2.6rem); color: var(--ink); line-height: 1.2;
}
.d-about-txt p { margin-top: 1.1rem; max-width: 52ch; color: #4a4a4a; line-height: 1.85; }
.d-about-photo { aspect-ratio: 16/7; }
.d-about-txt { max-width: 68ch; margin: 0 auto; text-align: center; }
.d-about-txt p { text-wrap: pretty; font-size: 1.05rem; }
.d-about-txt .d-lead, .d-about-txt .d-close, .d-about-txt .d-close-2 { text-wrap: balance; }
/* each list line stays on one line */
.d-about-txt .d-list { max-width: none; font-size: 1.05rem; }
@media (min-width: 940px) { .d-about-txt .d-list { white-space: nowrap; } }
.d-about-txt p { margin-left: auto; margin-right: auto; }
.d-about-txt .d-lead {
  font-family: var(--font-heading); font-size: clamp(1.25rem,2.4vw,1.65rem);
  color: var(--ink); line-height: 1.45;
}
.d-about-txt .d-list { color: #4a4a4a; line-height: 2; }
.d-about-txt .d-close {
  font-family: var(--font-heading); font-size: clamp(1.35rem,2.6vw,1.85rem);
  color: var(--ink); border-top: 1px solid var(--rule); padding-top: 1.75rem; margin-top: 2rem;
}
.d-about-txt .d-close-2 {
  font-family: var(--font-heading); font-size: clamp(1.35rem,2.6vw,1.85rem);
  color: var(--ink); margin-top: .5rem;
}

/* --- contact --- */
.d-contact { text-align: center; }
.d-contact h2 {
  font-family: var(--font-heading); font-weight: 400;
  font-size: clamp(1.5rem,3vw,2.1rem); color: var(--ink);
}
.d-contact > p { margin: .5rem auto 1.5rem; max-width: 44ch; color: #4a4a4a; font-size: .92rem; }
.d-form { max-width: 440px; margin: 0 auto; display: grid; gap: .75rem; text-align: left; }
.d-form label {
  font-size: 0.79rem; letter-spacing: .2em; text-transform: uppercase;
  color: var(--teal); display: block; margin-bottom: .3rem; font-size: .7rem;
}
.d-form input, .d-form textarea {
  width: 100%; padding: .55rem .75rem; font-family: var(--font-body); font-size: .9rem;
  color: var(--char); background: #fff; border: 1px solid var(--rule);
  border-radius: 0; transition: border-color .3s ease;
}
.d-form input:focus, .d-form textarea:focus { outline: none; border-color: var(--blush); }
.d-form textarea { min-height: 90px; resize: vertical; }
.d-btn {
  justify-self: start; margin-top: .25rem; padding: .65rem 1.8rem;
  font-family: var(--font-body); font-size: 0.76rem; letter-spacing: .2em;
  text-transform: uppercase; color: var(--paper); background: var(--ink);
  border: 1px solid var(--ink); border-radius: 999px; cursor: pointer; transition: all .3s ease;
}
.d-btn:hover { background: transparent; color: var(--ink); }

/* --- footer --- */
.d-foot {
  background: var(--ink); color: rgba(247,243,239,.85);
  padding: clamp(1.1rem,2.5vw,1.5rem) clamp(1.25rem,5vw,3rem) .9rem;
  display: flex; flex-wrap: wrap; gap: .75rem 1.5rem;
  align-items: center; justify-content: space-between;
}
.d-foot .d-foot-name { font-family: var(--font-heading); font-size: 1.25rem; color: var(--paper); }
.d-foot .d-foot-name span {
  display: block; font-family: var(--font-body); font-size: 0.74rem;
  letter-spacing: .22em; text-transform: uppercase; color: var(--blush); margin-top: .3rem;
}
.d-social { display: flex; gap: 1.75rem; }
.d-social { align-items: center; gap: 1.25rem; }
.d-social a { display: inline-flex; color: rgba(247,243,239,.85); transition: color .3s ease; }
.d-social a:hover, .d-social a:focus-visible { color: var(--blush); }


/* --- hero carousel --- */
.d-slides { position: absolute; inset: 0; }
.d-slide {
  position: absolute; inset: 0; opacity: 0;
  transition: opacity .8s ease; pointer-events: none;
}
.d-slide.is-on { opacity: 1; }
.d-slide { overflow: hidden; }
/* blurred copy of the same photo fills the space, so no photo gets cropped */
.d-slide-bg {
  position: absolute; inset: -60px;
  background-position: center; background-size: cover; background-repeat: no-repeat;
  filter: blur(32px) brightness(.72) saturate(1.1);
}
.d-slide img { position: relative; width: 100%; height: 100%; object-fit: contain; }
.d-arrow {
  position: absolute; top: 50%; transform: translateY(-50%); z-index: 3;
  width: 44px; height: 44px; display: grid; place-items: center;
  font-size: 1.1rem; color: #fff; background: rgba(29,78,82,.28);
  border: 1px solid rgba(255,255,255,.35); cursor: pointer;
  opacity: 0; transition: all .3s ease;
}
.d-hero:hover .d-arrow, .d-arrow:focus-visible { opacity: 1; }
.d-arrow:hover { background: rgba(29,78,82,.6); }
.d-prev { left: clamp(.75rem,2vw,1.5rem); }
.d-next { right: clamp(.75rem,2vw,1.5rem); }
.d-dots {
  position: absolute; z-index: 3; bottom: clamp(1rem,3vw,1.75rem);
  left: 0; right: 0; display: flex; gap: .6rem; justify-content: center;
}
.d-dots button {
  width: 7px; height: 7px; border-radius: 50%; padding: 0; cursor: pointer;
  background: rgba(255,255,255,.4); border: 0; transition: all .3s ease;
}
.d-dots button.is-on { background: var(--blush); transform: scale(1.4); }
.d-hero-cap { z-index: 2; }
@media (max-width: 640px) { .d-hero { height: 62vh; } .d-arrow { display: none; } .d-hero-cap p { letter-spacing: .14em; } }
@media (prefers-reduced-motion: reduce) { .d-slide { transition: none; } }


/* --- mobile hamburger --- */
.d-burger { display: none; }
@media (max-width: 767px) {
  .d-nav { position: relative; }
  .d-burger {
    display: grid; gap: 5px; width: 30px; padding: 6px 2px;
    background: none; border: 0; cursor: pointer; z-index: 60;
  }
  .d-burger span {
    display: block; height: 1.5px; width: 100%;
    background: var(--ink); transition: transform .3s ease, opacity .2s ease;
  }
  .d-burger[aria-expanded="true"] span:nth-child(1) { transform: translateY(6.5px) rotate(45deg); }
  .d-burger[aria-expanded="true"] span:nth-child(2) { opacity: 0; }
  .d-burger[aria-expanded="true"] span:nth-child(3) { transform: translateY(-6.5px) rotate(-45deg); }

  .d-nav ul {
    position: absolute; top: 100%; left: 0; right: 0;
    flex-direction: column; align-items: center; gap: 0;
    background: var(--paper); border-bottom: 1px solid var(--rule);
    max-height: 0; overflow: hidden; transition: max-height .35s ease;
  }
  .d-nav ul.is-open { max-height: 60vh; }
  .d-nav ul li { width: 100%; text-align: center; }
  .d-nav ul li + li { border-top: 1px solid var(--rule); }
  .d-nav a.d-link {
    display: block; padding: 1.15rem 1rem; font-size: .82rem;
    border-bottom: 0;
  }
}

/* --- draft banner --- */

/* --- dropdown nav --- */
.d-nav .d-drop { position: relative; }
.d-nav button.d-link {
  font-family: var(--font-body); background: none; border: 0; cursor: pointer;
  font-size: 0.94rem; letter-spacing: .16em; text-transform: uppercase;
  color: var(--char); padding: 0 0 .25rem;
  border-bottom: 1px solid transparent; transition: all .3s ease;
}
.d-nav button.d-link:hover { border-bottom-color: var(--blush); }
.d-nav a.d-link[aria-current="page"] { border-bottom-color: var(--blush); }

.d-drop-m {
  position: absolute; top: 100%; left: 50%; transform: translateX(-50%) translateY(-6px);
  min-width: 230px; padding: .5rem 0; margin-top: .75rem;
  background: var(--paper); border: 1px solid var(--rule);
  opacity: 0; visibility: hidden; transition: all .28s ease;
}
.d-drop:hover .d-drop-m,
.d-drop:focus-within .d-drop-m {
  opacity: 1; visibility: visible; transform: translateX(-50%) translateY(0);
}
.d-drop-m a {
  display: block; padding: .65rem 1.4rem; font-size: 0.89rem;
  letter-spacing: .12em; text-transform: uppercase; color: var(--char);
  white-space: nowrap; transition: all .25s ease;
}
.d-drop-m a:hover { background: #efe9e2; color: var(--ink); }

/* --- about page --- */
.d-about-page { background: var(--paper); }
.d-about-page .d-about-in { padding-top: clamp(2.5rem,6vw,4rem); }

@media (max-width: 767px) {
  .d-nav button.d-link {
    display: block; width: 100%; padding: 1.15rem 1rem;
    font-size: .82rem; border-bottom: 0;
  }
  .d-drop-m {
    position: static; transform: none; opacity: 1; visibility: visible;
    min-width: 0; margin: 0; padding: 0; border: 0; background: #efe9e2;
    max-height: 0; overflow: hidden; transition: max-height .3s ease;
  }
  .d-drop.is-open .d-drop-m { max-height: 320px; }
  /* tapping focuses the menu, which picked up the desktop slide-in and shifted it half off to the left */
  .d-drop:hover .d-drop-m,
  .d-drop:focus-within .d-drop-m { transform: none; }
  .d-drop-m a { padding: .95rem 1rem; font-size: 0.91rem; }
  .d-drop-t::after { content: " ▾"; opacity: .5; }
  .d-drop.is-open .d-drop-t::after { content: " ▴"; }
}

/* --- gallery + project pages --- */
.d-page-head {
  max-width: 1000px; margin: 0 auto;
  padding: clamp(1rem,2.5vw,1.6rem) clamp(1.25rem,5vw,3rem) clamp(.6rem,1.5vw,1rem);
  text-align: center;
}
.d-page-head h1 {
  font-family: var(--font-heading); font-weight: 400;
  font-size: clamp(2rem,5vw,3.2rem); color: var(--ink); line-height: 1.15;
}
.d-page-head .d-kicker {
  font-size: 0.79rem; letter-spacing: .24em; text-transform: uppercase;
  color: var(--teal); margin-bottom: .3rem;
}
.d-page-blurb {
  margin: .6rem auto 0; max-width: none;
  color: #4a4a4a; font-size: 1.02rem; line-height: 1.65;
  text-wrap: balance; /* no short leftover line at the end */
}
.d-project-head { max-width: 760px; text-align: left; }
.d-project-head p {
  margin-top: 1.2rem; color: #4a4a4a; line-height: 1.9; text-wrap: pretty;
}

.d-grid-wrap { max-width: none; margin: 0 auto; padding: 0 6px clamp(2rem,5vw,3.5rem); }
.d-grid { columns: 1; column-gap: 6px; }
@media (min-width: 620px)  { .d-grid { columns: 2; } }
@media (min-width: 1024px) { .d-grid { columns: 4; } }
@media (min-width: 1600px) { .d-grid { columns: 5; } }

.d-tile {
  break-inside: avoid; margin: 0 0 6px; position: relative;
  overflow: hidden; background: var(--card-bg);
}
.d-tile img {
  width: 100%; height: auto; display: block; cursor: pointer;
  transition: transform .9s ease, opacity .4s ease;
}
.d-tile:hover img { transform: scale(1.03); }

/* photo not on disk yet — hold the space instead of showing a broken icon */
.d-tile-missing {
  min-height: 280px;
  background: repeating-linear-gradient(45deg,#d8d0c6,#d8d0c6 10px,#cfc6bb 10px,#cfc6bb 20px);
}
.d-tile-missing img { min-height: 280px; object-fit: cover; }

/* --- about page: vertical photo left, text right --- */
.d-about-page .d-about-in {
  grid-template-columns: 1fr;
  gap: clamp(2rem,5vw,3.5rem);
  align-items: start;
}
.d-about-page .d-about-photo {
  aspect-ratio: 4/5;
  max-width: 360px;
  width: 100%;
  margin: 0 auto;
  align-self: start;
}
.d-about-page .d-about-txt {
  max-width: 60ch;
  margin: 0 auto;
  text-align: center;
}

@media (min-width: 900px) {
  .d-about-page .d-about-in {
    grid-template-columns: minmax(260px, 340px) 1fr;
    gap: clamp(2.5rem,5vw,4.5rem);
  }
  .d-about-page .d-about-photo {
    margin: 0;
    position: sticky;
    top: 6.5rem;
  }
}

/* film stock label: bottom-left corner, shows on hover */
.d-cap {
  position: absolute; left: 0; bottom: 0; padding: .9rem .75rem .5rem 3.5rem;
  padding-left: .7rem; font-family: var(--font-body); font-size: .72rem; letter-spacing: .14em;
  text-transform: uppercase; color: #fff; pointer-events: none;
  background: linear-gradient(to top right, rgba(0,0,0,.55), rgba(0,0,0,0) 70%);
  opacity: 0; transition: opacity .3s ease;
}
.d-tile:hover .d-cap { opacity: 1; }
/* sub-section heading inside a gallery page (e.g. Corporate Events) */
.d-sub-head { padding-top: .75rem; }
.d-sub-head h2 { font-family: var(--font-heading); font-weight: 400; font-size: clamp(1.6rem,3.4vw,2.2rem); }
/* about photo */
.d-about-photo img { width: 100%; height: 100%; object-fit: cover; display: block; }

/* --- homepage gallery: covers side by side, same row height, each at its own shape --- */
.d-gal-sec { max-width: 1400px; }
.d-gal-row { display: flex; flex-direction: column; gap: clamp(.5rem,1vw,.85rem); margin-bottom: clamp(.5rem,1vw,.85rem); }
.d-gal-tile { position: relative; display: block; overflow: hidden; flex-basis: 0; }
.d-gal-tile img { display: block; width: 100%; height: auto; transition: transform 1s ease; }
.d-gal-tile:hover img { transform: scale(1.03); }
.d-gal-cap {
  position: absolute; left: 0; right: 0; bottom: 0;
  padding: 2.5rem 1.25rem 1rem; color: #fff;
  font-family: var(--font-heading); font-size: clamp(1.4rem,2.4vw,2rem); line-height: 1.15;
  background: linear-gradient(to top, rgba(29,78,82,.75), rgba(29,78,82,0));
}
.d-gal-cap small {
  display: block; margin-bottom: .35rem; font-family: var(--font-body);
  font-size: .78rem; letter-spacing: .22em; text-transform: uppercase; color: rgba(255,255,255,.85);
}
@media (min-width: 700px) { .d-gal-row { flex-direction: row; } }
@media (max-width: 699px) { .d-gal-tile { flex: none !important; } }

/* --- contact: photo on one side, form on the other --- */
.d-contact-split { max-width: 1400px; display: grid; gap: clamp(1.5rem,3vw,2.5rem); align-items: center; }
.d-contact-photo img { display: block; width: auto; max-width: 100%; height: auto; max-height: 78vh; margin-left: auto; border-radius: 28px; }
.d-contact-body { text-align: left; }
.d-contact-split > .d-contact-body > p { margin: .5rem 0 1.5rem; max-width: 44ch; color: #4a4a4a; font-size: .92rem; }
.d-contact-split .d-form { margin: 0; max-width: 520px; }
@media (min-width: 820px) { .d-contact-split { grid-template-columns: minmax(0,1fr) minmax(0,1.1fr); } }

/* copyright line under the footer */
.d-copy {
  flex-basis: 100%; margin-top: .25rem; padding-top: .7rem; border-top: 1px solid rgba(247,243,239,.15);
  font-size: .72rem; letter-spacing: .08em; color: rgba(247,243,239,.6);
}
/* tighter contact section */
.d-contact-split { padding-top: clamp(1.25rem,3vw,2rem); padding-bottom: clamp(1.5rem,3vw,2.25rem); gap: clamp(1.25rem,2.5vw,2rem); }
.d-contact-split .d-form { gap: .6rem; }

/* film page: content groups, no titles — just a pause between them */
.d-film-group { padding-bottom: 1rem; }
.d-film-group + .d-film-group { border-top: 1px solid var(--rule); padding-top: 1rem; }

/* row-order grid (Moments): real columns built by portfolio.js */
.d-grid.is-flow { columns: auto; display: flex; gap: 6px; align-items: flex-start; }
.d-col { flex: 1; min-width: 0; }
.d-grid.is-flow { flex-wrap: wrap; row-gap: 0; }
/* last few photos of a group, spread edge to edge so no column ends short */
.d-finish { flex: 0 0 100%; display: flex; gap: 6px; }
.d-finish .d-tile { min-width: 0; }

/* film stock label in the lightbox, under the photo */
.lightbox-figure { flex-direction: column; gap: .7rem; }
.lightbox-figure .lightbox-img { max-height: 82vh; }
.lightbox-cap {
  font-family: var(--font-body); font-size: .74rem; letter-spacing: .16em;
  text-transform: uppercase; color: rgba(255,255,255,.78); text-align: center;
}

/* panoramic frames: full width, stacked close together (Sports) */
.d-wide-band { display: flex; flex-direction: column; gap: 6px; margin: 0 0 6px; }
.d-wide-band .d-tile { margin: 0; }

/* keeps a short phrase on one line (About: "The ordinary moments.") */
.d-keep { white-space: nowrap; }

/* smallest phones (320–360px): name + subtitle were pushing the menu button off the edge */
.d-burger { flex-shrink: 0; }
@media (max-width: 360px) {
  .d-nav { gap: .75rem; }
  .d-nav-name { font-size: 1.2rem; }
  .d-nav-name small { font-size: .64rem; letter-spacing: .14em; }
}

/* contact form: hidden spam trap + the sent / error line under the button */
.d-hp { position: absolute; left: -9999px; width: 1px; height: 1px; overflow: hidden; }
.d-form-status { margin: .25rem 0 0; font-size: .9rem; color: var(--ink); min-height: 1.4em; }
.d-form-status.is-error { color: #9b3b3b; }
.d-form-status a { color: inherit; text-decoration: underline; }
.d-form button[disabled] { opacity: .6; cursor: default; }

/* Together is Better: copy centered on phones (her call, Sep 26); stays left-aligned on desktop */
@media (max-width: 767px) {
  .d-project-head, .d-project-head p { text-align: center; margin-left: auto; margin-right: auto; }
}
