
:root {
  --bg: #080808;
  --fg: #f3f0e9;
  --muted: #9d9991;
  --line: rgba(243, 240, 233, .18);
  --red: #ff2a1a;
  --display: "Archivo Black", sans-serif;
  --sans: "DM Sans", sans-serif;
  --serif: "Fraunces", serif;
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  margin: 0;
  overflow-x: hidden;
  background: var(--bg);
  color: var(--fg);
  font-family: var(--sans);
}

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

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

.noise {
  position: fixed;
  z-index: 500;
  inset: 0;
  pointer-events: none;
  opacity: .025;
  background-image:
    radial-gradient(circle at 20% 30%, #fff 0 .6px, transparent .7px),
    radial-gradient(circle at 75% 50%, #fff 0 .6px, transparent .7px);
  background-size: 8px 8px, 11px 11px;
}

/* One typeface throughout the navigation */
.site-header {
  position: fixed;
  z-index: 100;
  top: 0;
  right: 0;
  min-height: 72px;
  display: flex;
  align-items: center;
  justify-content: flex-end;
  padding: 0 24px;
  color: #fff;
  mix-blend-mode: difference;
}

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

.desktop-nav a,
.desktop-nav .nav-serif,
.desktop-nav .nav-lowercase,
.menu-button {
  position: relative;
  font-family: var(--sans);
  font-size: 11px;
  font-style: normal;
  font-weight: 600;
  letter-spacing: .1em;
  text-transform: uppercase;
}

.desktop-nav a::after {
  content: "";
  position: absolute;
  left: 0;
  right: 100%;
  bottom: -4px;
  height: 1px;
  background: currentColor;
  transition: right .25s ease;
}

.desktop-nav a:hover::after { right: 0; }

.menu-button {
  display: none;
  border: 0;
  background: transparent;
  color: inherit;
  cursor: pointer;
}

.mobile-menu {
  position: fixed;
  z-index: 300;
  inset: 0;
  display: none;
  flex-direction: column;
  padding: 22px;
  background: var(--red);
  color: #111;
}

.mobile-menu.is-open { display: flex; }

.mobile-menu-close {
  margin-left: auto;
  border: 0;
  background: transparent;
  cursor: pointer;
  font-family: var(--sans);
  font-size: 11px;
  font-weight: 600;
  letter-spacing: .1em;
}

.mobile-menu nav {
  margin-top: auto;
  display: flex;
  flex-direction: column;
}

.mobile-menu nav a,
.mobile-menu nav .menu-serif,
.mobile-menu nav .menu-lowercase {
  font-family: var(--sans);
  font-size: clamp(52px, 16vw, 110px);
  font-style: normal;
  font-weight: 600;
  line-height: .87;
  letter-spacing: -.065em;
  text-transform: uppercase;
}

/* HERO — clarity from Petr, full-image reactions on hover */
.hero {
  position: relative;
  min-height: 100svh;
  overflow: hidden;
  border-bottom: 1px solid var(--line);
}

.hero-backdrop,
.hero-preview {
  position: absolute;
  inset: 0;
}

.hero-preview {
  opacity: 0;
  transform: scale(1.04);
  background-size: cover;
  background-position: center;
  filter: saturate(.92) contrast(1.05);
  transition:
    opacity .5s ease,
    transform 1s cubic-bezier(.2,.7,.2,1);
}

.preview-work {
  background-image:
    linear-gradient(90deg, rgba(0,0,0,.08), rgba(0,0,0,.62)),
    url("assets/images/menu-work.jpg");
}

.preview-archive {
  background-image:
    linear-gradient(90deg, rgba(0,0,0,.07), rgba(0,0,0,.62)),
    url("assets/images/menu-archive.jpg");
}

.preview-about {
  background-image:
    linear-gradient(90deg, rgba(0,0,0,.07), rgba(0,0,0,.62)),
    url("assets/images/menu-about.jpg");
}

.preview-contact {
  background-image:
    linear-gradient(90deg, rgba(0,0,0,.06), rgba(0,0,0,.64)),
    url("assets/images/menu-contact.jpg");
}

.hero[data-active-preview="work"] .preview-work,
.hero[data-active-preview="archive"] .preview-archive,
.hero[data-active-preview="about"] .preview-about,
.hero[data-active-preview="contact"] .preview-contact {
  opacity: .96;
  transform: scale(1);
}

.hero-navigation {
  position: absolute;
  z-index: 10;
  top: 102px;
  right: 24px;
  width: min(410px, 36vw);
  border-top: 1px solid var(--line);
}

.hero-navigation a {
  display: grid;
  grid-template-columns: 42px 1fr;
  gap: 12px;
  align-items: center;
  padding: 13px 0;
  border-bottom: 1px solid var(--line);
  font-family: var(--sans);
  font-size: 11px;
  font-weight: 600;
  letter-spacing: .09em;
  text-transform: uppercase;
}

.hero-navigation a span { color: var(--muted); }

.hero-navigation a strong,
.hero-navigation .serif-label,
.hero-navigation .lowercase {
  font-family: var(--sans);
  font-size: inherit;
  font-style: normal;
  font-weight: 600;
  letter-spacing: inherit;
  text-transform: uppercase;
  white-space: nowrap;
}

.hero-navigation a:hover strong { color: var(--red); }

.hero-title {
  position: absolute;
  z-index: 8;
  left: 20px;
  right: 20px;
  bottom: 40px;
  display: flex;
  flex-direction: column;
  font-family: var(--display);
  font-size: clamp(92px, 17.5vw, 290px);
  line-height: .68;
  letter-spacing: -.085em;
  pointer-events: none;
}

.hero-word {
  display: block;
  will-change: transform;
}

.hero-word-davila { margin-left: 13vw; }

.hero[data-active-preview] .hero-title {
  mix-blend-mode: difference;
}

.hero-meta {
  position: absolute;
  z-index: 9;
  top: 104px;
  left: 24px;
  display: flex;
  flex-direction: column;
  gap: 9px;
  font-size: 10px;
  letter-spacing: .09em;
  text-transform: uppercase;
}

.hero-meta p { margin: 0; }

/* Shared section typography */
.work-section,
.about-section,
.contact-section {
  padding: 120px 24px;
}

.section-index {
  margin: 0;
  font-size: 10px;
  letter-spacing: .11em;
  text-transform: uppercase;
}

.section-intro {
  display: grid;
  grid-template-columns: .55fr 1.6fr .8fr;
  gap: 28px;
  align-items: end;
  margin-bottom: 90px;
}

.section-intro h2,
.archive-sticky h2,
.about-layout h2,
.contact-section h2 {
  margin: 0;
  font-family: var(--display);
  font-weight: 400;
  letter-spacing: -.075em;
  text-transform: uppercase;
}

.section-intro h2 {
  font-size: clamp(56px, 8vw, 130px);
  line-height: .79;
}

.serif-display {
  font-family: var(--serif);
  font-weight: 600;
  letter-spacing: -.07em;
  text-transform: none;
}

.section-description {
  margin: 0;
  color: var(--muted);
  font-size: 14px;
  line-height: 1.55;
}

.gou-layout-note {
  display: flex;
  justify-content: space-between;
  gap: 24px;
  margin-bottom: 42px;
  padding-top: 14px;
  border-top: 1px solid var(--line);
  color: var(--muted);
  font-size: 9px;
  letter-spacing: .11em;
  text-transform: uppercase;
}

/* WORK — ordered but expressive:
   an invisible 12-column grid, inspired by the three references.
   Additional projects automatically repeat the six-layout rhythm. */
.project-canvas {
  display: grid;
  grid-template-columns: repeat(12, minmax(0, 1fr));
  grid-auto-flow: dense;
  gap: clamp(90px, 10vw, 170px) 22px;
  align-items: start;
}

.project-item {
  position: relative;
  min-width: 0;
  cursor: pointer;
}

.project-item.layout-1 {
  grid-column: 1 / span 8;
}

.project-item.layout-2 {
  grid-column: 9 / span 4;
  margin-top: clamp(90px, 13vw, 190px);
}

.project-item.layout-3 {
  grid-column: 2 / span 4;
}

.project-item.layout-4 {
  grid-column: 7 / span 6;
  margin-top: clamp(30px, 5vw, 75px);
}

.project-item.layout-5 {
  grid-column: 1 / span 5;
  margin-top: clamp(20px, 4vw, 60px);
}

.project-item.layout-6 {
  grid-column: 6 / span 7;
  margin-top: clamp(110px, 14vw, 210px);
}

.project-visual {
  position: relative;
  width: 100%;
  overflow: hidden;
  background-image:
    linear-gradient(0deg, rgba(0,0,0,.08), rgba(0,0,0,0)),
    var(--project-image);
  background-size: cover;
  background-position: center;
  transition:
    transform .7s cubic-bezier(.2,.7,.2,1),
    filter .35s ease;
}

.layout-1 .project-visual,
.layout-4 .project-visual,
.layout-6 .project-visual {
  aspect-ratio: 16 / 10;
}

.layout-2 .project-visual,
.layout-3 .project-visual,
.layout-5 .project-visual {
  aspect-ratio: 4 / 5;
}

.project-item:hover .project-visual {
  transform: scale(.985);
}

.project-canvas:hover .project-item:not(:hover) .project-visual {
  filter: brightness(.62);
}

.project-number {
  display: block;
  margin-bottom: 10px;
  color: var(--red);
  font-family: var(--sans);
  font-size: 10px;
  letter-spacing: .1em;
}

.project-title {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 20px;
  align-items: end;
  margin-top: 15px;
  overflow: visible;
}

.project-title h3 {
  margin: 0;
  overflow: visible;
  font-family: var(--display);
  font-size: clamp(28px, 4vw, 66px);
  line-height: .84;
  letter-spacing: -.06em;
  text-transform: uppercase;
}

.project-item:nth-child(even) .project-title h3 {
  font-family: var(--serif);
  font-weight: 600;
  letter-spacing: -.055em;
  text-transform: none;
}

.project-title p {
  margin: 0;
  color: var(--muted);
  font-size: 9px;
  line-height: 1.45;
  letter-spacing: .08em;
  text-align: right;
  text-transform: uppercase;
}

/* A single typographic intervention, not decoration behind each image */
.project-canvas::before {
  content: "Personal / Editorial / Commercial";
  grid-column: 1 / -1;
  order: 5;
  padding: 16px 0 4px;
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
  color: var(--fg);
  font-family: var(--serif);
  font-size: clamp(44px, 8vw, 120px);
  font-weight: 600;
  line-height: .9;
  letter-spacing: -.065em;
}

/* ARCHIVE */
.archive-section {
  min-height: 145svh;
  display: grid;
  grid-template-columns: .72fr 1.28fr;
  gap: 70px;
  padding: 120px 24px;
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
}

.archive-sticky {
  position: sticky;
  top: 100px;
  align-self: start;
}

.archive-sticky h2 {
  margin-top: 70px;
  font-size: clamp(50px, 7vw, 110px);
  line-height: .82;
}

.archive-sticky > p:last-child {
  max-width: 420px;
  margin-top: 40px;
  color: var(--muted);
  line-height: 1.6;
}

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

.archive-card {
  min-height: 350px;
  display: grid;
  place-items: center;
  background: #1b1b1b;
  font-family: var(--display);
  font-size: clamp(24px, 4vw, 62px);
  letter-spacing: -.05em;
}

.archive-serif {
  font-family: var(--serif);
  font-weight: 600;
  letter-spacing: -.06em;
}

.archive-card-1 { background: #2c2c2c; }
.archive-card-2 { background: #38251f; margin-top: 100px; }
.archive-card-3 { background: #171717; }
.archive-card-4 { background: #46413a; margin-top: 70px; }
.archive-card-5 { background: #27120d; }
.archive-card-6 { background: #232323; margin-top: 110px; }

/* ABOUT */
.about-layout {
  display: grid;
  grid-template-columns: 1.3fr .7fr;
  gap: 8vw;
  margin-top: 90px;
  align-items: end;
}

.about-layout h2 {
  font-size: clamp(58px, 9vw, 150px);
  line-height: .78;
}

.about-copy { max-width: 560px; }

.about-copy p {
  color: var(--muted);
  line-height: 1.6;
}

.about-copy .about-lead {
  color: var(--fg);
  font-size: clamp(22px, 2.3vw, 34px);
  line-height: 1.2;
}

.services {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 36px;
}

.services span {
  padding: 9px 12px;
  border: 1px solid var(--line);
  font-size: 10px;
  letter-spacing: .07em;
  text-transform: uppercase;
}

/* CONTACT */
.contact-section {
  min-height: 100svh;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  background: var(--red);
  color: #111;
}

.contact-section h2 {
  margin: 80px 0;
  font-size: clamp(68px, 13vw, 210px);
  line-height: .74;
}

.dark-serif { color: #111; }

.contact-grid {
  display: flex;
  flex-wrap: wrap;
  gap: 30px;
}

.contact-grid a {
  border-bottom: 1px solid currentColor;
  font-size: clamp(18px, 2vw, 28px);
  font-weight: 600;
}

.contact-footer {
  display: flex;
  justify-content: space-between;
  gap: 20px;
  padding-top: 20px;
  margin-top: 80px;
  border-top: 1px solid rgba(17,17,17,.3);
  font-size: 10px;
  letter-spacing: .08em;
  text-transform: uppercase;
}

/* CURSOR */
.cursor {
  position: fixed;
  z-index: 600;
  width: 14px;
  height: 14px;
  border-radius: 50%;
  background: var(--red);
  pointer-events: none;
  transform: translate(-50%, -50%);
  transition:
    width .2s ease,
    height .2s ease,
    background .2s ease;
}

.cursor.is-active {
  width: 42px;
  height: 42px;
  background: transparent;
  border: 2px solid var(--red);
}

/* PROJECT VIEWER */
.project-viewer {
  position: fixed;
  z-index: 400;
  inset: 0;
  display: none;
  overflow-y: auto;
  background: var(--bg);
}

.project-viewer.is-open { display: block; }

.viewer-close {
  position: fixed;
  z-index: 2;
  top: 20px;
  right: 22px;
  border: 0;
  background: var(--red);
  color: #111;
  padding: 10px 14px;
  cursor: pointer;
  font-size: 10px;
  font-weight: 600;
  letter-spacing: .09em;
}

.viewer-content { padding: 95px 24px 90px; }

.viewer-header {
  display: grid;
  grid-template-columns: 1.6fr .7fr;
  gap: 50px;
  align-items: end;
  padding-bottom: 30px;
  border-bottom: 1px solid var(--line);
}

.viewer-header h2 {
  margin: 0;
  font-family: var(--display);
  font-size: clamp(60px, 10vw, 170px);
  line-height: .78;
  letter-spacing: -.075em;
  text-transform: uppercase;
}

.viewer-header .viewer-serif {
  font-family: var(--serif);
  font-weight: 600;
  text-transform: none;
}

.viewer-header p {
  color: var(--muted);
  line-height: 1.6;
}

.viewer-gallery {
  margin-top: 90px;
  display: grid;
  grid-template-columns: repeat(12, 1fr);
  gap: 70px 20px;
}

.viewer-image {
  min-height: 360px;
  display: grid;
  place-items: center;
  background:
    linear-gradient(135deg, rgba(255,255,255,.12), rgba(255,255,255,.02)),
    var(--image-color, #222);
  font-family: var(--display);
  font-size: clamp(22px, 4vw, 56px);
  letter-spacing: -.05em;
}

.viewer-image:nth-child(1) { grid-column: 1 / 13; min-height: 72vh; }
.viewer-image:nth-child(2) { grid-column: 1 / 6; min-height: 70vh; }
.viewer-image:nth-child(3) { grid-column: 7 / 13; min-height: 52vh; margin-top: 160px; }
.viewer-image:nth-child(4) { grid-column: 3 / 11; min-height: 62vh; }
.viewer-image:nth-child(5) { grid-column: 1 / 5; min-height: 58vh; }
.viewer-image:nth-child(6) { grid-column: 6 / 13; min-height: 70vh; margin-top: 120px; }

.viewer-credits {
  margin-top: 110px;
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 30px;
  padding-top: 30px;
  border-top: 1px solid var(--line);
  font-size: 11px;
  letter-spacing: .08em;
  text-transform: uppercase;
}

@media (max-width: 900px) {
  .desktop-nav { display: none; }
  .menu-button { display: block; }

  .hero-navigation {
    left: 16px;
    right: 16px;
    width: auto;
  }

  .section-intro,
  .archive-section,
  .about-layout,
  .viewer-header {
    grid-template-columns: 1fr;
  }

  .project-canvas {
    display: grid;
    grid-template-columns: 1fr;
    gap: 105px;
  }

  .project-item,
  .project-item.layout-1,
  .project-item.layout-2,
  .project-item.layout-3,
  .project-item.layout-4,
  .project-item.layout-5,
  .project-item.layout-6 {
    grid-column: 1;
    margin-top: 0;
    width: 100%;
  }

  .project-canvas::before {
    grid-column: 1;
    order: initial;
  }

  .archive-sticky { position: static; }
  .archive-strip { grid-template-columns: 1fr; }
  .archive-card { margin-top: 0 !important; }

  .viewer-gallery { display: block; }

  .viewer-image {
    margin: 0 0 24px !important;
    min-height: 55vh !important;
  }

  .viewer-credits { grid-template-columns: 1fr; }
  .cursor { display: none; }
}

@media (max-width: 600px) {
  .site-header,
  .work-section,
  .archive-section,
  .about-section,
  .contact-section,
  .viewer-content {
    padding-left: 16px;
    padding-right: 16px;
  }

  .hero-title {
    left: 12px;
    right: 12px;
    bottom: 120px;
    font-size: clamp(78px, 24vw, 120px);
  }

  .hero-word-davila { margin-left: 0; }

  .hero-meta {
    top: auto;
    left: 16px;
    bottom: 30px;
  }

  .hero-navigation a strong,
  .hero-navigation .serif-label {
    white-space: normal;
  }

  .work-section,
  .archive-section,
  .about-section,
  .contact-section {
    padding-top: 90px;
    padding-bottom: 90px;
  }

  .project-title {
    grid-template-columns: 1fr;
  }

  .project-title p {
    text-align: left;
  }

  .contact-footer { flex-direction: column; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }

  *,
  *::before,
  *::after {
    animation-duration: .01ms !important;
    transition-duration: .01ms !important;
  }
}
