/* 木目工房リフォーム: tokens first, everything downstream uses them */
:root {
  --bg: #f2f2ef;
  --surface: #e5e5e1;
  --ink: #2b2118;
  --muted: #6b5e50;
  --accent: #2f6b4f;
  --accent-ink: #ffffff;
  --walnut: #2b2118;
  --on-walnut: #f2f2ef;
  --on-walnut-soft: #cfc4b4;
  --font-head: "Zen Kaku Gothic New", "Noto Sans JP", "Hiragino Sans", sans-serif;
  --font-body: "Noto Sans JP", "Hiragino Sans", "Yu Gothic", sans-serif;
  --margin: clamp(20px, 5vw, 72px);
  --radius: 0;
  --step-small: 1rem;
  --step-body: 1.0625rem;
    --step-statement: clamp(1.5rem, 1.1rem + 1.4vw, 2.25rem);
  --step-head: clamp(1.75rem, 1.2rem + 2.2vw, 3.5rem);
  --step-hero: var(--step-head);
  --ease: cubic-bezier(.2, .7, .2, 1);
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: var(--font-body);
  font-size: var(--step-body);
  line-height: 1.85;
  font-weight: 400;
  word-break: auto-phrase;
  line-break: strict;
  overflow-wrap: break-word;
}
img { display: block; max-width: 100%; height: auto; }
a { color: inherit; }
a:focus-visible, button:focus-visible, input:focus-visible, select:focus-visible, textarea:focus-visible, summary:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 3px;
}
h1, h2, h3 {
  font-family: var(--font-head);
  font-weight: 700;
  line-height: 1.4;
  letter-spacing: 0;
  margin: 0;
  word-break: auto-phrase;
  line-break: strict;
}
p { margin: 0; max-width: 36em; }
figure { margin: 0; }
.visually-hidden {
  position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap;
}
.caption { font-size: var(--step-small); color: var(--muted); line-height: 1.75; }
.fine { font-size: var(--step-small); color: var(--muted); line-height: 1.75; }

/* buttons: one shape (square), one radius, one pair of margins */
.btn {
  display: inline-block;
  padding: 14px 26px;
  font-family: var(--font-head);
  font-weight: 500;
  font-size: 1rem;
  line-height: 1.3;
  text-decoration: none;
  border: 0;
  border-radius: var(--radius);
  cursor: pointer;
  transition: transform .2s var(--ease), background-color .2s;
}
.btn-accent { background: var(--accent); color: var(--accent-ink); }
.btn-accent:hover { background: #245a40; }
.btn-light { background: var(--on-walnut); color: var(--walnut); padding: 10px 18px; font-size: .9375rem; }
.btn-light:hover { background: #fff; }
.btn-line { color: var(--on-walnut); background: #4a3d32; }
.btn-line:hover { color: #fff; background: #5a4c3f; }
.btn:hover { transform: translateY(-2px); }
.btn:active { transform: translateY(0) scale(.98); }
.text-link { font-weight: 500; color: var(--accent); text-decoration: underline; text-underline-offset: 4px; }
.text-link:hover { color: #245a40; }

/* header */
.site-head {
  display: flex;
  align-items: center;
  gap: 24px;
  padding: 22px var(--margin);
  background: var(--walnut);
  color: var(--on-walnut);
  position: relative;
  z-index: 3;
}
.wordmark {
  font-family: var(--font-head);
  font-weight: 700;
  font-size: 1.0625rem;
  text-decoration: none;
  white-space: nowrap;
}
.site-nav { display: flex; gap: 22px; margin-left: auto; flex-wrap: wrap; }
.site-nav a {
  text-decoration: none;
  font-size: 1rem;
}
.site-nav a:hover { text-decoration: underline; text-underline-offset: 5px; }

/* hero: dark walnut field, one large print lit in it, a small one below the headline */
.hero {
  position: relative;
  background: var(--walnut);
  color: var(--on-walnut);
  min-height: 92svh;
  padding: 0 var(--margin) 56px;
  display: grid;
  grid-template-columns: repeat(12, 1fr);
  grid-template-rows: auto 1fr;
  gap: 16px;
}
.hero-main {
  grid-column: 6 / 13;
  grid-row: 1 / 3;
  align-self: start;
  margin-top: 6svh;
  aspect-ratio: 6 / 5;
  overflow: hidden;
}
.hero-main img { width: 100%; height: 100%; object-fit: cover; object-position: 62% 50%; }
.hero-small {
  grid-column: 1 / 4;
  grid-row: 2;
  align-self: end;
  width: min(100%, 240px);
  aspect-ratio: 1 / 1;
  overflow: hidden;
}
.hero-small img { width: 100%; height: 100%; object-fit: cover; filter: brightness(.7); }
.hero-text {
  grid-column: 1 / 6;
  grid-row: 1;
  align-self: start;
  padding-top: 14svh;
}
.hero h1 {
  font-size: var(--step-hero);
  font-weight: 500;
  line-height: 1.35;
  color: #fff;
}
.hero-lead {
  margin-top: 20px;
  font-size: var(--step-body);
  color: var(--on-walnut-soft);
  max-width: 26em;
}
.actions { display: flex; gap: 12px; flex-wrap: wrap; margin-top: 28px; }
.hero .btn-accent { background: var(--on-walnut); color: var(--walnut); }
.hero .btn-accent:hover { background: #fff; }
.hero .btn-line { color: var(--on-walnut); }

/* intro */
.intro { padding: clamp(120px, 16vw, 200px) var(--margin) clamp(80px, 10vw, 140px); }
.statement {
  font-family: var(--font-head);
  font-weight: 500;
  font-size: var(--step-statement);
  line-height: 1.7;
  max-width: 24em;
  margin-left: 6%;
}
.trio {
  display: grid;
  grid-template-columns: repeat(12, 1fr);
  gap: 24px 16px;
  margin-top: clamp(80px, 10vw, 140px);
}
.trio > div:nth-child(1) { grid-column: 1 / 5; }
.trio > div:nth-child(2) { grid-column: 6 / 10; margin-top: 90px; }
.trio > div:nth-child(3) { grid-column: 9 / 13; margin-top: 30px; }
.trio h2 { font-size: 1.25rem; margin-bottom: 14px; }
.trio p { max-width: 30ch; color: var(--ink); }

/* works */
.works { padding: clamp(80px, 10vw, 140px) var(--margin); background: var(--surface); }
.section-head { display: grid; gap: 14px; margin-bottom: clamp(48px, 6vw, 80px); }
.section-head h2 { font-size: var(--step-head); }
.work-grid {
  list-style: none;
  padding: 0;
  margin: 0;
  display: grid;
  grid-template-columns: repeat(12, 1fr);
  gap: 56px 16px;
}
.work img { width: 100%; height: auto; object-fit: cover; transition: transform .6s var(--ease); }
.work:hover img { transform: scale(1.02); }
.work-meta { margin-top: 14px; }
.work-meta h3 { font-size: 1.25rem; }
.work-meta p { font-size: var(--step-small); color: var(--muted); margin-top: 6px; line-height: 1.7; }
.work-a { grid-column: 1 / 8; }
.work-b { grid-column: 9 / 13; margin-top: 140px; }
.work-c { grid-column: 2 / 5; }
.work-d { grid-column: 6 / 13; margin-top: 40px; }
.work-e { grid-column: 1 / 7; }
.work-f { grid-column: 8 / 11; margin-top: 60px; }
.work-a img, .work-d img, .work-e img { aspect-ratio: 16 / 10; object-fit: cover; }
.work-b img { aspect-ratio: 4 / 3.3; object-fit: cover; }
.work-c img { aspect-ratio: 2 / 3; object-fit: cover; }
.work-f img { aspect-ratio: 3 / 4; object-fit: cover; }
.works .caption { max-width: 60ch; }

/* showcase: daily reports, a run of frames */
.showcase { padding: clamp(100px, 12vw, 180px) 0 clamp(80px, 10vw, 120px); overflow: hidden; }
.showcase-head {
  display: grid;
  gap: 14px;
  padding: 0 var(--margin);
  margin-bottom: 40px;
}
.showcase-head h2 { font-size: var(--step-head); }
.showcase-head p { color: var(--muted); }
.showcase-head .text-link { justify-self: start; margin-top: 6px; }
.run {
  display: flex;
  flex-wrap: wrap;
  align-items: end;
  gap: 12px;
  padding: 0 var(--margin);
}
.frame { flex: 0 0 auto; }
.frame img { height: 34svh; width: auto; min-width: 180px; object-fit: cover; }
.frame figcaption { font-size: var(--step-small); color: var(--muted); margin-top: 8px; }
.frame-lift img { height: 62svh; }
.showcase > .caption { padding: 0 var(--margin); margin-top: 20px; }

/* flow */
.flow { padding: clamp(120px, 14vw, 200px) var(--margin); }
.flow-head { margin-bottom: 64px; }
.flow-head h2 { font-size: var(--step-head); }
.steps {
  list-style: none;
  padding: 0;
  margin: 0;
  display: grid;
  grid-template-columns: repeat(12, 1fr);
  gap: 48px 16px;
}
.step { grid-column: span 6; background: var(--surface); padding: 32px 30px; }
.step:nth-child(odd) { grid-column: 1 / 7; }
.step:nth-child(even) { grid-column: 7 / 13; margin-top: 60px; }
.step:nth-child(5) { grid-column: 1 / 7; margin-top: 0; }
.step h3 { font-size: 1.25rem; }
.step p { margin-top: 10px; }

/* price */
.price { padding: clamp(100px, 12vw, 170px) var(--margin); background: var(--walnut); color: var(--on-walnut); }
.price-head { display: grid; gap: 14px; margin-bottom: 56px; }
.price-head h2 { font-size: var(--step-head); color: #fff; }
.price-head p { color: var(--on-walnut-soft); }
.price-table {
  width: 100%;
  border-collapse: collapse;
  font-size: var(--step-body);
  max-width: 900px;
}
.price-table th, .price-table td { text-align: left; padding: 18px 12px 18px 0; vertical-align: top; }
.price-table thead th { font-size: var(--step-small); color: var(--on-walnut-soft); font-weight: 500; }
.price-table tbody th { font-weight: 500; }
.price-table tbody tr + tr td, .price-table tbody tr + tr th { padding-top: 18px; }
.price-table td { color: #fff; font-variant-numeric: tabular-nums; }
.estimate {
  margin-top: 72px;
  max-width: 620px;
  display: grid;
  gap: 24px;
  padding: 36px 32px;
  background: #3a2e24;
}
.estimate h3 { font-size: 1.25rem; color: #fff; }
.estimate .field label, .estimate legend { color: var(--on-walnut-soft); }
.estimate input[type="number"] {
  background: var(--walnut);
  color: #fff;
}
.result { display: grid; gap: 6px; padding: 22px 24px; background: var(--walnut); }
.result-cost { font-family: var(--font-head); font-size: var(--step-statement); color: #fff; font-weight: 500; font-variant-numeric: tabular-nums; }
.result-time { color: var(--on-walnut-soft); }
.estimate .fine { color: var(--on-walnut-soft); }

.field { display: grid; gap: 8px; border: 0; padding: 0; margin: 0; min-width: 0; }
.field label, .field legend { font-size: var(--step-small); font-weight: 500; padding: 0; }
input[type="text"], input[type="number"], select, textarea {
  font: inherit;
  font-size: 1rem;
  color: var(--ink);
  background: var(--bg);
  border: 0;
  border-radius: var(--radius);
  padding: 14px 16px;
  min-height: 48px;
  width: 100%;
}
textarea { resize: vertical; }
.choice { display: flex; gap: 8px; flex-wrap: wrap; }
.choice label {
  display: inline-flex; align-items: center; gap: 8px;
  padding: 12px 18px; min-height: 48px;
  background: var(--walnut);
  color: var(--on-walnut);
  cursor: pointer;
  font-size: 1rem;
  transition: background-color .2s;
}
.choice label:has(input:checked) { background: var(--on-walnut); color: var(--walnut); }
.choice input { accent-color: var(--accent); }

/* faq */
.faq { padding: clamp(120px, 14vw, 200px) var(--margin); }
.faq h2 { font-size: var(--step-head); max-width: 14em; }
.faq-list { margin-top: 80px; margin-left: 33%; max-width: 760px; }
.faq details { padding: 0; margin-bottom: 36px; }
.faq summary {
  cursor: pointer;
  list-style: none;
  font-family: var(--font-head);
  font-size: 1.25rem;
  font-weight: 500;
  line-height: 1.6;
  padding-right: 40px;
  position: relative;
}
.faq summary::-webkit-details-marker { display: none; }
.faq summary::before, .faq summary::after {
  content: "";
  position: absolute; right: 4px; top: 14px;
  width: 14px; height: 2px; background: var(--ink);
  transition: transform .3s var(--ease);
}
.faq summary::after { transform: rotate(90deg); }
.faq details[open] summary::after { transform: rotate(0deg); }
.faq details p {
  margin-top: 16px; padding: 24px;
  background: var(--surface);
  max-width: 48ch;
  font-size: 1.0625rem;
}

/* contact */
.contact {
  padding: clamp(140px, 16vw, 220px) var(--margin) clamp(120px, 12vw, 180px);
  background: var(--surface);
  display: grid;
  grid-template-columns: repeat(12, 1fr);
  gap: 40px 16px;
  align-items: start;
}
.contact-main { grid-column: 1 / 6; }
.contact-main h2 { font-size: var(--step-head); }
.contact-main p { margin-top: 18px; color: var(--muted); max-width: 30em; }
.contact-side { grid-column: 7 / 12; }
.contact-q { font-weight: 500; }
.contact-links { list-style: none; padding: 0; margin: 20px 0 0; display: grid; gap: 22px; }
.contact-links a { font-size: 1.25rem; font-weight: 500; color: var(--ink); text-decoration: underline; text-underline-offset: 5px; }
.contact-links span { display: block; font-size: var(--step-small); color: var(--muted); margin-top: 4px; }
.mail-form {
  grid-column: 1 / 13;
  display: grid;
  gap: 20px;
  max-width: 620px;
  margin-top: 40px;
  padding-top: 40px;
  background: transparent;
}
.mail-form h3 { font-size: 1.25rem; }
.mail-form .btn { justify-self: start; }

/* footer */
.site-foot {
  background: var(--walnut);
  color: var(--on-walnut);
  padding: 72px var(--margin) 40px;
  display: grid;
  gap: 40px;
}
.foot-name {
  font-family: var(--font-head);
  font-weight: 700;
  font-size: clamp(2.25rem, 1rem + 6vw, 6rem);
  line-height: 1.1;
}
.foot-cols { display: grid; grid-template-columns: repeat(3, 1fr); gap: 24px; font-size: var(--step-small); }
.foot-cols p { color: var(--on-walnut-soft); }
.foot-cols a { display: block; color: var(--on-walnut); text-decoration: none; margin-bottom: 8px; }
.foot-cols a:hover { text-decoration: underline; }
.site-foot .credits { font-size: 1rem; color: var(--on-walnut-soft); line-height: 1.8; }
.site-foot .credits a { color: var(--on-walnut-soft); }
.site-foot .legal { font-size: var(--step-small); color: var(--on-walnut-soft); }

/* motion: entrance once per part, then stays still; reduced motion keeps the content */
.js .reveal { opacity: 0; transform: translateY(22px); transition: opacity .8s var(--ease), transform .8s var(--ease); }
.js .reveal.is-in { opacity: 1; transform: none; }
.js .reveal:nth-child(2) { transition-delay: 80ms; }
.js .reveal:nth-child(3) { transition-delay: 160ms; }
.js .reveal-photo { opacity: 0; transform: translateY(24px); transition: opacity 1.2s var(--ease), transform 1.2s var(--ease); }
.js .reveal-photo.is-in { opacity: 1; transform: none; }
.hero-main img { animation: drift 24s ease-in-out infinite alternate; }
@keyframes drift { from { transform: scale(1.0); } to { transform: scale(1.06); } }
.js .step, .js .work { transition-delay: 0ms; }

@media (max-width: 860px) {
  .site-head { flex-wrap: wrap; gap: 12px 18px; }
  .site-nav { order: 3; width: 100%; margin-left: 0; gap: 16px; }
  .hero { grid-template-columns: 1fr; gap: 20px; min-height: auto; padding-bottom: 40px; grid-template-rows: none; }
  .hero-text { grid-column: 1; grid-row: auto; order: -1; padding-top: 48px; }
  .hero-main { grid-column: 1; grid-row: auto; margin-top: 0; aspect-ratio: 4 / 5; width: 84%; justify-self: end; }
  .hero-small { grid-column: 1; grid-row: auto; margin-top: -90px; width: 36%; justify-self: start; position: relative; }
  .trio { grid-template-columns: 1fr; }
  .trio > div { grid-column: auto !important; margin-top: 0 !important; }
  .statement { margin-left: 0; font-size: 1.5rem; line-height: 1.75; }
  .work-grid { grid-template-columns: 1fr; gap: 48px; }
  .work { grid-column: auto !important; margin-top: 0 !important; }
  .work:nth-child(odd) { width: 86%; }
  .work:nth-child(even) { width: 78%; justify-self: end; }
  .work-grid { display: grid; }
  .steps { grid-template-columns: 1fr; }
  .step, .step:nth-child(n) { grid-column: auto !important; margin-top: 0 !important; }
  .faq-list { margin-left: 0; }
  .estimate { padding: 28px 22px; }
  .contact-main, .contact-side { grid-column: 1 / 13; }
  .foot-cols { grid-template-columns: 1fr 1fr; }
  .frame img { height: 34vw; }
  .frame-lift img { height: 60vw; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .hero-main img { animation: none; }
  .js .reveal, .js .reveal-photo { opacity: 1; transform: none; transition: none; }
  .btn, .work img, .faq summary::before, .faq summary::after, .site-nav a { transition: none; }
  .btn:hover, .btn:active { transform: none; }
}
