/* ==========================================================================
   Kaushan Photography
   ========================================================================== */

:root {
  --cream: #f6f3ed;
  --cream-hot: #fefee9;
  --ink: #141414;
  --ink-soft: #5e5c58;
  --line: rgba(20, 20, 20, 0.12);
  --line-strong: rgba(20, 20, 20, 0.28);
  --accent: #8d0b0b;
  --header-h: 4.75rem;
  --pad: clamp(1.15rem, 3.5vw, 3.5rem);
  --pad-y: clamp(3.5rem, 10vw, 8.5rem);
  --gap: clamp(0.4rem, 0.75vw, 0.7rem);
  --max: 96rem;
  --measure: 38rem;
  --serif: "Cormorant Garamond", "Times New Roman", Times, serif;
  --sans: "Inter Tight", "Helvetica Neue", Helvetica, Arial, sans-serif;
  --ease: cubic-bezier(0.22, 1, 0.36, 1);
}

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

html {
  font-size: 100%;
  -webkit-text-size-adjust: 100%;
  scroll-behavior: smooth;
}

html, body {
  margin: 0;
  padding: 0;
  background: var(--cream);
  color: var(--ink);
}

body {
  font-family: var(--sans);
  font-weight: 400;
  font-size: 1rem;
  line-height: 1.6;
  letter-spacing: 0.005em;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

img, picture, video { display: block; max-width: 100%; height: auto; }
img { background: #e8e4dc; }
button, a { -webkit-tap-highlight-color: transparent; }

a {
  color: inherit;
  text-decoration-thickness: 1px;
  text-underline-offset: 0.22em;
}

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

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

.skip-link {
  position: absolute;
  left: var(--pad);
  top: -100px;
  z-index: 2000;
  background: var(--ink);
  color: var(--cream);
  padding: 0.6rem 1rem;
  font-size: 0.75rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  text-decoration: none;
}
.skip-link:focus { top: 0.75rem; }

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

.site-header {
  position: sticky;
  top: 0;
  z-index: 100;
  height: var(--header-h);
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 var(--pad);
  background: var(--cream);
  border-bottom: 1px solid transparent;
  transition: background 0.4s var(--ease), border-color 0.4s var(--ease), color 0.4s var(--ease);
  color: var(--ink);
}

.site-header.is-scrolled,
.site-header:not(.is-overlay) {
  border-bottom-color: var(--line);
}

/* Overlay header on the home hero */
.site-header.is-overlay {
  position: absolute;
  left: 0;
  right: 0;
  background: transparent;
  color: #f6f3ed;
  border-bottom-color: transparent;
}
.site-header.is-overlay.is-scrolled {
  position: fixed;
  background: var(--cream);
  color: var(--ink);
  border-bottom-color: var(--line);
}

.logo {
  display: flex;
  flex-direction: column;
  justify-content: center;
  text-decoration: none;
  line-height: 1;
  gap: 0.32rem;
}
.logo__name {
  font-family: var(--serif);
  font-weight: 400;
  font-size: clamp(1.2rem, 2vw, 1.55rem);
  letter-spacing: 0.32em;
  text-transform: uppercase;
  padding-right: 0.08em; /* optical: trailing tracking */
}
.logo__sub {
  font-family: var(--sans);
  font-weight: 400;
  font-size: 0.56rem;
  letter-spacing: 0.38em;
  text-transform: uppercase;
  opacity: 0.72;
}

.nav {
  display: flex;
  align-items: center;
  gap: clamp(1.4rem, 3vw, 2.6rem);
}
.nav a {
  font-size: 0.68rem;
  font-weight: 500;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  text-decoration: none;
  position: relative;
  padding: 0.3rem 0;
}
.nav a::after {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  height: 1px;
  background: currentColor;
  transform: scaleX(0);
  transform-origin: left;
  transition: transform 0.35s var(--ease);
}
.nav a:hover::after,
.nav a[aria-current="page"]::after { transform: scaleX(1); }

.menu-toggle {
  display: none;
  appearance: none;
  background: none;
  border: 0;
  padding: 0.7rem;
  margin-right: -0.7rem;
  cursor: pointer;
  color: inherit;
  width: 2.6rem;
  height: 2.6rem;
  position: relative;
}
.menu-toggle__bars,
.menu-toggle__bars::before,
.menu-toggle__bars::after {
  display: block;
  height: 1px;
  width: 1.15rem;
  background: currentColor;
  position: absolute;
  left: 50%;
  margin-left: -0.575rem;
  transition: transform 0.35s var(--ease), opacity 0.25s;
}
.menu-toggle__bars { top: 50%; }
.menu-toggle__bars::before,
.menu-toggle__bars::after { content: ""; }
.menu-toggle__bars::before { top: -5px; }
.menu-toggle__bars::after { top: 5px; }
.menu-toggle[aria-expanded="true"] .menu-toggle__bars { background: transparent; }
.menu-toggle[aria-expanded="true"] .menu-toggle__bars::before {
  top: 0;
  transform: rotate(45deg);
}
.menu-toggle[aria-expanded="true"] .menu-toggle__bars::after {
  top: 0;
  transform: rotate(-45deg);
}

@media (max-width: 720px) {
  .menu-toggle { display: block; }
  .nav {
    display: none;
    position: fixed;
    inset: var(--header-h) 0 0 0;
    background: var(--cream);
    color: var(--ink);
    flex-direction: column;
    justify-content: center;
    align-items: flex-start;
    padding: var(--pad);
    gap: 0.4rem;
    z-index: 99;
  }
  .nav.is-open { display: flex; }
  .nav a {
    font-family: var(--serif);
    font-size: clamp(2.2rem, 10vw, 3.4rem);
    letter-spacing: 0.06em;
    font-weight: 400;
    text-transform: none;
    padding: 0.2rem 0;
  }
  .nav a::after { display: none; }
  .site-header.is-overlay .nav.is-open { color: var(--ink); }
  body.menu-open { overflow: hidden; }
}

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

.site-footer {
  margin-top: auto;
  padding: 1.75rem var(--pad);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1.25rem;
  flex-wrap: wrap;
  border-top: 1px solid var(--line);
  font-size: 0.64rem;
  letter-spacing: 0.2em;
  text-transform: uppercase;
}
.site-footer__mark {
  font-family: var(--serif);
  font-size: 0.95rem;
  letter-spacing: 0.32em;
  text-decoration: none;
}
.site-footer__links {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem 1.6rem;
}
.site-footer a { text-decoration: none; }
.site-footer a:hover { color: var(--accent); }

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

.hero {
  position: relative;
  height: 100svh;
  min-height: 32rem;
  background: #1a1a1a;
  overflow: hidden;
  color: #f6f3ed;
}
.hero picture,
.hero img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center 45%;
}
.hero__shade {
  position: absolute;
  inset: 0;
  pointer-events: none;
  background:
    linear-gradient(to bottom, rgba(0,0,0,0.38) 0%, rgba(0,0,0,0.08) 28%, rgba(0,0,0,0.0) 48%),
    linear-gradient(to top, rgba(0,0,0,0.45) 0%, rgba(0,0,0,0.0) 32%);
}
.hero__cta {
  position: absolute;
  left: var(--pad);
  bottom: clamp(1.6rem, 5vh, 3rem);
  font-size: 0.68rem;
  font-weight: 500;
  letter-spacing: 0.24em;
  text-transform: uppercase;
  text-decoration: none;
  color: #f6f3ed;
  display: inline-flex;
  align-items: center;
  gap: 0.7rem;
}
.hero__cta::after {
  content: "";
  width: 2.4rem;
  height: 1px;
  background: currentColor;
  transition: width 0.4s var(--ease);
}
.hero__cta:hover::after { width: 3.4rem; }

/* -------------------------------------------------------------------------- */
/* Work category panels                                                       */
/* -------------------------------------------------------------------------- */

.cats {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: var(--gap);
  padding: var(--gap);
  background: var(--cream);
}
.cat {
  position: relative;
  display: block;
  aspect-ratio: 3 / 4;
  overflow: hidden;
  color: #f6f3ed;
  text-decoration: none;
  background: #1a1a1a;
}
.cat picture {
  position: absolute;
  inset: 0;
}
.cat img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 1.1s var(--ease), filter 0.8s var(--ease);
  will-change: transform;
}
.cat:hover img { transform: scale(1.04); }
.cat__veil {
  position: absolute;
  inset: 0;
  z-index: 1;
  background: linear-gradient(to top, rgba(0,0,0,0.55) 0%, rgba(0,0,0,0.0) 45%);
  pointer-events: none;
}
.cat__title {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: 2;
  padding: 1.4rem 1.25rem;
  font-family: var(--serif);
  font-weight: 400;
  font-size: clamp(1.45rem, 2.2vw, 2.15rem);
  letter-spacing: 0.02em;
  line-height: 1.15;
}

@media (max-width: 800px) {
  .cats {
    grid-template-columns: 1fr;
    padding: 0;
    gap: 0;
  }
  .cat { aspect-ratio: auto; height: 72vw; min-height: 18rem; }
}

/* -------------------------------------------------------------------------- */
/* Vogue features                                                             */
/* -------------------------------------------------------------------------- */

.features {
  padding: var(--pad-y) var(--pad);
  max-width: var(--max);
  margin: 0 auto;
  width: 100%;
}
.features__head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 1rem 2rem;
  flex-wrap: wrap;
  margin-bottom: clamp(2rem, 5vw, 3.5rem);
}
.features__head h1,
.page-title {
  font-family: var(--serif);
  font-weight: 400;
  font-size: clamp(2.2rem, 5.5vw, 4.25rem);
  letter-spacing: 0.01em;
  line-height: 0.95;
  margin: 0;
}
.features__pv {
  font-size: 0.72rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  text-decoration: none;
  font-weight: 500;
}
.features__pv:hover { color: var(--accent); }

.features__grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: clamp(2rem, 5vw, 4.5rem) clamp(1.5rem, 4vw, 4rem);
}
.feature a.feature__img {
  display: block;
  overflow: hidden;
  background: #e8e4dc;
  margin-bottom: 1.35rem;
  text-decoration: none;
}
.feature a.feature__img img {
  width: 100%;
  height: auto;
  aspect-ratio: 3 / 4;
  object-fit: cover;
  transition: transform 1s var(--ease);
}
.feature:hover a.feature__img img { transform: scale(1.03); }

.feature__title {
  font-family: var(--serif);
  font-weight: 500;
  font-size: clamp(1.35rem, 2.2vw, 1.85rem);
  line-height: 1.2;
  letter-spacing: 0.005em;
  margin: 0 0 0.7rem;
}
.feature__title a { text-decoration: none; }
.feature__title a:hover { color: var(--accent); }

.feature__blurb {
  font-size: 0.95rem;
  line-height: 1.65;
  color: var(--ink-soft);
  margin: 0 0 1rem;
  max-width: 32rem;
}
.feature__link {
  font-size: 0.68rem;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  text-decoration: none;
  font-weight: 500;
}
.feature__link:hover { color: var(--accent); }

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

/* -------------------------------------------------------------------------- */
/* Work index (full-bleed three panels)                                       */
/* -------------------------------------------------------------------------- */

.work-index {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  flex: 1;
  min-height: 0;
  gap: 0;
}
main:has(.work-index) {
  flex: 1;
  display: flex;
  flex-direction: column;
  min-height: 0;
}
.work-index .cat {
  aspect-ratio: auto;
  height: auto;
  min-height: 28rem;
  /* fill the remaining viewport below header + footer */
  min-height: calc(100svh - var(--header-h) - 5rem);
}
.work-index .cat__title {
  font-size: clamp(1.7rem, 2.6vw, 2.6rem);
  padding: 1.8rem 1.6rem;
}

@media (max-width: 800px) {
  .work-index {
    grid-template-columns: 1fr;
    min-height: 0;
    flex: none;
  }
  .work-index .cat {
    min-height: 0;
    height: 78vw;
    min-height: 20rem;
  }
}

/* -------------------------------------------------------------------------- */
/* Gallery pages                                                              */
/* -------------------------------------------------------------------------- */

.gallery-page {
  padding: clamp(2.2rem, 6vw, 4.5rem) var(--pad) var(--pad-y);
  max-width: 108rem;
  margin: 0 auto;
  width: 100%;
}
.gallery-intro {
  max-width: 34rem;
  margin: 1.15rem 0 clamp(3rem, 7vw, 5.5rem);
  font-size: 1.05rem;
  line-height: 1.7;
  color: var(--ink-soft);
}
.gallery-intro p { margin: 0 0 0.85em; }
.gallery-intro p:last-child { margin-bottom: 0; }

.project {
  margin-bottom: clamp(3.5rem, 8vw, 7rem);
}
.project__name {
  font-family: var(--sans);
  font-weight: 500;
  font-size: 0.68rem;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  margin: 0 0 0.95rem;
}

.project__grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: var(--gap);
  align-items: start;
}
.project__grid figure {
  margin: 0;
  background: #e8e4dc;
  cursor: zoom-in;
  overflow: hidden;
}
.project__grid.is-featured figure:first-child {
  /* slightly larger opener: two columns, not full-bleed */
  grid-column: 1 / 3;
}
.project__grid img {
  width: 100%;
  height: auto;
  display: block;
  transition: transform 0.9s var(--ease);
}
.project__grid figure:hover img { transform: scale(1.02); }
.project__grid figure.is-landscape {
  grid-column: span 2;
}

.pager {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: 1.5rem;
  margin-top: clamp(2rem, 5vw, 4rem);
  padding-top: 1.5rem;
  border-top: 1px solid var(--line);
  font-size: 0.72rem;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  font-weight: 500;
}
.pager a { text-decoration: none; }
.pager a:hover { color: var(--accent); }
.pager__prev { margin-right: auto; }
.pager__next { margin-left: auto; }

@media (max-width: 900px) {
  .project__grid { grid-template-columns: repeat(2, 1fr); }
  .project__grid.is-featured figure:first-child { grid-column: 1 / -1; }
  .project__grid figure.is-landscape { grid-column: auto; }
}
@media (max-width: 600px) {
  .project__grid { grid-template-columns: 1fr; }
  .project__grid.is-featured figure:first-child { grid-column: auto; }
  .project__grid figure.is-landscape { grid-column: auto; }
}

/* -------------------------------------------------------------------------- */
/* About                                                                      */
/* -------------------------------------------------------------------------- */

.about {
  display: grid;
  grid-template-columns: 1.05fr 0.95fr;
  gap: clamp(2rem, 6vw, 6.5rem);
  align-items: center;
  padding: clamp(1.5rem, 4vw, 3rem) var(--pad) var(--pad-y);
  max-width: 92rem;
  margin: 0 auto;
  width: 100%;
}
.about__portrait { background: #e8e4dc; }
.about__portrait img { width: 100%; height: auto; }
.about__copy { max-width: 32rem; padding-bottom: 1rem; }
.about__copy .page-title { margin-bottom: 1.6rem; }
.about__copy p {
  font-size: 1.05rem;
  line-height: 1.75;
  margin: 0 0 1.15em;
  color: var(--ink);
}
.about__copy p:last-child { margin-bottom: 0; }

@media (max-width: 860px) {
  .about {
    grid-template-columns: 1fr;
    gap: 2.2rem;
  }
  .about__portrait { max-width: 32rem; }
}

/* -------------------------------------------------------------------------- */
/* Contact                                                                    */
/* -------------------------------------------------------------------------- */

.contact {
  min-height: calc(100svh - var(--header-h) - 6rem);
  display: flex;
  flex-direction: column;
  justify-content: center;
  padding: var(--pad-y) var(--pad);
  max-width: 50rem;
  margin: 0 auto;
  width: 100%;
}
.contact .page-title { margin-bottom: 2.4rem; }
.contact__name {
  font-family: var(--serif);
  font-size: clamp(1.6rem, 3.2vw, 2.2rem);
  font-weight: 400;
  margin: 0 0 0.65rem;
  letter-spacing: 0.01em;
}
.contact__email {
  font-size: clamp(1.05rem, 2vw, 1.35rem);
  text-decoration: none;
  letter-spacing: 0.01em;
  border-bottom: 1px solid var(--line-strong);
  padding-bottom: 0.12em;
  width: max-content;
}
.contact__email:hover {
  color: var(--accent);
  border-bottom-color: var(--accent);
}

/* -------------------------------------------------------------------------- */
/* 404                                                                        */
/* -------------------------------------------------------------------------- */

.notfound {
  min-height: calc(100svh - var(--header-h) - 6rem);
  display: flex;
  flex-direction: column;
  justify-content: center;
  padding: var(--pad-y) var(--pad);
  max-width: 40rem;
}
.notfound p { color: var(--ink-soft); margin: 1.1rem 0 1.8rem; }
.notfound a { font-size: 0.72rem; letter-spacing: 0.16em; text-transform: uppercase; text-decoration: none; font-weight: 500; }
.notfound a:hover { color: var(--accent); }

/* -------------------------------------------------------------------------- */
/* Lightbox                                                                   */
/* -------------------------------------------------------------------------- */

.lightbox {
  position: fixed;
  inset: 0;
  z-index: 500;
  background: rgba(10, 10, 10, 0.94);
  color: #f6f3ed;
  display: none;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 4rem 1.25rem 3.5rem;
}
.lightbox.is-open { display: flex; }
.lightbox__img-wrap {
  max-width: 100%;
  max-height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  flex: 1;
  min-height: 0;
}
.lightbox__img-wrap img {
  max-width: min(100%, 1600px);
  max-height: calc(100svh - 8rem);
  width: auto;
  height: auto;
  object-fit: contain;
  background: transparent;
  box-shadow: 0 20px 60px rgba(0,0,0,0.45);
}
.lightbox__bar {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding: 0.9rem 1.25rem;
  font-size: 0.68rem;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  pointer-events: none;
}
.lightbox__bar > * { pointer-events: auto; }
.lightbox__caption { letter-spacing: 0.14em; opacity: 0.85; }
.lightbox__count { opacity: 0.55; font-variant-numeric: tabular-nums; }

.lightbox__btn {
  appearance: none;
  background: none;
  border: 0;
  color: inherit;
  cursor: pointer;
  padding: 0.8rem 1rem;
  position: absolute;
  font-size: 0;
  line-height: 0;
  opacity: 0.8;
}
.lightbox__btn:hover { opacity: 1; }
.lightbox__close {
  top: 0.4rem;
  right: 0.3rem;
  width: 2.8rem;
  height: 2.8rem;
}
.lightbox__close::before,
.lightbox__close::after {
  content: "";
  position: absolute;
  left: 50%;
  top: 50%;
  width: 1.1rem;
  height: 1px;
  background: currentColor;
}
.lightbox__close::before { transform: translate(-50%, -50%) rotate(45deg); }
.lightbox__close::after { transform: translate(-50%, -50%) rotate(-45deg); }

.lightbox__prev,
.lightbox__next {
  top: 50%;
  transform: translateY(-50%);
  width: 3.2rem;
  height: 3.2rem;
}
.lightbox__prev { left: 0.2rem; }
.lightbox__next { right: 0.2rem; }
.lightbox__prev::before,
.lightbox__next::before {
  content: "";
  display: block;
  width: 0.7rem;
  height: 0.7rem;
  border-left: 1px solid currentColor;
  border-bottom: 1px solid currentColor;
  margin: 0 auto;
}
.lightbox__prev::before { transform: rotate(45deg); }
.lightbox__next::before { transform: rotate(-135deg); }

@media (max-width: 700px) {
  .lightbox { padding: 3.4rem 0.5rem 3rem; }
  .lightbox__prev, .lightbox__next { top: auto; bottom: 0.1rem; transform: none; }
  .lightbox__prev { left: 0.1rem; }
  .lightbox__next { right: 0.1rem; }
}

/* -------------------------------------------------------------------------- */
/* Reduced motion / print                                                     */
/* -------------------------------------------------------------------------- */

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after {
    animation: none !important;
    transition: none !important;
  }
  .cat:hover img,
  .feature:hover a.feature__img img,
  .project__grid figure:hover img { transform: none; }
}

@media print {
  .site-header, .site-footer, .menu-toggle, .lightbox, .hero__cta, .pager { }
  .site-header { position: static; }
  .hero { height: auto; }
  .hero img { height: auto; }
}
