:root {
  --gutter: clamp(18px, 3vw, 42px);
  --gap: clamp(10px, 1.15vw, 18px);
  --ink: #111;
  --muted: #777;
  --line: #c9c9c9;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
html.is-wheel-easing { scroll-behavior: auto; }
body { margin: 0; color: var(--ink); background: #fff; font-family: Inter, "Noto Sans JP", sans-serif; font-size: 13px; line-height: 1.5; }
a { color: inherit; text-decoration: none; }
img { display: block; width: 100%; height: auto; }
figure, h1, h2, p { margin: 0; }
.visually-hidden { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); }
.form-honeypot { position: absolute; left: -10000px; width: 1px; height: 1px; overflow: hidden; opacity: 0; pointer-events: none; }
.page-grid { display: grid; grid-template-columns: repeat(12, minmax(0, 1fr)); column-gap: var(--gap); padding-left: var(--gutter); padding-right: var(--gutter); }

.site-header { position: sticky; top: 0; z-index: 100; align-items: start; padding-top: 24px; padding-bottom: 18px; }
.name { grid-column: 1 / 5; display: block; width: min(178px, 100%); aspect-ratio: 446.71 / 50.19; overflow: hidden; font-size: 0; background: url("assets/iwai-logo.svg") left center / contain no-repeat; }
nav { grid-column: 9 / 13; display: flex; justify-content: flex-end; gap: clamp(24px, 3vw, 44px); }
nav a { width: fit-content; }
nav a::after, .footer-meta a::after { content: ""; display: block; width: 100%; height: 1px; background: currentColor; transform: scaleX(0); transform-origin: right; transition: transform .25s ease; }
nav a:hover::after, .footer-meta a:hover::after { transform: scaleX(1); transform-origin: left; }
nav a[aria-current="page"]::after { transform: scaleX(1); transform-origin: left; }

.page-heading { padding-top: 58px; }
.page-heading h1 { grid-column: 4 / 10; justify-self: center; padding-left: 0; font-size: 36px; font-weight: 400; letter-spacing: .035em; }
.page-heading + .works { padding-top: 40px; }

.works { padding-top: 86px; padding-bottom: 130px; row-gap: 72px; align-items: start; }
.project figure { overflow: hidden; background: #151515; }
.project img { width: 100%; height: 100%; object-fit: cover; transition: transform .7s cubic-bezier(.2,.65,.2,1), opacity .3s ease; }
.project a:hover img { transform: scale(1.012); opacity: .93; }
.caption { display: grid; grid-template-columns: 1fr auto; gap: 12px; padding-top: 9px; border-top: 1px solid var(--ink); margin-top: 10px; }
.caption h2 { font-size: 12px; font-weight: 400; letter-spacing: .015em; }
.caption span { color: var(--muted); font-size: 11px; }

.project--reel,
.project--disk,
.project--pillar,
.project--equal,
.project--light { grid-column: 3 / 11; }

.project figure { aspect-ratio: 3 / 2; }
.project--reel img { object-position: 50% 48%; }
.project--disk img { object-position: 50% 50%; }
.project--equal img { object-position: 50% 50%; }
.project--pillar img { object-position: 50% 63%; }
.project--light img { object-position: 50% 50%; }

.about { padding-top: 28px; padding-bottom: 180px; border-top: 1px solid var(--line); align-items: start; }
.about > h2 { grid-column: 1 / 3; font-size: 13px; font-weight: 400; }
.portrait { grid-column: 4 / 7; }
.profile { grid-column: 8 / 13; display: grid; grid-template-columns: 1fr 3fr; gap: var(--gap); }
.profile-name { line-height: 1.65; }
.profile-bio { max-width: 44em; color: #444; line-height: 1.9; text-align: justify; text-justify: inter-character; }

footer { min-height: 82vh; padding-top: 30px; padding-bottom: 26px; color: #eee; background: #111; grid-template-rows: auto 1fr auto; }
footer > h2 { grid-column: 1 / 3; font-size: 13px; font-weight: 400; }
.email { grid-column: 3 / 11; align-self: center; justify-self: center; font-size: clamp(29px, 5.4vw, 74px); letter-spacing: -.045em; border-bottom: 1px solid #777; }
.footer-meta { grid-column: 1 / 13; align-self: end; display: grid; grid-template-columns: 1fr 1fr auto; color: #888; font-size: 11px; }
.footer-meta a { width: fit-content; }
.simple-footer { min-height: 0; padding-top: 42px; padding-bottom: 42px; color: var(--muted); background: #fff; border-top: 1px solid var(--line); }
.simple-footer span { grid-column: 1 / 7; justify-self: start; font-size: 11px; }
.simple-footer .footer-instagram { grid-column: 7 / 13; justify-self: end; width: fit-content; color: var(--ink); font-size: 11px; }
.simple-footer .footer-instagram::after { content: ""; display: block; width: 100%; height: 1px; background: currentColor; transform: scaleX(0); transform-origin: right; transition: transform .25s ease; }
.simple-footer .footer-instagram:hover::after { transform: scaleX(1); transform-origin: left; }

.newsletter-dock { position: fixed; right: var(--gutter); bottom: var(--newsletter-bottom, 20px); z-index: 20; display: grid; justify-items: end; font-size: 12px; transition: bottom .18s cubic-bezier(.2, .65, .2, 1); }
.newsletter-prompt { position: relative; width: min(360px, calc(100vw - 36px)); padding: 24px; border: 1px solid #111; border-radius: 0; background: #fff; box-shadow: none; }
.newsletter-prompt[hidden] { display: none; }
.newsletter-prompt-text { display: block; margin: 0 28px 20px 0; font-size: 14px; line-height: 1.9; }
.newsletter-trigger { display: block; width: 100%; padding: 12px 18px; border: 1px solid #111; border-radius: 999px; color: #fff; background: #111; font: inherit; cursor: pointer; transition: color .2s ease, background .2s ease; }
.newsletter-trigger:hover { color: #111; background: #fff; }
.newsletter-dismiss { position: absolute; top: 16px; right: 16px; padding: 0; border: 0; color: #111; background: none; font: 20px/1 Inter, sans-serif; cursor: pointer; }
.newsletter-panel { width: min(360px, calc(100vw - 36px)); padding: 22px 24px 18px; border: 1px solid #111; border-radius: 0; color: #111; background: #fff; box-shadow: none; }
.newsletter-panel[hidden] { display: none; }
.newsletter-head { display: flex; align-items: center; justify-content: space-between; gap: 20px; margin-bottom: 12px; }
.newsletter-copy { line-height: 1.7; }
.newsletter-close { padding: 0; border: 0; color: #111; background: none; font: 19px/1 Inter, sans-serif; cursor: pointer; }
.newsletter-form { display: grid; grid-template-columns: 1fr auto; border-bottom: 1px solid #777; }
.newsletter-form input { min-width: 0; padding: 10px 0; border: 0; outline: 0; color: #111; background: transparent; font: inherit; }
.newsletter-form input::placeholder { color: #777; }
.newsletter-form button { padding: 10px 0 10px 18px; border: 0; color: #111; background: transparent; font: inherit; cursor: pointer; }
.newsletter-form button:disabled { cursor: wait; opacity: .45; }
.newsletter-status { min-height: 1.5em; margin-top: 10px; color: #aaa; font-size: 10px; }
.newsletter-privacy { margin-top: 5px; color: #888; font-size: 9px; line-height: 1.6; }
.newsletter-privacy a { border-bottom: 1px solid #bbb; }

@media (max-width: 700px) {
  .page-grid { grid-template-columns: repeat(6, minmax(0, 1fr)); }
  .site-header { padding-top: 18px; padding-bottom: 15px; }
  .name { grid-column: 1 / 3; width: min(120px, 100%); }
  nav { grid-column: 3 / 7; gap: clamp(14px, 4vw, 24px); }
  nav a { font-size: 11px; justify-self: end; }
  .page-heading { padding-top: 64px; }
  .page-heading h1 { grid-column: 1 / 7; font-size: 30px; }
  .page-heading + .works { padding-top: 35px; }
  .works { padding-top: 70px; padding-bottom: 100px; row-gap: 78px; }
  .project--reel, .project--disk, .project--equal, .project--pillar, .project--light { grid-column: 1 / 7; }
  .caption { margin-top: 7px; padding-top: 7px; }
  .about { padding-bottom: 110px; row-gap: 50px; }
  .about > h2 { grid-column: 1 / 7; }
  .portrait { grid-column: 1 / 4; }
  .profile { grid-column: 1 / 7; grid-template-columns: 1fr; align-self: start; }
  .profile-bio { text-align: left; }
  footer { min-height: 68vh; }
  footer > h2 { grid-column: 1 / 7; }
  .email { grid-column: 1 / 7; font-size: 8vw; }
  .footer-meta { grid-column: 1 / 7; grid-template-columns: 1fr auto; row-gap: 16px; }
  .footer-meta span { grid-column: 1 / -1; }
  .simple-footer span { grid-column: 1 / 5; white-space: nowrap; }
  .simple-footer .footer-instagram { grid-column: 5 / 7; }
  .newsletter-dock { position: static; right: auto; bottom: auto; z-index: auto; display: block; width: 100%; padding: 44px 18px; border-top: 1px solid var(--line); transition: none; }
  .newsletter-prompt { width: 100%; padding: 0; border: 0; }
  .newsletter-prompt-text { max-width: 28em; margin: 0 32px 18px 0; font-size: 12px; line-height: 1.8; }
  .newsletter-trigger { width: auto; min-width: 132px; padding: 9px 24px; font-size: 11px; }
  .newsletter-dismiss { top: 0; right: 0; }
  .newsletter-panel { width: 100%; padding: 0; border: 0; }
}

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