/* One Five Photography. Black page, white type, one yellow accent, contour lines fixed behind everything. */

@font-face { font-family: 'Antonio'; src: url('../fonts/antonio.woff2') format('woff2'); font-weight: 100 700; font-display: swap; }
@font-face { font-family: 'Barlow'; src: url('../fonts/barlow-400.woff2') format('woff2'); font-weight: 400; font-display: swap; }
@font-face { font-family: 'Barlow'; src: url('../fonts/barlow-600.woff2') format('woff2'); font-weight: 600; font-display: swap; }

:root {
  --black: #050505;
  --carbon: #161614;
  --line: #2A2A27;
  --ash: #A3A19B;
  --soft: #D9D8D2;
  --white: #F4F4F0;
  --yellow: #FFC400;
  --display: 'Antonio', 'Arial Narrow', Impact, sans-serif;
  --body: 'Barlow', Arial, Helvetica, sans-serif;
  --gutter: max(clamp(20px, 5vw, 72px), calc((100vw - 1560px) / 2));
  --ease: cubic-bezier(.2, .7, .1, 1);
  color-scheme: dark;
}

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

html {
  background: var(--black);
  color: var(--white);
  font-family: var(--body);
  font-size: 18px;
  line-height: 1.5;
  -webkit-text-size-adjust: 100%;
  scroll-behavior: smooth;
  scroll-padding-top: 96px;
}

body { margin: 0; min-height: 100svh; overflow-x: clip; }
img { display: block; max-width: 100%; height: auto; }
a { color: inherit; }
h1, h2, p, figure { margin: 0; }
button, input, select, textarea { font: inherit; }
:focus-visible { outline: 2px solid var(--yellow); outline-offset: 3px; }

.skip { position: absolute; left: var(--gutter); top: -80px; z-index: 40; padding: 10px 14px; background: var(--yellow); color: var(--black); font-weight: 600; text-decoration: none; }
.skip:focus { top: 12px; }

.label { font-size: .72rem; font-weight: 600; letter-spacing: .16em; text-transform: uppercase; }
.label a { text-decoration: none; }
.label a:hover { color: var(--yellow); }
.sep { color: var(--yellow); }

/* Contour lines: one still sheet behind the page. It never moves or changes brightness. */
.terrain {
  position: fixed; inset: 0; z-index: -1; pointer-events: none;
  background: url('../img/contours.svg') center / cover no-repeat;
  opacity: .14;
}

/* Header */
.top {
  position: fixed; top: 0; left: 0; right: 0; z-index: 30;
  display: flex; justify-content: space-between; align-items: center; gap: 16px;
  padding: 18px var(--gutter);
  border-bottom: 1px solid transparent;
  transition: padding .35s var(--ease), background-color .35s ease, border-color .35s ease;
}
.top.is-stuck { padding-block: 10px; background: rgba(5, 5, 5, .88); border-bottom-color: var(--line); -webkit-backdrop-filter: blur(10px); backdrop-filter: blur(10px); }
.mark { display: block; flex: none; }
.mark img { width: auto; height: clamp(44px, 4.8vw, 60px); transition: height .35s var(--ease); }
.top.is-stuck .mark img { height: 44px; }
.nav { display: flex; gap: clamp(16px, 3vw, 40px); font-size: .72rem; font-weight: 600; letter-spacing: .16em; text-transform: uppercase; }
.nav a { padding: 14px 0; text-decoration: none; }
.nav a:hover { color: var(--yellow); }
.nav__book { color: var(--yellow); }
.nav__book:hover { color: var(--white); }

/* Hero */
.hero {
  position: relative; isolation: isolate;
  display: flex; align-items: flex-end;
  min-height: min(100svh, 980px);
  padding: 140px var(--gutter) clamp(40px, 7svh, 84px);
}
.hero__photo {
  position: absolute; z-index: -1; top: 0; right: 0; bottom: 0;
  width: min(70%, 1120px);
  overflow: hidden; /* keeps the photo's slow settle-in from pushing past the edge of the screen */
  -webkit-mask-image: linear-gradient(90deg, transparent 0%, #000 44%), linear-gradient(0deg, transparent 0%, #000 22%);
  -webkit-mask-composite: source-in;
  mask-image: linear-gradient(90deg, transparent 0%, #000 44%), linear-gradient(0deg, transparent 0%, #000 22%);
  mask-composite: intersect;
}
.hero__photo img { width: 100%; height: 100%; object-fit: cover; object-position: 42% 30%; }
.hero__copy { display: flex; flex-direction: column; align-items: flex-start; gap: clamp(14px, 2.4svh, 22px); }
/* The verse is set as one block: two large rows and a smaller third row, all the same width.
   The block is as wide as its widest row, and each row spreads its words to reach that width. */
.hero__title {
  width: fit-content; white-space: nowrap;
  font-family: var(--display); font-weight: 700;
  font-size: clamp(64px, min(8vw, 16svh), 154px);
  line-height: .98; letter-spacing: .005em; text-transform: uppercase;
}
/* Each line is a window the word rises into. The padding below the word leaves room for round letters
   (S, O), which hang a little under the baseline, and the padding on the right leaves room for the hanging
   comma. The margins take that room back out of the spacing. */
.hero__title .line { display: block; overflow: hidden; padding: 0 .4em .1em 0; margin: -.16em -.4em 0 0; }
.hero__title .line:first-child { margin-top: -.06em; }
.hero__title .line:last-child { margin-bottom: -.1em; }
.hero__title .line > span { display: block; text-align: justify; text-align-last: justify; }
/* Punctuation at the end of a row takes up no width, so it hangs just outside the block's right edge. */
.hero__title .hang { display: inline-block; width: 0; text-align: left; text-align-last: auto; }
/* This size fits the current wording, so the third row comes out as wide as the two above it.
   If the words change, adjust it. The top margin is the gap above the third row. */
.hero__title .line--rest { font-size: .409em; margin-top: -.06em; }
.hero__ref { margin-top: -4px; color: var(--soft); }
.hero__intro { max-width: 30em; font-size: clamp(1.05rem, 1.5vw, 1.3rem); line-height: 1.4; color: var(--soft); }
.hero__actions { display: flex; flex-wrap: wrap; align-items: center; gap: 12px 28px; }

.btn {
  display: inline-block; padding: 13px 28px 15px;
  background: var(--yellow); color: var(--black);
  font-family: var(--display); font-weight: 700; font-size: 1.35rem; line-height: 1; letter-spacing: .05em; text-transform: uppercase;
  text-decoration: none; border: 0; border-radius: 0; cursor: pointer;
  transition: background-color .25s ease, transform .25s var(--ease);
}
.btn:hover { background: var(--white); }
.btn:active { transform: translateY(1px); }
.textlink { padding: 12px 0; font-size: .85rem; font-weight: 600; text-underline-offset: 5px; }
.textlink:hover { color: var(--yellow); }

/* Work: one block per session type */
.work { display: flex; flex-direction: column; gap: clamp(96px, 13vw, 190px); padding: clamp(72px, 10vw, 150px) var(--gutter); }
.set { display: flex; flex-direction: column; gap: clamp(22px, 3vw, 40px); }
/* The name takes the width it needs and the note takes what is left, so a long name is never cut off. */
.set__head { display: grid; grid-template-columns: max-content minmax(0, 400px); justify-content: space-between; gap: 20px 48px; align-items: end; }
.set__title, .title {
  font-family: var(--display); font-weight: 700;
  font-size: clamp(72px, 12vw, 184px);
  line-height: .98; letter-spacing: .005em; text-transform: uppercase;
}
.set__title { overflow: hidden; padding-bottom: .1em; margin-bottom: -.1em; }
.set__title > span { display: block; }
.set__note { display: flex; flex-direction: column; gap: 14px; padding-bottom: clamp(6px, 1.4vw, 22px); color: var(--soft); }
.set__meta { display: flex; flex-wrap: wrap; align-items: center; gap: 4px 12px; color: var(--ash); }
.set__meta a { padding: 10px 0; color: var(--white); }
.set__count:empty, .set__count:empty + .sep { display: none; }
.strip[hidden] { display: none; }

/* Photo rows. Without the script this is a plain flex wrap; the script sets exact sizes so every row fills the width. */
.strip { display: flex; flex-wrap: wrap; gap: 10px; --row: clamp(200px, 30vw, 430px); }
.strip::after { content: ""; flex-grow: 1000000; }
.shot {
  --r: 1.5;
  position: relative; display: block; overflow: hidden; background: var(--carbon);
  flex-grow: calc(var(--r) * 100); flex-basis: calc(var(--r) * var(--row)); aspect-ratio: var(--r);
  cursor: zoom-in;
}
.shot img { width: 100%; height: 100%; object-fit: cover; transition: scale .8s var(--ease); }
.shot:hover img { scale: 1.025; }
.strip.is-laid::after { display: none; }
.strip.is-laid .shot { flex: 0 0 auto; aspect-ratio: auto; }
.more { align-self: flex-start; padding: 15px 22px; background: transparent; color: var(--white); border: 1px solid var(--line); cursor: pointer; transition: border-color .25s ease, color .25s ease; }
.more:hover { border-color: var(--yellow); color: var(--yellow); }

/* About */
.about { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 32px 72px; align-items: end; padding: clamp(72px, 10vw, 150px) var(--gutter); border-top: 1px solid var(--line); }
.about__body { display: flex; flex-direction: column; gap: 28px; padding-bottom: clamp(6px, 1.4vw, 22px); }
.about__photo { width: 100%; max-width: 520px; }
.about__text { display: flex; flex-direction: column; gap: 16px; max-width: 54ch; font-size: 1.1rem; color: var(--soft); }

/* Booking */
.book { display: grid; grid-template-columns: minmax(0, 5fr) minmax(0, 6fr); gap: 40px 72px; align-items: start; padding: clamp(72px, 10vw, 150px) var(--gutter); border-top: 1px solid var(--line); }
.book__intro { display: flex; flex-direction: column; gap: 22px; color: var(--soft); }
.book__intro .title { color: var(--white); }
.book__intro .title span { display: block; }
.book__intro p { max-width: 40ch; }
.form { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 18px; }
.field { display: flex; flex-direction: column; gap: 8px; min-width: 0; }
.field--wide { grid-column: 1 / -1; }
.field label { font-size: .72rem; font-weight: 600; letter-spacing: .16em; text-transform: uppercase; color: var(--ash); }
.field input, .field select, .field textarea {
  width: 100%; min-height: 52px; padding: 13px 14px;
  background: var(--carbon); color: var(--white);
  border: 1px solid var(--line); border-radius: 0;
  transition: border-color .2s ease;
}
.field textarea { resize: vertical; min-height: 150px; }
.field input:hover, .field select:hover, .field textarea:hover { border-color: #4a4a45; }
.field input:focus-visible, .field select:focus-visible, .field textarea:focus-visible { outline: none; border-color: var(--yellow); }
.trap { position: absolute; left: -9999px; width: 1px; height: 1px; overflow: hidden; }
.form__end { display: flex; flex-wrap: wrap; align-items: center; gap: 14px 24px; }
.status { color: var(--soft); min-height: 1.5em; }
.status.is-bad { color: var(--yellow); }

/* Footer */
.foot { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: flex-end; gap: 24px; padding: 44px var(--gutter); border-top: 1px solid var(--line); }
.mark--foot img { height: 72px; }
.foot__meta { display: flex; flex-wrap: wrap; gap: 8px 28px; font-size: .8rem; color: var(--ash); }
.foot__meta a { padding: 6px 0; text-underline-offset: 4px; }
.foot__meta a:hover { color: var(--yellow); }

/* Full-screen viewer */
.viewer { width: 100vw; height: 100dvh; max-width: none; max-height: none; margin: 0; padding: 0; border: 0; background: var(--black); color: var(--white); overflow: hidden; }
.viewer::backdrop { background: var(--black); }
.viewer__stage { position: absolute; inset: 64px clamp(12px, 7vw, 110px) 72px; display: flex; align-items: center; justify-content: center; }
.viewer__img { max-width: 100%; max-height: 100%; width: auto; height: auto; object-fit: contain; opacity: 0; filter: brightness(.35) contrast(1.2); }
.viewer__img.is-loaded { opacity: 1; filter: none; transition: opacity .45s ease, filter 1s ease; }
.viewer__cap { position: absolute; left: clamp(16px, 5vw, 72px); bottom: 26px; display: flex; gap: 12px; }
.viewer__btn { position: absolute; display: grid; place-items: center; width: 52px; height: 52px; background: transparent; color: var(--white); border: 1px solid transparent; cursor: pointer; transition: color .2s ease, border-color .2s ease; }
.viewer__btn:hover { color: var(--yellow); border-color: var(--line); }
.viewer__close { top: 8px; right: clamp(8px, 4vw, 60px); }
.viewer__prev { left: clamp(0px, 2vw, 36px); top: calc(50% - 26px); }
.viewer__next { right: clamp(0px, 2vw, 36px); top: calc(50% - 26px); }

/* Motion. Everything below is extra: the page is complete without it.
   The scroll-linked part depends only on where an element sits on screen, so nothing can be left hidden. */
@media (prefers-reduced-motion: no-preference) {
  .hero__photo img { animation: develop 2.6s ease .1s both; }
  .hero__title .line > span { animation: rise .95s var(--ease) both; animation-delay: calc(var(--i) * 110ms + .25s); }
  .hero__ref, .hero__intro, .hero__actions { animation: settle .9s ease .75s both; }
  .top { animation: settle .9s ease .2s both; }

  @supports (animation-timeline: view()) {
    .shot { view-timeline: --shot block; }
    .shot img { animation: develop-in linear both; animation-timeline: --shot; animation-range: entry 0% entry 55%; }
    .set__title { view-timeline: --title block; animation: drift linear both; animation-timeline: view(); animation-range: cover 0% cover 100%; }
    .set__title > span { animation: rise linear both; animation-timeline: --title; animation-range: entry 0% entry 100%; }
    .title, .set__note, .about__body, .form, .book__intro p { animation: settle linear both; animation-timeline: view(); animation-range: entry 0% entry 75%; }
  }
}
@keyframes develop-in { from { opacity: 0; filter: brightness(.3) contrast(1.25); transform: scale(1.04); } to { opacity: 1; filter: none; transform: none; } }
@keyframes develop { from { opacity: 0; filter: brightness(.25) contrast(1.3); transform: scale(1.05); } 55% { opacity: 1; } to { opacity: 1; filter: none; transform: none; } }
@keyframes rise { from { transform: translateY(112%); } to { transform: none; } }
@keyframes settle { from { opacity: 0; transform: translateY(14px); } to { opacity: 1; transform: none; } }
@keyframes drift { from { transform: translateX(-1.6vw); } to { transform: translateX(1.6vw); } }

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  * { transition-duration: .01ms !important; }
}

/* Narrow screens */
@media (max-width: 820px) {
  html { font-size: 17px; }
  .hero { min-height: 100svh; padding-top: 96px; }
  .hero__title { font-size: clamp(40px, min(13.8vw, 24svh), 120px); }
  .set__title, .title { font-size: clamp(54px, 18vw, 150px); }
  .hero__photo {
    left: 0; width: 100%; bottom: auto; height: 74svh;
    -webkit-mask-image: linear-gradient(180deg, #000 38%, transparent 100%);
    -webkit-mask-composite: source-over;
    mask-image: linear-gradient(180deg, #000 38%, transparent 100%);
    mask-composite: add;
  }
  .hero__photo img { object-position: 30% 24%; }
  .set__head, .about, .book { grid-template-columns: minmax(0, 1fr); }
  .set__note { padding-bottom: 0; }
  /* On phones the count and the "Ask about" link sit on separate lines, so the colon between them is dropped. */
  .set__meta { flex-direction: column; align-items: flex-start; gap: 0; }
  .set__meta .sep { display: none; }
  .strip { gap: 8px; }
  .form { grid-template-columns: minmax(0, 1fr); }
  .viewer__stage { inset: 60px 8px 64px; }
  .viewer__prev, .viewer__next { top: auto; bottom: 8px; }
  .viewer__prev { left: auto; right: 68px; }
  .viewer__next { right: 12px; }
}
