:root {
  --bg: #133621;
  --surface: #1a4429;
  --ink: #f4d96c;
  --muted: #b3a55e;
  --accent: #f4d96c;
  --accent-ink: #133621;
  --scrim: rgba(8, 22, 13, 0.82);

  --font: "Chivo", "Noto Sans JP", "Hiragino Sans", sans-serif;
  --step-small: clamp(0.8125rem, 0.79rem + 0.1vw, 0.875rem);
  --step-body: clamp(1.0625rem, 1rem + 0.25vw, 1.1875rem);
  --step-lead: clamp(1.25rem, 1.1rem + 0.7vw, 1.625rem);
  --step-display: clamp(2rem, 0.5rem + 3.4vw, 3.6rem);

  --margin: clamp(16px, 2.2vw, 32px);
  --ease: cubic-bezier(.2, .7, .2, 1);
}

* { box-sizing: border-box; margin: 0; padding: 0; }
html { background: var(--bg); color-scheme: dark; }
body {
  background: var(--bg);
  color: var(--ink);
  font-family: var(--font);
  font-size: var(--step-body);
  line-height: 1.5;
  letter-spacing: -0.01em;
  -webkit-font-smoothing: antialiased;
  word-break: auto-phrase;
}
img { display: block; max-width: 100%; }
a { color: inherit; }
:focus-visible { outline: 3px solid var(--ink); outline-offset: 3px; }

/* ---------- hero: card over a dim room ---------- */
.hero {
  position: relative;
  height: 100svh;
  min-height: 640px;
  display: grid;
  place-items: center;
  overflow: hidden;
  isolation: isolate;
}
.hero__photo {
  position: absolute; inset: 0;
  width: 100%; height: 100%;
  object-fit: cover;
  object-position: 30% 55%;
  filter: brightness(0.62) saturate(0.85);
  z-index: -1;
  animation: drift 24s var(--ease) both;
}
@keyframes drift { from { transform: scale(1.08); } to { transform: scale(1); } }

.hero__card {
  width: min(56vw, 860px);
  min-height: 56svh;
  background: var(--surface);
  padding: 32px;
  display: flex;
  flex-direction: column;
  gap: 32px;
  animation: rise .9s var(--ease) .15s both;
}
.hero__title {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  font-size: var(--step-display);
  font-weight: 900;
  line-height: 1;
  letter-spacing: -0.03em;
}
.hero__title span { white-space: nowrap; }
.hero__body { display: grid; gap: 24px; flex: 1; align-content: start; }
.hero__facts { font-size: var(--step-lead); font-weight: 700; line-height: 1.45; }
.hero__lead { font-size: var(--step-lead); line-height: 1.5; max-width: 30ch; }
.hero__foot {
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: end;
  gap: 24px;
}
.hero__credit { font-size: var(--step-small); color: var(--muted); line-height: 1.5; }
.hero__credit a { color: var(--muted); }
.hero__link { justify-self: end; font-weight: 700; text-underline-offset: 4px; }
.hero__link:hover { text-decoration-thickness: 2px; }

.button {
  display: inline-flex; align-items: center; justify-content: center;
  min-height: 52px; padding: 0 28px;
  background: var(--accent); color: var(--accent-ink);
  font-weight: 700; text-decoration: none;
  transition: transform .2s var(--ease), background-color .2s var(--ease);
}
.button:hover { transform: translateY(-2px); background: #f8e48f; }
.button:active { transform: translateY(0) scale(.98); }

/* ---------- work: full panels, one midline row ---------- */
.work { position: relative; }
.work__pin {
  position: absolute;
  inset: 0;
  padding: calc(50svh - 45px) 0;
  z-index: 2;
  pointer-events: none;
}
.work__pin .pin-row {
  position: sticky;
  top: calc(50svh - 45px);
  transform: none;
}
.js .panel .panel__row { position: absolute; width: 1px; height: 1px; min-height: 0; padding: 0; overflow: hidden; clip-path: inset(50%); }
.no-js .work__pin { display: none; }
.panel {
  position: relative;
  height: 100svh;
  overflow: hidden;
  background: var(--surface);
}
.panel img {
  width: 100%; height: 100%;
  object-fit: cover;
  object-position: var(--pos);
  transform: scale(1.3);
  transform-origin: var(--pos);
}
.panel--light img { transform: none; }
.panel__row {
  position: absolute;
  left: 0; right: 0;
  top: 50%;
  transform: translateY(-50%);
  min-height: 90px;
  padding: 0 var(--margin);
  background: var(--scrim);
  display: grid;
  grid-template-columns: 10% 1fr auto;
  align-items: center;
  gap: 24px;
}
.panel__when, .panel__fact { font-size: var(--step-small); color: var(--ink); }
.panel__title {
  font-size: var(--step-lead);
  font-weight: 900;
  letter-spacing: -0.02em;
  line-height: 1.2;
}
.pin-row > * { opacity: 0; transform: translateY(20px); }
.pin-row.is-in > * { opacity: 1; transform: none; transition: opacity .5s var(--ease), transform .5s var(--ease); }
.pin-row.is-in > :nth-child(2) { transition-delay: .07s; }
.pin-row.is-in > :nth-child(3) { transition-delay: .14s; }
.panel img { transition: transform 1.2s var(--ease); }
.panel.is-in img { transform: scale(1.22); }
.panel--light.is-in img { transform: scale(1.03); }

.work__note {
  position: relative;
  background: var(--bg);
  padding: 24px var(--margin) 160px;
  font-size: var(--step-small);
  color: var(--muted);
}

@keyframes rise { from { opacity: 0; transform: translateY(24px); } to { opacity: 1; transform: none; } }


/* ---------- pick: どの手作業を減らしたいか（選ぶ仕掛け） ---------- */
.pick {
  padding: 200px var(--margin) 200px;
  display: grid;
  grid-template-columns: repeat(12, 1fr);
  column-gap: 24px;
  row-gap: 32px;
}
.pick > * { grid-column: 2 / 12; }
.pick__title { font-size: var(--step-display); font-weight: 900; line-height: 1.1; letter-spacing: -0.03em; }
.pick__lead { font-size: var(--step-lead); }
.pick__choices { display: flex; flex-wrap: wrap; gap: 12px; }
.chip {
  font: inherit; font-weight: 700;
  min-height: 52px; padding: 0 22px;
  border: 0; cursor: pointer;
  background: var(--surface); color: var(--ink);
  transition: transform .2s var(--ease), background-color .2s var(--ease), color .2s var(--ease);
}
.chip:hover { transform: translateY(-2px); background: #22543a; }
.chip:active { transform: scale(.98); }
.chip[aria-pressed="true"] { background: var(--accent); color: var(--accent-ink); }
.pick__results { min-height: 340px; }
.case[hidden] { display: none; }
.case { background: var(--surface); padding: clamp(24px, 3vw, 48px); display: grid; gap: 28px; }
.js .case { opacity: 0; transform: translateY(16px); }
.js .case.is-in { opacity: 1; transform: none; transition: opacity .45s var(--ease), transform .45s var(--ease); }
.case__name { font-size: var(--step-lead); font-weight: 900; }
.case__cols { display: grid; grid-template-columns: 1fr 1fr; gap: 40px; }
.case__cols p { font-size: var(--step-lead); line-height: 1.5; }
.case__cols .case__key { font-size: var(--step-small); color: var(--ink); font-weight: 700; margin-bottom: 8px; }
.case__near { font-size: var(--step-body); }
.case__near a, .pick__more a { font-weight: 700; text-underline-offset: 4px; }
.pick__more { font-size: var(--step-body); }

/* ---------- steps: 一つの動詞ずつ ---------- */
.step { position: relative; height: 130svh; background: var(--bg); }
.step__stage { position: sticky; top: 0; height: 100svh; overflow: hidden; display: grid; place-items: center; }
.step img {
  position: absolute; inset: 0; width: 100%; height: 100%;
  object-fit: cover;
  filter: brightness(0.45) saturate(0.7);
  transform: scale(1.08);
  transition: transform 2.4s var(--ease);
}
.step.is-in img { transform: scale(1); }
.step__verb {
  position: relative;
  font-size: clamp(96px, 17vw, 300px);
  font-weight: 900; line-height: 1; letter-spacing: -0.04em;
  color: var(--ink);
}
.step__verb span { display: block; }
.js .step__verb span { opacity: 0; transform: translateY(32px); }
.js .step.is-in .step__verb span { opacity: 1; transform: none; transition: opacity .8s var(--ease), transform .8s var(--ease); }
.step__text {
  position: absolute; left: var(--margin); bottom: var(--margin);
  max-width: 30ch;
  padding: 18px 22px;
  background: var(--scrim);
  font-size: var(--step-body);
}

/* ---------- about: 横の事実と広い段落 ---------- */
.about { padding: 200px var(--margin); display: grid; gap: 120px; }
.about__row { display: grid; grid-template-columns: 34% 1fr; column-gap: 0; }
.about__facts { display: grid; gap: 20px; align-content: start; width: 200px; }
.about__facts dt { font-size: var(--step-small); color: var(--muted); }
.about__facts dd { font-size: var(--step-body); font-weight: 700; }
.about__text { font-size: var(--step-lead); line-height: 1.6; max-width: 34em; }
.about__row--lists { grid-template-columns: 34% 300px 364px; column-gap: 0; }
.about__row--lists .about__list + .about__list { margin-left: 64px; }
.about__word { font-size: var(--step-small); font-weight: 700; }
.about__list { list-style: none; display: grid; gap: 12px; align-content: start; }
.about__list li { display: flex; justify-content: space-between; gap: 16px; font-size: var(--step-body); }
.about__list li span:last-child { color: var(--muted); font-size: var(--step-small); align-self: center; }

/* ---------- contact: 写真の上の名刺 ---------- */
.contact { position: relative; height: 100svh; min-height: 680px; overflow: hidden; }
.contact__photo {
  position: absolute; inset: 0; width: 100%; height: 100%;
  object-fit: cover; object-position: 50% 70%;
  filter: brightness(0.6) saturate(0.8);
}
.contact__card {
  position: absolute; top: 60px; right: 60px;
  width: 400px;
  background: var(--surface);
  padding: 32px 32px 0;
  display: grid; gap: 20px;
}
.contact__title { font-size: var(--step-lead); font-weight: 400; }
.contact__where { font-size: var(--step-body); }
.contact__hours { display: grid; gap: 8px; }
.contact__hours div { display: flex; justify-content: space-between; font-size: var(--step-body); font-variant-numeric: tabular-nums; }
.contact__hours dt { color: var(--muted); }
.contact__how { font-size: var(--step-body); }
.contact__button { margin: 0 -32px; width: calc(100% + 64px); }

/* ---------- footer: 1行だけ ---------- */
.footer {
  padding: 30svh var(--margin) 30px;
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: baseline;
  gap: 24px;
  font-size: var(--step-small);
}
.footer__what { color: var(--muted); }
.footer__links { display: flex; gap: 24px; }
.footer__links a { font-weight: 700; text-underline-offset: 4px; }
.footer__year { justify-self: end; color: var(--muted); }
.credits { grid-column: 1 / -1; color: var(--ink); font-size: var(--step-body); line-height: 1.7; max-width: 70ch; }

.js .reveal { opacity: 0; transform: translateY(24px); }
.js .reveal.is-in { opacity: 1; transform: none; transition: opacity .7s var(--ease), transform .7s var(--ease); }
.js .pick__lead.reveal.is-in, .js .about__text.reveal.is-in { transition-delay: .08s; }
.js .pick__choices.reveal.is-in, .js .about__list.reveal.is-in { transition-delay: .16s; }

/* ---------- tablet ---------- */
@media (max-width: 1100px) {
  .hero__card { width: min(86vw, 720px); }
  .hero__title { font-size: 5.4vw; }
  .hero__foot { grid-template-columns: auto 1fr; }
  .hero__credit { grid-column: 1 / -1; order: 1; }
  .about__row--lists { grid-template-columns: 34% 1fr 1fr; }
  .about__row--lists .about__list + .about__list { margin-left: 32px; }
}

/* ---------- phone ---------- */
@media (max-width: 760px) {
  .hero__card {
    width: calc(100% - 32px);
    min-height: 70svh;
    padding: 24px;
    gap: 24px;
  }
  :root { --step-display: 9.4vw; }
  .hero__title {
    flex-wrap: wrap;
    justify-content: flex-start;
    gap: 0 .35em;
    font-size: var(--step-display);
  }
  .hero__facts, .hero__lead { font-size: var(--step-lead); }
  .hero__foot { grid-template-columns: 1fr; align-items: start; gap: 16px; }
  .hero__foot .button { order: -1; width: 100%; }
  .hero__link { justify-self: start; }

  .panel { height: 82svh; }
  .work__pin { display: none; }
  .js .panel .panel__row { position: absolute; width: auto; height: auto; min-height: 0; overflow: visible; clip-path: none; padding: 14px 16px; }
  .panel img { object-position: var(--pos-sm); }
  .panel__row {
    top: auto; bottom: 20px; transform: none;
    grid-template-columns: 1fr auto;
    grid-template-areas: "title title" "when fact";
    gap: 6px 16px;
    padding: 14px 16px;
  }
  .panel__title { grid-area: title; }
  .panel__when { grid-area: when; }
  .panel__fact { grid-area: fact; text-align: right; }

  .pick { padding: 120px 16px; row-gap: 24px; }
  .pick > * { grid-column: 1 / -1; }
  .chip { flex: 1 1 calc(50% - 6px); padding: 10px 12px; font-size: var(--step-body); }
  .case__cols { grid-template-columns: 1fr; gap: 20px; }
  .case__cols p { font-size: var(--step-body); }

  .step { height: 115svh; }
  .step__verb { font-size: 24vw; }
  .step__text { left: 16px; right: 16px; bottom: 16px; max-width: none; }

  .about { padding: 120px 16px; gap: 64px; }
  .about__row, .about__row--lists { grid-template-columns: 1fr; row-gap: 32px; }
  .about__text { order: -1; }
  .about__facts { width: auto; grid-template-columns: 1fr 1fr; }
  .about__row--lists { row-gap: 24px; }
  .about__row--lists .about__list + .about__list { margin-left: 0; }
  .about__word { font-size: var(--step-body); }

  .contact { height: auto; min-height: 0; padding-bottom: 24px; }
  .contact__photo { position: relative; height: 70svh; }
  .contact__card { position: relative; top: auto; right: auto; width: auto; margin: -80px 16px 0; }
  .contact__button { min-height: 56px; }

  .footer { grid-template-columns: 1fr; gap: 8px; padding: 20svh 16px 24px; }
  .footer__links { flex-wrap: wrap; gap: 8px 20px; }
  .footer__year { justify-self: start; }
}

@media (prefers-reduced-motion: reduce) {
  .hero__photo, .hero__card { animation: none; }
  .pin-row > *, .pin-row.is-in > * { transition: none; opacity: 1; transform: none; }
  .panel img { transition: none; }
  .button, .chip { transition: none; }
  .js .reveal, .js .case, .js .step__verb span { opacity: 1; transform: none; transition: none; }
  .step img { transition: none; transform: none; }
}
