/* =========================================================
   Youngna Ueno Park — custom.css
   Base palette: paper beige + sumi ink + adult forest green
   ========================================================= */

:root {
  --c-paper: #fdfaee;
  --c-paper-deep: #ede7d5;
  --c-sumi: #1a1a1a;
  --c-sumi-soft: #3a3a3a;
  --c-forest: #3d5a40;
  --c-forest-deep: #2a3f2d;
  --c-forest-light: #7a9a7a;
  --c-shu: #b94a3d;
}

html { scroll-behavior: smooth; }

body {
  background: var(--c-paper);
  letter-spacing: 0.01em;
}

/* Subtle washi paper grain — applied to body via pseudo */
body::before {
  content: "";
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 1;
  opacity: 0.04;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='200' height='200'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.85' numOctaves='2'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
  mix-blend-mode: multiply;
}

/* =========================================================
   NAV
   ========================================================= */
#nav { mix-blend-mode: normal; }

#nav.scrolled {
  background: rgba(253, 250, 238, 0.78);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  box-shadow: 0 1px 0 rgba(26, 26, 26, 0.06);
}

.nav-link {
  position: relative;
  color: var(--c-sumi);
  transition: color 0.4s ease;
}
.nav-link::after {
  content: "";
  position: absolute;
  left: 0; bottom: -4px;
  width: 0; height: 1px;
  background: var(--c-forest);
  transition: width 0.4s ease;
}
.nav-link:hover { color: var(--c-forest); }
.nav-link:hover::after { width: 100%; }

#lang-toggle:hover #lang-current,
#lang-toggle:hover #lang-other {
  opacity: 1;
}

/* =========================================================
   HERO
   ========================================================= */
#hero {
  min-height: 100svh;
  background: radial-gradient(ellipse at center, #63844b 0%, #5b7642 55%, #4f6939 100%);
}
#hero-img {
  filter: drop-shadow(0 30px 60px rgba(0, 0, 0, 0.25));
}

/* =========================================================
   PIECES — Kinfolk 風 縦長カード（静謐 & 余白）
   ========================================================= */
.piece-card a {
  text-decoration: none;
  color: inherit;
}

.piece-img-wrap {
  position: relative;
  aspect-ratio: 3 / 4;
  overflow: hidden;
  background: var(--c-paper-deep);
}

.piece-img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 1.2s cubic-bezier(0.22, 1, 0.36, 1),
              filter 1.2s ease;
  will-change: transform;
}

.piece-card:hover .piece-img,
.piece-card a:focus-visible .piece-img {
  transform: scale(1.03);
  filter: brightness(0.95);
}

.piece-title {
  margin-top: 1.75rem;
  text-align: center;
  font-size: 1.375rem;
  line-height: 1.4;
  font-weight: 300;
  letter-spacing: 0.08em;
  color: var(--c-sumi);
  min-height: 2.6em;
  display: flex;
  align-items: center;
  justify-content: center;
}
@media (min-width: 768px) {
  .piece-title {
    font-size: 1.5rem;
    margin-top: 2rem;
  }
}

.piece-caption {
  margin-top: 0.875rem;
  text-align: center;
  font-size: 0.8125rem;
  letter-spacing: 0.02em;
  color: var(--c-sumi-soft);
  font-weight: 300;
}

.piece-more {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  margin-top: 1.25rem;
  width: 100%;
  font-size: 0.6875rem;
  letter-spacing: 0.25em;
  text-transform: uppercase;
  color: var(--c-forest);
  transition: color 0.4s ease, gap 0.4s ease;
}

.piece-card a:hover .piece-more,
.piece-card a:focus-visible .piece-more {
  color: var(--c-forest-deep);
  gap: 0.875rem;
}

.piece-card a:hover .piece-more span,
.piece-card a:focus-visible .piece-more span {
  text-decoration: underline;
  text-underline-offset: 4px;
  text-decoration-thickness: 1px;
}

/* =========================================================
   ACTIVITY CARDS
   ========================================================= */
.activity-card {
  position: relative;
  display: block;
  overflow: hidden;
  border: 1px solid rgba(61, 90, 64, 0.25);
  background: var(--c-sumi);
  transition: transform 0.6s cubic-bezier(0.22, 1, 0.36, 1),
              border-color 0.6s ease,
              box-shadow 0.6s ease;
}
.activity-card:hover {
  transform: translateY(-6px);
  border-color: var(--c-forest);
  box-shadow: 0 16px 40px rgba(26, 26, 26, 0.18);
}

.activity-bg {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  opacity: 0.85;
  transition: transform 1.2s ease, opacity 0.6s ease;
}
.activity-card:hover .activity-bg {
  transform: scale(1.06);
  opacity: 0.7;
}

.activity-overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg,
    rgba(26, 26, 26, 0.25) 0%,
    rgba(26, 26, 26, 0.55) 60%,
    rgba(26, 26, 26, 0.85) 100%);
}

.activity-content {
  position: absolute;
  inset: auto 0 0 0;
  padding: 1.75rem 2rem;
  color: var(--c-paper);
}
.activity-content-small {
  padding: 1.25rem 1.5rem;
}

.activity-arrow {
  position: absolute;
  top: 1.5rem;
  right: 1.5rem;
  width: 36px;
  height: 36px;
  border-radius: 50%;
  border: 1px solid rgba(245, 241, 232, 0.5);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: var(--c-paper);
  transition: background 0.4s ease, border-color 0.4s ease, transform 0.4s ease;
}
.activity-card:hover .activity-arrow {
  background: var(--c-forest);
  border-color: var(--c-forest);
  transform: translate(2px, -2px);
}

/* =========================================================
   SUBSTACK CARDS
   ========================================================= */
.substack-card {
  padding: 2rem 1.75rem;
  background: var(--c-paper);
  border: 1px solid rgba(26, 26, 26, 0.08);
  transition: transform 0.5s ease, border-color 0.5s ease, box-shadow 0.5s ease;
}
.substack-card:hover {
  transform: translateY(-4px);
  border-color: rgba(61, 90, 64, 0.4);
  box-shadow: 0 10px 28px rgba(26, 26, 26, 0.06);
}

/* =========================================================
   SNS ICONS
   ========================================================= */
.sns-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 44px;
  height: 44px;
  color: var(--c-sumi);
  border-radius: 50%;
  transition: color 0.4s ease, background 0.4s ease, transform 0.4s ease;
}
.sns-icon:hover {
  color: var(--c-forest);
  background: rgba(61, 90, 64, 0.08);
  transform: translateY(-2px);
}

/* =========================================================
   FORM
   ========================================================= */
#newsletter-form button {
  padding: 0 1rem;
  white-space: nowrap;
}

/* =========================================================
   AOS FALLBACK — show content if AOS is disabled or not yet initialized
   AOS adds .aos-init when it picks up an element; only then we hide it.
   ========================================================= */
[data-aos]:not(.aos-init) {
  opacity: 1 !important;
  transform: none !important;
}

/* =========================================================
   ACCESSIBILITY / MOTION
   ========================================================= */
@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation-duration: 0.001ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.001ms !important;
    scroll-behavior: auto !important;
  }
}

/* =========================================================
   PRINT
   ========================================================= */
@media print {
  #nav, .activity-arrow, .sns-icon, #newsletter-form { display: none; }
  body { background: white; color: black; }
}
