/* =====================================================================
   HINODE THEME — Bright Wa-Modern design system (navbar · footer · shared)
   Loaded on every page via navbar.php. Self-contained: does not depend on
   Tailwind color tokens, so the light theme renders consistently even on
   pages still using the old dark palette.
   ===================================================================== */

:root {
  /* Surfaces — warm washi paper */
  --paper: #fbf8f2;
  --paper-2: #ffffff;
  --paper-3: #f4efe4;
  --line: #e7dfce;
  --line-strong: #d9cfb8;

  /* Ink — high contrast text */
  --ink: #23242b;          /* headings / body  (~13:1 on paper) */
  --ink-soft: #55596a;     /* muted            (~5.6:1 on paper) */
  --ink-faint: #8a8f9e;    /* captions */

  /* Brand + accents */
  --shu: #d93b3b;          /* 朱 vermilion — brand */
  --shu-deep: #be2f2f;
  --shu-tint: #fbe8e8;
  --ai: #1f4d6e;           /* 藍 indigo */
  --sora: #3a83b8;         /* 空 sky blue */
  --sora-tint: #e6f1f8;
  --kin: #c9a227;          /* 金 gold */
  --sakura: #ec9db1;       /* 桜 blossom */
  --sakura-soft: #f7d6de;
  --matcha: #6f8b57;       /* 抹茶 */

  /* Effects */
  --radius: 16px;
  --radius-sm: 10px;
  --radius-lg: 26px;
  --shadow-sm: 0 1px 2px rgba(35, 36, 43, .06), 0 2px 8px rgba(35, 36, 43, .05);
  --shadow-md: 0 6px 18px rgba(35, 36, 43, .08), 0 2px 6px rgba(35, 36, 43, .05);
  --shadow-lg: 0 24px 60px -20px rgba(31, 77, 110, .28);
  --shadow-red: 0 12px 30px -10px rgba(217, 59, 59, .5);

  --ease: cubic-bezier(.22, 1, .36, 1);

  --nav-h: 74px;
  --wrap: 1240px;
}

/* ===== Self-drawn background patterns (SVG data-URIs, no image files) ===== */

/* 青海波 Seigaiha — concentric wave scales */
.bg-seigaiha {
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='120' height='60' viewBox='0 0 120 60'%3E%3Cg fill='none' stroke='%231f4d6e' stroke-width='1.4' stroke-opacity='0.14'%3E%3Cpath d='M0 60a30 30 0 0 1 60 0 30 30 0 0 1 60 0M-30 60a30 30 0 0 1 60 0M90 60a30 30 0 0 1 60 0'/%3E%3Cpath d='M0 60a20 20 0 0 1 60 0 20 20 0 0 1 60 0M-30 60a20 20 0 0 1 60 0M90 60a20 20 0 0 1 60 0'/%3E%3Cpath d='M0 60a10 10 0 0 1 60 0 10 10 0 0 1 60 0M-30 60a10 10 0 0 1 60 0M90 60a10 10 0 0 1 60 0'/%3E%3C/g%3E%3C/svg%3E");
  background-size: 120px 60px;
}

/* 麻の葉 Asanoha — hemp-leaf lattice */
.bg-asanoha {
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='56' height='96' viewBox='0 0 56 96'%3E%3Cg fill='none' stroke='%23c9a227' stroke-width='1' stroke-opacity='0.22'%3E%3Cpath d='M28 0v24M28 24 7 36M28 24l21 12M7 36v24M49 36v24M28 48 7 36M28 48l21-12M28 48v24M28 48 7 60M28 48l21 12M7 60l21 12M49 60 28 72M28 72v24M0 12l7 24M56 12l-7 24M0 84l7-24M56 84l-7-24'/%3E%3C/g%3E%3C/svg%3E");
  background-size: 56px 96px;
}

/* 麻の葉 pale — for footer on ink ground */
.bg-asanoha-pale {
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='56' height='96' viewBox='0 0 56 96'%3E%3Cg fill='none' stroke='%23ffffff' stroke-width='1' stroke-opacity='0.10'%3E%3Cpath d='M28 0v24M28 24 7 36M28 24l21 12M7 36v24M49 36v24M28 48 7 36M28 48l21-12M28 48v24M28 48 7 60M28 48l21 12M7 60l21 12M49 60 28 72M28 72v24M0 12l7 24M56 12l-7 24M0 84l7-24M56 84l-7-24'/%3E%3C/g%3E%3C/svg%3E");
  background-size: 56px 96px;
}

/* ===================================================================
   NAVBAR
   =================================================================== */
#main-header.site-nav {
  position: sticky;
  top: 0;
  z-index: 100;
  background: rgba(251, 248, 242, .82);
  -webkit-backdrop-filter: saturate(1.4) blur(14px);
  backdrop-filter: saturate(1.4) blur(14px);
  border-bottom: 1px solid var(--line);
  transition: box-shadow .3s var(--ease), background .3s var(--ease);
}
#main-header.site-nav.navbar-scrolled {
  background: rgba(251, 248, 242, .95);
  box-shadow: var(--shadow-sm);
}
/* gold hairline accent under the bar */
#main-header.site-nav::after {
  content: "";
  position: absolute;
  left: 0; right: 0; bottom: -1px;
  height: 2px;
  background: linear-gradient(90deg, transparent, var(--shu) 20%, var(--kin) 50%, var(--shu) 80%, transparent);
  opacity: .5;
}

.site-nav__bar {
  max-width: var(--wrap);
  margin: 0 auto;
  height: var(--nav-h);
  padding: 0 20px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}
.site-nav__logo { display: inline-flex; align-items: center; flex-shrink: 0; }
.site-nav__logo img {
  height: 46px; width: auto; object-fit: contain;
  transition: transform .3s var(--ease);
}
.site-nav__logo:hover img { transform: scale(1.04); }

.site-nav__links {
  display: none;
  align-items: center;
  gap: 2px;
  flex: 1;
  justify-content: center;
}
@media (min-width: 1080px) { .site-nav__links { display: flex; } }

.site-nav__link,
a.nav-link {
  position: relative;
  display: inline-flex;
  align-items: center;
  gap: 7px;
  padding: 9px 13px;
  border-radius: 11px;
  font-size: 14px;
  font-weight: 600;
  line-height: 1;
  color: var(--ink-soft);
  text-decoration: none;
  white-space: nowrap;
  transition: color .2s var(--ease), background .2s var(--ease);
}
.site-nav__link .material-symbols-outlined,
a.nav-link .material-symbols-outlined { font-size: 20px; }
.site-nav__link:hover,
a.nav-link:hover { color: var(--ink); background: var(--paper-3); }
.site-nav__link.active,
a.nav-link.active { color: var(--shu); }
.site-nav__link.active::after,
a.nav-link.active::after {
  content: "";
  position: absolute;
  left: 13px; right: 13px; bottom: 2px;
  height: 2px; border-radius: 2px;
  background: var(--shu);
}

.site-nav__actions { display: none; align-items: center; gap: 12px; }
@media (min-width: 1080px) { .site-nav__actions { display: flex; } }

/* Primary CTA (call) */
.site-cta {
  position: relative;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 11px 18px;
  border-radius: 12px;
  background: linear-gradient(135deg, var(--shu), var(--shu-deep));
  color: #fff;
  font-size: 14px;
  font-weight: 700;
  text-decoration: none;
  box-shadow: var(--shadow-red);
  overflow: hidden;
  transition: transform .25s var(--ease), box-shadow .25s var(--ease);
}
.site-cta .material-symbols-outlined { font-size: 19px; }
.site-cta::before {
  content: "";
  position: absolute; inset: 0;
  background: linear-gradient(120deg, transparent 30%, rgba(255,255,255,.35) 50%, transparent 70%);
  transform: translateX(-120%);
  transition: transform .6s var(--ease);
}
.site-cta:hover { transform: translateY(-2px); box-shadow: 0 16px 34px -10px rgba(217,59,59,.6); }
.site-cta:hover::before { transform: translateX(120%); }

/* Mobile toggle */
.site-nav__toggle {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 44px; height: 44px;
  border-radius: 12px;
  border: 1px solid var(--line);
  background: var(--paper-2);
  color: var(--ink);
  cursor: pointer;
}
.site-nav__toggle .material-symbols-outlined { font-size: 28px; }
@media (min-width: 1080px) { .site-nav__toggle { display: none; } }

/* Mobile menu */
.site-nav__mobile {
  display: block;
  max-height: 0;
  overflow: hidden;
  background: var(--paper);
  border-top: 1px solid transparent;
  transition: max-height .4s var(--ease), border-color .3s var(--ease);
}
.site-nav__mobile.active {
  max-height: 80vh;
  overflow-y: auto;
  border-top-color: var(--line);
  box-shadow: var(--shadow-md);
}
@media (min-width: 1080px) { .site-nav__mobile { display: none; } }
.site-nav__mobile-inner { padding: 12px 16px 22px; }

a.mobile-menu-link {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 14px 14px;
  border-radius: 12px;
  color: var(--ink);
  font-weight: 600;
  font-size: 15px;
  text-decoration: none;
}
a.mobile-menu-link .material-symbols-outlined { font-size: 22px; color: var(--ink-soft); }
a.mobile-menu-link:hover { background: var(--paper-3); }
a.mobile-menu-link.active { color: var(--shu); background: var(--shu-tint); }
a.mobile-menu-link.active .material-symbols-outlined { color: var(--shu); }

.site-nav__mobile-cta { margin-top: 10px; padding-top: 14px; border-top: 1px solid var(--line); }
.site-nav__mobile-cta .site-cta { width: 100%; justify-content: center; }

/* Backdrop */
#mobile-backdrop.site-nav__backdrop {
  position: fixed;
  inset: 0;
  background: rgba(31, 77, 110, .35);
  -webkit-backdrop-filter: blur(2px);
  backdrop-filter: blur(2px);
  opacity: 0;
  visibility: hidden;
  transition: opacity .3s var(--ease), visibility .3s var(--ease);
  z-index: 90;
}
#mobile-backdrop.site-nav__backdrop.active { opacity: 1; visibility: visible; }

/* ===================================================================
   FOOTER
   =================================================================== */
.site-footer {
  position: relative;
  overflow: hidden;
  background: linear-gradient(180deg, #223349 0%, #1a2739 100%);
  color: rgba(255, 255, 255, .72);
  padding: 0 0 32px;
}
/* seigaiha crest at the very top of the footer, drawn in CSS */
.site-footer__crest {
  height: 46px;
  background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='120' height='46' viewBox='0 0 120 46'%3E%3Cg fill='none' stroke='%23ffffff' stroke-opacity='0.16' stroke-width='1.4'%3E%3Cpath d='M0 46a30 30 0 0 1 60 0 30 30 0 0 1 60 0M-30 46a30 30 0 0 1 60 0M90 46a30 30 0 0 1 60 0'/%3E%3Cpath d='M0 46a18 18 0 0 1 60 0 18 18 0 0 1 60 0M-30 46a18 18 0 0 1 60 0M90 46a18 18 0 0 1 60 0'/%3E%3C/g%3E%3C/svg%3E") repeat-x;
  background-size: 120px 46px;
}
.site-footer::before { /* asanoha texture */
  content: "";
  position: absolute; inset: 0;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='56' height='96' viewBox='0 0 56 96'%3E%3Cg fill='none' stroke='%23ffffff' stroke-width='1' stroke-opacity='0.05'%3E%3Cpath d='M28 0v24M28 24 7 36M28 24l21 12M7 36v24M49 36v24M28 48 7 36M28 48l21-12M28 48v24M28 48 7 60M28 48l21 12M7 60l21 12M49 60 28 72M28 72v24'/%3E%3C/g%3E%3C/svg%3E");
  background-size: 56px 96px;
  pointer-events: none;
}
.site-footer__inner {
  position: relative;
  z-index: 1;
  max-width: var(--wrap);
  margin: 0 auto;
  padding: 56px 20px 0;
}
.site-footer__grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 40px;
}
@media (min-width: 720px) { .site-footer__grid { grid-template-columns: 1.6fr 1fr 1fr; } }

.site-footer__brand img { height: 58px; width: auto; object-fit: contain; }
.site-footer__brand p { margin-top: 18px; max-width: 34ch; font-size: 14px; line-height: 1.75; }
.site-footer__contact { margin-top: 22px; display: flex; flex-direction: column; gap: 12px; }
.site-footer__contact a,
.site-footer__contact span.ln {
  display: inline-flex; align-items: center; gap: 11px;
  font-size: 14px; color: rgba(255,255,255,.8); text-decoration: none;
  transition: color .2s var(--ease);
}
.site-footer__contact .material-symbols-outlined {
  font-size: 20px; color: var(--shu);
  background: rgba(255,255,255,.06);
  padding: 7px; border-radius: 10px;
}
.site-footer__contact a:hover { color: #fff; }

.site-footer__col h4 {
  display: inline-flex; align-items: center; gap: 8px;
  color: #fff; font-weight: 700; font-size: 16px; margin-bottom: 18px;
  letter-spacing: .02em;
}
.site-footer__col h4 .material-symbols-outlined { color: var(--kin); font-size: 20px; }
.site-footer__col nav { display: flex; flex-direction: column; gap: 12px; }
.site-footer__col nav a {
  display: inline-flex; align-items: center; gap: 9px;
  font-size: 14px; color: rgba(255,255,255,.72); text-decoration: none;
  transition: color .2s var(--ease), transform .2s var(--ease);
}
.site-footer__col nav a::before {
  content: ""; width: 6px; height: 6px; border-radius: 50%;
  background: var(--shu); flex-shrink: 0; transition: transform .2s var(--ease);
}
.site-footer__col nav a:hover { color: #fff; transform: translateX(4px); }
.site-footer__col nav a:hover::before { transform: scale(1.5); }

/* Trust badges */
.site-footer__trust {
  position: relative; z-index: 1;
  max-width: var(--wrap); margin: 44px auto 0; padding: 28px 20px 0;
  border-top: 1px solid rgba(255,255,255,.12);
}
.site-footer__trust-label {
  text-align: center; font-size: 12px; letter-spacing: .18em;
  text-transform: uppercase; color: rgba(255,255,255,.5); margin-bottom: 18px;
}
.site-footer__badges {
  display: flex; flex-wrap: wrap; align-items: stretch;
  justify-content: center; gap: 14px;
}
.trust-badge {
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  min-width: 92px; padding: 12px 14px;
  background: rgba(255,255,255,.05);
  border: 1px solid rgba(255,255,255,.1);
  border-radius: 14px;
  transition: background .2s var(--ease), transform .2s var(--ease);
}
.trust-badge:hover { background: rgba(255,255,255,.1); transform: translateY(-3px); }
.trust-badge svg { width: 34px; height: 34px; margin-bottom: 6px; }
.trust-badge b { font-size: 11px; color: #fff; letter-spacing: .04em; }
.trust-badge small { font-size: 9px; color: rgba(255,255,255,.55); }

/* Bottom bar */
.site-footer__bottom {
  position: relative; z-index: 1;
  max-width: var(--wrap); margin: 28px auto 0; padding: 22px 20px 0;
  border-top: 1px solid rgba(255,255,255,.12);
  display: flex; flex-direction: column; align-items: center; gap: 18px;
  text-align: center;
}
@media (min-width: 900px) { .site-footer__bottom { flex-direction: row; justify-content: space-between; text-align: left; } }
.site-footer__bottom p { font-size: 13.5px; color: rgba(255,255,255,.6); }
.site-footer__social { display: flex; align-items: center; gap: 12px; }
.site-footer__social a {
  display: inline-flex; align-items: center; justify-content: center;
  width: 42px; height: 42px; border-radius: 50%;
  background: rgba(255,255,255,.06); color: rgba(255,255,255,.85);
  transition: background .25s var(--ease), transform .25s var(--ease), color .25s var(--ease);
}
.site-footer__social a:hover { background: var(--shu); color: #fff; transform: translateY(-3px); }
.site-footer__social a svg { width: 19px; height: 19px; }
.site-footer__top {
  display: inline-flex; align-items: center; gap: 8px;
  font-size: 13.5px; color: rgba(255,255,255,.7);
  background: none; border: none; cursor: pointer; font-family: inherit;
  transition: color .2s var(--ease);
}
.site-footer__top:hover { color: var(--shu); }
.site-footer__top .material-symbols-outlined { transition: transform .25s var(--ease); }
.site-footer__top:hover .material-symbols-outlined { transform: translateY(-3px); }

/* Language switcher tweaks so it sits well on the light navbar */
.language-button { border-color: var(--line) !important; }
