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

:root {
  --blue: #0071BC;
  --dark: #1a1a2e;
  --gray: #6b7280;
  --border: #e5e7eb;
  --bg: #f8f9fb;
  --white: #ffffff;
  --hero-bg: #f2f2f0;
}

html { scroll-behavior: smooth; }

body {
  font-family: 'Hiragino Kaku Gothic ProN', 'Hiragino Sans', Meiryo, sans-serif;
  color: var(--dark);
  background: var(--white);
}

/* ===== HEADER ===== */
header {
  position: fixed;
  top: 0; left: 0; right: 0;
  z-index: 100;
  padding: 1.25rem 2rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  transition: background 0.3s, box-shadow 0.3s;
}

header.scrolled {
  background: rgba(255,255,255,0.96);
  backdrop-filter: blur(8px);
  box-shadow: 0 1px 0 var(--border);
}

.logo {
  font-size: 1.1rem;
  font-weight: 700;
  color: var(--blue);
  text-decoration: none;
  letter-spacing: -0.02em;
  transition: color 0.3s;
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.logo img {
  width: 32px;
  height: 32px;
  object-fit: contain;
  border-radius: 50%;
  flex-shrink: 0;
}

header.scrolled .logo { color: var(--blue); }

.header-nav { display: flex; gap: 2rem; align-items: center; }

.header-nav a {
  font-size: 0.8rem;
  font-weight: 500;
  color: var(--blue);
  text-decoration: none;
  transition: color 0.3s, opacity 0.2s;
}

header.scrolled .header-nav a { color: var(--gray); }
.header-nav a:hover { opacity: 0.7; }

/* ===== HERO ===== */
.hero {
  position: relative;
  width: 100%;
  height: clamp(360px, 50vw, 420px);
  overflow: hidden;
  background: #f8f9fb;
}

.hero-bg {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: right center;
}


.hero-fade {
  position: absolute;
  bottom: 0; left: 0; right: 0;
  height: 20%;
  background: linear-gradient(to bottom, transparent, var(--hero-bg));
  pointer-events: none;
}

.hero-content {
  position: absolute;
  top: 50%;
  left: 5%;
  transform: translateY(-50%);
  z-index: 2;
  width: 42%;
  max-width: 500px;
}

.hero-eyebrow {
  font-size: 0.68rem;
  font-weight: 700;
  letter-spacing: 0.15em;
  color: var(--blue);
  background: rgba(255,255,255,0.92);
  display: inline-block;
  padding: 0.3rem 0.8rem;
  border-radius: 2px;
  margin-bottom: 1.25rem;
  width: fit-content;
  text-transform: uppercase;
}

.hero-title {
  font-size: clamp(1.5rem, 4vw, 3.5rem);
  font-weight: 700;
  line-height: 1.25;
  color: var(--dark);
  margin-bottom: 1rem;
  overflow-wrap: break-word;
}

.hero-title-accent { color: var(--blue); }

.hero-btn {
  display: inline-block;
  margin-top: 1.75rem;
  padding: 0.75rem 1.75rem;
  background: var(--blue);
  color: var(--white);
  font-size: 0.875rem;
  font-weight: 700;
  text-decoration: none;
  border-radius: 2px;
  transition: opacity 0.2s;
}

.hero-btn:hover { opacity: 0.8; }

.hero-sub {
  font-size: clamp(0.8rem, 1.3vw, 1rem);
  color: #555;
  line-height: 1.85;
  overflow-wrap: break-word;
}

/* ===== タブレット: テキスト幅を段階的に縮小 ===== */
@media (max-width: 900px) {
  .hero-content {
    width: 40%;
    max-width: none;
  }
}

/* ===== SP: 縦積みレイアウト (〜767px / 最小375px想定) ===== */
@media (max-width: 767px) {
  /* ヘッダー */
  header { padding: 3.5rem 2rem; } 
  header.scrolled { padding: 0.7rem 5.7rem 0.7rem; justify-content: center; }
  .header-nav { display: none; }
  .logo {
    font-size: clamp(0.8rem, 3.5vw, 1.1rem);
  }
  .logo img {
    width: clamp(24px, 5vw, 32px);
    height: clamp(24px, 5vw, 32px);
  }

  /* ヒーロー: 画像→テキストの縦積み */
  .hero {
    height: auto;
    display: flex;
    flex-direction: column;
    overflow: visible;
  }
  .hero-bg {
    position: relative;
    inset: auto;
    width: 100%;
    height: auto;
    object-fit: initial;
    object-position: initial;
    order: 1;
  }
  .hero-fade { display: none; }
  .hero-scroll { display: none; }
  .hero-content {
    position: relative;
    top: auto;
    left: auto;
    transform: none;
    order: 2;
    width: 100%;
    max-width: none;
    padding: 1.5rem 1.25rem 2rem;
    background: var(--hero-bg);
  }
  .hero-title {
    font-size: clamp(1.25rem, 5.5vw, 1.75rem);
  }
  .hero-sub {
    font-size: clamp(0.8rem, 3.5vw, 0.95rem);
  }
  .brand-section br { display: none; }
}

.hero-scroll {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.5rem;
  color: var(--gray);
  font-size: 0.6rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  padding-top: 2.5rem;
}

.hero-scroll-line {
  width: 1px;
  height: 36px;
  background: linear-gradient(to bottom, var(--gray), transparent);
  animation: scrollAnim 1.6s ease-in-out infinite;
  transform-origin: top;
}

@keyframes scrollAnim {
  0%   { transform: scaleY(0); opacity: 0; }
  30%  { opacity: 1; }
  70%  { transform: scaleY(1); opacity: 1; }
  100% { transform: scaleY(1); opacity: 0; }
}

/* ===== BRAND STATEMENT ===== */
.brand-section {
  padding: 0 2rem 3rem;
  text-align: center;
  border-bottom: 1px solid var(--border);
}

.brand-section p {
  font-size: clamp(0.95rem, 1.8vw, 1.15rem);
  line-height: 2.1;
  color: var(--gray);
  max-width: 580px;
  margin: 0 auto;
}

.brand-section strong { color: var(--dark); font-weight: 700; }

/* ===== TOOLS ===== */
.tools-section {
  padding: 6rem 2rem;
  background: var(--bg);
}

.tools-inner { max-width: 1100px; margin: 0 auto; }

.section-header {
  display: flex;
  align-items: baseline;
  gap: 1rem;
  margin-bottom: 3rem;
}

.section-label {
  font-size: 0.68rem;
  font-weight: 700;
  letter-spacing: 0.15em;
  color: var(--blue);
  text-transform: uppercase;
}

.section-title {
  font-size: 1.5rem;
  font-weight: 700;
  color: var(--dark);
}

.tools-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 1.5rem;
}

@media (min-width: 640px) { .tools-grid { grid-template-columns: repeat(2, 1fr); } }
@media (min-width: 1024px) { .tools-grid { grid-template-columns: repeat(3, 1fr); } }

.tool-card {
  background: var(--white);
  border: 1px solid var(--border);
  border-radius: 4px;
  overflow: hidden;
  text-decoration: none;
  color: inherit;
  display: flex;
  flex-direction: column;
  transition: box-shadow 0.25s, transform 0.25s;
}

.tool-card:hover {
  box-shadow: 0 8px 28px rgba(0,0,0,0.09);
  transform: translateY(-4px);
}

.tool-card-thumb {
  aspect-ratio: 16/9;
  background: var(--bg);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 3rem;
  border-bottom: 1px solid var(--border);
  overflow: hidden;
}

.tool-card-thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.tool-card-body {
  padding: 1.5rem;
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.tool-card-title {
  font-size: 1rem;
  font-weight: 700;
  color: var(--dark);
  transition: color 0.2s;
}

.tool-card:hover .tool-card-title { color: var(--blue); }

.tool-card-desc {
  font-size: 0.825rem;
  color: var(--gray);
  line-height: 1.75;
  flex: 1;
}

.tool-card-link {
  margin-top: 1rem;
  font-size: 0.825rem;
  font-weight: 700;
  color: var(--blue);
}

/* ===== PHOTO GRID ===== */
.photo-section { padding: 6rem 2rem; }
.photo-inner { max-width: 1100px; margin: 0 auto; }

.photo-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 0.75rem;
  margin-top: 3rem;
}

@media (min-width: 768px) {
  .photo-grid { grid-template-columns: repeat(3, 1fr); }
  .photo-grid .photo-large { grid-column: span 2; grid-row: span 2; }
}

.photo-item {
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: 4px;
  aspect-ratio: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.6rem;
  letter-spacing: 0.1em;
  font-weight: 700;
  color: var(--border);
  text-transform: uppercase;
  overflow: hidden;
}

.photo-item img { width: 100%; height: 100%; object-fit: cover; }
.photo-large { aspect-ratio: auto; min-height: 260px; }

/* ===== FOOTER ===== */
footer { background: var(--dark); }

.footer-inner {
  max-width: 1100px;
  margin: 0 auto;
  padding: 3.5rem 2rem;
  display: flex;
  flex-direction: column;
  gap: 2rem;
}

@media (min-width: 640px) {
  .footer-inner { flex-direction: row; justify-content: space-between; align-items: flex-start; }
}

.footer-logo {
  font-size: 1.1rem;
  font-weight: 700;
  color: var(--white);
  text-decoration: none;
  display: block;
  margin-bottom: 0.6rem;
}

.footer-desc { font-size: 0.8rem; color: rgba(255,255,255,0.5); line-height: 1.75; }

.footer-nav { display: flex; flex-direction: column; gap: 0.75rem; }

.footer-nav a {
  font-size: 0.8rem;
  color: rgba(255,255,255,0.55);
  text-decoration: none;
  transition: color 0.2s;
}

.footer-nav a:hover { color: var(--white); }

.footer-bottom {
  border-top: 1px solid rgba(255,255,255,0.1);
  padding: 1.25rem 2rem;
  text-align: center;
  font-size: 0.68rem;
  color: rgba(255,255,255,0.25);
  max-width: 1100px;
  margin: 0 auto;
  width: 100%;
}

/* ===== RECOMMEND ===== */
.recommend-section {
  padding: 6rem 2rem;
  background: var(--white);
}

.recommend-inner { max-width: 1100px; margin: 0 auto; }

.recommend-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 1.5rem;
}

@media (min-width: 640px) { .recommend-grid { grid-template-columns: repeat(2, 1fr); } }

.recommend-card {
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: 6px;
  padding: 1.75rem;
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}

.recommend-icon { font-size: 2rem; }

.recommend-title {
  font-size: 1rem;
  font-weight: 700;
  color: var(--dark);
}

.recommend-desc {
  font-size: 0.825rem;
  color: var(--gray);
  line-height: 1.75;
}

/* ===== FEATURES ===== */
.features-section {
  padding: 6rem 2rem;
  background: var(--bg);
  border-top: 1px solid var(--border);
}

.features-inner { max-width: 1100px; margin: 0 auto; }

.feature-block {
  background: var(--white);
  border: 1px solid var(--border);
  border-radius: 6px;
  padding: 2rem;
  margin-bottom: 1.5rem;
}

.feature-block-title {
  font-size: 1.1rem;
  font-weight: 700;
  color: var(--dark);
  margin-bottom: 0.75rem;
}

.feature-block-desc {
  font-size: 0.875rem;
  color: var(--gray);
  line-height: 1.75;
  margin-bottom: 1.25rem;
}

.feature-links {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 0.6rem;
}

.feature-links li {
  font-size: 0.875rem;
  color: var(--gray);
  line-height: 1.6;
}

.feature-links a {
  color: var(--blue);
  text-decoration: none;
  font-weight: 500;
}

.feature-links a:hover {
  text-decoration: underline;
}

/* ===== MATERIAL ICONS ===== */
.material-symbols-outlined {
  font-variation-settings: 'FILL' 0, 'wght' 400, 'GRAD' 0, 'opsz' 24;
}

.recommend-icon {
  font-size: 2rem;
  color: var(--blue);
  display: block;
  margin-bottom: 0.25rem;
}

.feature-title-icon {
  font-size: 1.4rem;
  color: var(--blue);
  vertical-align: middle;
  margin-right: 0.3rem;
}

.feature-link-icon {
  font-size: 1rem;
  color: var(--blue);
  vertical-align: middle;
  margin-right: 0.3rem;
}

.feature-check-icon {
  font-size: 1rem;
  color: var(--blue);
  vertical-align: middle;
  margin-right: 0.3rem;
}

/* ===== BACK TO TOP ===== */
#back-to-top {
  position: fixed;
  bottom: 1.75rem;
  right: 1.5rem;
  z-index: 200;
  background: none;
  border: none;
  cursor: pointer;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.4rem;
  padding: 0;
  opacity: 0;
  pointer-events: none;
  transform: translateY(12px);
  transition: opacity 0.35s, transform 0.35s;
}

#back-to-top.visible {
  opacity: 1;
  pointer-events: auto;
  transform: translateY(0);
}

.btt-bubble {
  background: var(--white);
  border: 2px solid var(--blue);
  color: var(--blue);
  font-size: 0.72rem;
  font-weight: 700;
  padding: 0.4rem 0.8rem;
  border-radius: 14px;
  position: relative;
  white-space: nowrap;
  line-height: 1.4;
  box-shadow: 0 2px 10px rgba(0,0,0,0.1);
}

/* 吹き出しの尾（外側：青のボーダー） */
.btt-bubble::after {
  content: '';
  position: absolute;
  bottom: -11px;
  left: 50%;
  transform: translateX(-50%);
  border-width: 11px 7px 0;
  border-style: solid;
  border-color: var(--blue) transparent transparent;
}

/* 吹き出しの尾（内側：白の塗り） */
.btt-bubble::before {
  content: '';
  position: absolute;
  bottom: -7px;
  left: 50%;
  transform: translateX(-50%);
  border-width: 7px 5px 0;
  border-style: solid;
  border-color: var(--white) transparent transparent;
  z-index: 1;
}

.btt-mascot {
  width: 60px;
  height: 60px;
  object-fit: contain;
  border-radius: 50%;
  transition: transform 0.2s;
  filter: drop-shadow(0 2px 6px rgba(0,0,0,0.12));
}

#back-to-top:hover .btt-mascot {
  transform: scale(1.12) rotate(-5deg);
}

@media (max-width: 767px) {
  #back-to-top {
    bottom: 1.25rem;
    right: 1rem;
  }
  .btt-mascot {
    width: 52px;
    height: 52px;
  }
}