/* ============================================================
   DESIGN PACIFIC — Main Stylesheet
   Palette: Espresso #0E0A06 · Bone #E8D8C0 · Bronze #A8885A
   Fonts: Cormorant Garamond · Jost
   ============================================================ */

/* --- Reset & Base ----------------------------------------- */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

:root {
  --espresso:   #0E0A06;
  --espresso-2: #1C1208;
  --espresso-3: #2C1A0C;
  --bark:       #3D2410;
  --bronze:     #A8885A;
  --bronze-lt:  #C8AA84;
  --bone:       #E8D8C0;
  --cream:      #F4EDE0;
  --white:      #FDFAF7;
  --serif:      'Cormorant Garamond', Georgia, 'Times New Roman', serif;
  --sans:       'Jost', 'Inter', system-ui, sans-serif;
  --ease:       cubic-bezier(0.4, 0, 0.2, 1);
  --nav-h:      72px;
}

html { scroll-behavior: smooth; font-size: 16px; }

body {
  font-family: var(--sans);
  font-weight: 300;
  color: var(--bone);
  background: var(--espresso);
  line-height: 1.7;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

img { display: block; max-width: 100%; height: auto; }
a { color: inherit; text-decoration: none; }
button { cursor: pointer; border: none; background: none; font: inherit; }

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

/* --- Typography ------------------------------------------- */
h1, h2, h3 { font-family: var(--serif); font-weight: 400; line-height: 1.15; }

.label {
  font-family: var(--sans);
  font-size: 0.6875rem;
  font-weight: 400;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--bronze);
}

/* --- Layout helpers --------------------------------------- */
.container { max-width: 1280px; margin: 0 auto; padding: 0 40px; }
@media (max-width: 768px) { .container { padding: 0 24px; } }

/* ============================================================
   NAV
   ============================================================ */
.nav {
  position: fixed;
  top: 0; left: 0; right: 0;
  z-index: 100;
  height: var(--nav-h);
  display: flex;
  align-items: center;
  transition: background 0.4s var(--ease), backdrop-filter 0.4s var(--ease);
}

.nav.scrolled {
  background: rgba(14, 10, 6, 0.94);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-bottom: 1px solid rgba(168, 136, 90, 0.15);
}

.nav__inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  width: 100%;
  max-width: 1280px;
  margin: 0 auto;
  padding: 0 40px;
}

.nav__logo {
  display: flex;
  align-items: center;
  gap: 10px;
}

.nav__logo img {
  height: 36px;
  width: auto;
}

.nav__links {
  display: flex;
  align-items: center;
  gap: 36px;
  list-style: none;
}

.nav__links a {
  font-size: 0.6875rem;
  font-weight: 400;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--bone);
  transition: color 0.25s;
}
.nav__links a:hover { color: var(--bronze); }

.nav__cta {
  font-size: 0.6875rem;
  font-weight: 400;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--espresso) !important;
  background: var(--bronze);
  padding: 9px 22px;
  transition: background 0.25s, color 0.25s !important;
}
.nav__cta:hover { background: var(--bronze-lt); }

.nav__hamburger {
  display: none;
  flex-direction: column;
  gap: 5px;
  padding: 4px;
}
.nav__hamburger span {
  display: block;
  width: 24px;
  height: 1px;
  background: var(--bone);
  transition: transform 0.3s, opacity 0.3s;
}

@media (max-width: 768px) {
  .nav__links { display: none; }
  .nav__hamburger { display: flex; }
  .nav__inner { padding: 0 24px; }
  .nav__logo img { height: 28px; }
}

/* ============================================================
   HERO
   ============================================================ */
.hero {
  position: relative;
  height: 100vh;
  min-height: 640px;
  display: flex;
  align-items: flex-end;
  overflow: hidden;
}

.hero__bg {
  position: absolute;
  inset: 0;
  background-size: cover;
  background-position: center 40%;
  transform: scale(1.04);
  transition: transform 8s ease-out;
}
.hero__bg.loaded { transform: scale(1); }

.hero__overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(
    to top,
    rgba(14, 10, 6, 0.85) 0%,
    rgba(14, 10, 6, 0.3) 50%,
    rgba(14, 10, 6, 0.1) 100%
  );
}

.hero__content {
  position: relative;
  z-index: 2;
  width: 100%;
  padding: 0 40px 80px;
  max-width: 1280px;
  margin: 0 auto;
}

.hero__label-row {
  display: flex;
  justify-content: space-between;
  margin-bottom: 24px;
}

.hero__title {
  font-family: var(--serif);
  font-size: clamp(4rem, 10vw, 9rem);
  font-weight: 300;
  color: var(--cream);
  line-height: 0.9;
  letter-spacing: -0.01em;
  margin-bottom: 28px;
}

.hero__tagline {
  max-width: 560px;
  font-size: clamp(0.9375rem, 1.5vw, 1.0625rem);
  font-weight: 300;
  color: var(--bone);
  line-height: 1.75;
  margin-bottom: 40px;
  opacity: 0.88;
}

.hero__actions {
  display: flex;
  gap: 20px;
  align-items: center;
}

.btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-family: var(--sans);
  font-size: 0.6875rem;
  font-weight: 400;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  transition: all 0.25s var(--ease);
}

.btn--primary {
  background: var(--bronze);
  color: var(--espresso);
  padding: 14px 32px;
}
.btn--primary:hover { background: var(--bronze-lt); }

.btn--outline {
  border: 1px solid rgba(232, 216, 192, 0.5);
  color: var(--bone);
  padding: 13px 32px;
}
.btn--outline:hover {
  border-color: var(--bronze);
  color: var(--bronze);
}

.hero__scroll {
  position: absolute;
  bottom: 40px;
  right: 40px;
  z-index: 2;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 10px;
}
.hero__scroll span {
  font-size: 0.625rem;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: rgba(232, 216, 192, 0.6);
  writing-mode: vertical-rl;
}
.hero__scroll-line {
  width: 1px;
  height: 48px;
  background: linear-gradient(to bottom, rgba(168,136,90,0.6), transparent);
  animation: scrollline 2s ease-in-out infinite;
}
@keyframes scrollline {
  0%, 100% { transform: scaleY(1); opacity: 1; }
  50% { transform: scaleY(0.5); opacity: 0.4; }
}

@media (max-width: 768px) {
  .hero__content { padding: 0 24px 64px; }
  .hero__label-row { display: none; }
  .hero__scroll { display: none; }
}

/* ============================================================
   SECTION SHARED STYLES
   ============================================================ */
.section-header {
  margin-bottom: 64px;
}
.section-header .label { display: block; margin-bottom: 16px; }
.section-header h2 {
  font-size: clamp(2.5rem, 5vw, 4rem);
  color: var(--cream);
}
.section-header p {
  max-width: 520px;
  font-size: 1rem;
  color: rgba(232, 216, 192, 0.75);
  margin-top: 16px;
  line-height: 1.8;
}

/* Fade-in on scroll */
.fade-up {
  opacity: 0;
  transform: translateY(28px);
  transition: opacity 0.7s var(--ease), transform 0.7s var(--ease);
}
.fade-up.visible {
  opacity: 1;
  transform: translateY(0);
}

/* ============================================================
   PORTFOLIO
   ============================================================ */
.portfolio {
  padding: 120px 0;
  background: var(--espresso);
}

.portfolio .container { max-width: 1340px; }

.portfolio__grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 2px;
}

.project-card {
  position: relative;
  overflow: hidden;
  cursor: pointer;
  aspect-ratio: 4/3;
  background: var(--espresso-2);
}

/* Tall hero card — first project */
.project-card:first-child {
  grid-column: 1 / 2;
  grid-row: 1 / 3;
  aspect-ratio: unset;
}

.project-card__img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.7s var(--ease);
}

.project-card:hover .project-card__img {
  transform: scale(1.06);
}

.project-card__overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(
    to top,
    rgba(14,10,6,0.82) 0%,
    rgba(14,10,6,0.1) 50%,
    transparent 100%
  );
  opacity: 0;
  transition: opacity 0.4s var(--ease);
  display: flex;
  align-items: flex-end;
  padding: 32px;
}
.project-card:hover .project-card__overlay { opacity: 1; }

.project-card__info { }
.project-card__num {
  font-size: 0.5625rem;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--bronze);
  margin-bottom: 8px;
}
.project-card__name {
  font-family: var(--serif);
  font-size: 1.625rem;
  color: var(--cream);
  font-weight: 300;
  line-height: 1.2;
  margin-bottom: 4px;
}
.project-card__location {
  font-size: 0.75rem;
  color: rgba(232, 216, 192, 0.7);
  letter-spacing: 0.08em;
}
.project-card__view {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  margin-top: 14px;
  font-size: 0.625rem;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--bronze);
}
.project-card__view svg { transition: transform 0.25s; }
.project-card:hover .project-card__view svg { transform: translateX(4px); }

/* Always-visible label (for accessibility/mobile) */
.project-card__label {
  position: absolute;
  bottom: 0; left: 0; right: 0;
  padding: 18px 24px;
  background: linear-gradient(to top, rgba(14,10,6,0.8), transparent);
}
.project-card__label .project-card__name { font-size: 1.25rem; }

@media (max-width: 900px) {
  .portfolio__grid { grid-template-columns: 1fr; gap: 2px; }
  .project-card:first-child { grid-column: 1; grid-row: auto; aspect-ratio: 4/3; }
  .project-card__overlay { opacity: 1; }
}

/* ============================================================
   ABOUT
   ============================================================ */
.about {
  padding: 140px 0;
  background: var(--espresso-2);
  position: relative;
  overflow: hidden;
}

.about::before {
  content: '';
  position: absolute;
  top: -1px; left: 0; right: 0;
  height: 1px;
  background: linear-gradient(to right, transparent, var(--bronze), transparent);
}

.about__grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 80px;
  align-items: start;
}

.about__text {}

.about__text h2 {
  font-size: clamp(2rem, 4vw, 3.25rem);
  color: var(--cream);
  margin: 16px 0 32px;
  line-height: 1.2;
}

.about__body p {
  font-size: 1rem;
  color: rgba(232, 216, 192, 0.8);
  margin-bottom: 20px;
  line-height: 1.85;
}

.about__stats {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 2px;
  margin-top: 48px;
  border-top: 1px solid rgba(168,136,90,0.2);
  padding-top: 40px;
}

.stat {
  padding: 0 24px 0 0;
}
.stat__num {
  font-family: var(--serif);
  font-size: 2.5rem;
  color: var(--bronze);
  font-weight: 300;
  line-height: 1;
  margin-bottom: 8px;
}
.stat__label {
  font-size: 0.75rem;
  letter-spacing: 0.1em;
  color: rgba(232, 216, 192, 0.5);
  text-transform: uppercase;
  line-height: 1.4;
}

.about__visual {
  position: relative;
}
.about__photo {
  width: 100%;
  aspect-ratio: 3/4;
  object-fit: cover;
  object-position: center;
}
.about__accent-line {
  position: absolute;
  top: 24px; left: -24px;
  width: 1px; height: 80px;
  background: var(--bronze);
}
.about__accent-text {
  position: absolute;
  bottom: -20px; right: -20px;
  background: var(--espresso);
  padding: 20px 28px;
  font-family: var(--serif);
  font-size: 1.125rem;
  color: var(--bone);
  font-style: italic;
  max-width: 240px;
  line-height: 1.5;
  border: 1px solid rgba(168,136,90,0.2);
}

@media (max-width: 900px) {
  .about__grid { grid-template-columns: 1fr; gap: 48px; }
  .about__visual { order: -1; }
  .about__accent-text { display: none; }
}

/* ============================================================
   SERVICES
   ============================================================ */
.services {
  padding: 120px 0;
  background: var(--espresso);
  border-top: 1px solid rgba(168,136,90,0.12);
}

.services__grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 2px;
  margin-top: 64px;
}

.service-card {
  padding: 40px 36px;
  background: var(--espresso-2);
  border-top: 2px solid transparent;
  transition: border-color 0.3s, background 0.3s;
}
.service-card:hover {
  border-top-color: var(--bronze);
  background: var(--espresso-3);
}

.service-card__num {
  font-size: 0.5625rem;
  letter-spacing: 0.25em;
  color: var(--bronze);
  margin-bottom: 20px;
}
.service-card h3 {
  font-family: var(--serif);
  font-size: 1.375rem;
  color: var(--cream);
  font-weight: 400;
  margin-bottom: 16px;
}
.service-card p {
  font-size: 0.9375rem;
  color: rgba(232, 216, 192, 0.65);
  line-height: 1.8;
}

@media (max-width: 900px) { .services__grid { grid-template-columns: 1fr; } }
@media (min-width: 901px) and (max-width: 1100px) {
  .services__grid { grid-template-columns: repeat(2, 1fr); }
}

/* ============================================================
   CONTACT
   ============================================================ */
.contact {
  padding: 120px 0;
  background: var(--espresso-2);
  position: relative;
}
.contact::before {
  content: '';
  position: absolute;
  top: -1px; left: 0; right: 0;
  height: 1px;
  background: linear-gradient(to right, transparent, var(--bronze), transparent);
}

.contact__grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 80px;
  align-items: start;
}

.contact__info { }
.contact__info h2 {
  font-size: clamp(2rem, 4vw, 3.25rem);
  color: var(--cream);
  margin: 16px 0 28px;
}
.contact__info p {
  font-size: 1rem;
  color: rgba(232, 216, 192, 0.75);
  line-height: 1.8;
  margin-bottom: 40px;
}

.contact__details { }
.contact__detail {
  display: flex;
  gap: 16px;
  align-items: flex-start;
  margin-bottom: 24px;
  padding-bottom: 24px;
  border-bottom: 1px solid rgba(168,136,90,0.12);
}
.contact__detail:last-child { border-bottom: none; }
.contact__detail-icon {
  width: 36px;
  height: 36px;
  display: flex;
  align-items: center;
  justify-content: center;
  border: 1px solid rgba(168,136,90,0.3);
  flex-shrink: 0;
  color: var(--bronze);
}
.contact__detail-label {
  font-size: 0.625rem;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--bronze);
  margin-bottom: 4px;
}
.contact__detail-value {
  font-size: 0.9375rem;
  color: var(--bone);
}

/* Form */
.contact__form { }
.contact__form form { display: flex; flex-direction: column; gap: 16px; }

.form-group { display: flex; flex-direction: column; gap: 6px; }
.form-group label {
  font-size: 0.625rem;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--bronze);
}
.form-group input,
.form-group select,
.form-group textarea {
  background: rgba(255,255,255,0.04);
  border: 1px solid rgba(168,136,90,0.2);
  color: var(--bone);
  font-family: var(--sans);
  font-size: 0.9375rem;
  font-weight: 300;
  padding: 14px 16px;
  outline: none;
  transition: border-color 0.25s;
  -webkit-appearance: none;
}
.form-group input::placeholder,
.form-group textarea::placeholder { color: rgba(232,216,192,0.3); }
.form-group input:focus,
.form-group select:focus,
.form-group textarea:focus { border-color: var(--bronze); }
.form-group textarea { min-height: 140px; resize: vertical; }

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

.form-submit {
  background: var(--bronze);
  color: var(--espresso);
  font-family: var(--sans);
  font-size: 0.6875rem;
  font-weight: 400;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  padding: 16px 40px;
  width: 100%;
  cursor: pointer;
  border: none;
  transition: background 0.25s;
  margin-top: 8px;
}
.form-submit:hover { background: var(--bronze-lt); }

.form-note {
  font-size: 0.75rem;
  color: rgba(232,216,192,0.4);
  margin-top: 12px;
  line-height: 1.6;
}

@media (max-width: 900px) {
  .contact__grid { grid-template-columns: 1fr; gap: 56px; }
}

/* ============================================================
   FOOTER
   ============================================================ */
.footer {
  background: var(--espresso);
  border-top: 1px solid rgba(168,136,90,0.12);
  padding: 48px 0;
}
.footer__inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
}
.footer__logo img { height: 28px; opacity: 0.7; }
.footer__copy {
  font-size: 0.75rem;
  color: rgba(232,216,192,0.4);
  letter-spacing: 0.06em;
}
.footer__links {
  display: flex;
  gap: 28px;
  list-style: none;
}
.footer__links a {
  font-size: 0.625rem;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: rgba(232,216,192,0.45);
  transition: color 0.25s;
}
.footer__links a:hover { color: var(--bronze); }

@media (max-width: 768px) {
  .footer__inner { flex-direction: column; gap: 24px; text-align: center; }
}

/* ============================================================
   LIGHTBOX
   ============================================================ */
.lightbox {
  position: fixed;
  inset: 0;
  z-index: 200;
  background: rgba(14, 10, 6, 0.97);
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.35s var(--ease);
}
.lightbox.open {
  opacity: 1;
  pointer-events: all;
}

.lightbox__close {
  position: absolute;
  top: 24px; right: 28px;
  width: 44px; height: 44px;
  display: flex; align-items: center; justify-content: center;
  color: var(--bone);
  font-size: 1.5rem;
  opacity: 0.6;
  transition: opacity 0.2s;
  z-index: 10;
}
.lightbox__close:hover { opacity: 1; }

.lightbox__nav {
  position: absolute;
  top: 50%; transform: translateY(-50%);
  width: 52px; height: 52px;
  display: flex; align-items: center; justify-content: center;
  color: var(--bone);
  opacity: 0.5;
  transition: opacity 0.2s;
  z-index: 10;
}
.lightbox__nav:hover { opacity: 1; }
.lightbox__nav--prev { left: 20px; }
.lightbox__nav--next { right: 20px; }

.lightbox__img-wrap {
  max-width: 90vw;
  max-height: 85vh;
  display: flex;
  align-items: center;
  justify-content: center;
}
.lightbox__img {
  max-width: 90vw;
  max-height: 82vh;
  object-fit: contain;
  transition: opacity 0.25s;
}
.lightbox__img.fading { opacity: 0; }

.lightbox__info {
  position: absolute;
  bottom: 24px; left: 0; right: 0;
  text-align: center;
}
.lightbox__title {
  font-family: var(--serif);
  font-size: 1.125rem;
  color: var(--bone);
  margin-bottom: 4px;
}
.lightbox__counter {
  font-size: 0.6875rem;
  letter-spacing: 0.15em;
  color: rgba(232,216,192,0.45);
}

.lightbox__thumbs {
  position: absolute;
  bottom: 72px; left: 0; right: 0;
  display: flex;
  justify-content: center;
  gap: 6px;
  padding: 0 40px;
}
.lightbox__thumb {
  width: 52px;
  height: 36px;
  object-fit: cover;
  opacity: 0.4;
  cursor: pointer;
  transition: opacity 0.2s;
  flex-shrink: 0;
}
.lightbox__thumb.active { opacity: 1; outline: 1px solid var(--bronze); }

@media (max-width: 768px) {
  .lightbox__nav { display: none; }
  .lightbox__thumbs { display: none; }
}
