/* ==========================================================================
   合同会社アルゴブリッジ — Corporate Site Stylesheet
   ========================================================================== */

@import url('https://fonts.googleapis.com/css2?family=Zen+Kaku+Gothic+New:wght@400;500;700;900&family=Noto+Sans+JP:wght@300;400;500;600;700&family=IBM+Plex+Mono:wght@400;500&display=swap');

:root {
  --primary: #176B87;
  --secondary: #2D829A;

  --accent: #43B3AE;
  --accent-light: #BDEDE8;

  --text-main: #193B4D;
  --text-sub: #607985;

  --bg-main: #FFFFFF;
  --bg-light: #F5FAFC;
  --bg-blue: #EBF7FA;

  --border: #D9E9ED;

  --font-display: 'Zen Kaku Gothic New', 'Noto Sans JP', sans-serif;
  --font-body: 'Noto Sans JP', sans-serif;
  --font-mono: 'IBM Plex Mono', monospace;

  --container: 1120px;
  --radius-sm: 6px;
  --radius-md: 12px;
  --radius-lg: 20px;

  --ease: cubic-bezier(0.16, 1, 0.3, 1);
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  * { animation-duration: 0.01ms !important; animation-iteration-count: 1 !important; transition-duration: 0.01ms !important; scroll-behavior: auto !important; }
}

body {
  margin: 0;
  font-family: var(--font-body);
  color: var(--text-main);
  background: var(--bg-main);
  line-height: 1.8;
  font-feature-settings: "palt";
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

img { max-width: 100%; display: block; }
a { color: inherit; text-decoration: none; }
ul { margin: 0; padding: 0; list-style: none; }
h1, h2, h3, h4 { margin: 0; font-family: var(--font-display); font-weight: 700; letter-spacing: 0.02em; }
p { margin: 0; }
button { font-family: inherit; cursor: pointer; }

.container {
  max-width: var(--container);
  margin: 0 auto;
  padding: 0 32px;
}

:focus-visible {
  outline: 2px solid var(--primary);
  outline-offset: 3px;
  border-radius: 4px;
}

/* ---------- Eyebrow / mono labels ---------- */
.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-family: var(--font-mono);
  font-size: 12.5px;
  letter-spacing: 0.18em;
  color: var(--secondary);
  text-transform: uppercase;
  margin-bottom: 18px;
}
.eyebrow::before {
  content: "";
  width: 22px;
  height: 1px;
  background: var(--accent);
}

/* ==========================================================================
   HEADER / NAV
   ========================================================================== */
.site-header {
  position: sticky;
  top: 0;
  z-index: 100;
  background: rgba(255, 255, 255, 0.97);
  border-bottom: 1px solid var(--border);
}
.nav {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 18px 32px;
  max-width: var(--container);
  margin: 0 auto;
}
.brand {
  display: flex;
  align-items: center;
  gap: 12px;
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 18px;
  color: var(--text-main);
}
.brand-mark {
  width: 34px;
  height: 34px;
  flex-shrink: 0;
}
.brand-text-en {
  font-family: var(--font-mono);
  font-size: 10.5px;
  letter-spacing: 0.14em;
  color: var(--text-sub);
  display: block;
  margin-top: 2px;
  font-weight: 400;
}
.brand-lines { display: flex; flex-direction: column; line-height: 1.3; }

.nav-links {
  display: flex;
  align-items: center;
  gap: 36px;
}
.nav-links a {
  font-size: 14.5px;
  font-weight: 500;
  color: var(--text-main);
  position: relative;
  padding: 4px 0;
  transition: color 0.2s var(--ease);
}
.nav-links a::after {
  content: "";
  position: absolute;
  left: 0; right: 0; bottom: -2px;
  height: 2px;
  background: var(--accent);
  transform: scaleX(0);
  transform-origin: left;
  transition: transform 0.3s var(--ease);
}
.nav-links a:hover { color: var(--primary); }
.nav-links a:hover::after { transform: scaleX(1); }
.nav-links a.active { color: var(--primary); }
.nav-links a.active::after { transform: scaleX(1); }

.nav-cta {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: var(--primary);
  color: #fff !important;
  padding: 10px 22px;
  border-radius: 999px;
  font-size: 14px;
  font-weight: 600;
  transition: background 0.25s var(--ease), transform 0.25s var(--ease);
}
.nav-cta:hover { background: var(--secondary); transform: translateY(-1px); }

.nav-toggle {
  display: none;
  background: none;
  border: none;
  width: 40px;
  height: 40px;
  position: relative;
}
.nav-toggle span {
  position: absolute;
  left: 8px;
  right: 8px;
  height: 2px;
  background: var(--text-main);
  transition: transform 0.3s var(--ease), opacity 0.3s var(--ease);
}
.nav-toggle span:nth-child(1) { top: 14px; }
.nav-toggle span:nth-child(2) { top: 20px; }
.nav-toggle span:nth-child(3) { top: 26px; }
.nav-toggle.open span:nth-child(1) { transform: translateY(6px) rotate(45deg); }
.nav-toggle.open span:nth-child(2) { opacity: 0; }
.nav-toggle.open span:nth-child(3) { transform: translateY(-6px) rotate(-45deg); }

@media (max-width: 860px) {
  .nav-links {
    position: fixed;
    inset: 68px 0 0 0;
    background: #fff;
    flex-direction: column;
    align-items: flex-start;
    padding: 32px;
    gap: 22px;
    transform: translateY(-8px);
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.25s var(--ease), transform 0.25s var(--ease);
    border-top: 1px solid var(--border);
  }
  .nav-links.open { opacity: 1; transform: translateY(0); pointer-events: auto; }
  .nav-links a { font-size: 17px; }
  .nav-toggle { display: block; }
}

/* ==========================================================================
   HERO
   ========================================================================== */
.hero {
  position: relative;
  padding: 110px 0 100px;
  overflow: hidden;
  background: linear-gradient(180deg, var(--bg-blue) 0%, #FFFFFF 78%);
}
#hero-canvas {
  position: absolute;
  top: 0; left: 0;
  width: 100%;
  height: 100%;
  z-index: 0;
  opacity: 0.9;
}
.hero-inner {
  position: relative;
  z-index: 2;
  max-width: var(--container);
  margin: 0 auto;
  padding: 0 32px;
  text-align: center;
}
.hero h1 {
  font-size: clamp(34px, 5.4vw, 60px);
  line-height: 1.35;
  color: var(--text-main);
  margin-bottom: 26px;
}
.hero h1 .line { display: block; }
.hero h1 .accent-word { color: var(--primary); }
.hero-sub {
  font-family: var(--font-display);
  font-size: clamp(16px, 2vw, 20px);
  font-weight: 500;
  color: var(--secondary);
  margin-bottom: 22px;
  line-height: 1.7;
}
.hero-desc {
  max-width: 620px;
  margin: 0 auto 42px;
  color: var(--text-sub);
  font-size: 15.5px;
  line-height: 1.95;
}
.hero-ctas {
  display: flex;
  gap: 16px;
  justify-content: center;
  flex-wrap: wrap;
}

.btn {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 15px 32px;
  border-radius: 999px;
  font-size: 15px;
  font-weight: 600;
  transition: all 0.28s var(--ease);
  border: 1px solid transparent;
}
.btn-primary { background: var(--primary); color: #fff; box-shadow: 0 10px 24px -8px rgba(23, 107, 135, 0.45); }
.btn-primary:hover { background: var(--secondary); transform: translateY(-2px); box-shadow: 0 14px 28px -8px rgba(23, 107, 135, 0.5); }
.btn-outline { background: transparent; color: var(--primary); border-color: var(--primary); }
.btn-outline:hover { background: var(--bg-blue); transform: translateY(-2px); }
.btn-arrow { transition: transform 0.25s var(--ease); }
.btn:hover .btn-arrow { transform: translateX(4px); }

/* ==========================================================================
   SECTION SCAFFOLDING
   ========================================================================== */
section { padding: 108px 0; }
.section-alt { background: var(--bg-light); }
.section-head {
  max-width: 640px;
  margin: 0 auto 64px;
  text-align: center;
}
.section-head h2 {
  font-size: clamp(26px, 3.4vw, 38px);
  color: var(--text-main);
  line-height: 1.4;
  margin-bottom: 18px;
}
.section-head p { color: var(--text-sub); font-size: 15.5px; }
.section-head.align-left { margin: 0 0 56px; text-align: left; }

.reveal {
  opacity: 0;
  transform: translateY(26px);
  transition: opacity 0.7s var(--ease), transform 0.7s var(--ease);
}
.reveal.is-visible { opacity: 1; transform: translateY(0); }

/* ==========================================================================
   BUSINESS CARDS
   ========================================================================== */
.business-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 24px;
}
.biz-card {
  background: #fff;
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 34px 28px;
  transition: transform 0.3s var(--ease), box-shadow 0.3s var(--ease), border-color 0.3s var(--ease);
  position: relative;
  overflow: hidden;
}
.biz-card::before {
  content: "";
  position: absolute;
  top: 0; left: 0;
  width: 100%;
  height: 3px;
  background: linear-gradient(90deg, var(--accent), var(--primary));
  transform: scaleX(0);
  transform-origin: left;
  transition: transform 0.4s var(--ease);
}
.biz-card:hover {
  transform: translateY(-6px);
  box-shadow: 0 24px 40px -20px rgba(23, 107, 135, 0.28);
  border-color: var(--accent-light);
}
.biz-card:hover::before { transform: scaleX(1); }
.biz-num {
  font-family: var(--font-mono);
  font-size: 13px;
  color: var(--accent);
  letter-spacing: 0.08em;
  margin-bottom: 20px;
  display: block;
}
.biz-icon {
  width: 46px;
  height: 46px;
  margin-bottom: 18px;
  color: var(--primary);
}
.biz-card h3 {
  font-size: 18px;
  margin-bottom: 8px;
  color: var(--text-main);
}
.biz-card .biz-en {
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.1em;
  color: var(--text-sub);
  display: block;
  margin-bottom: 14px;
}
.biz-card p { font-size: 14px; color: var(--text-sub); line-height: 1.85; }

@media (max-width: 980px) {
  .business-grid { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 560px) {
  .business-grid { grid-template-columns: 1fr; }
}

/* ==========================================================================
   PROCESS / STEPS
   ========================================================================== */
.process {
  display: grid;
  grid-template-columns: repeat(6, 1fr);
  gap: 0;
  position: relative;
}
.process-track {
  position: absolute;
  top: 27px;
  left: 5%;
  right: 5%;
  height: 2px;
  background: repeating-linear-gradient(90deg, var(--border) 0 8px, transparent 8px 14px);
  z-index: 0;
}
.step {
  position: relative;
  z-index: 1;
  padding: 0 14px;
  text-align: center;
}
.step-dot {
  width: 56px;
  height: 56px;
  margin: 0 auto 22px;
  border-radius: 50%;
  background: #fff;
  border: 2px solid var(--accent);
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: var(--font-mono);
  font-weight: 500;
  font-size: 17px;
  color: var(--primary);
  transition: background 0.3s var(--ease), color 0.3s var(--ease), border-color 0.3s var(--ease);
}
.step:hover .step-dot { background: var(--primary); border-color: var(--primary); color: #fff; }
.step h4 { font-size: 15px; margin-bottom: 10px; line-height: 1.5; }
.step p { font-size: 13px; color: var(--text-sub); line-height: 1.7; }

@media (max-width: 980px) {
  .process { grid-template-columns: repeat(3, 1fr); gap: 40px 0; }
  .process-track { display: none; }
}
@media (max-width: 560px) {
  .process { grid-template-columns: 1fr; gap: 32px; }
}

/* ==========================================================================
   STRENGTHS
   ========================================================================== */
.strengths {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 1px;
  background: var(--border);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  overflow: hidden;
}
.strength {
  background: #fff;
  padding: 44px 40px;
  transition: background 0.3s var(--ease);
}
.strength:hover { background: var(--bg-light); }
.strength .eyebrow { margin-bottom: 14px; }
.strength h3 { font-size: 19px; margin-bottom: 12px; }
.strength p { color: var(--text-sub); font-size: 14.5px; line-height: 1.85; }

@media (max-width: 760px) {
  .strengths { grid-template-columns: 1fr; }
}

/* ==========================================================================
   BACKGROUND / STORY (asymmetric)
   ========================================================================== */
.story {
  display: grid;
  grid-template-columns: 0.85fr 1.15fr;
  gap: 72px;
  align-items: start;
}
.story-visual {
  position: sticky;
  top: 110px;
}
.story-copy p { margin-bottom: 22px; color: var(--text-sub); font-size: 15.5px; line-height: 2; }
.story-copy p:last-child { margin-bottom: 0; }
.quote-block {
  border-left: 3px solid var(--accent);
  padding: 6px 0 6px 24px;
  margin: 30px 0;
  font-family: var(--font-display);
  font-size: 17px;
  color: var(--text-main);
  font-weight: 500;
}

@media (max-width: 900px) {
  .story { grid-template-columns: 1fr; gap: 40px; }
  .story-visual { position: static; }
}

/* ==========================================================================
   MVV
   ========================================================================== */
.mvv-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 24px;
  margin-bottom: 24px;
}
.mvv-card {
  border-radius: var(--radius-lg);
  padding: 40px;
}
.mvv-card.mission { background: var(--primary); color: #fff; }
.mvv-card.vision { background: var(--bg-blue); border: 1px solid var(--border); }
.mvv-card .eyebrow { color: var(--accent-light); }
.mvv-card.vision .eyebrow { color: var(--secondary); }
.mvv-card h3 { font-size: 24px; line-height: 1.5; margin-bottom: 14px; }
.mvv-card.vision h3 { color: var(--text-main); }
.mvv-card p { font-size: 14.5px; line-height: 1.85; opacity: 0.92; }
.mvv-card.vision p { color: var(--text-sub); opacity: 1; }

.value-row {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 24px;
}
.value-item {
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  padding: 28px;
  text-align: center;
}
.value-item h4 { font-size: 16px; margin-bottom: 10px; color: var(--primary); }
.value-item p { font-size: 13.5px; color: var(--text-sub); line-height: 1.8; }

@media (max-width: 760px) {
  .mvv-grid, .value-row { grid-template-columns: 1fr; }
}

/* ==========================================================================
   COMPANY INFO TABLE
   ========================================================================== */
.company-wrap {
  display: grid;
  grid-template-columns: 1fr 1.3fr;
  gap: 56px;
  align-items: start;
}
.company-table {
  width: 100%;
  border-collapse: collapse;
}
.company-table tr { border-bottom: 1px solid var(--border); }
.company-table tr:last-child { border-bottom: none; }
.company-table th, .company-table td {
  text-align: left;
  padding: 20px 16px;
  font-size: 14.5px;
  vertical-align: top;
}
.company-table th {
  color: var(--text-sub);
  font-weight: 500;
  width: 34%;
  font-family: var(--font-mono);
  font-size: 12.5px;
  letter-spacing: 0.06em;
  padding-top: 22px;
}
.company-table td { color: var(--text-main); line-height: 1.8; }
.company-table td ul li { margin-bottom: 4px; }
.company-table td ul li::before { content: "・"; color: var(--accent); }

.map-frame {
  width: 100%;
  aspect-ratio: 4 / 3;
  border-radius: var(--radius-lg);
  overflow: hidden;
  border: 1px solid var(--border);
}
.map-frame iframe { width: 100%; height: 100%; border: 0; }

@media (max-width: 900px) {
  .company-wrap { grid-template-columns: 1fr; }
  .company-table th { width: 40%; }
}

/* ==========================================================================
   CTA BAND
   ========================================================================== */
.cta-band {
  background: linear-gradient(120deg, var(--primary), var(--secondary));
  border-radius: var(--radius-lg);
  padding: 64px 48px;
  text-align: center;
  color: #fff;
  position: relative;
  overflow: hidden;
}
.cta-band h2 { font-size: clamp(24px, 3vw, 32px); margin-bottom: 16px; color: #fff; }
.cta-band p { color: rgba(255,255,255,0.86); margin-bottom: 32px; font-size: 15px; }
.cta-band .btn-primary { background: #fff; color: var(--primary); box-shadow: none; }
.cta-band .btn-primary:hover { background: var(--accent-light); }

/* ==========================================================================
   FOOTER
   ========================================================================== */
.site-footer {
  background: #12333F;
  color: #C9DDE3;
  padding: 72px 0 28px;
}
.footer-top {
  display: grid;
  grid-template-columns: 1.4fr 1fr 1fr 1fr;
  gap: 40px;
  padding-bottom: 48px;
  border-bottom: 1px solid rgba(255,255,255,0.12);
}
.footer-brand { display: flex; align-items: center; gap: 12px; margin-bottom: 16px; }
.footer-brand .brand-text-en { color: #7FA6B0; }
.footer-brand-name { font-family: var(--font-display); font-weight: 700; font-size: 16px; color: #fff; }
.footer-desc { font-size: 13.5px; color: #8FB2BB; line-height: 1.9; max-width: 280px; }
.footer-col h5 {
  font-family: var(--font-mono);
  font-size: 12px;
  letter-spacing: 0.1em;
  color: #7FA6B0;
  margin-bottom: 18px;
  text-transform: uppercase;
}
.footer-col ul li { margin-bottom: 12px; }
.footer-col a { font-size: 14px; color: #C9DDE3; transition: color 0.2s var(--ease); }
.footer-col a:hover { color: var(--accent-light); }
.footer-bottom {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding-top: 28px;
  font-size: 12.5px;
  color: #6E939D;
  flex-wrap: wrap;
  gap: 12px;
}

@media (max-width: 860px) {
  .footer-top { grid-template-columns: 1fr 1fr; }
}
@media (max-width: 560px) {
  .footer-top { grid-template-columns: 1fr; }
}

/* ==========================================================================
   PAGE HEADER (sub-pages)
   ========================================================================== */
.page-hero {
  padding: 74px 0 60px;
  background: var(--bg-blue);
  text-align: center;
  border-bottom: 1px solid var(--border);
}
.page-hero h1 { font-size: clamp(28px, 4vw, 42px); margin-bottom: 14px; }
.page-hero p { color: var(--text-sub); font-size: 15px; }
.breadcrumb {
  font-family: var(--font-mono);
  font-size: 12px;
  color: var(--text-sub);
  margin-bottom: 20px;
  letter-spacing: 0.04em;
}
.breadcrumb a { color: var(--secondary); }
.breadcrumb a:hover { text-decoration: underline; }

/* ==========================================================================
   SERVICE DETAIL PAGE
   ========================================================================== */
.service-detail {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 64px;
  align-items: center;
  padding: 96px 0;
}
.service-detail:nth-child(even) { direction: rtl; }
.service-detail:nth-child(even) > * { direction: ltr; }
.service-detail-num {
  font-family: var(--font-mono);
  font-size: 60px;
  font-weight: 500;
  color: var(--accent-light);
  line-height: 1;
  margin-bottom: 20px;
}
.service-detail h3 { font-size: 26px; margin-bottom: 8px; }
.service-detail .service-en {
  font-family: var(--font-mono);
  font-size: 12px;
  letter-spacing: 0.12em;
  color: var(--secondary);
  display: block;
  margin-bottom: 22px;
}
.service-detail p.desc { color: var(--text-sub); font-size: 15px; line-height: 1.95; margin-bottom: 22px; }
.service-points { display: flex; flex-wrap: wrap; gap: 10px; }
.service-points li {
  background: var(--bg-light);
  border: 1px solid var(--border);
  color: var(--text-main);
  font-size: 13px;
  padding: 8px 16px;
  border-radius: 999px;
}
.service-visual {
  background: var(--bg-light);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  aspect-ratio: 4/3.2;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
}
.service-visual svg { width: 78%; height: 78%; }

@media (max-width: 860px) {
  .service-detail, .service-detail:nth-child(even) { grid-template-columns: 1fr; direction: ltr; gap: 32px; padding: 56px 0; }
}

/* target audience list */
.audience-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 16px;
}
.audience-chip {
  background: #fff;
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  padding: 22px 18px;
  font-size: 13.5px;
  text-align: center;
  line-height: 1.6;
  transition: border-color 0.25s var(--ease), transform 0.25s var(--ease);
}
.audience-chip:hover { border-color: var(--accent); transform: translateY(-3px); }
@media (max-width: 860px) { .audience-grid { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 500px) { .audience-grid { grid-template-columns: 1fr; } }

/* ==========================================================================
   CONTACT / FORM (thank-you & privacy shared bits)
   ========================================================================== */
.info-page {
  padding: 90px 0;
}
.info-page .prose h2 {
  font-size: 20px;
  margin: 44px 0 16px;
  color: var(--text-main);
}
.info-page .prose h2:first-child { margin-top: 0; }
.info-page .prose p, .info-page .prose li {
  color: var(--text-sub);
  font-size: 14.5px;
  line-height: 2;
}
.info-page .prose ul { margin: 10px 0 10px 22px; list-style: disc; }
.info-page .prose { max-width: 760px; margin: 0 auto; }
.updated-date { font-family: var(--font-mono); font-size: 12.5px; color: var(--text-sub); text-align: center; margin-bottom: 8px; }

.thanks-box {
  max-width: 560px;
  margin: 0 auto;
  text-align: center;
  padding: 70px 40px;
}
.thanks-icon {
  width: 74px; height: 74px;
  margin: 0 auto 30px;
  border-radius: 50%;
  background: var(--bg-blue);
  display: flex; align-items: center; justify-content: center;
  color: var(--primary);
}
.thanks-box h1 { font-size: 26px; margin-bottom: 16px; }
.thanks-box p { color: var(--text-sub); font-size: 15px; line-height: 1.9; margin-bottom: 36px; }

/* ==========================================================================
   UTIL
   ========================================================================== */
.text-center { text-align: center; }
.mt-40 { margin-top: 40px; }
