:root {
  --bg: #080808;
  --panel: #111111;
  --panel-soft: #171717;
  --text: #f4f1eb;
  --muted: #a7a19a;
  --line: rgba(244, 241, 235, 0.14);
  --warm: #c7a16b;
  --warm-soft: rgba(199, 161, 107, 0.18);
  --shadow: 0 24px 80px rgba(0, 0, 0, 0.45);
  --ease: cubic-bezier(0.22, 1, 0.36, 1);
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: Inter, "PingFang SC", "Microsoft YaHei", Arial, sans-serif;
  line-height: 1.65;
  letter-spacing: 0;
}

body.is-menu-open,
body.is-lightbox-open {
  overflow: hidden;
}

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

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

button,
input,
select,
textarea {
  font: inherit;
}

.page-shell {
  overflow: hidden;
}

.site-header {
  position: fixed;
  top: 0;
  left: 0;
  z-index: 50;
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 22px clamp(20px, 5vw, 64px);
  color: var(--text);
  transition: background 500ms var(--ease), border-color 500ms var(--ease), padding 500ms var(--ease);
}

.site-header.is-scrolled {
  padding-top: 14px;
  padding-bottom: 14px;
  background: rgba(8, 8, 8, 0.76);
  border-bottom: 1px solid var(--line);
  backdrop-filter: blur(18px);
}

.brand {
  position: relative;
  z-index: 52;
  display: inline-flex;
  align-items: center;
  font-family: Georgia, "Times New Roman", serif;
  font-size: 1.15rem;
  letter-spacing: 0;
}

.brand-logo {
  width: 132px;
  height: auto;
  filter: invert(1);
  opacity: 0.95;
}

.site-nav {
  display: flex;
  align-items: center;
  gap: clamp(18px, 3vw, 36px);
  font-size: 0.86rem;
  color: rgba(244, 241, 235, 0.76);
}

.site-nav a {
  position: relative;
  transition: color 280ms var(--ease);
}

.site-nav a::after {
  position: absolute;
  left: 0;
  bottom: -8px;
  width: 100%;
  height: 1px;
  content: "";
  background: var(--warm);
  transform: scaleX(0);
  transform-origin: right;
  transition: transform 320ms var(--ease);
}

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

.site-nav a:hover::after,
.site-nav a.is-active::after {
  transform: scaleX(1);
  transform-origin: left;
}

.nav-toggle {
  position: relative;
  z-index: 52;
  display: none;
  width: 42px;
  height: 42px;
  padding: 0;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.04);
  color: var(--text);
  cursor: pointer;
}

.nav-toggle span {
  position: absolute;
  left: 12px;
  width: 18px;
  height: 1px;
  background: currentColor;
  transition: transform 300ms var(--ease), top 300ms var(--ease);
}

.nav-toggle span:first-child {
  top: 16px;
}

.nav-toggle span:last-child {
  top: 24px;
}

.is-menu-open .nav-toggle span:first-child {
  top: 20px;
  transform: rotate(45deg);
}

.is-menu-open .nav-toggle span:last-child {
  top: 20px;
  transform: rotate(-45deg);
}

.section-page {
  position: relative;
  padding: clamp(72px, 11vw, 132px) clamp(20px, 5vw, 64px);
}

#portfolio,
#services,
#contact {
  position: relative;
  z-index: 2;
  background: var(--bg);
}

#portfolio::before,
#about::before,
#services::before,
#contact::before {
  position: absolute;
  left: 0;
  right: 0;
  top: -2px;
  height: 4px;
  content: "";
  background: inherit;
  pointer-events: none;
}

.hero {
  min-height: 100svh;
  display: grid;
  place-items: center;
  padding: 0 clamp(20px, 5vw, 64px);
  isolation: isolate;
  overflow: hidden;
  background: var(--bg);
}

.hero-image {
  position: absolute;
  inset: 0;
  z-index: -3;
  width: 100%;
  height: 100%;
  object-fit: cover;
  filter: grayscale(0.7) contrast(1.08);
  transform: scale(1.08);
  animation: heroScale 1600ms var(--ease) forwards;
}

.hero-shade {
  position: absolute;
  inset: 0;
  z-index: -2;
  background:
    radial-gradient(circle at 70% 42%, rgba(199, 161, 107, 0.2), transparent 34%),
    linear-gradient(180deg, rgba(8, 8, 8, 0.24), rgba(8, 8, 8, 0.78) 64%, #080808 100%),
    linear-gradient(90deg, rgba(8, 8, 8, 0.74), rgba(8, 8, 8, 0.2), rgba(8, 8, 8, 0.72));
}

.hero::after {
  position: absolute;
  right: 0;
  bottom: -1px;
  left: 0;
  z-index: -1;
  height: clamp(180px, 30vh, 320px);
  content: "";
  background: linear-gradient(180deg, rgba(8, 8, 8, 0), #080808 84%);
  pointer-events: none;
}

.hero-content {
  width: min(860px, 100%);
  text-align: center;
  padding-top: clamp(56px, 8vh, 86px);
}

.eyebrow {
  margin: 0 0 14px;
  color: var(--warm);
  font-size: 0.72rem;
  line-height: 1.4;
  letter-spacing: 0.16em;
  text-transform: uppercase;
}

.hero-title {
  margin: 0;
  font-family: Georgia, "Times New Roman", serif;
  font-size: clamp(4.2rem, 12.5vw, 9.8rem);
  font-weight: 400;
  line-height: 0.92;
  letter-spacing: 0;
}

.hero-logo-mark {
  width: min(230px, 54vw);
  height: auto;
  margin: 0 auto 18px;
  filter: invert(1);
  opacity: 0.88;
}

.hero-subtitle {
  margin: 24px 0 34px;
  color: rgba(244, 241, 235, 0.82);
  font-size: clamp(1rem, 2.5vw, 1.35rem);
}

.primary-button,
.outline-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 48px;
  padding: 0 24px;
  border-radius: 999px;
  cursor: pointer;
  transition: transform 320ms var(--ease), background 320ms var(--ease), border-color 320ms var(--ease), color 320ms var(--ease);
}

.primary-button {
  border: 1px solid rgba(244, 241, 235, 0.2);
  background: var(--text);
  color: #111;
}

.outline-button {
  border: 1px solid rgba(244, 241, 235, 0.24);
  background: transparent;
  color: var(--text);
}

.primary-button:hover,
.outline-button:hover {
  transform: translateY(-3px);
  border-color: var(--warm);
  background: var(--warm);
  color: #0b0b0b;
}

.scroll-cue {
  position: absolute;
  left: 50%;
  bottom: 28px;
  width: 34px;
  height: 54px;
  border: 1px solid rgba(244, 241, 235, 0.28);
  border-radius: 999px;
  transform: translateX(-50%);
}

.scroll-cue span {
  position: absolute;
  left: 50%;
  top: 12px;
  width: 4px;
  height: 4px;
  border-radius: 50%;
  background: var(--text);
  transform: translateX(-50%);
  animation: cue 1600ms infinite;
}

.section-heading {
  width: min(720px, 100%);
  margin: 0 auto clamp(34px, 6vw, 64px);
  text-align: center;
}

.section-heading h2,
.about-copy h2,
.contact-copy h2 {
  margin: 0;
  font-family: Georgia, "Times New Roman", serif;
  font-size: clamp(2.6rem, 7vw, 5.8rem);
  font-weight: 400;
  line-height: 1;
}

.section-heading p:last-child,
.about-copy p,
.contact-copy > p {
  color: var(--muted);
}

.filter-bar {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 10px;
  margin-bottom: clamp(28px, 4vw, 46px);
}

.filter-button {
  min-height: 40px;
  padding: 0 16px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.02);
  color: rgba(244, 241, 235, 0.72);
  cursor: pointer;
  transition: color 280ms var(--ease), border-color 280ms var(--ease), background 280ms var(--ease);
}

.filter-button:hover,
.filter-button.is-active {
  border-color: rgba(199, 161, 107, 0.72);
  background: var(--warm-soft);
  color: var(--text);
}

.gallery {
  column-count: 1;
  column-gap: clamp(14px, 2vw, 22px);
}

.load-more-wrap {
  display: flex;
  justify-content: center;
  margin-top: clamp(20px, 4vw, 42px);
}

.load-more-button[hidden] {
  display: none;
}

.gallery-item {
  position: relative;
  width: 100%;
  margin: 0 0 clamp(14px, 2vw, 22px);
  padding: 0;
  overflow: hidden;
  border: 0;
  border-radius: 8px;
  background: var(--panel);
  cursor: zoom-in;
  break-inside: avoid;
  box-shadow: none;
}

.gallery-item img {
  width: 100%;
  aspect-ratio: var(--ratio, 4 / 5);
  object-fit: cover;
  filter: grayscale(0.28) contrast(1.04);
  opacity: 0;
  transform: scale(1.02);
  transition: opacity 700ms var(--ease), transform 700ms var(--ease), filter 700ms var(--ease);
}

.gallery-item img.is-loaded {
  opacity: 1;
}

.gallery-item::before {
  position: absolute;
  inset: 0;
  z-index: 1;
  content: "";
  background: linear-gradient(180deg, transparent 30%, rgba(0, 0, 0, 0.72));
  opacity: 0;
  transition: opacity 420ms var(--ease);
}

.gallery-caption {
  position: absolute;
  left: 18px;
  right: 18px;
  bottom: 18px;
  z-index: 2;
  color: var(--text);
  text-align: left;
  opacity: 0;
  transform: translateY(12px);
  transition: opacity 420ms var(--ease), transform 420ms var(--ease);
}

.sample-badge {
  position: absolute;
  top: 14px;
  left: 14px;
  z-index: 3;
  padding: 5px 9px;
  border: 1px solid rgba(244, 241, 235, 0.22);
  border-radius: 999px;
  background: rgba(0, 0, 0, 0.36);
  color: rgba(244, 241, 235, 0.8);
  font-size: 0.72rem;
  backdrop-filter: blur(10px);
}

.gallery-item .gallery-logo-mark {
  position: absolute;
  right: 16px;
  bottom: 16px;
  z-index: 3;
  width: min(82px, 28%);
  height: auto;
  aspect-ratio: auto;
  object-fit: contain;
  filter: invert(1);
  opacity: 0.72;
  transform: translateY(10px);
  transition: opacity 420ms var(--ease), transform 420ms var(--ease);
}

.gallery-item:hover .gallery-logo-mark,
.gallery-item:focus-visible .gallery-logo-mark {
  opacity: 0.92;
  transform: translateY(0);
}

.gallery-caption strong {
  display: block;
  font-size: 1.05rem;
  font-weight: 500;
}

.gallery-caption span {
  color: rgba(244, 241, 235, 0.68);
  font-size: 0.82rem;
}

.gallery-item:hover img {
  transform: scale(1.07);
  filter: grayscale(0.05) contrast(1.08);
}

.gallery-item:hover::before,
.gallery-item:hover .gallery-caption,
.gallery-item:focus-visible::before,
.gallery-item:focus-visible .gallery-caption {
  opacity: 1;
}

.gallery-item:hover .gallery-caption,
.gallery-item:focus-visible .gallery-caption {
  transform: translateY(0);
}

.about {
  position: relative;
  z-index: 2;
  background: linear-gradient(180deg, #080808, #101010 46%, #080808);
}

.about-layout,
.contact-layout {
  width: min(1160px, 100%);
  margin: 0 auto;
  display: grid;
  grid-template-columns: minmax(0, 0.85fr) minmax(0, 1fr);
  gap: clamp(34px, 7vw, 86px);
  align-items: center;
}

.about-image-wrap {
  display: grid;
  min-height: clamp(220px, 30vw, 420px);
  place-items: center;
  overflow: visible;
  border-radius: 0;
  background: transparent;
  box-shadow: none;
}

.about-image {
  width: min(340px, 72%);
  height: auto;
  padding: 0;
  object-fit: contain;
  filter: none;
  opacity: 0.92;
}

.about-copy p {
  font-size: 1rem;
}

.about-stats {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 10px;
  margin-top: 34px;
  border-top: 1px solid var(--line);
  padding-top: 22px;
}

.about-stats span {
  color: var(--muted);
  font-size: 0.82rem;
}

.about-stats strong {
  display: block;
  color: var(--text);
  font-family: Georgia, "Times New Roman", serif;
  font-size: 1.7rem;
  font-weight: 400;
  line-height: 1.2;
}

.service-grid {
  width: min(1160px, 100%);
  margin: 0 auto;
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 14px;
}

.service-card {
  min-height: 300px;
  padding: 24px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.045), rgba(255, 255, 255, 0.018));
  transition: transform 360ms var(--ease), border-color 360ms var(--ease), background 360ms var(--ease);
}

.service-card:hover {
  transform: translateY(-8px);
  border-color: rgba(199, 161, 107, 0.56);
  background: linear-gradient(180deg, rgba(199, 161, 107, 0.13), rgba(255, 255, 255, 0.018));
}

.service-card span {
  color: var(--warm);
  font-family: Georgia, "Times New Roman", serif;
}

.service-card h3 {
  margin: 74px 0 14px;
  font-size: 1.15rem;
  font-weight: 500;
}

.service-card p {
  margin: 0;
  color: var(--muted);
  font-size: 0.92rem;
}

.contact {
  background:
    linear-gradient(180deg, rgba(199, 161, 107, 0.06), transparent 34%),
    #080808;
}

.contact-layout {
  align-items: start;
}

.contact-list {
  margin: 30px 0;
  border-top: 1px solid var(--line);
}

.contact-list p {
  display: flex;
  justify-content: space-between;
  gap: 18px;
  margin: 0;
  padding: 14px 0;
  border-bottom: 1px solid var(--line);
  color: var(--muted);
}

.contact-list span {
  color: var(--text);
}

.contact-form {
  display: grid;
  gap: 18px;
  padding: clamp(22px, 4vw, 36px);
  border: 1px solid var(--line);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.035);
}

.contact-form label {
  display: grid;
  gap: 8px;
  color: rgba(244, 241, 235, 0.78);
  font-size: 0.88rem;
}

.contact-form input,
.contact-form select,
.contact-form textarea {
  width: 100%;
  border: 1px solid rgba(244, 241, 235, 0.16);
  border-radius: 4px;
  background: rgba(0, 0, 0, 0.24);
  color: var(--text);
  outline: none;
  padding: 13px 14px;
  transition: border-color 240ms var(--ease), background 240ms var(--ease);
}

.contact-form input:focus,
.contact-form select:focus,
.contact-form textarea:focus {
  border-color: rgba(199, 161, 107, 0.72);
  background: rgba(0, 0, 0, 0.38);
}

.contact-form textarea {
  resize: vertical;
}

.form-note {
  min-height: 24px;
  margin: 0;
  color: var(--warm);
}

.site-footer {
  display: flex;
  justify-content: space-between;
  gap: 20px;
  padding: 28px clamp(20px, 5vw, 64px);
  border-top: 1px solid var(--line);
  color: rgba(244, 241, 235, 0.5);
  font-size: 0.84rem;
}

.lightbox {
  position: fixed;
  inset: 0;
  z-index: 100;
  display: grid;
  place-items: center;
  padding: 24px;
  background: rgba(0, 0, 0, 0.9);
  opacity: 0;
  pointer-events: none;
  transition: opacity 320ms var(--ease);
}

.lightbox.is-open {
  opacity: 1;
  pointer-events: auto;
}

.lightbox figure {
  width: min(1120px, 100%);
  margin: 0;
}

.lightbox img {
  width: 100%;
  max-height: 82svh;
  object-fit: contain;
  border-radius: 6px;
}

.lightbox figcaption {
  margin-top: 12px;
  color: rgba(244, 241, 235, 0.72);
  text-align: center;
}

.lightbox-close,
.lightbox-nav {
  position: absolute;
  border: 1px solid rgba(244, 241, 235, 0.22);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.06);
  color: var(--text);
  cursor: pointer;
  transition: background 240ms var(--ease), transform 240ms var(--ease);
}

.lightbox-close:hover,
.lightbox-nav:hover {
  background: rgba(199, 161, 107, 0.24);
  transform: translateY(-2px);
}

.lightbox-close {
  top: 22px;
  right: 22px;
  width: 44px;
  height: 44px;
  font-size: 2rem;
  line-height: 1;
}

.lightbox-nav {
  top: 50%;
  width: 46px;
  height: 46px;
  font-size: 2rem;
  transform: translateY(-50%);
}

.lightbox-nav:hover {
  transform: translateY(calc(-50% - 2px));
}

.lightbox-nav.prev {
  left: 22px;
}

.lightbox-nav.next {
  right: 22px;
}

.reveal {
  opacity: 0;
  transform: translateY(28px);
  transition: opacity 760ms var(--ease), transform 760ms var(--ease);
}

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

.page-shell {
  opacity: 0;
  animation: pageFade 900ms var(--ease) forwards;
}

body.is-transitioning main {
  opacity: 0.96;
  transition: opacity 220ms var(--ease);
}

@keyframes heroScale {
  from {
    transform: scale(1.12);
  }
  to {
    transform: scale(1.04);
  }
}

@keyframes cue {
  0% {
    opacity: 0;
    transform: translate(-50%, 0);
  }
  40% {
    opacity: 1;
  }
  100% {
    opacity: 0;
    transform: translate(-50%, 18px);
  }
}

@keyframes pageFade {
  to {
    opacity: 1;
  }
}

@media (min-width: 680px) {
  .gallery {
    column-count: 2;
  }
}

@media (min-width: 1080px) {
  .gallery {
    column-count: 3;
  }
}

@media (max-width: 1040px) {
  .service-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .service-card {
    min-height: 240px;
  }

  .service-card h3 {
    margin-top: 52px;
  }
}

@media (max-width: 820px) {
  .nav-toggle {
    display: block;
  }

  .site-nav {
    position: fixed;
    inset: 0;
    z-index: 51;
    display: grid;
    place-content: center;
    gap: 24px;
    background: rgba(8, 8, 8, 0.96);
    font-size: 1.3rem;
    opacity: 0;
    pointer-events: none;
    transform: translateY(-10px);
    transition: opacity 320ms var(--ease), transform 320ms var(--ease);
  }

  .is-menu-open .site-nav {
    opacity: 1;
    pointer-events: auto;
    transform: translateY(0);
  }

  .hero-title {
    font-size: clamp(4rem, 18vw, 7rem);
  }

  .about-layout,
  .contact-layout {
    grid-template-columns: 1fr;
  }

  .about-image {
    width: min(300px, 72%);
  }

  .about-stats {
    grid-template-columns: 1fr;
  }

  .contact-list p {
    display: grid;
    gap: 4px;
  }

  .site-footer {
    display: grid;
  }

  .lightbox-nav {
    top: auto;
    bottom: 22px;
    transform: none;
  }

  .lightbox-nav:hover {
    transform: translateY(-2px);
  }
}

@media (max-width: 560px) {
  .section-page {
    padding-left: 18px;
    padding-right: 18px;
  }

  .portfolio.section-page {
    padding-top: 72px;
    padding-bottom: 76px;
  }

  .section-heading {
    margin-bottom: 26px;
  }

  .site-header {
    padding-left: 18px;
    padding-right: 18px;
  }

  .service-grid {
    grid-template-columns: 1fr;
  }

  .service-card {
    min-height: 220px;
  }

  .filter-bar {
    justify-content: flex-start;
    overflow-x: auto;
    flex-wrap: nowrap;
    margin-right: -18px;
    margin-left: -18px;
    padding: 0 18px 8px;
    scrollbar-width: none;
  }

  .filter-bar::-webkit-scrollbar {
    display: none;
  }

  .filter-button {
    flex: 0 0 auto;
  }

  .gallery-item {
    margin-bottom: 12px;
    border-radius: 6px;
  }
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    scroll-behavior: auto !important;
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
}
