@layer reset {
  *, *::after, *::before { box-sizing: border-box; }
  :focus-visible { outline-offset: 3px; }
  html {
    -webkit-text-size-adjust: none;
    text-size-adjust: none;
    line-height: 1.5;
    scrollbar-gutter: stable;
    scroll-behavior: smooth; }
  h1 { font-size: 2em; margin-block: .67em; }
  abbr[title] { cursor: help; text-decoration-line: underline; text-decoration-style: dotted; }
  @media (forced-colors: active) {
    mark { color: HighlightText; background-color: Highlight; }
  }
  audio, iframe, img, svg, video { max-block-size: 100%; max-inline-size: 100%; }
  fieldset { min-inline-size: 0; }
  label:has(+ input:not([type="radio"], [type="checkbox"]), select, textarea) { display: block; }
  textarea:not([rows]) { min-block-size: 6em; }
  button, input, select, textarea { font-family: inherit; font-size: inherit; }
  [type="search"] { -webkit-appearance: textfield; }
  @supports (-webkit-touch-callout: none) {
    [type="search"] { border: 1px solid -apple-system-secondary-label; background-color: canvas; }
  }
  input:where([type="tel"], [type="url"], [type="email"], [type="number"]):not(:placeholder-shown) { direction: ltr; }
  table { border-collapse: collapse; border: 1px solid; }
  th, td { border: 1px solid; padding: .25em .5em; vertical-align: top; }
  dialog::backdrop { background: oklch(0% 0 0 / .3); }
  dialog, [popover], dialog::backdrop {
    opacity: 0;
    transition: opacity 150ms ease-out, display 150ms allow-discrete, overlay 150ms allow-discrete;
  }
  dialog[open], :popover-open, dialog[open]::backdrop { opacity: 1; }
  @starting-style {
    dialog[open], :popover-open, dialog[open]::backdrop { opacity: 0; }
  }
  [hidden]:not([hidden="until-found"]) { display: none !important; }
  img { display: block; }
  summary { cursor: default; }
  iframe { border: none; }
  @supports (position-area: block-end span-inline-end) {
    [popover] { margin: 0; position-area: block-end span-inline-end; }
  }
}

:root {
  --main-color: #00B49E;
  --accent-color: #FF7E27;
  --bg-color: #FFF8EC;
  --bg-flow: #DFF6F4;
  --text-dark: #333333;
  --text-gray: #7B7B7B;
  --border-color: #cccccc;
  --container-width: 760px;
}

body {
    font-family: "Inter", sans-serif;
  text-align: center;
  font-size: 1rem;
  line-height: 1.6;
  background-color: var(--bg-color);
  margin: 0;
  color: var(--text-dark);
}

/* スクロールアニメーション（重複を解消し対象を最適化） */
:where(p, .ttl1, .ttl2, img, table) {
  animation: fadeIn linear;
  animation-timeline: view();
  animation-range: entry 0% cover 30%;
}

@keyframes fadeIn {
  from {
    opacity: 0;
    transform: translateY(2rem);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* レイアウト基本設定 */
.head {
  width: 90%;
  max-width: var(--container-width);
  margin-inline: auto;

  img {
    width: 40%;
    max-width: 160px;
    height: auto;
    margin: 2em auto;
  }
}

.con {
  width: 90%;
  max-width: var(--container-width);
  margin: 0 auto 4em;
  text-align: left;
}

.top_con {
  margin-bottom: 2em;

  img {
    width: 100%;
    max-width: 400px;
    height: auto;
    margin-inline: auto;
  }

  .cta {
    position: relative;
    top: -2em;
  }
}

/* メインビジュアル */
.kv {
  position: relative;

  img {
    width: 100%;
    height: auto;
  }

  &::before {
    content: "関西全域対応";
    background-color: var(--main-color);
    display: block;
    text-align: center;
    padding: 1.5em 1em;
    position: absolute;
    top: 1em;
    right: 2em;
    color: #fff;
    border-radius: 9999px;
    max-width: 6em;
    font-weight: bold;
    z-index: 10;
  }
}

/* 見出し類 */
h1 {
  background: #fff;
  color: var(--main-color);
  font-size: 1.5em;
  width: 100%;
  padding-block: 1.2em;
  margin: 0 0 1.6em;
  line-height: 1.6;
}

.ttl1 {
  font-size: 22px;
  font-weight: bold;
  text-align: center;
  line-height: 1.6;
  margin-bottom: 1.4em;

  img {
    height: 22px;
    width: auto;
    display: inline;
  }
}

.ttl2 {
  font-size: 18px;
  line-height: 1.6;
  font-weight: bold;
  margin-bottom: 1em;
}

/* おすすめコンテンツ */
.reco_box {
  margin-bottom: 2em;

  img {
    width: 90%;
    height: auto;
    margin: 0 auto 1em;
  }
}

/* フロー設定 */
.flow {
  background-color: var(--bg-flow);
  border-radius: 10px;
  padding: 1em;
  font-size: 1em;
  font-weight: bold;
  text-align: center;
  position: relative;
  margin: 0;
}

.flow-last::after {
  content: "持家に";
  display: block;
  position: absolute;
  left: -0.5em;
  top: -1em;
  background-color: var(--main-color);
  color: #fff;
  font-size: 0.8em;
  padding: 1em 0.5em;
  border-radius: 9999px;
}

.flow_arw {
  width: 26px;
  height: auto;
  margin: 0 auto 0.5em;
  display: block;
}

/* CTA */
.cta {
  background: #fff;
  text-align: center;
  padding: 2em 0 2.4em;
  border-radius: 9999px;
  max-width: 600px;
  margin: 0 auto;

  p {
    margin: 0;
  }

  a.btn-cta {
    display: inline-block;
    padding: 0.8em 0;
    width: 60%;
    background-color: var(--main-color);
    color: #fff;
    border-radius: 50px;
    margin-top: 0.6em;
    text-decoration: none;
    transition: opacity 0.2s ease;

    &:hover {
      opacity: 0.85;
    }

    &.btn-orange {
      background-color: var(--accent-color);
    }
  }
}

/* 家提案セクション */
.ie1, .ie2 {
  text-align: center;
  padding: 3em 0 0.6em;
  background-size: cover;
  background-position: top;
  margin-bottom: 2em;

  h3 {
    font-size: 1.6em;
    margin-bottom: 1em;
  }

  p {
    font-size: 1em;
    line-height: 1.4;
    font-weight: bold;

    span {
      font-size: 2em;
      display: block;
      padding-top: 0.3em;
    }
  }

  div {
    font-size: 1.2em;
    line-height: 2em;
    padding: 0.6em 0;
    width: 80%;
    margin: 0 auto;
  }
}

.ie1 {
  color: #fff;
  background-image: url(../img/home.webp);

  div {
    border-block: 1px solid #fff;
  }
}

.ie2 {
  background-image: url(../img/home_w.webp);

  h3 {
    color: var(--main-color);
  }

  div {
    border-block: 1px solid var(--border-color);
  }
}

/* 比較テーブル */
.ie_table {
  width: 100%;
  margin: 0 auto;
  border: none;

  td, th {
    border: none;
    border-bottom: 1px solid #000;
    text-align: center;
    vertical-align: middle;

    img {
      height: 15px;
      width: auto;
      margin: 0 auto;
    }
  }

  td {
    color: var(--text-gray);

    &:first-child {
      text-align: left;
      color: #000;
      font-size: 0.9em;
      font-weight: bold;
    }

    &:nth-child(3) {
      color: var(--main-color);
    }
  }
}

.stxt {
  font-size: 0.6em;
  text-align: center;
  line-height: 1.6;
}

.refome_img {
  width: 80%;
  height: auto;
  margin: 0 auto;
}

.company {
  display: flex;
  align-items: flex-start;

  img {
    width: 25%;
    height: auto;
    max-width: 100px;
    margin-right: 1em;
  }

  h3 {
    font-size: 1.4em;
    margin: 0.6rem 0;

    span {
      font-size: 1rem;
      display: block;
    }
  }
}

/* FAQ */
.qa {
  .qa_q {
    display: flex;
    font-weight: bold;

    &::before {
      content: "Q";
      font-size: 1.2em;
      color: var(--main-color);
      padding-right: 0.6em;
    }
  }

  .qa_a {
    display: flex;
    margin-bottom: 2em;

    &::before {
      content: "A";
      font-size: 1.2em;
      font-weight: bold;
      color: var(--accent-color);
      padding-right: 0.6em;
    }
  }
}

/* ハンバーガーメニュー */
.menu-wrapper {
  position: relative;
}

.menu-icon {
  width: 40px;
  height: 30px;
  position: fixed;
  top: 30px;
  left: 30px;
  cursor: pointer;
  z-index: 30;
  display: flex;
  flex-direction: column;
  justify-content: space-between;

  span {
    display: block;
    width: 100%;
    height: 4px;
    background-color: #BDBABA;
    border-radius: 2px;
    transition: transform 0.4s ease, opacity 0.4s ease;
    transform-origin: center;
  }
}

#menu-toggle:checked + .menu-icon {
  span:nth-child(1) {
    transform: translateY(13px) rotate(45deg);
  }
  span:nth-child(2) {
    opacity: 0;
  }
  span:nth-child(3) {
    transform: translateY(-13px) rotate(-45deg);
  }
}

.overlay {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.5);
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.4s ease;
  z-index: 1;
}

#menu-toggle:checked ~ .overlay {
  opacity: 1;
  pointer-events: auto;
}

.menu {
  position: fixed;
  top: 0;
  left: -90%;
  width: 90%;
  height: 100dvh;
  background: #fff;
  box-shadow: 2px 0 8px rgba(0, 0, 0, 0.2);
  transition: left 0.4s ease;
  z-index: 20;

  ul {
    list-style: none;
    padding: 60px 20px;
    margin: 0;
  }

  li {
    text-align: left;
  }

  a {
    text-decoration: none;
    color: var(--text-dark);
    transition: color 0.3s;
    padding: 20px 0;
    border-bottom: 1px solid var(--border-color);
    display: block;
    font-weight: bold;

    &:hover {
      color: #007bff;
    }
  }
}

#menu-toggle:checked ~ .menu {
  left: 0;
}

/* フッター */
.fot {
  background: url(../img/fot.webp) center top / cover no-repeat;
  padding: 60px 0 20px;
  font-size: 12px;
  width: 100%;
  max-width: 800px;
  margin: 0 auto;

  a {
    margin: 0 1em;
    color: inherit;
    text-decoration: none;
  }
}

/* レスポンシブ設計（最新のMedia Query記法） */
@media (width >= 600px) {
  .kv::before {
     top: 53%;
    right: 42%;
  }
  .ttl1 {
    font-size: 24px;

    img {
      height: 24px;
    }

    br {
      display: none;
    }
  }

  .menu {
    left: -40%;
    width: 40%;
  }

  .kv {
    width: 800px;
    margin: 0 auto 2em;

    h1 {
      position: absolute;
      display: inline;
      text-align: left;
      top: 60%;
      left: 0;
      width: auto;
      padding: 1.5em 2em;
    }
  }

  .con {
    margin-bottom: 6em;
  }

  .reco_box {
    display: flex;
    align-items: flex-start;

    img {
      width: 30%;
      padding-right: 2em;
      margin: 0;
    }
  }

  .flow_box {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: flex-start;

    .flow {
      padding: 2em 0;
      width: 30%;
      margin-bottom: 2em;
    }

    .flow_arw {
      width: 3%;
      margin: 0 1% 2em;
      transform: rotate(-90deg);
    }
  }

  .ie {
    display: flex;
    justify-content: space-around;
  }

  .ie1 {
    width: 30%;
    order: 2;

    p span {
      font-size: 1.5em;
    }

    div {
      font-size: 0.8em;
    }
  }

  .ie2 {
    width: 30%;

    p span {
      font-size: 1.5em;
    }

    div {
      font-size: 0.8em;
    }

    &.ie2_1 {
      order: 1;
    }

    &.ie2_2 {
      order: 3;
    }
  }

  .ie_table {
    width: 70%;
  }

  .cta {
    a.btn-cta {
      margin: 1em 0.5em 0;
      max-width: 220px;
    }

    br {
      display: none;
    }
  }

  .sup {
    margin-bottom: 2em;
    display: flex;
    align-items: flex-start;

    img {
      width: 40%;
      padding-right: 2em;
    }
  }

  .company {
    width: 300px;
    margin: 0 auto;
  }

  .fot {
    padding: 100px 0 20px;
  }
}

@media (width >= 900px) {
  .kv::before {
    top: 53%;
    left: -5%;
  }
}