/* KrystaPhotos — "The Edit"
   A quiet printed-portfolio design. Paper, black ink, no accent colour.
   Photos are placed by their shape to give each page a rhythm. */

:root {
  --paper: #fbfaf8;
  --ink: #1c1c1b;
  --soft: #5f5e5a;
  --faint: #8d8b85;
  --line: #e4e1db;
  --serif: "Newsreader", "Iowan Old Style", Georgia, serif;
  --sans: "Hanken Grotesk", "Helvetica Neue", Arial, sans-serif;
  --s-1: .8125rem;
  --s0: 1.0625rem;
  --s1: 1.25rem;
  --s2: clamp(1.5rem, 1.2rem + 1vw, 2rem);
  --s3: clamp(2rem, 1.4rem + 2vw, 2.9rem);
  --s4: clamp(2.6rem, 1.4rem + 4vw, 5.2rem);
  --gut: clamp(18px, 4vw, 64px);
  --ease: cubic-bezier(.2, .7, .1, 1);
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; scroll-padding-top: 90px; }
body { margin: 0; background: var(--paper); color: var(--ink); font: 400 var(--s0)/1.7 var(--sans); -webkit-font-smoothing: antialiased; }
img { display: block; max-width: 100%; height: auto; }
figure { margin: 0; }
a { color: inherit; }
p { margin: 0 0 1.1em; }
h1, h2, h3 { font-family: var(--serif); font-weight: 300; margin: 0; letter-spacing: -.012em; }
strong { font-weight: 500; }
::selection { background: var(--ink); color: var(--paper); }
:focus-visible { outline: 1.5px solid var(--ink); outline-offset: 4px; }
.skip:not(:focus) { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); }
.skip:focus { position: fixed; top: 10px; left: 10px; z-index: 99; background: var(--ink); color: var(--paper); padding: 8px 14px; }

/* ------------------------------------------------ Bar */
.bar {
  position: sticky; top: 0; z-index: 30; display: flex; align-items: center; justify-content: space-between; gap: 30px;
  padding: 20px var(--gut); background: rgba(251, 250, 248, .94);
  -webkit-backdrop-filter: blur(10px); backdrop-filter: blur(10px);
  border-bottom: 1px solid transparent; transition: border-color .4s ease, padding .4s ease;
}
.bar.lined { border-bottom-color: var(--line); padding-top: 14px; padding-bottom: 14px; }
.logo img { width: 112px; }
.nav { display: flex; align-items: center; gap: clamp(16px, 2.2vw, 34px); }
.nav a { text-decoration: none; font-size: var(--s-1); letter-spacing: .02em; color: var(--soft); padding: 4px 0; border-bottom: 1px solid transparent; transition: color .25s ease, border-color .25s ease; }
.nav a:hover { color: var(--ink); }
.nav a[aria-current="page"] { color: var(--ink); border-bottom-color: var(--ink); }
.nav .nav-cta { color: var(--ink); border: 1px solid var(--ink); padding: 8px 18px; }
.nav .nav-cta:hover, .nav .nav-cta[aria-current="page"] { background: var(--ink); color: var(--paper); }
.burger { display: none; background: none; border: 1px solid var(--ink); color: var(--ink); font: 500 var(--s-1)/1 var(--sans); letter-spacing: .02em; padding: 10px 16px; cursor: pointer; }
.menu { position: fixed; inset: 0; z-index: 25; background: var(--paper); display: flex; flex-direction: column; justify-content: center; gap: 6px; padding: 90px var(--gut) 40px; }
.menu[hidden] { display: none; }
.menu a { font-family: var(--serif); font-size: clamp(2rem, 8vw, 2.8rem); font-weight: 300; text-decoration: none; line-height: 1.25; }
.menu a[aria-current="page"] { font-style: italic; }

/* ------------------------------------------------ Cover */
.cover { padding: clamp(50px, 9vh, 110px) var(--gut) clamp(40px, 7vh, 80px); }
.title { font-size: var(--s4); line-height: 1.04; max-width: 16ch; margin-bottom: .55em; }
.title.long { font-size: clamp(2.2rem, 1.3rem + 2.9vw, 4rem); max-width: 20ch; }
.title a { text-decoration-thickness: 1px; text-underline-offset: 6px; }
.cover-words .text p { color: var(--soft); font-size: var(--s1); line-height: 1.6; max-width: 46ch; }
.kicker { font-size: var(--s-1); color: var(--faint); margin-bottom: 18px; letter-spacing: .02em; }
.cover-landscape { display: block; }
.cover-landscape .cover-words { max-width: 1100px; margin-bottom: clamp(36px, 6vh, 64px); display: grid; grid-template-columns: 1.15fr .85fr; gap: 6vw; align-items: end; }
.cover-landscape .cover-words .title { margin-bottom: 0; }
.cover-landscape .cover-words .text p:last-child { margin-bottom: 0; }
.cover-landscape .cover-words .actions { grid-column: 2; margin-top: 0; }
.cover-landscape .cover-ph { margin: 0 calc(var(--gut) * -1); }
.cover-landscape .cover-ph img { width: 100%; max-height: 88vh; object-fit: cover; }
.cover-portrait, .cover-square { display: grid; grid-template-columns: 1fr minmax(0, 44%); gap: clamp(30px, 6vw, 100px); align-items: end; }
.cover-portrait .cover-ph img, .cover-square .cover-ph img { width: 100%; max-height: 86vh; object-fit: cover; }
.cover-plain { max-width: 1240px; }

/* ------------------------------------------------ Layout with section rail */
.layout { padding: 0 var(--gut); }
.content { max-width: 980px; margin: 0 auto; }
.layout.has-rail { display: grid; grid-template-columns: 200px minmax(0, 980px); gap: clamp(30px, 5vw, 90px); justify-content: center; }
.layout.has-rail .content { margin: 0; }
.rail { position: sticky; top: 110px; align-self: start; padding-top: clamp(70px, 10vh, 110px); }
.rail ol { list-style: none; margin: 0; padding: 0; display: grid; gap: 10px; border-left: 1px solid var(--line); }
.rail a { display: block; padding: 0 0 0 14px; margin-left: -1px; border-left: 1px solid transparent; text-decoration: none; font-size: var(--s-1); line-height: 1.45; color: var(--faint); transition: color .25s ease, border-color .25s ease; }
.rail a:hover { color: var(--ink); }
.rail a.on { color: var(--ink); border-left-color: var(--ink); }

/* ------------------------------------------------ Sections */
.sec { padding: clamp(60px, 10vh, 120px) 0 0; }
.sec > * + * { margin-top: clamp(34px, 5.5vh, 64px); }
.sec > h2 { font-size: var(--s3); line-height: 1.12; max-width: 22ch; padding-top: 28px; border-top: 1px solid var(--line); }
.sec > h2 + * { margin-top: clamp(28px, 4vh, 44px); }
.sec > h2 a, .sec .text a, .quote a { text-decoration-thickness: 1px; text-underline-offset: 4px; }

.text { max-width: 62ch; }
.text p { color: #3b3a37; }
.text h3 { font-size: var(--s2); line-height: 1.3; margin: 1.6em 0 .6em; font-style: italic; }
.text > :first-child { margin-top: 0; }
.text > :last-child { margin-bottom: 0; }
.list { list-style: none; margin: 1em 0; padding: 0; border-top: 1px solid var(--line); }
.list li { padding: 12px 0; border-bottom: 1px solid var(--line); color: #3b3a37; }

/* ------------------------------------------------ Photos by shape */
.ph .view { display: block; cursor: zoom-in; }
.ph img { width: 100%; background: #efede8; }
.row-wide .ph { width: 100%; }
.row-single .ph { width: min(100%, 520px); }
.row-single.row-right .ph { margin-left: auto; }
.row-single.row-left .ph { margin-right: auto; }
.row-pair { display: grid; grid-template-columns: 7fr 5fr; gap: clamp(18px, 3vw, 44px); align-items: start; }
.row-pair .ph:nth-child(2) { margin-top: 22%; }
.row-three { display: grid; grid-template-columns: repeat(3, 1fr); gap: clamp(14px, 2vw, 28px); align-items: start; }
.row-three .ph:nth-child(2) { margin-top: 14%; }
.row-grid { columns: 3 220px; column-gap: 18px; }
.row-grid .ph { break-inside: avoid; margin-bottom: 18px; }

/* bands: a full-width photograph with its quote set beneath */
.band .band-ph { margin: 0 calc(var(--gut) * -1); }
.layout.has-rail .band .band-ph { margin: 0; }
.band .band-ph img { width: 100%; max-height: 80vh; object-fit: cover; }
.band .quote { margin-top: 30px; }

/* ------------------------------------------------ Words */
.quote { max-width: 760px; }
.quote blockquote { margin: 0; }
.quote blockquote p { font-family: var(--serif); font-style: italic; font-weight: 300; font-size: var(--s2); line-height: 1.42; margin: 0; text-indent: -.42em; }
.quote blockquote p::before { content: "“"; }
.quote blockquote p::after { content: "”"; }
.quote figcaption { margin-top: 16px; font-size: var(--s-1); color: var(--soft); }
.quote-feature { border-left: 1px solid var(--ink); padding-left: 28px; }
.stmt-label { font-size: var(--s-1); color: var(--faint); margin-bottom: 8px; }
.stmt-line { font-family: var(--serif); font-weight: 300; font-size: var(--s3); line-height: 1.15; margin: 0; max-width: 24ch; }
.tag { font-family: var(--serif); font-weight: 300; font-size: var(--s3); line-height: 1.2; max-width: 26ch; }

.actions { display: flex; flex-wrap: wrap; gap: 14px 26px; align-items: center; margin-top: 30px; }
.btn { display: inline-block; text-decoration: none; background: var(--ink); color: var(--paper); border: 1px solid var(--ink); font: 500 var(--s-1)/1 var(--sans); letter-spacing: .03em; padding: 16px 26px; cursor: pointer; transition: background .25s ease, color .25s ease; }
.btn:hover { background: transparent; color: var(--ink); }
.btn-quiet { background: transparent; color: var(--ink); border: 0; border-bottom: 1px solid var(--ink); padding: 4px 0; }
.btn-quiet:hover { color: var(--soft); border-bottom-color: var(--soft); }

/* journal */
.posts { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 50px 30px; }
.post { text-decoration: none; display: flex; flex-direction: column; }
.post-pic { aspect-ratio: 3 / 2; overflow: hidden; background: #efede8; margin-bottom: 16px; }
.post-pic img { width: 100%; height: 100%; object-fit: cover; transition: transform 1s var(--ease); }
.post:hover .post-pic img { transform: scale(1.03); }
.post-cat { font-size: .75rem; color: var(--faint); margin-bottom: 8px; }
.post h3 { font-size: 1.32rem; line-height: 1.3; margin-bottom: 10px; }
.post-ex { font-size: .93rem; color: var(--soft); line-height: 1.6; }
.post-go { margin-top: auto; font-size: var(--s-1); text-decoration: underline; text-underline-offset: 4px; text-decoration-thickness: 1px; }

/* reviews */
.stats { display: grid; grid-template-columns: repeat(4, 1fr); gap: 20px; margin-left: 0; margin-right: 0; border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); padding: 26px 0; }
.stats div { margin: 0; }
.stats dt { font-family: var(--serif); font-weight: 300; font-size: var(--s3); line-height: 1.1; }
.stats dd { margin: 4px 0 0; font-size: var(--s-1); color: var(--soft); }
.rvs { columns: 2 340px; column-gap: 50px; }
.rv { break-inside: avoid; padding: 26px 0; border-top: 1px solid var(--line); }
.rv-meta { font-size: var(--s-1); color: var(--soft); letter-spacing: .14em; margin-bottom: 10px; }
.rv blockquote { margin: 0; }
.rv blockquote p { margin: 0; color: #3b3a37; }
.rv details { margin-top: 12px; font-size: var(--s-1); color: var(--soft); }
.rv summary { cursor: pointer; text-decoration: underline; text-underline-offset: 3px; }

/* form */
.inquiry { display: grid; grid-template-columns: 1fr 1fr; gap: 30px 36px; max-width: 760px; }
.field { grid-column: 1 / -1; display: flex; flex-direction: column; gap: 8px; border: 0; padding: 0; margin: 0; min-width: 0; }
.field label, .field legend { font-size: var(--s-1); color: var(--soft); padding: 0; }
.field input, .field textarea { font: 400 var(--s1)/1.4 var(--sans); color: var(--ink); background: transparent; border: 0; border-bottom: 1px solid #cfccc5; padding: 8px 0 10px; border-radius: 0; width: 100%; transition: border-color .25s ease; }
.field textarea { resize: vertical; min-height: 110px; }
.field input:focus, .field textarea:focus { outline: none; border-bottom-color: var(--ink); }
.field [aria-invalid="true"] { border-bottom-color: #b3482f; }
.opts { display: flex; flex-wrap: wrap; gap: 8px; }
.opt { position: relative; cursor: pointer; }
.opt input { position: absolute; opacity: 0; }
.opt span { display: inline-block; border: 1px solid #cfccc5; padding: 8px 16px; font-size: var(--s-1); transition: background .2s, color .2s, border-color .2s; }
.opt input:checked + span { background: var(--ink); color: var(--paper); border-color: var(--ink); }
.opt input:focus-visible + span { outline: 1.5px solid var(--ink); outline-offset: 3px; }
.inquiry .btn { justify-self: start; }
.form-note { grid-column: 1 / -1; margin: 0; min-height: 1.6em; color: var(--soft); }

/* ------------------------------------------------ Footer */
.foot { margin-top: clamp(90px, 14vh, 160px); padding: 0 var(--gut) 40px; }
.foot-top { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 20px; padding: 40px 0; border-top: 1px solid var(--ink); }
.foot-mail { margin: 0; font-family: var(--serif); font-size: var(--s2); font-weight: 300; }
.foot-mail a { text-decoration: none; }
.foot-mail a:hover { text-decoration: underline; text-decoration-thickness: 1px; text-underline-offset: 6px; }
.badges { display: flex; flex-wrap: wrap; align-items: center; gap: 22px 40px; padding: 30px 0; border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); }
.badges img { height: 64px; width: auto; filter: grayscale(1); opacity: .72; transition: filter .3s, opacity .3s; }
.badges a:hover img { filter: none; opacity: 1; }
.foot-grid { display: grid; grid-template-columns: auto 1fr auto; gap: 30px 60px; align-items: start; padding: 36px 0; }
.foot-logo img { width: 120px; }
.foot-about { max-width: 56ch; color: var(--soft); margin: 0; }
.foot-links { list-style: none; margin: 0; padding: 0; display: grid; gap: 6px; font-size: var(--s-1); }
.foot-links a { text-decoration: none; }
.foot-links a:hover { text-decoration: underline; text-underline-offset: 4px; }
.foot-small { font-size: .75rem; color: var(--faint); margin: 0; }

/* ------------------------------------------------ Photo viewer */
.lb { position: fixed; inset: 0; z-index: 60; background: var(--paper); display: grid; grid-template-columns: 70px 1fr 70px; align-items: center; }
.lb[hidden] { display: none; }
.lb-fig { display: flex; flex-direction: column; align-items: center; justify-content: center; height: 100vh; padding: 60px 0 40px; }
.lb-fig img { max-width: 100%; max-height: calc(100vh - 130px); width: auto; height: auto; object-fit: contain; box-shadow: 0 30px 80px -40px rgba(0, 0, 0, .35); }
.lb-count { margin-top: 16px; font-size: var(--s-1); color: var(--soft); font-variant-numeric: tabular-nums; }
.lb button { background: none; border: 0; color: var(--ink); cursor: pointer; font: 500 var(--s-1)/1 var(--sans); }
.lb-close { position: absolute; top: 22px; right: var(--gut); padding: 10px 0; border-bottom: 1px solid var(--ink) !important; }
.lb-prev, .lb-next { height: 100%; position: relative; }
.lb-prev::before, .lb-next::before { content: ""; position: absolute; top: 50%; left: 50%; width: 16px; height: 16px; border-top: 1px solid var(--ink); border-left: 1px solid var(--ink); }
.lb-prev::before { transform: translate(-30%, -50%) rotate(-45deg); }
.lb-next::before { transform: translate(-70%, -50%) rotate(135deg); }
.lb-fig img.swap { opacity: 0; }
.lb-fig img { transition: opacity .25s ease; }

/* ------------------------------------------------ Small screens */
@media (max-width: 1100px) {
  .layout.has-rail { display: block; }
  .rail { display: none; }
  .content { max-width: 860px; }
}
@media (max-width: 900px) {
  .nav { display: none; }
  .burger { display: block; position: relative; z-index: 31; }
  .bar { padding: 14px var(--gut); }
  .logo img { width: 96px; }
  .cover-landscape .cover-words, .cover-portrait, .cover-square { grid-template-columns: 1fr; }
  .cover-landscape .cover-words .actions { grid-column: 1; }
  .cover-portrait .cover-ph, .cover-square .cover-ph { order: -1; }
  .row-pair, .row-three { grid-template-columns: 1fr; }
  .row-pair .ph:nth-child(2), .row-three .ph:nth-child(2) { margin-top: 0; }
  .row-single .ph { width: 86%; }
  .row-grid { columns: 2; column-gap: 12px; }
  .row-grid .ph { margin-bottom: 12px; }
  .stats { grid-template-columns: 1fr 1fr; }
  .inquiry { grid-template-columns: 1fr; }
  .foot-grid { grid-template-columns: 1fr; }
  .badges img { height: 48px; }
  .lb { grid-template-columns: 44px 1fr 44px; }
}
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { transition-duration: .01ms !important; }
}
