/* =============================================================
   Serenavi — landing page styles
   ============================================================= */

/* -------------------------------------------------------------
   Design tokens
   ------------------------------------------------------------- */
:root {
  /* Brand palette */
  --c-navy: #071d45; /* 基本テキスト */
  --c-blue: #0b72df; /* ブランドカラー（アクセント） */
  --c-white: #fff;
  --c-muted: #394966; /* コピーライト等のサブテキスト */

  /* Accent gradients / surfaces */
  --c-blue-soft: #e5f0ff; /* 機能アイコンの淡い背景 */
  --shadow-card: 0 18px 40px rgb(7 29 69 / 12%);

  /* Section spacing */
  --section-pad-y: 6.4rem;
}

/* -------------------------------------------------------------
   Base （box-sizing・li の list-style リセットは reset.css 側）
   ------------------------------------------------------------- */
html {
  font-size: 62.5%;
}

body {
  font-family: 'Lato', 'Noto Sans JP', '游ゴシック Medium', '游ゴシック体', 'Yu Gothic Medium', YuGothic, sans-serif;
  color: var(--c-navy);
  background: var(--c-white);
}

.container {
  width: 90%;
  margin: 0 auto;
}

/* アイコンスプライト本体は非表示（<use> から参照するだけ） */
.svg-sprite {
  position: absolute;
  width: 0;
  height: 0;
  overflow: hidden;
}

/* -------------------------------------------------------------
   Header
   ------------------------------------------------------------- */
header {
  display: flex;
  align-items: center;
  justify-content: space-between;

  a img {
    width: 300px;
    height: auto;
  }

  nav ul {
    display: flex;
    gap: 2rem;

    a {
      color: black;
      font-size: 1.6rem;
      text-decoration: none;
    }
  }
}

/* -------------------------------------------------------------
   Main
   ------------------------------------------------------------- */
main {
  /* ---- Hero / main visual ---- */
  #main-visual {
    position: relative;
    overflow: hidden;

    /* 左側を白くフェードさせてコピーを読みやすくする */
    &::before {
      content: '';
      position: absolute;
      inset: 0 auto 0 0;
      z-index: 1;
      width: 56%;
      pointer-events: none;
      background: linear-gradient(90deg, rgb(255 255 255 / 88%) 0%, rgb(255 255 255 / 72%) 62%, rgb(255 255 255 / 0%) 100%);
    }

    .background-image {
      display: block;
      width: 100%;
      height: auto;
    }

    .app-image {
      position: absolute;
      top: 0;
      right: 20%;
      z-index: 2;
      width: min(22.75vw, 450px);
      height: auto;
    }

    .main-copy {
      position: absolute;
      top: 10%;
      left: 15%;
      z-index: 3;

      h1 {
        margin: 0 0 2.4rem;
        font-size: clamp(3.2rem, 4.9vw, 6.4rem);
        font-weight: 800;
        line-height: 1.28;

        span {
          color: var(--c-blue);
        }
      }

      p {
        margin: 0;
        font-size: clamp(1.4rem, 1.45vw, 1.9rem);
        font-weight: 700;
        line-height: 2;
      }
    }

    /* 特徴3カラム */
    > ul {
      position: absolute;
      bottom: 20%;
      left: 8%;
      z-index: 3;
      display: grid;
      grid-template-columns: repeat(3, minmax(0, 1fr));
      width: min(56vw, 720px);
      margin: 0;
      padding: 0;

      li {
        display: flex;
        flex-direction: column;
        align-items: center;
        min-width: 0;
        padding: 0 1.8rem;
        text-align: center;
      }

      li + li {
        border-left: 1px solid rgb(7 29 69 / 16%);
      }

      svg {
        width: clamp(3.6rem, 4.1vw, 5.2rem);
        height: clamp(3.6rem, 4.1vw, 5.2rem);
        margin-bottom: 1.2rem;
        fill: var(--c-blue);
      }

      b {
        margin-bottom: 0.8rem;
        font-size: clamp(1.3rem, 1.18vw, 1.6rem);
        font-weight: 800;
        line-height: 1.35;
        white-space: nowrap;
      }

      p {
        margin: 0;
        font-size: clamp(1.1rem, 1vw, 1.35rem);
        font-weight: 700;
        line-height: 1.55;
        white-space: nowrap;
      }
    }
  }

  /* ---- Function ---- */
  #function {
    display: grid;
    grid-template-columns: minmax(0, 38%) minmax(0, 45%);
    column-gap: 3.2rem;
    row-gap: 2rem;
    align-items: stretch;
    justify-content: end;
    margin-top: 3rem;

    h2 {
      grid-column: 1 / -1;
      justify-self: start;
      width: fit-content;
      margin: 0 0 2.4rem 30%;
      font-size: clamp(2.4rem, 3vw, 3.2rem);
      font-weight: 800;
      line-height: 1.4;
      text-align: center;
      border-bottom: 4px solid var(--c-blue);
    }

    .images {
      display: grid;
      grid-template-columns: repeat(2, minmax(0, 1fr));

      img {
        width: 100%;
        height: auto;
        border-radius: 8px;
      }
    }

    /* リスト下に全幅で置く補足画像 */
    .core-image {
      grid-column: 1 / -1;
      justify-self: center;
      width: 100%;
      max-width: 640px;
      height: auto;
      border-radius: 8px;
    }

    ul {
      counter-reset: function-list;
      display: grid;
      grid-template-columns: 1fr;
      gap: 1.6rem;
      margin: 0;
      padding: 0;
    }

    li {
      counter-increment: function-list;
      display: grid;
      grid-template-columns: auto auto minmax(0, 1fr);
      grid-template-rows: auto auto;
      column-gap: 1.6rem;
      align-items: center;
      min-width: 0;
      padding: 1.8rem 2.4rem 1.8rem 1.2rem;
      border-radius: 8px;
      background: var(--c-white);
    }

    /* 連番バッジ */
    li::before {
      content: counter(function-list, decimal-leading-zero);
      display: grid;
      grid-row: 1 / 3;
      place-items: center;
      width: 4rem;
      height: 4rem;
      border-radius: 8px;
      color: var(--c-white);
      background: var(--c-blue);
      font-size: 1.8rem;
      font-weight: 800;
      line-height: 1;
    }

    .material-symbols-rounded {
      display: inline-flex;
      grid-row: 1 / 3;
      align-items: center;
      justify-content: center;
      width: 7.2rem;
      height: 7.2rem;
      border-radius: 50%;
      color: var(--c-blue);
      background: var(--c-blue-soft);
      font-size: 4.4rem;
      font-variation-settings: 'FILL' 0, 'wght' 500, 'GRAD' 0, 'opsz' 48;
      line-height: 1;
    }

    b {
      display: block;
      margin-bottom: 0.4rem;
      font-size: clamp(1.8rem, 1.7vw, 2.8rem);
      font-weight: 800;
      line-height: 1.45;
    }

    p {
      margin: 0;
      font-size: clamp(1.2rem, 1vw, 1.5rem);
      font-weight: 700;
      line-height: 1.7;
    }

    /* 交通手段ごとのテーマカラー */
    li:nth-child(1)::before {
      background: #05a53a;
    }
    li:nth-child(1) .material-symbols-rounded {
      color: #05a53a;
      background: #e3f8e9;
    }
    li:nth-child(2)::before {
      background: #1557d6;
    }
    li:nth-child(2) .material-symbols-rounded {
      color: #1557d6;
      background: #e4ecff;
    }
    li:nth-child(3)::before {
      background: #e86f00;
    }
    li:nth-child(3) .material-symbols-rounded {
      color: #e86f00;
      background: #fff0de;
    }
    li:nth-child(4)::before {
      background: #8248c8;
    }
    li:nth-child(4) .material-symbols-rounded {
      color: #8248c8;
      background: #f0e3ff;
    }
    li:nth-child(5)::before {
      background: #0f8f8a;
    }
    li:nth-child(5) .material-symbols-rounded {
      color: #0f8f8a;
      background: #dff8f5;
    }
  }

  /* ---- Safety ---- */
  #safety {
    padding: var(--section-pad-y) 0 7.2rem;
  }

  #slogan {
    position: relative;
    overflow: hidden;
    min-height: 220px;
    margin-bottom: 5.6rem;
    padding: 4.8rem 5.2rem;
    border-radius: 8px;
    color: var(--c-white);
    background:
      linear-gradient(90deg, rgb(0 70 155 / 96%) 0%, rgb(0 97 210 / 92%) 52%, rgb(0 97 210 / 20%) 100%),
      url('./images/bg.png') center right / cover no-repeat;
    box-shadow: var(--shadow-card);

    h3 {
      margin: 0 0 2rem;
      font-size: clamp(2.4rem, 3vw, 3.2rem);
      font-weight: 800;
      line-height: 1.4;
    }

    p {
      margin: 0;
      font-size: clamp(1.3rem, 1.25vw, 1.6rem);
      font-weight: 700;
      line-height: 1.8;
    }
  }

  #safety .content {
    /* 見出しは擬似要素で生成 */
    &::before {
      content: '安心・安全のために';
      display: block;
      width: fit-content;
      margin: 0 auto 4.8rem;
      padding-bottom: 1rem;
      border-bottom: 4px solid var(--c-blue);
      font-size: clamp(2.4rem, 3vw, 3.2rem);
      font-weight: 800;
      line-height: 1.4;
      text-align: center;
    }

    ul {
      display: grid;
      grid-template-columns: repeat(3, minmax(0, 1fr));
      gap: clamp(1.6rem, 3vw, 4rem);
      margin: 0;
      padding: 0;
    }

    li {
      display: grid;
      grid-template-columns: 7.2rem minmax(0, 1fr);
      column-gap: 1.8rem;
      align-items: center;
      min-width: 0;
    }

    svg {
      grid-row: 1 / 3;
      width: 7.2rem;
      height: 7.2rem;
      fill: var(--c-blue);
    }

    b {
      display: block;
      margin-bottom: 0.6rem;
      font-size: clamp(2rem, 1.9vw, 2.4rem);
      font-weight: 800;
      line-height: 1.45;
    }

    p {
      margin: 0;
      font-size: clamp(1.25rem, 1.05vw, 1.45rem);
      font-weight: 700;
      line-height: 1.7;
      white-space: nowrap;
    }
  }
}

/* -------------------------------------------------------------
   Footer
   ------------------------------------------------------------- */
footer {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.8rem;
  margin-top: 7.2rem;
  padding: 4rem 5% 2.4rem;
  text-align: center;
  background: linear-gradient(180deg, #f3faff 0%, #eef7ff 100%);

  img {
    width: 16rem;
    height: auto;
    object-fit: contain;
  }

  p {
    margin: 0;
    font-size: clamp(1.6rem, 1.4vw, 2rem);
    font-weight: 700;
    line-height: 1.7;
  }

  /* コピーライト行 */
  p:nth-of-type(3) {
    margin-top: 1.6rem;
    color: var(--c-muted);
    font-size: 1.4rem;
    font-weight: 500;
  }
}
