/* ===== 色と基本（ハチマル珈琲焙煎所「つくっているもの」と同じ色） ===== */
:root {
  color-scheme: light;
  --paper: #F4F5F3;   /* 生成りの白 */
  --ink: #2A1C14;     /* 文字：焦げ茶 */
  --sub: #645A52;     /* 補足の文字 */
  --ai: #23426E;      /* 藍色 */
  --line: #BEC6CE;
  --wash: #E5E9ED;
  --alt: #E8EDE7;
  --band-ink: #FFFFFF;
  --frame: #2A1C14;
  --field: #FFFFFF;
  --error: #B42318;
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    color-scheme: dark;
    --paper: #1E1B19; --ink: #F0EDE8; --sub: #C5BBB2; --ai: #ACC4E7;
    --line: #555351; --wash: #2B3036; --alt: #252D27; --band-ink: #192536;
    --frame: #70645B; --field: #2B2826; --error: #F97066;
  }
}

*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; scroll-padding-top: 72px; }
body {
  background: var(--paper); color: var(--ink);
  font-family: "BIZ UDPGothic", sans-serif;
  font-size: 18px; line-height: 1.9; letter-spacing: .015em; overflow-wrap: anywhere;
}
a { color: inherit; }
img { display: block; max-width: 100%; height: auto; }
:focus-visible { outline: 3px solid var(--ai); outline-offset: 4px; }

.wrap { width: min(100% - 40px, 1000px); margin-inline: auto; }
.narrow { width: min(100% - 40px, 760px); }

h2 {
  font-family: "Zen Old Mincho", serif; font-weight: 900;
  font-size: clamp(26px, 6.8vw, 36px); line-height: 1.5; letter-spacing: .03em;
}
.lead { margin-top: 12px; color: var(--sub); }

/* ===== ヘッダー ===== */
.site-header {
  position: sticky; top: 0; z-index: 100;
  background: var(--paper); border-top: 6px solid var(--ai); border-bottom: 1px solid var(--line);
}
.header-inner { display: flex; align-items: center; justify-content: space-between; min-height: 62px; }
.logo { font-family: "Zen Old Mincho", serif; font-weight: 900; font-size: 20px; text-decoration: none; color: var(--ai); }
.logo small { font-family: "BIZ UDPGothic", sans-serif; font-weight: 400; font-size: 13px; color: var(--sub); margin-left: 10px; }
.site-nav { display: flex; gap: 26px; align-items: center; }
.site-nav a { text-decoration: none; font-size: 16px; font-weight: 700; }
.site-nav a:hover { color: var(--ai); text-decoration: underline; text-underline-offset: 6px; }
.site-nav .nav-cta { background: var(--ai); color: var(--band-ink); padding: 6px 20px; border-radius: 4px; }
.site-nav .nav-cta:hover { color: var(--band-ink); text-decoration: none; opacity: .9; }

.nav-toggle {
  display: none; width: 48px; height: 48px; border: 0; background: transparent; cursor: pointer;
  flex-direction: column; justify-content: center; align-items: center; gap: 6px;
}
.nav-toggle span { width: 26px; height: 2px; background: var(--ink); transition: transform .2s, opacity .2s; }
.nav-toggle[aria-expanded="true"] span:nth-child(1) { transform: translateY(8px) rotate(45deg); }
.nav-toggle[aria-expanded="true"] span:nth-child(2) { opacity: 0; }
.nav-toggle[aria-expanded="true"] span:nth-child(3) { transform: translateY(-8px) rotate(-45deg); }

/* ===== 最初に見える場所 ===== */
.hero { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 24px 16px; padding-block: 28px 40px; }
.hero h1 {
  grid-column: 2; grid-row: 1; writing-mode: vertical-rl;
  font-family: "Zen Old Mincho", serif; font-weight: 900;
  font-size: clamp(26px, 7.2vw, 32px); line-height: 1.45; letter-spacing: .06em; color: var(--ai);
  animation: arrival 900ms ease-out both;
}
.hero-scene { grid-column: 1; grid-row: 1; align-self: center; min-width: 0; }
.hero-photo { width: 100%; aspect-ratio: 3 / 2; object-fit: cover; }
.shop { margin-top: 22px; font-size: 17px; }
.shop b { display: block; font-family: "Zen Old Mincho", serif; font-size: 25px; font-weight: 600; letter-spacing: .04em; margin-bottom: 2px; }
.lines { grid-column: 1 / -1; list-style: none; border-top: 1px solid var(--line); padding-top: 20px; }
.lines li { font-size: 18px; font-weight: 700; }
.lines li + li { margin-top: 8px; }
.profile { grid-column: 1 / -1; max-width: 30em; font-size: 17px; line-height: 1.95; }
.hero-cta { grid-column: 1 / -1; justify-self: start; font-weight: 700; color: var(--ai); text-underline-offset: 6px; font-size: 18px; }
@keyframes arrival { from { opacity: 0; transform: translateY(12px); } to { opacity: 1; transform: none; } }

/* ===== セクション共通 ===== */
.group { padding-block: 44px 52px; border-top: 3px solid var(--ai); }
.group-alt { background: var(--alt); }

/* ===== できること ===== */
.service-grid { display: grid; gap: 16px; margin-top: 28px; }
.service { background: var(--paper); border: 1px solid var(--line); border-left: 5px solid var(--ai); padding: 22px 24px; }
.service-num { font-family: "Zen Old Mincho", serif; font-weight: 900; font-size: 28px; line-height: 1; color: var(--ai); margin-bottom: 10px; }
.service h3 { font-size: 21px; line-height: 1.5; margin-bottom: 6px; }
.service p:last-child { color: var(--sub); }

/* ===== つくったもの ===== */
.works { list-style: none; display: grid; gap: 40px 28px; margin-top: 32px; }
.shot {
  display: block; width: min(100%, 260px); aspect-ratio: 9 / 15; margin: 0 auto 18px;
  overflow: hidden; border: 6px solid var(--frame); border-radius: 24px;
  background: var(--wash); box-shadow: 6px 8px 0 var(--wash);
}
.shot img { width: 100%; height: 100%; object-fit: cover; object-position: top; transition: transform .4s; }
.shot:hover img { transform: scale(1.03); }
.kind { font-size: 15px; color: var(--sub); line-height: 1.7; margin-bottom: 4px; }
.demo { display: inline-block; font-size: 13px; font-weight: 700; border: 1px solid var(--line); padding: 0 8px; margin-left: 8px; }
.work h3 { font-size: 20px; line-height: 1.55; }
.catch { font-family: "Zen Old Mincho", serif; font-weight: 900; font-size: 19px; line-height: 1.6; color: var(--ai); margin-top: 8px; }
.open {
  display: inline-flex; align-items: center; min-height: 44px; margin-top: 6px;
  color: var(--ai); font-weight: 700; text-underline-offset: 7px; text-decoration-thickness: 1px;
}
.open:hover { text-decoration-thickness: 3px; }

.soon { border-top: 3px solid var(--ai); padding-top: 30px; margin-top: 52px; }
.soon ul { list-style: none; margin-top: 18px; border-bottom: 1px dashed var(--line); }
.soon li { position: relative; padding: 16px 0 16px 16px; border-top: 1px solid var(--line); }
.soon li::before { content: ""; position: absolute; left: 0; top: 24px; width: 3px; height: 20px; background: var(--ai); }

/* ===== 店について ===== */
.about-table { width: 100%; border-collapse: collapse; margin-top: 28px; }
.about-table th, .about-table td { padding: 16px 14px; border-bottom: 1px solid var(--line); text-align: left; vertical-align: top; }
.about-table th { width: 30%; color: var(--ai); font-weight: 700; }
.about-table a { color: var(--ai); text-underline-offset: 5px; }

/* ===== いちばん下の帯 ===== */
.band { background: var(--ai); color: var(--band-ink); }
.band .wrap { padding-block: 40px 44px; }
.band p { font-family: "Zen Old Mincho", serif; font-weight: 600; font-size: 24px; line-height: 1.8; letter-spacing: .04em; max-width: 26em; text-wrap: balance; }
.band .band-sub { font-family: "BIZ UDPGothic", sans-serif; font-weight: 400; font-size: 17px; margin-top: 14px; }

/* ===== お問い合わせ ===== */
.contact { padding-block: 52px 64px; }
.contact-form { margin-top: 28px; border: 1px solid var(--line); border-top: 5px solid var(--ai); padding: 28px 22px; background: var(--paper); }
.field { margin-bottom: 22px; }
.field label { display: block; font-weight: 700; margin-bottom: 8px; }
.req, .opt { font-size: 13px; font-weight: 700; padding: 1px 8px; margin-left: 6px; vertical-align: 2px; border-radius: 3px; }
.req { background: var(--ai); color: var(--band-ink); }
.opt { border: 1px solid var(--line); color: var(--sub); }
.field input, .field textarea {
  width: 100%; padding: 13px 14px; font: inherit; font-size: 18px; color: var(--ink);
  background: var(--field); border: 2px solid var(--line); border-radius: 4px;
}
.field textarea::placeholder { color: var(--sub); opacity: .8; font-size: 16px; }
.field input:focus, .field textarea:focus { outline: none; border-color: var(--ai); }
.field .invalid { border-color: var(--error); }
.error { color: var(--error); font-size: 16px; font-weight: 700; margin-top: 6px; }
.error:empty { display: none; }
/* ご相談の種類（押して選ぶタブ） */
.topic { border: 0; margin: 0 0 22px; padding: 0; min-width: 0; }
.topic legend { font-weight: 700; margin-bottom: 8px; padding: 0; }
.topic-tabs { display: grid; grid-template-columns: repeat(4, 1fr); gap: 8px; }
.topic-tabs label { position: relative; }
.topic-tabs input { position: absolute; opacity: 0; width: 1px; height: 1px; }
.topic-tabs span {
  display: flex; align-items: center; justify-content: center; text-align: center;
  min-height: 52px; padding: 6px 8px; cursor: pointer; font-weight: 700; font-size: 16px; line-height: 1.4;
  background: var(--field); color: var(--ink); border: 2px solid var(--line); border-radius: 4px;
}
.topic-tabs span:hover { border-color: var(--ai); }
.topic-tabs input:checked + span { background: var(--ai); color: var(--band-ink); border-color: var(--ai); }
.topic-tabs input:focus-visible + span { outline: 3px solid var(--ai); outline-offset: 3px; }
.topic-tabs.invalid span { border-color: var(--error); }
@media (max-width: 559px) { .topic-tabs { grid-template-columns: repeat(2, 1fr); } }

.hp { position: absolute; left: -9999px; width: 1px; height: 1px; overflow: hidden; }
.privacy { font-size: 15px; color: var(--sub); margin-bottom: 18px; }
.btn-submit {
  width: 100%; min-height: 58px; border: 0; border-radius: 4px; cursor: pointer;
  background: var(--ai); color: var(--band-ink); font: inherit; font-size: 19px; font-weight: 700;
}
.btn-submit:hover { opacity: .9; }
.btn-submit:disabled { opacity: .55; cursor: wait; }
.form-result { margin-top: 18px; font-size: 17px; }
.form-result:not(:empty) { padding: 16px; border: 2px solid var(--ai); background: var(--wash); }
.form-result.ng { border-color: var(--error); }

.alt-contact { display: flex; flex-wrap: wrap; gap: 12px 14px; margin-top: 24px; }
.alt-contact a {
  display: inline-flex; align-items: center; justify-content: center; min-height: 52px; padding: 0 22px;
  font-weight: 700; text-decoration: none; border-radius: 4px; border: 2px solid var(--ai); color: var(--ai);
}
.alt-contact a:hover { background: var(--wash); }

/* ===== フッター ===== */
.site-footer { border-top: 3px solid var(--ai); padding: 22px 0; font-size: 15px; color: var(--sub); text-align: center; }

/* ===== 広い画面 ===== */
@media (min-width: 760px) {
  .wrap { width: min(100% - 96px, 1000px); }
  .narrow { width: min(100% - 96px, 760px); }
  .hero { padding-block: 52px 56px; gap: 28px 48px; }
  .hero h1 { font-size: clamp(40px, 5vw, 56px); }
  .shop b { font-size: 32px; }
  .lines li { font-size: 20px; }
  .service-grid { grid-template-columns: repeat(3, 1fr); }
  .works { grid-template-columns: repeat(3, 1fr); }
  .band p { font-size: 30px; }
  .contact-form { padding: 36px; }
}

/* ===== スマホ ===== */
@media (max-width: 759px) {
  .nav-toggle { display: flex; }
  .logo small { display: none; }
  .site-nav {
    position: absolute; top: 100%; left: 0; right: 0; display: none;
    flex-direction: column; gap: 0; align-items: stretch;
    background: var(--paper); border-bottom: 1px solid var(--line);
  }
  .site-nav.open { display: flex; }
  .site-nav a { padding: 16px 20px; border-top: 1px solid var(--line); font-size: 18px; }
  .site-nav .nav-cta { border-radius: 0; }
  .works { grid-template-columns: 1fr 1fr; gap: 32px 14px; }
  .shot { border-width: 4px; border-radius: 16px; box-shadow: 4px 5px 0 var(--wash); }
  .work h3 { font-size: 17px; }
  .catch { font-size: 16px; }
  .kind { font-size: 13px; }
  .demo { margin-left: 0; display: table; margin-top: 2px; }
  .about-table th, .about-table td { display: block; width: 100%; }
  .about-table th { border-bottom: 0; padding-bottom: 2px; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; }
  html { scroll-behavior: auto; }
}
