:root {
  --base: #faf0ca;
  --top-bar-main: #f2f0e6;
  --top-bar-accent: #d57b0e;
  --question: #f4d35e;
  --answer: #d3c79a;
  --ink: #1b5a62;
  --pill: #0d3b66;
  --pill-alt: #8a8a8a;
  --card: rgba(0, 0, 0, 0.04);
  --shadow: rgba(0, 0, 0, 0.2);
  --white: #ffffff;
  --font-base: "Kosugi", "Yomogi", "Hiragino Sans", "Yu Gothic", sans-serif;
  --font-display: "Palette Mosaic", "Kosugi", sans-serif;
  --font-info: var(--font-zen);
  --font-question: var(--font-zen);
  --font-contact: var(--font-base);
  --font-works-tab: var(--font-display);
  --font-works-body: var(--font-zen);
  --font-modal: var(--font-zen);
  --font-zen: "Zen Maru Gothic", "Kosugi", "Yomogi", "Hiragino Sans",
    "Yu Gothic", sans-serif;
  --noise-image: url("/images/noise.png");
}

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

body {
  margin: 0;
  min-height: 100vh;
  font-family: var(--font-base);
  background: var(--base) url("/images/tile-pattern.svg") repeat;
  background-size: 70px 70px;
  color: var(--ink);
  overscroll-behavior-y: none;
  overflow-x: hidden;
  cursor: auto;
  position: relative;
}

button,
a,
.topic,
.work-tab,
.work-nav,
.work-card,
.contact-badge,
.work-modal__close {
  cursor: pointer;
}

html {
  overscroll-behavior-y: none;
}
.page {
  max-width: 1200px;
  margin: 0 auto;
  padding: 32px 24px 48px;
  position: relative;
  z-index: 1;
}

.top-bar {
  background: var(--top-bar-main);
  color: var(--ink);
  border-radius: 0;
  padding: 0 24px;
  height: 80px;
  width: 100%;
  display: flex;
  justify-content: center;
  align-items: center;
  position: relative;
  margin: 0;
  overflow: hidden;
  z-index: 2;
}

.top-bar::after {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  height: 4px;
  background: var(--top-bar-accent);
}

.bar-content h1 {
  border-bottom: 0;
  margin: 0;
  font-family: var(--font-display);
  font-size: clamp(28px, 4vw, 40px);
  letter-spacing: 0.08em;
}

.bar-tag {
  background: rgba(255, 255, 255, 0.15);
  color: var(--white);
  padding: 10px 14px;
  border-radius: 12px;
  font-weight: 700;
  box-shadow: none;
}

.eyebrow {
  font-size: 14px;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: rgba(255, 255, 255, 0.9);
  margin: 0 0 6px;
}

h1 {
  margin: 0 0 8px;
  font-size: clamp(30px, 4vw, 46px);
  font-weight: 700;
  letter-spacing: 0.02em;
  font-family: var(--font-display);
}

.lede {
  margin: 0;
  max-width: 640px;
  line-height: 1.7;
  color: var(--ink);
  font-size: 16px;
}

.main-hero {
  display: grid;
  grid-template-columns: 1fr 340px 1fr;
  align-items: center;
  gap: 24px;
  margin-bottom: 28px;
  min-height: 90vh;
  transform: translateY(-100px);
}

.info-panel {
  background-color: var(--answer);
  border: none;
  padding: 22px;
  border-radius: 18px;
  min-height: 260px;
  transition: transform 0.2s ease;
  position: relative;
  font-family: var(--font-info);
}

.info-panel:hover {
  transform: translateY(-4px);
}

.info-label {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: 12px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  background: rgba(0, 0, 0, 0.12);
  border-radius: 999px;
  padding: 6px 10px;
  color: var(--ink);
  margin: 0 0 10px;
}

.info-panel h2 {
  margin: 0 0 10px;
  font-size: 22px;
  color: var(--ink);
}

.info-panel p {
  margin: 0;
  line-height: 1.7;
  color: var(--ink);
}

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

.contact-form label {
  display: grid;
  gap: 4px;
  font-weight: 700;
  color: var(--ink);
}

.contact-form input,
.contact-form textarea {
  width: 100%;
  padding: 8px;
  border-radius: 8px;
  border: 2px solid rgba(0, 0, 0, 0.1);
  font-family: inherit;
}

.contact-form button {
  justify-self: start;
  padding: 10px 14px;
  border: none;
  border-radius: 10px;
  background: var(--pill);
  color: #fff;
  cursor: pointer;
}

.contact-form button:disabled {
  opacity: 0.7;
  cursor: not-allowed;
}

.contact-status {
  margin: 6px 0 0;
  font-size: 12px;
  color: var(--ink);
}

.portrait {
  position: relative;
  justify-self: center;
}

.portrait-frame {
  width: 320px;
  height: 320px;
  max-width: 100%;
  border-radius: 18px;
  box-shadow: none;
  border: none;
  background: transparent;
}

.portrait-frame img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: contain;
}

.floating-portrait {
  animation: floatY 2s ease-in-out infinite alternate;
}

.floating-note {
  position: absolute;
  right: -18px;
  bottom: -18px;
  background: var(--question);
  color: var(--ink);
  padding: 10px 14px;
  border-radius: 14px;
  font-weight: 700;
  box-shadow: none;
}

.button-board {
  display: grid;
  grid-template-columns: repeat(3, minmax(120px, 1fr));
  gap: 14px;
  align-content: start;
  justify-self: end;
}

.topic {
  background-color: #eeeeee;
  color: var(--ink);
  border: none;
  border-radius: 14px;
  padding: 14px 12px;
  font-size: 15px;
  font-weight: 700;
  font-family: var(--font-question);
  text-align: center;
  cursor: pointer;
  box-shadow: 4px 4px 0 #b28a59;
  transition: transform 0.18s ease, border-color 0.18s ease, background 0.18s ease;
}

.topic:hover {
  transform: translateY(-4px);
  border-color: var(--ink);
}


.topic.active {
  background: var(--ink);
  color: var(--base);
  border-color: var(--ink);
  box-shadow: 4px 4px 0 #b28a59;
}

.contact-row {
  display: flex;
  justify-content: center;
  padding: 12px 0 28px;
}

.contact-badge {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  border: 2px solid var(--ink);
  border-radius: 12px;
  padding: 10px 16px;
  font-weight: 700;
  font-family: var(--font-contact);
  color: var(--ink);
  background-color: rgba(255, 255, 255, 0.55);
  box-shadow: none;
}

.works {
  border-radius: 0;
  width: 100vw;
  background-position: center top;
  max-width: none;
  margin-left: calc(50% - 50vw);
  margin-right: calc(50% - 50vw);
  padding: 70px 32px 40px;
  margin-top: calc(-1 * clamp(140px, 20vh, 240px));
  color: var(--base);
  position: relative;
  display: block;
  float: none;
  clear: both;
  min-height: 650px;
  height: 650px;
  overflow: visible;
  font-family: var(--font-works-body);
  --work-card-width: 280px;
  --work-card-gap: 24px;
}

.works.did {
  background: url("/images/なみなみターコイズ.svg") repeat;
}

.works.made {
  background: url("/images/なみなみオレンジ.svg") repeat;
}

.works-topbar {
  display: flex;
  align-items: flex-end;
  gap: 20px;
  height: 60px;
  position: absolute;
  top: -60px;
  left: 0;
  right: 0;
  padding: 0 32px;
  z-index: 2;
  transform: none;
}

.works-topbar::after {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  top: 100%;
  bottom: auto;
  height: 8px;
  background: #28736f;
}

.work-tab {
  display: inline-block;
  padding: 14px 22px;
  border-radius: 14px 14px 0 0;
  font-weight: 700;
  font-family: var(--font-works-tab);
  box-shadow: none;
  cursor: pointer;
  background-color: #28736f;
  color: #f2f0e6;
  border: none;
  position: relative;
  z-index: 1;
}

.work-tab.tab-made {
  background-color: #d57b0e;
}

.work-tab.active {
  transform: scale(1.1);
  transform-origin: center bottom;
}

.works-body {
  display: block;
  color: var(--base);
  float: none;
  clear: both;
  background: rgba(0, 0, 0, 0);
  padding-top: 0;
  height: 100%;
}

.works.did .works-topbar::after {
  background: #28736f;
}

.works.made .works-topbar::after {
  background: #d57b0e;
}

.works-carousel {
  position: relative;
  overflow-x: auto;
  overflow-y: hidden;
  padding: 0;
  height: 100%;
  display: flex;
  align-items: center;
  scroll-snap-type: x mandatory;
  scroll-behavior: smooth;
  -webkit-overflow-scrolling: touch;
  scrollbar-width: none;
}

.works-carousel::-webkit-scrollbar {
  display: none;
}

.works-track {
  display: flex;
  align-items: center;
  gap: var(--work-card-gap);
  height: 100%;
  width: max-content;
  padding: 0 calc(50% - var(--work-card-width) / 2);
}

.work-card {
  flex: 0 0 var(--work-card-width);
  width: var(--work-card-width);
  max-width: var(--work-card-width);
  min-height: 0;
  border-radius: 0;
  padding: 18px;
  color: var(--ink);
  background: transparent;
  box-shadow: none;
  --scale: 1;
  transition: transform 0.42s ease, opacity 0.42s ease;
  cursor: pointer;
  display: flex;
  flex-direction: column;
  gap: 0;
  align-items: center;
  justify-content: flex-start;
  transform: scale(var(--scale));
  scroll-snap-align: center;
  scroll-snap-stop: always;
}

.work-card.is-center {
  --scale: 1.08;
  opacity: 1;
}

.work-card.is-side {
  opacity: 0.65;
  --scale: 0.95;
}

.work-card__info {
  display: grid;
  gap: 4px;
  width: 100%;
  max-width: var(--work-card-width);
  text-align: center;
  background: #fff;
  border-radius: 0;
  padding: 0;
  max-height: 0;
  opacity: 0;
  overflow: hidden;
  transform: none;
  transition: opacity 0.3s ease, max-height 0.3s ease, padding 0.3s ease;
}

.work-card.is-center .work-card__info {
  opacity: 1;
  max-height: 120px;
  padding: 0 0 8px;
}

.work-card h4 {
  margin: 0;
  font-size: 18px;
}

.work-tags {
  display: inline-flex;
  flex-wrap: wrap;
  gap: 6px;
  justify-content: center;
  font-size: 12px;
  color: var(--ink);
  opacity: 0.9;
}

.work-tags span {
  padding: 4px 8px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.7);
  border: 1px solid rgba(0, 0, 0, 0.08);
}

.work-card .work-thumb {
  width: var(--work-card-width);
  height: var(--work-card-width);
  max-width: 100%;
  border-radius: 0;
  padding: 10px;
  overflow: hidden;
  background: #fff;
  box-shadow: 0 8px 16px rgba(0, 0, 0, 0.15);
  display: grid;
  place-items: center;
}

.work-card .work-thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  border-radius: 0;
}

.work-nav {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  background: rgba(0, 0, 0, 0.6);
  color: #fff;
  border: none;
  border-radius: 50%;
  width: 40px;
  height: 40px;
  display: grid;
  place-items: center;
  cursor: pointer;
  z-index: 3;
}

.work-nav.prev {
  left: 60px;
}

.work-nav.next {
  right: 60px;
}

.work-modal {
  position: fixed;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 20;
}

.work-modal.hidden {
  display: none;
}

.work-modal__overlay {
  position: absolute;
  inset: 0;
  background: rgba(0, 0, 0, 0.6);
}

.work-modal__content {
  position: relative;
  background-color: #fff;
  color: #000;
  padding: 20px;
  border-radius: 12px;
  max-width: 720px;
  width: 90%;
  z-index: 1;
  font-family: var(--font-modal);
}

.topic,
.info-panel,
.work-tab,
.work-modal__content {
  background-image: var(--noise-image);
  background-size: 180px 180px;
  background-repeat: repeat;
  background-blend-mode: multiply;
}

.work-modal__content h3 {
  text-align: center;
}

.modal-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  justify-content: center;
  margin: 6px 0 16px;
}

.modal-tags span {
  padding: 4px 10px;
  border-radius: 999px;
  border: 1px solid rgba(0, 0, 0, 0.1);
  background: rgba(0, 0, 0, 0.04);
  font-size: 12px;
}
.work-modal__close {
  position: absolute;
  top: 10px;
  right: 10px;
  background: none;
  border: none;
  font-size: 20px;
  cursor: pointer;
}

.modal-content {
  max-height: 70vh;
  overflow: auto;
}

.work-copy {
  color: var(--base);
  margin-top: 18px;
  text-align: left;
  float: none;
  clear: both;
}

.work-title {
  font-weight: 700;
  font-size: 20px;
  margin-bottom: 10px;
}

.work-meta {
  font-size: 14px;
  opacity: 0.8;
  margin-bottom: 8px;
}

.work-body-text {
  font-size: 18px;
  line-height: 1.8;
}

.placeholder-text {
  color: rgba(255, 255, 255, 0.7);
  padding: 20px;
  text-align: center;
  font-size: 14px;
}

.bg-blob {
  position: absolute;
  background-repeat: no-repeat;
  background-size: contain;
  pointer-events: none;
  z-index: 0;
}

.bg-giza {
  width: 220px;
  height: 220px;
  background-image: url("/images/ギザギザ.svg");
  top: 10px;
  right: -70px;
}

.bg-maru {
  width: 200px;
  height: 200px;
  background-image: url("/images/まるまる.svg");
  top: 20px;
  left: -70px;
}

@keyframes floatY {
  from {
    transform: translateY(0);
  }
  to {
    transform: translateY(-20px);
  }
}

@media (max-width: 1100px) {
  .top-bar {
    height: 72px;
    padding: 0 18px;
  }

  .main-hero {
    grid-template-columns: 1fr;
    grid-template-rows: auto;
    justify-items: center;
    min-height: auto;
    transform: none;
  }

  .info-panel {
    width: 100%;
  }

  .button-board {
    width: 100%;
  }

  .top-bar {
    flex-direction: column;
  }
}

@media (max-width: 960px) {
  .button-board {
    grid-template-columns: repeat(2, minmax(120px, 1fr));
  }

  .works {
    --work-card-width: 240px;
    --work-card-gap: 20px;
  }

  .work-nav.prev {
    left: 24px;
  }

  .work-nav.next {
    right: 24px;
  }
}

@media (max-width: 720px) {
  body {
    padding: 0;
  }
  .top-bar {
    height: 64px;
    padding: 0 14px;
  }

  .main-hero {
    display: flex;
    flex-direction: column;
    align-items: center;
  }

  .button-board {
    grid-template-columns: repeat(2, minmax(120px, 1fr));
  }

  .topic {
    font-size: 14px;
    padding: 12px 10px;
  }

  .portrait-frame {
    width: 220px;
    height: 220px;
  }

  .works {
    margin-left: -18px;
    margin-right: -18px;
    padding: 80px 20px 44px;
    height: 560px;
    min-height: 560px;
    margin-top: 60px;
  }

  .works-topbar {
    position: absolute;
    top: -60px;
    left: 0;
    right: 0;
    height: 60px;
    padding: 0 18px;
    justify-content: center;
  }

  .works-body {
    grid-template-columns: 1fr;
    justify-items: center;
    text-align: center;
  }

  .work-copy {
    text-align: center;
  }

  .works {
    --work-card-width: 220px;
    --work-card-gap: 16px;
  }

  .work-nav {
    width: 36px;
    height: 36px;
  }

  .work-nav.prev {
    left: 12px;
  }

  .work-nav.next {
    right: 12px;
  }
}

@media (max-width: 520px) {
  .page {
    padding: 24px 16px 36px;
  }

  .portrait-frame {
    width: 180px;
    height: 180px;
  }

  .button-board {
    grid-template-columns: 1fr;
  }

  .info-panel {
    padding: 18px;
  }

  .works {
    padding: 70px 16px 36px;
    height: 520px;
    min-height: 520px;
    margin-top: 60px;
  }

  .works {
    --work-card-width: 190px;
    --work-card-gap: 14px;
  }

  .work-nav {
    width: 32px;
    height: 32px;
  }

  .work-nav.prev {
    left: 8px;
  }

  .work-nav.next {
    right: 8px;
  }
}
  .page {
    padding: 24px 18px 40px;
  }
