/* ============================================================
   ADVANCE BRIDGE STUDIO — shared design system
   Used by: Top (/index.html) and service skeleton pages.
   ============================================================ */

:root {
  --blue-light: #7ec8e3;
  --blue: #0077cc;
  --blue-dark: #005fa3;
  --gradient: linear-gradient(135deg, #7ec8e3 0%, #0077cc 100%);
  --gradient-h: linear-gradient(90deg, #7ec8e3 0%, #0077cc 100%);
  --dark: #ffffff;
  --dark-surface: #f5f7fa;
  --dark-card: #ffffff;
  --dark-border: #dfe3e8;
  --text-primary: #1a1a2e;
  --text-secondary: #4a4a5a;
  --text-muted: #8a8a9a;
}

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

html {
  scroll-behavior: smooth;
  font-size: 16px;
}

body {
  font-family: 'Noto Sans JP', 'Montserrat', sans-serif;
  background: var(--dark);
  color: var(--text-primary);
  line-height: 1.8;
  -webkit-font-smoothing: antialiased;
}

.montserrat { font-family: 'Montserrat', sans-serif; }

/* ===== Layout ===== */
.container {
  max-width: 1100px;
  margin: 0 auto;
  padding: 0 24px;
}

section { padding: 72px 0; }

/* ===== Utility ===== */
.gradient-text {
  background: var(--gradient-h);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.gradient-line {
  width: 60px;
  height: 3px;
  background: var(--gradient-h);
  border-radius: 2px;
}

.section-label {
  font-family: 'Montserrat', sans-serif;
  font-size: 0.75rem;
  font-weight: 600;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  color: var(--blue-dark);
  margin-bottom: 12px;
}

.section-title {
  font-size: 1.75rem;
  font-weight: 700;
  line-height: 1.4;
  margin-bottom: 20px;
}

.section-lead {
  color: var(--text-secondary);
  font-size: 0.95rem;
  max-width: 680px;
  line-height: 1.9;
}

/* ===== Star motif ===== */
.star {
  display: inline-block;
  width: 16px;
  height: 16px;
  background: var(--gradient);
  clip-path: polygon(50% 0%, 62% 38%, 100% 50%, 62% 62%, 50% 100%, 38% 62%, 0% 50%, 38% 38%);
}
.star-lg { width: 32px; height: 32px; }

/* ===== Header ===== */
.header {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  z-index: 100;
  background: rgba(255,255,255,0.9);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border-bottom: 1px solid var(--dark-border);
}

.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 64px;
  gap: 16px;
}

.logo { display: flex; align-items: center; }
.logo a { display: inline-flex; }
.logo img { height: 52px; width: auto; }

.header-nav {
  display: flex;
  align-items: center;
  gap: 20px;
  margin-left: auto;
}

.header-nav > a {
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--text-secondary);
  text-decoration: none;
  transition: color 0.3s;
}
.header-nav > a:hover { color: var(--blue); }

/* ===== Language switch ===== */
.lang-switch {
  display: inline-flex;
  border: 1px solid var(--dark-border);
  border-radius: 8px;
  overflow: hidden;
}

.lang-switch button {
  font-family: 'Montserrat', sans-serif;
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.04em;
  padding: 7px 12px;
  background: transparent;
  color: var(--text-secondary);
  border: none;
  border-left: 1px solid var(--dark-border);
  cursor: pointer;
  transition: background 0.2s, color 0.2s;
}
.lang-switch button:first-child { border-left: none; }
.lang-switch button:hover { background: rgba(0,119,204,0.06); }
.lang-switch button.active { background: var(--gradient-h); color: #fff; }

.header-cta { display: flex; gap: 10px; align-items: center; }

.header-cta a {
  font-size: 0.8rem;
  font-weight: 600;
  text-decoration: none;
  padding: 8px 20px;
  border-radius: 6px;
  transition: all 0.3s;
}

.btn-outline {
  color: var(--blue-dark);
  border: 1px solid rgba(0,119,204,0.4);
}
.btn-outline:hover { background: rgba(0,119,204,0.06); }

.btn-primary {
  background: var(--gradient);
  color: #fff;
  border: none;
}
.btn-primary:hover { opacity: 0.9; transform: translateY(-1px); }

.btn-ghost {
  color: var(--text-primary);
  border: 1px solid var(--dark-border);
  background: transparent;
}
.btn-ghost:hover { border-color: var(--blue); background: rgba(0,119,204,0.04); }

/* ===== Hero (Top) ===== */
.hero {
  min-height: 100vh;
  display: flex;
  align-items: center;
  position: relative;
  overflow: hidden;
  padding-top: 96px;
  padding-bottom: 48px;
  background: linear-gradient(180deg, #f5f9fc 0%, #ffffff 100%);
}

.hero-inner {
  position: relative;
  z-index: 1;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 48px;
}

.hero-content { max-width: 520px; flex-shrink: 0; }

.hero-tagline {
  font-family: 'Montserrat', sans-serif;
  font-size: 0.75rem;
  font-weight: 700;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--blue-dark);
  margin-bottom: 20px;
}

.hero h1 {
  font-size: clamp(2rem, 4.5vw, 3rem);
  font-weight: 800;
  line-height: 1.15;
  margin-bottom: 24px;
  font-family: 'Montserrat', 'Noto Sans JP', sans-serif;
  letter-spacing: 0.01em;
}

.hero-sub {
  font-size: 1.05rem;
  color: var(--text-secondary);
  line-height: 2;
  margin-bottom: 36px;
}

.hero-actions { display: flex; gap: 14px; flex-wrap: wrap; }

.hero-actions a {
  text-decoration: none;
  font-weight: 600;
  font-size: 0.95rem;
  padding: 14px 28px;
  border-radius: 8px;
  transition: all 0.3s;
  display: inline-flex;
  align-items: center;
  gap: 8px;
}

.hero-visual {
  flex: 1;
  min-width: 0;
  display: flex;
  align-items: center;
  justify-content: center;
}

.hero-visual img {
  width: 100%;
  max-width: 520px;
  height: auto;
  border-radius: 18px;
  box-shadow: 0 20px 60px rgba(0,60,120,0.18);
}

/* ===== Page hero (service pages) ===== */
.page-hero {
  padding-top: 128px;
  padding-bottom: 64px;
  background: linear-gradient(180deg, #f5f9fc 0%, #ffffff 100%);
  border-bottom: 1px solid var(--dark-border);
}
.page-hero .section-label { margin-bottom: 16px; }
.page-hero h1 {
  font-size: clamp(1.8rem, 4vw, 2.6rem);
  font-weight: 800;
  line-height: 1.25;
  margin-bottom: 20px;
}
.page-hero .lead {
  font-size: 1.05rem;
  color: var(--text-secondary);
  line-height: 2;
  max-width: 720px;
}
.breadcrumb {
  font-size: 0.8rem;
  color: var(--text-muted);
  margin-bottom: 20px;
}
.breadcrumb a { color: var(--text-muted); text-decoration: none; }
.breadcrumb a:hover { color: var(--blue); }

/* ===== Services grid (Top) ===== */
.services { background: var(--dark-surface); }

.solutions-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 24px;
  margin-top: 40px;
}

.solution-card {
  display: flex;
  flex-direction: column;
  background: var(--dark-card);
  border: 1px solid var(--dark-border);
  border-radius: 16px;
  padding: 32px 28px;
  text-decoration: none;
  color: inherit;
  position: relative;
  overflow: hidden;
  transition: border-color 0.3s, box-shadow 0.3s, transform 0.3s;
  box-shadow: 0 1px 3px rgba(0,0,0,0.04);
}
.solution-card:hover {
  border-color: rgba(0,119,204,0.4);
  box-shadow: 0 8px 24px rgba(0,119,204,0.1);
  transform: translateY(-3px);
}
.solution-card::before {
  content: '';
  position: absolute;
  top: 0; left: 0; right: 0;
  height: 3px;
  background: var(--gradient-h);
}

/* Non-clickable card (no detail page yet): no hover lift, no pointer. */
.solution-card--static { cursor: default; }
.solution-card--static:hover {
  transform: none;
  border-color: var(--dark-border);
  box-shadow: 0 1px 3px rgba(0,0,0,0.04);
}

.solution-icon {
  width: 56px;
  height: 56px;
  border-radius: 14px;
  background: rgba(0,119,204,0.08);
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 20px;
  color: var(--blue-dark);
}
.solution-icon svg { width: 30px; height: 30px; }

.solution-num {
  font-family: 'Montserrat', sans-serif;
  font-size: 0.72rem;
  font-weight: 600;
  letter-spacing: 0.1em;
  color: var(--blue-dark);
  margin-bottom: 8px;
}
.solution-card h3 {
  font-size: 1.1rem;
  font-weight: 700;
  margin-bottom: 10px;
  line-height: 1.4;
}
.solution-card p {
  font-size: 0.88rem;
  color: var(--text-secondary);
  line-height: 1.7;
  flex: 1;
}
.solution-more {
  margin-top: 18px;
  font-family: 'Montserrat', sans-serif;
  font-size: 0.8rem;
  font-weight: 600;
  color: var(--blue);
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

/* ===== Generic content cards ===== */
.card-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 20px;
  margin-top: 36px;
}
.info-card {
  background: var(--dark-card);
  border: 1px solid var(--dark-border);
  border-radius: 16px;
  padding: 28px;
  box-shadow: 0 1px 3px rgba(0,0,0,0.04);
  transition: border-color 0.3s, box-shadow 0.3s;
}
.info-card:hover {
  border-color: rgba(0,119,204,0.4);
  box-shadow: 0 4px 16px rgba(0,119,204,0.08);
}
.info-card h4 {
  font-size: 1rem;
  font-weight: 700;
  margin-bottom: 10px;
  display: flex;
  align-items: center;
  gap: 10px;
}
.info-card p { font-size: 0.88rem; color: var(--text-secondary); line-height: 1.7; }

/* ===== Preparing / placeholder notice ===== */
.notice {
  margin-top: 40px;
  font-size: 0.92rem;
  color: var(--text-secondary);
  line-height: 1.9;
  padding: 28px 32px;
  background: var(--dark-surface);
  border: 1px dashed var(--dark-border);
  border-radius: 12px;
  display: flex;
  align-items: center;
  gap: 16px;
}
.notice .star { flex-shrink: 0; }

/* ===== About ===== */
.about-lead {
  margin-top: 12px;
  font-size: 0.98rem;
  color: var(--text-secondary);
  line-height: 2;
  max-width: 820px;
}

/* ===== CTA ===== */
.cta-section {
  background: var(--dark);
  text-align: center;
  position: relative;
  overflow: hidden;
}
.cta-section::before {
  content: '';
  position: absolute;
  top: 50%; left: 50%;
  transform: translate(-50%, -50%);
  width: 600px; height: 600px;
  background: radial-gradient(circle, rgba(0,119,204,0.05) 0%, transparent 70%);
  pointer-events: none;
}
.cta-inner { position: relative; z-index: 1; }
.cta-section h2 {
  font-size: clamp(1.5rem, 3vw, 2rem);
  font-weight: 700;
  margin-bottom: 16px;
}
.cta-section .section-lead { margin: 0 auto 40px; text-align: center; }
.cta-actions { display: flex; gap: 16px; justify-content: center; flex-wrap: wrap; }
.cta-actions a {
  text-decoration: none;
  font-weight: 600;
  font-size: 0.95rem;
  padding: 16px 36px;
  border-radius: 8px;
  transition: all 0.3s;
  display: inline-flex;
  align-items: center;
  gap: 8px;
}

/* ===== Footer ===== */
.footer {
  background: var(--dark-surface);
  border-top: 1px solid var(--dark-border);
  padding: 48px 0 32px;
}
.footer-inner {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  flex-wrap: wrap;
  gap: 24px;
}
.footer-brand .logo { margin-bottom: 12px; }
.footer-info { font-size: 0.8rem; color: var(--text-muted); line-height: 1.8; }
.footer-links { display: flex; gap: 24px; flex-wrap: wrap; }
.footer-links a {
  font-size: 0.8rem;
  color: var(--text-muted);
  text-decoration: none;
  transition: color 0.3s;
}
.footer-links a:hover { color: var(--blue); }
.footer-copy {
  text-align: center;
  margin-top: 32px;
  padding-top: 24px;
  border-top: 1px solid var(--dark-border);
  font-size: 0.75rem;
  color: var(--text-muted);
  font-family: 'Montserrat', sans-serif;
}

/* i18n: Japanese-only elements are hidden in every other language.
   Not forcing a display value keeps each element's own layout (e.g. the
   Lab card stays a flex .solution-card) intact in Japanese. */
html:not([lang="ja"]) [data-jp-only] { display: none !important; }

/* ===== Responsive ===== */
@media (max-width: 900px) {
  .solutions-grid { grid-template-columns: repeat(2, 1fr); }
  .card-grid { grid-template-columns: 1fr; }
  .hero-inner { flex-direction: column-reverse; text-align: center; }
  .hero-content { max-width: 640px; }
  .hero-actions { justify-content: center; }
  .hero-visual img { max-width: 420px; }
}

@media (max-width: 640px) {
  section { padding: 56px 0; }
  .section-title { font-size: 1.4rem; }
  .solutions-grid { grid-template-columns: 1fr; }
  .header-nav { gap: 10px; }
  .header-nav > a { display: none; }
  .hero h1 { font-size: 1.7rem; }
  .hero-actions { flex-direction: column; }
  .hero-actions a { justify-content: center; }
  .header-cta .btn-outline { display: none; }
  .cta-actions { flex-direction: column; align-items: center; }
  .footer-inner { flex-direction: column; }
}
