/* ============================================================
   ROOT FAN SITE — root-style.css
   Palette: Muted Teal × Sage × Warm Beige  (ref: Clinic Morinosato)
   ============================================================ */

@import url('https://fonts.googleapis.com/css2?family=Sora:wght@300;400;600;700;800&family=Noto+Sans+JP:wght@300;400;700&display=swap');

/* ── Design Tokens ── */
:root {
  /* Primary — くすみティール */
  --teal:        #4a9e8e;
  --teal-dark:   #33756a;
  --teal-mid:    #5fb3a2;
  --teal-pale:   #e0f2ef;
  --teal-faint:  #f0f8f6;

  /* Secondary — セージグリーン */
  --sage:        #7aab8a;
  --sage-pale:   #e8f2eb;

  /* Backgrounds — warm beige */
  --bg:          #f5f2ec;
  --bg-warm:     #ede9e1;
  --white:       #ffffff;
  --cream:       #faf8f4;

  /* Text */
  --ink:         #2a3830;
  --ink-mid:     #4a6058;
  --ink-light:   #8aa89e;
  --border:      #d8e8e4;
  --border-warm: #e0d8cc;

  /* Original card accent colours (from style1–10) */
  --c1:  #ffb74d;   /* 01 What's ROOT  — pastel orange  */
  --c2:  #64c6f5;   /* 02 Information  — sky blue       */
  --c3:  #7edc91;   /* 03 Event        — pastel green   */
  --c4:  #757575;   /* 04 Editions     — gray           */
  --c5:  #ffd54f;   /* 05 YouTube      — pastel yellow  */
  --c6:  #4dd0e1;   /* 06 Blog         — aqua           */
  --c7:  #8b5e3c;   /* 07 Discord      — cafe brown     */
  --c8:  #ba68c8;   /* 08 Play Space   — pastel purple  */
  --c9:  #e57373;   /* 09 Contact      — pastel red     */
  --c10: #b0b0b0;   /* 10 Privacy      — light gray     */

  --font-main: 'Sora', 'Noto Sans JP', sans-serif;
  --font-jp:   'Noto Sans JP', sans-serif;

  --r:    14px;
  --r-lg: 20px;
  --r-xl: 28px;

  --shadow-sm: 0 2px 12px rgba(74,158,142,0.08);
  --shadow:    0 6px 28px rgba(74,158,142,0.12);
  --shadow-lg: 0 20px 60px rgba(74,158,142,0.16);
}

/* ── Reset ── */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; }
body {
  background: var(--bg);
  color: var(--ink);
  font-family: var(--font-main);
  font-weight: 400;
  line-height: 1.7;
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
}
img { display: block; max-width: 100%; }
a { color: inherit; text-decoration: none; }
ul { list-style: none; }

/* Warm subtle dot texture */
body::before {
  content: '';
  position: fixed;
  inset: 0;
  background-image: radial-gradient(circle, rgba(74,158,142,0.06) 1px, transparent 1px);
  background-size: 30px 30px;
  pointer-events: none;
  z-index: 0;
}

/* ============================================================
   HEADER
   ============================================================ */
#site-header {
  position: fixed;
  top: 0; left: 0; right: 0;
  z-index: 800;
  height: 64px;
  background: rgba(245,242,236,0.92);
  backdrop-filter: blur(16px) saturate(1.6);
  -webkit-backdrop-filter: blur(16px) saturate(1.6);
  border-bottom: 1px solid var(--border-warm);
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 2rem;
  box-shadow: 0 1px 16px rgba(74,158,142,0.05);
}

.logo {
  display: flex;
  align-items: center;
  gap: 0.7rem;
  text-decoration: none;
}
.logo__icon {
  width: 36px; height: 36px;
  background: var(--teal);
  border-radius: 10px;
  display: grid;
  place-items: center;
  box-shadow: 0 3px 10px rgba(74,158,142,0.3);
  flex-shrink: 0;
}
.logo__icon img {
  width: 22px; height: 22px;
  filter: brightness(0) invert(1);
}
.logo__text strong {
  display: block;
  font-size: 0.88rem;
  font-weight: 700;
  color: var(--teal-dark);
  line-height: 1.2;
  letter-spacing: -0.01em;
}
.logo__text span {
  display: block;
  font-size: 0.58rem;
  font-weight: 400;
  color: var(--ink-light);
  letter-spacing: 0.14em;
  text-transform: uppercase;
}

/* Hamburger */
.menu-toggle {
  background: none;
  border: none;
  cursor: pointer;
  width: 40px; height: 40px;
  border-radius: var(--r);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 5px;
  transition: background .2s;
}
.menu-toggle:hover { background: var(--teal-pale); }
.menu-toggle__bar {
  display: block;
  height: 2px;
  background: var(--ink);
  border-radius: 2px;
  transition: transform .35s cubic-bezier(.77,0,.18,1),
              opacity .25s, width .3s, background .25s;
  transform-origin: center;
}
.menu-toggle__bar:nth-child(1) { width: 22px; }
.menu-toggle__bar:nth-child(2) { width: 16px; }
.menu-toggle__bar:nth-child(3) { width: 22px; }
.menu-toggle.is-open .menu-toggle__bar     { background: var(--white); width: 22px; }
.menu-toggle.is-open .menu-toggle__bar:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.menu-toggle.is-open .menu-toggle__bar:nth-child(2) { opacity: 0; }
.menu-toggle.is-open .menu-toggle__bar:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

/* ============================================================
   NAV OVERLAY
   ============================================================ */
#nav-overlay {
  position: fixed;
  inset: 0;
  z-index: 790;
  background: var(--teal-dark);
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  pointer-events: none;
  clip-path: circle(0% at calc(100% - 3rem) 32px);
  transition: clip-path .65s cubic-bezier(.77,0,.18,1), opacity .05s;
}
#nav-overlay.is-open {
  opacity: 1;
  pointer-events: all;
  clip-path: circle(170% at calc(100% - 3rem) 32px);
}
#nav-overlay::before {
  content: 'ROOT';
  position: absolute;
  font-family: 'Sora', sans-serif;
  font-weight: 800;
  font-size: clamp(8rem, 25vw, 20rem);
  color: transparent;
  -webkit-text-stroke: 2px rgba(255,255,255,0.06);
  letter-spacing: -0.05em;
  pointer-events: none;
  user-select: none;
}

.nav-overlay__list {
  position: relative;
  z-index: 1;
  list-style: none;
  text-align: center;
}
.nav-overlay__list li { overflow: hidden; }
.nav-overlay__list li + li { margin-top: 0.05rem; }
.nav-overlay__list a {
  display: inline-flex;
  align-items: center;
  gap: 0.8rem;
  font-family: 'Sora', sans-serif;
  font-weight: 700;
  font-size: clamp(1.5rem, 4.5vw, 2.8rem);
  color: rgba(255,255,255,0.8);
  letter-spacing: -0.02em;
  line-height: 1.25;
  transform: translateY(40px);
  opacity: 0;
  transition: transform .55s cubic-bezier(.16,1,.3,1) calc(var(--i,0)*35ms),
              opacity .4s ease calc(var(--i,0)*35ms),
              color .2s;
}
#nav-overlay.is-open .nav-overlay__list a { transform: translateY(0); opacity: 1; }
.nav-overlay__list a:hover { color: var(--white); }
.nav-overlay__list a:hover .nav-dot { background: rgba(255,255,255,0.9); }
.nav-dot {
  width: 6px; height: 6px;
  border-radius: 50%;
  background: rgba(255,255,255,0.3);
  flex-shrink: 0;
  transition: background .2s;
}
.nav-jp {
  font-family: var(--font-jp);
  font-weight: 300;
  font-size: 0.32em;
  letter-spacing: 0.2em;
  color: rgba(255,255,255,0.4);
  vertical-align: middle;
}

/* ============================================================
   HERO
   ============================================================ */
#hero {
  min-height: 100svh;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 80px 2rem 5rem;
  position: relative;
  overflow: hidden;
  background: var(--cream);
}

/* Warm blob shapes */
#hero::before {
  content: '';
  position: absolute;
  top: -10%; right: -8%;
  width: 55vw; height: 55vw;
  max-width: 700px; max-height: 700px;
  background: radial-gradient(circle, var(--teal-faint) 0%, rgba(224,242,239,0) 70%);
  border-radius: 50%;
  pointer-events: none;
}
#hero::after {
  content: '';
  position: absolute;
  bottom: -5%; left: -8%;
  width: 40vw; height: 40vw;
  max-width: 500px; max-height: 500px;
  background: radial-gradient(circle, rgba(122,171,138,0.1) 0%, transparent 70%);
  border-radius: 50%;
  pointer-events: none;
}

.hero__inner {
  position: relative;
  z-index: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  gap: 1.6rem;
  max-width: 900px;
}

.hero__eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  background: var(--teal-pale);
  color: var(--teal);
  font-size: 0.7rem;
  font-weight: 600;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  padding: 0.45em 1.2em;
  border-radius: 100px;
  border: 1.5px solid rgba(74,158,142,0.22);
  animation: fadeDown .6s ease both;
}
.hero__eyebrow-dot {
  width: 6px; height: 6px;
  border-radius: 50%;
  background: var(--teal);
}

.hero__headline {
  font-family: 'Sora', sans-serif;
  font-weight: 800;
  line-height: 1;
  letter-spacing: -0.04em;
  color: var(--ink);
  animation: fadeUp .7s .08s ease both;
}
.hero__headline .word-root {
  display: block;
  font-size: clamp(5rem, 17vw, 11rem);
  color: var(--teal);
  text-shadow: 4px 4px 0 rgba(74,158,142,0.1);
}
.hero__headline .word-dake {
  display: block;
  font-size: clamp(1.6rem, 5vw, 3.5rem);
  color: var(--ink-mid);
  font-weight: 700;
  letter-spacing: 0.05em;
  margin-top: 0.2em;
  font-family: var(--font-jp);
}

.hero__copy {
  font-family: var(--font-jp);
  font-weight: 300;
  font-size: clamp(0.85rem, 2vw, 1rem);
  color: var(--ink-light);
  letter-spacing: 0.1em;
  animation: fadeUp .75s .16s ease both;
}

.hero__banner {
  width: min(680px, 92vw);
  border-radius: var(--r-xl);
  overflow: hidden;
  box-shadow: var(--shadow-lg), 0 0 0 3px var(--teal-pale);
  transition: transform .5s cubic-bezier(.16,1,.3,1), box-shadow .5s;
  animation: fadeUp .85s .22s ease both;
}
.hero__banner:hover {
  transform: translateY(-8px);
  box-shadow: 0 28px 72px rgba(74,158,142,0.22), 0 0 0 3px var(--teal);
}
.hero__banner img { width: 100%; display: block; }

.hero__scroll {
  position: absolute;
  bottom: 2.2rem; left: 50%;
  transform: translateX(-50%);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
  animation: fadeUp 1s .5s ease both;
}
.hero__scroll span {
  font-size: 0.6rem;
  font-weight: 600;
  letter-spacing: 0.3em;
  text-transform: uppercase;
  color: var(--teal);
  opacity: 0.6;
}
.hero__scroll-line {
  width: 1px; height: 40px;
  background: linear-gradient(to bottom, var(--teal), transparent);
  animation: scrollDrop 2s ease-in-out infinite;
}

/* ============================================================
   SECTION COMMON
   ============================================================ */
.section-wrap {
  padding: 5rem 2rem;
  position: relative;
  z-index: 1;
}
.section-inner {
  max-width: 1200px;
  margin: 0 auto;
}

.section-head {
  display: flex;
  align-items: center;
  gap: 1rem;
  margin-bottom: 2.5rem;
}
.section-head__en {
  font-family: 'Sora', sans-serif;
  font-weight: 800;
  font-size: clamp(1.6rem, 4vw, 2.2rem);
  color: var(--teal);
  letter-spacing: -0.03em;
  white-space: nowrap;
}
.section-head__line {
  flex: 1;
  height: 1.5px;
  background: var(--border);
  border-radius: 2px;
}
.section-head__jp {
  font-family: var(--font-jp);
  font-size: 0.8rem;
  font-weight: 400;
  color: var(--ink-light);
  white-space: nowrap;
}

/* ============================================================
   GRID NAV
   ============================================================ */
.grid-nav {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  grid-auto-rows: 200px;
  gap: 12px;
}

.grid-card {
  position: relative;
  overflow: hidden;
  border-radius: var(--r-lg);
  display: block;
  background: var(--white);
  text-decoration: none;
  box-shadow:
    0 4px 16px rgba(42,56,48,0.14),
    0 1px 4px rgba(42,56,48,0.08),
    0 0 0 1.5px var(--card-color, var(--border));
  border: none;
  transition: transform .4s cubic-bezier(.16,1,.3,1),
              box-shadow .4s;
}

.grid-card:hover {
  transform: translateY(-6px);
  box-shadow:
    0 16px 48px rgba(42,56,48,0.22),
    0 4px 12px rgba(42,56,48,0.12),
    0 0 0 2px var(--card-color, var(--teal));
  z-index: 2;
}

/* Photo fills card */
.grid-card__img {
  position: absolute;
  inset: 0;
  width: 100%; height: 100%;
  object-fit: cover;
  object-position: center bottom;
  transition: transform .6s cubic-bezier(.16,1,.3,1), filter .5s;
  filter: saturate(0.8) brightness(0.92);
}
.grid-card:hover .grid-card__img {
  transform: scale(1.06);
  filter: saturate(0.95) brightness(1);
}

/* Gradient overlay — 削除 */
.grid-card::after { display: none; }

/* ── Coloured accent strip ── */
.grid-card::before {
  content: '';
  position: absolute;
  inset: 0;
  z-index: 2;
  pointer-events: none;
  border-radius: calc(var(--r-lg) - 1.5px);
  background: linear-gradient(to bottom,
    var(--card-color, transparent) 0px,
    var(--card-color, transparent) 4px,
    transparent 4px
  );
  opacity: 0.85;
}

/* Each card's colour variable */
.grid-card:nth-child(1)  { --card-color: var(--c1); }
.grid-card:nth-child(2)  { --card-color: var(--c2); }
.grid-card:nth-child(3)  { --card-color: var(--c3); }
.grid-card:nth-child(4)  { --card-color: var(--c4); }
.grid-card:nth-child(5)  { --card-color: var(--c5); }
.grid-card:nth-child(6)  { --card-color: var(--c6); }
.grid-card:nth-child(7)  { --card-color: var(--c7); }
.grid-card:nth-child(8)  { --card-color: var(--c8); }
.grid-card:nth-child(9)  { --card-color: var(--c9); }
.grid-card:nth-child(10) { --card-color: var(--c10); }

/* Coloured number badge */
.grid-card__tag {
  position: absolute;
  top: 14px; left: 14px;
  z-index: 4;
  font-family: 'Sora', sans-serif;
  font-size: 0.6rem;
  font-weight: 700;
  padding: 3px 9px;
  border-radius: 100px;
  letter-spacing: 0.08em;
  background: var(--card-color, var(--teal-pale));
  color: var(--white);
  box-shadow: 0 2px 6px rgba(0,0,0,0.18);
}
.grid-card:nth-child(4)  .grid-card__tag,
.grid-card:nth-child(5)  .grid-card__tag,
.grid-card:nth-child(10) .grid-card__tag { color: var(--ink); }

/* Card body */
.grid-card__body {
  position: absolute;
  bottom: 0; left: 0; right: 0;
  padding: 1.1rem 1.3rem;
  z-index: 3;
}

/* ── タイトル文字色：各カードのテーマカラーを適用 ── */
.grid-card__body h2 {
  font-family: 'Sora', sans-serif;
  font-weight: 700;
  font-size: clamp(0.85rem, 1.8vw, 1.05rem);
  color: var(--card-color, var(--white));
  text-shadow: 0 1px 6px rgba(0,0,0,0.18);
  letter-spacing: -0.01em;
  margin-bottom: 0.2rem;
  line-height: 1.3;
}

/* 04(gray) と 10(light gray) — 背景が明るいので暗い色で */
.grid-card:nth-child(4)  .grid-card__body h2,
.grid-card:nth-child(10) .grid-card__body h2 {
  color: #4a5550;
  text-shadow: none;
}
.grid-card:nth-child(4)  .grid-card__body p,
.grid-card:nth-child(10) .grid-card__body p {
  color: #7a8e88;
  text-shadow: none;
}

/* サブテキスト — 常時表示、テーマカラーの淡いバージョン */
.grid-card__body p {
  font-family: var(--font-jp);
  font-size: 0.68rem;
  font-weight: 400;
  color: var(--card-color, rgba(255,255,255,0.75));
  opacity: 0.65;
  text-shadow: 0 1px 4px rgba(0,0,0,0.15);
  transform: none;
  transition: opacity .3s;
}
.grid-card:hover .grid-card__body p { opacity: 0.9; }

/* 02(水色) 03(緑) 05(黄) 06(アクア) 04(グレー) 10(ライトグレー) — 明るい色を暗めに */
.grid-card:nth-child(1)  .grid-card__body h2 { color: #8a4a00; text-shadow: none; }
.grid-card:nth-child(1)  .grid-card__body p  { color: #b06820; text-shadow: none; opacity: 1; }
.grid-card:nth-child(2)  .grid-card__body h2 { color: #1a6a8a; text-shadow: none; }
.grid-card:nth-child(2)  .grid-card__body p  { color: #3a8aaa; text-shadow: none; opacity: 1; }
.grid-card:nth-child(3)  .grid-card__body h2 { color: #2a7040; text-shadow: none; }
.grid-card:nth-child(3)  .grid-card__body p  { color: #4a9060; text-shadow: none; opacity: 1; }
.grid-card:nth-child(4)  .grid-card__body h2 { color: #4a5550; text-shadow: none; }
.grid-card:nth-child(4)  .grid-card__body p  { color: #7a8e88; text-shadow: none; opacity: 1; }
.grid-card:nth-child(5)  .grid-card__body h2 { color: #7a6000; text-shadow: none; }
.grid-card:nth-child(5)  .grid-card__body p  { color: #9a8020; text-shadow: none; opacity: 1; }
.grid-card:nth-child(6)  .grid-card__body h2 { color: #006a78; text-shadow: none; }
.grid-card:nth-child(6)  .grid-card__body p  { color: #208a98; text-shadow: none; opacity: 1; }
.grid-card:nth-child(9)  .grid-card__body h2 { color: #8a2020; text-shadow: none; }
.grid-card:nth-child(9)  .grid-card__body p  { color: #aa4040; text-shadow: none; opacity: 1; }
.grid-card:nth-child(10) .grid-card__body h2 { color: #4a5550; text-shadow: none; }
.grid-card:nth-child(10) .grid-card__body p  { color: #7a8e88; text-shadow: none; opacity: 1; }

/* Arrow */
.grid-card__arrow {
  position: absolute;
  bottom: 14px; right: 14px;
  z-index: 4;
  width: 28px; height: 28px;
  border-radius: 50%;
  background: rgba(255,255,255,0.15);
  border: 1px solid rgba(255,255,255,0.3);
  display: grid;
  place-items: center;
  opacity: 0;
  transform: scale(0.5);
  transition: opacity .3s, transform .35s cubic-bezier(.16,1,.3,1);
}
.grid-card:hover .grid-card__arrow { opacity: 1; transform: scale(1); }
.grid-card__arrow svg {
  width: 12px; height: 12px;
  stroke: var(--white);
  fill: none;
  stroke-width: 2.5;
  stroke-linecap: round;
  stroke-linejoin: round;
}

/* ============================================================
   FOOTER
   ============================================================ */
#site-footer {
  background: var(--teal-dark);
  padding: 3rem 2rem;
  position: relative;
  z-index: 1;
  overflow: hidden;
}
#site-footer::before {
  content: 'ROOT';
  position: absolute;
  right: -0.05em; bottom: -0.25em;
  font-family: 'Sora', sans-serif;
  font-weight: 800;
  font-size: clamp(6rem, 18vw, 14rem);
  color: transparent;
  -webkit-text-stroke: 2px rgba(255,255,255,0.07);
  letter-spacing: -0.05em;
  pointer-events: none;
  user-select: none;
  line-height: 1;
}
.footer__inner {
  position: relative;
  z-index: 1;
  max-width: 1200px;
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 1rem;
}
.footer__logo {
  font-family: 'Sora', sans-serif;
  font-weight: 800;
  font-size: 1rem;
  color: var(--white);
  letter-spacing: -0.02em;
}
.footer__logo span {
  display: block;
  font-family: var(--font-jp);
  font-weight: 300;
  font-size: 0.65rem;
  letter-spacing: 0.15em;
  color: rgba(255,255,255,0.45);
  margin-top: 3px;
}
.footer__copy {
  font-size: 0.68rem;
  letter-spacing: 0.08em;
  color: rgba(255,255,255,0.4);
}

/* ============================================================
   ANIMATIONS
   ============================================================ */
@keyframes fadeUp   { from { opacity:0; transform:translateY(20px); } to { opacity:1; transform:translateY(0); } }
@keyframes fadeDown { from { opacity:0; transform:translateY(-14px); } to { opacity:1; transform:translateY(0); } }
@keyframes scrollDrop {
  0%,100% { transform:scaleY(1); opacity:.8; }
  60%     { transform:scaleY(0.3); opacity:.2; }
}

/* Scroll reveal */
[data-reveal] {
  opacity: 0;
  transform: translateY(22px);
  transition: opacity .7s cubic-bezier(.16,1,.3,1),
              transform .7s cubic-bezier(.16,1,.3,1);
}
[data-reveal].is-visible { opacity:1; transform:translateY(0); }
[data-reveal-delay="1"] { transition-delay:.06s; }
[data-reveal-delay="2"] { transition-delay:.12s; }
[data-reveal-delay="3"] { transition-delay:.18s; }
[data-reveal-delay="4"] { transition-delay:.24s; }

/* ============================================================
   UTILITY
   ============================================================ */
.visually-hidden {
  position:absolute; width:1px; height:1px;
  clip:rect(0,0,0,0); overflow:hidden; white-space:nowrap;
}

/* ============================================================
   RESPONSIVE
   ============================================================ */
@media (max-width: 1024px) {
  .grid-nav {
    grid-template-columns: repeat(3, 1fr);
    grid-auto-rows: 180px;
  }
}

@media (max-width: 640px) {
  #site-header { padding: 0 1.2rem; }
  .section-wrap { padding: 3.5rem 1.2rem; }
  .grid-nav {
    grid-template-columns: repeat(2, 1fr);
    grid-auto-rows: 150px;
    gap: 8px;
  }
}

@media (max-width: 380px) {
  .grid-nav {
    grid-template-columns: 1fr;
    grid-auto-rows: 150px;
  }
}


.hero__scroll {
    position: absolute;
    bottom: 2.2rem;
    left: 0;
    right: 0;
    width: max-content;
    margin: 0 auto;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 6px;
    animation: fadeUp 1s .5s ease both;
}

    .hero__scroll span {
        font-size: 0.6rem;
        font-weight: 600;
        letter-spacing: 0.3em;
        text-indent: 0.3em;
        text-transform: uppercase;
        color: var(--teal);
        opacity: 0.6;
    }
