:root {
  --black: #050505;
  --paper: #f4efe4;
  --ink: #f7f4ef;
  --soft: #b5b0a8;
  --red: #ff3f2f;
  --amber: #f0b94b;
  --panel: #111;
  --line: rgba(255, 255, 255, .14);
  --pad: 18px;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  background: var(--black);
  color: var(--ink);
  font-family: Arial, Helvetica, sans-serif;
  overflow-x: hidden;
}
body.no-scroll { overflow: hidden; }
a { color: inherit; text-decoration: none; }
img, video { display: block; max-width: 100%; }
.wrap { min-height: 100vh; }

.site-header {
  position: fixed;
  z-index: 50;
  top: 0;
  left: 0;
  right: 0;
  padding: 12px var(--pad);
  display: flex;
  align-items: center;
  justify-content: space-between;
  background: linear-gradient(to bottom, rgba(5, 5, 5, .88), transparent);
}

.logo img { width: 118px; }

.nav {
  display: flex;
  gap: 7px;
  align-items: center;
}

.nav a {
  border: 1px solid var(--line);
  padding: 9px 10px;
  border-radius: 999px;
  font-size: 11px;
  letter-spacing: .12em;
  text-transform: uppercase;
  background: rgba(5, 5, 5, .36);
  white-space: nowrap;
}

.nav a:nth-child(n+3) { display: none; }

.poster {
  min-height: 96svh;
  padding: 78px var(--pad) 26px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  position: relative;
  isolation: isolate;
  overflow: hidden;
}

.poster::before {
  content: "";
  position: absolute;
  inset: 0;
  background:
    linear-gradient(180deg, rgba(0, 0, 0, .28), rgba(0, 0, 0, .72) 62%, #050505),
    var(--hero-image) center/cover;
  z-index: -2;
  filter: contrast(1.1) saturate(.92);
}

.poster::after {
  content: "";
  position: absolute;
  inset: 8px;
  border: 1px solid rgba(255, 255, 255, .12);
  border-radius: 24px;
  pointer-events: none;
  z-index: -1;
}

.micro {
  font-size: 10px;
  letter-spacing: .22em;
  text-transform: uppercase;
  color: #efe6d0;
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}

.headline {
  margin: 0;
  font-size: clamp(68px, 24vw, 180px);
  line-height: .76;
  letter-spacing: -.05em;
  font-weight: 900;
  max-width: 5.4ch;
}

.headline em {
  font-family: Georgia, 'Times New Roman', serif;
  font-weight: 400;
  letter-spacing: -.1em;
}

.poster-copy {
  display: grid;
  gap: 18px;
}

.poster-copy p {
  margin: 0;
  color: #e0d8cb;
  line-height: 1.46;
  font-size: 17px;
  max-width: 35ch;
}

.cta-row {
  display: grid;
  gap: 9px;
}

.cta {
  min-height: 48px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 999px;
  padding: 13px 17px;
  font-weight: 900;
}

.cta.fill {
  background: var(--paper);
  color: #050505;
}

.cta.outline {
  border: 1px solid var(--line);
  background: rgba(0, 0, 0, .28);
}

.marquee {
  border-block: 1px solid var(--line);
  padding: 13px 0;
  overflow: hidden;
  white-space: nowrap;
  color: #e7e2d6;
  font-size: 13px;
  letter-spacing: .14em;
  text-transform: uppercase;
}

.marquee div {
  display: inline-block;
  padding-left: 12px;
  animation: slide 24s linear infinite;
}

@keyframes slide { to { transform: translateX(-50%); } }

section { padding: 56px var(--pad); }

.cap {
  color: var(--amber);
  font-size: 11px;
  letter-spacing: .2em;
  text-transform: uppercase;
  margin-bottom: 13px;
}

h1, h2, h3, p { overflow-wrap: anywhere; }

h2 {
  margin: 0;
  font-size: clamp(38px, 13vw, 92px);
  line-height: .86;
  letter-spacing: -.08em;
}

.serif {
  font-family: Georgia, 'Times New Roman', serif;
  font-weight: 400;
  letter-spacing: -.06em;
}

.body {
  color: #c9c2b7;
  line-height: 1.58;
  font-size: 17px;
}

.feature-card {
  margin-top: 26px;
  border-radius: 28px;
  overflow: hidden;
  background: #111;
  border: 1px solid var(--line);
}

.feature-card img {
  width: 100%;
  aspect-ratio: 4/5;
  object-fit: cover;
  filter: saturate(.82) contrast(1.08);
}

.feature-card .text { padding: 18px; }

.feature-card h3 {
  margin: 0 0 8px;
  font-size: 28px;
  line-height: 1;
  letter-spacing: -.04em;
}

.feature-card p {
  margin: 0;
  color: #c9c2b7;
  line-height: 1.45;
}

.works {
  display: flex;
  gap: 14px;
  overflow: auto;
  padding: 5px var(--pad) 10px;
  margin: 22px calc(var(--pad)*-1) 0;
  scroll-snap-type: x mandatory;
  -webkit-overflow-scrolling: touch;
}

.works::-webkit-scrollbar { display: none; }

.work {
  flex: 0 0 82%;
  min-height: 360px;
  border-radius: 26px;
  overflow: hidden;
  scroll-snap-align: center;
  position: relative;
  background: #151515;
  border: 1px solid var(--line);
}

.work img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  position: absolute;
  inset: 0;
  filter: saturate(.8);
  transition: transform .45s ease;
}

.work:hover img { transform: scale(1.045); }

.work::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, transparent 35%, rgba(0, 0, 0, .86));
}

.work div {
  position: absolute;
  left: 16px;
  right: 16px;
  bottom: 16px;
  z-index: 2;
}

.work h3 {
  margin: 0 0 7px;
  font-size: 29px;
  letter-spacing: -.05em;
}

.work p {
  margin: 0;
  color: #d6d0c5;
  font-size: 14px;
  line-height: 1.38;
}

.service-list {
  display: grid;
  gap: 1px;
  margin-top: 26px;
  border: 1px solid var(--line);
  border-radius: 24px;
  overflow: hidden;
}

.service-list article {
  padding: 18px;
  background: rgba(255, 255, 255, .045);
}

.service-list strong {
  display: block;
  margin-bottom: 4px;
  font-size: 18px;
}

.service-list span {
  color: #a9a49c;
  line-height: 1.42;
  font-size: 14px;
}

.quote { margin: 0; padding: 0; }

.quote p {
  margin: 0;
  font-family: Georgia, 'Times New Roman', serif;
  font-size: clamp(32px, 11vw, 72px);
  line-height: 1.02;
  letter-spacing: -.06em;
}

.quote cite {
  display: block;
  margin-top: 18px;
  color: var(--soft);
  font-style: normal;
}

.contact {
  border-radius: 30px;
  padding: 24px;
  background: var(--paper);
  color: #070707;
}

.contact .cap { color: #8c5a09; }

.contact p {
  color: #37322d;
  line-height: 1.5;
}

.contact .cta.fill {
  background: #050505;
  color: var(--paper);
}

.site-footer {
  padding: 24px var(--pad) 90px;
  color: var(--soft);
  font-size: 12px;
}

.site-footer img {
  width: 130px;
  margin-bottom: 12px;
}

.bottomnav {
  position: fixed;
  z-index: 60;
  left: 12px;
  right: 12px;
  bottom: max(12px, env(safe-area-inset-bottom));
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
  padding: 8px;
  border-radius: 22px;
  border: 1px solid var(--line);
  background: rgba(5, 5, 5, .78);
  backdrop-filter: blur(18px);
}

.bottomnav a {
  text-align: center;
  border-radius: 16px;
  padding: 12px 8px;
  font-weight: 800;
  font-size: 13px;
}

.bottomnav a:first-child {
  background: var(--paper);
  color: #050505;
}

/* Selected projects page */
.page-hero {
  padding: 112px var(--pad) 42px;
  min-height: 58svh;
  display: flex;
  flex-direction: column;
  justify-content: end;
}

.page-hero h1 {
  margin: 0;
  font-size: clamp(58px, 18vw, 150px);
  line-height: .78;
  letter-spacing: -.07em;
  max-width: 8ch;
}

.page-hero p {
  color: #c9c2b7;
  font-size: 17px;
  line-height: 1.5;
  max-width: 40ch;
}

.projects-list {
  display: grid;
  gap: 18px;
  padding-top: 0;
}

.project-row {
  display: grid;
  gap: 14px;
  padding: 16px;
  border: 1px solid var(--line);
  border-radius: 28px;
  background: rgba(255,255,255,.04);
}

.project-row img {
  width: 100%;
  aspect-ratio: 4/5;
  border-radius: 20px;
  object-fit: cover;
  filter: saturate(.85) contrast(1.04);
}

.project-row h2 {
  font-size: clamp(34px, 11vw, 74px);
}

.project-row p {
  color: #c9c2b7;
  line-height: 1.5;
}

/* Project detail and galleries */
.project-poster { min-height: 78svh; }

.project-meta {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  margin-top: 16px;
}

.project-meta span {
  border: 1px solid var(--line);
  border-radius: 999px;
  padding: 8px 10px;
  font-size: 11px;
  letter-spacing: .12em;
  text-transform: uppercase;
  color: #d6d0c5;
}

.gallery-grid {
  display: grid;
  gap: 12px;
  margin-top: 22px;
}

.gallery-grid button {
  appearance: none;
  border: 0;
  padding: 0;
  background: transparent;
  cursor: pointer;
}

.gallery-grid img {
  width: 100%;
  aspect-ratio: 4/5;
  object-fit: cover;
  border-radius: 22px;
  border: 1px solid var(--line);
  filter: saturate(.88) contrast(1.05);
}

.lightbox {
  position: fixed;
  z-index: 500;
  inset: 0;
  background: rgba(5, 5, 5, .94);
  display: none;
  align-items: center;
  justify-content: center;
  padding: 18px;
}

.lightbox.is-open { display: flex; }

.lightbox img {
  max-height: 82vh;
  width: auto;
  max-width: 100%;
  object-fit: contain;
}

.lightbox-close {
  position: fixed;
  top: 18px;
  right: 18px;
  appearance: none;
  border: 1px solid var(--line);
  background: rgba(255,255,255,.08);
  color: var(--ink);
  border-radius: 999px;
  padding: 12px 16px;
  font-weight: 900;
  cursor: pointer;
}

/* Admin */
.admin-body { background: #0b0b0b; color: var(--ink); }

.admin-shell {
  width: min(1080px, calc(100% - 28px));
  margin: 0 auto;
  padding: 26px 0 70px;
}

.admin-top {
  display: flex;
  gap: 14px;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 22px;
}

.admin-top img { width: 140px; }

.admin-card {
  background: #141414;
  border: 1px solid var(--line);
  border-radius: 24px;
  padding: 18px;
  margin-bottom: 16px;
}

.admin-card h1, .admin-card h2 {
  margin: 0 0 16px;
  font-size: clamp(30px, 10vw, 56px);
  line-height: .9;
  letter-spacing: -.06em;
}

.admin-grid { display: grid; gap: 14px; }

label {
  display: grid;
  gap: 7px;
  margin-bottom: 13px;
  color: #c9c2b7;
  font-size: 13px;
}

input, textarea, select {
  width: 100%;
  border: 1px solid var(--line);
  border-radius: 14px;
  padding: 12px;
  background: #070707;
  color: var(--ink);
  font: inherit;
}

textarea { min-height: 110px; resize: vertical; }

.admin-actions {
  display: flex;
  gap: 9px;
  flex-wrap: wrap;
}

button, .admin-btn {
  appearance: none;
  border: 0;
  border-radius: 999px;
  padding: 12px 16px;
  font-weight: 900;
  cursor: pointer;
  background: var(--paper);
  color: #050505;
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.admin-btn.secondary, button.secondary {
  border: 1px solid var(--line);
  background: transparent;
  color: var(--ink);
}

.admin-project {
  display: grid;
  gap: 12px;
  align-items: center;
  border-top: 1px solid var(--line);
  padding: 14px 0;
}

.admin-project img {
  width: 100%;
  aspect-ratio: 16/9;
  border-radius: 16px;
  object-fit: cover;
}

.notice {
  padding: 12px 14px;
  border-radius: 16px;
  background: rgba(240,185,75,.14);
  color: #f6dfaa;
  border: 1px solid rgba(240,185,75,.22);
  margin-bottom: 14px;
}

.danger {
  background: rgba(255,63,47,.13);
  color: #ffc4bd;
  border: 1px solid rgba(255,63,47,.25);
}

.current-image {
  width: 160px;
  border-radius: 16px;
  border: 1px solid var(--line);
}

@media (min-width: 760px) {
  :root { --pad: 34px; }
  .logo img { width: 172px; }
  .nav a:nth-child(n+3) { display: inline-flex; }
  .poster { min-height: 92vh; padding-top: 96px; }
  .poster-copy {
    grid-template-columns: minmax(0, 1fr) auto;
    align-items: end;
    column-gap: 36px;
  }
  .poster .cta-row {
    display: flex;
    justify-content: flex-end;
    align-items: center;
    gap: 10px;
  }
  .poster .cta {
    min-height: 40px;
    padding: 10px 16px;
    font-size: 12px;
    letter-spacing: .02em;
    white-space: nowrap;
  }
  section { padding: 86px var(--pad); max-width: 1240px; margin: auto; }
  .split {
    display: grid;
    grid-template-columns: .9fr 1.1fr;
    gap: 54px;
    align-items: center;
  }
  .feature-card img { aspect-ratio: 16/9; }
  .works {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    overflow: visible;
    margin: 30px 0 0;
    padding: 0;
  }
  .work { flex: auto; min-height: 420px; }
  .service-list { grid-template-columns: repeat(2, 1fr); }
  .bottomnav { left: auto; width: 340px; }
  .site-footer { max-width: 1240px; margin: auto; }
  .page-hero { padding-top: 150px; }
  .project-row {
    grid-template-columns: .92fr 1.08fr;
    align-items: center;
    gap: 32px;
    padding: 22px;
  }
  .project-row:nth-child(even) img { order: 2; }
  .project-row img { aspect-ratio: 16/10; }
  .project-poster .poster-copy {
    grid-template-columns: minmax(0, 1fr) auto;
  }
  .gallery-grid { grid-template-columns: repeat(3, 1fr); }
  .admin-grid { grid-template-columns: repeat(2, 1fr); }
  .admin-project { grid-template-columns: 190px 1fr auto; }
  .admin-project img { aspect-ratio: 16/10; }
}


/* Improved admin media upload/delete UX */
.file-drop {
  position: relative;
  border: 1px dashed rgba(255,255,255,.26);
  background: rgba(255,255,255,.035);
  border-radius: 20px;
  padding: 18px;
  cursor: pointer;
  transition: border-color .2s ease, background .2s ease;
}

.file-drop:hover {
  border-color: rgba(244,239,228,.62);
  background: rgba(255,255,255,.06);
}

.file-drop input[type="file"] {
  position: absolute;
  inset: 0;
  opacity: 0;
  cursor: pointer;
}

.file-drop-title {
  display: block;
  font-weight: 900;
  color: var(--ink);
  margin-bottom: 4px;
}

.file-drop-note {
  display: block;
  color: #a9a49c;
  font-size: 13px;
  line-height: 1.35;
}

.file-name {
  display: block;
  margin-top: 10px;
  color: #f0b94b;
  font-size: 12px;
  line-height: 1.35;
}

.media-admin-grid {
  display: grid;
  gap: 12px;
  margin-top: 14px;
}

.media-card {
  position: relative;
  border-radius: 18px;
  overflow: hidden;
  border: 1px solid var(--line);
  background: #0b0b0b;
}

.media-card img {
  width: 100%;
  aspect-ratio: 4/3;
  object-fit: cover;
}

.media-card-actions {
  position: absolute;
  inset: auto 8px 8px 8px;
  display: flex;
  justify-content: flex-end;
  gap: 8px;
}

.media-delete {
  min-height: auto;
  padding: 9px 12px;
  border-radius: 999px;
  background: rgba(255,63,47,.88);
  color: #fff;
  border: 1px solid rgba(255,255,255,.2);
  box-shadow: 0 10px 24px rgba(0,0,0,.35);
}

.media-delete:hover {
  background: rgba(255,63,47,1);
}

.media-card.is-removing {
  opacity: .42;
  pointer-events: none;
  filter: grayscale(1);
}

.media-empty {
  color: #a9a49c;
  font-size: 14px;
  padding: 16px;
  border: 1px solid var(--line);
  border-radius: 18px;
  background: rgba(255,255,255,.03);
}

@media (min-width: 760px) {
  .media-admin-grid {
    grid-template-columns: repeat(3, 1fr);
  }
}


/* Live-site image reel */
.visual-reel-section {
  padding-top: 10px;
  padding-bottom: 38px;
}

.visual-reel {
  display: grid;
  gap: 12px;
  margin-top: 16px;
}

.visual-reel figure {
  position: relative;
  margin: 0;
  min-height: 220px;
  border-radius: 26px;
  overflow: hidden;
  border: 1px solid var(--line);
  background: #111;
}

.visual-reel figure:nth-child(n+3) {
  display: none;
}

.visual-reel img {
  width: 100%;
  height: 100%;
  min-height: 220px;
  object-fit: cover;
  filter: saturate(.82) contrast(1.08);
}

.visual-reel figcaption {
  position: absolute;
  left: 14px;
  right: 14px;
  bottom: 14px;
  z-index: 2;
  color: #d6d0c5;
  font-size: 12px;
  line-height: 1.3;
  letter-spacing: .08em;
  text-transform: uppercase;
}

.visual-reel figcaption span {
  display: block;
  color: var(--ink);
  font-size: 15px;
  font-weight: 900;
  letter-spacing: .02em;
  text-transform: none;
  margin-bottom: 2px;
}

.visual-reel figure::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, transparent 45%, rgba(0,0,0,.82));
  pointer-events: none;
}

.selected-reel {
  padding-top: 0;
  padding-bottom: 22px;
}

@media (min-width:760px) {
  .visual-reel-section {
    padding-top: 20px;
    padding-bottom: 48px;
  }

  .visual-reel {
    grid-template-columns: 1.1fr .9fr 1fr;
    grid-auto-rows: 230px;
    gap: 14px;
  }

  .visual-reel.compact {
    grid-template-columns: repeat(4, 1fr);
    grid-auto-rows: 220px;
  }

  .visual-reel figure,
  .visual-reel figure:nth-child(n+3) {
    display: block;
  }

  .visual-reel figure:first-child {
    grid-row: span 2;
  }

  .visual-reel figure:nth-child(4) {
    grid-column: span 2;
  }

  .visual-reel.compact figure:first-child,
  .visual-reel.compact figure:nth-child(4) {
    grid-row: auto;
    grid-column: auto;
  }

  .visual-reel figure,
  .visual-reel img {
    min-height: 0;
  }
}
