/* ==========================================================================
   Déborah Marino — ma.ri.no studio
   « Cocooning » direction: a warm room in a Hokkaido winter. Oat-milk paper,
   cocoa ink instead of black, soft lamp-light glows, sections as rounded
   cushions with stitched (dashed) seams, pillowy warm shadows, slow motion.
   Mood reference: her pastel « Slow / Winter » (pyjamas, tea, snowy window).
   Hand-made assets: /assets/ui. Photos from Instagram: /assets/ig.
   ========================================================================== */

:root {
  /* grounds */
  --paper: #f7efe4;            /* oat milk */
  --paper-2: #efe3d3;          /* linen wall for the pastels */
  --card: #fffaf3;             /* cream cushion */
  --blush: #f6dfd3;            /* peach / wool */
  --river: #e6edf3;            /* misty hydrangea */
  --cocoa-milk: #f1e3d4;       /* RAMS — milk chocolate */
  /* ink */
  --ink: #3b2f28;              /* cocoa-black */
  --ink-soft: #6f5f54;
  --line: rgba(92, 64, 45, .14);
  --stitch: rgba(92, 64, 45, .22);
  /* identity */
  --sky: #4a76b4;              /* handwriting blue — large text only */
  --sky-deep: #3d649e;         /* handwriting blue — small text */
  --hydrangea: #b7cbe8;        /* bleu tendre */
  --tomato: #b8513a;           /* softened, terracotta */
  --tomato-soft: #e8a08a;
  --leaf: #8fae7a;             /* sage */
  --lemon: #efd27a;            /* butter */
  --cocoa: #8a5a3c;            /* RAMS */
  /* type */
  --serif: 'Instrument Serif', 'Marino JP', 'Times New Roman', serif;
  --sans: 'Inter', system-ui, -apple-system, 'Segoe UI', 'Hiragino Sans', 'Noto Sans JP', sans-serif;
  --jp: 'Marino JP', 'Hiragino Mincho ProN', 'Yu Mincho', 'Noto Serif JP', serif;
  /* layout */
  --gutter: clamp(16px, 4vw, 56px);
  --inset: clamp(8px, 1.6vw, 20px);    /* gap between a cushion and the window edge */
  --max: 1280px;
  --radius: 18px;
  --radius-xl: clamp(28px, 4vw, 48px);
  --shadow: 0 18px 40px -18px rgba(110, 70, 40, .35), 0 2px 6px rgba(110, 70, 40, .06);
  --shadow-soft: 0 24px 60px -30px rgba(110, 70, 40, .35);
  --ease: cubic-bezier(.22, .8, .25, 1);
}

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

html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; overflow-x: clip; scroll-padding-top: 96px; }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }

body {
  margin: 0;
  /* lamp light (peach, top right) + snow light (blue, left) over oat paper */
  background:
    radial-gradient(70vw 60vw at 92% -10%, rgba(246, 210, 190, .55), transparent 62%),
    radial-gradient(55vw 50vw at -10% 28%, rgba(206, 222, 240, .45), transparent 65%),
    var(--paper);
  background-repeat: no-repeat;
  background-color: var(--paper);
  color: var(--ink);
  font: 400 17px/1.7 var(--sans);
  -webkit-font-smoothing: antialiased;
  overflow-x: clip;
}

/* Paper grain, fixed over everything, never intercepts clicks. */
body::before {
  content: "";
  position: fixed;
  inset: 0;
  z-index: 100;
  pointer-events: none;
  opacity: .22;
  mix-blend-mode: multiply;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='220' height='220'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.85' numOctaves='3' stitchTiles='stitch'/%3E%3CfeColorMatrix values='0 0 0 0 .5 0 0 0 0 .4 0 0 0 0 .3 0 0 0 .55 0'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
}

img { display: block; max-width: 100%; height: auto; }
a { color: inherit; }
em { font-family: var(--serif); font-style: italic; font-size: 1.08em; }
[lang="ja"] { font-family: var(--jp); }
::selection { background: var(--hydrangea); color: var(--ink); }
ul { list-style: none; margin: 0; padding: 0; }
button { font: inherit; color: inherit; }
p { text-wrap: pretty; }
h1, h2, h3, h4 { text-wrap: balance; }

.sr-only {
  position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px;
  overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0;
}
.skip {
  position: absolute; left: 12px; top: -60px; z-index: 200;
  background: var(--ink); color: var(--paper); padding: 10px 16px; border-radius: 999px;
}
.skip:focus { top: 12px; }
:focus-visible { outline: 2px dashed var(--sky-deep); outline-offset: 4px; border-radius: 6px; }

/* ---------- Shared bits ---------- */

/* A "cushion": rounded, tinted block inset from the window edge, with a
   stitched seam just inside its border. */
.hero, .river, .rams, .paintings, .about, .insta-card, .contact {
  border-radius: var(--radius-xl);
  outline: 1.5px dashed var(--stitch);
  outline-offset: calc(var(--inset) * -1 - 4px);
}

.project-num {
  display: inline-grid;
  place-items: center;
  min-width: 2.6em;
  aspect-ratio: 1;
  font: italic 400 clamp(18px, 1.6vw, 22px)/1 var(--serif);
  color: var(--sky-deep);
  background: color-mix(in srgb, var(--hydrangea) 45%, var(--card));
  border-radius: 50%;
  box-shadow: inset 0 0 0 1.5px color-mix(in srgb, currentColor 18%, transparent);
  transform: translateY(-.35em);
}
.project-meta { margin: 0 0 6px; font: italic 400 clamp(17px, 1.4vw, 19px)/1.3 var(--serif); color: var(--ink-soft); }
.project-title { margin: 0; font: 400 clamp(40px, 6vw, 84px)/1 var(--serif); letter-spacing: -.01em; }
.project-text { margin: 0 0 24px; font-size: clamp(17px, 1.35vw, 19px); max-width: 38em; }
.quote { margin: 0; font-size: 18px; color: var(--cocoa); letter-spacing: .06em; }
.section-kicker { margin: 0 0 14px; font: italic 400 22px/1 var(--serif); color: var(--tomato); }

/* Zoomable image buttons (lightbox triggers) */
.zoom {
  all: unset;
  box-sizing: border-box;          /* all: unset resets it to content-box */
  display: block;
  width: 100%;                     /* a block <button> doesn't stretch by itself */
  position: relative;
  cursor: zoom-in;
  border-radius: var(--radius);
  overflow: hidden;
  box-shadow: var(--shadow);
  transition: transform .8s var(--ease), box-shadow .8s var(--ease);
}
.zoom img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 1.2s var(--ease), filter .8s;
}
.zoom:hover { transform: translateY(-4px); box-shadow: 0 28px 50px -22px rgba(110, 70, 40, .45); }
.zoom:hover img { transform: scale(1.035); }
.zoom:focus-visible { outline: 2px dashed var(--sky-deep); outline-offset: 5px; }

/* Polaroid frame */
.polaroid {
  margin: 0;
  background: var(--card);
  padding: 4.5% 4.5% 16%;
  border-radius: 8px;
  box-shadow: var(--shadow);
}
.polaroid img { width: 100%; aspect-ratio: 3 / 4; object-fit: cover; border-radius: 4px; }

/* Sewing button (painting wall): a little fabric-covered button holding
   each card to the linen wall, two thread holes, in the card's --pin colour.
   Replaces the washi tapes, which felt too scrapbook for the cushion look. */
.piece .zoom::before {
  content: "";
  position: absolute;
  z-index: 2;
  top: -9px; left: 50%;
  width: 20px; height: 20px;
  translate: -50% 0;
  border-radius: 50%;
  background:
    radial-gradient(circle at 38% 50%, var(--ink-soft) 0 1.3px, transparent 1.8px),
    radial-gradient(circle at 62% 50%, var(--ink-soft) 0 1.3px, transparent 1.8px),
    radial-gradient(circle at 35% 30%, rgba(255, 255, 255, .55), transparent 60%),
    var(--pin, var(--hydrangea));
  box-shadow: inset 0 0 0 2.5px color-mix(in srgb, var(--pin, var(--hydrangea)) 70%, var(--ink) 12%), 0 3px 6px -2px rgba(110, 70, 40, .35);
}

/* Section title: serif, underlined by a soft hand-drawn wave (her
   handwriting blue by default, --mark to change it). */
.title-mark {
  --mark: var(--sky);
  position: relative;
  display: inline-block;
  font-style: italic;
  padding-bottom: .22em;
}
.title-mark::after {
  content: "";
  position: absolute;
  left: -4%; right: -4%; bottom: 0;
  height: .2em;
  background: var(--mark);
  opacity: .75;
  -webkit-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 200 12' preserveAspectRatio='none'%3E%3Cpath d='M3 7c22-5 38 4 60 0s40-6 62-1 46 3 72-2' fill='none' stroke='%23000' stroke-width='3.2' stroke-linecap='round'/%3E%3C/svg%3E") center / 100% 100% no-repeat;
          mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 200 12' preserveAspectRatio='none'%3E%3Cpath d='M3 7c22-5 38 4 60 0s40-6 62-1 46 3 72-2' fill='none' stroke='%23000' stroke-width='3.2' stroke-linecap='round'/%3E%3C/svg%3E") center / 100% 100% no-repeat;
}
.title-mark--tomato { --mark: var(--tomato-soft); }

/* ---------- Header: a floating pill ---------- */
.site-header {
  position: sticky;
  top: 10px;
  z-index: 50;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  margin: 10px var(--inset) 0;
  padding: 8px 10px 8px clamp(16px, 2vw, 26px);
  border-radius: 999px;
  background: color-mix(in srgb, var(--card) 70%, transparent);
  backdrop-filter: blur(14px) saturate(1.1);
  -webkit-backdrop-filter: blur(14px) saturate(1.1);
  transition: box-shadow .5s var(--ease), background .5s;
}
.site-header.is-scrolled { background: color-mix(in srgb, var(--card) 86%, transparent); box-shadow: var(--shadow-soft), 0 0 0 1px var(--line); }
.brand { display: flex; align-items: flex-end; gap: 6px; text-decoration: none; }
.brand img { width: clamp(88px, 10vw, 122px); }
.brand-studio { font: italic 400 18px/1 var(--serif); color: var(--sky-deep); padding-bottom: 6px; }
.nav { display: flex; gap: clamp(6px, 1.4vw, 16px); align-items: center; }
.nav-links { display: flex; gap: 4px; }
.nav-links a {
  display: block;
  padding: 8px 14px;
  border-radius: 999px;
  font-size: 15px;
  text-decoration: none;
  transition: background .4s var(--ease), color .3s;
}
.nav-links a:hover { background: var(--blush); color: var(--ink); }
.nav-cta {
  padding: 9px 18px;
  border-radius: 999px;
  font: italic 400 19px/1 var(--serif);
  color: var(--ink);
  text-decoration: none;
  background: var(--hydrangea);
  outline: 1.5px dashed color-mix(in srgb, var(--sky-deep) 45%, transparent);
  outline-offset: -5px;
  transition: background .4s, translate .5s var(--ease);
}
.nav-cta:hover, .nav-cta:focus-visible { background: color-mix(in srgb, var(--hydrangea) 80%, var(--sky) 20%); translate: 0 -2px; }
.nav-ig { display: grid; place-items: center; width: 42px; height: 42px; border-radius: 50%; color: var(--ink); background: var(--blush); transition: background .4s, color .4s; }
.nav-ig:hover { background: var(--hydrangea); }

/* ---------- Hero: a cream cushion, like the other sections ----------
   Two columns: her name and intro on the left; on the right her snowy
   portrait with small Japanese touches: a red sun with a brush-drawn ensō
   ring, a vertical line of text and a hanko seal. A faint seigaiha (wave)
   band fades in at the bottom-left of the cushion. --w is the portrait width. */
.hero {
  --w: clamp(190px, 19vw, 280px);
  position: relative;
  isolation: isolate;
  max-width: calc(var(--max) + var(--inset) * 2);
  margin: 10px max(var(--inset), calc((100% - var(--max)) / 2)) 28px;
  padding: clamp(48px, 7vw, 100px) var(--gutter);
  display: grid;
  grid-template-columns: minmax(0, 7fr) minmax(0, 5fr);
  gap: clamp(32px, 5vw, 80px);
  align-items: center;
  background:
    radial-gradient(55% 60% at 0% 0%, rgba(255, 255, 255, .75), transparent 70%),
    radial-gradient(50% 60% at 100% 100%, color-mix(in srgb, var(--blush) 70%, transparent), transparent 70%),
    var(--card);
}
/* seigaiha: concentric waves, tiled */
.hero::after {
  content: "";
  position: absolute;
  z-index: -1;
  left: 0; bottom: 0;
  width: 70%; height: clamp(90px, 14vw, 170px);
  border-radius: 0 0 0 var(--radius-xl);
  pointer-events: none;
  background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='40' height='20' viewBox='0 0 40 20' fill='%23fffaf3' stroke='%234a76b4' stroke-opacity='.3' stroke-width='1'%3E%3Cg id='w'%3E%3Ccircle r='20'/%3E%3Ccircle r='14' fill='none'/%3E%3Ccircle r='8' fill='none'/%3E%3C/g%3E%3Cuse href='%23w' x='20' y='-10'/%3E%3Cuse href='%23w' x='0' y='0'/%3E%3Cuse href='%23w' x='40' y='0'/%3E%3Cuse href='%23w' x='20' y='10'/%3E%3Cuse href='%23w' x='0' y='20'/%3E%3Cuse href='%23w' x='40' y='20'/%3E%3Cuse href='%23w' x='20' y='30'/%3E%3C/svg%3E") 0 0 / 40px 20px;
  -webkit-mask-image: radial-gradient(ellipse 100% 100% at 0% 100%, #000 15%, transparent 72%);
          mask-image: radial-gradient(ellipse 100% 100% at 0% 100%, #000 15%, transparent 72%);
  opacity: .8;
}
.hero-text > .flags { display: block; width: 84px; height: auto; margin: 0 0 clamp(14px, 2vw, 24px); overflow: visible; filter: drop-shadow(0 2px 3px rgba(110, 70, 40, .18)); }
.flags .f-paper { fill: var(--card); }
.flags .f-blue { fill: var(--sky); }
.flags .f-green { fill: var(--leaf); }
.flags .f-red { fill: var(--tomato); }
.flags .f-edge { fill: none; stroke: var(--card); stroke-width: 1.6; }
.hero-title {
  position: relative;
  margin: 0;
  font: 400 clamp(60px, 9.4vw, 148px)/.9 var(--serif);
  letter-spacing: -.025em;
}
.hero-title .line { display: block; padding-bottom: .06em; }
.hero-title em { font-size: 1em; color: var(--sky); }
.js .hero-title .line { animation: rise 1.4s var(--ease) both; }
.js .hero-title .line + .line { animation-delay: .14s; }
@keyframes rise { from { transform: translateY(24%); opacity: 0; filter: blur(4px); } to { transform: none; opacity: 1; filter: none; } }

/* katakana name under the title, between two hairlines */
.hero-jp {
  display: flex; align-items: center; gap: 14px;
  margin: clamp(14px, 2vw, 22px) 0 0;
  font: 400 clamp(15px, 1.3vw, 18px)/1 var(--jp);
  letter-spacing: .32em;
  color: var(--tomato);
}
.hero-jp::before, .hero-jp::after { content: ""; height: 1px; width: clamp(24px, 4vw, 56px); background: currentColor; opacity: .5; }
.hero-jp::after { width: clamp(60px, 10vw, 140px); }

/* ---- stage ---- */
.hero-stage {
  position: relative;
  width: calc(var(--w) * 1.42);
  max-width: 100%;
  margin-inline: auto;
  padding-top: calc(var(--w) * .2);
}
/* red sun + brush ring behind the portrait */
.sun {
  position: absolute;
  z-index: 0;
  right: calc(var(--w) * .02); top: 0;
  width: calc(var(--w) * .66); aspect-ratio: 1;
  border-radius: 50%;
  background: radial-gradient(circle at 35% 30%, color-mix(in srgb, var(--tomato-soft) 80%, #fff), var(--tomato-soft) 70%);
}
.enso {
  position: absolute;
  z-index: 0;
  right: calc(var(--w) * -.05); top: calc(var(--w) * -.07);
  width: calc(var(--w) * .8); aspect-ratio: 1;
  fill: none;
  stroke: var(--ink);
  stroke-width: 3.2;
  stroke-linecap: round;
  opacity: .8;
  pointer-events: none;
}
.js .enso path { stroke-dasharray: 1; stroke-dashoffset: 1; animation: draw 2.2s .5s var(--ease) forwards; }
@keyframes draw { to { stroke-dashoffset: 0; } }

.portrait {
  position: relative;
  z-index: 1;
  width: var(--w);
  margin: 0;
  padding: 10px;
  border-radius: 14px;
  background: var(--card);
  box-shadow: var(--shadow), inset 0 0 0 1px var(--line);
}
.portrait img { display: block; width: 100%; aspect-ratio: 3 / 4; object-fit: cover; border-radius: 6px; }
.js .portrait { animation: settle 1.3s var(--ease) .1s both; }
@keyframes settle { from { opacity: 0; translate: 0 -18px; } to { opacity: 1; translate: 0 0; } }

/* vertical line of Japanese beside the portrait */
.vtext {
  position: absolute;
  z-index: 1;
  right: calc(var(--w) * .06); bottom: 4px;
  margin: 0;
  writing-mode: vertical-rl;
  font: 400 clamp(12px, 1vw, 15px)/1 var(--jp);
  letter-spacing: .3em;
  color: var(--ink);
}
/* hanko seal, stamped over the photo's corner */
.hanko {
  position: absolute;
  z-index: 2;
  left: calc(var(--w) * -.07); bottom: calc(var(--w) * .1);
  display: grid; place-items: center;
  width: calc(var(--w) * .2); aspect-ratio: 1 / 1.45;
  border-radius: 6px;
  background: var(--tomato);
  color: var(--card);
  font: 500 calc(var(--w) * .075)/1.1 var(--jp);
  writing-mode: vertical-rl;
  text-orientation: upright;
  letter-spacing: .08em;
  rotate: -7deg;
  box-shadow: inset 0 0 0 3px var(--tomato), inset 0 0 0 4.5px color-mix(in srgb, var(--card) 75%, transparent), 0 6px 12px -6px rgba(110, 50, 30, .5);
  mix-blend-mode: multiply;
}
.js .hanko { animation: stamp .5s 1.1s var(--ease) both; }
@keyframes stamp { from { opacity: 0; scale: 1.7; } to { opacity: 1; scale: 1; } }

/* snow: two tiles (small flakes / big flakes), three flakes per tile at
   irregular spots so no grid shows; white with a pale-blue edge so they
   read on the white photo too. Loop = whole tiles: seamless. */
.window-snow {
  --f: #fff;
  --e: rgba(183, 203, 232, .9);
  position: absolute;
  inset: 10px;
  border-radius: 6px;
  pointer-events: none;
  background-image:
    radial-gradient(circle at 18% 22%, var(--f) 1.8px, var(--e) 2.3px, transparent 2.8px),
    radial-gradient(circle at 72% 47%, var(--f) 1.4px, var(--e) 1.9px, transparent 2.4px),
    radial-gradient(circle at 41% 86%, var(--f) 2px, var(--e) 2.5px, transparent 3px),
    radial-gradient(circle at 63% 14%, var(--f) 2.8px, var(--e) 3.4px, transparent 4px),
    radial-gradient(circle at 12% 63%, var(--f) 2.3px, var(--e) 2.9px, transparent 3.5px),
    radial-gradient(circle at 88% 79%, var(--f) 3.2px, var(--e) 3.8px, transparent 4.4px);
  background-size: 130px 130px, 130px 130px, 130px 130px, 190px 170px, 190px 170px, 190px 170px;
  background-position: 0 0;
}
.js .window-snow { animation: snow 28s linear infinite; }
@keyframes snow {
  to { background-position: 130px 520px, 130px 520px, 130px 520px, -190px 680px, -190px 680px, -190px 680px; }
}

.hero-copy { margin-top: clamp(22px, 3vw, 34px); display: flex; flex-direction: column; align-items: flex-start; }
.hero-sub { max-width: 32em; margin: 0 0 24px; font-size: clamp(17px, 1.4vw, 19px); color: var(--ink-soft); }
.hero-sub strong { font-weight: 500; color: var(--ink); }
.hero-cta { display: flex; flex-wrap: wrap; justify-content: flex-start; align-items: center; gap: 22px; }
.btn {
  display: inline-flex; align-items: center; gap: 10px;
  padding: 15px 26px;
  border-radius: 999px;
  background: var(--ink);
  color: var(--card);
  text-decoration: none;
  font-weight: 500;
  box-shadow: 0 14px 28px -14px rgba(59, 47, 40, .7);
  transition: background .4s, transform .5s var(--ease), box-shadow .5s var(--ease);
}
.btn:hover { background: var(--cocoa); transform: translateY(-3px); box-shadow: 0 20px 34px -16px rgba(138, 90, 60, .8); }
.link-ig { font: italic 400 22px/1 var(--serif); color: var(--sky-deep); text-decoration: none; background: linear-gradient(currentColor, currentColor) 0 100% / 100% 1px no-repeat; padding-bottom: 3px; transition: background-size .5s var(--ease); }
.link-ig:hover { background-size: 0 1px; background-position: 100% 100%; }

/* ---------- Ribbon (was the black marquee): a knitted, scalloped band ---------- */
.marquee {
  --band: var(--blush);
  position: relative;
  background: var(--band);
  color: var(--cocoa);
}
/* the two ribbons run in parallel behind the whole hero card (they show in
   the margins around it); the wrapper clips them. main.js sets --ribbon-angle
   so the pair enters on the left edge of the screen and leaves on the right */
.hero-wrap { position: relative; isolation: isolate; overflow: clip; padding-bottom: clamp(48px, 7vw, 96px); margin-bottom: clamp(24px, 3vw, 40px); }
.hero-wrap > .hero { z-index: 1; }
.ribbons {
  position: absolute; z-index: 0;
  top: 50%; left: 50%;
  width: 3600px;
  display: grid; gap: 36px;
  transform: translate(-50%, -50%) rotate(var(--ribbon-angle, -30deg));
  pointer-events: none;
}
.marquee--reverse { --band: var(--hydrangea); }
.marquee--reverse .marquee-track { animation-direction: reverse; animation-duration: 80s; }
.marquee--reverse .marquee-track i { color: var(--sky); }
.marquee::before, .marquee::after {
  content: "";
  position: absolute;
  left: 0; right: 0;
  height: 12px;
  background: radial-gradient(circle at 12px 12px, var(--band) 11.5px, transparent 12px) 0 0 / 24px 12px repeat-x;
}
.marquee::before { top: -12px; }
.marquee::after { bottom: -12px; background-image: radial-gradient(circle at 12px 0, var(--band) 11.5px, transparent 12px); }
.marquee > * { position: relative; }
.marquee { overflow-x: clip; overflow-y: visible; }
.marquee-track {
  display: flex; align-items: center; gap: 30px;
  width: max-content;
  padding: 16px 0;
  font: italic 400 clamp(22px, 2.6vw, 32px)/1 var(--serif);
  white-space: nowrap;
  animation: marquee 70s linear infinite;
}
.marquee-track [lang="ja"] { font-style: normal; font-size: .85em; }
.marquee-track i { font-style: normal; color: var(--tomato-soft); font-size: .7em; }
@keyframes marquee { to { transform: translateX(-50%); } }

/* ---------- Work ---------- */
.section-title { margin: 0 auto clamp(40px, 6vw, 72px); width: fit-content; font-size: clamp(36px, 4.6vw, 60px); font-weight: 400; }
.work { max-width: var(--max); margin: 0 auto; padding: 0 var(--gutter); }

/* 01 — River of Words: misty blue cushion */
.river {
  margin: 0 calc(var(--gutter) * -1) clamp(40px, 5vw, 64px);
  padding: clamp(40px, 5vw, 72px) var(--gutter) clamp(44px, 6vw, 80px);
  background:
    radial-gradient(60% 50% at 100% 0%, rgba(255, 255, 255, .6), transparent 70%),
    var(--river);
  overflow: hidden;
}
.river-head { display: flex; align-items: baseline; gap: clamp(14px, 2vw, 28px); }
.river .project-title em { display: block; color: var(--sky); font-size: .62em; margin-top: 6px; }
.river-svg { display: block; width: calc(100% + var(--gutter) * 2); height: clamp(150px, 20vw, 260px); margin: 10px calc(var(--gutter) * -1) 16px; }
.river-line { fill: none; stroke: var(--hydrangea); stroke-width: 60; stroke-linecap: round; opacity: .4; }
.river-words { font: italic 400 26px var(--serif); fill: var(--sky); }
.river-words--b { font-size: 22px; fill: var(--sky-deep); opacity: .85; }
.river-body { margin-bottom: clamp(28px, 4vw, 48px); }
.q { display: block; font-size: 1.15em; margin-bottom: 8px; }

.masonry { columns: 4 200px; column-gap: 18px; }
.masonry li { break-inside: avoid; margin-bottom: 18px; }
.masonry .zoom img { aspect-ratio: 4 / 5; }
.masonry .tall .zoom img { aspect-ratio: 3 / 4.6; }

/* 02 — RAMS: milk-chocolate cushion */
.rams {
  margin: 0 calc(var(--gutter) * -1) clamp(40px, 5vw, 64px);
  padding: clamp(40px, 5vw, 72px) var(--gutter) clamp(44px, 6vw, 80px);
  background:
    radial-gradient(50% 60% at 0% 100%, rgba(255, 250, 243, .7), transparent 70%),
    var(--cocoa-milk);
}
.rams-intro {
  display: grid;
  grid-template-columns: 1.4fr .6fr;
  gap: clamp(24px, 5vw, 72px);
  align-items: center;
  margin-bottom: clamp(32px, 5vw, 56px);
}
.rams .project-num { color: var(--cocoa); background: color-mix(in srgb, var(--lemon) 35%, var(--card)); }
.rams .project-text em { color: var(--cocoa); }
.rams-life .zoom { rotate: 3deg; }
.rams-life .zoom img { aspect-ratio: 9 / 14; }
.chapter { padding-top: clamp(22px, 3vw, 34px); margin-top: clamp(22px, 3vw, 34px); border-top: 1.5px dashed var(--stitch); }
.chapter-title { margin: 0 0 18px; font: 400 clamp(24px, 2.4vw, 32px)/1.1 var(--serif); }
.chapter-title [lang="ja"] { font-size: .55em; color: var(--ink-soft); margin-left: 8px; vertical-align: middle; }
.strip { display: grid; grid-auto-flow: column; grid-auto-columns: 1fr; gap: 18px; }
.strip .zoom img { aspect-ratio: 4 / 5; }

/* 03 — Oil pastels: a linen wall with framed cards */
.paintings {
  margin: 0 var(--inset);
  padding: clamp(64px, 9vw, 120px) var(--gutter) clamp(72px, 10vw, 140px);
  background:
    radial-gradient(40% 40% at 50% 0%, rgba(255, 250, 243, .8), transparent 70%),
    var(--paper-2);
}
.paint-head { max-width: var(--max); margin: 0 auto clamp(48px, 6vw, 80px); text-align: center; }
.paint-head .project-num { color: var(--tomato); background: color-mix(in srgb, var(--tomato-soft) 30%, var(--card)); }
.paint-title { margin: 0 0 16px; font: 400 clamp(48px, 7vw, 96px)/1 var(--serif); letter-spacing: -.01em; }
.paint-title em { display: block; font-size: .42em; color: var(--tomato); margin-top: 8px; }
.paint-sub { max-width: 38em; margin: 0 auto; color: var(--ink-soft); }
.wall {
  max-width: var(--max);
  margin: 0 auto;
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
  gap: clamp(40px, 4.5vw, 60px) clamp(20px, 3vw, 44px);
  align-items: start;
}
.piece { --pin: var(--hydrangea); transition: rotate .8s var(--ease), translate .8s var(--ease); }
.piece .zoom { padding: 9px; background: var(--card); border-radius: 8px; overflow: visible; }
.piece .zoom:hover { transform: none; }
.piece .zoom img { aspect-ratio: 4 / 5; border-radius: 4px; }
.piece .zoom:hover img { transform: none; }
.piece-label { margin: 16px 0 0; text-align: center; font: italic 400 20px/1.2 var(--serif); }
.piece-label [lang="ja"] { display: block; font-style: normal; font-size: 13px; color: var(--ink-soft); margin-top: 3px; }
.piece:hover { rotate: 0deg !important; translate: 0 -8px; }
.r1 { rotate: -2deg; } .r2 { rotate: 1.5deg; --pin: var(--lemon); } .r3 { rotate: -1deg; --pin: var(--tomato-soft); }
.r4 { rotate: 2deg; } .r5 { rotate: -1.5deg; --pin: var(--lemon); } .r6 { rotate: 1deg; --pin: var(--leaf); }
.r7 { rotate: -2deg; --pin: var(--tomato-soft); } .r8 { rotate: 1.5deg; } .r9 { rotate: -1deg; --pin: var(--lemon); }
@media (min-width: 900px) { .wall .piece:nth-child(3n+2) { margin-top: 52px; } }

/* 04 — Editions: two cream cushions */
.editions { max-width: var(--max); margin: 0 auto; padding: clamp(72px, 10vw, 130px) var(--gutter) 0; }
.ed-head { display: flex; align-items: baseline; gap: clamp(14px, 2vw, 28px); margin-bottom: clamp(28px, 4vw, 48px); }
.ed-head .project-num { color: #5d7a4a; background: color-mix(in srgb, var(--leaf) 28%, var(--card)); }
.ed-title { margin: 0; font: 400 clamp(36px, 4.6vw, 60px)/1 var(--serif); }
.ed-title em { color: var(--ink-soft); font-size: .6em; }
.ed-grid { display: grid; grid-template-columns: 1fr 1fr; gap: clamp(20px, 3vw, 40px); }
.edition {
  padding: clamp(12px, 1.4vw, 18px) clamp(12px, 1.4vw, 18px) clamp(22px, 2.4vw, 30px);
  background: var(--card);
  border-radius: clamp(26px, 3vw, 36px);
  box-shadow: var(--shadow-soft);
}
.edition .edition-cover { border-radius: clamp(16px, 2vw, 24px); box-shadow: none; }
.edition .edition-cover img { aspect-ratio: 4 / 3; }
.edition-body { padding-inline: clamp(6px, 1vw, 14px); }
.edition-body h3 { margin: 22px 0 4px; font: 400 clamp(28px, 3vw, 40px)/1 var(--serif); }
.edition-body p:not(.project-meta) { margin: 8px 0 18px; color: var(--ink-soft); }
.mini { display: flex; gap: 10px; flex-wrap: wrap; }
.mini li { width: 66px; }
.mini .zoom { border-radius: 14px; box-shadow: 0 8px 16px -10px rgba(110, 70, 40, .5); }
.mini .zoom img { aspect-ratio: 1; }

/* ---------- About: a peach blanket ---------- */
.about {
  max-width: calc(var(--max) + var(--inset) * 2);
  margin: clamp(72px, 10vw, 130px) auto;
  margin-inline: max(var(--inset), calc((100% - var(--max)) / 2));
  padding: clamp(56px, 8vw, 110px) var(--gutter);
  display: grid;
  grid-template-columns: 5fr 7fr;
  gap: clamp(32px, 6vw, 96px);
  align-items: center;
  background:
    radial-gradient(50% 60% at 100% 0%, rgba(255, 250, 243, .7), transparent 70%),
    var(--blush);
}
.about-visual { position: relative; max-width: 440px; margin-inline: auto; width: 100%; padding-bottom: 18%; }
.polaroid--about { width: 78%; rotate: -3deg; }
.about-note { position: absolute; width: 46%; right: 0; bottom: 0; rotate: 6deg; filter: drop-shadow(0 18px 26px rgba(110, 70, 40, .24)); }
.about-lead { margin: 0 0 22px; font: 400 clamp(32px, 4.2vw, 56px)/1.08 var(--serif); letter-spacing: -.01em; }
.about-copy p { max-width: 34em; }
.about-jp { color: var(--ink-soft); }
.skills { margin: 30px 0 0; display: flex; flex-wrap: wrap; gap: 8px; }
.skills li { padding: 7px 15px; border-radius: 999px; background: color-mix(in srgb, var(--card) 75%, transparent); font-size: 14px; box-shadow: 0 1px 0 rgba(110, 70, 40, .06); }

/* ---------- Instagram ---------- */
.insta { max-width: var(--max); margin: 0 auto clamp(40px, 6vw, 72px); padding: 0 var(--gutter); }
.insta-card {
  display: grid;
  grid-template-columns: minmax(0, .9fr) minmax(0, 1.1fr);
  align-items: center;
  gap: clamp(20px, 4vw, 48px);
  padding: clamp(28px, 4vw, 52px);
  background: linear-gradient(130deg, color-mix(in srgb, var(--hydrangea) 60%, var(--card)), var(--river) 55%, var(--blush));
  color: var(--ink);
  text-decoration: none;
  transition: transform .7s var(--ease), box-shadow .7s var(--ease);
}
.insta-card:hover { transform: translateY(-4px); box-shadow: var(--shadow-soft); }
.insta-text { display: grid; gap: 8px; justify-items: start; }
.insta-icon { display: grid; place-items: center; width: 64px; aspect-ratio: 1; border-radius: 50%; background: color-mix(in srgb, var(--card) 70%, transparent); color: var(--sky-deep); margin-bottom: 6px; }
.insta-title { font: 400 clamp(28px, 3.4vw, 46px)/1.05 var(--serif); }
.insta-handle { font: italic 400 clamp(20px, 2.2vw, 28px)/1 var(--serif); color: var(--sky-deep); }
.insta-sub { font-size: 15px; color: var(--ink-soft); }
.insta-strip { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; }
.insta-strip img { width: 100%; aspect-ratio: 1; object-fit: cover; border-radius: 16px; box-shadow: 0 10px 20px -12px rgba(110, 70, 40, .45); transition: transform .8s var(--ease); }
.insta-card:hover .insta-strip li:nth-child(odd) img { transform: rotate(-2deg) scale(1.03); }
.insta-card:hover .insta-strip li:nth-child(even) img { transform: rotate(2deg) scale(1.03); }

/* ---------- Contact: a letter on a cream cushion ---------- */
.contact {
  text-align: center;
  margin: 0 var(--inset) var(--inset);
  padding: clamp(72px, 11vw, 150px) var(--gutter);
  background:
    radial-gradient(60% 70% at 50% 0%, rgba(255, 255, 255, .7), transparent 70%),
    var(--river);
}
.contact .section-title { margin-bottom: clamp(28px, 4vw, 48px); }
.contact-lead { margin: 0 0 18px; font: 400 clamp(26px, 3.2vw, 42px)/1.18 var(--serif); }
.contact-lead em { color: var(--sky); font-size: 1em; }
.contact-langs { margin: 0 0 26px; font: italic 400 19px/1.3 var(--serif); color: var(--ink-soft); }
.contact-mail {
  display: inline-block;
  font: 400 clamp(28px, 5.4vw, 72px)/1.08 var(--serif);
  letter-spacing: -.015em;
  text-decoration: none;
  overflow-wrap: anywhere;
  background: linear-gradient(var(--hydrangea), var(--hydrangea)) 0 92% / 0 .28em no-repeat;
  transition: background-size .7s var(--ease), color .4s;
  padding: 0 .08em 2px;
}
.contact-mail:hover { background-size: 100% .28em; color: var(--sky-deep); }
.contact-actions { display: flex; flex-wrap: wrap; justify-content: center; gap: 12px; margin-top: 30px; }
.copy {
  display: inline-block;
  padding: 11px 20px;
  background: var(--card);
  border: 0;
  border-radius: 999px;
  font-size: 14px;
  text-decoration: none;
  cursor: pointer;
  box-shadow: 0 10px 22px -14px rgba(110, 70, 40, .55);
  transition: transform .5s var(--ease), background .3s;
}
.copy:hover { transform: translateY(-2px); background: #fff; }

/* ---------- Footer ---------- */
.site-footer {
  display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 16px;
  padding: 24px calc(var(--gutter) + var(--inset)) 32px;
  font-size: 14px;
  color: var(--ink-soft);
}
.site-footer p { margin: 0; }
.site-footer a { text-decoration: none; }
.site-footer a:hover { color: var(--ink); text-decoration: underline; text-decoration-style: wavy; text-underline-offset: 4px; }
.footer-sign { width: 90px; opacity: .8; }

/* ---------- Lightbox: dimmed lamp ---------- */
.lightbox {
  width: 100vw; height: 100dvh; max-width: none; max-height: none;
  margin: 0; padding: 0; border: 0;
  background: rgba(40, 30, 24, .93);
  color: var(--paper);
}
.lightbox[open] { display: grid; grid-template-columns: auto 1fr auto; align-items: center; animation: fade .5s var(--ease); }
@keyframes fade { from { opacity: 0; } }
.lightbox::backdrop { background: transparent; }
.lightbox figure { margin: 0; height: 100dvh; display: grid; grid-template-rows: 1fr auto; place-items: center; padding: 56px 8px 16px; min-width: 0; }
.lightbox img { max-width: 100%; max-height: calc(100dvh - 120px); object-fit: contain; border-radius: 14px; box-shadow: 0 30px 60px -20px rgba(0, 0, 0, .6); }
.lightbox figcaption { padding-top: 14px; font: italic 400 19px var(--serif); opacity: .85; text-align: center; }
.lightbox button {
  display: grid; place-items: center;
  width: 52px; height: 52px; margin: 0 clamp(6px, 2vw, 22px);
  background: rgba(255, 250, 243, .1); border: 0; border-radius: 50%;
  color: inherit; cursor: pointer;
  font: 300 34px/1 var(--sans);
  opacity: .8; transition: opacity .3s, background .3s;
}
.lightbox button:hover { opacity: 1; background: rgba(255, 250, 243, .2); }
.lb-close { position: absolute; top: 12px; right: 4px; font-size: 30px; z-index: 1; }

/* ---------- Scroll reveal (only when JS is on) ---------- */
.js .reveal { opacity: 0; transform: translateY(22px); transition: opacity 1.2s var(--ease), transform 1.2s var(--ease); }
.js .reveal.is-in { opacity: 1; transform: none; }

/* ---------- Responsive ---------- */
@media (max-width: 1000px) {
  .nav-links { display: none; }
  .strip { grid-auto-flow: row; grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 860px) {
  .hero { --w: min(260px, 52vw); grid-template-columns: 1fr; }
  .hero-stage { order: -1; }
  .rams-intro { grid-template-columns: 1fr; }
  .rams-life { max-width: 240px; }
  .ed-grid { grid-template-columns: 1fr; }
  .about { grid-template-columns: 1fr; }
  .insta-card { grid-template-columns: 1fr; }
  .river-words { font-size: 34px; }
  .river-words--b { font-size: 30px; }
}
@media (max-width: 560px) {
  body { font-size: 16px; }
  .site-header { padding-left: 16px; }
  .nav-cta { font-size: 17px; padding: 8px 15px; }
  .hero { --w: 48vw; padding-inline: 20px; }
  .hero-jp { letter-spacing: .2em; }
  .brand-studio { display: none; }
  .river, .rams { margin-inline: calc(var(--gutter) * -1 + var(--inset)); padding-inline: calc(var(--gutter) - var(--inset) + 6px); }
  .river-svg { width: calc(100% + (var(--gutter) - var(--inset) + 6px) * 2); margin-inline: calc((var(--gutter) - var(--inset) + 6px) * -1); }
  .masonry { columns: 2; column-gap: 10px; }
  .masonry li { margin-bottom: 10px; }
  .strip { display: flex; overflow-x: auto; scroll-snap-type: x mandatory; gap: 12px; margin-inline: calc((var(--gutter) - var(--inset) + 6px) * -1); padding: 4px calc(var(--gutter) - var(--inset) + 6px) 20px; scrollbar-width: none; }
  .strip li { flex: 0 0 64%; scroll-snap-align: start; }
  .wall { grid-template-columns: repeat(2, 1fr); gap: 34px 16px; }
  .piece .zoom { padding: 6px; }
  .piece-label { font-size: 16px; }
  .about { padding-inline: 20px; }
  .site-footer { justify-content: center; text-align: center; }
}

/* ---------- Reduced motion ---------- */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; }
  .js .reveal { opacity: 1; transform: none; }
  .js .enso path { stroke-dashoffset: 0; }
}
