/* Chaoxiang Xiong Photography — shared styles */

:root {
  --bg: #0B0B0B;
  --ink: #F2F2F2;
  --soft: #C4C4C4;
  --muted: #A3A3A3;
  --line: #262626;
  --panel: #161616;
  --field: #3A3A3A;
  --accent: #FF5A1F;
  --accent-hi: #FF7A45;
  --g: 32px;              /* side gutter */
  --header: 76px;
  --max: 1280px;
  --pad: max(var(--g), calc((100% - var(--max)) / 2));
  --font: 'Bricolage Grotesque', 'Helvetica Neue', Helvetica, Arial, sans-serif;
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; background: var(--bg); }

body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: var(--font);
  font-optical-sizing: auto;
  font-size: 16px;
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
  min-height: 100vh;
  min-height: 100dvh;
  display: flex;
  flex-direction: column;
}

img { display: block; max-width: 100%; height: auto; }
a { color: var(--ink); text-underline-offset: 4px; text-decoration-thickness: 1px; }
a:hover { color: var(--accent); }
:focus-visible { outline: 1px solid var(--accent); outline-offset: 3px; }

.display { font-weight: 500; letter-spacing: -0.025em; line-height: 1; margin: 0; }
.eyebrow { font-size: 14px; color: var(--muted); margin: 0; }

.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 { position: absolute; left: -9999px; top: 8px; z-index: 100; background: var(--ink); color: var(--bg); padding: 8px 12px; }
.skip:focus { left: 8px; }

/* ---------- Buttons ---------- */

.btn, .btn-line {
  display: inline-block;
  font: inherit; font-size: 15px;
  text-decoration: none;
  padding: 15px 22px;
  border: 1px solid var(--ink);
  cursor: pointer;
}
.btn { background: var(--accent); border-color: var(--accent); color: var(--bg); }
.btn:hover { background: var(--accent-hi); border-color: var(--accent-hi); color: var(--bg); }
.btn-line { background: transparent; color: var(--ink); }
.btn-line:hover { border-color: var(--accent); color: var(--accent); }

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

.site-header {
  height: var(--header);
  flex: none;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 var(--pad);
  border-bottom: 1px solid var(--line);
  position: relative;
  z-index: 20;
  background: var(--bg);
}
.wordmark { font-size: 28px; font-weight: 500; letter-spacing: -0.025em; text-decoration: none; color: var(--ink); }
.wordmark:hover { color: var(--ink); }

.nav { display: flex; gap: 28px; align-items: center; }
.nav a { font-size: 15px; text-decoration: none; padding: 12px 0; }
.nav a[aria-current="page"] { text-decoration: underline; text-decoration-color: var(--accent); text-decoration-thickness: 2px; text-underline-offset: 6px; }
.nav .nav-cta { background: var(--accent); color: var(--bg); padding: 13px 20px; text-decoration: none; }
.nav .nav-cta:hover { background: var(--accent-hi); color: var(--bg); }
.nav .wide { display: none; }

.menu-btn {
  display: none;
  width: 44px; height: 44px;
  align-items: center; justify-content: center;
  background: none; border: 0; padding: 0; color: var(--ink); cursor: pointer;
}
.menu-btn svg { width: 22px; height: 14px; }

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

.site-footer {
  margin-top: auto;
  border-top: 1px solid var(--line);
  padding: 28px var(--pad);
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 16px;
  font-size: 13px;
  color: var(--muted);
}
.site-footer .links { display: flex; gap: 24px; }
.site-footer a { color: var(--muted); }
.site-footer a:hover { color: var(--accent); }

/* ---------- Home ---------- */

.hero {
  flex: none;
  height: calc(100vh - var(--header));
  height: calc(100svh - var(--header));
  min-height: 560px;
  padding: 40px var(--pad);
  display: grid;
  grid-template-columns: minmax(0, 5fr) minmax(0, 6fr);
  grid-template-rows: minmax(0, 1fr);
  gap: 28px;
  align-items: end;
}
.hero-text { align-self: stretch; display: flex; flex-direction: column; justify-content: space-between; gap: 32px; }
.hero-bottom { display: flex; flex-direction: column; gap: 20px; }
.hero-cats { display: flex; flex-direction: column; align-items: flex-start; gap: 2px; }
.hero-cats a { font-size: 44px; font-weight: 500; letter-spacing: -0.025em; line-height: 1.12; text-decoration: none; }
.hero-cats a:hover { color: var(--accent); }
.hero-text p { margin: 0; }
.hero-lede { font-size: 16px; line-height: 1.6; color: var(--soft); max-width: 440px; }
.hero-actions { display: flex; flex-direction: column; align-items: flex-start; gap: 10px; margin-top: 4px; }
.hero-img { align-self: stretch; width: 100%; height: 100%; min-height: 0; object-fit: cover; object-position: center 30%; }

/* ---------- Page intro ---------- */

.intro { padding: 64px var(--pad) 48px; display: flex; flex-direction: column; gap: 18px; }
.intro h1 { font-size: 80px; }
.intro .lede { margin: 0; font-size: 17px; line-height: 1.6; color: var(--soft); max-width: 540px; }

/* ---------- Work index ---------- */

.work { padding: 0 var(--pad) 88px; display: flex; flex-direction: column; gap: 40px; }
.work-pair { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px; }
.tile { display: block; text-decoration: none; color: var(--ink); }
.tile:hover { color: var(--accent); }
.tile img { width: 100%; object-fit: cover; aspect-ratio: 4 / 5; }
.tile:hover img { opacity: .88; }
.tile.wide img { aspect-ratio: 5 / 4; object-position: center 25%; }
.tile-label { display: flex; align-items: baseline; justify-content: space-between; margin-top: 18px; }
.tile-label .name { display: flex; align-items: baseline; gap: 14px; }
.tile-label .title { font-size: 36px; }
.tile.wide .tile-label .title { font-size: 44px; }

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

.crumb { font-size: 14px; color: var(--muted); }
.crumb a { color: var(--muted); }
.gallery-head { display: flex; align-items: baseline; justify-content: space-between; gap: 16px; }
.pills { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 6px; }
.pills a {
  font-size: 15px; text-decoration: none;
  border: 1px solid var(--field); border-radius: 999px;
  padding: 11px 18px;
}
.pills a:hover { border-color: var(--accent); color: var(--accent); }
.pills a[aria-current="page"] { background: var(--accent); color: var(--bg); border-color: var(--accent); }

.masonry { list-style: none; margin: 0; padding: 0 var(--pad) 72px; columns: 2; column-gap: 16px; }
.masonry li { break-inside: avoid; margin-bottom: 16px; }
.masonry a { display: block; cursor: zoom-in; }
.masonry img { width: 100%; background: var(--panel); }
.masonry a:hover img { opacity: .85; }

.next-cat { padding: 0 var(--pad) 88px; }
.next-cat a {
  display: flex; align-items: center; justify-content: space-between;
  text-decoration: none; color: var(--ink);
  border-top: 1px solid var(--ink); border-bottom: 1px solid var(--line);
  padding: 28px 0;
}
.next-cat .label { display: flex; flex-direction: column; gap: 8px; }
.next-cat .title { font-size: 48px; }
.next-cat img { width: 120px; height: 120px; object-fit: cover; }
.next-cat a:hover .title { color: var(--accent); }

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

.lightbox { position: fixed; inset: 0; z-index: 50; background: var(--bg); display: none; flex-direction: column; }
.lightbox.is-open { display: flex; }
body.lb-open { overflow: hidden; }

.lb-top { height: 80px; flex: none; display: grid; grid-template-columns: 1fr auto 1fr; align-items: center; padding: 0 24px; }
.lb-title { font-size: 26px; font-weight: 500; letter-spacing: -0.025em; }
.lb-count { visibility: hidden; }
.lb-close { justify-self: end; }

.lb-stage { flex: 1; min-height: 0; position: relative; display: flex; align-items: center; justify-content: center; padding: 8px 88px; touch-action: pan-y; }
.lb-stage img { max-width: 100%; max-height: 100%; width: auto; height: auto; object-fit: contain; transition: opacity .25s ease; }
.lb-stage img.is-loading { opacity: 0; }

.icon-btn {
  width: 48px; height: 48px;
  display: flex; align-items: center; justify-content: center;
  border: 1px solid var(--field); border-radius: 999px;
  background: transparent; color: var(--ink); cursor: pointer; padding: 0;
}
.icon-btn:hover { border-color: var(--accent); color: var(--accent); }
.icon-btn svg { width: 18px; height: 18px; }
.lb-prev, .lb-next { position: absolute; top: 50%; transform: translateY(-50%); }
.lb-prev { left: 20px; }
.lb-next { right: 20px; }

.lb-bottom { height: 128px; flex: none; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 14px; border-top: 1px solid var(--line); overflow: hidden; }
.lb-hint { font-size: 12px; color: var(--muted); }
.lb-thumbs { display: flex; gap: 8px; max-width: 100%; overflow-x: auto; padding: 4px 24px; scrollbar-width: none; }
.lb-thumbs::-webkit-scrollbar { display: none; }
.lb-thumbs button { flex: none; border: 0; padding: 0; background: none; cursor: pointer; }
.lb-thumbs img { width: 56px; height: 72px; object-fit: cover; opacity: .5; }
.lb-thumbs button:hover img { opacity: .8; }
.lb-thumbs button[aria-current="true"] img { opacity: 1; outline: 2px solid var(--accent); outline-offset: 3px; }

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

.about-head { padding: 64px var(--pad) 48px; display: flex; flex-direction: column; gap: 20px; }
.about-head h1 { font-size: 56px; line-height: 1.05; max-width: 900px; }
.about-photo { padding: 0 var(--pad) 88px; }
.about-photo img { width: 560px; max-width: 100%; height: auto; }

.row-section { padding: 0 var(--pad) 88px; display: grid; grid-template-columns: 180px minmax(0, 1fr); gap: 32px; }
.row-section > .eyebrow { padding-top: 8px; }
.approach { display: flex; flex-direction: column; gap: 20px; max-width: 760px; }
.approach .big { margin: 0; font-size: 30px; line-height: 1.3; font-weight: 500; letter-spacing: -0.02em; }
.approach p { margin: 0; font-size: 17px; line-height: 1.7; color: var(--soft); }

.services { border-top: 1px solid var(--ink); list-style: none; margin: 0; padding: 0; counter-reset: s; }
.services li { display: flex; align-items: baseline; gap: 24px; padding: 18px 0; border-bottom: 1px solid var(--line); font-size: 28px; font-weight: 500; letter-spacing: -0.02em; }

.clients { border-top: 1px solid var(--ink); padding-top: 20px; display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 24px; }
.clients ul { list-style: none; margin: 14px 0 0; padding: 0; font-size: 17px; line-height: 2; }

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

.contact-info {
  margin: 0 var(--pad) 56px;
  display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 24px;
  border-top: 1px solid var(--ink); border-bottom: 1px solid var(--line);
  padding: 24px 0;
}
.contact-info p { margin: 0; font-size: 16px; line-height: 1.5; }
.contact-info .eyebrow { margin-bottom: 8px; }

.form {
  margin: 0 var(--pad) 96px;
  padding: 32px;
  background: var(--panel);
  border-radius: 10px;
  display: flex; flex-direction: column; gap: 28px;
}
.two { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 20px; }
.lbl { display: block; font-size: 14px; font-weight: 500; color: #E6E6E6; margin-bottom: 8px; }
.lbl span { font-weight: 400; color: var(--muted); }
.fld {
  width: 100%; height: 52px;
  border: 1px solid var(--field); border-radius: 6px;
  padding: 0 16px;
  font: inherit; font-size: 16px; color: var(--ink);
  background: var(--bg);
  outline: none;
}
.fld::placeholder { color: #7A7A7A; }
.fld:focus { border-color: var(--accent); box-shadow: 0 0 0 3px rgba(255, 90, 31, .22); }
textarea.fld { height: auto; min-height: 150px; padding: 14px 16px; line-height: 1.5; resize: vertical; }

fieldset { border: 0; margin: 0; padding: 0; min-width: 0; }
legend { padding: 0; }
.choices { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 10px; }
.choice { position: relative; }
.choice input { position: absolute; opacity: 0; width: 1px; height: 1px; }
.choice label {
  display: flex; align-items: center; gap: 10px;
  height: 48px; padding: 0 16px;
  border: 1px solid var(--field); border-radius: 6px;
  background: var(--bg); font-size: 15px; cursor: pointer;
}
.choice label::before {
  content: ""; flex: none;
  width: 16px; height: 16px; border-radius: 999px;
  border: 1px solid #5A5A5A; background: var(--bg);
}
.choice input:checked + label { border-color: var(--accent); box-shadow: inset 0 0 0 1px var(--accent); }
.choice input:checked + label::before { border: 5px solid var(--accent); }
.choice input:focus-visible + label { outline: 1px solid var(--accent); outline-offset: 3px; }

.form-foot { display: flex; align-items: center; justify-content: space-between; gap: 24px; }
.form-foot p { margin: 0; font-size: 14px; color: var(--muted); }
.send {
  font: inherit; font-size: 16px; font-weight: 500;
  color: var(--bg); background: var(--accent);
  border: 0; border-radius: 6px; height: 52px; padding: 0 28px; cursor: pointer;
}
.send:hover { background: var(--accent-hi); }
.hp { position: absolute; left: -9999px; }

/* ---------- Desktop ---------- */

@media (min-width: 1100px) {
  :root { --g: 80px; --header: 88px; }
  .wordmark { font-size: 30px; }
  .nav { gap: 40px; }
  .nav .wide { display: inline; }
  .nav .narrow { display: none; }
  .hero { grid-template-columns: minmax(0, 5fr) minmax(0, 7fr); gap: 48px; padding-top: 48px; padding-bottom: 48px; }
  .hero-bottom { gap: 28px; padding-bottom: 8px; }
  .hero-cats a { font-size: 56px; }
  .hero-lede { font-size: 18px; }
  .hero-img { object-position: center 100%; }
  .hero-actions { flex-direction: row; gap: 16px; }
  .btn, .btn-line { padding: 17px 28px; }
  .masonry { columns: 3; column-gap: 24px; }
  .masonry li { margin-bottom: 24px; }
  .tile.wide img { aspect-ratio: 16 / 9; }
}

/* ---------- Phone ---------- */

@media (max-width: 640px) {
  :root { --g: 20px; --header: 64px; }
  .wordmark { font-size: 24px; }
  .menu-btn { display: flex; }
  .nav {
    display: none;
    position: fixed; inset: var(--header) 0 0 0;
    background: var(--bg);
    flex-direction: column; align-items: flex-start; gap: 0;
    padding: 24px var(--g);
  }
  .nav.is-open { display: flex; }
  .nav a { font-size: 30px; font-weight: 500; letter-spacing: -0.02em; padding: 8px 0; }
  .nav .nav-cta { background: none; color: var(--accent); padding: 8px 0; }
  .nav .wide { display: inline; }
  .nav .narrow { display: none; }

  .hero { display: flex; flex-direction: column; height: auto; min-height: 0; padding: 0 0 32px; gap: 0; }
  .hero-img { order: -1; height: 43vh; min-height: 300px; object-position: center 65%; }
  .hero-text { padding: 24px var(--g) 0; gap: 24px; justify-content: flex-start; }
  .hero-bottom { gap: 14px; }
  .hero-cats a { font-size: 30px; }
  .nav.nav-home { display: flex; position: static; flex-direction: row; padding: 0; background: none; }
  .nav.nav-home .nav-cta { font-size: 15px; font-weight: 400; letter-spacing: 0; background: var(--accent); color: var(--bg); padding: 11px 16px; }
  .hero-actions { flex-direction: row; width: 100%; }
  .hero-actions a { flex: 1; text-align: center; padding-left: 12px; padding-right: 12px; }

  .intro, .about-head { padding-top: 32px; padding-bottom: 32px; }
  .intro h1 { font-size: 56px; }
  .about-head h1 { font-size: 36px; }
  .work-pair { grid-template-columns: minmax(0, 1fr); gap: 40px; }
  .tile-label .title, .tile.wide .tile-label .title { font-size: 32px; }
  .masonry { column-gap: 8px; }
  .masonry li { margin-bottom: 8px; }
  .next-cat .title { font-size: 36px; }
  .next-cat img { width: 88px; height: 88px; }

  .lb-top { height: 64px; padding: 0 16px; }
  .lb-title { font-size: 20px; }
  .lb-stage { padding: 0; }
  .lb-prev, .lb-next { display: none; }
  .lb-bottom { height: 104px; }

  .about-photo, .row-section { padding-bottom: 56px; }
  .row-section { grid-template-columns: minmax(0, 1fr); gap: 16px; }
  .approach .big { font-size: 24px; }
  .services li { font-size: 22px; }
  .contact-info { grid-template-columns: minmax(0, 1fr); }
  .form { padding: 20px; margin-bottom: 64px; }
  .two, .choices { grid-template-columns: minmax(0, 1fr); }
  .form-foot { flex-direction: column; align-items: stretch; }
  .site-footer { flex-direction: column; align-items: flex-start; }
}

/* ---------- Client logos ---------- */
.logos { list-style: none; margin: 14px 0 0; padding: 0; display: grid; grid-template-columns: repeat(auto-fill, 72px); gap: 16px; }
.logos img { width: 72px; height: 72px; border-radius: 14px; object-fit: contain; background: #FFFFFF; filter: grayscale(100%); opacity: .8; transition: filter .25s, opacity .25s; }
.logos li:hover img { filter: grayscale(0%); opacity: 1; }
@media (max-width: 640px) { .clients { grid-template-columns: minmax(0, 1fr); } .logos { grid-template-columns: repeat(auto-fill, 64px); } .logos img { width: 64px; height: 64px; } }
