/* Mira Vesk. One-page portfolio. Edit :root to restyle. */
:root {
  --ink: #0B0B0A;
  --ink-2: #161614;
  --bone: #EDEAE3;
  --ash: #8C8A84;
  --line: rgba(237,234,227,.18);
  --signal: #D9FF3F; /* meter accent, used only on the light meter */

  --display: "Italiana", "Didot", serif;
  --sans: "Sora", system-ui, sans-serif;
  --ease: cubic-bezier(0.76, 0, 0.24, 1);
  --out: cubic-bezier(0.22, 1, 0.36, 1);
  --gutter: clamp(1rem, 3vw, 2.5rem);
}

[hidden] { display: none !important; }
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
body { margin: 0; font: 300 1rem/1.6 var(--sans); color: var(--bone); background: var(--ink); -webkit-font-smoothing: antialiased; }
img { display: block; max-width: 100%; height: auto; }
a { color: inherit; }
button, input, textarea { font: inherit; color: inherit; }
h1, h2, h3 { margin: 0; font-family: var(--display); font-weight: 400; line-height: .9; }
p { margin: 0 0 1rem; }
:focus-visible { outline: 1px solid var(--bone); outline-offset: 4px; }
.hp { position: absolute !important; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); }
.skip { position: absolute; left: -999px; top: 1rem; z-index: 99; padding: .5rem 1rem; background: var(--bone); color: var(--ink); }
.skip:focus { left: 1rem; }

/* ---------- Header ---------- */
.top { position: fixed; inset: 0 0 auto; z-index: 30; display: grid; grid-template-columns: 1fr auto 1fr; align-items: center; padding: 1.1rem var(--gutter); mix-blend-mode: difference; color: #fff; font-size: .82rem; letter-spacing: .02em; }
.top a { text-decoration: none; }
.top__name { font: 400 1.4rem/1 var(--display); }
.top__nav { display: flex; gap: 1.6rem; }
.top__nav a { position: relative; }
.top__nav a::after { content: ""; position: absolute; left: 0; right: 0; bottom: -3px; height: 1px; background: currentColor; transform: scaleX(0); transform-origin: right; transition: transform .6s var(--ease); }
.top__nav a:hover::after { transform: scaleX(1); transform-origin: left; }
.top__time { justify-self: end; font-variant-numeric: tabular-nums; }

/* ---------- Hero ---------- */
.hero { position: relative; height: 100svh; min-height: 34rem; overflow: hidden; background: var(--ink-2); cursor: none; }
.hero__canvas { position: absolute; inset: 0; width: 100%; height: 100%; }
.hero__title { position: absolute; left: var(--gutter); right: var(--gutter); bottom: 4.5rem; display: flex; justify-content: space-between; font-size: clamp(5rem, 22vw, 22rem); letter-spacing: -0.02em; color: #fff; mix-blend-mode: difference; pointer-events: none; }
.hero__title span { display: block; overflow: hidden; }
.js .hero__title span { animation: rise 1.6s var(--out) both; }
.js .hero__title span + span { animation-delay: .12s; }
@keyframes rise { from { transform: translateY(100%); opacity: 0; } }
.hero__caption { position: absolute; left: var(--gutter); top: 5rem; display: grid; gap: .3rem; font-size: .85rem; mix-blend-mode: difference; color: #fff; }
.count { font-variant-numeric: tabular-nums; color: rgba(255,255,255,.7); }
.count b { font-weight: 600; color: #fff; }
.hero__controls { position: absolute; left: var(--gutter); right: var(--gutter); bottom: 1.4rem; display: flex; align-items: center; gap: 1rem; font-size: .8rem; mix-blend-mode: difference; color: #fff; }
.hero__controls button { padding: .4rem 0; border: 0; background: none; cursor: pointer; text-transform: none; }
.bar { flex: 1; height: 1px; background: rgba(255,255,255,.3); overflow: hidden; }
.bar i { display: block; height: 100%; background: #fff; transform-origin: left; transform: scaleX(0); }
.hero__hint { position: absolute; right: var(--gutter); top: 5rem; margin: 0; font-size: .75rem; color: #fff; mix-blend-mode: difference; opacity: .7; }

/* ---------- Light meter cursor ---------- */
.meter { position: fixed; left: 0; top: 0; z-index: 40; pointer-events: none; opacity: 0; transition: opacity .3s; }
.meter.is-on { opacity: 1; }
.meter__ring { position: absolute; left: -2.2rem; top: -2.2rem; width: 4.4rem; height: 4.4rem; border: 1px solid var(--signal); border-radius: 50%; }
.meter__ring::before, .meter__ring::after { content: ""; position: absolute; background: var(--signal); }
.meter__ring::before { left: 50%; top: -.5rem; bottom: -.5rem; width: 1px; transform: translateX(-50%); clip-path: polygon(0 0, 100% 0, 100% 30%, 0 30%, 0 70%, 100% 70%, 100% 100%, 0 100%); }
.meter__ring::after { top: 50%; left: -.5rem; right: -.5rem; height: 1px; transform: translateY(-50%); clip-path: polygon(0 0, 30% 0, 30% 100%, 0 100%, 0 0, 70% 0, 100% 0, 100% 100%, 70% 100%); }
.meter__read { position: absolute; left: 3rem; top: .8rem; display: grid; min-width: 9rem; padding: .35rem .55rem; background: rgba(11,11,10,.8); color: var(--signal); font: 400 .7rem/1.35 var(--sans); font-variant-numeric: tabular-nums; white-space: nowrap; }
.meter__read b { font-weight: 600; font-size: .85rem; }

/* ---------- Intro ---------- */
.intro { display: grid; grid-template-columns: 2fr 1fr; gap: clamp(2rem, 6vw, 6rem); padding: clamp(5rem, 12vw, 10rem) var(--gutter); }
.intro__lead { font: 400 clamp(1.8rem, 4vw, 3.4rem)/1.12 var(--display); margin: 0; }
.intro__facts { margin: 0; align-self: end; }
.intro__facts div { padding: .9rem 0; border-top: 1px solid var(--line); }
.intro__facts dt { font-size: .75rem; color: var(--ash); }
.intro__facts dd { margin: 0; }

/* ---------- Work ---------- */
.work { display: grid; grid-template-columns: repeat(12, 1fr); gap: var(--gutter); padding: 0 var(--gutter) clamp(5rem, 10vw, 8rem); }
.shot { margin: 0; }
.shot button { display: block; width: 100%; padding: 0; border: 0; background: var(--ink-2); cursor: none; overflow: hidden; }
.shot img { width: 100%; aspect-ratio: 2 / 3; object-fit: cover; filter: grayscale(1) contrast(1.05); transition: transform 1.4s var(--out), filter 1s var(--out); }
.shot button:hover img { transform: scale(1.035); filter: grayscale(.6) contrast(1.1); }
.shot figcaption { display: flex; justify-content: space-between; gap: 1rem; padding-top: .7rem; font-size: .8rem; }
.shot figcaption span:first-child { font: 400 1.5rem/1 var(--display); }
.shot figcaption span:last-child { color: var(--ash); }
.shot--a { grid-column: 1 / span 5; }
.shot--b { grid-column: 7 / span 4; margin-top: 14rem; }
.shot--c { grid-column: 2 / span 4; margin-top: -4rem; }
.shot--d { grid-column: 7 / span 6; margin-top: 6rem; }
.shot--d img { aspect-ratio: 4 / 5; }
.shot--e { grid-column: 4 / span 5; margin-top: 4rem; }
.js .shot button, .js .shot figcaption { clip-path: inset(100% 0 0 0); transition: clip-path 1.4s var(--ease); }
.js .shot figcaption { transition-delay: .3s; }
.js .shot.is-in button, .js .shot.is-in figcaption { clip-path: inset(0 0 0 0); }

/* ---------- Clients ---------- */
.clients { position: relative; padding: clamp(4rem, 8vw, 6rem) var(--gutter); border-top: 1px solid var(--line); }
.clients h2 { font-size: clamp(2.4rem, 6vw, 5rem); margin-bottom: 2rem; }
.clients__list { list-style: none; margin: 0; padding: 0; }
.clients__list li { display: grid; grid-template-columns: 2fr 1fr auto; gap: 1rem; align-items: baseline; padding: 1.1rem 0; border-top: 1px solid var(--line); transition: color .4s, padding .6s var(--out); }
.clients__list li:last-child { border-bottom: 1px solid var(--line); }
.clients__list li span:first-child { font: 400 clamp(1.8rem, 4.5vw, 3.6rem)/1 var(--display); }
.clients__list li span:not(:first-child) { color: var(--ash); font-size: .85rem; }
.clients__list:hover li { color: var(--ash); }
.clients__list li:hover { color: var(--bone); padding-left: 1.5rem; }
.clients__peek { position: fixed; left: 0; top: 0; z-index: 20; width: 14rem; aspect-ratio: 2/3; object-fit: cover; pointer-events: none; opacity: 0; filter: grayscale(1); transition: opacity .3s; will-change: transform; }
.clients__peek.is-on { opacity: 1; }

/* ---------- Rates ---------- */
.rates { padding: clamp(4rem, 8vw, 6rem) var(--gutter); border-top: 1px solid var(--line); }
.rates__head { display: flex; justify-content: space-between; align-items: end; gap: 1rem; flex-wrap: wrap; margin-bottom: 2.5rem; }
.rates h2 { font-size: clamp(2.4rem, 6vw, 5rem); }
.toggle { display: flex; border: 1px solid var(--line); border-radius: 99px; padding: .25rem; }
.toggle button { padding: .5rem 1rem; border: 0; border-radius: 99px; background: none; cursor: pointer; font-size: .85rem; color: var(--ash); transition: background-color .4s, color .4s; }
.toggle button[aria-pressed="true"] { background: var(--bone); color: var(--ink); }
.rates__grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 1px; background: var(--line); border: 1px solid var(--line); }
.rate { padding: 2rem 1.6rem; background: var(--ink); }
.rate h3 { font-size: 2.2rem; }
.rate__price { font: 400 clamp(2.4rem, 5vw, 3.6rem)/1 var(--display); margin: 1.8rem 0 1rem; font-variant-numeric: tabular-nums; }
.rate p:last-child { color: var(--ash); margin: 0; }
.rates__note { margin-top: 1.2rem; color: var(--ash); font-size: .85rem; }

/* ---------- Book ---------- */
.book { display: grid; grid-template-columns: 1fr 2fr; gap: clamp(2rem, 6vw, 6rem); padding: clamp(4rem, 8vw, 6rem) var(--gutter); border-top: 1px solid var(--line); }
.book h2 { font-size: clamp(2.4rem, 6vw, 5rem); }
.book__form { display: grid; grid-template-columns: 1fr 1fr; gap: 1.8rem 2rem; }
.line { display: grid; gap: .3rem; margin: 0; padding: 0; border: 0; min-width: 0; }
.line--full { grid-column: 1 / -1; }
.line > span, .line legend { font-size: .75rem; color: var(--ash); padding: 0; }
.line input, .line textarea { width: 100%; padding: .5rem 0; border: 0; border-bottom: 1px solid var(--line); border-radius: 0; background: transparent; font-size: 1.1rem; color-scheme: dark; }
.line input:focus, .line textarea:focus { outline: none; border-color: var(--bone); }
fieldset.line { display: flex; flex-wrap: wrap; gap: .5rem; }
fieldset.line legend { width: 100%; margin-bottom: .5rem; }
.pill { position: relative; }
.pill input { position: absolute; inset: 0; width: 100%; height: 100%; margin: 0; opacity: 0; cursor: pointer; }
.pill span { display: block; padding: .55rem 1.1rem; border: 1px solid var(--line); border-radius: 99px; font-size: .9rem; transition: background-color .3s, color .3s; }
.pill input:checked + span { background: var(--bone); color: var(--ink); }
.pill input:focus-visible + span { outline: 1px solid var(--bone); outline-offset: 3px; }
.send { justify-self: start; padding: 1rem 2.2rem; border: 1px solid var(--bone); border-radius: 99px; background: none; cursor: pointer; font-size: .95rem; transition: background-color .5s var(--out), color .5s var(--out); }
.send:hover { background: var(--bone); color: var(--ink); }
.status { grid-column: 1 / -1; min-height: 1.5rem; margin: 0; }

/* ---------- Footer ---------- */
.foot { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: end; gap: 1rem; padding: 3rem var(--gutter) 1.5rem; border-top: 1px solid var(--line); font-size: .8rem; color: var(--ash); }
.foot__big { width: 100%; margin: 0 0 2rem; font: 400 clamp(4rem, 19vw, 18rem)/.8 var(--display); color: var(--bone); letter-spacing: -0.02em; }
.foot p { margin: 0; }

/* ---------- Viewer ---------- */
.viewer { width: 100vw; height: 100dvh; max-width: none; max-height: none; margin: 0; padding: 0; border: 0; background: var(--ink); color: var(--bone); }
.viewer::backdrop { background: var(--ink); }
.viewer[open] { animation: fade .5s var(--out); }
@keyframes fade { from { opacity: 0; } }
.viewer img { width: 100%; height: 100%; object-fit: contain; padding: 4rem 1rem 3rem; filter: grayscale(1); }
.viewer__cap { position: absolute; left: var(--gutter); bottom: 1rem; margin: 0; font-size: .85rem; }
.viewer__close { position: absolute; right: var(--gutter); top: 1rem; padding: .5rem 0; border: 0; background: none; cursor: pointer; }
.viewer__nav { position: absolute; top: 50%; width: 3rem; height: 3rem; border: 1px solid var(--line); border-radius: 50%; background: rgba(11,11,10,.6); cursor: pointer; }
.viewer__nav--prev { left: var(--gutter); }
.viewer__nav--next { right: var(--gutter); }

@media (hover: none) {
  .hero, .shot button { cursor: auto; }
  .meter, .hero__hint, .clients__peek { display: none; }
}
@media (max-width: 760px) {
  .top { grid-template-columns: 1fr auto; }
  .top__time { display: none; }
  .top__nav { gap: 1rem; }
  .hero__title { flex-direction: column; bottom: 4rem; }
  .intro, .book { grid-template-columns: 1fr; }
  .shot--a, .shot--b, .shot--c, .shot--d, .shot--e { grid-column: 1 / -1; margin-top: 0; }
  .shot--b, .shot--c { grid-column: span 6; }
  .rates__grid { grid-template-columns: 1fr; }
  .book__form { grid-template-columns: 1fr; }
  .clients__list li { grid-template-columns: 1fr auto; }
  .clients__list li span:nth-child(2) { display: none; }
}
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { animation: none !important; transition: none !important; }
  .js .shot button, .js .shot figcaption { clip-path: none; }
}
