@charset "UTF-8";

/* =========================================================
   Nanami Makita — Portfolio
   Base tokens
   ========================================================= */
:root {
  --bg:        #F8F7F3;
  --bg-sunk:   #F2F1EB;
  --text:      #222222;
  --text-sub:  #6B6B6B;
  --rule:      #DEDDD8;
  --rule-soft: #E8E7E1;

  --accent:      #7A6A55;
  --accent-soft: rgba(122, 106, 85, 0.10);

  --font-sans: "Inter", "Noto Sans JP", -apple-system, BlinkMacSystemFont,
               "Hiragino Kaku Gothic ProN", "Yu Gothic", Meiryo, sans-serif;
  --font-hand: "Yomogi", "Inter", "Noto Sans JP", sans-serif;

  --measure: 720px;
  --wide:    1080px;

  --space-section: clamp(4rem, 9vw, 7.5rem);
}

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

html {
  -webkit-text-size-adjust: 100%;
  scroll-behavior: smooth;
}
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { animation-duration: .001ms !important; transition-duration: .001ms !important; }
}

body {
  margin: 0;
  background-color: var(--bg);
  color: var(--text);
  font-family: var(--font-sans);
  font-size: 1rem;
  line-height: 2;
  letter-spacing: .035em;
  font-feature-settings: "palt" 1;
  overflow-x: hidden;
}

/* Very light paper grain — kept far below the text so it never
   interferes with reading. */
body::before {
  content: "";
  position: fixed;
  inset: 0;
  z-index: -1;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='180' height='180'%3E%3Cfilter id='g'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='3' stitchTiles='stitch'/%3E%3CfeColorMatrix type='saturate' values='0'/%3E%3C/filter%3E%3Crect width='180' height='180' filter='url(%23g)'/%3E%3C/svg%3E");
  background-repeat: repeat;
  background-size: 180px 180px;
  opacity: .04;
  mix-blend-mode: multiply;
  pointer-events: none;
}

img { max-width: 100%; height: auto; display: block; }
figure { margin: 0; }

a { color: inherit; }
a:focus-visible,
button:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 3px;
  border-radius: 2px;
}

::selection { background: var(--accent-soft); }

/* =========================================================
   Layout helpers
   ========================================================= */
.wrap {
  width: min(100% - 2.5rem, var(--wide));
  margin-inline: auto;
}
.measure {
  width: min(100%, var(--measure));
}
.prose > * + * { margin-top: 1.5em; }
.prose p { margin: 0; }

.skip-link {
  position: absolute;
  left: -9999px;
  top: 0;
  background: var(--text);
  color: var(--bg);
  padding: .75rem 1.25rem;
  z-index: 100;
}
.skip-link:focus {
  left: 1rem;
  top: 1rem;
}

/* =========================================================
   Header / navigation
   ========================================================= */
.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: rgba(248, 247, 243, .92);
  backdrop-filter: blur(8px);
  border-bottom: 1px solid var(--rule);
}
.site-header__inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  min-height: 3.75rem;
  padding-block: .5rem;
}
.site-header__home {
  font-family: var(--font-hand);
  font-size: 1.05rem;
  letter-spacing: .06em;
  text-decoration: none;
  white-space: nowrap;
}
.site-header__home:hover { color: var(--accent); }

.site-nav ul {
  display: flex;
  flex-wrap: wrap;
  gap: clamp(.9rem, 3vw, 2rem);
  margin: 0;
  padding: 0;
  list-style: none;
}
.site-nav a {
  display: inline-block;
  font-size: .8125rem;
  letter-spacing: .14em;
  line-height: 1.6;
  text-decoration: none;
  color: var(--text-sub);
  padding-block: .35rem;
  border-bottom: 1px solid transparent;
}
.site-nav a:hover,
.site-nav a:focus-visible { color: var(--text); border-bottom-color: var(--accent); }

@media (max-width: 480px) {
  .site-header__inner { flex-direction: column; align-items: flex-start; gap: .25rem; }
  .site-nav ul { gap: 1.1rem; }
}

/* =========================================================
   Shared section furniture
   ========================================================= */
.section { padding-block: var(--space-section); }
.section--tight { padding-block: clamp(2.5rem, 6vw, 4rem); }

.rule-heading {
  display: flex;
  align-items: center;
  gap: 1rem;
  margin: 0 0 clamp(2rem, 5vw, 3.25rem);
  font-family: var(--font-hand);
  font-size: clamp(1.35rem, 3.6vw, 1.75rem);
  font-weight: 400;
  letter-spacing: .12em;
  line-height: 1.4;
}
.rule-heading::after {
  content: "";
  flex: 1;
  height: 0;
  border-top: 1px dashed var(--rule);
}

/* Small section heading used inside case studies */
.block { margin-top: clamp(3.25rem, 7vw, 5rem); }
.block-title {
  margin: 0 0 1.25rem;
  font-size: .9375rem;
  font-weight: 700;
  letter-spacing: .16em;
  line-height: 1.6;
  color: var(--accent);
  display: flex;
  align-items: center;
  gap: .75rem;
}
.block-title::before {
  content: "";
  width: 1.75rem;
  height: 2px;
  background: currentColor;
  flex: none;
}

/* Key sentence — the one line that carries the section */
.key {
  margin: 0;
  font-size: clamp(1.1875rem, 2.6vw, 1.5rem);
  font-weight: 500;
  line-height: 1.85;
  letter-spacing: .02em;
  color: var(--text);
}
.key--quote {
  border-left: 3px solid var(--accent);
  padding: .25rem 0 .25rem 1.5rem;
}
.key + .prose { margin-top: 1.75rem; }
.prose + .key { margin-top: 1.75rem; }
.key em {
  font-style: normal;
  font-weight: 700;
  box-shadow: inset 0 -.45em 0 var(--accent-soft);
}

/* slightly stronger opening paragraph inside a block */
.para-lead {
  font-size: clamp(1.03125rem, 1.8vw, 1.125rem);
  font-weight: 500;
  line-height: 1.95;
}

.note {
  font-size: .875rem;
  line-height: 1.9;
  color: var(--text-sub);
}

/* =========================================================
   TOP — hero
   ========================================================= */
.hero {
  padding-block: clamp(3rem, 8vw, 6rem) clamp(3rem, 8vw, 5rem);
}
.hero__inner {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 340px);
  gap: clamp(2rem, 6vw, 4rem);
  align-items: center;
}
.hero__name {
  margin: 0;
  font-family: var(--font-hand);
  font-weight: 400;
  line-height: 1.35;
  letter-spacing: .06em;
}
.hero__name-ja { display: block; font-size: clamp(2.35rem, 8vw, 3.5rem); }
.hero__name-en { display: block; font-size: clamp(1.5rem, 5vw, 2.25rem); letter-spacing: .04em; }

.hero__facts {
  margin: clamp(1.75rem, 4vw, 2.5rem) 0 0;
  display: grid;
  gap: .4rem;
  font-size: 1rem;
}
.hero__facts div { display: flex; flex-wrap: wrap; gap: .4rem 1rem; }
.hero__facts dt {
  font-weight: 700;
  letter-spacing: .1em;
  color: var(--text-sub);
  font-size: .875rem;
  min-width: 6.5em;
  line-height: 2;
}
.hero__facts dd { margin: 0; }

.hero__photo img {
  width: 100%;
  border-radius: 2px;
}

@media (max-width: 760px) {
  .hero__inner { grid-template-columns: 1fr; }
  .hero__photo { max-width: 260px; }
}

/* =========================================================
   TOP — work list
   ========================================================= */
.works { display: grid; gap: clamp(3rem, 8vw, 5.5rem); }

.work-card {
  display: block;
  text-decoration: none;
  color: inherit;
  border-top: 1px solid var(--rule);
  padding-top: clamp(1.75rem, 4vw, 2.5rem);
}
.work-card__inner {
  display: grid;
  grid-template-columns: minmax(0, 1.15fr) minmax(0, 1fr);
  gap: clamp(1.5rem, 5vw, 3.5rem);
  align-items: center;
}
.work-card:nth-child(even) .work-card__figure { order: 2; }

.work-card__figure {
  background: var(--bg-sunk);
  border: 1px solid var(--rule-soft);
  overflow: hidden;
  min-height: 190px;
  display: grid;
  place-items: center;
}
.work-card__figure img {
  width: auto;
  max-width: 100%;
  height: auto;
  max-height: 480px;
  transition: transform .4s ease;
}
.work-card__figure--contain {
  background: #FFFFFF;
  padding: clamp(1rem, 3vw, 2.25rem);
}
.work-card:hover .work-card__figure img { transform: scale(1.02); }

.work-card__index {
  font-size: .8125rem;
  letter-spacing: .2em;
  color: var(--text-sub);
}
.work-card__title {
  margin: .4rem 0 .35rem;
  font-family: var(--font-hand);
  font-size: clamp(1.6rem, 4.5vw, 2.15rem);
  font-weight: 400;
  line-height: 1.3;
  letter-spacing: .05em;
}
.work-card__cat {
  margin: 0 0 1rem;
  font-size: .8125rem;
  letter-spacing: .08em;
  color: var(--text-sub);
  line-height: 1.8;
}
.work-card__desc { margin: 0; font-size: .9375rem; line-height: 1.95; }
.work-card__more {
  display: inline-block;
  margin-top: 1.25rem;
  font-size: .8125rem;
  letter-spacing: .12em;
  color: var(--accent);
  border-bottom: 1px solid currentColor;
  padding-bottom: 2px;
}
.work-card:hover .work-card__more { opacity: .7; }

@media (max-width: 760px) {
  .work-card__inner { grid-template-columns: 1fr; }
  .work-card:nth-child(even) .work-card__figure { order: 0; }
}

/* =========================================================
   TOP — about / contact
   ========================================================= */
.about__inner {
  display: grid;
  grid-template-columns: minmax(0, 240px) minmax(0, 1fr);
  gap: clamp(1.75rem, 5vw, 3.5rem);
  align-items: start;
}
.about__photo img { width: 100%; border-radius: 2px; }
.about__ruby {
  margin: 0;
  font-size: .8125rem;
  letter-spacing: .3em;
  color: var(--text-sub);
}
.about__name {
  margin: .25rem 0 1.75rem;
  font-family: var(--font-hand);
  font-size: clamp(1.6rem, 4.5vw, 2rem);
  font-weight: 400;
  letter-spacing: .08em;
}
@media (max-width: 680px) {
  .about__inner { grid-template-columns: 1fr; }
  .about__photo { max-width: 200px; }
}

.contact__mail {
  display: inline-block;
  margin-top: .75rem;
  font-size: clamp(1.0625rem, 3vw, 1.35rem);
  letter-spacing: .04em;
  text-decoration: none;
  border-bottom: 1px solid var(--rule);
  padding-bottom: .35rem;
  word-break: break-all;
}
.contact__mail:hover { border-bottom-color: var(--accent); color: var(--accent); }

/* =========================================================
   Case study — header
   ========================================================= */
.case-hero { padding-block: clamp(2rem, 5vw, 3.5rem) 0; }
.case-hero__figure {
  background: var(--bg-sunk);
  border: 1px solid var(--rule-soft);
  overflow: hidden;
}
.case-hero__figure img { width: 100%; }
/* keep a small source image from being upscaled too far */
.case-hero__figure--cap { max-width: 820px; margin-inline: auto; }
.case-hero__figure--pad {
  background: #FFFFFF;
  padding: clamp(1.5rem, 5vw, 3.5rem);
}
.case-hero__figure--poster {
  background: transparent;
  border: none;
  display: grid;
  place-items: center;
}
.case-hero__figure--poster img {
  width: auto;
  max-height: min(78vh, 780px);
  max-width: 100%;
  border: 1px solid var(--rule-soft);
}

.case-head { padding-block: clamp(2.25rem, 6vw, 3.5rem) 0; }
.case-head__title {
  margin: 0;
  font-family: var(--font-hand);
  font-size: clamp(2.1rem, 7vw, 3.1rem);
  font-weight: 400;
  line-height: 1.25;
  letter-spacing: .05em;
}
.case-head__cat {
  margin: .75rem 0 0;
  font-size: .875rem;
  letter-spacing: .08em;
  color: var(--text-sub);
  line-height: 1.8;
}
.case-head__lead { margin-top: clamp(2rem, 5vw, 2.75rem); }

/* =========================================================
   Case study — definition rows (ターゲット / 課題 / 目的 …)
   ========================================================= */
.facts {
  margin: 0;
  border-top: 1px solid var(--rule);
}
.facts__row {
  display: grid;
  grid-template-columns: 9.5rem minmax(0, 1fr);
  gap: 0 clamp(1rem, 3vw, 2.5rem);
  padding-block: clamp(1.25rem, 3vw, 1.75rem);
  border-bottom: 1px solid var(--rule);
}
.facts__row dt {
  font-size: .875rem;
  font-weight: 700;
  letter-spacing: .12em;
  line-height: 2.1;
  color: var(--accent);
}
.facts__row dd { margin: 0; }
.facts__row dd > * + * { margin-top: 1.1em; }
.facts__row dd p { margin: 0; }
@media (max-width: 640px) {
  .facts__row { grid-template-columns: 1fr; gap: .35rem; }
  .facts__row dt { line-height: 1.8; }
}

/* meta block at the foot of a case study */
.meta { margin-top: clamp(3rem, 7vw, 4.5rem); }
.meta .facts__row dd { font-size: .9375rem; }

/* =========================================================
   Figures, captions, galleries
   ========================================================= */
.fig { margin-top: clamp(1.75rem, 4vw, 2.5rem); }
.fig__cap {
  margin-top: .75rem;
  font-size: .8125rem;
  line-height: 1.8;
  color: var(--text-sub);
  letter-spacing: .04em;
}
.fig__frame {
  display: block;
  background: var(--bg-sunk);
  border: 1px solid var(--rule-soft);
  overflow: hidden;
}
.fig__frame--white { background: #FFFFFF; }
.fig__frame--pad { padding: clamp(1rem, 3vw, 2rem); }
/* fixed-ratio box so sibling captions line up */
.fig__frame--box {
  display: block;
  aspect-ratio: 5 / 3;
  padding: clamp(.75rem, 2vw, 1.5rem);
}
.fig__frame--box img { width: 100%; height: 100%; object-fit: contain; }

/* a screenshot shown through a fixed window, top-aligned */
.shot {
  display: block;
  aspect-ratio: var(--ar, 9 / 19);
  overflow: hidden;
  background: var(--bg-sunk);
  border: 1px solid var(--rule-soft);
}
.shot img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: top center;
}
a.shot:hover { border-color: var(--accent); }

/* step flow: numbered screens with connectors */
.flow {
  display: grid;
  grid-template-columns: repeat(var(--cols, 4), minmax(0, 1fr));
  gap: clamp(1rem, 2.5vw, 1.75rem);
  margin-top: clamp(1.75rem, 4vw, 2.5rem);
}
.flow__item { position: relative; margin: 0; }
.flow__step {
  display: flex;
  align-items: baseline;
  gap: .5rem;
  margin-bottom: .6rem;
  font-size: .8125rem;
  letter-spacing: .12em;
  color: var(--accent);
  font-weight: 700;
}
.flow__num {
  display: inline-grid;
  place-items: center;
  width: 1.5rem;
  height: 1.5rem;
  border: 1px solid currentColor;
  border-radius: 50%;
  font-size: .6875rem;
  line-height: 1;
  flex: none;
}
.flow__cap {
  margin-top: .65rem;
  font-size: .8125rem;
  line-height: 1.75;
  color: var(--text-sub);
}
@media (min-width: 641px) {
  .flow__step { min-height: 3.4em; align-items: flex-start; }
}
@media (min-width: 861px) {
  .flow__item:not(:last-child)::after {
    content: "";
    position: absolute;
    top: 45%;
    right: calc(clamp(1rem, 2.5vw, 1.75rem) / -2 - 4px);
    width: 8px;
    height: 8px;
    border-top: 1px solid var(--rule);
    border-right: 1px solid var(--rule);
    transform: rotate(45deg);
  }
}
.flow--five { --cols: 5; }
@media (max-width: 1000px) { .flow--five { grid-template-columns: repeat(3, minmax(0, 1fr)); } }
@media (max-width: 860px) { .flow { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 640px) { .flow--five { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 420px) { .flow { grid-template-columns: 1fr; } }

/* before / after comparison */
.compare {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto minmax(0, 1fr);
  align-items: start;
  gap: clamp(1rem, 3vw, 2rem);
  margin-top: clamp(1.75rem, 4vw, 2.5rem);
}
.compare__arrow {
  align-self: center;
  font-size: 1.5rem;
  line-height: 1;
  color: var(--rule);
  user-select: none;
}
.compare figure { margin: 0; }
.compare__label {
  display: inline-block;
  margin-bottom: .6rem;
  font-size: .8125rem;
  font-weight: 700;
  letter-spacing: .12em;
  color: var(--text-sub);
}
.compare__label--after { color: var(--accent); }
@media (max-width: 720px) {
  .compare { grid-template-columns: 1fr; }
  .compare__arrow { transform: rotate(90deg); justify-self: center; }
}

/* generic gallery grid */
.grid {
  display: grid;
  grid-template-columns: repeat(var(--cols, 3), minmax(0, 1fr));
  gap: clamp(1rem, 3vw, 2rem);
  margin-top: clamp(1.75rem, 4vw, 2.5rem);
}
@media (max-width: 720px) { .grid { grid-template-columns: 1fr; } }

.grid--two { --cols: 2; }
@media (max-width: 600px) { .grid--two { grid-template-columns: 1fr; } }

/* side-by-side text + image */
.split {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 300px);
  gap: clamp(1.25rem, 4vw, 2.5rem);
  align-items: center;
  margin-top: clamp(1.5rem, 4vw, 2rem);
}
.split--sym { grid-template-columns: minmax(0, 1fr) minmax(0, 190px); }
.split--top { align-items: start; }
@media (max-width: 680px) {
  .split, .split--sym { grid-template-columns: 1fr; }
  .split figure { max-width: 320px; }
}

/* steps shown as a vertical progression (logo process) */
.steps { margin-top: clamp(1.75rem, 4vw, 2.5rem); }
.steps__arrow {
  display: block;
  text-align: center;
  color: var(--rule);
  font-size: 1.35rem;
  line-height: 1;
  margin-block: clamp(1.25rem, 3vw, 2rem);
}
.steps__label {
  font-size: .8125rem;
  font-weight: 700;
  letter-spacing: .12em;
  color: var(--text-sub);
  margin-bottom: .6rem;
}
.steps__label--final { color: var(--accent); }
.steps__mid {
  margin: 0;
  text-align: center;
  font-size: clamp(1rem, 2.4vw, 1.25rem);
  font-weight: 700;
  letter-spacing: .08em;
  line-height: 1.7;
  color: var(--accent);
}

/* =========================================================
   PREV / NEXT
   ========================================================= */
.pager {
  margin-top: clamp(3.5rem, 8vw, 6rem);
  border-top: 1px solid var(--rule);
  display: grid;
  grid-template-columns: 1fr 1fr;
}
.pager__link {
  display: block;
  padding: clamp(1.5rem, 4vw, 2.25rem) 0;
  text-decoration: none;
  color: inherit;
}
.pager__link + .pager__link { border-left: 1px solid var(--rule); padding-left: clamp(1rem, 3vw, 2rem); }
.pager__link--next { text-align: right; }
.pager__dir {
  display: block;
  font-size: .8125rem;
  letter-spacing: .2em;
  color: var(--text-sub);
}
.pager__title {
  display: block;
  margin-top: .35rem;
  font-family: var(--font-hand);
  font-size: clamp(1.05rem, 3vw, 1.4rem);
  letter-spacing: .04em;
}
.pager__link:hover .pager__title { color: var(--accent); }
.pager__link[aria-disabled="true"] { opacity: .35; pointer-events: none; }

/* =========================================================
   Footer
   ========================================================= */
.site-footer {
  border-top: 1px solid var(--rule);
  margin-top: clamp(3rem, 8vw, 5rem);
  padding-block: clamp(2rem, 5vw, 3rem);
}
.site-footer__inner {
  display: flex;
  flex-wrap: wrap;
  gap: 1rem 2rem;
  align-items: baseline;
  justify-content: space-between;
  font-size: .8125rem;
  color: var(--text-sub);
  letter-spacing: .08em;
}
.site-footer a { text-decoration: none; }
.site-footer a:hover { color: var(--text); }

/* =========================================================
   Per-work accent colours
   ========================================================= */
.theme-sorajikan {
  --accent: #2E6FA8;
  --accent-soft: rgba(46, 111, 168, .10);
}
.theme-roomcoffee {
  --accent: #8A6636;
  --accent-soft: rgba(138, 102, 54, .10);
}
.theme-soco {
  --accent: #B04F17;
  --accent-soft: rgba(176, 79, 23, .10);
}
.theme-tomoshibi {
  --accent: #96601B;
  --accent-soft: rgba(150, 96, 27, .10);
}
