/* ========================================
   FOOTER - Editorial Minimalism 2025
   White-based, typographic, refined
   ======================================== */
@layer base, layout, components, utilities, pages;

@layer components {

/* ========================================
   Variables
   ======================================== */
.ed-footer {
  --footer-bg: #ffffff;
  --footer-bg-bottom: #fafaf8;
  --footer-text: #1a1a1a;
  --footer-text-muted: #6b6b6b;
  --footer-text-light: #9a9a9a;
  --footer-border: #e8e8e6;
  --footer-border-light: #f0f0ee;
  --footer-accent: #2d3436;
  --footer-accent-warm: #8b7355;
  --footer-hover: #4a5568;

  /* Typography */
  --font-display: 'Cormorant Garamond', 'Georgia', serif;
  --font-body: 'DM Sans', 'Noto Sans JP', sans-serif;
}

/* ========================================
   Container
   ======================================== */
.ed-footer {
  background: var(--footer-bg);
  color: var(--footer-text);
  position: relative;
}

.ed-footer::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 1px;
  background: linear-gradient(90deg,
    transparent 0%,
    var(--footer-border) 20%,
    var(--footer-border) 80%,
    transparent 100%
  );
}

.ed-footer__container {
  max-width: 1400px;
  margin: 0 auto;
  padding: 0 clamp(24px, 5vw, 64px);
}

/* ========================================
   Main Section
   ======================================== */
.ed-footer__main {
  padding: clamp(64px, 8vw, 100px) 0 clamp(48px, 6vw, 72px);
}

.ed-footer__grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: clamp(48px, 6vw, 80px);
}

@media (min-width: 1024px) {
  .ed-footer__grid {
    grid-template-columns: 340px 1fr;
    gap: clamp(80px, 10vw, 140px);
  }
}

/* ========================================
   Brand Section
   ======================================== */
.ed-footer__brand {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
}

.ed-footer__logo {
  display: block;
  margin-bottom: 20px;
  transition: opacity 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}

.ed-footer__logo:hover {
  opacity: 0.6;
}

.ed-footer__logo img {
  height: clamp(40px, 4.5vw, 52px);
  width: auto;
  aspect-ratio: 2183 / 454;
}

.ed-footer__site-name {
  font-family: var(--font-display);
  font-size: clamp(1.5rem, 3vw, 2rem);
  font-weight: 500;
  font-style: italic;
  color: var(--footer-text);
  letter-spacing: -0.02em;
}

.ed-footer__tagline {
  margin: 0 0 28px;
  font-family: var(--font-body);
  font-size: 13px;
  font-weight: 400;
  color: var(--footer-text-muted);
  letter-spacing: 0.15em;
}

/* CTA Button - Refined */
.ed-footer__cta {
  display: inline-flex;
  align-items: center;
  gap: 14px;
  padding: 16px 28px;
  background: var(--footer-accent);
  color: #fff;
  font-family: var(--font-body);
  font-size: 13px;
  font-weight: 500;
  letter-spacing: 0.08em;
  text-decoration: none;
  position: relative;
  overflow: hidden;
  transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}

.ed-footer__cta::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: var(--footer-hover);
  transform: translateX(-101%);
  transition: transform 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}

.ed-footer__cta:hover::before {
  transform: translateX(0);
}

.ed-footer__cta span,
.ed-footer__cta svg {
  position: relative;
  z-index: 1;
}

.ed-footer__cta svg {
  width: 16px;
  height: 16px;
  transition: transform 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}

.ed-footer__cta:hover svg {
  transform: translateX(4px);
}

/* Contact Info */
.ed-footer__contact {
  display: flex;
  flex-direction: column;
  gap: 12px;
  margin-top: 32px;
  padding-top: 28px;
  border-top: 1px solid var(--footer-border-light);
}

.ed-footer__address {
  font-family: var(--font-body);
  font-style: normal;
  font-size: 13px;
  color: var(--footer-text-muted);
  line-height: 1.9;
  letter-spacing: 0.02em;
}

.ed-footer__tel {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-family: var(--font-body);
  font-size: 15px;
  font-weight: 500;
  color: var(--footer-text);
  text-decoration: none;
  letter-spacing: 0.03em;
  transition: color 0.3s ease;
}

.ed-footer__tel svg {
  width: 16px;
  height: 16px;
  color: var(--footer-accent-warm);
  flex-shrink: 0;
}

.ed-footer__tel:hover {
  color: var(--footer-accent-warm);
}

/* ========================================
   Navigation - 3 Columns
   ======================================== */
.ed-footer__nav {
  display: grid;
  grid-template-columns: 1fr;
  gap: clamp(36px, 4vw, 48px);
}

@media (min-width: 640px) {
  .ed-footer__nav {
    grid-template-columns: repeat(3, 1fr);
    gap: clamp(32px, 4vw, 56px);
  }
}

.ed-footer__nav-col {
  min-width: 0;
}

/* Column Header - Bilingual */
.ed-footer__nav-header {
  margin-bottom: clamp(20px, 2.5vw, 28px);
  padding-bottom: clamp(16px, 2vw, 20px);
  border-bottom: 1px solid var(--footer-border);
  position: relative;
}

.ed-footer__nav-header::after {
  content: '';
  position: absolute;
  bottom: -1px;
  left: 0;
  width: 32px;
  height: 2px;
  background: var(--footer-accent);
}

.ed-footer__nav-title-en {
  display: block;
  font-family: var(--font-display);
  font-size: clamp(1.25rem, 2vw, 1.5rem);
  font-weight: 400;
  font-style: italic;
  color: var(--footer-text);
  letter-spacing: -0.01em;
  line-height: 1.2;
  margin-bottom: 6px;
}

.ed-footer__nav-title-ja {
  display: block;
  font-family: var(--font-body);
  font-size: 11px;
  font-weight: 500;
  color: var(--footer-text-light);
  letter-spacing: 0.2em;
}

/* Navigation List */
.ed-footer__nav-list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 0;
}

.ed-footer__nav-list li {
  margin: 0;
}

.ed-footer__nav-list a {
  display: flex;
  align-items: center;
  padding: 12px 0;
  color: var(--footer-text);
  font-family: var(--font-body);
  font-size: 14px;
  font-weight: 400;
  text-decoration: none;
  letter-spacing: 0.02em;
  position: relative;
  transition: all 0.3s ease;
}

.ed-footer__nav-list a::before {
  content: '';
  position: absolute;
  left: 0;
  bottom: 10px;
  width: 0;
  height: 1px;
  background: var(--footer-accent);
  transition: width 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}

.ed-footer__nav-list a::after {
  content: '';
  display: inline-block;
  width: 0;
  height: 0;
  margin-left: 0;
  border-left: 4px solid currentColor;
  border-top: 3px solid transparent;
  border-bottom: 3px solid transparent;
  opacity: 0;
  transform: translateX(-8px);
  transition: all 0.3s ease;
}

.ed-footer__nav-list a:hover {
  color: var(--footer-accent);
  padding-left: 4px;
}

.ed-footer__nav-list a:hover::before {
  width: calc(100% - 16px);
}

.ed-footer__nav-list a:hover::after {
  opacity: 1;
  margin-left: 8px;
  transform: translateX(0);
}

/* ========================================
   Bottom Section
   ======================================== */
.ed-footer__bottom {
  background: var(--footer-bg-bottom);
  padding: clamp(20px, 3vw, 28px) 0;
  position: relative;
}

.ed-footer__bottom::before {
  content: '';
  position: absolute;
  top: 0;
  left: 50%;
  transform: translateX(-50%);
  width: 90%;
  max-width: 1200px;
  height: 1px;
  background: var(--footer-border-light);
}

.ed-footer__bottom-inner {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 32px;
  flex-wrap: wrap;
}

.ed-footer__copyright {
  margin: 0;
  font-family: var(--font-body);
  font-size: 11px;
  color: var(--footer-text-light);
  letter-spacing: 0.05em;
}

/* Operator Link */
.ed-footer__operator {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  text-decoration: none;
  transition: opacity 0.3s ease;
}

.ed-footer__operator:hover {
  opacity: 0.6;
}

.ed-footer__operator-label {
  font-family: var(--font-body);
  font-size: 10px;
  font-weight: 400;
  color: var(--footer-text-light);
  letter-spacing: 0.1em;
}

.ed-footer__operator-logo {
  height: 14px;
  width: auto;
  opacity: 0.5;
  filter: grayscale(100%);
  transition: all 0.3s ease;
}

.ed-footer__operator:hover .ed-footer__operator-logo {
  opacity: 0.8;
  filter: grayscale(0%);
}

/* ========================================
   Decorative Elements
   ======================================== */
.ed-footer__decoration {
  position: absolute;
  pointer-events: none;
}

/* Subtle grid pattern overlay */
.ed-footer__main::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background-image:
    linear-gradient(to right, var(--footer-border-light) 1px, transparent 1px);
  background-size: 120px 100%;
  opacity: 0.3;
  pointer-events: none;
}

@media (min-width: 1024px) {
  .ed-footer__main {
    position: relative;
  }
}

/* ========================================
   Responsive Adjustments
   ======================================== */
@media (max-width: 639px) {
  .ed-footer__nav-col {
    padding-bottom: 8px;
  }

  .ed-footer__nav-col:not(:last-child) {
    border-bottom: 1px solid var(--footer-border-light);
    margin-bottom: 8px;
  }

  .ed-footer__nav-list a {
    padding: 10px 0;
  }
}

/* ========================================
   Animation on Scroll (optional)
   ======================================== */
@media (prefers-reduced-motion: no-preference) {
  .ed-footer__nav-col {
    opacity: 0;
    transform: translateY(20px);
    animation: footerFadeIn 0.6s ease forwards;
  }

  .ed-footer__nav-col:nth-child(1) { animation-delay: 0.1s; }
  .ed-footer__nav-col:nth-child(2) { animation-delay: 0.2s; }
  .ed-footer__nav-col:nth-child(3) { animation-delay: 0.3s; }

  @keyframes footerFadeIn {
    to {
      opacity: 1;
      transform: translateY(0);
    }
  }
}

}
