:root {
  --paper: #FAF7F2;
  --card: #FFFFFF;
  --ink: #2B2723;
  --ink-soft: #6B6459;
  --line: #E5DFD5;
  --wood: #8C5A2E;
  --wood-deep: #6B4423;
  --cta: #B7482E;
  --cta-deep: #96361F;
}

* {
  box-sizing: border-box;
}

html {
  background: var(--paper);
}

body {
  margin: 0;
  color: var(--ink);
  background: var(--paper);
  font-family: "Noto Sans JP", sans-serif;
  font-size: 15px;
  line-height: 1.9;
}

body,
button,
input,
textarea {
  font-family: "Noto Sans JP", sans-serif;
}

a {
  color: var(--wood);
}

a:hover {
  color: var(--wood-deep);
}

:focus-visible {
  outline: 2px solid var(--wood);
  outline-offset: 2px;
}

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

h1,
h2,
h3,
p,
figure,
dl {
  margin-top: 0;
}

h1,
h2,
h3 {
  margin-bottom: 16px;
  line-height: 1.45;
  letter-spacing: 0.04em;
}

h1 {
  font-size: 28px;
}

h2 {
  font-size: 28px;
}

h3 {
  font-size: 18px;
}

p {
  margin-bottom: 16px;
}

.serif {
  font-family: "Shippori Mincho", serif;
  font-weight: 500;
}

.site-header {
  position: sticky;
  top: 0;
  z-index: 30;
  display: flex;
  align-items: center;
  justify-content: space-between;
  min-height: 56px;
  padding: 0 max(32px, calc((100% - 1040px) / 2));
  background: var(--paper);
  border-bottom: 1px solid var(--line);
}

.brand-home,
.footer-brand {
  display: inline-flex;
  align-items: center;
  color: var(--ink);
  text-decoration: none;
}

.brand-home {
  min-width: 0;
  gap: 8px;
}

.brand-mark {
  width: 44px;
  height: 40px;
  flex: 0 0 44px;
  background: var(--wood);
  -webkit-mask: url("/assets/daiku-man-logo-mono.svg") center / contain no-repeat;
  mask: url("/assets/daiku-man-logo-mono.svg") center / contain no-repeat;
}

.brand-copy,
.footer-brand span {
  display: grid;
  gap: 0;
  line-height: 1.25;
}

.brand-copy strong {
  font-size: 22px;
  line-height: 1.15;
}

.brand-copy small,
.footer-brand small {
  color: var(--ink-soft);
  font-size: 13px;
}

.site-nav {
  display: flex;
  align-items: center;
  gap: 18px;
}

.site-nav a,
.footer-nav a {
  color: var(--ink);
  text-decoration: none;
}

.site-nav a:hover,
.footer-nav a:hover {
  color: var(--wood);
}

.site-nav > a:not(.header-phone),
.text-link {
  display: inline-flex;
  align-items: center;
  min-height: 44px;
  margin: -12px -8px;
  padding: 12px 8px;
  line-height: 20px;
}

.site-nav .header-phone {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 40px;
  padding: 8px 16px;
  color: var(--card);
  background: var(--cta);
  border-radius: 8px;
  font-size: 15px;
  font-weight: 500;
}

.header-phone:hover,
.mobile-call:hover,
.consultation .primary:hover,
.contact-form .primary:hover {
  color: var(--card);
  background: var(--cta-deep);
}

.nav-toggle {
  display: none;
  align-items: center;
  justify-content: center;
  width: 44px;
  height: 44px;
  padding: 0;
  color: var(--ink);
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: 8px;
  cursor: pointer;
}

.nav-toggle span {
  display: block;
  width: 24px;
  height: 2px;
  margin: 3px 0;
  background: currentColor;
}

.section-space {
  padding-top: 96px;
  padding-bottom: 96px;
}

.page,
.hero,
.consultation {
  width: min(1040px, calc(100% - 64px));
  margin-right: auto;
  margin-left: auto;
}

.hero {
  position: relative;
  height: min(70vh, 640px);
  padding-top: 0;
  padding-bottom: 0;
}

.hero-photo,
.hero-photo .photo-placeholder {
  width: 100%;
  height: 100%;
}

.hero-photo {
  height: 100%;
}

.hero-copy {
  position: absolute;
  bottom: 32px;
  left: 32px;
  max-width: 720px;
  padding: 24px;
  background: var(--card);
}

.hero-copy h1 {
  margin-bottom: 16px;
  font-size: 44px;
}

.hero-copy p {
  margin-bottom: 24px;
}

.hero-actions,
.consultation-actions,
.section-action {
  display: flex;
  flex-wrap: wrap;
  gap: 16px;
}

.button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 48px;
  padding: 12px 24px;
  border: 1px solid var(--ink);
  border-radius: 8px;
  color: var(--ink);
  background: transparent;
  font-size: 15px;
  font-weight: 500;
  line-height: 1.4;
  text-decoration: none;
}

.button:hover {
  color: var(--ink);
  background: var(--line);
}

.button.primary {
  color: var(--card);
  background: var(--cta);
  border-color: var(--cta);
}

.section-heading,
.page-heading {
  max-width: 760px;
  margin-bottom: 32px;
}

.section-heading h2,
.page-heading h1 {
  margin-bottom: 12px;
}

.section-heading p,
.page-heading p {
  margin-bottom: 0;
}

.reason-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 24px;
}

.reason-card,
.case-card,
.phone-panel,
.contact-form,
.faq-list article {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: 8px;
  box-shadow: 0 1px 3px rgba(43,39,35,.08);
}

.reason-card {
  min-height: 200px;
  padding: 24px;
}

.reason-card h3 {
  color: var(--wood);
}

.reason-card p,
.case-card-body p:last-child,
.small-note {
  color: var(--ink-soft);
  font-size: 13px;
}

.case-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 24px;
}

.case-card {
  overflow: hidden;
}

.case-card a {
  display: block;
  color: inherit;
  text-decoration: none;
}

.case-card-body {
  padding: 24px;
}

.case-card-body h3 {
  margin-bottom: 8px;
}

.case-card-body p {
  margin-bottom: 8px;
}

.case-meta {
  color: var(--ink-soft);
  font-size: 13px;
}

.section-action {
  margin-top: 32px;
}

.intro-grid,
.profile-grid,
.estimate-grid {
  display: grid;
  grid-template-columns: 120px minmax(0, 1fr);
  align-items: center;
  gap: 32px;
}

.portrait-placeholder {
  aspect-ratio: 1;
  border-radius: 50%;
}

.portrait-placeholder span,
.profile-photo span {
  padding: 12px;
  text-align: center;
}

.intro-grid h3 {
  margin-bottom: 12px;
}

.text-link {
  font-weight: 500;
}

.booking-band {
  padding: 24px;
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: 8px;
}

.consultation {
  padding-right: 0;
  padding-left: 0;
}

.page .consultation {
  width: 100%;
}

.consultation-actions {
  margin-bottom: 16px;
}

.consultation .small-note {
  margin-bottom: 0;
}

.page {
  padding-right: 0;
  padding-left: 0;
}

.breadcrumb {
  margin-bottom: 24px;
  color: var(--ink-soft);
  font-size: 13px;
}

.detail-photos {
  display: grid;
  gap: 24px;
}

.photo-figure {
  max-width: 760px;
  margin-bottom: 0;
}

.photo-figure figcaption {
  margin-top: 8px;
  color: var(--ink-soft);
  font-size: 13px;
}

.photo-placeholder {
  display: flex;
  align-items: center;
  justify-content: center;
  aspect-ratio: 3 / 2;
  padding: 24px;
  color: var(--ink);
  background: var(--line);
  border-radius: 8px;
  text-align: center;
  font-size: 13px;
  line-height: 1.6;
}

.detail-section,
.content-section {
  margin-top: 96px;
}

.detail-section p:last-child,
.content-section p:last-child,
.prose p:last-child {
  margin-bottom: 0;
}

.table-wrap {
  overflow-x: auto;
}

table {
  width: 100%;
  border-collapse: collapse;
}

th,
td {
  padding: 12px 16px;
  border-bottom: 1px solid var(--line);
  text-align: left;
}

th {
  font-weight: 700;
}

td:last-child {
  white-space: nowrap;
}

.estimate-grid {
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  align-items: start;
}

.estimate-placeholder {
  aspect-ratio: 4 / 3;
}

.photo-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 24px;
}

.profile-grid {
  grid-template-columns: minmax(220px, 320px) minmax(0, 1fr);
  align-items: start;
}

.profile-photo {
  aspect-ratio: 1;
  border-radius: 50%;
}

.profile-grid h2 {
  margin-bottom: 8px;
}

.prose {
  padding: 0;
}

.company-list {
  margin-bottom: 0;
}

.company-list div {
  display: grid;
  grid-template-columns: 140px minmax(0, 1fr);
  gap: 24px;
  padding: 12px 0;
  border-bottom: 1px solid var(--line);
}

.company-list div:last-child {
  border-bottom: 0;
}

.company-list dt {
  color: var(--ink-soft);
}

.company-list dd {
  margin: 0;
}

.phone-panel {
  margin-bottom: 32px;
  padding: 32px;
}

.phone-panel h2 {
  margin-bottom: 8px;
}

.phone-number {
  display: inline-block;
  color: var(--ink);
  font-size: 22px;
  font-weight: 700;
  line-height: 1.4;
}

.phone-panel .small-note {
  margin-bottom: 0;
}

.contact-form {
  display: grid;
  gap: 24px;
  padding: 32px;
}

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

.form-field label {
  font-weight: 700;
}

.contact-form input,
.contact-form textarea {
  width: 100%;
  padding: 12px 16px;
  color: var(--ink);
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: 8px;
  font-size: 16px;
  line-height: 1.6;
}

.contact-form input {
  min-height: 48px;
}

.contact-form textarea {
  min-height: 180px;
  resize: vertical;
}

.contact-form input:focus,
.contact-form textarea:focus {
  outline: 1px solid var(--wood);
  border-color: var(--wood);
}

.turnstile-slot {
  min-height: 0;
  color: var(--ink-soft);
  font-size: 13px;
}

.turnstile-slot:not(:empty) {
  min-height: 65px;
}

.form-submit {
  justify-self: start;
}

.faq-list {
  display: grid;
  gap: 16px;
}

.faq-list article {
  padding: 24px;
}

.faq-list h3 {
  margin-bottom: 8px;
}

.faq-list p {
  margin-bottom: 0;
}

.site-footer {
  padding: 64px max(32px, calc((100% - 1040px) / 2)) 24px;
  color: var(--card);
  background: var(--ink);
}

.footer-inner {
  display: flex;
  justify-content: space-between;
  gap: 32px;
  max-width: 1040px;
  margin: 0 auto;
}

.footer-brand {
  gap: 8px;
  color: var(--card);
}

.footer-brand .brand-mark {
  background: var(--line);
}

.footer-brand strong {
  color: var(--card);
  font-size: 22px;
  line-height: 1.15;
}

.footer-brand small,
.site-footer p,
.copyright {
  color: var(--line);
}

.site-footer p {
  max-width: 560px;
  margin: 16px 0 0;
}

.footer-nav {
  display: flex;
  flex-wrap: wrap;
  align-content: start;
  gap: 8px 16px;
  max-width: 360px;
}

.footer-nav a {
  color: var(--card);
  font-size: 13px;
}

.copyright {
  max-width: 1040px;
  margin: 48px auto 0;
  padding-top: 16px;
  border-top: 1px solid var(--line);
  font-size: 13px;
}

.mobile-cta {
  display: none;
}

html.js .reveal {
  opacity: 0;
  transform: translateY(12px);
  transition: opacity .5s ease-out, transform .5s ease-out;
}

html.js .reveal.is-visible {
  opacity: 1;
  transform: none;
}

@media (min-width: 769px) {
  html.js .reason-grid > .reveal:nth-child(2) {
    transition-delay: .08s;
  }

  html.js .reason-grid > .reveal:nth-child(3) {
    transition-delay: .16s;
  }
}

@media (prefers-reduced-motion: reduce) {
  html.js .reveal,
  html.js .reason-grid > .reveal:nth-child(2),
  html.js .reason-grid > .reveal:nth-child(3) {
    opacity: 1;
    transform: none;
    transition: none;
  }
}

@media (max-width: 768px) {
  body {
    padding-bottom: calc(60px + env(safe-area-inset-bottom));
  }

  .site-header {
    padding-right: 20px;
    padding-left: 20px;
  }

  .brand-copy strong {
    font-size: 18px;
  }

  .brand-copy small {
    display: none;
  }

  .site-nav {
    position: fixed;
    inset: 56px 0 0;
    z-index: 29;
    display: none;
    align-items: stretch;
    flex-direction: column;
    gap: 0;
    padding: 32px 20px;
    background: var(--paper);
  }

  .site-nav.is-open {
    display: flex;
  }

  .site-nav a {
    display: flex;
    align-items: center;
    border-bottom: 1px solid var(--line);
  }

  .site-nav > a:not(.header-phone) {
    min-height: 48px;
    margin: 0;
    padding: 8px 0;
  }

  .site-nav .header-phone {
    justify-content: center;
    margin-top: 24px;
    border-bottom: 0;
  }

  .nav-toggle {
    display: inline-flex;
    flex-direction: column;
    flex: 0 0 44px;
  }

  .section-space {
    padding-top: 64px;
    padding-bottom: 64px;
  }

  .page,
  .hero,
  .consultation {
    width: calc(100% - 40px);
  }

  .hero {
    display: block;
    height: auto;
    padding-top: 0;
    padding-bottom: 0;
  }

  .hero-photo,
  .hero-photo .photo-placeholder {
    min-height: 0;
    height: auto;
  }

  .hero-copy {
    position: static;
    max-width: none;
    padding: 24px 0 0;
    background: transparent;
  }

  .hero-copy h1,
  .page-heading h1 {
    font-size: 30px;
  }

  h1,
  .section-heading h2 {
    font-size: 22px;
  }

  .hero-actions,
  .consultation-actions,
  .section-action {
    align-items: stretch;
    flex-direction: column;
  }

  .hero-actions .button,
  .consultation-actions .button,
  .section-action .button,
  .form-submit {
    width: 100%;
  }

  .reason-grid,
  .case-grid,
  .photo-grid,
  .estimate-grid,
  .profile-grid {
    grid-template-columns: 1fr;
  }

  .reason-card,
  .case-card-body,
  .phone-panel,
  .contact-form,
  .faq-list article {
    padding: 24px;
  }

  .detail-section,
  .content-section {
    margin-top: 64px;
  }

  .intro-grid {
    grid-template-columns: 120px minmax(0, 1fr);
    gap: 24px;
  }

  .profile-grid {
    gap: 24px;
  }

  .profile-photo {
    max-width: 240px;
  }

  .company-list div {
    grid-template-columns: 1fr;
    gap: 4px;
  }

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

  .mobile-cta {
    position: fixed;
    right: 0;
    bottom: 0;
    left: 0;
    z-index: 40;
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    min-height: 60px;
    padding-bottom: env(safe-area-inset-bottom);
    background: var(--paper);
    border-top: 1px solid var(--line);
  }

  .mobile-cta a {
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 60px;
    padding: 8px 12px;
    color: var(--card);
    font-size: 15px;
    font-weight: 500;
    text-align: center;
    text-decoration: none;
  }

  .mobile-cta svg {
    width: 20px;
    height: 20px;
    margin-right: 8px;
    fill: none;
    stroke: currentColor;
    stroke-linecap: round;
    stroke-linejoin: round;
    stroke-width: 2;
  }

  .mobile-call {
    background: var(--cta);
  }

  .mobile-consult {
    background: var(--ink);
  }

  .mobile-consult:hover {
    color: var(--card);
    background: var(--wood-deep);
  }
}
