:root {
  --paper: #d8e2ed;
  --ink: #0c0c0c;
  --muted-ink: rgba(12, 12, 12, 0.64);
  --rule: rgba(12, 12, 12, 0.65);
  --font-heading: "Devanagari Sangam MN", "Avenir Next", "Helvetica Neue", Arial, sans-serif;
  --font-paragraph: "Devanagari Sangam MN", "Avenir Next", "Helvetica Neue", Arial, sans-serif;
  --page-pad: clamp(1.25rem, 4vw, 4.5rem);
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  position: relative;
  margin: 0;
  color: var(--ink);
  background: var(--paper);
  font-family: var(--font-paragraph);
  font-size: 1rem;
  line-height: 1.45;
  -webkit-font-smoothing: antialiased;
}

body::before {
  position: absolute;
  inset: 0;
  z-index: 20;
  pointer-events: none;
  content: "";
  opacity: 0.34;
  background-image: url("/assets/textures/paper-fibres.webp");
  background-size: 57.6rem 38.4rem;
  mix-blend-mode: multiply;
}

a {
  color: inherit;
}

img {
  display: block;
  max-width: 100%;
}

.skip-link {
  position: fixed;
  top: 0.75rem;
  left: 0.75rem;
  z-index: 100;
  padding: 0.65rem 0.85rem;
  color: var(--paper);
  background: var(--ink);
  transform: translateY(-150%);
}

.skip-link:focus {
  transform: translateY(0);
}

.site-header {
  position: relative;
  z-index: 5;
  display: grid;
  grid-template-columns: 1fr minmax(11rem, 19rem) 1fr;
  align-items: start;
  min-height: 10rem;
  padding: 1.5rem var(--page-pad) 0;
}

.site-header::after {
  position: absolute;
  right: var(--page-pad);
  bottom: 0;
  left: var(--page-pad);
  height: 1px;
  content: "";
  background: var(--rule);
  transform: scaleX(0);
  transform-origin: left;
  animation: draw-rule 1.1s 2.95s ease forwards;
}

.site-header a,
.site-header nav {
  font-size: 0.68rem;
  letter-spacing: 0.18em;
  text-transform: uppercase;
}

.site-header nav a {
  display: inline-block;
  padding-block: 0.5rem;
  text-decoration: none;
}

.site-header nav {
  display: flex;
  justify-content: flex-end;
  gap: clamp(0.8rem, 2.4vw, 2.25rem);
}

.site-header nav a:hover,
.site-header nav a:focus-visible {
  text-decoration: underline;
  text-underline-offset: 0.35rem;
}

.brand {
  grid-column: 2;
  justify-self: center;
  width: min(100%, 17rem);
  padding: 0;
}

.brand-mark {
  position: relative;
  display: block;
  aspect-ratio: 1272 / 590;
}

.brand-type,
.brand-script {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
}

.brand-type {
  clip-path: inset(86% 0 0 0);
}

.brand-script {
  display: block;
  overflow: visible;
  pointer-events: none;
}

.logo-pen-path,
.logo-pen-dot {
  fill: none;
  stroke: white;
  stroke-linecap: round;
  stroke-linejoin: round;
  stroke-dasharray: 1;
  stroke-dashoffset: 1;
}

.logo-pen-path {
  animation: trace-logo 2.58s 0.05s linear forwards;
}

.logo-pen-dot {
  animation: trace-logo 0.09s 2.63s linear forwards;
}

.site-header nav {
  grid-column: 3;
}

.hero {
  position: relative;
  display: grid;
  grid-template-columns: minmax(0, 1.05fr) minmax(18rem, 0.95fr);
  gap: clamp(2rem, 6vw, 7rem);
  align-items: center;
  min-height: calc(100svh - 10rem);
  padding: clamp(2.25rem, 4svh, 3.75rem) var(--page-pad);
}

.section-label,
.space-note,
footer {
  margin: 0;
  font-size: 0.65rem;
  letter-spacing: 0.19em;
  text-transform: uppercase;
}

.image-space {
  position: relative;
  margin: 0;
  overflow: hidden;
  border: 1px solid var(--rule);
  background:
    linear-gradient(145deg, rgba(255, 255, 255, 0.18), transparent 48%),
    rgba(255, 255, 255, 0.07);
}

.hero-space {
  width: auto;
  max-width: 100%;
  height: min(64svh, 38rem);
  aspect-ratio: 4 / 5.7;
  justify-self: end;
}

.space-note {
  position: absolute;
  right: 1rem;
  bottom: 1rem;
  left: 1rem;
}

.hero-copy {
  position: relative;
  align-self: center;
  max-width: 38rem;
}

.hero-copy h1,
.gallery-intro h2,
.contact h2 {
  margin: 0;
  font-family: var(--font-heading);
  font-weight: 400;
  letter-spacing: 0.015em;
}

.gallery-intro h2 {
  white-space: pre-line;
}

.hero-copy h1 {
  max-width: 14ch;
  font-size: clamp(2.7rem, 4.8vw, 5.5rem);
  line-height: 0.95;
}

.hero-copy > p {
  max-width: 28rem;
  margin: 1.5rem 0 0;
  font-size: clamp(1rem, 1.55vw, 1.25rem);
}

.about {
  display: grid;
  grid-template-columns: 0.6fr 1.4fr 0.85fr;
  gap: 2rem;
  align-items: start;
  padding: clamp(7rem, 11vw, 12rem) var(--page-pad);
  border-top: 1px solid var(--rule);
}

.about h2 {
  max-width: 11ch;
  margin: 0;
  font-family: var(--font-heading);
  font-size: clamp(2.7rem, 5.9vw, 6.2rem);
  font-weight: 400;
  line-height: 0.9;
  letter-spacing: 0.015em;
}

.about > p:last-child {
  max-width: 28rem;
  margin: 0.5rem 0 0;
  font-size: clamp(1rem, 1.5vw, 1.25rem);
}

.gallery-section {
  padding: clamp(7rem, 11vw, 12rem) var(--page-pad);
  border-top: 1px solid var(--rule);
}

.gallery-intro {
  display: grid;
  grid-template-columns: 0.6fr 1.4fr 0.85fr;
  gap: 2rem;
  align-items: end;
  margin-bottom: clamp(5rem, 10vw, 10rem);
}

.gallery-intro h2 {
  font-size: clamp(2.7rem, 5.9vw, 6.2rem);
  line-height: 0.9;
}

.gallery-intro > p:last-child {
  max-width: 25rem;
  margin: 0 0 0.5rem;
}

.dress-grid {
  display: grid;
  grid-template-columns: repeat(12, minmax(0, 1fr));
  gap: clamp(2.5rem, 7vw, 7rem) clamp(1.25rem, 3vw, 3rem);
}

.dress-card {
  grid-column: span 4;
  margin: 0;
}

.dress-card:nth-child(6n + 1) {
  grid-column: 1 / span 5;
}

.dress-card:nth-child(6n + 2) {
  grid-column: 8 / span 4;
  margin-top: clamp(5rem, 12vw, 12rem);
}

.dress-card:nth-child(6n + 3) {
  grid-column: 3 / span 3;
}

.dress-card:nth-child(6n + 4) {
  grid-column: 7 / span 6;
}

.dress-card:nth-child(6n + 5) {
  grid-column: 1 / span 4;
  margin-top: clamp(3rem, 8vw, 8rem);
}

.dress-card:nth-child(6n) {
  grid-column: 7 / span 4;
}

.dress-image {
  position: relative;
  width: 100%;
  aspect-ratio: 3 / 4.15;
  overflow: hidden;
  border: 1px solid var(--rule);
  background: rgba(255, 255, 255, 0.07);
}

.dress-card:nth-child(3n + 2) .dress-image {
  aspect-ratio: 4 / 5;
}

.dress-card:nth-child(4n) .dress-image {
  aspect-ratio: 16 / 11;
}

.dress-image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  filter: saturate(0.78) contrast(0.96);
  transition: transform 0.8s cubic-bezier(0.2, 0.7, 0.2, 1), filter 0.8s ease;
}

.dress-card:hover .dress-image img {
  filter: saturate(1) contrast(1);
  transform: scale(1.025);
}

.dress-caption {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 1rem;
  padding-top: 0.8rem;
  border-top: 1px solid var(--rule);
}

.dress-caption h3,
.dress-caption p {
  margin: 0;
  font-size: 0.68rem;
  font-weight: 400;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.dress-caption p {
  color: var(--muted-ink);
  text-align: right;
}

.contact {
  display: grid;
  grid-template-columns: 0.55fr 1.25fr;
  gap: 2rem;
  min-height: 39rem;
  padding: clamp(7rem, 12vw, 12rem) var(--page-pad) 4rem;
  border-top: 1px solid var(--rule);
}

.contact-copy h2 {
  max-width: 8ch;
  font-size: clamp(3rem, 6.5vw, 7rem);
  line-height: 0.9;
}

.contact-copy p {
  max-width: 30rem;
  margin: 2.4rem 0 0;
  font-size: clamp(1rem, 1.5vw, 1.25rem);
}

.contact-links {
  grid-column: 1 / -1;
  display: grid;
  align-self: end;
}

.contact-link {
  display: block;
  padding: 1.15rem 0 0.85rem;
  border-top: 1px solid var(--ink);
  font-size: clamp(1rem, 2.1vw, 2rem);
  letter-spacing: 0.02em;
  text-decoration: none;
  overflow-wrap: anywhere;
}

.contact-link:hover,
.contact-link:focus-visible {
  padding-inline: 0.8rem;
  color: var(--paper);
  background: var(--ink);
}

footer {
  display: flex;
  justify-content: space-between;
  gap: 1rem;
  padding: 1.15rem var(--page-pad) 1.5rem;
  border-top: 1px solid var(--rule);
}

:focus-visible {
  outline: 2px solid var(--ink);
  outline-offset: 4px;
}

.content-reveal {
  opacity: 0;
  transform: translateY(2rem);
  transition: opacity 0.8s ease, transform 0.8s cubic-bezier(0.2, 0.7, 0.2, 1);
}

.content-reveal.is-visible {
  opacity: 1;
  transform: translateY(0);
}

@keyframes trace-logo {
  to {
    stroke-dashoffset: 0;
  }
}

@keyframes draw-rule {
  to {
    transform: scaleX(1);
  }
}

@media (max-width: 760px) {
  .site-header {
    grid-template-columns: 1fr minmax(9rem, 12rem) 1fr;
    min-height: 8rem;
    padding-top: 1rem;
  }

  .site-header nav a:not(:last-child) {
    display: none;
  }

  .hero {
    grid-template-columns: 1fr;
    gap: 1.5rem;
    min-height: calc(100svh - 8rem);
    padding-block: clamp(1.5rem, 4svh, 2.5rem);
  }

  .hero-space {
    width: auto;
    height: min(36svh, 19rem);
    justify-self: start;
  }

  .hero-copy {
    width: 100%;
    margin-left: 0;
  }

  .hero-copy h1 {
    font-size: clamp(2.25rem, 10vw, 3rem);
  }

  .hero-copy > p {
    margin-top: 1rem;
  }

  .about {
    grid-template-columns: 1fr;
  }

  .gallery-intro {
    grid-template-columns: 1fr;
  }

  .gallery-intro > p:last-child {
    margin-top: 1rem;
  }

  .dress-grid {
    grid-template-columns: repeat(6, minmax(0, 1fr));
    row-gap: 5rem;
  }

  .dress-card,
  .dress-card:nth-child(n) {
    grid-column: 1 / span 5;
    margin-top: 0;
  }

  .dress-card:nth-child(even) {
    grid-column: 2 / span 5;
  }

  .contact {
    grid-template-columns: 1fr;
    min-height: 34rem;
  }

  .contact-links {
    grid-column: 1;
  }

  footer {
    flex-direction: column;
  }
}

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

  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    animation-delay: 0ms !important;
    transition-duration: 0.01ms !important;
  }

  .logo-pen-path,
  .logo-pen-dot {
    stroke-dashoffset: 0;
  }
}
