/* IWAI photo gallery. Builds on iwai-home.css. The photographs carry the page. */

html { scroll-padding-top: 132px; }
body.gallery { background: var(--ink); }
body.gallery .wrap { max-width: 1480px; }

/* Opening photograph */
.g-hero { position: relative; display: flex; align-items: flex-end; min-height: min(82vh, 56vw); background: var(--ink) center 42% / cover no-repeat; color: #fff; }
.g-hero::after { content: ""; position: absolute; inset: 0; background: linear-gradient(180deg, rgba(15, 15, 16, 0) 38%, rgba(15, 15, 16, .62) 72%, var(--ink) 100%); }
.g-hero .wrap { position: relative; z-index: 1; width: 100%; padding-bottom: 28px; }
.g-hero .eyebrow { color: var(--gold-light); }
.g-hero h1 { margin: 14px 0 12px; font-size: clamp(2.2rem, 5.2vw, 4.4rem); font-weight: 300; line-height: 1.05; letter-spacing: -.022em; }
.g-hero h1 strong { font-weight: 900; color: var(--gold); }
.g-hero p:last-child { font-size: clamp(1rem, 1.4vw, 1.15rem); font-weight: 300; color: #e4e1d8; }
@media (max-width: 760px) { .g-hero { min-height: 74vw; background-position: center top; } .g-hero::after { background: linear-gradient(180deg, rgba(15, 15, 16, 0) 12%, rgba(15, 15, 16, .78) 70%, var(--ink) 100%); } .g-hero .wrap { padding-top: 90px; } }

/* Day links, which stay in reach while scrolling */
.days { position: sticky; top: 69px; z-index: 9; background: rgba(15, 15, 16, .94); backdrop-filter: blur(10px); border-bottom: 1px solid var(--line-dark); }
.days .wrap { display: flex; align-items: center; justify-content: space-between; gap: 12px 28px; min-height: 52px; }
.days nav { display: flex; gap: 26px; }
.days a { padding: 14px 0 12px; border-bottom: 2px solid transparent; color: #c9c6bc; font-size: .92rem; text-decoration: none; transition: color .2s ease, border-color .2s ease; }
.days a:hover { color: #fff; }
.days a.on { border-color: var(--gold); color: #fff; }
.days span { color: #8f8d85; font-size: .85rem; }
@media (max-width: 640px) { .days { top: 0; position: static; } .days span { display: none; } html { scroll-padding-top: 76px; } }

/* A day of the workshop */
.day { padding: 72px 0 8px; color: #fff; }
.day-head { display: flex; align-items: baseline; gap: 18px; padding-bottom: 14px; border-bottom: 1px solid var(--line-dark); }
.day-head h2 { font-size: clamp(1.9rem, 3.6vw, 3rem); font-weight: 300; letter-spacing: -.015em; line-height: 1.1; }
.day-head span { color: var(--gold); font-size: .95rem; }
.session { margin-top: 44px; }
.session h3 { margin-bottom: 14px; color: #e4e1d8; font-size: 1.02rem; font-weight: 700; }
.session h3 small { margin-left: 8px; color: #8f8d85; font-size: .85rem; font-weight: 400; }

/* Rows that keep each photograph's own shape */
.rows { --h: 248px; display: flex; flex-wrap: wrap; gap: 5px; }
.rows::after { content: ""; flex-grow: 100000; }
.rows button { position: relative; display: block; padding: 0; border: 0; overflow: hidden; background: var(--ink-2); cursor: zoom-in; }
.rows button i { display: block; }
.rows img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; display: block; transition: opacity .25s ease; }
.rows button:hover img { opacity: .82; }
.rows button:focus-visible { outline: 2px solid var(--gold); outline-offset: 2px; }
@media (max-width: 760px) { .rows { --h: 150px; gap: 3px; } .session { margin-top: 32px; } .day { padding-top: 52px; } }

/* Invitation to add community photographs */
.add { margin-top: 88px; color: #fff; }
.add .wrap { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 22px 48px; padding-top: 40px; }
.add .wrap::before { content: ""; flex: 0 0 100%; height: 0; margin-top: -40px; border-top: 1px solid var(--line-dark); }
.add h2 { font-size: clamp(1.5rem, 2.6vw, 2.1rem); font-weight: 300; letter-spacing: -.012em; }
.add p { margin-top: 6px; color: #c9c6bc; }
.uses.after-add { margin-top: 72px; }

/* Using the photographs */
.uses { margin-top: 96px; padding: 80px 0; background: #fff; color: var(--text); }
.uses h2 { margin-top: 14px; font-size: clamp(1.7rem, 3vw, 2.5rem); font-weight: 300; letter-spacing: -.015em; }
.terms { margin-top: 36px; display: grid; grid-template-columns: repeat(3, 1fr); gap: 0 40px; border-top: 1px solid var(--text); }
.terms div { padding-top: 20px; }
.terms b { display: block; margin-bottom: 8px; font-size: 1.06rem; }
.terms p { color: var(--muted); font-size: .98rem; line-height: 1.6; }
.sponsors { margin-top: 64px; padding-top: 24px; border-top: 1px solid var(--line); }
.sponsors p { color: var(--muted); font-size: .9rem; }
.sponsors div { display: flex; flex-wrap: wrap; align-items: center; gap: 20px 44px; margin-top: 18px; }
.sponsors img { display: block; height: 38px; width: auto; }
@media (max-width: 800px) { .uses { margin-top: 64px; padding: 56px 0; } .terms { grid-template-columns: 1fr; border-top: 0; } .terms div { margin-bottom: 8px; border-top: 1px solid var(--line); padding: 16px 0; } }

/* Viewer */
.lb { position: fixed; inset: 0; z-index: 50; display: none; flex-direction: column; background: #0a0a0b; color: #fff; }
.lb.open { display: flex; }
.lb-stage { position: relative; flex: 1; min-height: 0; display: flex; align-items: center; justify-content: center; padding: 20px 76px 12px; }
.lb-stage img { max-width: 100%; max-height: 100%; object-fit: contain; display: block; }
.lb button { font: inherit; }
.lb-nav, .lb-close { position: absolute; border: 0; background: none; color: #d8d5cb; cursor: pointer; transition: color .2s ease; }
.lb-nav:hover, .lb-close:hover { color: var(--gold-light); }
.lb-nav { top: 50%; width: 64px; height: 88px; transform: translateY(-50%); font-size: 2.4rem; font-weight: 300; }
.lb-prev { left: 6px; } .lb-next { right: 6px; }
.lb-close { top: 10px; right: 14px; z-index: 1; padding: 6px 10px; font-size: .9rem; }
.lb-info { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 8px 32px; padding: 14px 28px 18px; border-top: 1px solid var(--line-dark); font-size: .93rem; }
.lb-info b { font-weight: 700; }
.lb-info span { margin-left: 12px; color: #a9a79f; }
.lb-acts { display: flex; gap: 24px; }
.lb-acts a, .lb-acts button { padding: 0; border: 0; background: none; color: var(--gold-light); font-size: .93rem; text-decoration: none; cursor: pointer; }
.lb-acts a:hover, .lb-acts button:hover { color: #fff; }
.toast { position: fixed; bottom: 70px; left: 50%; z-index: 60; padding: 8px 16px; background: var(--gold); color: var(--ink); font-size: .9rem; opacity: 0; transform: translateX(-50%); transition: opacity .2s ease; pointer-events: none; }
.toast.show { opacity: 1; }
@media (max-width: 640px) { .lb-stage { padding: 44px 0 8px; } .lb-nav { display: none; } .lb-info { padding: 12px 18px 16px; } .lb-info span { display: block; margin: 2px 0 0; } }

@media (prefers-reduced-motion: reduce) { .rows img, .days a { transition: none; } }
