/* ============================================
   株式会社みやこ建設 — 建築・リフォーム サンプル
   ============================================ */

:root {
  --navy: #1b2a41;
  --navy-dark: #14202f;
  --accent: #d97b29;
  --accent-dark: #b96218;
  --ink: #2b2b2b;
  --gray: #6b7280;
  --bg: #ffffff;
  --bg-gray: #f4f5f2;
  --line: #e3e4e0;
  --serif: "Zen Old Mincho", serif;
  --sans: "Noto Sans JP", sans-serif;
}

* { margin: 0; padding: 0; box-sizing: border-box; }

html { scroll-behavior: smooth; scroll-padding-top: 80px; }

body {
  font-family: var(--sans);
  color: var(--ink);
  background: var(--bg);
  line-height: 1.9;
  font-size: 16px;
  overflow-x: hidden;
}

img { max-width: 100%; display: block; }
a { color: inherit; text-decoration: none; }
ul, ol { list-style: none; }
.pc { display: inline; }

/* ---------- ローディング ---------- */
.loader {
  position: fixed; inset: 0; z-index: 9999;
  background: var(--navy);
  display: flex; align-items: center; justify-content: center;
  transition: opacity .6s ease, visibility .6s ease;
}
.loader.done { opacity: 0; visibility: hidden; }
.loader-inner { text-align: center; color: #fff; }
.loader-mark {
  display: inline-flex; align-items: center; justify-content: center;
  width: 64px; height: 64px; border: 1px solid rgba(255,255,255,.5);
  font-family: var(--serif); font-size: 30px;
  animation: loaderPulse 1.6s ease infinite;
}
.loader-text {
  display: block; margin-top: 14px;
  font-family: var(--serif); font-size: 14px; letter-spacing: .25em;
}
@keyframes loaderPulse {
  0%, 100% { opacity: 1; } 50% { opacity: .4; }
}

/* ---------- ヘッダー ---------- */
.header {
  position: fixed; top: 0; left: 0; right: 0; z-index: 1000;
  transition: background .3s ease, box-shadow .3s ease;
}
.header.scrolled {
  background: rgba(255,255,255,.96);
  box-shadow: 0 2px 16px rgba(0,0,0,.08);
}
.header-inner {
  max-width: 1200px; margin: 0 auto; padding: 0 24px;
  height: 76px; display: flex; align-items: center; justify-content: space-between;
}
.header-logo { display: flex; align-items: center; gap: 10px; color: #fff; transition: color .3s; }
.header.scrolled .header-logo { color: var(--navy); }
.logo-mark {
  display: inline-flex; align-items: center; justify-content: center;
  width: 40px; height: 40px; flex-shrink: 0;
  background: var(--navy); color: #fff; border: 1px solid rgba(255,255,255,.4);
  font-family: var(--serif); font-size: 20px;
}
.logo-text { font-family: var(--serif); font-size: 14px; line-height: 1.3; letter-spacing: .06em; }
.logo-text strong { display: block; font-size: 19px; }
.logo-text small { font-size: 9px; letter-spacing: .3em; opacity: .7; }

.gnav ul { display: flex; gap: 28px; }
.gnav a { font-size: 14px; font-weight: 500; letter-spacing: .05em; color: #fff; transition: color .3s, opacity .3s; }
.gnav a:hover { opacity: .7; }
.header.scrolled .gnav a { color: var(--ink); }
.gnav { display: flex; align-items: center; gap: 32px; }
.gnav-contact {
  background: var(--accent) !important; color: #fff !important;
  padding: 10px 24px; font-weight: 700; font-size: 14px;
  transition: background .3s !important;
}
.gnav-contact:hover { background: var(--accent-dark) !important; opacity: 1 !important; }

.menu-btn {
  display: none; width: 44px; height: 44px; background: none; border: none; cursor: pointer;
  flex-direction: column; align-items: center; justify-content: center; gap: 6px; z-index: 1100;
}
.menu-btn span { display: block; width: 26px; height: 2px; background: #fff; transition: all .3s; }
.header.scrolled .menu-btn span, .header.menu-open .menu-btn span { background: var(--navy); }
.header.menu-open .menu-btn span:nth-child(1) { transform: translateY(8px) rotate(45deg); }
.header.menu-open .menu-btn span:nth-child(2) { opacity: 0; }
.header.menu-open .menu-btn span:nth-child(3) { transform: translateY(-8px) rotate(-45deg); }

/* ---------- ヒーロー ---------- */
.hero {
  position: relative; height: 100svh; min-height: 620px;
  display: flex; align-items: center;
}
.hero-bg { position: absolute; inset: 0; overflow: hidden; }
.hero-bg img {
  width: 100%; height: 100%; object-fit: cover;
  animation: heroZoom 14s ease-out forwards;
}
@keyframes heroZoom { from { transform: scale(1.08); } to { transform: scale(1); } }
.hero-overlay {
  position: absolute; inset: 0;
  background: linear-gradient(100deg, rgba(20,32,47,.82) 0%, rgba(20,32,47,.5) 55%, rgba(20,32,47,.25) 100%);
}
.hero-content {
  position: relative; z-index: 2; color: #fff;
  max-width: 1200px; margin: 0 auto; padding: 0 24px; width: 100%;
}
.hero-sub {
  font-size: 15px; letter-spacing: .2em; margin-bottom: 18px;
  padding-left: 46px; position: relative;
}
.hero-sub::before {
  content: ""; position: absolute; left: 0; top: 50%;
  width: 34px; height: 1px; background: var(--accent);
}
.hero-catch {
  font-family: var(--serif); font-size: clamp(34px, 5.4vw, 64px);
  font-weight: 600; line-height: 1.5; letter-spacing: .08em;
  margin-bottom: 22px; text-shadow: 0 2px 24px rgba(0,0,0,.35);
}
.hero-catch .nowrap { white-space: nowrap; }
.hero-lead { font-size: 16px; letter-spacing: .08em; margin-bottom: 38px; opacity: .95; }
.hero-cta { display: flex; gap: 16px; flex-wrap: wrap; }

.btn {
  display: inline-block; padding: 16px 38px;
  font-size: 15px; font-weight: 700; letter-spacing: .1em;
  transition: all .3s ease; text-align: center;
}
.btn-accent { background: var(--accent); color: #fff; box-shadow: 0 4px 18px rgba(217,123,41,.4); }
.btn-accent:hover { background: var(--accent-dark); transform: translateY(-2px); }
.btn-line { border: 1px solid rgba(255,255,255,.7); color: #fff; }
.btn-line:hover { background: rgba(255,255,255,.15); }

.hero-side {
  position: absolute; right: 28px; bottom: 120px; z-index: 2;
  writing-mode: vertical-rl; color: rgba(255,255,255,.6);
  font-size: 11px; letter-spacing: .3em;
}
.hero-scroll {
  position: absolute; left: 50%; bottom: 26px; transform: translateX(-50%); z-index: 2;
  color: rgba(255,255,255,.8); font-size: 10px; letter-spacing: .3em; text-align: center;
}
.hero-scroll span {
  display: block; width: 1px; height: 44px; margin: 0 auto 8px;
  background: rgba(255,255,255,.5); position: relative; overflow: hidden;
}
.hero-scroll span::after {
  content: ""; position: absolute; top: -50%; left: 0; width: 100%; height: 50%;
  background: #fff; animation: scrollLine 1.8s ease infinite;
}
@keyframes scrollLine { to { top: 110%; } }

/* ---------- 実績バー ---------- */
.stats-bar { background: var(--navy); color: #fff; }
.stats-inner {
  max-width: 1100px; margin: 0 auto; padding: 40px 24px;
  display: grid; grid-template-columns: repeat(4, 1fr); gap: 24px; text-align: center;
}
.stat-num { font-family: var(--serif); font-size: 44px; font-weight: 600; color: var(--accent); }
.stat-unit { font-family: var(--serif); font-size: 18px; color: var(--accent); margin-left: 4px; }
.stat-label { display: block; font-size: 13px; letter-spacing: .1em; margin-top: 4px; opacity: .85; }

/* ---------- セクション共通 ---------- */
.section { padding: 110px 0; }
.section-gray { background: var(--bg-gray); }
.section-navy { background: var(--navy); color: #fff; }
.container { max-width: 1100px; margin: 0 auto; padding: 0 24px; }
.section-head { text-align: center; margin-bottom: 60px; }
.section-en {
  display: block; font-size: 12px; letter-spacing: .35em;
  color: var(--accent); font-weight: 700; margin-bottom: 10px;
}
.section-title {
  font-family: var(--serif); font-size: clamp(26px, 3.4vw, 36px);
  font-weight: 600; letter-spacing: .1em; line-height: 1.5;
}

/* ---------- コンセプト ---------- */
.concept { text-align: center; }
.concept-image {
  max-width: 980px; margin: 0 auto 56px; aspect-ratio: 21 / 9;
  overflow: hidden; box-shadow: 0 18px 48px rgba(20, 35, 54, .12);
}
.concept-image img { width: 100%; height: 100%; object-fit: cover; display: block; }
.concept-lead {
  font-family: var(--serif); font-size: clamp(22px, 3vw, 30px);
  letter-spacing: .12em; margin-bottom: 32px; color: var(--navy);
}
.concept-text { font-size: 16px; letter-spacing: .05em; color: #444; }

/* ---------- 代表挨拶 ---------- */
.message-wrap {
  display: grid; grid-template-columns: 340px 1fr; gap: 56px;
  align-items: start; max-width: 980px; margin: 0 auto;
}
.message-photo { position: sticky; top: 110px; }
.message-photo img {
  width: 100%; aspect-ratio: 3 / 4; object-fit: cover;
  box-shadow: 0 8px 32px rgba(0,0,0,.12);
}
.message-photo-placeholder {
  width: 100%; aspect-ratio: 3 / 4;
  background: var(--navy); color: rgba(255,255,255,.85);
  display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 14px;
  font-size: 13px; letter-spacing: .2em;
  box-shadow: 0 8px 32px rgba(0,0,0,.12);
}
.message-photo-mark {
  display: inline-flex; align-items: center; justify-content: center;
  width: 56px; height: 56px; border: 1px solid rgba(255,255,255,.4);
  font-family: var(--serif); font-size: 26px;
}
.message-name {
  display: block; margin-top: 16px; text-align: center;
  font-size: 12.5px; color: var(--gray); letter-spacing: .1em;
}
.message-name strong {
  display: block; font-family: var(--serif); font-size: 19px;
  color: var(--navy); letter-spacing: .15em; margin-top: 2px;
}
.message-catch {
  font-family: var(--serif); font-size: clamp(22px, 2.8vw, 28px);
  font-weight: 600; line-height: 1.7; letter-spacing: .08em;
  color: var(--navy); margin-bottom: 28px;
  padding-left: 18px; border-left: 3px solid var(--accent);
}
.message-body p { font-size: 15px; color: #444; margin-bottom: 18px; }
.message-sign {
  margin-top: 28px; text-align: right;
  font-family: var(--serif); font-size: 16px !important;
  color: var(--navy) !important; letter-spacing: .1em;
}

/* ---------- 事業内容 ---------- */
.service-grid {
  display: grid; grid-template-columns: repeat(2, 1fr); gap: 36px;
}
.service-card { background: #fff; box-shadow: 0 4px 24px rgba(0,0,0,.06); overflow: hidden; }
.service-img { overflow: hidden; aspect-ratio: 16 / 9; }
.service-img img { width: 100%; height: 100%; object-fit: cover; transition: transform .6s ease; }
.service-card:hover .service-img img { transform: scale(1.06); }
.service-body { padding: 28px 30px 32px; }
.service-body h3 {
  font-family: var(--serif); font-size: 21px; letter-spacing: .08em;
  margin-bottom: 12px; color: var(--navy);
  padding-left: 16px; border-left: 3px solid var(--accent);
}
.service-body p { font-size: 14.5px; color: #555; }

/* ---------- 施工事例 ---------- */
.works-grid {
  display: grid; grid-template-columns: repeat(3, 1fr); gap: 28px;
}
.work-card { background: #fff; border: 1px solid var(--line); overflow: hidden; }
.work-img { position: relative; overflow: hidden; aspect-ratio: 4 / 3; }
.work-img img { width: 100%; height: 100%; object-fit: cover; transition: transform .6s ease; }
.work-card:hover .work-img img { transform: scale(1.06); }
.work-tag {
  position: absolute; top: 12px; left: 12px;
  background: var(--navy); color: #fff;
  font-size: 11px; font-weight: 700; letter-spacing: .1em;
  padding: 4px 12px;
}
.work-body { padding: 20px 22px 24px; }
.work-body h3 { font-size: 16px; font-weight: 700; line-height: 1.6; margin-bottom: 8px; color: var(--navy); }
.work-body p { font-size: 12.5px; color: var(--gray); letter-spacing: .03em; }
.works-note { text-align: center; margin-top: 40px; font-size: 13px; color: var(--gray); }

/* ---------- 選ばれる理由 ---------- */
.section-navy .section-title { color: #fff; }
.reason-list { display: grid; grid-template-columns: repeat(3, 1fr); gap: 40px; }
.reason-item {
  border-top: 1px solid rgba(255,255,255,.25); padding-top: 28px; position: relative;
}
.reason-item::before {
  content: ""; position: absolute; top: -1px; left: 0;
  width: 48px; height: 3px; background: var(--accent);
}
.reason-num { font-family: var(--serif); font-size: 15px; letter-spacing: .2em; color: var(--accent); }
.reason-item h3 {
  font-family: var(--serif); font-size: 20px; letter-spacing: .06em;
  margin: 10px 0 14px; line-height: 1.6;
}
.reason-item p { font-size: 14.5px; opacity: .9; }

/* ---------- 施工の流れ ---------- */
.flow-list { max-width: 980px; margin: 0 auto; position: relative; }
.flow-list::before {
  content: ""; position: absolute; left: 19px; top: 10px; bottom: 10px;
  width: 1px; background: var(--line);
}
.flow-item { position: relative; padding: 0 0 44px 68px; }
.flow-item:last-child { padding-bottom: 0; }
.flow-item::before {
  content: ""; position: absolute; left: 12px; top: 6px;
  width: 15px; height: 15px; border-radius: 50%;
  background: var(--accent); border: 3px solid #fff;
  box-shadow: 0 0 0 1px var(--line);
}
.flow-step { font-size: 12px; font-weight: 700; letter-spacing: .25em; color: var(--accent); }
.flow-item h3 {
  font-family: var(--serif); font-size: 20px; letter-spacing: .06em;
  color: var(--navy); margin: 4px 0 8px;
}
.flow-item h3 small { font-size: 14px; color: var(--accent); margin-left: 6px; }
.flow-item p { font-size: 14.5px; color: #555; }
.flow-content {
  display: grid; grid-template-columns: 1fr; gap: 22px; align-items: start;
}
.flow-content p { margin: 0; }
.flow-image {
  margin-top: 4px; max-width: 720px; aspect-ratio: 16 / 9; overflow: hidden; box-shadow: 0 10px 28px rgba(20, 35, 54, .1);
}
.flow-image img { width: 100%; height: 100%; object-fit: cover; display: block; }

/* ---------- お客様の声 ---------- */
.voice-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 28px; }
.voice-card {
  background: #fff; padding: 34px 30px; position: relative;
  box-shadow: 0 4px 24px rgba(0,0,0,.06);
}
.voice-card::before {
  content: "“"; position: absolute; top: 6px; left: 20px;
  font-family: var(--serif); font-size: 60px; color: var(--accent); opacity: .35; line-height: 1;
}
.voice-card p { font-size: 14.5px; color: #444; margin-bottom: 18px; }
.voice-card cite {
  font-style: normal; font-size: 12.5px; color: var(--gray);
  display: block; padding-top: 14px; border-top: 1px solid var(--line);
}

/* ---------- 会社概要 ---------- */
.company-wrap { max-width: 820px; margin: 0 auto; }
.company-table { width: 100%; border-collapse: collapse; }
.company-table th, .company-table td {
  padding: 20px 18px; border-bottom: 1px solid var(--line);
  font-size: 15px; text-align: left; vertical-align: top;
}
.company-table th {
  width: 160px; color: var(--navy); font-family: var(--serif);
  letter-spacing: .1em; white-space: nowrap;
}

/* ---------- お問い合わせ ---------- */
.contact .section-head { margin-bottom: 44px; }
.contact-lead { margin-top: 22px; font-size: 15px; opacity: .92; }
.contact-tel {
  text-align: center; margin-bottom: 50px;
  background: rgba(255,255,255,.06); border: 1px solid rgba(255,255,255,.18);
  max-width: 560px; margin-inline: auto; padding: 30px 24px;
}
.contact-tel-label { display: block; font-size: 13px; letter-spacing: .15em; margin-bottom: 6px; }
.contact-tel-num {
  font-family: var(--serif); font-size: clamp(30px, 4.5vw, 42px);
  font-weight: 600; letter-spacing: .06em; color: var(--accent);
}
.contact-tel-hours { display: block; font-size: 12.5px; opacity: .8; margin-top: 6px; }

.contact-form { max-width: 640px; margin: 0 auto; }
.form-row { margin-bottom: 24px; }
.form-row label {
  display: block; font-size: 14px; font-weight: 700; letter-spacing: .05em; margin-bottom: 8px;
}
.form-row label em {
  font-style: normal; background: var(--accent); color: #fff;
  font-size: 11px; padding: 2px 8px; margin-left: 8px; font-weight: 700;
}
.form-row input, .form-row select, .form-row textarea {
  width: 100%; padding: 14px 16px; font-size: 15px; font-family: var(--sans);
  border: 1px solid rgba(255,255,255,.3); background: rgba(255,255,255,.95);
  color: var(--ink); border-radius: 0; -webkit-appearance: none;
}
.form-row input:focus, .form-row select:focus, .form-row textarea:focus {
  outline: 2px solid var(--accent);
}
.btn-submit { width: 100%; border: none; cursor: pointer; font-family: var(--sans); font-size: 16px; }
.form-note { text-align: center; font-size: 12px; opacity: .7; margin-top: 14px; }
.form-thanks {
  text-align: center; padding: 60px 20px;
  font-family: var(--serif); font-size: 20px; letter-spacing: .1em;
}

/* ---------- フッター ---------- */
.footer { background: var(--navy-dark); color: #fff; padding: 50px 0 40px; text-align: center; }
.footer-logo {
  font-family: var(--serif); font-size: 18px; letter-spacing: .1em;
  display: flex; align-items: center; justify-content: center; gap: 10px; margin-bottom: 14px;
}
.footer-logo .logo-mark { width: 34px; height: 34px; font-size: 17px; }
.footer-address { font-size: 13px; opacity: .8; margin-bottom: 18px; }
.footer-copy { font-size: 11.5px; opacity: .55; letter-spacing: .05em; }

/* ---------- ページトップ ---------- */
.totop {
  position: fixed; right: 24px; bottom: 24px; z-index: 900;
  width: 48px; height: 48px; display: flex; align-items: center; justify-content: center;
  background: var(--navy); color: #fff; font-size: 18px;
  opacity: 0; visibility: hidden; transition: all .3s;
}
.totop.show { opacity: 1; visibility: visible; }
.totop:hover { background: var(--accent); }

/* ---------- スクロールアニメーション ---------- */
.reveal {
  opacity: 0; transform: translateY(28px);
  transition: opacity .8s ease, transform .8s ease;
}
.reveal.on { opacity: 1; transform: translateY(0); }
.delay-1 { transition-delay: .12s; }
.delay-2 { transition-delay: .24s; }
.delay-3 { transition-delay: .36s; }
.delay-4 { transition-delay: .48s; }

/* ============================================
   レスポンシブ
   ============================================ */
@media (max-width: 900px) {
  .message-wrap { grid-template-columns: 1fr; gap: 36px; }
  .message-photo { position: static; width: 100%; max-width: 300px; margin: 0 auto; }
  .service-grid { grid-template-columns: 1fr; gap: 28px; }
  .works-grid { grid-template-columns: repeat(2, 1fr); gap: 20px; }
  .reason-list { grid-template-columns: 1fr; gap: 32px; }
  .voice-grid { grid-template-columns: 1fr; gap: 20px; }
  .stats-inner { grid-template-columns: repeat(2, 1fr); gap: 32px 16px; }
}

@media (max-width: 768px) {
  body { font-size: 15px; }
  .pc { display: none; }
  .section { padding: 72px 0; }
  .section-head { margin-bottom: 40px; }

  .menu-btn { display: flex; }
  .gnav {
    position: fixed; inset: 0; z-index: 1050;
    background: rgba(255,255,255,.98);
    flex-direction: column; justify-content: center; gap: 40px;
    opacity: 0; visibility: hidden; transition: opacity .35s ease, visibility .35s ease;
  }
  .header.menu-open .gnav { opacity: 1; visibility: visible; }
  .gnav ul { flex-direction: column; align-items: center; gap: 22px; }
  .gnav a { color: var(--navy) !important; font-size: 17px; }
  .gnav-contact { color: #fff !important; padding: 14px 44px; }

  .hero { min-height: 560px; }
  .hero-side { display: none; }
  .hero-catch { font-size: clamp(26px, 7.8vw, 34px); margin-top: 14px; margin-bottom: 34px; }
  .hero-lead { font-size: 14px; }
  .hero-cta { flex-direction: column; align-items: stretch; max-width: 320px; margin: 0 auto; }
  .btn { padding: 15px 28px; width: 100%; }

  .stat-num { font-size: 34px; }

  .works-grid { grid-template-columns: 1fr; }
  .work-img { aspect-ratio: 16 / 10; }

  .company-table th { width: 100px; padding: 16px 10px; font-size: 13.5px; }
  .company-table td { padding: 16px 10px; font-size: 14px; }

  .flow-item { padding-left: 56px; }
  .flow-content { gap: 18px; }
  .flow-image { max-width: 100%; margin-top: 4px; }

  .concept-image { margin-bottom: 34px; aspect-ratio: 16 / 10; }
  .concept-lead { font-size: clamp(14px, 4.3vw, 20px); white-space: nowrap; }

  .message-catch { font-size: clamp(19px, 5.6vw, 24px); padding-left: 14px; }

  .totop { right: 16px; bottom: 16px; width: 42px; height: 42px; }
}
