:root {
  --paper: #fbf7ef;
  --paper-deep: #f1e6d6;
  --paper-soft: #fffaf2;
  --ink: #171615;
  --ink-muted: #575047;
  --line: #d7c8b6;
  --beige: #dac7ad;
  --beige-dark: #a88e70;
  --sage: #6f7c5b;
  --sage-soft: #e8eadf;
  --white: #fffdf8;
}

* {
  box-sizing: border-box;
}

html {
  min-height: 100%;
  background: var(--paper);
  scroll-behavior: smooth;
}

body {
  min-height: 100%;
  margin: 0;
  background:
    linear-gradient(rgba(23, 22, 21, 0.025) 1px, transparent 1px),
    linear-gradient(90deg, rgba(23, 22, 21, 0.018) 1px, transparent 1px),
    var(--paper);
  background-size: 42px 42px;
  color: var(--ink);
  font-family:
    "Noto Sans JP",
    -apple-system,
    BlinkMacSystemFont,
    "Hiragino Sans",
    "Yu Gothic",
    sans-serif;
  letter-spacing: 0;
  overflow-x: hidden;
}

body.is-nav-open {
  overflow: hidden;
}

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

button {
  font: inherit;
}

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

ul {
  margin: 0;
  padding: 0;
}

li {
  list-style: none;
}

.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: rgba(251, 247, 239, 0.88);
  backdrop-filter: blur(18px);
  border-bottom: 1px solid transparent;
  transition:
    border-color 180ms ease,
    box-shadow 180ms ease;
}

.site-header.is-scrolled {
  border-color: rgba(87, 80, 71, 0.16);
  box-shadow: 0 12px 30px rgba(57, 44, 31, 0.08);
}

.site-nav {
  display: flex;
  width: min(1280px, calc(100% - 64px));
  min-height: 86px;
  align-items: center;
  justify-content: space-between;
  gap: 28px;
  margin: 0 auto;
}

.brand {
  display: inline-flex;
  flex-direction: column;
  gap: 5px;
  flex: 0 0 auto;
}

.brand strong {
  font-family:
    "Noto Serif JP",
    "Yu Mincho",
    serif;
  font-size: 31px;
  font-weight: 600;
  line-height: 1.15;
}

.brand span {
  color: var(--ink-muted);
  font-size: 12px;
  line-height: 1.2;
}

.nav-panel {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 30px;
  color: var(--ink);
  font-size: 14px;
  font-weight: 500;
}

.nav-panel a {
  display: inline-flex;
  align-items: center;
  min-height: 42px;
  transition:
    color 180ms ease,
    transform 180ms ease;
}

.nav-panel a:hover {
  color: var(--sage);
  transform: translateY(-1px);
}

.nav-cta,
.button {
  border-radius: 999px;
  white-space: nowrap;
}

.nav-cta {
  gap: 9px;
  padding: 13px 22px;
  background: var(--ink);
  color: var(--white);
}

.nav-panel .nav-cta:hover {
  color: var(--white);
}

.nav-toggle {
  display: none;
  align-items: center;
  gap: 8px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: var(--white);
  color: var(--ink);
  cursor: pointer;
  padding: 9px 14px;
}

.hero-section {
  position: relative;
  overflow: hidden;
  padding: 62px 0 24px;
}

.hero-inner {
  display: grid;
  width: min(1280px, calc(100% - 64px));
  grid-template-columns: minmax(420px, 0.86fr) minmax(520px, 1.1fr);
  gap: 28px;
  align-items: center;
  margin: 0 auto;
}

.hero-copy {
  position: relative;
  z-index: 2;
  padding: 28px 0 34px;
}

.hand-note {
  display: inline-flex;
  position: relative;
  align-items: center;
  margin: 0;
  color: var(--ink);
  font-family:
    "Yuji Syuku",
    "Noto Serif JP",
    serif;
  font-size: 21px;
  line-height: 1.2;
}

.hand-note::after {
  position: absolute;
  right: -10px;
  bottom: -8px;
  left: 0;
  height: 9px;
  border-radius: 999px;
  background: rgba(190, 160, 122, 0.42);
  content: "";
  z-index: -1;
}

.hero-copy h1 {
  max-width: 640px;
  margin: 35px 0 0;
  font-family:
    "Noto Serif JP",
    "Yu Mincho",
    serif;
  font-size: 72px;
  font-weight: 600;
  line-height: 1.28;
  letter-spacing: 0;
  word-break: keep-all;
}

.hero-lead {
  max-width: 590px;
  margin: 30px 0 0;
  color: var(--ink-muted);
  font-family:
    "Noto Serif JP",
    "Yu Mincho",
    serif;
  font-size: 18px;
  line-height: 2.05;
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 14px;
  margin-top: 38px;
}

.button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  min-height: 58px;
  border: 1px solid transparent;
  cursor: pointer;
  font-weight: 700;
  padding: 0 27px;
  transition:
    background 180ms ease,
    border-color 180ms ease,
    color 180ms ease,
    transform 180ms ease;
}

.button:hover,
.button:focus-visible {
  transform: translateY(-2px);
}

.button-primary {
  background: var(--ink);
  color: var(--white);
}

.button-primary:hover,
.button-primary:focus-visible {
  background: #000;
}

.button-outline {
  border-color: var(--line);
  background: rgba(255, 253, 248, 0.7);
  color: var(--ink);
}

.button-outline:hover,
.button-outline:focus-visible {
  border-color: var(--sage);
  color: var(--sage);
}

.hero-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 17px 24px;
  margin-top: 34px;
  color: var(--ink-muted);
  font-family:
    "Noto Serif JP",
    "Yu Mincho",
    serif;
  font-size: 15px;
}

.hero-tags li {
  display: inline-flex;
  align-items: center;
  gap: 8px;
}

.hero-tags i {
  color: var(--sage);
  font-size: 21px;
}

.hero-visual {
  position: relative;
  min-height: 650px;
}

.hero-visual img {
  width: 100%;
  height: auto;
  object-fit: contain;
  filter: drop-shadow(0 18px 30px rgba(76, 60, 40, 0.08));
}

.hero-note {
  position: absolute;
  display: grid;
  gap: 5px;
  min-width: 116px;
  border: 1px solid rgba(86, 75, 61, 0.28);
  background: rgba(255, 253, 248, 0.86);
  color: #63513d;
  font-family:
    "Yuji Syuku",
    "Noto Serif JP",
    serif;
  font-size: 16px;
  line-height: 1.2;
  padding: 18px 18px;
}

.hero-note-top {
  top: 72px;
  right: 18px;
}

.hero-note-bottom {
  right: 124px;
  bottom: 106px;
}

.section {
  padding: 86px 0;
  scroll-margin-top: 98px;
}

.section-inner {
  width: min(1180px, calc(100% - 64px));
  margin: 0 auto;
}

.section-heading {
  display: grid;
  grid-template-columns: 230px minmax(0, 0.7fr) minmax(280px, 1fr);
  gap: 34px;
  align-items: end;
  border-bottom: 1px solid var(--line);
  padding-bottom: 26px;
}

.section-heading h2 {
  margin: 0;
  font-family:
    "Noto Serif JP",
    "Yu Mincho",
    serif;
  font-size: 38px;
  font-weight: 600;
  line-height: 1.3;
  word-break: keep-all;
}

.section-heading p:last-child {
  margin: 0;
  color: var(--ink-muted);
  font-size: 15px;
  line-height: 1.9;
}

.section-heading-wide {
  grid-template-columns: minmax(0, 0.72fr) minmax(360px, 0.62fr);
}

.section-heading-wide .hand-note {
  margin-bottom: 20px;
}

.service-index {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 34px;
  height: 34px;
  margin: 0 0 13px;
  border-radius: 999px;
  background: var(--sage);
  color: var(--white);
  font-family:
    "Noto Serif JP",
    serif;
  font-size: 14px;
}

.service-card h3 {
  margin: 0;
  font-family:
    "Noto Serif JP",
    "Yu Mincho",
    serif;
  font-size: 24px;
  font-weight: 600;
  line-height: 1.35;
}

.service-card p:not(.service-index),
.about-copy p,
.contact-inner p {
  color: var(--ink-muted);
  font-size: 15px;
  line-height: 1.88;
}

.service-card ul {
  display: grid;
  gap: 8px;
  margin-top: 18px;
  color: var(--ink);
  font-size: 14px;
  line-height: 1.55;
}

.service-card li {
  position: relative;
  padding-left: 18px;
}

.service-card li::before {
  position: absolute;
  top: 0.78em;
  left: 0;
  width: 5px;
  height: 5px;
  border-radius: 50%;
  background: var(--beige-dark);
  content: "";
}

.services-section {
  padding-top: 94px;
}

.service-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  margin-top: 46px;
  border: 1px solid var(--line);
  background: rgba(255, 253, 248, 0.52);
}

.service-card {
  display: flex;
  min-height: 654px;
  flex-direction: column;
}

.service-card + .service-card {
  border-left: 1px dashed var(--line);
}

.service-card img {
  width: 100%;
  aspect-ratio: 1.22;
  object-fit: cover;
  border-bottom: 1px solid var(--line);
}

.service-body {
  display: flex;
  flex: 1;
  flex-direction: column;
  padding: 25px 26px 28px;
}

.service-card p:not(.service-index) {
  margin: 14px 0 0;
}

.service-card ul {
  margin-bottom: 22px;
}

.text-button {
  display: inline-flex;
  align-items: center;
  align-self: flex-start;
  gap: 8px;
  margin-top: auto;
  border: 0;
  background: transparent;
  color: var(--ink);
  cursor: pointer;
  font-weight: 700;
  padding: 0;
  transition:
    color 180ms ease,
    transform 180ms ease;
}

.text-button:hover,
.text-button:focus-visible {
  color: var(--sage);
  transform: translateX(2px);
}

.text-button i {
  transition: transform 180ms ease;
}

.service-card.is-expanded .text-button i {
  transform: rotate(90deg);
}

.service-detail {
  margin-top: 16px;
  border-top: 1px solid var(--line);
  padding-top: 14px;
}

.app-portfolio-section {
  padding-top: 96px;
  background:
    linear-gradient(rgba(255, 253, 248, 0.62), rgba(255, 253, 248, 0.38)),
    var(--paper);
}

.app-cases {
  display: grid;
  gap: 38px;
  margin-top: 46px;
}

.app-case {
  display: grid;
  grid-template-columns: minmax(340px, 0.72fr) minmax(420px, 1fr);
  gap: 44px;
  align-items: stretch;
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
  background: rgba(255, 253, 248, 0.58);
  padding: 34px 0;
  scroll-margin-top: 98px;
}

.app-case + .app-case {
  margin-top: 6px;
}

.app-case-copy {
  display: flex;
  flex-direction: column;
  justify-content: center;
  padding: 22px 34px 22px 0;
}

.app-case-title {
  display: flex;
  align-items: center;
  gap: 18px;
}

.app-icon {
  width: 66px;
  height: 66px;
  flex: 0 0 auto;
  border: 1px solid rgba(87, 80, 71, 0.16);
  border-radius: 18px;
  object-fit: cover;
  box-shadow: 0 14px 28px rgba(62, 44, 31, 0.12);
}

.case-label {
  margin: 0 0 5px;
  color: var(--sage);
  font-size: 12px;
  font-weight: 800;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.app-case h3 {
  margin: 0;
  font-family:
    "Noto Serif JP",
    "Yu Mincho",
    serif;
  font-size: 38px;
  font-weight: 600;
  line-height: 1.2;
}

.app-case-copy > p {
  margin: 26px 0 0;
  color: var(--ink-muted);
  font-size: 16px;
  line-height: 1.95;
}

.case-facts {
  display: grid;
  gap: 0;
  margin: 30px 0 0;
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
}

.case-facts div {
  display: grid;
  grid-template-columns: 86px minmax(0, 1fr);
  gap: 18px;
  padding: 15px 0;
}

.case-facts div + div {
  border-top: 1px dashed var(--line);
}

.case-facts dt,
.case-facts dd {
  margin: 0;
}

.case-facts dt {
  color: var(--beige-dark);
  font-size: 12px;
  font-weight: 800;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.case-facts dd {
  color: var(--ink);
  font-size: 14px;
  line-height: 1.72;
}

.app-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 13px;
  margin-top: 30px;
}

.app-actions .button {
  min-height: 52px;
  padding: 0 21px;
}

.app-gallery {
  display: grid;
  align-items: stretch;
  min-width: 0;
}

.app-gallery-main {
  position: relative;
  min-height: 560px;
  overflow: hidden;
  border: 1px solid var(--line);
  background: var(--paper-soft);
}

.app-gallery-main img {
  width: 100%;
  height: 100%;
  max-height: 720px;
  object-fit: contain;
  object-position: top center;
  transition:
    opacity 180ms ease,
    transform 180ms ease;
}

.app-case-lifearc .app-gallery-main img {
  object-position: top center;
}

.about-section {
  padding-top: 84px;
}

.about-layout {
  display: grid;
  grid-template-columns: minmax(320px, 0.8fr) minmax(420px, 1fr);
  gap: 92px;
  align-items: start;
}

.about-layout h2 {
  max-width: 560px;
  margin: 28px 0 0;
  font-family:
    "Noto Serif JP",
    "Yu Mincho",
    serif;
  font-size: 44px;
  font-weight: 600;
  line-height: 1.58;
}

.about-copy {
  border-left: 1px solid var(--line);
  padding-left: 44px;
}

.about-copy p {
  margin: 0;
  font-size: 16px;
}

.about-copy p + p {
  margin-top: 22px;
}

.contact-section {
  padding: 92px 0 104px;
}

.contact-inner {
  width: min(980px, calc(100% - 64px));
  margin: 0 auto;
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
  background: rgba(255, 253, 248, 0.62);
  padding: 48px 0 54px;
  text-align: center;
}

.contact-inner h2 {
  max-width: 760px;
  margin: 25px auto 0;
  font-family:
    "Noto Serif JP",
    "Yu Mincho",
    serif;
  font-size: 42px;
  font-weight: 600;
  line-height: 1.48;
}

.contact-inner p:not(.hand-note) {
  max-width: 640px;
  margin: 18px auto 0;
  font-size: 16px;
}

.contact-actions {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 14px;
  margin-top: 34px;
}

.site-footer {
  display: flex;
  width: min(1280px, calc(100% - 64px));
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  margin: 0 auto;
  border-top: 1px solid var(--line);
  color: var(--ink-muted);
  padding: 24px 0 34px;
}

.site-footer p,
.site-footer small {
  margin: 0;
}

.site-footer p {
  color: var(--ink);
  font-family:
    "Noto Serif JP",
    serif;
  font-size: 22px;
}

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

@media (max-width: 1120px) {
  .site-nav,
  .hero-inner,
  .section-inner,
  .site-footer {
    width: min(100% - 44px, 980px);
  }

  .hero-inner {
    grid-template-columns: 1fr;
    gap: 18px;
  }

  .hero-section {
    padding-top: 42px;
  }

  .hero-copy {
    max-width: 720px;
    padding-bottom: 0;
  }

  .hero-copy h1 {
    font-size: 58px;
  }

  .hero-visual {
    min-height: auto;
    max-width: 860px;
    justify-self: end;
    margin-top: -20px;
  }

  .hero-note-bottom {
    bottom: 74px;
  }

  .section-heading,
  .section-heading-wide {
    grid-template-columns: 1fr;
    gap: 18px;
    align-items: start;
  }

  .service-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .service-card:nth-child(3) {
    border-left: 0;
    border-top: 1px dashed var(--line);
  }

  .service-card:nth-child(4) {
    border-top: 1px dashed var(--line);
  }

  .app-case {
    grid-template-columns: 1fr;
    gap: 28px;
  }

  .app-case-copy {
    padding: 0;
  }

  .about-layout {
    grid-template-columns: 1fr;
    gap: 34px;
  }

  .about-copy {
    border-top: 1px solid var(--line);
    border-left: 0;
    padding-top: 28px;
    padding-left: 0;
  }
}

@media (max-width: 820px) {
  body.is-nav-open .site-header {
    background: var(--paper);
  }

  .site-nav {
    min-height: 76px;
  }

  .brand strong {
    font-size: 25px;
  }

  .brand span {
    display: none;
  }

  .nav-toggle {
    display: inline-flex;
  }

  .nav-panel {
    position: fixed;
    top: 76px;
    right: 18px;
    left: 18px;
    display: grid;
    gap: 4px;
    justify-content: stretch;
    border: 1px solid var(--line);
    background: var(--white);
    padding: 18px;
    opacity: 0;
    pointer-events: none;
    transform: translateY(-10px);
    transition:
      opacity 180ms ease,
      transform 180ms ease;
  }

  .nav-panel.is-open {
    opacity: 1;
    pointer-events: auto;
    transform: translateY(0);
  }

  .nav-panel a {
    justify-content: center;
    min-height: 46px;
    padding: 0 6px;
  }

  .nav-cta {
    justify-content: center;
    margin-top: 8px;
  }

  .hero-section {
    padding: 44px 0 38px;
  }

  .hero-copy h1 {
    margin-top: 26px;
    font-size: 46px;
    line-height: 1.32;
  }

  .hero-lead {
    font-size: 16px;
    line-height: 1.9;
  }

  .hero-visual {
    margin-top: 8px;
  }

  .hero-note {
    display: none;
  }

  .section {
    padding: 68px 0;
  }

  .section-heading h2 {
    font-size: 33px;
  }

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

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

  .service-card + .service-card,
  .service-card:nth-child(3),
  .service-card:nth-child(4) {
    border-top: 1px dashed var(--line);
    border-left: 0;
  }

  .service-card img {
    aspect-ratio: 1.55;
  }

  .app-case {
    padding: 28px 0;
  }

  .app-case h3 {
    font-size: 33px;
  }

  .app-gallery-main {
    min-height: 620px;
  }

  .about-layout h2,
  .contact-inner h2 {
    font-size: 34px;
  }

  .contact-inner {
    width: min(100% - 44px, 980px);
    padding-right: 20px;
    padding-left: 20px;
  }

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

@media (max-width: 560px) {
  .site-nav,
  .hero-inner,
  .section-inner,
  .site-footer {
    width: min(100% - 32px, 980px);
  }

  .hero-copy h1 {
    font-size: 38px;
  }

  .hand-note {
    font-size: 18px;
  }

  .hero-actions,
  .contact-actions {
    display: grid;
  }

  .button {
    width: 100%;
    min-height: 56px;
  }

  .hero-tags {
    gap: 12px 16px;
    font-size: 14px;
  }

  .hero-visual img {
    width: 118%;
    max-width: none;
    transform: translateX(-8%);
  }

  .section-heading h2,
  .about-layout h2,
  .contact-inner h2 {
    font-size: 30px;
  }

  .service-body {
    padding: 24px 22px 26px;
  }

  .app-case-title {
    align-items: flex-start;
  }

  .app-icon {
    width: 56px;
    height: 56px;
    border-radius: 16px;
  }

  .app-case-copy > p {
    font-size: 15px;
    line-height: 1.88;
  }

  .case-facts div {
    grid-template-columns: 1fr;
    gap: 6px;
  }

  .app-gallery-main {
    min-height: 520px;
  }

  .app-actions {
    display: grid;
  }
}

@media (max-width: 360px) {
  .section-heading h2,
  .about-layout h2,
  .contact-inner h2 {
    font-size: 26px;
  }

  .hero-visual img {
    width: 100%;
    transform: none;
  }
}
