/* 有限会社クマック 会社紹介サイト */

:root {
  --navy: #061a2e;
  --navy-deep: #03101d;
  --sea: #0b3a66;
  --teal: #0e8fb3;
  --blue: #0f5bd7;
  --lemon: #ffd738;
  --ink: #0a1b2b;
  --ink-soft: #4a5a6a;
  --mist: #eef3f7;
  --white: #ffffff;
  --line: #d5dee6;
  --line-strong: #9fb3c4;
  --on-dark-soft: rgba(255, 255, 255, 0.68);
  --on-dark-line: rgba(255, 255, 255, 0.18);
  --font: "Bricolage Grotesque", "Zen Kaku Gothic New", "Hiragino Kaku Gothic ProN", "Hiragino Sans", "Yu Gothic", "YuGothic", "Meiryo", sans-serif;
  --header-height: 76px;
  --gutter: clamp(20px, 5vw, 48px);
  --radius: 28px;
  --ease: cubic-bezier(0.2, 0.7, 0.2, 1);
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
  scroll-padding-top: calc(var(--header-height) + 16px);
  -webkit-text-size-adjust: 100%;
}

body {
  margin: 0;
  background: var(--white);
  color: var(--ink);
  font-family: var(--font);
  font-size: 16px;
  font-weight: 500;
  line-height: 1.9;
  overflow-wrap: anywhere;
  -webkit-font-smoothing: antialiased;
}

h1,
h2,
h3,
p,
ul,
ol,
dl,
dd,
address {
  margin: 0;
  padding: 0;
}

ul,
ol {
  list-style: none;
}

address {
  font-style: normal;
}

a {
  color: var(--blue);
}

a:focus-visible,
button:focus-visible {
  outline: 3px solid var(--blue);
  outline-offset: 3px;
}

.container {
  width: 100%;
  max-width: calc(1200px + var(--gutter) * 2);
  margin: 0 auto;
  padding: 0 var(--gutter);
}

/* ヘッダー（常に上に固定） */
.site-header {
  position: fixed;
  top: 0;
  left: 0;
  z-index: 100;
  width: 100%;
  color: var(--ink);
  transition: color 0.3s ease;
}

/* 背景のぼかしは疑似要素に持たせる（header 自体に付けると、中の固定メニューの基準がずれるため） */
.site-header::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: -1;
  background: rgba(255, 255, 255, 0.86);
  border-bottom: 1px solid var(--line);
  -webkit-backdrop-filter: blur(14px);
  backdrop-filter: blur(14px);
  transition: opacity 0.3s ease;
}

.header-inner {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 4px 24px;
  min-height: var(--header-height);
}

.brand {
  position: relative;
  z-index: 2;
  display: inline-flex;
  align-items: center;
  gap: 12px;
  color: inherit;
  font-size: 1.125rem;
  font-weight: 900;
  letter-spacing: 0.04em;
  text-decoration: none;
}

.brand-logo {
  display: block;
  width: auto;
  height: 44px;
}

.site-nav ul {
  display: flex;
  flex-wrap: wrap;
  gap: 4px 32px;
}

.site-nav a {
  position: relative;
  display: block;
  padding: 8px 0;
  color: inherit;
  font-size: 0.9375rem;
  font-weight: 700;
  text-decoration: none;
}

.site-nav a::after {
  content: "";
  position: absolute;
  left: 0;
  bottom: 2px;
  width: 100%;
  height: 3px;
  background: var(--lemon);
  transform: scaleX(0);
  transform-origin: left;
  transition: transform 0.3s var(--ease);
}

.site-nav a:hover::after,
.site-nav a:focus-visible::after {
  transform: scaleX(1);
}

.nav-toggle {
  display: none;
}

/* ページ最上部にいる間は透明（main.js が .is-top を付け外しする） */
.js.is-top .site-header,
.js.nav-open .site-header {
  color: var(--white);
}

.js.is-top .site-header::before,
.js.nav-open .site-header::before {
  opacity: 0;
}

.js.is-top .site-header a:focus-visible,
.js.nav-open .site-header a:focus-visible,
.js.is-top .nav-toggle:focus-visible,
.js.nav-open .nav-toggle:focus-visible {
  outline-color: var(--lemon);
}

/* トップ */
.hero {
  position: relative;
  display: flex;
  align-items: flex-end;
  min-height: 100vh;
  min-height: 100svh;
  padding: calc(var(--header-height) + 48px) 0 clamp(48px, 8vh, 96px);
  overflow: hidden;
  background: var(--navy);
  color: var(--white);
}

.hero-bg {
  position: absolute;
  inset: 0;
  background: linear-gradient(160deg, var(--navy-deep) 0%, var(--navy) 45%, var(--sea) 100%);
}

.hero-orb {
  position: absolute;
  border-radius: 50%;
  filter: blur(70px);
  will-change: transform;
}

.hero-orb-1 {
  top: -18%;
  right: -12%;
  width: min(62vw, 820px);
  height: min(62vw, 820px);
  background: radial-gradient(circle, rgba(14, 143, 179, 0.85), rgba(14, 143, 179, 0) 70%);
  animation: drift-a 26s ease-in-out infinite alternate;
}

.hero-orb-2 {
  bottom: -30%;
  left: 18%;
  width: min(70vw, 900px);
  height: min(70vw, 900px);
  background: radial-gradient(circle, rgba(15, 91, 215, 0.6), rgba(15, 91, 215, 0) 70%);
  animation: drift-b 32s ease-in-out infinite alternate;
}

.hero-ring {
  position: absolute;
  top: 10%;
  right: 3%;
  width: clamp(110px, 19vw, 280px);
  height: clamp(110px, 19vw, 280px);
  border: 1px solid rgba(255, 255, 255, 0.28);
  border-radius: 50%;
  animation: float 18s ease-in-out infinite alternate;
}

.hero-ring::after {
  content: "";
  position: absolute;
  top: 12%;
  left: 12%;
  width: 14px;
  height: 14px;
  border-radius: 50%;
  background: var(--lemon);
}

.hero-inner {
  position: relative;
}

.hero-place {
  display: flex;
  align-items: center;
  gap: 10px;
  color: var(--on-dark-soft);
  font-size: 0.9375rem;
  font-weight: 700;
  letter-spacing: 0.12em;
}

.hero-place::before {
  content: "";
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: var(--lemon);
}

.hero-title {
  margin-top: 4px;
  font-size: clamp(1.25rem, 2.2vw, 1.75rem);
  font-weight: 900;
  letter-spacing: 0.06em;
  line-height: 1.5;
}

.hero-copy {
  margin-top: clamp(20px, 4vh, 40px);
  font-size: clamp(2rem, min(10.4vw, 17vh), 9rem);
  font-weight: 900;
  letter-spacing: -0.01em;
  line-height: 1.12;
}

/* キャッチコピーは PC で3行、スマホでは区切りごとに5行に組む */
.hero-line {
  display: block;
  white-space: nowrap;
}

.hero-seg {
  display: inline-block;
  animation: rise 1.1s var(--ease) backwards;
}

.hero-line:nth-child(1) .hero-seg {
  animation-delay: 0.15s;
}

.hero-line:nth-child(2) .hero-seg {
  animation-delay: 0.3s;
}

.hero-line:nth-child(3) .hero-seg {
  animation-delay: 0.45s;
}

@keyframes rise {
  from {
    opacity: 0;
    transform: translateY(0.45em);
  }
}

@keyframes drift-a {
  to {
    transform: translate(-9vw, 8vh) scale(1.12);
  }
}

@keyframes drift-b {
  to {
    transform: translate(10vw, -7vh) scale(0.92);
  }
}

@keyframes float {
  to {
    transform: translate(-24px, 28px);
  }
}

/* セクション共通 */
.section {
  --section-bg: var(--white);
  padding: clamp(88px, 12vw, 176px) 0;
  background: var(--section-bg);
}

.section-tinted {
  --section-bg: var(--mist);
}

.section-flush {
  padding-top: 0;
}

.section-dark {
  --section-bg: var(--navy);
  color: var(--white);
}

.section-head {
  display: flex;
  flex-direction: column;
  margin-bottom: clamp(40px, 6vw, 80px);
}

/* 英字ラベルは輪郭だけの大きな文字で、見出しの脇に添える。
   線を先に描いてから背景色で塗り、文字の内側に出る線の重なりを隠す */
.section-label {
  color: var(--line-strong);
  font-size: clamp(2.5rem, 8vw, 7rem);
  font-weight: 800;
  letter-spacing: -0.01em;
  line-height: 1;
}

@supports (-webkit-text-stroke: 1px black) and (paint-order: stroke fill) {
  .section-label {
    color: var(--section-bg);
    -webkit-text-stroke: 3px var(--line-strong);
    paint-order: stroke fill;
  }
}

.section-title {
  font-size: clamp(2.25rem, 6vw, 4.5rem);
  font-weight: 900;
  letter-spacing: 0.02em;
  line-height: 1.2;
}

.section-dark .section-label {
  color: var(--on-dark-soft);
}

@supports (-webkit-text-stroke: 1px black) and (paint-order: stroke fill) {
  .section-dark .section-label {
    color: var(--section-bg);
    -webkit-text-stroke-color: #6f8296;
  }
}

/* 事業内容 */
.card-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: clamp(20px, 3vw, 32px);
}

.card {
  position: relative;
  padding: clamp(32px, 4.5vw, 56px);
  overflow: hidden;
  border-radius: var(--radius);
  background: var(--mist);
  transition: transform 0.45s var(--ease), box-shadow 0.45s var(--ease);
}

.card::after {
  content: "";
  position: absolute;
  top: -70px;
  right: -70px;
  width: 190px;
  height: 190px;
  border-radius: 50%;
  background: var(--lemon);
  transform: scale(0.55);
  transform-origin: center;
  transition: transform 0.6s var(--ease);
}

.card:hover {
  transform: translateY(-6px);
  box-shadow: 0 28px 48px -28px rgba(6, 26, 46, 0.45);
}

.card:hover::after {
  transform: scale(1);
}

.card-number {
  position: relative;
  z-index: 1;
  color: var(--blue);
  font-size: clamp(3rem, 6vw, 5rem);
  font-weight: 800;
  letter-spacing: -0.03em;
  line-height: 1;
}

.card-title {
  margin-top: clamp(20px, 3vw, 36px);
  font-size: clamp(1.375rem, 2.4vw, 1.875rem);
  font-weight: 900;
  line-height: 1.45;
  word-break: keep-all;
}

.card-text {
  margin-top: 16px;
  color: var(--ink-soft);
}

/* 取扱製品 */
.product-list {
  display: grid;
  gap: clamp(20px, 3vw, 32px);
}

.product {
  display: grid;
  grid-template-columns: minmax(0, 1.05fr) minmax(0, 1fr);
  align-items: start;
  gap: clamp(20px, 3vw, 32px);
}

.product-figure {
  position: sticky;
  top: calc(var(--header-height) + 24px);
  overflow: hidden;
  border-radius: var(--radius);
}

.product-image {
  display: block;
  width: 100%;
  height: auto;
  transition: transform 1.2s var(--ease);
}

.product:hover .product-image {
  transform: scale(1.04);
}

.product-body {
  padding: clamp(28px, 4.5vw, 64px);
  border-radius: var(--radius);
  background: var(--white);
}

.product-name {
  font-size: clamp(1.625rem, 3.4vw, 2.75rem);
  font-weight: 900;
  letter-spacing: 0.01em;
  line-height: 1.3;
  word-break: keep-all;
}

.product-spec {
  margin-top: clamp(24px, 3vw, 40px);
  border-top: 1px solid var(--line);
}

.product-spec div {
  display: flex;
  gap: 20px;
  padding: 14px 0;
  border-bottom: 1px solid var(--line);
}

.product-spec dt {
  flex: 0 0 5.5em;
  font-weight: 900;
}

.product-spec dd {
  color: var(--ink-soft);
}

.product-simple {
  grid-template-columns: minmax(0, 1fr);
}

.product-simple .product-body {
  display: grid;
  background: var(--navy);
  color: var(--white);
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
  gap: 8px 40px;
}

.product-text {
  grid-column: 1;
  color: var(--on-dark-soft);
}

.product-link {
  grid-column: 2;
  grid-row: 1 / span 2;
}

.product-link a {
  display: inline-block;
  padding: 16px 36px;
  border-radius: 999px;
  background: var(--lemon);
  color: var(--ink);
  font-weight: 900;
  text-decoration: none;
  transition: transform 0.3s var(--ease), box-shadow 0.3s var(--ease);
}

.product-link a:hover {
  transform: translateY(-3px);
  box-shadow: 0 16px 28px -14px rgba(255, 215, 56, 0.7);
}

.product-link a:focus-visible {
  outline-color: var(--white);
}

/* 会社概要 */
.profile-table {
  width: 100%;
  border-collapse: collapse;
  border-top: 2px solid var(--ink);
}

.profile-table th,
.profile-table td {
  padding: clamp(20px, 2.6vw, 32px) 0;
  border-bottom: 1px solid var(--line);
  text-align: left;
  vertical-align: top;
  font-size: 1.0625rem;
}

.profile-table th {
  width: min(30%, 280px);
  padding-right: 24px;
  font-weight: 900;
  white-space: nowrap;
}

.plain-list {
  counter-reset: item;
}

.plain-list li {
  counter-increment: item;
}

.plain-list li::before {
  content: counter(item) ". ";
}

.group-name {
  font-weight: 900;
}

.group-detail {
  margin-top: 8px;
}

.group-detail div {
  display: flex;
  gap: 16px;
}

.group-detail dt {
  flex: 0 0 5.5em;
  color: var(--ink-soft);
}

/* アクセス */
.access-box {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 32px;
  padding: clamp(32px, 6vw, 88px);
  overflow: hidden;
  border-radius: var(--radius);
  background: linear-gradient(120deg, var(--sea), var(--teal));
  color: var(--white);
}

.access-name {
  font-size: 1.0625rem;
  font-weight: 700;
}

.access-address {
  margin-top: 8px;
  font-size: clamp(1.125rem, 3.4vw, 2.75rem);
  font-weight: 900;
  line-height: 1.45;
}

.access-pin {
  position: relative;
  flex: 0 0 auto;
  width: clamp(96px, 14vw, 176px);
  height: clamp(96px, 14vw, 176px);
}

.access-pin-dot,
.access-pin-ring {
  position: absolute;
  inset: 0;
  margin: auto;
  border-radius: 50%;
}

.access-pin-dot {
  width: 22px;
  height: 22px;
  background: var(--lemon);
}

.access-pin-ring {
  width: 100%;
  height: 100%;
  border: 1.5px solid rgba(255, 255, 255, 0.6);
  animation: ping 3.6s ease-out infinite;
}

.access-pin-ring + .access-pin-ring {
  animation-delay: 1.8s;
}

@keyframes ping {
  from {
    opacity: 0.9;
    transform: scale(0.15);
  }

  to {
    opacity: 0;
    transform: scale(1);
  }
}

/* お問い合わせ */
.contact-lead {
  max-width: 40em;
  color: var(--on-dark-soft);
  font-size: 1.0625rem;
}

.contact-list {
  margin-top: clamp(28px, 4vw, 48px);
  border-top: 1px solid var(--on-dark-line);
}

.contact-list div {
  display: flex;
  align-items: baseline;
  gap: 24px;
  padding: clamp(18px, 2.4vw, 28px) 0;
  border-bottom: 1px solid var(--on-dark-line);
}

.contact-list dt {
  flex: 0 0 min(30%, 280px);
  color: var(--on-dark-soft);
  font-weight: 700;
}

.contact-list dd {
  font-size: 1.0625rem;
}

.contact-list .contact-item-large dd {
  font-size: clamp(1.75rem, 4.6vw, 3.25rem);
  font-weight: 800;
  letter-spacing: -0.01em;
  line-height: 1.2;
}

.contact-list .contact-item-mail dd {
  font-size: clamp(1.125rem, 3vw, 2rem);
  font-weight: 700;
  line-height: 1.4;
}

.contact-list a {
  color: var(--white);
  text-decoration-color: var(--lemon);
  text-decoration-thickness: 3px;
  text-underline-offset: 6px;
  transition: color 0.3s ease;
}

.contact-list a:hover {
  color: var(--lemon);
}

.contact-list a:focus-visible {
  outline-color: var(--lemon);
}

/* フッター */
.site-footer {
  padding: 32px 0;
  background: var(--navy-deep);
  color: var(--on-dark-soft);
}

.footer-copy {
  font-size: 0.875rem;
  letter-spacing: 0.06em;
}

/* スクロール表示（main.js が .js と .is-visible を付ける。JS が無ければ最初から表示） */
.js [data-reveal]:not(.is-visible) {
  opacity: 0;
}

.js [data-reveal].is-visible {
  animation: reveal 0.9s var(--ease) backwards;
}

.js .card-grid [data-reveal].is-visible:nth-child(2) {
  animation-delay: 0.14s;
}

@keyframes reveal {
  from {
    opacity: 0;
    transform: translateY(32px);
  }
}

/* PC幅：見出しと英字ラベルを左右に振り分ける */
@media (min-width: 861px) {
  .section-head {
    flex-direction: row-reverse;
    align-items: flex-end;
    justify-content: space-between;
    gap: 32px;
  }
}

/* タブレット以下：メニューをハンバーガーにする */
@media (max-width: 860px) {
  :root {
    --header-height: 64px;
  }

  .brand-logo {
    height: 38px;
  }

  .js .nav-toggle {
    position: relative;
    z-index: 2;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 8px;
    width: 48px;
    height: 48px;
    margin-right: -10px;
    padding: 0;
    border: 0;
    background: none;
    color: inherit;
    cursor: pointer;
  }

  .nav-toggle-bar {
    width: 28px;
    height: 3px;
    border-radius: 2px;
    background: currentColor;
    transition: transform 0.35s var(--ease);
  }

  .js.nav-open .nav-toggle-bar:first-child {
    transform: translateY(5.5px) rotate(45deg);
  }

  .js.nav-open .nav-toggle-bar:last-child {
    transform: translateY(-5.5px) rotate(-45deg);
  }

  .js .site-nav {
    position: fixed;
    inset: 0;
    z-index: 1;
    display: flex;
    align-items: center;
    padding: var(--header-height) var(--gutter) 32px;
    overflow-y: auto;
    background: var(--navy);
    color: var(--white);
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.35s ease, visibility 0.35s;
  }

  .js.nav-open .site-nav {
    opacity: 1;
    visibility: visible;
  }

  .js.nav-open body {
    overflow: hidden;
  }

  .js .site-nav ul {
    flex-direction: column;
    gap: 4px;
    width: 100%;
  }

  .js .site-nav a {
    display: inline-block;
    padding: 6px 0;
    font-size: clamp(1.75rem, 8vw, 2.5rem);
    font-weight: 900;
    line-height: 1.5;
  }

  .js .site-nav li {
    transform: translateY(16px);
    opacity: 0;
    transition: transform 0.5s var(--ease), opacity 0.5s ease;
  }

  .js.nav-open .site-nav li {
    transform: none;
    opacity: 1;
  }

  .js.nav-open .site-nav li:nth-child(2) {
    transition-delay: 0.05s;
  }

  .js.nav-open .site-nav li:nth-child(3) {
    transition-delay: 0.1s;
  }

  .js.nav-open .site-nav li:nth-child(4) {
    transition-delay: 0.15s;
  }

  .js.nav-open .site-nav li:nth-child(5) {
    transition-delay: 0.2s;
  }

  .product {
    grid-template-columns: minmax(0, 1fr);
  }

  .product-figure {
    position: static;
  }

  .product-simple .product-body {
    grid-template-columns: minmax(0, 1fr);
  }

  .product-link {
    grid-column: 1;
    grid-row: auto;
    margin-top: 16px;
  }
}

/* スマホ */
@media (max-width: 640px) {
  :root {
    --radius: 20px;
  }

  body {
    font-size: 15px;
  }

  .hero-copy {
    font-size: 17.2vw;
    line-height: 1.14;
  }

  .hero-seg {
    display: block;
  }

  .section-label {
    -webkit-text-stroke-width: 2px;
  }

  .card-grid {
    grid-template-columns: minmax(0, 1fr);
  }

  .profile-table th,
  .profile-table td {
    display: block;
    width: 100%;
  }

  .profile-table th {
    padding-bottom: 0;
    border-bottom: 0;
    color: var(--ink-soft);
    font-size: 0.875rem;
  }

  .profile-table td {
    padding-top: 4px;
  }

  .group-detail div {
    flex-direction: column;
    gap: 0;
    margin-top: 6px;
  }

  .group-detail dt {
    flex-basis: auto;
  }

  .product-spec div {
    flex-direction: column;
    gap: 0;
  }

  .product-spec dt {
    flex-basis: auto;
  }

  .access-box {
    flex-direction: column;
    align-items: flex-start;
  }

  .contact-list div {
    flex-direction: column;
    align-items: flex-start;
    gap: 4px;
  }

  .contact-list dt {
    flex-basis: auto;
    font-size: 0.875rem;
  }
}

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }

  *,
  *::before,
  *::after {
    animation: none !important;
    transition: none !important;
  }

  .access-pin-ring + .access-pin-ring {
    width: 55%;
    height: 55%;
  }
}
