:root {
  --paper: #f8f3ea;
  --cream: #fffdf7;
  --sand: #efe5d6;
  --ink: #332c27;
  --muted: #74675c;
  --deep: #3a3028;
  --terracotta: #b15d3d;
  --green: #4d6f5c;
  --line: #e0d3c1;
  --white: #fff9ee;
  --max: 1248px;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
  scroll-padding-top: 104px;
}

body {
  margin: 0;
  color: var(--ink);
  background: var(--paper);
  font-family: "Noto Sans JP", "Yu Gothic", "Hiragino Kaku Gothic ProN", Meiryo, sans-serif;
  line-height: 1.8;
}

img {
  max-width: 100%;
  display: block;
}

a {
  color: inherit;
  text-decoration: none;
}

.site-header {
  position: fixed;
  inset: 0 0 auto;
  z-index: 20;
  height: 90px;
  display: grid;
  grid-template-columns: 260px 1fr 132px;
  align-items: start;
  padding: 24px clamp(24px, 6vw, 96px) 0;
  color: #fff;
  transition: background 0.3s ease, backdrop-filter 0.3s ease;
}

.site-header.is-scrolled {
  background: rgba(58, 48, 40, 0.72);
  backdrop-filter: blur(12px);
}

.brand img {
  width: 158px;
}

.brand {
  display: flex;
  align-items: center;
  min-height: 44px;
}

.nav {
  justify-self: end;
  display: flex;
  align-items: center;
  gap: 40px;
  margin-right: 28px;
  min-height: 44px;
  font-size: 12px;
  line-height: 1;
  letter-spacing: 0;
  color: rgba(255, 255, 255, 0.82);
}

.header-contact {
  display: inline-flex;
  justify-content: center;
  align-items: center;
  min-height: 44px;
  border: 1px solid rgba(255, 255, 255, 0.35);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.12);
  font-size: 12px;
  line-height: 1;
  color: rgba(255, 255, 255, 0.92);
}

.hero {
  min-height: 100svh;
  position: relative;
  overflow: hidden;
  color: #fff;
  display: flex;
  align-items: center;
}

.hero-bg {
  position: absolute;
  inset: -8vh 0;
  background:
    linear-gradient(90deg, rgba(51, 34, 25, 0.84), rgba(51, 34, 25, 0.2) 54%, rgba(51, 34, 25, 0.04)),
    linear-gradient(180deg, rgba(255, 249, 238, 0.24), rgba(255, 249, 238, 0.06) 52%, rgba(42, 31, 24, 0.48)),
    var(--hero-image, url("./assets/hero-setagaya-no-mosaic-v2.png")) center / cover no-repeat;
  transform: translateY(calc(var(--scroll, 0) * 0.14px)) scale(1.025);
  will-change: transform;
}

.hero-content {
  position: relative;
  z-index: 2;
  width: min(var(--max), calc(100% - 48px));
  margin: 0 auto;
  padding-top: 90px;
}

.hero-content .eyebrow,
.hero-content h1,
.hero-copy,
.hero-tags {
  opacity: 0;
  transform: translateY(18px);
  animation: heroFadeUp 0.86s ease forwards;
}

.hero-content h1 {
  animation-delay: 0.14s;
}

.hero-copy {
  animation-delay: 0.32s;
}

.hero-tags {
  animation-delay: 0.5s;
}

.eyebrow,
.section-kicker,
.note-label {
  margin: 0 0 28px;
  color: var(--green);
  font-size: 12px;
  line-height: 1.4;
  text-transform: uppercase;
}

.eyebrow {
  color: rgba(255, 255, 255, 0.82);
}

.eyebrow::after,
.section-kicker::after {
  content: "";
  display: block;
  width: 72px;
  height: 2px;
  margin-top: 13px;
  background: currentColor;
}

.sp-only,
.service-sp-break {
  display: none;
}

h1,
h2 {
  margin: 0;
  font-family: "Noto Serif JP", "Yu Mincho", serif;
  font-weight: 400;
  line-height: 1.35;
  letter-spacing: 0;
}

h1 {
  font-size: clamp(48px, 6vw, 86px);
  color: rgba(255, 255, 255, 0.94);
}

h2 {
  font-size: clamp(36px, 4vw, 58px);
}

h3 {
  margin: 0;
  font-size: 24px;
  font-weight: 500;
  line-height: 1.55;
}

.hero-copy {
  max-width: 900px;
  margin: 28px 0 0;
  color: rgba(255, 255, 255, 0.86);
  font-size: clamp(16px, 1.35vw, 20px);
}

.sp-break {
  display: none;
}

.hero-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 18px;
  margin-top: 54px;
}

.hero-tags span {
  display: inline-flex;
  min-height: 68px;
  align-items: center;
  padding: 0 28px;
  border-radius: 8px;
  border: 1px solid rgba(255, 255, 255, 0.33);
  background: rgba(255, 255, 255, 0.24);
  color: rgba(255, 255, 255, 0.92);
}

.hero-tags span:nth-child(2) {
  background: rgba(177, 93, 61, 0.66);
}

.scroll-line {
  position: absolute;
  left: clamp(24px, 6vw, 96px);
  bottom: 24px;
  z-index: 2;
  color: rgba(255, 255, 255, 0.76);
  font-size: 12px;
}

.scroll-line::after {
  content: "";
  display: inline-block;
  width: 94px;
  height: 1px;
  margin-left: 20px;
  vertical-align: middle;
  background: rgba(255, 255, 255, 0.58);
}

.bird-layer {
  position: absolute;
  inset: 0;
  z-index: 1;
  pointer-events: none;
}

.bird {
  position: absolute;
  left: -52px;
  top: 20vh;
  width: 32px;
  height: 18px;
  opacity: 0;
  animation: birdFlight 4s cubic-bezier(0.45, 0, 0.2, 1) 0.02s 1 forwards;
}

.bird::before,
.bird::after {
  content: "";
  position: absolute;
  top: 6px;
  width: 17px;
  height: 10px;
  border-top: 3px solid rgba(70, 48, 34, 0.68);
  border-radius: 50%;
  animation: flap 0.38s ease-in-out infinite alternate;
}

.bird::before {
  left: 0;
  transform-origin: right center;
}

.bird::after {
  right: 0;
  transform-origin: left center;
}

.bird-2 {
  top: 18vh;
  transform: scale(0.78);
  animation-delay: 0.1s;
}

.bird-3 {
  top: 24vh;
  transform: scale(0.62);
  animation-delay: 0.18s;
}

.bird-4 {
  top: 16vh;
  transform: scale(0.52);
  animation-delay: 0.26s;
}

@keyframes birdFlight {
  0% {
    opacity: 0;
    translate: -4vw 0;
  }
  12% {
    opacity: 1;
  }
  72% {
    opacity: 1;
  }
  100% {
    opacity: 0;
    translate: 92vw -12vh;
  }
}

@keyframes flap {
  from {
    transform: rotate(16deg);
  }
  to {
    transform: rotate(-10deg);
  }
}

@keyframes heroFadeUp {
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.section {
  padding: 112px 0;
  scroll-margin-top: 104px;
}

.container {
  width: min(var(--max), calc(100% - 48px));
  margin: 0 auto;
}

.failure h2 {
  max-width: none;
  white-space: nowrap;
}

.failure-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 38px;
  margin-top: 64px;
}

.failure-card {
  min-height: 356px;
  padding: 34px 32px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--cream);
}

.card-number {
  margin: 0 0 16px;
  color: rgba(177, 93, 61, 0.82);
  font-family: "Noto Serif JP", serif;
  font-size: 66px;
  line-height: 1;
}

.failure-card h3 {
  min-height: 74px;
}

.failure-card p:last-child {
  margin: 20px 0 0;
  color: var(--muted);
  font-size: 15px;
  line-height: 1.85;
}

.failure-card::after {
  content: "";
  display: block;
  width: 96px;
  height: 3px;
  margin-top: 26px;
  background: #ca974c;
}

.philosophy,
.profile,
.contact {
  background: var(--deep);
  color: var(--white);
}

.philosophy .section-kicker,
.profile .section-kicker,
.contact .section-kicker {
  color: #e8ca9d;
}

.philosophy-layout,
.ai-layout,
.works-layout,
.profile-layout,
.contact-layout {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: clamp(48px, 8vw, 116px);
  align-items: start;
}

.works-layout {
  grid-template-columns: 0.86fr 1.14fr;
  gap: clamp(44px, 6vw, 88px);
}

.philosophy p {
  color: #f4e8d5;
}

.philosophy-closing {
  margin-top: 54px;
  font-size: 24px;
}

.strategy-flow {
  display: grid;
  gap: 38px;
  margin: 0;
  padding: 8px 0 0;
  list-style: none;
}

.strategy-flow li {
  position: relative;
  display: grid;
  grid-template-columns: 190px 1fr;
  align-items: center;
  min-height: 104px;
  padding: 0 34px;
  border: 1px solid rgba(255, 249, 238, 0.2);
  border-radius: 8px;
  background: rgba(255, 249, 238, 0.1);
}

.strategy-flow li:not(:last-child)::after {
  content: "";
  position: absolute;
  left: 50%;
  bottom: -39px;
  width: 3px;
  height: 39px;
  background: rgba(202, 151, 76, 0.9);
}

.strategy-flow strong {
  font-size: 24px;
  font-weight: 500;
}

.strategy-flow span {
  color: #f4e8d5;
}

.ai-section,
.service {
  background: var(--paper);
}

.ai-layout {
  align-items: center;
}

.ai-section p,
.service p,
.works p {
  color: var(--muted);
}

.ai-note,
.profile-card,
.contact-form {
  border: 1px solid rgba(224, 211, 193, 0.75);
  border-radius: 8px;
  background: rgba(255, 253, 247, 0.74);
  padding: 36px 40px;
}

.ai-note .note-label {
  color: var(--green);
}

.ai-note::after {
  content: "";
  display: block;
  width: 96px;
  height: 3px;
  margin-top: 24px;
  background: var(--terracotta);
}

.service-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 22px;
  margin-top: 66px;
}

.service-grid span {
  min-height: 72px;
  display: flex;
  align-items: center;
  gap: 18px;
  padding: 0 22px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--cream);
  font-size: 15px;
}

.service-grid span::before {
  content: "";
  width: 14px;
  height: 14px;
  flex: 0 0 14px;
  border-radius: 50%;
  background: var(--green);
}

.works {
  background: var(--sand);
}

.client-example {
  margin-top: 92px;
  max-width: 560px;
  font-size: 16px;
}

.stats {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 28px;
}

.stats > div > span {
  display: block;
  color: var(--muted);
  font-size: 15px;
}

.stats .count-up {
  display: inline;
  color: inherit;
  font-size: inherit;
}

.stats strong {
  display: block;
  margin-top: 8px;
  color: var(--terracotta);
  font-family: "Noto Serif JP", serif;
  font-size: clamp(44px, 5vw, 66px);
  font-weight: 400;
  line-height: 1.15;
  white-space: nowrap;
}

.project-list {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 22px 30px;
  margin: 70px 0 0;
  padding: 0;
  list-style: none;
}

.project-list li {
  position: relative;
  padding-left: 38px;
  white-space: nowrap;
}

.project-list li::before {
  content: "";
  position: absolute;
  left: 0;
  top: 0.9em;
  width: 24px;
  height: 3px;
  background: var(--green);
}

.profile {
  padding-bottom: 80px;
}

.profile p,
.contact p,
.profile-card p {
  color: #f4e8d5;
}

.profile-message p {
  font-size: 16px;
}

.profile-card {
  background: rgba(255, 249, 238, 0.13);
  border-color: rgba(255, 249, 238, 0.22);
}

.profile-card .note-label {
  color: #e8ca9d;
}

.profile-card h3 {
  font-family: "Noto Serif JP", "Yu Mincho", serif;
  font-size: 22px;
  font-weight: 400;
  margin-bottom: 6px;
}

.profile-card p:not(.note-label) {
  color: rgba(244, 232, 213, 0.92);
  font-family: "Noto Sans JP", "Yu Gothic", sans-serif;
  font-size: 15px;
  line-height: 2;
}

.contact {
  padding-top: 48px;
  background: #4a3e34;
}

.contact-form {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 18px;
  background: rgba(255, 249, 238, 0.13);
  border-color: rgba(255, 249, 238, 0.22);
}

.contact-form label {
  display: grid;
  gap: 8px;
}

.contact-form .full {
  grid-column: 1 / -1;
}

.contact-form span {
  color: #f4e8d5;
  font-size: 13px;
}

.contact-form input,
.contact-form textarea {
  width: 100%;
  border: 1px solid rgba(255, 249, 238, 0.24);
  border-radius: 6px;
  background: rgba(255, 249, 238, 0.18);
  color: #fff;
  font: inherit;
  padding: 13px 14px;
  outline: none;
}

.contact-form input:focus,
.contact-form textarea:focus {
  border-color: rgba(255, 249, 238, 0.68);
}

.contact-form button {
  justify-self: start;
  min-width: 150px;
  min-height: 54px;
  border: 0;
  border-radius: 6px;
  background: var(--terracotta);
  color: var(--white);
  font: inherit;
  cursor: pointer;
}

.form-status {
  margin: 0;
  align-self: center;
  font-size: 14px;
}

.hp-field {
  position: absolute;
  left: -9999px;
}

.footer {
  display: flex;
  justify-content: space-between;
  align-items: end;
  gap: 32px;
  padding: 46px clamp(24px, 6vw, 96px) 68px;
  color: #f4e8d5;
  background: var(--deep);
}

.footer p {
  margin: 0;
  color: #f4e8d5;
  text-align: left;
}

.footer p + p {
  margin-top: 6px;
  color: #e8ca9d;
  font-size: 12px;
}

.footer-service {
  display: grid;
  gap: 6px;
  margin-left: auto;
  padding-bottom: 3px;
  color: #f4e8d5;
  text-align: right;
  text-decoration: none;
  border-bottom: 1px solid rgba(232, 202, 157, 0.4);
  transition: border-color 180ms ease, color 180ms ease;
}

.footer-service span {
  color: #e8ca9d;
  font-size: 11px;
}

.footer-service strong {
  font-size: 13px;
  font-weight: 500;
}

.footer-service:hover {
  color: #fff;
  border-color: #e8ca9d;
}

.reveal {
  opacity: 0;
  transform: translateY(28px);
  transition: opacity 0.7s ease, transform 0.7s ease;
}

.reveal.is-visible {
  opacity: 1;
  transform: translateY(0);
}

@media (max-width: 900px) {
  .site-header {
    grid-template-columns: 1fr auto;
    height: 72px;
    padding: 20px 20px 0;
  }

  .brand img {
    width: 128px;
  }

  .nav {
    display: none;
  }

  .header-contact {
    min-height: 38px;
    padding: 0 16px;
  }

  .hero {
    min-height: 680px;
  }

  .hero-content {
    width: min(100% - 32px, var(--max));
    padding-top: 66px;
  }

  h1 {
    font-size: clamp(34px, 9.2vw, 42px);
    line-height: 1.32;
    white-space: nowrap;
  }

  .hero-copy {
    max-width: none;
    font-size: clamp(13px, 3.45vw, 15px);
    line-height: 1.82;
    white-space: normal;
  }

  .hero-copy br {
    display: block;
  }

  .hero-copy .sp-break {
    display: block;
  }

  .sp-only,
  .service-sp-break {
    display: block;
  }

  .hero-tags {
    gap: 12px;
    margin-top: 40px;
  }

  .hero-tags span {
    min-height: auto;
    padding: 13px 16px;
    font-size: 13px;
  }

  .section {
    padding: 78px 0;
  }

  .container {
    width: calc(100% - 40px);
  }

  .failure-grid,
  .philosophy-layout,
  .ai-layout,
  .works-layout,
  .profile-layout,
  .contact-layout,
  .service-grid {
    grid-template-columns: 1fr;
  }

  .failure-card {
    min-height: auto;
  }

  .failure-card p:last-child {
    font-size: clamp(13px, 3.35vw, 15px);
    line-height: 1.75;
  }

  .failure h2 {
    white-space: normal;
  }

  .philosophy p:not(.philosophy-closing) {
    font-size: clamp(12px, 3.2vw, 14px);
    line-height: 1.9;
    white-space: nowrap;
  }

  .philosophy-closing {
    font-size: clamp(20px, 5.2vw, 23px);
    line-height: 1.7;
  }

  .service h2,
  .contact h2 {
    font-size: clamp(34px, 8.8vw, 42px);
  }

  .contact h2 {
    white-space: nowrap;
  }

  .strategy-flow li {
    grid-template-columns: 1fr;
    gap: 8px;
    padding: 22px 24px;
  }

  .strategy-flow li:not(:last-child)::after {
    left: 36px;
  }

  .service-grid {
    gap: 14px;
  }

  .stats {
    grid-template-columns: 1fr;
  }

  .project-list {
    grid-template-columns: 1fr;
  }

  .project-list li {
    white-space: normal;
  }

  .client-example {
    margin-top: 40px;
  }

  .contact-form {
    grid-template-columns: 1fr;
    padding: 28px 24px;
  }

  .footer {
    align-items: start;
    flex-direction: column;
  }

  .footer-service {
    margin-left: 0;
    text-align: left;
  }

  .footer p {
    text-align: left;
  }
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    scroll-behavior: auto !important;
    transition-duration: 0.01ms !important;
  }

  .hero-bg {
    transform: none;
  }
}
