/* ==========================================================================
   Mariko McTier site

   Colour: white, one light cream band, one burgundy (the accent colour of the
   previous site). The photographs supply every other colour.

   Type: Source Serif 4 for headings, Source Sans 3 for text, both self-hosted
   (Latin only). Japanese uses the visitor's own system fonts, which keeps the
   page small: Hiragino on Apple devices, Yu / Meiryo on Windows, Noto on Android.
   ========================================================================== */
@font-face { font-family: "Source Serif 4"; src: url(/fonts/source-serif-4.woff2) format("woff2"); font-weight: 200 900; font-style: normal; font-display: swap; }
@font-face { font-family: "Source Sans 3"; src: url(/fonts/source-sans-3.woff2) format("woff2"); font-weight: 200 900; font-style: normal; font-display: swap; }

:root {
  --bg: #ffffff;
  --tint: #faf5ec;
  --ink: #261d1c;
  --text: #4a3f3d;
  --muted: #6c5f5b;
  --rule: #ddd0bf;
  --accent: #841c26;
  --accent-dark: #550527;

  --serif: "Source Serif 4", "Hiragino Mincho ProN", "Yu Mincho", "Noto Serif CJK JP", Georgia, serif;
  --sans: "Source Sans 3", "Hiragino Kaku Gothic ProN", "Yu Gothic", Meiryo, "Noto Sans CJK JP", system-ui, sans-serif;

  --pad: clamp(1.25rem, 4vw, 2.5rem);
  --nav: 4rem;
}

*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
body { margin: 0; background: var(--bg); color: var(--text); font: 400 1.0625rem/1.65 var(--sans); -webkit-font-smoothing: antialiased; }
html[lang="ja"] body { line-height: 1.9; letter-spacing: .02em; line-break: strict; word-break: auto-phrase; }
img { display: block; max-width: 100%; height: auto; }
a { color: inherit; text-decoration: none; }
h1, h2, h3, h4, p, ul, ol, figure, blockquote { margin: 0; }
ul, ol { padding: 0; list-style: none; }
button { font: inherit; color: inherit; }
[id] { scroll-margin-top: calc(var(--nav) + 1rem); }
.work-page [id] { scroll-margin-top: calc(var(--nav) + 4rem); }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; }

/* --- Type ---------------------------------------------------------------- */
h1, h2, h3, h4 { font-family: var(--serif); font-weight: 500; color: var(--ink); line-height: 1.25; text-wrap: balance; }
h1 { font-size: clamp(2.25rem, 4.8vw, 3.9rem); line-height: 1.15; }
h2 { font-size: clamp(1.8rem, 3.2vw, 2.6rem); }
h3 { font-size: 1.55rem; }
h4 { font-size: 1.3rem; }
html[lang="ja"] h1, html[lang="ja"] h2, html[lang="ja"] h3, html[lang="ja"] h4 { line-height: 1.45; }
/* Japanese keeps slightly smaller headings: kana and kanji already look large */
html[lang="ja"] h1 { font-size: clamp(2.1rem, 4.4vw, 3.5rem); }
html[lang="ja"] h2 { font-size: clamp(1.65rem, 2.9vw, 2.35rem); }
h3.lg { font-size: clamp(1.75rem, 2.6vw, 2.15rem); }
h3.sm { font-size: 1.3rem; }
.title { margin-bottom: 1.25rem; }
h2.title { margin-bottom: clamp(2rem, 4vw, 3rem); max-width: 40rem; }

.prose { max-width: 38rem; }
.prose p + p { margin-top: 1em; }
.prose.lg { font-size: 1.15rem; }
.prose.sm { font-size: .97rem; }
.lede { font-size: 1.2rem; line-height: 1.6; max-width: 34rem; }
.role { color: var(--muted); }
.hero-name { font-family: var(--serif); font-size: 1.35rem; font-weight: 500; color: var(--ink); margin-top: 1.1rem; }
.hero-name + .role { margin-top: .35rem; }
.standfirst, .quote { font-family: var(--serif); font-size: clamp(1.4rem, 2.2vw, 1.75rem); line-height: 1.45; color: var(--ink); max-width: 40rem; }
html[lang="ja"] .standfirst, html[lang="ja"] .quote { line-height: 1.7; }
.standfirst + .standfirst { margin-top: 1rem; }
.sub { font-family: var(--serif); font-size: 1.3rem; color: var(--muted); }
.subhead { font-weight: 600; color: var(--ink); margin-bottom: .75rem; }
.muted { color: var(--muted); }
.small { font-size: .9rem; color: var(--muted); }
.cap { font-size: .875rem; color: var(--muted); margin-top: .6rem; line-height: 1.45; }
.note { margin-top: clamp(2.5rem, 5vw, 4rem); max-width: 38rem; }

/* --- Links and the one button --------------------------------------------- */
.link, .prose a, .writing a, a.who, .arch a, details.more summary { color: var(--accent); text-decoration: underline; text-decoration-thickness: 1px; text-underline-offset: .2em; }
.link:hover { color: var(--accent-dark); }
.btn { display: inline-block; background: var(--accent); color: #fff; padding: .7rem 1.25rem; border-radius: 4px; font-weight: 600; font-size: .95rem; line-height: 1.3; border: 0; cursor: pointer; }
.btn:hover { background: var(--accent-dark); }
.btn-sm { padding: .5rem 1rem; font-size: .9rem; }
.actions { display: flex; flex-wrap: wrap; align-items: center; gap: .6rem 1.5rem; margin-top: 1.5rem; }

/* --- Layout --------------------------------------------------------------- */
.wrap { width: 100%; max-width: 70rem; margin-inline: auto; padding-inline: var(--pad); }
.sec { padding-block: clamp(3.5rem, 8vw, 6.5rem); }
.sec:not(.tint) + .sec:not(.tint) { padding-top: 0; }
.tint { background: var(--tint); }
.split { display: grid; grid-template-columns: 1fr 1fr; gap: 2.5rem clamp(2rem, 6vw, 5rem); align-items: start; }
.split-a { grid-template-columns: 5fr 7fr; }
.split-b { grid-template-columns: 7fr 5fr; }
.split > * { min-width: 0; }
.mid { align-items: center; }
.stack > * + * { margin-top: 1.5rem; }
.gap-top { margin-top: clamp(2.5rem, 5vw, 4rem); }
.offer + .offer { margin-top: clamp(2rem, 4vw, 3rem); padding-top: clamp(2rem, 4vw, 3rem); border-top: 1px solid var(--rule); }
.sticky { position: sticky; top: calc(var(--nav) + 2rem); }
@media (max-width: 820px) {
  .split, .split-a, .split-b { grid-template-columns: 1fr; }
  .sticky { position: static; }
}

/* --- Nav ------------------------------------------------------------------ */
.nav { position: sticky; top: 0; z-index: 50; background: var(--bg); border-bottom: 1px solid var(--rule); }
.nav-in { height: var(--nav); display: flex; align-items: center; justify-content: space-between; gap: 1rem; }
.wordmark { font-family: var(--serif); font-size: 1.4rem; font-weight: 600; color: var(--ink); }
.nav-right { display: flex; align-items: center; gap: 1.5rem; }
.nav-links { display: flex; gap: 1.5rem; }
.nl { font-size: .95rem; padding: .25rem 0; border-bottom: 2px solid transparent; }
.nl:hover { color: var(--ink); }
.nl[aria-current="page"] { color: var(--ink); border-color: var(--accent); }
.langbtn { font-size: .95rem; color: var(--muted); padding: .25rem 0; }
.langbtn:hover { color: var(--ink); }
.menu-btn { display: none; background: none; border: 0; padding: .5rem; margin-right: -.5rem; cursor: pointer; }
.only-mobile { display: none; }
@media (max-width: 860px) {
  .nav-links { display: none; }
  .nav-cta { display: none; }
  .menu-btn { display: block; }
  .only-mobile { display: block; }
  .nav.open .nav-links { display: flex; flex-direction: column; gap: 1rem; position: absolute; top: var(--nav); left: 0; right: 0; background: var(--bg); border-bottom: 1px solid var(--rule); padding: 1.25rem var(--pad) 1.5rem; }
}

/* --- Home: hero and facts ------------------------------------------------- */
.hero { padding-block: clamp(2.5rem, 6vw, 5rem); }
/* On phones the photo comes first, above the heading */
@media (max-width: 820px) { .hero .split > figure { order: -1; } }
.facts-band { padding-block: 1.75rem; }
.facts { display: grid; grid-template-columns: repeat(auto-fit, minmax(11rem, 1fr)); gap: 1rem 2rem; }
.facts li { font-size: .95rem; line-height: 1.45; font-weight: 600; color: var(--ink); }
/* On phones: one entry per row, separated by a thin white line */
@media (max-width: 560px) {
  .facts { grid-template-columns: 1fr; gap: 0; }
  .facts li { padding-block: .75rem; }
  .facts li + li { border-top: 2px solid #fff; }
}

/* --- Photos --------------------------------------------------------------- */
.r43, .r54, .r219 { width: 100%; object-fit: cover; }
.r43 { aspect-ratio: 4 / 3; }
.r54 { aspect-ratio: 4 / 5; }
.r219 { aspect-ratio: 21 / 9; object-position: center 55%; }
.hero-img { aspect-ratio: 1 / 1; object-position: 78% 40%; }
.about-img { object-position: center 20%; }
.mymizu-img { width: 100%; }
.logo-title img { width: 11rem; }
.gallery { display: grid; grid-template-columns: 2fr 1fr; gap: 1rem; }
.gallery figure:first-child { aspect-ratio: 3 / 2; }
.gallery img { width: 100%; height: 100%; object-fit: cover; }
.gallery figure:last-child img { object-position: 61% 70%; }
@media (max-width: 820px) { .gallery { grid-template-columns: 1fr; } .gallery figure:last-child { aspect-ratio: 3 / 2; } }

/* --- Lists ---------------------------------------------------------------- */
.items { display: grid; grid-template-columns: repeat(auto-fit, minmax(15rem, 1fr)); gap: 2rem 3rem; }
.items h3, .items h4 { font-size: 1.3rem; margin-bottom: .3rem; }
.items p { font-size: .98rem; }

.orgs { display: flex; flex-wrap: wrap; gap: 0 .4em; font-family: var(--serif); font-size: 1.4rem; line-height: 1.5; color: var(--ink); }
.orgs li:not(:last-child)::after { content: ","; }

.xp li + li { margin-top: 1.1rem; }
.xp strong { display: block; font-family: var(--serif); font-weight: 500; font-size: 1.3rem; line-height: 1.3; color: var(--ink); }
.xp li > span { display: block; color: var(--muted); font-size: .95rem; }

.steps { counter-reset: s; }
.steps li { counter-increment: s; display: grid; grid-template-columns: 2rem 1fr; padding-block: .75rem; }
.steps li::before { content: counter(s); grid-row: span 2; font-weight: 600; color: var(--accent); }
.steps strong { font-family: var(--serif); font-weight: 500; font-size: 1.35rem; line-height: 1.3; color: var(--ink); }
.steps li > span { font-size: .98rem; }

.rows > li { border-top: 1px solid var(--rule); }
.rows > li:last-child { border-bottom: 1px solid var(--rule); }
.row { display: grid; grid-template-columns: 6.5rem 5fr 6fr; gap: .2rem 2rem; padding: 1rem 0; align-items: baseline; }
.row .name { font-family: var(--serif); font-size: 1.3rem; line-height: 1.3; color: var(--ink); }
a.row .name { text-decoration: underline; text-decoration-thickness: 1px; text-underline-offset: .2em; text-decoration-color: var(--accent); }
a.row:hover .name { color: var(--accent); }
@media (max-width: 640px) { .row { grid-template-columns: 1fr; } }

.writing li + li { margin-top: 2rem; }
.writing h3 { display: inline; font-size: 1.4rem; color: inherit; }
.writing-meta { font-size: .875rem; color: var(--muted); margin-top: .3rem; }
.writing-summary { max-width: 40rem; margin-top: .3rem; }

.awards li { display: flex; justify-content: space-between; gap: 1.5rem; align-items: baseline; padding: 1rem 0; border-top: 1px solid var(--rule); }
.awards li:last-child { border-bottom: 1px solid var(--rule); }
.who { font-family: var(--serif); font-size: 1.25rem; line-height: 1.3; color: var(--ink); }
.what { display: block; font-size: .95rem; color: var(--muted); }
.yr { font-size: .9rem; color: var(--muted); font-variant-numeric: tabular-nums; white-space: nowrap; }
/* EN / JP tag: same size as the year beside it, set off by a thin vertical rule (no rule when it stands alone) */
.lang { color: var(--muted); margin-left: .55em; padding-left: .6em; border-left: 1px solid var(--rule); font-weight: 500; letter-spacing: .04em; white-space: nowrap; }
.shot .lang, .arch .lang { margin-left: 0; padding-left: 0; border-left: 0; }
.cover .meta, .shot .meta { margin-top: .15rem; font-size: .85rem; color: var(--muted); }

/* --- Media ---------------------------------------------------------------- */
.shot img { width: 100%; aspect-ratio: 4 / 3; object-fit: cover; object-position: top; border: 1px solid var(--rule); background: #fff; }
.shot h3 { margin-top: .9rem; font-size: 1.4rem; }
.shot p { margin-top: .2rem; font-size: .98rem; }
.shot:hover h3, .cover a:hover h3 { color: var(--accent); }
.cover { display: grid; grid-template-columns: 1fr 1fr; gap: 1.75rem clamp(2rem, 6vw, 5rem); }
.cover a { display: block; }
.cover h3 { font-size: 1.3rem; }
.cover p { margin-top: .15rem; font-size: .97rem; }
@media (max-width: 820px) { .cover { grid-template-columns: 1fr; } }
details.more { margin-top: clamp(2.5rem, 5vw, 3.5rem); }
details.more summary { cursor: pointer; display: inline-block; }
.table-wrap { margin-top: 1.5rem; overflow-x: auto; }
.arch { width: 100%; border-collapse: collapse; font-size: .95rem; }
.arch th { text-align: left; font-weight: 600; color: var(--ink); padding: .6rem 1.25rem .6rem 0; border-bottom: 1px solid var(--ink); }
.arch td { padding: .8rem 1.25rem .8rem 0; border-bottom: 1px solid var(--rule); vertical-align: top; }
.arch td:first-child { white-space: nowrap; color: var(--muted); font-variant-numeric: tabular-nums; }
.arch td:last-child, .arch th:last-child { white-space: nowrap; padding-right: 0; }

/* --- Video (click to load) ------------------------------------------------- */
.video { position: relative; aspect-ratio: 16 / 9; background: var(--accent-dark); }
.video button { position: absolute; inset: 0; width: 100%; border: 0; background: none; color: #fff; cursor: pointer; display: flex; flex-direction: column; justify-content: flex-end; align-items: flex-start; padding: 1.25rem 1.5rem; text-align: left; }
.video img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.video button::after { content: ""; position: absolute; inset: 0; background: linear-gradient(to top, rgba(38,29,28,.8), rgba(38,29,28,0) 60%); }
.vt, .vs { position: relative; z-index: 1; }
.video button:focus-visible { outline: 3px solid #fff; outline-offset: -8px; }
.play { z-index: 1; position: absolute; top: 50%; left: 50%; transform: translate(-50%, -50%); width: 3.5rem; height: 3.5rem; border-radius: 50%; background: #fff; display: grid; place-items: center; }
.play svg { width: 1.25rem; height: 1.25rem; color: var(--accent-dark); margin-left: .15rem; }
.video button:hover .play { background: var(--tint); }
.vt { font-family: var(--serif); font-size: 1.25rem; line-height: 1.3; }
.vs { font-size: .85rem; opacity: .85; }
.video iframe { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; }

/* --- Contact form ---------------------------------------------------------- */
.form { display: grid; gap: 1.5rem; }
.field { border: 0; padding: 0; margin: 0; min-width: 0; }
.field > label, .field > legend { display: block; font-weight: 600; font-size: .95rem; color: var(--ink); margin-bottom: .4rem; padding: 0; }
.input { width: 100%; border: 1px solid #8a7b75; border-radius: 4px; background: #fff; padding: .65rem .8rem; font: inherit; color: var(--ink); }
.input:focus { outline: 2px solid var(--accent); outline-offset: 1px; border-color: var(--accent); }
textarea.input { min-height: 8rem; resize: vertical; line-height: 1.55; }
.opts { display: flex; flex-wrap: wrap; gap: .5rem 1.5rem; }
.opts label { display: flex; align-items: center; gap: .5rem; cursor: pointer; color: var(--ink); }
.opts input { accent-color: var(--accent); width: 1.05rem; height: 1.05rem; margin: 0; }
.hp { position: absolute; left: -9999px; width: 1px; height: 1px; overflow: hidden; }
.btn:disabled { opacity: .6; cursor: wait; }
.row2 { display: grid; grid-template-columns: 1fr 1fr; gap: 1.25rem; }
@media (max-width: 560px) { .row2 { grid-template-columns: 1fr; } }

/* --- Work and Impact -------------------------------------------------------- */
.work-head { padding-bottom: clamp(2.5rem, 5vw, 4rem); }
.subnav { position: sticky; top: var(--nav); z-index: 40; background: var(--bg); border-block: 1px solid var(--rule); }
.subnav ul { display: flex; gap: 1.75rem; overflow-x: auto; scrollbar-width: none; }
.subnav ul::-webkit-scrollbar { display: none; }
.subnav a { display: block; white-space: nowrap; padding: .8rem 0; font-size: .92rem; color: var(--muted); }
.subnav a:hover { color: var(--accent); }

/* --- Footer ---------------------------------------------------------------- */
.footer { border-top: 1px solid var(--rule); padding-block: 2rem; font-size: .9rem; color: var(--muted); }
.footer-in { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: center; gap: 1rem 2rem; }
.footer-links { display: flex; flex-wrap: wrap; align-items: center; gap: .5rem 1.5rem; }
.footer a:hover { color: var(--ink); }
.footer svg { width: 1.1rem; height: 1.1rem; }

@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }

/* --- Privacy policy pages --------------------------------------------------- */
.policy { max-width: 46rem; }
.policy > * + * { margin-top: 1.15rem; }
.policy h1, html[lang="ja"] .policy h1 { font-size: clamp(1.7rem, 6.2vw, 2.75rem); }
.policy .updated { color: var(--muted); font-size: .95rem; margin-top: .5rem; }
.policy h2, html[lang="ja"] .policy h2 { font-size: 1.35rem; margin-top: 2.25rem; }
.policy h2 + p { margin-top: .85rem; }
.policy ul { list-style: disc; padding-left: 1.4rem; }
.policy li + li { margin-top: .4rem; }
.policy a { color: var(--accent); text-decoration: underline; text-decoration-thickness: 1px; text-underline-offset: .2em; }
