/* ============================================================
   AGR Robotics Global — layout.css
   ナビ・フッター：Yuncut JP スタイルに完全準拠
   ============================================================ */

/* === NAV — 白い半透明ナビ（Yuncut JP と同じ）============= */
.site-nav {
  position: fixed;
  top: 0; left: 0; right: 0;
  z-index: 100;
  background: var(--nav-bg);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border-bottom: 1px solid var(--line);
  box-shadow: 0 1px 12px var(--shadow);
}

/* nav-inner — Yuncut JP の .nav-inner 相当 */
.nav-inner {
  width: min(var(--max-width), calc(100% - 40px));
  margin: auto;
  height: var(--nav-h);
  display: flex;
  align-items: center;
  gap: 20px;
}

/* Logo */
.nav-logo {
  display: inline-flex;
  align-items: center;
  flex-shrink: 0;
  max-width: min(180px, 40vw);
  line-height: 0;
}
.nav-logo-image {
  display: block;
  width: auto;
  height: auto;
  max-height: 30px;
  max-width: min(180px, 40vw);
  object-fit: contain;
}
.nav-logo-text {
  font-family: 'Barlow Condensed', 'Noto Sans JP', sans-serif;
  font-weight: 800; font-size: 20px;
  letter-spacing: 0.08em; text-transform: uppercase;
  color: var(--text);
}
.nav-logo-text span { color: var(--accent); }

/* Links */
.nav-links {
  display: flex;
  align-items: center;
  gap: 4px;
  list-style: none;
  flex: 1;
  margin: 0; padding: 0;
}
.nav-item > a {
  display: flex; align-items: center; gap: 4px;
  padding: 8px 12px;
  font-size: 13px;
  color: var(--text-secondary);
  border-radius: 8px;
  transition: color .15s, background .15s;
  white-space: nowrap;
  font-weight: 500;
}
.nav-item > a:hover { color: var(--accent-ink); background: #F4F7FB; }
.nav-item.active > a { color: var(--accent-ink); font-weight: 600; }
.nav-standalone > a { color: var(--accent-ink) !important; font-weight: 700; }

/* Dropdown */
.nav-item { position: relative; display: flex; align-items: center; height: var(--nav-h); }
.nav-dropdown {
  position: absolute; top: calc(var(--nav-h) - 4px); left: 50%;
  transform: translateX(-50%) translateY(8px);
  min-width: 240px;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 14px; padding: 8px;
  box-shadow: 0 12px 40px rgba(0,0,0,0.12);
  opacity: 0; visibility: hidden; pointer-events: none;
  transition: .2s ease;
  z-index: 200;
}
.nav-item:hover .nav-dropdown {
  opacity: 1; visibility: visible; pointer-events: auto;
  transform: translateX(-50%) translateY(0);
}
.nav-dropdown a {
  display: flex; align-items: flex-start; gap: 10px;
  padding: 9px 12px; border-radius: 8px;
  color: var(--text-secondary); font-size: 13px;
  text-decoration: none;
}
.nav-dropdown a:hover { background: #F4F7FB; color: var(--accent-ink); }
.dd-num { font-family: 'JetBrains Mono', monospace; font-size: 9px; letter-spacing: 0.16em; color: var(--accent-ink); margin-top: 3px; flex-shrink: 0; }
.dd-text { display: flex; flex-direction: column; gap: 2px; }
.dd-title { font-weight: 600; font-size: 13px; color: var(--text-primary); line-height: 1.3; }
.dd-sub { font-size: 11px; color: var(--text-muted); line-height: 1.4; }

/* CTA button in nav */
.nav-cta {
  flex-shrink: 0;
  display: inline-flex; align-items: center;
  padding: 9px 20px;
  background: var(--accent);
  color: #fff;
  border-radius: 999px;
  font-size: 13px; font-weight: 700;
  transition: background .22s, transform .22s;
  white-space: nowrap;
}
.nav-cta:hover { background: var(--accent2); color: #fff; transform: translateY(-1px); }

/* Mobile */
.nav-mobile-toggle { display: none; flex-direction: column; gap: 5px; background: none; border: none; cursor: pointer; padding: 4px; margin-left: auto; }
.nav-mobile-toggle span { display: block; width: 22px; height: 2px; background: var(--text-secondary); border-radius: 2px; transition: .25s; }

body { padding-top: var(--nav-h); }

/* === FOOTER — Yuncut JP と同じダーク ===================== */
footer {
  background: var(--dark);
  border-top: 1px solid var(--dark-line);
  padding: 64px 0 28px;
  color: var(--dark-text);
}
.footer-inner { width: min(var(--max-width), calc(100% - 40px)); margin: auto; }

/* OZU Banner — readable on metal blue-gray footer */
.footer-ozu-strip {
  background: var(--bg-dark-2, #2B3D4F);
  border-bottom: 1px solid var(--dark-line, #5A7083);
  padding: 14px 0;
}
.footer-ozu-inner { width: min(var(--max-width), calc(100% - 40px)); margin: auto; display: flex; align-items: center; gap: 20px; flex-wrap: wrap; }
.footer-ozu-label {
  font-family: 'JetBrains Mono', monospace;
  font-size: 11px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--red-on-dark, #E9A79E);
  flex-shrink: 0;
  font-weight: 600;
}
.footer-ozu-main { display: flex; align-items: center; gap: 12px; }
.footer-ozu-main strong { font-size: 14px; font-weight: 700; color: var(--dark-text, #F3F5F7); }
.footer-ozu-person { font-size: 13px; color: var(--dark-text-secondary, #C2CBD3); }
.footer-ozu-contact { display: flex; gap: 16px; flex-wrap: wrap; }
.footer-ozu-contact a {
  font-size: 13px;
  color: var(--dark-text, #F3F5F7);
  transition: color .15s;
}
.footer-ozu-contact a:hover { color: var(--brand-on-dark, #E9A79E); }
.footer-ozu-link {
  margin-left: auto;
  font-family: 'JetBrains Mono', monospace;
  font-size: 12px;
  letter-spacing: 0.06em;
  color: var(--dark-text, #F3F5F7);
  flex-shrink: 0;
  font-weight: 600;
  transition: color .15s, transform .15s;
  display: inline-flex;
  align-items: center;
  gap: 4px;
}
.footer-ozu-link:hover {
  color: var(--brand-on-dark, #E9A79E);
  opacity: 1;
  transform: translateX(2px);
}
.footer-ozu-link:focus-visible {
  outline: 2px solid var(--brand-on-dark, #E9A79E);
  outline-offset: 3px;
}

/* Footer grid — Yuncut JP と同じ5カラム */
.footer-top {
  display: grid;
  grid-template-columns: 1.4fr 0.8fr 0.8fr 0.8fr 0.8fr;
  gap: 36px;
  padding: 56px 0 40px;
  border-bottom: 1px solid var(--dark-line);
}

.footer-brand {}
.footer-logo { display: inline-flex; align-items: center; margin-bottom: 12px; max-width: min(180px, 40vw); line-height: 0; }
.footer-logo-image {
  display: block;
  width: auto;
  height: auto;
  max-height: 28px;
  max-width: min(180px, 40vw);
  object-fit: contain;
  background: #fff;
  border-radius: 6px;
  padding: 2px 6px;
  box-sizing: border-box;
}
.footer-logo-text { font-family: 'Barlow Condensed', sans-serif; font-weight: 800; font-size: 20px; letter-spacing: 0.08em; text-transform: uppercase; color: #fff; }
.footer-logo-text span { color: var(--accent); }
.footer-tagline { font-size: 13px; color: var(--dark-text); line-height: 1.7; margin-bottom: 8px; }
.footer-legal-name { font-size: 11px; color: rgba(255,255,255,0.25); line-height: 1.5; margin-bottom: 16px; }

/* Social icons — Yuncut JP と同じ */
.footer-social { display: flex; gap: 10px; margin-top: 4px; }
.fsi {
  width: 32px; height: 32px; border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  transition: transform .2s;
  flex-shrink: 0;
}
.fsi:hover { transform: translateY(-2px); }
.fsi svg { width: 15px; height: 15px; }
.fsi-li   { background: #0A66C2; color: #fff; }
.fsi-tk   { background: var(--graphite, #22313F); color: #fff; }
.fsi-fb   { background: #1877F2; color: #fff; }
.fsi-ig   { background: radial-gradient(circle at 30% 107%, #fdf497 0%, #fdf497 5%, #fd5949 45%, #d6249f 60%, #285AEB 90%); color: #fff; }
.fsi-wa   { background: #25D366; color: #fff; }
.fsi-line { background: #06C755; color: #fff; }
.fsi-inquiry { background: var(--accent-ink); color: #fff; border: none; cursor: pointer; padding: 0; }

/* Footer columns */
.footer-col h3 {
  color: #fff; margin-bottom: 14px; font-size: 15px; font-weight: 700;
}
.footer-links { list-style: none; display: flex; flex-direction: column; gap: 9px; }
.footer-links a { font-size: 14px; color: var(--dark-text); transition: color .15s; }
.footer-links a:hover { color: var(--accent); }

/* Contact buttons */
.footer-wa-btn {
  display: inline-flex; align-items: center; gap: 7px;
  margin-top: 16px; padding: 7px 14px;
  background: rgba(37,211,102,0.12);
  border: 1px solid rgba(37,211,102,0.3);
  border-radius: 99px; font-size: 12px; font-weight: 600;
  color: #25D366; transition: background .2s;
}
.footer-wa-btn:hover { background: rgba(37,211,102,0.22); color: #25D366; }
.footer-inquiry-btn {
  display: inline-flex; align-items: center; gap: 7px;
  margin-top: 16px; padding: 7px 14px;
  background: rgba(200,168,75,0.12);
  border: 1px solid rgba(200,168,75,0.35);
  border-radius: 99px; font-size: 12px; font-weight: 600;
  color: var(--accent); transition: background .2s;
  cursor: pointer; font-family: inherit;
}
.footer-inquiry-btn:hover { background: rgba(200,168,75,0.22); color: var(--accent-ink); }
.inquiry-consent-note {
  font-size: 12px; color: var(--text-muted); line-height: 1.75; margin-top: 12px;
}
.footer-line-btn {
  display: inline-flex; align-items: center; gap: 7px;
  margin-top: 8px; padding: 7px 14px;
  background: rgba(6,199,85,0.12);
  border: 1px solid rgba(6,199,85,0.3);
  border-radius: 99px; font-size: 12px; font-weight: 600;
  color: #06C755; transition: background .2s;
}
.footer-line-btn:hover { background: rgba(6,199,85,0.22); color: #06C755; }

/* Group col */
.footer-group-col h3 { color: var(--accent); }
.footer-group-list { display: flex; flex-direction: column; }
.footer-group-item { display: block; padding: 9px 0; border-bottom: 1px solid var(--dark-line); text-decoration: none; transition: padding-left .15s; }
.footer-group-item:hover { padding-left: 4px; }
.footer-group-item--current { cursor: default; }
.footer-group-item--current:hover { padding-left: 0; }
.footer-group-name { display: flex; align-items: center; gap: 5px; font-size: 14px; color: rgba(255,255,255,0.8); margin-bottom: 2px; font-weight: 600; }
.footer-group-item--current .footer-group-name { color: var(--accent); }
.footer-group-item--current .footer-group-name svg { display: none; }
.footer-group-desc { font-size: 11px; color: rgba(255,255,255,0.3); }
.footer-group-parent { padding-top: 10px; font-size: 11px; color: rgba(255,255,255,0.3); line-height: 1.6; }
.footer-group-listed { display: block; margin-top: 4px; font-family: 'JetBrains Mono', monospace; font-size: 10px; letter-spacing: 0.1em; text-transform: uppercase; color: var(--accent); opacity: 0.7; }

/* Footer bottom */
.footer-bottom { border-top: 1px solid var(--dark-line); padding-top: 20px; display: flex; justify-content: space-between; flex-wrap: wrap; gap: 14px; font-size: 13px; color: rgba(255,255,255,0.45); margin-top: 0; }
.footer-copy { color: rgba(255,255,255,0.3); font-size: 13px; }
.footer-legal { display: flex; gap: 20px; }
.footer-legal a { font-size: 12px; color: rgba(255,255,255,0.25); }
.footer-legal a:hover { color: var(--accent); }
.footer-group-tag { font-size: 12px; color: rgba(255,255,255,0.25); font-family: 'JetBrains Mono', monospace; }

/* === FLOATING BUTTONS — Yuncut JP と完全同じ ============= */
.float-btns {
  position: fixed;
  bottom: 28px; right: 24px;
  z-index: 200;
  display: flex;
  flex-direction: column;
  gap: 12px;
}
.float-btn {
  width: 54px; height: 54px;
  border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  text-decoration: none;
  transition: .25s ease;
  box-shadow: 0 4px 20px rgba(0,0,0,0.18);
}
.float-btn:hover { transform: scale(1.1); }
.float-btn svg { width: 26px; height: 26px; fill: #fff; display: block; }
.float-wa   { background: #25D366; }
.float-line { background: #06C755; }

/* 後方互換（古いクラス名）*/
.wa-float   { background: #25D366; }
.line-float { background: #06C755; }

/* === RESPONSIVE =========================================== */
@media (max-width: 1100px) {
  .footer-top { grid-template-columns: 1.4fr 1fr 1fr; gap: 28px; }
  .footer-brand { grid-column: 1 / -1; }
}
@media (max-width: 768px) {
  .nav-inner { justify-content: space-between; }
  .nav-links, .nav-cta { display: none; }
  .nav-mobile-toggle { display: flex; }
  .nav-links.open { display: flex; flex-direction: column; position: fixed; top: var(--nav-h); left: 0; right: 0; background: #fff; padding: 16px; gap: 4px; border-bottom: 1px solid var(--line); box-shadow: 0 8px 24px var(--shadow); z-index: 99; }
  .footer-top { grid-template-columns: 1fr 1fr; gap: 24px; }
  .float-btns { bottom: 18px; right: 16px; }
  .float-btn { width: 48px; height: 48px; }
  .float-btn svg { width: 22px; height: 22px; }
}
@media (max-width: 480px) {
  .footer-top { grid-template-columns: 1fr; }
}

/* === LOGO SIZE HARD CONSTRAINT (loaded last — overrides earlier nav/footer logo rules) === */
.nav-logo img,
.nav-logo-image {
  display: block;
  width: auto;
  height: auto;
  max-height: 30px;
  max-width: min(180px, 40vw);
  object-fit: contain;
}

.footer-logo img,
.footer-logo-image {
  display: block;
  width: auto;
  height: auto;
  max-height: 28px;
  max-width: min(180px, 40vw);
  object-fit: contain;
}

.nav-logo {
  line-height: 0;
  display: inline-flex;
  align-items: center;
  max-width: min(180px, 40vw);
}

@media (max-width: 768px) {
  .nav-logo img,
  .nav-logo-image {
    max-height: 26px;
    max-width: 160px;
  }

  .footer-logo img,
  .footer-logo-image {
    max-height: 24px;
    max-width: 160px;
  }
}
