/* Redpoint V2 — isolated additions. The current site files remain untouched. */

.site-v2 {
  --display: "Archivo", -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  --nav-h: 92px;
}

.site-v2 .nav {
  padding-top: 10px;
}

.site-v2 h1,
.site-v2 h2,
.site-v2 h3,
.site-v2 h4,
.site-v2 h5,
.site-v2 h6 {
  font-family: var(--display);
}

.site-v2 .d-mega,
.site-v2 .d-xl,
.site-v2 .d-h2,
.site-v2 .d-h3,
.site-v2 .value__ttl,
.site-v2 .pillar h3,
.site-v2 .pcard h3,
.site-v2 .tl__ttl,
.site-v2 .quote,
.site-v2 .person__name,
.site-v2 .drawer a {
  font-family: var(--display);
  letter-spacing: -0.055em;
}

.site-v2 .italic,
.site-v2 .rvl i {
  font-style: normal;
}

.site-v2 .d-mega { font-weight: 500; line-height: .87; }
.site-v2 .d-xl,
.site-v2 .d-h2 { font-weight: 500; }
.site-v2 .quote {
  font-style: normal;
  font-weight: 300;
  letter-spacing: -.035em;
}

/* Opening sequence: the only Romans-inspired element in V2.
   The mark draws itself in three beats — stem, ring, then the red point —
   and the split curtain carries it off. Total runtime ~1.75s. */
.intro-v2 {
  position: fixed;
  inset: 0;
  z-index: 9999;
  display: grid;
  place-items: center;
  color: var(--bone);
  /* No background here: the two panels below are the only ink, so the
     curtain split genuinely uncovers the page instead of fading over it. */
  transition: visibility 0s linear .72s;
}

.intro-v2::before,
.intro-v2::after {
  content: "";
  position: absolute;
  top: 0;
  bottom: 0;
  width: 50.1%;
  z-index: -1;
  background: var(--ink);
  transition: transform .72s var(--ease);
}

.intro-v2::before { left: 0; transform-origin: left; }
.intro-v2::after { right: 0; transform-origin: right; }

.intro-v2__mark {
  width: clamp(76px, 8vw, 104px);
  height: auto;
  color: var(--bone);
}

/* Beat 1 — the stem drops from the ring's centre line. */
.intro-v2__stem {
  transform-box: fill-box;
  transform-origin: top;
  transform: scaleY(0);
  animation: introStem .36s var(--ease) .04s forwards;
}

/* Beat 2 — the ring draws clockwise, lifting the pen beside the gap.
   pathLength="1" normalises the arc so the dash maths stays readable. */
.intro-v2__ring {
  stroke-dasharray: 1;
  stroke-dashoffset: 1;
  animation: introRing .58s var(--ease) .18s forwards;
}

/* Beat 3 — the red point lands in the gap. */
.intro-v2__dot {
  fill: var(--signal);
  transform-box: fill-box;
  transform-origin: center;
  transform: scale(0);
  animation: introDot .3s cubic-bezier(.34,1.56,.64,1) .7s forwards;
}

body.v2-entered .intro-v2 {
  visibility: hidden;
  pointer-events: none;
}

body.v2-entered .intro-v2__mark {
  opacity: 0;
  transform: scale(.97);
  transition: opacity .28s var(--ease), transform .5s var(--ease);
}

.v2-intro-seen .intro-v2 {
  display: none;
}

body.v2-entered .intro-v2::before { transform: translateX(-100%); }
body.v2-entered .intro-v2::after { transform: translateX(100%); }

@keyframes introStem {
  to { transform: scaleY(1); }
}

@keyframes introRing {
  to { stroke-dashoffset: 0; }
}

@keyframes introDot {
  to { transform: scale(1); }
}

.site-v2 .foot .mark__image {
  width: clamp(6.25rem, 8vw, 7.5rem);
}

/* Portfolio catalogue. */
.catalogue-v2 {
  padding-bottom: clamp(5rem, 10vw, 10rem);
}

.catalogue-v2__toolbar {
  position: sticky;
  top: var(--nav-h);
  z-index: 30;
  display: grid;
  gap: 1rem;
  padding: 1rem var(--pad);
  margin-inline: calc(var(--pad) * -1);
  border-block: 1px solid var(--rule);
  background: rgba(245,241,236,.94);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
}

.catalogue-v2__search {
  width: 100%;
  padding: .8rem 0;
  border: 0;
  border-bottom: 1px solid var(--rule-strong);
  border-radius: 0;
  outline: 0;
  background: transparent;
  font-family: var(--ui);
  font-size: .75rem;
  letter-spacing: .08em;
}

.catalogue-v2__search:focus { border-bottom-color: var(--signal); }

.filters-v2 {
  display: flex;
  gap: .5rem;
  overflow-x: auto;
  scrollbar-width: none;
}

.filters-v2::-webkit-scrollbar { display: none; }

.filter-v2 {
  flex: 0 0 auto;
  padding: .72rem 1rem;
  border: 1px solid var(--rule-strong);
  border-radius: 999px;
  background: transparent;
  font-family: var(--ui);
  font-size: .625rem;
  font-weight: 500;
  letter-spacing: .16em;
  text-transform: uppercase;
  cursor: pointer;
}

.filter-v2:hover,
.filter-v2.is-active {
  border-color: var(--ink);
  background: var(--ink);
  color: var(--bone);
}

.catalogue-v2__section {
  padding-top: clamp(3.5rem, 7vw, 7rem);
}

.catalogue-v2__section + .catalogue-v2__section {
  margin-top: clamp(3rem, 7vw, 7rem);
  border-top: 1px solid var(--rule-strong);
}

.catalogue-v2__heading {
  display: flex;
  justify-content: space-between;
  gap: 2rem;
  align-items: end;
  margin-bottom: clamp(2rem, 4vw, 3rem);
}

.catalogue-v2__count {
  font-family: var(--ui);
  font-size: clamp(2rem, 4vw, 4rem);
  font-weight: 500;
  letter-spacing: -.05em;
  color: var(--signal);
}

.projects-v2 {
  display: grid;
  grid-template-columns: 1fr;
  gap: clamp(1.5rem, 3vw, 2.5rem);
}

.project-v2 {
  min-width: 0;
  border-top: 1px solid var(--rule-strong);
  padding-top: .9rem;
}

.project-v2[hidden] { display: none; }

.project-v2__media {
  position: relative;
  aspect-ratio: 4 / 3;
  overflow: hidden;
  background: var(--ink);
}

.project-v2__media::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(to bottom, transparent 48%, rgba(35,35,35,.78));
}

.project-v2__media img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  filter: saturate(.92) contrast(1.04);
  transition: transform .8s var(--ease), filter .8s var(--ease);
}

.project-v2:hover .project-v2__media img {
  transform: scale(1.035);
  filter: saturate(1) contrast(1.06);
}

.project-v2__index {
  position: absolute;
  z-index: 2;
  right: .9rem;
  top: .8rem;
  color: rgba(245,241,236,.72);
}

.project-v2__place {
  position: absolute;
  z-index: 2;
  left: .9rem;
  right: .9rem;
  bottom: .8rem;
  display: flex;
  justify-content: space-between;
  gap: 1rem;
  color: var(--bone);
}

.project-v2__body {
  padding-top: 1rem;
}

.project-v2__body h3 {
  font-family: var(--display);
  font-size: clamp(1.3rem, 2vw, 1.8rem);
  font-weight: 500;
  line-height: 1.08;
  letter-spacing: -.045em;
}

.project-v2__meta {
  display: flex;
  flex-wrap: wrap;
  gap: .45rem 1rem;
  margin-top: .65rem;
  color: var(--slate);
}

.project-v2__meta span {
  font-family: var(--ui);
  font-size: .625rem;
  font-weight: 500;
  letter-spacing: .14em;
  text-transform: uppercase;
}

.catalogue-v2__empty {
  display: none;
  padding: 3rem 0;
  border-top: 1px solid var(--rule);
  color: var(--slate);
}

.catalogue-v2__empty.is-visible { display: block; }

@media (min-width: 680px) {
  .catalogue-v2__toolbar {
    grid-template-columns: minmax(220px, .7fr) 1.3fr;
    align-items: center;
  }

  .projects-v2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

@media (min-width: 1120px) {
  .projects-v2 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
}

@media (min-width: 1480px) {
  .projects-v2 { grid-template-columns: repeat(4, minmax(0, 1fr)); }
}

@media (prefers-reduced-motion: reduce) {
  .intro-v2 { display: none; }
}
