/* =============================================
   common.css — 日本MediCare Link
   ============================================= */

/* ─── Reset ─── */
*, *::before, *::after {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

/* ─── CSS Variables ─── */
:root {
  /* Primary: Deep Forest Green */
  --navy: #1A5248;
  --navy-deep: #0F3832;
  --navy-light: #2E7A5F;
  /* Accent: Warm Gold */
  --gold: #B8922A;
  --gold-soft: #DFC98A;
  /* Highlight: Terracotta */
  --coral: #C4583C;
  --coral-soft: #EBA090;
  /* Backgrounds */
  --white: #FFFFFF;
  --off-white: #FAFAF7;
  --warm-gray: #F0F4F2;
  /* Text */
  --text-primary: #1C2826;
  --text-secondary: #4D6358;
  --text-light: #7A9288;
}

/* ─── Typography / Base ─── */
html {
  scroll-behavior: smooth;
  font-size: 18px;
}

body {
  font-family: 'Noto Sans JP', 'DM Sans', sans-serif;
  color: var(--text-primary);
  background: var(--off-white);
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
}

/* ─── Utility Classes ─── */
.container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 clamp(1.5rem, 4vw, 3rem);
}

.section-label {
  font-family: 'DM Sans', sans-serif;
  font-size: 0.72rem;
  font-weight: 600;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--coral);
  margin-bottom: 1rem;
}

.section-title {
  font-family: 'Cormorant Garamond', serif;
  font-size: clamp(2rem, 4.5vw, 3.2rem);
  font-weight: 600;
  color: var(--navy);
  line-height: 1.2;
  margin-bottom: 1.5rem;
}

.section-title .jp {
  display: block;
  font-family: 'Noto Sans JP', sans-serif;
  font-size: clamp(1.1rem, 2.2vw, 1.45rem);
  font-weight: 600;
  margin-top: 0.5rem;
  letter-spacing: 0.04em;
  color: var(--text-primary);
}

.text-center { text-align: center; }
.text-right  { text-align: right; }

/* ─── Buttons ─── */
.btn-primary {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.9rem 2.2rem;
  font-family: 'Noto Sans JP', sans-serif;
  font-size: 0.88rem;
  font-weight: 500;
  color: var(--white);
  background: var(--navy);
  border: none;
  border-radius: 4px;
  cursor: pointer;
  text-decoration: none;
  transition: all 0.3s;
  letter-spacing: 0.06em;
}

.btn-primary:hover {
  background: var(--navy-light);
  transform: translateY(-2px);
  box-shadow: 0 8px 24px rgba(26, 82, 72, 0.25);
}

.btn-secondary {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.9rem 2.2rem;
  font-family: 'Noto Sans JP', sans-serif;
  font-size: 0.88rem;
  font-weight: 500;
  color: var(--navy);
  background: transparent;
  border: 1.5px solid var(--navy);
  border-radius: 4px;
  cursor: pointer;
  text-decoration: none;
  transition: all 0.3s;
  letter-spacing: 0.06em;
}

.btn-secondary:hover {
  background: var(--navy);
  color: var(--white);
  transform: translateY(-2px);
}

/* ─── Reveal Animations ─── */
.reveal,
.reveal-fade,
.reveal-slide-left,
.reveal-slide-right,
.reveal-scale,
.reveal-rotate {
  opacity: 1;
  transform: none;
}

.js-loaded .reveal {
  opacity: 0;
  transform: translateY(36px);
  transition: opacity 0.8s cubic-bezier(0.16, 1, 0.3, 1),
              transform 0.8s cubic-bezier(0.16, 1, 0.3, 1);
}
.js-loaded .reveal.visible {
  opacity: 1;
  transform: translateY(0);
}

.js-loaded .reveal-fade {
  opacity: 0;
  transform: translateY(28px);
  transition: opacity 0.8s cubic-bezier(0.16, 1, 0.3, 1),
              transform 0.8s cubic-bezier(0.16, 1, 0.3, 1);
}
.js-loaded .reveal-fade.visible {
  opacity: 1;
  transform: translateY(0);
}

.js-loaded .reveal-slide-left {
  opacity: 0;
  transform: translateX(-48px);
  transition: opacity 0.8s cubic-bezier(0.16, 1, 0.3, 1),
              transform 0.8s cubic-bezier(0.16, 1, 0.3, 1);
}
.js-loaded .reveal-slide-left.visible {
  opacity: 1;
  transform: translateX(0);
}

.js-loaded .reveal-slide-right {
  opacity: 0;
  transform: translateX(48px);
  transition: opacity 0.8s cubic-bezier(0.16, 1, 0.3, 1),
              transform 0.8s cubic-bezier(0.16, 1, 0.3, 1);
}
.js-loaded .reveal-slide-right.visible {
  opacity: 1;
  transform: translateX(0);
}

.js-loaded .reveal-scale {
  opacity: 0;
  transform: scale(0.92);
  transition: opacity 0.8s cubic-bezier(0.16, 1, 0.3, 1),
              transform 0.8s cubic-bezier(0.16, 1, 0.3, 1);
}
.js-loaded .reveal-scale.visible {
  opacity: 1;
  transform: scale(1);
}

.reveal-delay-1 { transition-delay: 0.1s !important; }
.reveal-delay-2 { transition-delay: 0.2s !important; }
.reveal-delay-3 { transition-delay: 0.3s !important; }
.reveal-delay-4 { transition-delay: 0.4s !important; }

@keyframes fadeUp {
  from { opacity: 0; transform: translateY(28px); }
  to   { opacity: 1; transform: translateY(0); }
}

/* ─── Navigation ─── */
nav {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 100;
  padding: 1.2rem 0;
  transition: all 0.4s ease;
}

nav.scrolled {
  background: rgba(255, 255, 255, 0.96);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  box-shadow: 0 1px 0 rgba(26, 82, 72, 0.08), 0 4px 20px rgba(26, 82, 72, 0.06);
  padding: 0.7rem 0;
}

nav .container {
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.nav-logo {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  text-decoration: none;
}

.nav-logo img {
  height: 36px;
  width: auto;
}

.nav-logo .brand-text {
  font-family: 'Noto Sans JP', sans-serif;
  font-size: 0.95rem;
  font-weight: 700;
  color: var(--navy);
  letter-spacing: 0.05em;
}

.nav-links {
  display: flex;
  align-items: center;
  gap: 1.8rem;
  list-style: none;
}

.nav-links a {
  font-family: 'Noto Sans JP', sans-serif;
  font-size: 0.8rem;
  font-weight: 500;
  color: var(--text-primary);
  text-decoration: none;
  letter-spacing: 0.06em;
  position: relative;
  transition: color 0.25s;
}

.nav-links a:not(.nav-cta)::after {
  content: '';
  position: absolute;
  bottom: -3px;
  left: 0;
  width: 0;
  height: 1.5px;
  background: var(--navy);
  transition: width 0.3s ease;
}

.nav-links a:not(.nav-cta):hover::after {
  width: 100%;
}

.nav-cta {
  font-size: 0.8rem !important;
  font-weight: 500 !important;
  padding: 0.55rem 1.4rem;
  background: var(--navy);
  color: var(--white) !important;
  border-radius: 3px;
  transition: background 0.25s, transform 0.2s !important;
}

.nav-cta:hover {
  background: var(--navy-light) !important;
  transform: translateY(-1px);
}

.nav-back {
  font-family: 'DM Sans', sans-serif;
  font-size: 0.85rem;
  font-weight: 500;
  color: var(--text-secondary);
  text-decoration: none;
  display: flex;
  align-items: center;
  gap: 0.5rem;
  transition: color 0.25s;
}

.nav-back:hover { color: var(--navy); }

.hamburger {
  display: none;
  flex-direction: column;
  gap: 5px;
  background: none;
  border: none;
  cursor: pointer;
  padding: 4px;
}

.hamburger span {
  width: 24px;
  height: 2px;
  background: var(--navy);
  transition: all 0.3s;
}

/* ─── Footer ─── */
footer {
  background: var(--navy-deep);
  padding: 4.5rem 0 2rem;
  color: rgba(255, 255, 255, 0.5);
}

footer a {
  color: rgba(255, 255, 255, 0.6);
  text-decoration: none;
  transition: color 0.25s;
}

footer a:hover { color: var(--white); }

.footer-top {
  display: flex;
  justify-content: space-between;
  align-items: start;
  padding-bottom: 3rem;
  border-bottom: 1px solid rgba(255, 255, 255, 0.1);
  margin-bottom: 2rem;
}

.footer-brand .brand-text {
  font-family: 'Noto Sans JP', sans-serif;
  font-size: 1rem;
  font-weight: 700;
  color: var(--white);
  letter-spacing: 0.05em;
  display: block;
  margin-bottom: 0.8rem;
}

.footer-brand p {
  font-size: 0.78rem;
  line-height: 1.9;
  max-width: 280px;
  color: rgba(255,255,255,0.5);
}

.footer-links {
  display: flex;
  gap: 2.5rem;
  flex-wrap: wrap;
}

.footer-links a {
  font-size: 0.8rem;
  letter-spacing: 0.04em;
}

.footer-bottom {
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.footer-bottom p {
  font-size: 0.7rem;
  font-family: 'DM Sans', sans-serif;
  letter-spacing: 0.06em;
  color: rgba(255,255,255,0.35);
}

footer.footer-simple {
  padding: 2rem 0;
  text-align: center;
  font-size: 0.8rem;
}

/* ─── Accessibility ─── */
.skip-link {
  position: absolute;
  top: -100%;
  left: 50%;
  transform: translateX(-50%);
  background: var(--navy);
  color: var(--white);
  padding: 0.8rem 1.5rem;
  border-radius: 0 0 6px 6px;
  z-index: 9999;
  font-size: 0.9rem;
  text-decoration: none;
  transition: top 0.2s;
}
.skip-link:focus { top: 0; }

:focus-visible {
  outline: 2px solid var(--navy-light);
  outline-offset: 2px;
}

/* ─── Responsive ─── */
@media (max-width: 768px) {
  .nav-links {
    display: none;
  }

  .nav-links.open {
    display: flex;
    flex-direction: column;
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    background: var(--white);
    padding: 2rem;
    gap: 1.5rem;
    box-shadow: 0 20px 40px rgba(26, 82, 72, 0.12);
    border-top: 2px solid var(--navy);
  }

  .hamburger {
    display: flex;
  }

  .footer-top {
    flex-direction: column;
    gap: 2rem;
  }

  .footer-bottom {
    flex-direction: column;
    gap: 1rem;
    text-align: center;
  }

  .footer-links {
    gap: 1.5rem;
  }
}
