/* =========================================
   Nyata Collective — Style
   ========================================= */

@font-face {
  font-family: 'Akkurat';
  src: url('fonts/Akkurat.ttf') format('truetype');
  font-weight: 400;
  font-style: normal;
  font-display: swap;
}

@font-face {
  font-family: 'Combine';
  src: url('fonts/Combine.otf') format('opentype');
  font-weight: 400;
  font-style: normal;
  font-display: swap;
}

*, *::before, *::after {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

:root {
  --cream: #FAFAF8;
  --navy: #1B2A6E;
  --navy-light: #2a3d8f;
  --gold: #ffed00;
  --font-serif: 'Combine', 'Georgia', serif;
  --font-sans: 'Akkurat', 'Helvetica Neue', sans-serif;
}

html { scroll-behavior: smooth; }

a { cursor: inherit; }

body {
  background-color: var(--cream);
  color: var(--navy);
  font-family: var(--font-sans);
  font-weight: 300;
  overflow-x: hidden;
  cursor: none;
  background-image: url('images/fabric-texture.png');
  background-repeat: repeat;
}

/* --- Top-right contact (curved) --- */
.contact-top {
  position: absolute;
  top: 1.5rem;
  right: 2rem;
  z-index: 10;
  width: 340px;
}

.contact-curve {
  width: 100%;
  height: auto;
  overflow: visible;
  display: block;
}

.contact-curve-text {
  font-family: var(--font-serif);
  font-style: italic;
  font-size: 15px;
  fill: var(--navy);
}

.contact-curve-link {
  font-family: var(--font-serif);
  font-style: italic;
  font-size: 17px;
  fill: var(--navy);
  cursor: none;
  transition: fill 0.3s ease;
}

.contact-curve a:hover .contact-curve-link {
  fill: var(--gold);
}

/* --- Skip Link --- */
.skip-link {
  position: fixed;
  top: -100%;
  left: 1rem;
  padding: 0.5rem 1rem;
  background: var(--navy);
  color: var(--cream);
  font-family: var(--font-sans);
  font-size: 0.85rem;
  text-decoration: none;
  z-index: 20000;
  border-radius: 0 0 4px 4px;
  transition: top 0.2s ease;
}

.skip-link:focus { top: 0; }

*:focus-visible {
  outline: 2px solid var(--gold);
  outline-offset: 3px;
}

/* --- Custom Cursor --- */
.custom-cursor {
  position: fixed;
  top: 0; left: 0;
  width: 10px; height: 10px;
  border: 1.5px solid var(--navy);
  border-radius: 50%;
  pointer-events: none;
  z-index: 10000;
  transform: translate(-50%, -50%);
  transition: transform 0.1s ease, opacity 0.3s ease;
  opacity: 0;
}

.custom-cursor.visible { opacity: 1; }
.custom-cursor.hovering {
  transform: translate(-50%, -50%) scale(1.5);
  border-color: var(--gold);
}

#cursor-trail {
  position: fixed;
  top: 0; left: 0;
  pointer-events: none;
  z-index: 9999;
}

@media (hover: none) and (pointer: coarse) {
  .custom-cursor, #cursor-trail { display: none; }
  body { cursor: auto; }
}

.golden-thread {
  position: absolute;
  top: 0; left: 0;
  width: 100%; height: 100%;
  pointer-events: none;
  z-index: 2;
}

/* --- Names (top-left, outside hero) --- */
.hero-names {
  position: absolute;
  top: 1rem;
  left: 2rem;
  width: 360px;
  z-index: 10;
  pointer-events: none;
}

.curved-names {
  width: 100%;
  height: auto;
  overflow: visible;
}

.hero-name {
  font-family: var(--font-serif);
  fill: var(--navy);
}

.name-asha {
  font-size: 30px;
  font-weight: 500;
  font-style: italic;
}

.name-amber {
  font-size: 24px;
  font-weight: 400;
  font-style: italic;
}

/* Desktop/mobile SVG name-group toggle (mobile variant hidden until breakpoint) */
.names-mobile { display: none; }

/* --- Hero Section --- */
.hero {
  position: relative;
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0 6vw;
  z-index: 3;
  text-align: center;
}

.hero-content {
  width: 100%;
  max-width: 900px;
  position: relative;
  z-index: 4;
}

.hero-title {
  font-family: var(--font-serif);
  font-weight: 400;
  font-size: clamp(2.8rem, 7vw, 6.5rem);
  line-height: 1.05;
  letter-spacing: -0.02em;
  color: var(--navy);
  white-space: nowrap;
}

/* --- Hero portraits flanking the title --- */
.hero-portrait {
  position: absolute;
  z-index: 3;
}

.hero-portrait-left {
  left: 4vw;
  bottom: -18vh;
  transform: rotate(-4deg);
}

.hero-portrait-right {
  right: 4vw;
  bottom: -14vh;
  transform: rotate(3deg);
}

.portrait-placeholder {
  width: clamp(180px, 18vw, 280px);
  aspect-ratio: 3 / 4;
}

.portrait-placeholder .placeholder-image {
  aspect-ratio: 3 / 4;
}

/* --- Image Frames --- */
.image-frame {
  position: relative;
  transition: transform 0.6s cubic-bezier(0.25, 0.46, 0.45, 0.94);
}

.image-frame:hover {
  transform: translate(4px, -3px) rotate(1deg) !important;
}

/* --- Placeholder Images (cyanotype-tinted) --- */
.placeholder-image {
  position: relative;
  width: 100%;
  height: 100%;
  background: transparent;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  box-shadow:
    2px 3px 8px rgba(27, 42, 110, 0.10),
    4px 6px 20px rgba(27, 42, 110, 0.06);
  transition: box-shadow 0.6s cubic-bezier(0.25, 0.46, 0.45, 0.94);
}

.image-frame:hover .placeholder-image {
  box-shadow:
    3px 5px 12px rgba(27, 42, 110, 0.14),
    6px 10px 30px rgba(27, 42, 110, 0.08);
}

.placeholder-image img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  z-index: 0;
  /* Cyanotype blue tint: grayscale → sepia → rotate to blue */
  filter: grayscale(1) sepia(1) hue-rotate(178deg) saturate(2.2) brightness(0.92);
  opacity: 0.85;
}

/* Per-image opacity — hand-placed, alternating 0.82–0.95 */
.img-1a .placeholder-image img { opacity: 0.95; }
.img-1b .placeholder-image img { opacity: 0.82; }
.img-1c .placeholder-image img { opacity: 0.90; }
.img-1d .placeholder-image img { opacity: 0.85; }
.img-1e .placeholder-image img { opacity: 0.95; }
.img-1f .placeholder-image img { opacity: 0.82; }

.img-2a .placeholder-image img { opacity: 0.85; }
.img-2b .placeholder-image img { opacity: 0.95; }
.img-2c .placeholder-image img { opacity: 0.82; }
.img-2d .placeholder-image img { opacity: 0.90; }
.img-2e .placeholder-image img { opacity: 0.95; }
.img-2f .placeholder-image img { opacity: 0.85; }

.img-3a .placeholder-image img { opacity: 0.95; }
.img-3b .placeholder-image img { opacity: 0.85; }
.img-3c .placeholder-image img { opacity: 0.82; }
.img-3d .placeholder-image img { opacity: 0.95; }
.img-3f .placeholder-image img { opacity: 0.82; }

.intro-frame .placeholder-image img { opacity: 0.95; }
.hero-portrait-left .placeholder-image img { opacity: 0.85; }
.hero-portrait-right .placeholder-image img { opacity: 0.90; }

/* Subtle torn edges */
.img-1a .placeholder-image, .img-1b .placeholder-image, .img-1c .placeholder-image,
.img-1d .placeholder-image, .img-1e .placeholder-image, .img-1f .placeholder-image,
.img-2a .placeholder-image, .img-2b .placeholder-image, .img-2c .placeholder-image,
.img-2d .placeholder-image, .img-2e .placeholder-image, .img-2f .placeholder-image,
.img-3a .placeholder-image, .img-3b .placeholder-image, .img-3c .placeholder-image,
.img-3d .placeholder-image, .img-3f .placeholder-image,
.portrait-placeholder .placeholder-image,
.intro-frame .placeholder-image {
  clip-path: polygon(1% 0.5%, 25% 0%, 50% 0.5%, 75% 0%, 99% 0.5%, 100% 25%, 99.5% 50%, 100% 75%, 99% 99.5%, 75% 100%, 50% 99.5%, 25% 100%, 1% 99.5%, 0% 75%, 0.5% 50%, 0% 25%);
}

/* --- Intro --- */
.intro {
  position: relative;
  z-index: 3;
  padding: 6rem 8vw 4rem;
  display: grid;
  grid-template-columns: 1.4fr 1fr;
  gap: 4rem;
  align-items: center;
  max-width: 1200px;
  margin: 0 auto;
}

.intro-inner p {
  font-family: var(--font-sans);
  font-size: clamp(0.95rem, 1.15vw, 1.1rem);
  line-height: 1.7;
  color: var(--navy);
  opacity: 0.85;
  margin-bottom: 1.25rem;
}

.intro-lede {
  font-family: var(--font-serif) !important;
  font-style: italic;
  font-size: clamp(1.2rem, 1.8vw, 1.6rem) !important;
  line-height: 1.45 !important;
  opacity: 1 !important;
  margin-bottom: 1.75rem !important;
}

.intro-frame {
  width: 100%;
  max-width: 380px;
  aspect-ratio: 3 / 4;
  transform: rotate(2.5deg);
  justify-self: end;
}

/* --- Projects --- */
.projects {
  position: relative;
  padding: 4rem 0 8rem;
  z-index: 3;
}

.project {
  position: relative;
  padding: 6rem 3vw 4rem;
  min-height: 70vh;
}

.project-text {
  position: relative;
  z-index: 5;
  max-width: 500px;
}

.project-title {
  font-family: var(--font-serif);
  font-size: clamp(1.8rem, 3.5vw, 2.8rem);
  font-weight: 500;
  font-style: italic;
  color: var(--navy);
  line-height: 1.35;
  padding-top: 0.15em;
  margin-bottom: 0.5rem;
}

.project-desc {
  font-family: var(--font-sans);
  font-size: clamp(0.9rem, 1.2vw, 1.05rem);
  font-weight: 300;
  color: var(--navy);
  opacity: 0.75;
  margin-bottom: 0.3rem;
}

.project-meta {
  font-family: var(--font-sans);
  font-size: clamp(0.75rem, 1vw, 0.85rem);
  font-weight: 400;
  color: var(--navy);
  opacity: 0.5;
  letter-spacing: 0.03em;
}

.project-images {
  position: relative;
  z-index: 4;
}

/* --- Project 1 layout — tight overlap --- */
.project-1 .project-text { margin-left: 8%; }
.project-1 .project-images { margin-top: -4rem; }

.project-1 .img-1a {
  width: clamp(380px, 50vw, 685px);
  aspect-ratio: 4 / 3;
  margin-left: 42%;
  transform: rotate(2.2deg);
  z-index: 5;
  position: relative;
}
.project-1 .img-1b {
  width: clamp(285px, 36vw, 500px);
  aspect-ratio: 3 / 4;
  margin-left: 24%;
  margin-top: -14rem;
  transform: rotate(-1.5deg);
  z-index: 7;
  position: relative;
}
.project-1 .img-1c {
  width: clamp(260px, 31vw, 425px);
  aspect-ratio: 1 / 1;
  margin-left: 58%;
  margin-top: -10rem;
  transform: rotate(3.2deg);
  z-index: 6;
  position: relative;
}
.project-1 .img-1d {
  width: clamp(285px, 33vw, 470px);
  aspect-ratio: 3 / 4;
  margin-left: 6%;
  margin-top: -8rem;
  transform: rotate(-2.5deg);
  z-index: 4;
  position: relative;
}
.project-1 .img-1e {
  width: clamp(260px, 28vw, 400px);
  aspect-ratio: 4 / 3;
  margin-left: 40%;
  margin-top: -6rem;
  transform: rotate(1.2deg);
  z-index: 8;
  position: relative;
}
.project-1 .img-1f {
  width: clamp(235px, 26vw, 380px);
  aspect-ratio: 1 / 1;
  margin-left: 70%;
  margin-top: -11rem;
  transform: rotate(-3.8deg);
  z-index: 3;
  position: relative;
}

/* --- Project 2 layout --- */
.project-2 .project-text { margin-left: 50%; }
.project-2 .project-images { margin-top: -3rem; }

.project-2 .img-2a {
  width: clamp(340px, 44vw, 600px);
  aspect-ratio: 3 / 4;
  margin-left: 1%;
  transform: rotate(-2deg);
  z-index: 5;
  position: relative;
}
.project-2 .img-2b {
  width: clamp(310px, 38vw, 520px);
  aspect-ratio: 4 / 3;
  margin-left: 16%;
  margin-top: -16rem;
  transform: rotate(1.8deg);
  z-index: 6;
  position: relative;
}
.project-2 .img-2c {
  width: clamp(285px, 35vw, 495px);
  aspect-ratio: 1 / 1;
  margin-left: 54%;
  margin-top: -9rem;
  transform: rotate(-2.5deg);
  z-index: 4;
  position: relative;
}
.project-2 .img-2d {
  width: clamp(260px, 31vw, 425px);
  aspect-ratio: 3 / 4;
  margin-left: 32%;
  margin-top: -8rem;
  transform: rotate(2.2deg);
  z-index: 7;
  position: relative;
}
.project-2 .img-2e {
  width: clamp(260px, 31vw, 450px);
  aspect-ratio: 4 / 3;
  margin-left: 4%;
  margin-top: -8rem;
  transform: rotate(-3.2deg);
  z-index: 8;
  position: relative;
}
.project-2 .img-2f {
  width: clamp(235px, 26vw, 380px);
  aspect-ratio: 1 / 1;
  margin-left: 66%;
  margin-top: -10rem;
  transform: rotate(1.5deg);
  z-index: 3;
  position: relative;
}

/* --- Project 3 layout --- */
.project-3 .project-text { margin-left: 15%; }
.project-3 .project-images { margin-top: -3rem; }

.project-3 .img-3a {
  width: clamp(330px, 40vw, 565px);
  aspect-ratio: 1 / 1;
  margin-left: 50%;
  transform: rotate(1.5deg);
  z-index: 5;
  position: relative;
}
.project-3 .img-3b {
  width: clamp(355px, 45vw, 615px);
  aspect-ratio: 4 / 3;
  margin-left: 2%;
  margin-top: -12rem;
  transform: rotate(-2.8deg);
  z-index: 4;
  position: relative;
}
.project-3 .img-3c {
  width: clamp(260px, 28vw, 400px);
  aspect-ratio: 3 / 4;
  margin-left: 62%;
  margin-top: -10rem;
  transform: rotate(3.5deg);
  z-index: 6;
  position: relative;
}
.project-3 .img-3d {
  width: clamp(310px, 38vw, 520px);
  aspect-ratio: 4 / 3;
  margin-left: 22%;
  margin-top: -8rem;
  transform: rotate(-1.8deg);
  z-index: 7;
  position: relative;
}
.project-3 .img-3f {
  width: clamp(260px, 31vw, 450px);
  aspect-ratio: 1 / 1;
  margin-left: 8%;
  margin-top: -9rem;
  transform: rotate(-3.5deg);
  z-index: 3;
  position: relative;
}

/* --- Events --- */
.events {
  position: relative;
  z-index: 3;
  padding: 4rem 8vw 2rem;
  max-width: 1100px;
  margin: 0 auto;
}

.events-title {
  font-family: var(--font-serif);
  font-style: italic;
  font-size: clamp(1.8rem, 3vw, 2.4rem);
  font-weight: 500;
  color: var(--navy);
  margin-bottom: 2rem;
}

.events-list {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 0.3rem;
}

.events-list li {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 1rem;
  align-items: baseline;
  font-family: var(--font-sans);
  font-size: clamp(0.85rem, 1.05vw, 1rem);
  color: var(--navy);
  padding-bottom: 0.3rem;
  border-bottom: 1px dashed rgba(27, 42, 110, 0.18);
}

.events-entry em { font-style: normal; font-family: inherit; font-size: inherit; font-weight: inherit; }
.events-date { color: var(--navy); opacity: 0.7; white-space: nowrap; }

/* --- Footer --- */
.contact {
  position: relative;
  z-index: 5;
  text-align: center;
  padding: 8rem 6vw 6rem;
}

.contact-links {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.6rem;
}

.contact-links a {
  font-family: var(--font-serif);
  font-style: italic;
  font-size: clamp(1rem, 1.5vw, 1.3rem);
  color: var(--navy);
  text-decoration: none;
  position: relative;
  transition: color 0.3s ease;
}

.contact-links a:hover { color: var(--gold); }

/* --- Responsive --- */
@media (max-width: 900px) {
  .hero-title { white-space: normal; }
}

@media (max-width: 768px) {
  body { cursor: auto; }
  .custom-cursor, #cursor-trail { display: none; }

  /* Top-right contact block hidden on mobile — already duplicated in the footer */
  .contact-top { display: none; }

  .hero-names {
    position: static;
    width: 100%;
    max-width: 360px;
    margin: 1rem auto 0;
  }

  /* Swap desktop curves (Asha over Amber, centered) for mobile curves
     (Amber top-left, Asha below-right) — same SVG, same font sizing */
  .names-desktop { display: none; }
  .names-mobile { display: block; }

  /* Title dead-centered vertically in the viewport; portraits anchored below */
  .hero {
    display: grid;
    grid-template-columns: 1fr 1fr;
    grid-template-rows: 1fr auto 1fr auto;
    grid-template-areas:
      ".     ."
      "title title"
      ".     ."
      "left  right";
    padding: 1rem 5vw 4vh;
    min-height: calc(100vh - 9rem);
    column-gap: 0.75rem;
    justify-items: center;
  }

  .hero-content { grid-area: title; }

  .hero-title {
    font-size: clamp(3.5rem, 14vw, 5.5rem);
    line-height: 1.0;
  }
  .hero-title-word { display: block; }

  .hero-portrait,
  .hero-portrait-left,
  .hero-portrait-right {
    position: static;
    align-self: start;
  }
  .hero-portrait-left  { grid-area: left;  transform: rotate(-2deg); }
  .hero-portrait-right { grid-area: right; transform: rotate(2deg); }

  .portrait-placeholder { width: 42vw; max-width: 220px; }

  .intro {
    grid-template-columns: 1fr;
    gap: 2rem;
    padding: 3rem 5vw 2rem;
  }
  .intro-frame { max-width: 80%; justify-self: center; }

  .project {
    padding: 4rem 5vw 3rem;
    min-height: auto;
  }

  .project-text { margin-left: 0 !important; max-width: 100%; }
  .project-images { margin-top: 1.5rem !important; }

  .project .image-frame {
    margin-left: 0 !important;
    margin-top: 1rem !important;
    width: 75vw !important;
    max-width: 340px;
  }
  .project .image-frame:nth-child(even) { margin-left: auto !important; margin-right: 0; }
  .project .image-frame:nth-child(odd) { margin-left: 5% !important; }

  .events { padding: 3rem 5vw 1rem; }
  .events-list li { grid-template-columns: 1fr; gap: 0.2rem; }
  .events-date { font-size: 0.85em; opacity: 0.6; }
}

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