/* ==========================================================================
   Yuliana Baron — photography site
   Palette: ivory + royal-brown.  Display: Playfair Display.  UI: Inter.
   ========================================================================== */

:root {
  /* Two colours only: ivory ground and royal-brown for type, surfaces and
     everything interactive. No black anywhere. */
  --ivory: #f4f0e6;
  --ivory-deep: #e9e1d3;
  --brown: #45302a;
  --brown-deep: #32221e;

  --ink: var(--brown);
  --ink-muted: rgba(69, 48, 42, 0.62);
  --line: rgba(69, 48, 42, 0.2);

  --on-brown: #f4f0e6;
  --on-brown-muted: rgba(244, 240, 230, 0.6);
  --line-on-brown: rgba(244, 240, 230, 0.18);

  /* High-contrast editorial serif for display type — keeps the fashion-house
     look but with sturdier hairlines than a true didone, so it stays legible
     at wordmark and label sizes. Inter for body copy and UI. */
  --font-display: "Playfair Display", Georgia, "Times New Roman", serif;
  --font-body: Inter, "Helvetica Neue", Helvetica, Arial, sans-serif;

  --pad: clamp(1.25rem, 4.5vw, 4.5rem);
  --gap: clamp(1rem, 2vw, 1.75rem);
  --maxw: 1680px;

  --ease: cubic-bezier(0.22, 1, 0.36, 1);
}

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

html {
  -webkit-text-size-adjust: 100%;
  scroll-behavior: smooth;
  /* Firefox + modern Chromium */
  scrollbar-color: var(--brown) var(--ivory-deep);
  scrollbar-width: thin;
}

/* WebKit/Blink */
::-webkit-scrollbar {
  width: 11px;
  height: 11px;
}

::-webkit-scrollbar-track {
  background: var(--ivory-deep);
}

::-webkit-scrollbar-thumb {
  background: var(--brown);
  border: 2px solid var(--ivory-deep);
  border-radius: 999px;
}

::-webkit-scrollbar-thumb:hover {
  background: var(--brown-deep);
}

body {
  margin: 0;
  background: var(--ivory);
  color: var(--ink);
  font-family: var(--font-body);
  font-size: 0.875rem;
  line-height: 1.5;
  letter-spacing: 0.005em;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

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

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

h1,
h2,
h3,
p,
figure,
dl,
blockquote {
  margin: 0;
}

sup {
  font-size: 0.28em;
  vertical-align: super;
  line-height: 1;
}

/* Keep the ® small and quiet against the big display setting. */
.site-footer__display sup {
  font-size: 0.16em;
  vertical-align: super;
  opacity: 0.7;
}

::selection {
  background: var(--brown);
  color: var(--ivory);
}

:focus-visible {
  outline: 2px solid currentColor;
  outline-offset: 3px;
}

.visually-hidden {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
}

/* --- shared layout ------------------------------------------------------- */

.shell {
  width: 100%;
  max-width: var(--maxw);
  margin-inline: auto;
  padding-inline: var(--pad);
}

.grid {
  display: grid;
  grid-template-columns: repeat(12, minmax(0, 1fr));
  gap: var(--gap);
}

.eyebrow {
  font-size: 0.6875rem;
  font-weight: 500;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--ink-muted);
}

/* --- header -------------------------------------------------------------- */

.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding: 1.25rem var(--pad);
  background: color-mix(in srgb, var(--ivory) 88%, transparent);
  backdrop-filter: blur(10px);
}

/* A high-contrast serif thins out at small sizes, so the wordmark carries
   extra weight and a size bump to stay legible. */
.wordmark {
  font-family: var(--font-display);
  font-size: 1.1875rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.075em;
  white-space: nowrap;
}

.site-header__right {
  display: flex;
  align-items: center;
  gap: clamp(0.625rem, 1.6vw, 1.75rem);
}

.nav {
  display: flex;
  align-items: center;
  gap: clamp(0.75rem, 1.8vw, 1.75rem);
}

/* Uppercase, light and widely tracked — the fashion-house nav treatment. */
.nav a {
  position: relative;
  font-size: 0.6875rem;
  font-weight: 400;
  text-transform: uppercase;
  letter-spacing: 0.16em;
  color: var(--ink-muted);
  transition: color 0.25s var(--ease);
}

.nav a::after {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  bottom: -3px;
  height: 1px;
  background: currentColor;
  transform: scaleX(0);
  transform-origin: left;
  transition: transform 0.35s var(--ease);
}

.nav a:hover,
.nav a[aria-current="page"] {
  color: var(--ink);
}

.nav a:hover::after,
.nav a[aria-current="page"]::after {
  transform: scaleX(1);
}

.nav-toggle {
  display: none;
  padding: 0.5rem 0.75rem;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: transparent;
  color: inherit;
  font: inherit;
  font-size: 0.8125rem;
  cursor: pointer;
}

/* --- language switch ----------------------------------------------------- */

.lang {
  display: flex;
  align-items: center;
  gap: 1px;
  padding: 2px;
  border: 1px solid var(--line);
  border-radius: 999px;
}

.lang button {
  padding: 0.3125rem 0.5rem;
  border: 0;
  border-radius: 999px;
  background: transparent;
  color: var(--ink-muted);
  font: inherit;
  font-size: 0.6875rem;
  font-weight: 600;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  cursor: pointer;
  transition: background 0.25s var(--ease), color 0.25s var(--ease);
}

.lang button:hover {
  color: var(--ink);
}

.lang button[aria-pressed="true"] {
  background: var(--brown);
  color: var(--ivory);
}

/* --- buttons ------------------------------------------------------------- */

.btn {
  display: inline-flex;
  align-items: center;
  gap: 0.75rem;
  padding: 1rem 1.5rem;
  border: 1px solid var(--brown);
  border-radius: 999px;
  background: var(--brown);
  color: var(--ivory);
  font-size: 0.875rem;
  font-weight: 500;
  cursor: pointer;
  transition: background 0.3s var(--ease), color 0.3s var(--ease);
}

.btn:hover {
  background: transparent;
  color: var(--ink);
}

.btn__arrow {
  transition: transform 0.35s var(--ease);
}

.btn:hover .btn__arrow {
  transform: translateY(3px);
}

.btn--ghost {
  background: transparent;
  color: var(--brown);
}

.btn--ghost:hover {
  background: var(--brown);
  color: var(--ivory);
}

/* --- intro: portrait beside first-person copy ---------------------------- */

/* The opening section — no rule above it, and extra air at the top. */
.intro {
  padding-block: clamp(3.5rem, 10vh, 8rem) clamp(3rem, 8vh, 6.5rem);
  scroll-margin-top: 5rem;
}

.intro__figure {
  grid-column: 1 / 6;
}

.intro__figure img {
  width: 100%;
  /* The source portrait is 857x1200. */
  aspect-ratio: 857 / 1200;
  object-fit: cover;
  background: var(--ivory-deep);
}

.intro__caption {
  display: flex;
  justify-content: space-between;
  gap: 1rem;
  padding-top: 0.875rem;
  color: var(--ink-muted);
}

.intro__body {
  grid-column: 7 / 12;
  align-self: center;
}

.intro__title {
  font-family: var(--font-display);
  font-size: clamp(1.75rem, 3.6vw, 3rem);
  font-weight: 700;
  line-height: 1.1;
  letter-spacing: 0.01em;
  margin-bottom: clamp(1.25rem, 3vh, 2rem);
}

.prose p + p {
  margin-top: 1.125rem;
}

.prose {
  max-width: 52ch;
}

.quote {
  margin-top: clamp(1.75rem, 4vh, 2.5rem);
  padding-top: clamp(1.5rem, 3vh, 2rem);
  border-top: 1px solid var(--line);
}

.quote p {
  font-family: var(--font-display);
  font-size: clamp(1.25rem, 2.2vw, 1.75rem);
  font-weight: 500;
  font-style: italic;
  line-height: 1.28;
  letter-spacing: 0.01em;
}

.quote footer {
  margin-top: 0.875rem;
  font-size: 0.6875rem;
  font-weight: 500;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--ink-muted);
}

/* --- generic section ----------------------------------------------------- */

.section {
  padding-block: clamp(3.5rem, 9vh, 7rem);
  border-top: 1px solid var(--line);
  /* Keeps anchor targets clear of the sticky header. */
  scroll-margin-top: 5rem;
}

.section__head {
  margin-bottom: clamp(2rem, 5vh, 3.5rem);
}

.section__title {
  grid-column: 1 / 6;
  font-family: var(--font-display);
  font-size: clamp(1.75rem, 4.2vw, 3.25rem);
  font-weight: 700;
  line-height: 1.08;
  letter-spacing: 0.01em;
}

/* --- gallery ------------------------------------------------------------- */

.tiles {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(min(230px, 100%), 1fr));
  gap: clamp(0.5rem, 1.1vw, 1rem);
}

.tile {
  position: relative;
  display: block;
  overflow: hidden;
  background: var(--ivory-deep);
  /* Sources vary between 4:5 and 3:4 — a fixed ratio keeps the wall aligned. */
  aspect-ratio: 4 / 5;
}

/* The wall reads as black and white; hovering a frame brings its colour back
   and pushes in slightly. */
.tile img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  filter: grayscale(1) contrast(1.02);
  transition: transform 0.9s var(--ease), filter 0.6s var(--ease);
  will-change: transform, filter;
}

.tile:hover img,
.tile:focus-visible img {
  transform: scale(1.07);
  filter: grayscale(0) contrast(1);
}

/* --- fullscreen viewer --------------------------------------------------- */

.viewer {
  position: fixed;
  inset: 0;
  z-index: 200;
  display: grid;
  /* minmax(0, …) not 1fr: a bare 1fr keeps an auto minimum, which lets a tall
     photograph stretch the track and push the caption off screen. */
  grid-template-rows: auto minmax(0, 1fr) auto;
  background: var(--brown);
  opacity: 0;
  /* Only opacity animates. `visibility` transitions discretely, which would
     leave the panel unfocusable for the whole 350ms; the `hidden` attribute
     handles the not-rendered state instead. */
  transition: opacity 0.35s var(--ease);
}

.viewer[data-open="true"] {
  opacity: 1;
  visibility: visible;
}

.viewer__bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding: 1.25rem var(--pad);
  color: var(--on-brown);
}

.viewer__count {
  font-size: 0.6875rem;
  font-weight: 500;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--on-brown-muted);
  font-variant-numeric: tabular-nums;
}

.viewer__stage {
  position: relative;
  min-height: 0;
  margin-inline: var(--pad);
}

/* Absolutely positioned and letterboxed with object-fit: a percentage
   max-height on a grid item does not reliably constrain a tall photograph,
   so the stage box drives the size instead. */
.viewer__stage img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: contain;
  animation: viewer-in 0.4s var(--ease) both;
}

@keyframes viewer-in {
  from {
    opacity: 0;
    transform: scale(0.985);
  }
}

.viewer__caption {
  padding: 1rem var(--pad) 1.75rem;
  color: var(--on-brown-muted);
  text-align: center;
  min-height: 3.5rem;
}

/* Controls */
.viewer__btn {
  display: grid;
  place-items: center;
  width: 2.75rem;
  height: 2.75rem;
  padding: 0;
  border: 1px solid var(--line-on-brown);
  border-radius: 999px;
  background: transparent;
  color: var(--on-brown);
  font: inherit;
  font-size: 1.125rem;
  line-height: 1;
  cursor: pointer;
  transition: background 0.3s var(--ease), color 0.3s var(--ease),
    border-color 0.3s var(--ease);
}

.viewer__btn:hover {
  background: var(--ivory);
  border-color: var(--ivory);
  color: var(--brown);
}

.viewer__nav {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  z-index: 2;
}

.viewer__nav--prev {
  left: calc(var(--pad) / 3);
}

.viewer__nav--next {
  right: calc(var(--pad) / 3);
}

/* --- press --------------------------------------------------------------- */

.press {
  border-top: 1px solid var(--line);
}

.press__item {
  display: grid;
  grid-template-columns: repeat(12, minmax(0, 1fr));
  gap: var(--gap);
  align-items: baseline;
  padding-block: clamp(1rem, 2.4vh, 1.5rem);
  border-bottom: 1px solid var(--line);
  transition: padding-left 0.35s var(--ease), opacity 0.25s var(--ease);
}

.press__item:hover {
  padding-left: 0.75rem;
  opacity: 0.6;
}

.press__meta {
  grid-column: 1 / 4;
  display: grid;
  gap: 0.25rem;
}

.press__date {
  font-size: 0.75rem;
  color: var(--ink-muted);
}

.press__title {
  grid-column: 4 / 11;
  font-family: var(--font-display);
  font-size: clamp(1rem, 1.7vw, 1.3125rem);
  font-weight: 600;
  line-height: 1.25;
  letter-spacing: 0.01em;
}

.press__kind {
  grid-column: 11 / 13;
  justify-self: end;
  white-space: nowrap;
  color: var(--ink-muted);
}

/* --- partner logos ------------------------------------------------------ */

.logo-strip {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(150px, 100%), 1fr));
  gap: clamp(1.5rem, 3vw, 3rem);
  align-items: center;
}

.logo-strip a {
  display: grid;
  place-items: center;
  min-height: 5.5rem;
  padding: 1rem;
}

/* The sources are a mixed bag — some dark-on-transparent, some dark on a
   white box, one light on a dark box. `multiply` dissolves white boxes into
   the ivory ground; grayscale unifies the colour; [data-invert] flips the
   one light-on-dark source before the same treatment is applied. */
.logo-strip img {
  max-height: 3.25rem;
  width: auto;
  object-fit: contain;
  mix-blend-mode: multiply;
  filter: grayscale(1) contrast(1.08);
  opacity: 0.68;
  transition: opacity 0.3s var(--ease);
}

/* Square marks carry their own internal padding, so they need more height
   to read at the same visual weight as the wordmarks. */
.logo-strip img[data-square] {
  max-height: 5.75rem;
}

.logo-strip img[data-invert] {
  filter: invert(1) grayscale(1) brightness(1.15) contrast(1.08);
}

.logo-strip a:hover img {
  opacity: 1;
}

/* --- link list (contact + socials) --------------------------------------- */

.links {
  border-top: 1px solid var(--line);
}

.links__item {
  display: flex;
  align-items: center;
  gap: 1rem;
  padding: clamp(1rem, 2.4vh, 1.5rem) 0;
  border-bottom: 1px solid var(--line);
  font-family: var(--font-display);
  font-size: clamp(1.125rem, 2.4vw, 1.625rem);
  font-weight: 600;
  letter-spacing: 0.02em;
  transition: padding-left 0.35s var(--ease), opacity 0.25s var(--ease);
}

.links__item:hover {
  padding-left: 0.75rem;
  opacity: 0.6;
}

.links__item .icon {
  width: 1.15em;
  height: 1.15em;
  flex: none;
}

/* Pushes the trailing handle to the right edge of the row. */
.links__handle {
  margin-left: auto;
  font-family: var(--font-body);
  font-size: 0.8125rem;
  font-weight: 400;
  letter-spacing: 0;
  color: var(--ink-muted);
}

/* --- social icons -------------------------------------------------------- */

.icon {
  width: 1.0625rem;
  height: 1.0625rem;
  display: block;
}

[hidden] {
  display: none !important;
}

/* --- footer -------------------------------------------------------------- */

.site-footer {
  background: var(--brown);
  color: var(--on-brown);
  padding-block: clamp(3rem, 8vh, 6rem) 1.75rem;
}

.site-footer__display {
  font-family: var(--font-display);
  /* Measured: the widest name variant (Cyrillic BG) is ~8.74x the font-size,
     and the shell is ~91% of the viewport — 10vw fits on one line in all
     three languages. */
  font-size: min(10vw, 10.8rem);
  font-weight: 700;
  line-height: 1;
  text-transform: uppercase;
  letter-spacing: 0.02em;
  white-space: nowrap;
  padding-bottom: clamp(2.5rem, 6vh, 4.5rem);
}

.site-footer__bar {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 0.5rem 2rem;
  margin-top: clamp(2.5rem, 7vh, 5rem);
  padding-top: 1.5rem;
  border-top: 1px solid var(--line-on-brown);
  color: var(--on-brown-muted);
}

/* --- reveal on scroll ---------------------------------------------------- */

.js .reveal {
  opacity: 0;
  transform: translateY(18px);
  transition: opacity 0.8s var(--ease), transform 0.8s var(--ease);
}

.js .reveal.is-in {
  opacity: 1;
  transform: none;
}

/* --- responsive ---------------------------------------------------------- */

@media (max-width: 1000px) {
  .intro__figure {
    grid-column: 1 / 7;
  }

  .intro__body {
    grid-column: 8 / 13;
  }
}

@media (max-width: 900px) {
  .section__title,
  .intro__figure,
  .intro__body {
    grid-column: 1 / -1;
  }

  .intro__figure img {
    aspect-ratio: 4 / 3;
    object-position: center 22%;
  }

  .prose {
    max-width: 46ch;
  }

  .press__meta {
    grid-column: 1 / 9;
  }

  .press__title {
    grid-column: 1 / 12;
  }

  .press__kind {
    grid-column: 12 / 13;
  }
}

@media (max-width: 720px) {
  .nav-toggle {
    display: block;
  }

  .nav {
    position: absolute;
    top: 100%;
    right: var(--pad);
    left: var(--pad);
    flex-direction: column;
    align-items: stretch;
    gap: 0;
    padding: 0.5rem 1.25rem;
    background: var(--ivory);
    border: 1px solid var(--line);
    border-radius: 14px;
    box-shadow: 0 18px 40px rgba(82, 59, 53, 0.14);
  }

  .nav[data-open="false"] {
    display: none;
  }

  .nav a {
    padding: 0.875rem 0;
    font-size: 0.9375rem;
    border-bottom: 1px solid var(--line);
  }

  .nav a:last-child {
    border-bottom: 0;
  }

  .nav a::after {
    content: none;
  }

  .press__item {
    align-items: center;
  }

  .wordmark {
    font-size: 1rem;
    letter-spacing: 0.06em;
  }

  .press__kind {
    display: none;
  }
}

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

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

  .js .reveal {
    opacity: 1;
    transform: none;
  }

  /* Colour still reveals on hover — that is not motion — but nothing moves. */
  .tile:hover img,
  .tile:focus-visible img {
    transform: none;
  }
}
