:root {
  --paper: #fff;
  --ink: #050505;
  --muted: rgba(5,5,5,.58);
  --font: "Hiragino Sans", "Hiragino Kaku Gothic ProN", "Hiragino Kaku Gothic Pro", -apple-system, BlinkMacSystemFont, "Helvetica Neue", Arial, sans-serif;
  --edge: 24px;
  --content: 760px;
}

* { box-sizing: border-box; }
html {
  background: var(--paper);
  color: var(--ink);
  scroll-behavior: smooth;
  scroll-snap-type: y proximity;
}
body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: var(--font);
  font-weight: 300;
  font-synthesis: none;
  -webkit-font-smoothing: antialiased;
  text-rendering: geometricPrecision;
}
a { color: inherit; text-decoration: none; }
a:focus-visible { outline: 1px solid currentColor; outline-offset: 4px; }
img { display: block; max-width: 100%; height: auto; }
figure, p, h1, h2 { margin: 0; }

/* ---------------------------------------------------------
   OPENING: exactly two card-like steps.
   --------------------------------------------------------- */
.opening-page {
  min-height: 100svh;
  height: 100svh;
  position: relative;
  overflow: hidden;
  background: var(--paper);
  scroll-snap-align: start;
  scroll-snap-stop: always;
}

/* Front face — kept identical to the accepted v0.5/v0.6 composition. */
.jp-mark {
  position: absolute;
  left: 50%;
  top: 68.5%;
  transform: translate(-50%, -50%);
  display: flex;
  flex-direction: row;
  gap: .08em;
  align-items: flex-start;
  font-size: clamp(31px, 9.7vw, 46px);
  line-height: .88;
  font-weight: 800;
  letter-spacing: -.075em;
}
.jp-mark span {
  writing-mode: vertical-rl;
  text-orientation: upright;
  white-space: nowrap;
}
.jp-mark .family { order: 2; }
.jp-mark .given { order: 1; }

/* Intro: one centered body of copy, then a separate control group. */
.intro-panel {
  position: absolute;
  left: 50%;
  top: 60%;
  transform: translate(-50%, -50%);
  width: min(calc(100% - 64px), 390px);
  text-align: center;
}
.intro-text {
  margin: 0 auto;
  max-width: 350px;
  font-size: clamp(14px, 3.7vw, 16px);
  line-height: 1.38;
  letter-spacing: -.025em;
}
.intro-buttons {
  width: min(100%, 316px);
  margin: 42px auto 0;
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 9px;
}
.intro-buttons a,
.action-button {
  min-height: 42px;
  border: 1px solid var(--ink);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 9px 12px 8px;
  text-align: center;
  font-size: 13px;
  line-height: 1.1;
  letter-spacing: -.015em;
  font-weight: 400;
  background: var(--paper);
  transition: background-color .14s ease, color .14s ease, opacity .14s ease;
}
.intro-buttons a:hover,
.intro-buttons a:focus-visible,
.action-button:hover,
.action-button:focus-visible {
  background: var(--ink);
  color: var(--paper);
}
.intro-buttons a:active,
.action-button:active { opacity: .56; }

/* ---------------------------------------------------------
   CONTENT: continuous flow. White space remains deliberate,
   but every scroll position reads as part of a page.
   --------------------------------------------------------- */
.content-section {
  position: relative;
  padding: 104px var(--edge) 124px;
  scroll-margin-top: 24px;
}
.content-section + .content-section { padding-top: 118px; }

.section-header,
.subsection-header,
.project-inner,
.contact-inner {
  width: min(100%, 520px);
  margin: 0 auto;
  text-align: center;
}
.eyebrow {
  margin-bottom: 20px;
  font-size: 10px;
  line-height: 1.1;
  text-transform: uppercase;
  letter-spacing: .06em;
  font-weight: 500;
}
.section-header h2,
.project-inner h2,
.contact-inner h2 {
  margin: 0;
  font-size: clamp(18px, 5vw, 25px);
  line-height: 1.12;
  letter-spacing: -.035em;
  font-weight: 400;
}
.section-header > a,
.section-header > p:not(.eyebrow) {
  display: block;
  margin-top: 4px;
  font-size: 14px;
  line-height: 1.22;
  letter-spacing: -.02em;
}
.section-header > p:last-child { margin-top: 12px; }

.work-stream {
  width: min(100%, var(--content));
  margin: 92px auto 0;
}
.work-item {
  width: 100%;
  margin: 0 auto 92px;
  text-align: center;
}
.work-item:last-child { margin-bottom: 0; }
.work-item img { margin: 0 auto; object-fit: contain; }
.portrait-item img { width: min(76vw, 470px); }
.narrow-item img { width: min(68vw, 400px); }
.landscape-item img { width: min(88vw, 720px); }
.work-item figcaption {
  margin-top: 14px;
  font-size: 12px;
  line-height: 1.28;
  letter-spacing: -.015em;
  text-align: center;
}
.work-item figcaption span { display: block; }

.digitals-block {
  width: min(100%, var(--content));
  margin: 136px auto 0;
  padding-top: 0;
}
.subsection-header { margin-bottom: 54px; }
.subsection-header .eyebrow { margin-bottom: 8px; }
.subsection-header p:last-child {
  font-size: 13px;
  line-height: 1.2;
  letter-spacing: -.02em;
}
.digitals-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px;
  align-items: start;
}
.digitals-grid img { width: 100%; }
.digitals-grid figcaption {
  margin-top: 9px;
  font-size: 11px;
  line-height: 1.2;
  text-align: center;
}

/* Projects are compact sections rather than empty full-height cards. */
.text-project,
.morfa-section,
.contact-section {
  border-top: 1px solid rgba(5,5,5,.12);
}
.project-description {
  margin: 9px auto 0;
  font-size: 14px;
  line-height: 1.3;
  letter-spacing: -.02em;
}
.project-inner .action-button {
  width: min(100%, 260px);
  margin: 34px auto 0;
}
.morfa-object {
  width: min(58vw, 320px);
  margin: 54px auto 0;
}
.morfa-object img { width: 100%; }

.contact-section { padding-bottom: calc(112px + env(safe-area-inset-bottom)); }
.contact-links {
  width: min(100%, 316px);
  margin: 36px auto 0;
  display: grid;
  grid-template-columns: repeat(2, minmax(0,1fr));
  gap: 9px;
}
.line-id {
  margin-top: 34px;
  font-size: 13px;
  line-height: 1.2;
  letter-spacing: -.02em;
}
.site-address {
  margin-top: 6px;
  font-size: 13px;
  line-height: 1.2;
  letter-spacing: -.02em;
}

@media (max-width: 380px) {
  .intro-panel { width: calc(100% - 48px); }
  .intro-buttons { width: 100%; }
  .content-section { padding-left: 20px; padding-right: 20px; }
}

@media (min-width: 700px) {
  :root { --edge: 42px; --content: 900px; }
  .jp-mark {
    top: 69%;
    font-size: clamp(40px, 3.15vw, 58px);
    gap: .03em;
  }
  .intro-panel {
    top: 61%;
    width: min(42vw, 500px);
  }
  .intro-text { font-size: clamp(15px, 1.15vw, 18px); max-width: 440px; }
  .intro-buttons { width: 350px; margin-top: 48px; gap: 10px; }
  .intro-buttons a, .action-button { min-height: 44px; font-size: 13px; }

  .content-section { padding-top: 132px; padding-bottom: 158px; }
  .content-section + .content-section { padding-top: 150px; }
  .work-stream { margin-top: 112px; }
  .work-item { margin-bottom: 120px; }
  .portrait-item img { width: min(31vw, 470px); }
  .narrow-item img { width: min(27vw, 400px); }
  .landscape-item img { width: min(52vw, 760px); }
  .digitals-block { margin-top: 170px; }
  .digitals-grid { gap: 20px; width: min(72vw, 760px); margin: 0 auto; }
  .morfa-object { width: min(22vw, 330px); }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .intro-buttons a, .action-button { transition: none; }
}
