/* ===== Design Tokens ===== */
:root{
  --c-main:#2F3639;
  --c-white:#fff;
  --navy:#002B5B;
  --navy-700:#1D2A44;
  --gray-50:#FAFAFA;
  --gray-100:#F2F4F7;
  --gray-200:#ababab;
  --gray-300:#8D8D8D;
  --gray-600:#6B7280;
  --ink:#1F2937;
  --accent:#D72638;
  --t-main:"Noto Sans JP",sans-serif;
  --t-inter:"Inter",sans-serif;
  --container: 1200px;
  --radius:16px;
  --shadow: 4 4px 4px rgba(0,0,0,0.5);
}

/* ===== Base ===== */
*,*::before,
*::after {
  box-sizing:border-box;
}
html,body {
  height:100%;
}
body {
  margin:0;
  font-family:system-ui,-apple-system,Segoe UI,Roboto,"Noto Sans JP",Meiryo,sans-serif;
  color:var(--t-main);
  line-height:1.8;
  letter-spacing:0.1em;
}
.pc-none {
  display:none;
}
img {
  max-width:100%;
  height:auto;
  display:block;
}
h1 {
  font-size: min(48px,3.3vw);
  letter-spacing:0.1em;
  font-weight:700;
}

h2 {
  font-size: min(40px,2.7vw);
  letter-spacing:0.1em;
  font-weight:700;
}

h3,
h4 {
  font-size: min(20px,1.4vw);
  letter-spacing:0.1em;
  font-weight:700;
}
h5,
h6 {
  font-size: min(16px,1.1vw);
  letter-spacing:0.1em;
  font-weight:500;
}
a {
  color:inherit;
  text-decoration:none;
}
a:focus-visible,
button:focus-visible {
  outline:3px solid #94C6FF;
  outline-offset:2px;
}
p,
div {
  font-size: min(16px,1.1vw);
  letter-spacing:0.1em;
}
.req {
  color:var(--accent);
}
.note {
  color:var(--gray-600);
}
@media screen and (max-width:767px) {
  .pc-none {
    display:block;
  }
  h1 {
    font-size: min(40px,10vw);
    letter-spacing:0.05em;
    font-weight:700;
  }
  h2 {
    font-size: min(20px,5.3vw);
  }
  h3,
  h4 {
    font-size: min(14px, 3.8vw);
  }
  h5,
  h6 {
    font-size: min(16px,1.1vw);
    letter-spacing:0.1em;
    font-weight:500;
  }
  p,
  div {
  font-size: min(12px,3.2vw);
  }
}

/* animation */
:root{
  --reveal-duration:  0.8s;                 /* 速くしたいほど小さく */
  --reveal-ease: cubic-bezier(.2,.7,.2,1);
  --wipe-softness: 0px;
  --reveal-tx: 0px;
  --reveal-ty: 12px;
}

/* reveal--fadeup（下から上） */
.reveal--fadeup {
  opacity: 0;
  transform: translateY(30px);
  transition: opacity var(--reveal-duration) var(--reveal-ease),
              transform var(--reveal-duration) var(--reveal-ease);
  will-change: opacity, transform;
}
.reveal.is-inview.reveal--fadeup {
  opacity: 1;
  transform: none;
}

/* reveal--fadein（右から左） */
.reveal--fadein {
  opacity: 0;
  transform: translateX(-50px);
  transition: opacity var(--reveal-duration) var(--reveal-ease),
              transform var(--reveal-duration) var(--reveal-ease);
  will-change: opacity, transform;
}
.reveal.is-inview.reveal--fadein {
  opacity: 1;
  transform: none;
}

/* prefers-reduced-motion対応（すべてまとめて） */
@media (prefers-reduced-motion: reduce) {
  .reveal--fadeup,
  .reveal--fadein,
  .reveal.is-inview.reveal--fadeup,
  .reveal.is-inview.reveal--fadein {
    opacity: 1 !important;
    transform: none !important;
    transition: none !important;
  }
}
/* reveal--alpha */
.reveal--alpha{
  /* テキストにも効くように inline-block 推奨 */
  display:inline-block;
  will-change: -webkit-mask-size, mask-size;
  /* マスク画像：右端だけ透明へフェード */
  -webkit-mask-image: linear-gradient(90deg,
      #000 0,
      #000 calc(100% - var(--wipe-softness)),
      transparent 100%);
          mask-image: linear-gradient(90deg,
      #000 0,
      #000 calc(100% - var(--wipe-softness)),
      transparent 100%);
  -webkit-mask-repeat: no-repeat;
          mask-repeat: no-repeat;

  /* 初期：幅0% = 全面マスク（非表示） */
  -webkit-mask-size: 0% 100%;
          mask-size: 0% 100%;
  transition:
    -webkit-mask-size var(--reveal-duration) var(--reveal-ease),
            mask-size var(--reveal-duration) var(--reveal-ease);
}
/* 表示トリガー後：幅100%まで広げる＝左から順に不透明へ */
.reveal.is-inview.reveal--alpha{
  -webkit-mask-size: 100% 100%;
          mask-size: 100% 100%;
}
/* フォールバック（古いブラウザ）：通常の左→右フェード風に */
@supports not ((mask-image: linear-gradient(to right, #000, transparent)) or
              (-webkit-mask-image: linear-gradient(to right, #000, transparent))){
  .reveal--alpha{
    opacity: 0;
    transform: translateX(-8px);
    transition: opacity var(--reveal-duration) var(--reveal-ease),
                transform var(--reveal-duration) var(--reveal-ease);
  }
  .reveal.is-inview.reveal--alpha{
    opacity: 1; transform: none;
  }
}
/* =========================
  wipe-up（下から上）
========================= */
.reveal--up {
  display: inline-block;
  will-change: mask-size, -webkit-mask-size;
  -webkit-mask-image: linear-gradient(180deg,
      #000 0,
      #000 calc(100% - var(--wipe-softness)),
      transparent 100%);
          mask-image: linear-gradient(180deg,
      #000 0,
      #000 calc(100% - var(--wipe-softness)),
      transparent 100%);
  -webkit-mask-repeat: no-repeat;
          mask-repeat: no-repeat;
  -webkit-mask-size: 100% 0%;
          mask-size: 100% 0%;
  transition:
    -webkit-mask-size var(--reveal-duration) var(--reveal-ease),
            mask-size var(--reveal-duration) var(--reveal-ease);
}

.reveal.is-inview.reveal--up {
  -webkit-mask-size: 100% 100%;
          mask-size: 100% 100%;
}
/* =========================
  wipe-right（右から左）
========================= */
.reveal--right {
  display: inline-block;
  will-change: -webkit-mask-size, mask-size;
  -webkit-mask-image: linear-gradient(270deg, /* ← 右から左へ */
    #000 0,
    #000 calc(100% - var(--wipe-softness)),
    transparent 100%);
  mask-image: linear-gradient(270deg,
    #000 0,
    #000 calc(100% - var(--wipe-softness)),
    transparent 100%);
  -webkit-mask-repeat: no-repeat;
  mask-repeat: no-repeat;
  -webkit-mask-size: 0% 100%;
  mask-size: 0% 100%;

  transition:
    -webkit-mask-size var(--reveal-duration) var(--reveal-ease),
            mask-size var(--reveal-duration) var(--reveal-ease);
}
.reveal--right.is-inview {
  -webkit-mask-size: 100% 100%;
  mask-size: 100% 100%;
}
/* フォールバック（古いブラウザ） */
@supports not ((mask-image: linear-gradient(to left, #000, transparent)) or
              (-webkit-mask-image: linear-gradient(to left, #000, transparent))) {
  .reveal--up {
    opacity: 0;
    transform: translateY(8px);
    transition: opacity var(--reveal-duration) var(--reveal-ease),
                transform var(--reveal-duration) var(--reveal-ease);
  }
  .reveal.is-inview.reveal--up {
    opacity: 1;
    transform: none;
  }
  .reveal--right {
    opacity: 0;
    transform: translateX(8px);
    transition: opacity var(--reveal-duration) var(--reveal-ease),
                transform var(--reveal-duration) var(--reveal-ease);
  }
  .reveal.is-inview.reveal--right {
    opacity: 1;
    transform: none;
  }
}

/* ===== Header ===== */
.header {
  position:sticky;
  top:0;
  z-index:1000;
  background:#fff;
  border-bottom:1px solid var(--gray-200);
}
.header__inner {
  display:flex;
  align-items:center;
  gap:24px;
  height:80px;
}
.site-header__logo {
  width:120px;
  height:auto;
}
.nav {
  margin-left:auto;
}
.nav__list {
  display:flex;
  gap:28px;
  list-style:none;
  margin:0;padding:0;
}
.nav__link {
  display:inline-block;
  padding:8px 2px;
  font-weight:600;
  color:var(--c-main);
  position:relative;
}
.nav__link::after {
  content:"";
  position:absolute;
  left:0;
  bottom:0;
  width:0;
  height:1px;
  background:var(--accent);
  transition:width .25s ease;
}
.nav__link:hover::after {
  width:100%;
}
.header__toggle {
  display:none;
  width:44px;
  height:44px;
  border:1px solid var(--gray-300);
  border-radius:10px;
  background:#fff;
  align-items:center;
  justify-content:center;
  cursor:pointer;
}
.header__toggle .bar {
  width:22px;
  height:2px;
  background:var(--navy);
  border-radius:1px;
  transition:transform .25s ease,opacity .2s;
}
.header__toggle .bar + .bar {
  margin-top:5px;
}
.header__toggle[aria-expanded="true"] .bar:nth-child(1) {
  transform:translateY(7px) rotate(45deg);
}
.header__toggle[aria-expanded="true"] .bar:nth-child(2) {
  opacity:0;
}
.header__toggle[aria-expanded="true"] .bar:nth-child(3) {
  transform:translateY(-7px) rotate(-45deg);
}

@media screen and (max-width:767px){
  .header {
    position:fixed;
    width:100vw;
  }
  .nav {
    display:none;
  }
  .header__toggle {
    display:inline-flex;
    margin-left:auto;
    flex-direction: column;
  }
  .drawer {
    position:fixed;
    inset:64px 0 0 0;
    background:rgba(0,0,0,.4);
    backdrop-filter:saturate(140%) blur(2px);
    opacity:0;
    pointer-events:none;
    transition:opacity .25s ease;
  }
  .drawer.is-open {
    opacity:1;
    pointer-events:auto;
  }
  .drawer__panel {
    width:min(88vw,360px);
    height:100%;
    background:linear-gradient(45deg, var(--navy), #000);
    margin-left:auto;
    padding:20px 20px 40px;
    box-shadow:var(--shadow);
    display:flex;
    flex-direction:column;
  }
  .drawer__title {
    color:var(--navy);
  }
  .drawer__list {
    list-style:none;
    margin:12px 0 0;
    padding:0;
    display:flex;
    flex-direction:column;
    gap:8px;
  }
  .drawer__link {
    display:block;
    padding:14px 12px;
    border-radius:12px;
    color:var(--c-white);
    font-weight:700;
  }
  .drawer__link:hover {
    background:var(--gray-100);
  }
}

/* ===== Layout ===== */
.container {
  max-width:var(--container);
  margin-inline:auto;
  padding:0 20px;
  position: relative;
  z-index: 10;
}

/* ===== Hero ===== */
.hero {
  position:relative;
  color:var(--navy);
  height: 50vw;
  min-height:700px;
  display:grid;
  place-items:end center;
  overflow:hidden;
}
.hero__bg {
  width:100vw;
  height:100%;
}
.hero__bg img {
  width:100%;
  height:100%;
  object-fit:cover;
}
.hero__title {
  position:absolute;
  top:20%;
  left:5%;
  font-size:clamp(24px,4vw,40px);
  font-weight:800;
  transform: skewX(-3deg);
  margin-bottom: 2rem;
  padding:0 10px;
}
.hero__title span {
  background-color:var(--c-white);
  padding: 0.5em;
  box-decoration-break: clone;
  -webkit-box-decoration-break: clone;
  line-height: 2.5;
}
.hero__sub {
  position:absolute;
  bottom:10%;
  right:5%;
  padding: 0.25em 0.5em;
  width: fit-content;
  font-size:min(24px,1.6vw);
  font-weight:bold;
  background-color:var(--c-white);
  opacity:.9;
}

@media screen and (max-width:767px) {
  .hero {
    height:auto;
    min-height:auto;
  }
  .hero__bg img {
    height:80vh;
  }
  .hero__sub {
    font-size:min(12px,3.2vw);
    text-align:right;
  }
}

/* ===== Sections ===== */
.section {
  padding:50px 0;
}
.section--muted {
  background:var(--gray-50);
}
.sec-head {
  position:relative;
  margin-bottom:28px;
}
.sec-eyebrow {
  color:var(--navy);
  font-weight:800;
  letter-spacing:.08em;
  text-transform:uppercase;
  font-size:14px;
}
.sec-title {
  margin:4px 0 0;
  font-size:clamp(22px,3vw,30px);
  font-weight:800;
}
.sec-label {
  position:absolute;
  top:-50px;
  right:0;
  font-family: var(--t-inter);
  font-weight:700;
  font-size:min(100px,7vw);
  color:rgba(215,38,56,0.5);
  user-select:none;
  pointer-events:none;
}

@media screen and (max-width:767px) {
  .sec-title {
    text-align: center;
  }
  .sec-label {
    position: absolute;
    top: -70px;
    left: 0;
    font-size: min(50px, 13.3vw);
    color: rgba(215, 38, 56, 0.25);
  }
}
/* ===== News ===== */

/* 好みで色やサイズを調整 */
/* 好みで色やサイズを調整 */
.news {
  --news-color: rgba(0, 43, 91, 0.2); /* 紺の薄い線 */
  --news-size: 18px;                  /* パターンの基本サイズ */
  --news-line: 1px;                   /* 線/ドットの太さ */
  position: relative;
}

/* 既存の .news::before を置き換え（フェードで上部だけに薄く表示） */
.news::before {
  content: "";
  position: absolute;
  inset: 0 0 auto 0;
  height: 200px;              /* 背景を出す高さ */
  pointer-events: none;
  /* 下で各パターンが background を上書きします */
  background: none;
  /* 上から下へフェードアウト（必要なければ削除） */
  -webkit-mask-image: linear-gradient(#000, transparent);
          mask-image: linear-gradient(#000, transparent);
}

/* 3) 直線グリッド（水平×垂直の方眼） */
.news.is-grid::before {
  background:
    linear-gradient(var(--news-color) var(--news-line), transparent 0) 0 0 / 100% var(--news-size),
    linear-gradient(90deg, var(--news-color) var(--news-line), transparent 0) 0 0 / var(--news-size) 100%;
  background-repeat: repeat;
  opacity: 1;
}

.news__grid {
  width:90%;
  display:grid;
  gap:10px;
  margin:0 auto;
}
.news__item {
  display:flex;
  gap:16px;
  align-items:flex-start;
  padding:10px 20px;
}
.news__date {
  width: 12.5%;
  white-space:nowrap;
  color:var(--gray-300);
  font-feature-settings:"palt";
  border-right:1px solid var(--gray-200);
}

@media screen and (max-width:767px) {
  .news {
    padding: 80px 0;
  }
  .news__grid {
    width:100%;
  }
  .news__item {
    flex-direction:column;
    gap:10px;
  }
  .news__date {
    width:100%;
    border-right:none;
  }
}

/* ===== Services ===== */
.services {
  position:relative;
  background-image:url(../../assets/img/demo3/bg1.jpg);
  background-size: cover;
  background-position:50% 50%;
  background-repeat:no-repeat;
  padding: 80px 0;
}
.services::before{
  background-color: rgba(0,43,91,0.25);
  position: absolute;
  top: 0;
  right: 0;
  bottom: 0;
  left: 0;
  content: ' ';
}
.services .sec-title {
  color:var(--c-white);
}
.cards {
  display:grid;
  grid-template-columns:repeat(1,1fr);
  gap: 30px;
  width:90%;
  margin:100px auto 50px;
}
.card {
  display:flex;
  flex-direction:row;
  align-items:center;
  gap:10px;
  padding:30px 20px;
  background:rgba(255,255,255,0.9);
  box-shadow:var(--shadow);
}
.card__lead {
  font-size:min(24px,1.6vw);
  font-weight:700;
  color:var(--navy)
}

@media screen and (max-width:767px) {
  .services {
    background-position:70% 50%;
  }
  .cards {
    margin:30px auto;
  }
  .card {
    flex-direction:column;
  }
  .card__lead {
    font-size:min(20px,5.3vw);
    text-align:center;
    margin-bottom: 10px;
  }
}

/* ===== Products ===== */
.products {
  position:relative;
  background:var(--navy-700);
  color:#fff;
  padding:80px 0;
  --dot:#9FB8D6;
}
.products .sec-title {
  color:#fff;
}
.products::after {
  content:"";
  position:absolute;
  inset:0;
  pointer-events:none;
  --bg: radial-gradient(circle at 100% 50%, var(--dot) 30%, transparent 31%) 0 0/18px 18px;
  background: var(--bg);
  mask-image: linear-gradient(to left, #000 15%, rgba(0,0,0,.7) 35%, rgba(0,0,0,.3) 60%, rgba(0,0,0,0) 85%);
  opacity:.5;
}
.product-grid {
  display:grid;
  grid-template-columns:repeat(3,1fr);
  gap:50px;
  width:90%;
  position:relative;
  margin:100px auto 50px;
  z-index:1;
}
.product {
  background:rgba(255,255,255,0.8);
  overflow:hidden;
  box-shadow:var(--shadow);
  display:grid;
  gap:10px;
  padding:20px;
  align-content:start;
  text-align:center;
}
.product img {
  width:80%;
  height:auto;
  margin:0 auto;
}
.product__name {
  font-size:min(20px,1.4vw);
  font-weight:700;
  color:var(--navy);
}
.product p {
  color:var(--c-main);
}
@media (max-width:960px) {
  .product-grid {
    grid-template-columns:1fr 1fr;
  }
}
@media (max-width:767px) {
  .product-grid {
    grid-template-columns:1fr 1fr;
    gap: 15px;
    width: 100%;
    margin: 30px auto;
  }
  .product {
    padding:0 0 20px 0;
  }
  .product img {
    width:100%;
  }
  .product__name {
    font-size:min(12px,3.2vw);
  }
}

/* ===== Company ===== */
.company {
  position:relative;
  position:relative;
  background-image:url(../../assets/img/demo3/bg4.jpg);
  background-size: cover;
  background-position:50% 50%;
  background-repeat:no-repeat;
}
.company__bg {
  position:absolute;
  inset:0;
  opacity:0.3;
  background: var(--gray-200);
}
.company__card {
  position:relative;
  background:#fff;
  border:1px solid var(--gray-200);
  box-shadow:var(--shadow);
  overflow:hidden;
  margin:100px auto 50px;
}
.table {
  width:100%;
  border-collapse:collapse;
}
.table th,.table td {
  padding:12px 14px;
  border-bottom:1px solid var(--gray-200);
  text-align:center;
}
.table th {
  width:24%;
  color:var(--gray-600);
  background:var(--gray-100);
  font-weight:700;
}
.table tr:last-child th,
.table tr:last-child td {
  border-bottom:none;
}

@media screen and (max-width:767px) {
  .company {
    padding: 80px 0;
  }
  .company__card {
    margin:30px auto;
  }
  .table th {
    width:25%;
  }
  .table th, 
  .table td {
    padding: 10px 5px;
  }
}

/* ===== Contact ===== */
.contact {
  --hex-color: rgba(0, 43, 91, .12);
  --hex-size: 36px;
  --hex-line: 1px;
  position: relative;
}
/* 既存の .news::before はコメントアウト or 削除して、こちらを使う */
.contact.is-hex::before {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
  z-index: 0;
  /* 3方向のラインでハニカムを構成 */
  background:
    /* 60° */
    repeating-linear-gradient(
      60deg,
      var(--hex-color) 0 calc(var(--hex-line)),
      transparent calc(var(--hex-line)) calc(var(--hex-size))
    ),
    /* 120° */
    repeating-linear-gradient(
      120deg,
      var(--hex-color) 0 calc(var(--hex-line)),
      transparent calc(var(--hex-line)) calc(var(--hex-size))
    ),
    /* 0°（水平） */
    repeating-linear-gradient(
      0deg,
      var(--hex-color) 0 calc(var(--hex-line)),
      transparent calc(var(--hex-line)) calc(var(--hex-size))
    );
    /* 右下へフェード */
    -webkit-mask-image: linear-gradient(
      to right,
      rgba(0,0,0,0.6) 10%,
      rgba(0,0,0,0) 100%
    );
    -webkit-mask-repeat: no-repeat;
    -webkit-mask-size: cover;

    mask-image: linear-gradient(
      to right,
      rgba(0,0,0,0.6) 10%,
      rgba(0,0,0,0) 100%
    );
    mask-repeat: no-repeat;
    mask-size: cover;
  opacity: 1; /* 薄くしたい時は .6 などに */
}
/* 上部にだけ出してフェードさせたい場合（任意） */
.contact.is-hex.is-fade::before {
  top: 0;
  height: 220px;
  bottom: auto;
  -webkit-mask-image: linear-gradient(#000, transparent);
          mask-image: linear-gradient(#000, transparent);
}
.form {
  display:grid;
  gap:30px;
  padding:20px;
  box-shadow:var(--shadow);
  margin:100px auto 50px;
}
label {
  font-weight:700;
}
.input,
.textarea {
  width:100%;
  border:1px solid var(--gray-100);
  padding:15px 20px;
  font:inherit;
  font-weight:400;
  background:#fff;
}
.textarea {
  min-height:160px;
  resize:vertical;
}
.u-center {
  text-align:right;
}
.mt-8 {
  margin-top:8px;
}
.btn {
  display:inline-grid;
  place-items:center;
  width:240px;
  height:50px;
  padding:0 auto;
  border:2px solid var(--navy);
  color:var(--navy);
  background:var(--c-white);
  font-weight:800;
  letter-spacing: 0.1em;
}
.btn:hover {
  background:var(--navy);
  color:var(--c-white);
  transition:0.3s;
}
@media screen and (max-width:767px) {
  .contact {
    padding: 80px 0;
  }
  .form {
    margin:30px auto;
  }
  .input,
  .textarea {
    padding:8px 15px;
  }
  .btn {
    width:150px;
    height:40px;
  }
}

/* ===== Footer ===== */
.footer {
  padding:32px 0;
  color:#fff;
  background:var(--navy-700);
  text-align:center;
  font-size:14px;
}
.footer-nav {
  display:flex;
  flex-direction:row;
  justify-content: center;
  margin:30px auto;
}
.footer-nav li {
  border-right:1px solid var(--c-white);
  padding:0 20px;
}
.footer-nav li:hover {
  opacity:0.5;
  transition:0.3s;
}
.footer-nav li:last-child {
  border-right: none;
}
@media screen and (max-width:767px) {
  .footer-nav {
    flex-direction:column;
    gap:10px;
    margin: 10px auto 30px;
  }
  .footer-nav li {
    border-right:none;
  }
}

/* Motion Reduce */
@media (prefers-reduced-motion:reduce) {
  * {
    animation:none!important;
    transition:none!important
  }
}
