/* ============================================================
   協同組合前橋電気センター — global.css
   ============================================================ */

/* ---------- Google Fonts ---------- */
@import url('https://fonts.googleapis.com/css2?family=Noto+Sans+JP:wght@400;600;700;900&display=swap');

/* ---------- Design Tokens ---------- */
:root {
  --navy-950: #060f24;
  --navy-900: #0a1a3a;
  --navy-800: #0d244e;
  --navy-700: #133066;
  --navy-600: #1c4493;
  --navy-500: #2b5cb8;
  --navy-400: #5a83d4;
  --navy-300: #94b1e6;
  --navy-200: #c8d7f1;
  --navy-100: #e6edf9;
  --navy-50:  #f3f6fc;

  --orange-700: #b75d09;
  --orange-600: #d97208;
  --orange-500: #f08a1c;
  --orange-400: #f7a64a;
  --orange-200: #fcd7ad;
  --orange-100: #fdeacc;
  --orange-50:  #fef5e6;

  --yellow-600: #d9a405;
  --yellow-500: #ffc629;
  --yellow-400: #ffd45a;
  --yellow-100: #fff1c2;

  --success: #1d9d62;
  --warning: #d9a405;
  --danger:  #d83a2b;
  --info:    #2b5cb8;

  --ink-900:  #0f1626;
  --ink-800:  #1a2236;
  --ink-700:  #2c3548;
  --ink-600:  #4a5366;
  --ink-500:  #6e7689;
  --ink-400:  #98a0b2;
  --ink-300:  #c2c8d4;
  --ink-200:  #e1e4ec;
  --ink-100:  #eef0f5;
  --ink-50:   #f6f7fa;
  --paper:    #fbfbfc;

  --r-xs: 2px; --r-sm: 4px; --r-md: 6px; --r-lg: 10px; --r-xl: 16px; --r-full: 999px;
  --shadow-1: 0 1px 2px rgba(10,26,58,0.06), 0 1px 1px rgba(10,26,58,0.04);
  --shadow-2: 0 4px 12px rgba(10,26,58,0.08), 0 1px 2px rgba(10,26,58,0.04);
  --shadow-3: 0 12px 28px rgba(10,26,58,0.10), 0 2px 6px rgba(10,26,58,0.05);

  --container: 1240px;
  --gutter: 32px;
  --font-jp: "Noto Sans JP", "Hiragino Kaku Gothic ProN", "Yu Gothic", sans-serif;
  --t-fast: 120ms ease;
  --t-base: 200ms cubic-bezier(.2,.7,.2,1);
  --header-h: 72px;
}

/* ---------- 流体タイポグラフィ ----------
   16px（≥1240px） → 14px（768px） → 14px（<768px 固定）
   ジャンプ防止：breakpointまたぎで font-size が連続するよう線形補間
   -------------------------------------------------------- */
html { font-size: 16px; scroll-behavior: smooth; }
@media screen and (max-width: 1239px) and (min-width: 768px) {
  /* 14px @ 768px → 16px @ 1240px */
  html { font-size: calc(10.74px + 0.424vw); }
}
@media screen and (max-width: 767px) {
  html { font-size: 14px; }
}

/* ---------- Reset ---------- */
*, *::before, *::after { box-sizing: border-box; }
html, body { margin: 0; padding: 0; }
body {
  font-family: var(--font-jp);
  font-feature-settings: "palt" 1;
  color: var(--ink-900);
  background: var(--paper);
  -webkit-font-smoothing: antialiased;
  line-height: 1.7;
}
img { max-width: 100%; display: block; }
button { font-family: inherit; cursor: pointer; }
a { color: var(--navy-600); text-decoration: none; transition: color var(--t-fast); }
a:hover { color: var(--orange-500); }

/* ---------- Container ---------- */
.container { max-width: var(--container); margin: 0 auto; padding: 0 var(--gutter); }

/* ---------- Utility Bar ---------- */
.utility-bar {
  background: var(--navy-900);
  color: rgba(255,255,255,0.8);
  font-size: 0.75rem;
}
.utility-bar__inner {
  max-width: var(--container);
  margin: 0 auto;
  padding: 8px var(--gutter);
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 16px;
}
.utility-bar a { color: rgba(255,255,255,0.75); }
.utility-bar a:hover { color: var(--yellow-500); }
.utility-bar__phone {
  font-weight: 700;
  letter-spacing: 0.04em;
  display: inline-flex;
  gap: 8px;
  align-items: center;
}
.utility-bar__phone .num { font-size: 0.875rem; font-weight: 700; }

/* ---------- Header ---------- */
.site-header {
  background: white;
  border-bottom: 1px solid var(--ink-100);
  position: sticky;
  top: 0;
  z-index: 100;
  transition: box-shadow var(--t-base);
}
.site-header.scrolled { box-shadow: var(--shadow-2); }
.site-header__inner {
  max-width: var(--container);
  margin: 0 auto;
  padding: 0 var(--gutter);
  height: var(--header-h);
  display: flex;
  align-items: center;
  gap: 24px;
}

.brand {
  display: flex;
  align-items: center;
  gap: 12px;
  text-decoration: none;
  color: inherit;
  flex-shrink: 0;
}
.brand__mark {
  width: 44px; height: 44px;
  display: grid; place-items: center;
  background: var(--navy-700);
  color: white;
  font-weight: 900;
  font-size: 1.25rem;
  border-radius: var(--r-sm);
}
.brand__logo {
  height: 44px;
  width: auto;
  display: block;
  object-fit: contain;
}
.brand__name {
  font-weight: 900;
  font-size: 0.9375rem;
  line-height: 1.25;
  color: var(--navy-900);
}
.brand__sub {
  font-size: 0.625rem;
  font-weight: 600;
  letter-spacing: 0.12em;
  color: var(--ink-500);
  display: block;
}

.gnav {
  display: flex;
  margin-left: auto;
  gap: 2px;
  align-items: center;
}
.gnav__item {
  padding: 10px 12px;
  font-size: 0.875rem;
  font-weight: 700;
  color: var(--ink-800);
  border-radius: var(--r-sm);
  transition: color var(--t-fast), background var(--t-fast);
  white-space: nowrap;
}
.gnav__item:hover { color: var(--navy-700); background: var(--navy-50); }
.gnav__item.active { color: var(--navy-700); background: var(--navy-50); }
.gnav__item--cta {
  background: var(--orange-500);
  color: white !important;
  padding: 10px 18px;
  margin-left: 8px;
  border-radius: var(--r-sm);
}
.gnav__item--cta:hover { background: var(--orange-600); color: white; }

/* Hamburger */
.ham-btn {
  display: none;
  flex-direction: column;
  gap: 5px;
  width: 36px;
  height: 36px;
  padding: 8px 6px;
  background: none;
  border: none;
  margin-left: auto;
  cursor: pointer;
}
.ham-btn span {
  display: block;
  width: 24px;
  height: 2px;
  background: var(--ink-800);
  border-radius: 2px;
  transition: transform 0.3s, opacity 0.3s;
}
.ham-btn.open span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.ham-btn.open span:nth-child(2) { opacity: 0; }
.ham-btn.open span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

/* Mobile nav drawer */
.mobile-nav {
  display: none;
  position: fixed;
  inset: 0;
  top: var(--header-h);
  background: white;
  z-index: 99;
  padding: 24px var(--gutter);
  flex-direction: column;
  gap: 4px;
  overflow-y: auto;
}
.mobile-nav.open { display: flex; }
.mobile-nav a {
  display: block;
  padding: 16px 0;
  font-size: 1rem;
  font-weight: 700;
  color: var(--ink-900);
  border-bottom: 1px solid var(--ink-100);
}
.mobile-nav a.cta {
  margin-top: 16px;
  background: var(--orange-500);
  color: white;
  text-align: center;
  padding: 16px;
  border-radius: var(--r-md);
  border: none;
}

/* ---------- Breadcrumb ---------- */
.crumbs {
  background: var(--ink-50);
  border-bottom: 1px solid var(--ink-100);
}
.crumbs__inner {
  max-width: var(--container);
  margin: 0 auto;
  padding: 10px var(--gutter);
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 0.75rem;
  color: var(--ink-500);
}
.crumbs__inner a { color: var(--ink-600); }
.crumbs__inner a:hover { color: var(--navy-600); }
.crumbs__sep { color: var(--ink-300); }
.crumbs__current { color: var(--ink-900); font-weight: 700; }

/* ---------- Page Header ---------- */
.page-header {
  background: linear-gradient(135deg, var(--navy-900) 0%, var(--navy-700) 100%);
  color: white;
  padding: 56px var(--gutter) 52px;
  position: relative;
  overflow: hidden;
}
.page-header::after {
  content: "";
  position: absolute; inset: 0;
  background-image:
    linear-gradient(60deg, transparent 49.5%, rgba(255,198,41,0.15) 49.5% 50.5%, transparent 50.5%),
    linear-gradient(120deg, transparent 49.5%, rgba(255,198,41,0.15) 49.5% 50.5%, transparent 50.5%),
    linear-gradient(0deg, transparent 49.5%, rgba(255,198,41,0.15) 49.5% 50.5%, transparent 50.5%);
  background-size: 40px 68px;
  mask-image: radial-gradient(ellipse at 100% 0%, black 0%, transparent 65%);
  pointer-events: none;
}
.page-header__inner {
  max-width: var(--container);
  margin: 0 auto;
  position: relative; z-index: 1;
}
.page-header h1 {
  font-size: clamp(1.75rem, 4vw, 2.5rem);
  font-weight: 900;
  line-height: 1.2;
  margin: 0 0 8px;
}
.page-header__en {
  font-size: 0.75rem;
  font-weight: 700;
  letter-spacing: 0.2em;
  color: var(--yellow-500);
  text-transform: uppercase;
}

/* ---------- Section ---------- */
.section { padding: 80px 0; }
.section-alt { background: var(--navy-50); }
.section-dark { background: var(--navy-900); color: white; }

.section-head {
  margin-bottom: 48px;
  text-align: center;
}
.section-head h2 {
  font-size: clamp(1.375rem, 3vw, 1.875rem);
  font-weight: 900;
  color: var(--navy-900);
  line-height: 1.3;
  margin: 0 0 8px;
}
.section-head .en {
  font-size: 0.75rem;
  font-weight: 700;
  letter-spacing: 0.2em;
  color: var(--orange-500);
  text-transform: uppercase;
}
.section-dark .section-head h2 { color: white; }

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 14px 28px;
  border-radius: var(--r-sm);
  border: 0;
  font-weight: 700;
  font-size: 1rem;
  letter-spacing: 0.02em;
  line-height: 1;
  text-decoration: none;
  white-space: nowrap;
  transition: transform var(--t-fast), background var(--t-base), color var(--t-base), box-shadow var(--t-base);
}
.btn:active { transform: translateY(1px); }
.btn--sm { padding: 10px 20px; font-size: 0.875rem; }
.btn--lg { padding: 18px 40px; font-size: 1.125rem; }
.btn--block { width: 100%; }

.btn-primary { background: var(--orange-500); color: white; box-shadow: 0 4px 12px rgba(240,138,28,0.30); }
.btn-primary:hover { background: var(--orange-600); color: white; }

.btn-navy { background: var(--navy-700); color: white; }
.btn-navy:hover { background: var(--navy-800); color: white; }

.btn-outline { background: transparent; color: var(--navy-700); border: 1.5px solid var(--navy-700); }
.btn-outline:hover { background: var(--navy-700); color: white; }

.btn-outline-white { background: transparent; color: white; border: 1.5px solid rgba(255,255,255,0.6); }
.btn-outline-white:hover { background: white; color: var(--navy-700); }

/* ---------- Badges ---------- */
.badge {
  display: inline-flex;
  align-items: center;
  font-size: 0.6875rem;
  font-weight: 700;
  padding: 3px 10px;
  border-radius: var(--r-full);
  letter-spacing: 0.04em;
  white-space: nowrap;
}
.badge-general { background: var(--navy-100); color: var(--navy-700); }
.badge-member  { background: var(--orange-100); color: var(--orange-700); }
.badge-info    { background: var(--ink-100); color: var(--ink-700); }
.badge-event   { background: var(--yellow-100); color: #7a5c00; }

/* ---------- Cards ---------- */
.card {
  background: white;
  border: 1px solid var(--ink-200);
  border-radius: var(--r-lg);
  padding: 28px;
}
.card-hover { transition: transform var(--t-base), box-shadow var(--t-base), border-color var(--t-base); }
.card-hover:hover { transform: translateY(-4px); box-shadow: var(--shadow-3); border-color: var(--navy-200); }

/* ---------- Info table ---------- */
.info-table { width: 100%; border-collapse: collapse; }
.info-table th, .info-table td {
  padding: 14px 18px;
  border-bottom: 1px solid var(--ink-200);
  font-size: 0.9375rem;
  text-align: left;
  line-height: 1.7;
}
.info-table th {
  width: 220px;
  font-weight: 700;
  color: var(--navy-800);
  background: var(--navy-50);
  white-space: nowrap;
}
.info-table td { color: var(--ink-700); }

/* ---------- Accordion (FAQ) ---------- */
.accordion { border: 1px solid var(--ink-200); border-radius: var(--r-lg); overflow: hidden; }
.accordion + .accordion { margin-top: 12px; }
.accordion__btn {
  width: 100%;
  display: flex;
  align-items: flex-start;
  gap: 16px;
  padding: 22px 24px;
  background: white;
  border: none;
  text-align: left;
  font-size: 1rem;
  font-weight: 700;
  color: var(--ink-900);
  cursor: pointer;
  transition: background var(--t-fast);
}
.accordion__btn:hover { background: var(--navy-50); }
.accordion__q { color: var(--orange-500); font-size: 1.125rem; font-weight: 900; flex-shrink: 0; }
.accordion__chevron {
  margin-left: auto;
  width: 20px; height: 20px;
  flex-shrink: 0;
  color: var(--ink-400);
  transition: transform 0.3s;
}
.accordion.open .accordion__chevron { transform: rotate(180deg); }
.accordion__body {
  display: none;
  padding: 0 24px 24px 56px;
  background: var(--navy-50);
  border-top: 1px solid var(--ink-100);
}
.accordion.open .accordion__body { display: block; }
.accordion__body p { font-size: 0.9375rem; color: var(--ink-700); line-height: 1.9; padding-top: 20px; }

/* ---------- News list ---------- */
.news-list { display: flex; flex-direction: column; gap: 0; }
.news-item {
  display: flex;
  align-items: baseline;
  gap: 14px;
  padding: 18px 0;
  border-bottom: 1px solid var(--ink-100);
  text-decoration: none;
  color: inherit;
  transition: background var(--t-fast);
}
.news-item:hover { background: var(--navy-50); padding-left: 8px; }
.news-item__date { font-size: 0.8125rem; color: var(--ink-500); white-space: nowrap; flex-shrink: 0; }
.news-item__title { font-size: 0.9375rem; color: var(--ink-900); line-height: 1.6; }
.news-item__title:hover { color: var(--navy-700); }

/* ---------- Forms ---------- */
.field { display: flex; flex-direction: column; gap: 6px; margin-bottom: 22px; }
.field-label { font-size: 0.875rem; font-weight: 700; color: var(--ink-800); }
.field-label .req {
  display: inline-block;
  background: var(--danger);
  color: white;
  font-size: 0.6875rem;
  padding: 2px 6px;
  border-radius: var(--r-xs);
  margin-left: 6px;
  vertical-align: middle;
}
.field-hint { font-size: 0.75rem; color: var(--ink-500); }
.input, .textarea, .select-input {
  width: 100%;
  background: white;
  border: 1.5px solid var(--ink-200);
  border-radius: var(--r-md);
  padding: 12px 14px;
  font: inherit;
  font-size: 0.9375rem;
  color: var(--ink-900);
  transition: border var(--t-base), box-shadow var(--t-base);
}
.input:focus, .textarea:focus, .select-input:focus {
  outline: none;
  border-color: var(--navy-600);
  box-shadow: 0 0 0 3px var(--navy-100);
}
.textarea { min-height: 140px; resize: vertical; line-height: 1.7; }
.checkbox-wrap { display: flex; gap: 10px; align-items: flex-start; font-size: 0.875rem; }
.checkbox-wrap input { margin-top: 3px; width: 16px; height: 16px; accent-color: var(--navy-600); flex-shrink: 0; }

/* ---------- Footer ---------- */
.site-footer {
  background: var(--navy-950);
  color: rgba(255,255,255,0.7);
  padding: 72px 0 0;
}
.site-footer__top {
  max-width: var(--container);
  margin: 0 auto;
  padding: 0 var(--gutter);
  display: grid;
  grid-template-columns: 1.2fr 2fr;
  gap: 80px;
}
.site-footer__brand .brand__name { color: white; font-size: 1rem; }
.site-footer__brand .brand__sub { color: var(--navy-300); }
.site-footer__brand .brand__mark { background: rgba(255,255,255,0.12); color: var(--yellow-500); }
.site-footer__info { margin-top: 24px; font-size: 0.875rem; line-height: 1.9; }
.site-footer__tel { font-size: 1.5rem; font-weight: 900; color: white; letter-spacing: 0.02em; }
.site-footer__cols {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 32px;
}
.site-footer h4 {
  font-size: 0.6875rem;
  font-weight: 700;
  letter-spacing: 0.18em;
  color: var(--yellow-500);
  text-transform: uppercase;
  margin: 0 0 16px;
}
.site-footer ul { list-style: none; padding: 0; margin: 0; display: flex; flex-direction: column; gap: 10px; }
.site-footer a { color: rgba(255,255,255,0.7); font-size: 0.875rem; }
.site-footer a:hover { color: white; }
.site-footer__bottom {
  margin-top: 56px;
  border-top: 1px solid rgba(255,255,255,0.08);
  padding: 20px var(--gutter);
  max-width: var(--container);
  margin-left: auto; margin-right: auto;
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 0.75rem;
  color: rgba(255,255,255,0.4);
}

/* ---------- Fade-in ---------- */
.fi { opacity: 0; transform: translateY(24px); transition: opacity 0.8s ease, transform 0.8s ease; }
.fi.visible { opacity: 1; transform: translateY(0); }
.fi-d1 { transition-delay: 0.1s; }
.fi-d2 { transition-delay: 0.2s; }
.fi-d3 { transition-delay: 0.3s; }
.fi-d4 { transition-delay: 0.4s; }

/* ---------- Responsive ---------- */
@media (max-width: 900px) {
  :root { --gutter: 20px; }
  .gnav { display: none; }
  .ham-btn { display: flex; }
  .site-footer__top { grid-template-columns: 1fr; gap: 40px; }
  .site-footer__cols { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 600px) {
  .site-footer__cols { grid-template-columns: 1fr; gap: 24px; }
  .info-table th { width: 120px; font-size: 0.8125rem; }
  .page-header { padding: 40px var(--gutter) 36px; }
  .section { padding: 56px 0; }
}
