/* ========================================
   folne — ティラミス / マスカルポーネ風
   白・グレー・落ち着いた色、Noto Sans JP ゴシック
   ======================================== */

:root {
  /* ティラミス：マスカルポーネ・コーヒー・ココア */
  --bg: #faf5ed;
  --bg-block: #f5efe3;
  --bg-card: #fdf9f3;
  --border: rgba(74, 55, 40, 0.1);
  --border-strong: rgba(74, 55, 40, 0.16);
  --text: #3d3028;
  --text-muted: #5c4a3a;
  --text-dim: #8a7560;
  --accent: #6b5344;
  --accent-dim: #4a3828;
  --accent-glow: rgba(107, 83, 68, 0.14);
  --tint: rgba(107, 83, 68, 0.05);
  --font: "Zen Kaku Gothic New", "Hiragino Kaku Gothic ProN", "Hiragino Sans", "Yu Gothic UI", "Meiryo UI", Meiryo, sans-serif;
  --container: min(92vw, 1000px);
  --block-pad: clamp(4rem, 12vw, 8rem);
  --header-h: 64px;
  --ease: cubic-bezier(0.22, 1, 0.36, 1);
  --shadow-soft: 0 2px 12px rgba(74, 55, 40, 0.06);
  --shadow-card: 0 4px 20px rgba(74, 55, 40, 0.08);
  --radius: 6px;
}

*,
*::before,
*::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
  font-family: inherit;
}

html {
  scroll-behavior: smooth;
  font-family: var(--font);
}

body {
  font-family: inherit;
  font-size: 16px;
  line-height: 1.75;
  color: var(--text);
  background: var(--bg);
  background-image: radial-gradient(ellipse 120% 60% at 50% 100%, rgba(107, 83, 68, 0.03) 0%, transparent 60%);
  min-height: 100vh;
  overflow-x: hidden;
  font-weight: 400;
}

.shroud {
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 9999;
  background: radial-gradient(ellipse 100% 80% at 50% 0%, var(--tint) 0%, transparent 55%);
  opacity: 1;
}

/* ========== Header — 色なし半透明＋ぼかし ========== */
.header {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  height: var(--header-h);
  z-index: 100;
  background: rgba(255, 255, 255, 0.08);
  -webkit-backdrop-filter: blur(20px);
  backdrop-filter: blur(20px);
  border-bottom: 1px solid rgba(255, 255, 255, 0.12);
}

.header-inner {
  max-width: var(--container);
  margin: 0 auto;
  padding: 0 1.5rem 0 2.5rem;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.logo {
  display: inline-block;
  font-family: var(--font);
  font-size: 1.5rem;
  font-weight: 600;
  letter-spacing: 0.02em;
  color: var(--text);
  text-decoration: none;
  transition: color 0.2s;
  margin-left: 0.5rem;
}

.logo:hover {
  color: var(--accent);
}

.header-scrolled {
  background: rgba(255, 255, 255, 0.12);
  -webkit-backdrop-filter: blur(20px);
  backdrop-filter: blur(20px);
  border-bottom-color: rgba(255, 255, 255, 0.18);
}

.nav {
  display: flex;
  align-items: center;
  gap: 2rem;
}

.nav-item {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.15rem;
  color: var(--text);
  text-decoration: none;
  font-size: 0.95rem;
  font-weight: 500;
  transition: color 0.2s;
  padding: 0.25rem 0;
}

.nav-item:hover {
  color: var(--accent);
}

.nav-item-ja {
  display: block;
  font-size: 0.85rem;
  font-weight: 600;
  letter-spacing: 0.02em;
}

.nav-item-en {
  display: block;
  font-size: 0.65rem;
  font-weight: 500;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--text-muted);
  opacity: 0.9;
}

.nav-item:hover .nav-item-en {
  color: var(--accent);
  opacity: 0.85;
}

.nav-cta {
  color: var(--accent) !important;
}

.nav-cta:hover {
  color: var(--accent-dim) !important;
}

.menu-toggle {
  display: none;
  flex-direction: column;
  gap: 6px;
  background: none;
  border: none;
  cursor: pointer;
  padding: 8px;
  color: var(--text);
}

.menu-toggle span {
  width: 22px;
  height: 1.5px;
  background: currentColor;
  transition: transform 0.3s var(--ease);
}

.menu-toggle-open span:nth-child(1) { transform: translateY(8px) rotate(45deg); }
.menu-toggle-open span:nth-child(2) { opacity: 0; }
.menu-toggle-open span:nth-child(3) { transform: translateY(-8px) rotate(-45deg); }

body.menu-open { overflow: hidden; }

@media (max-width: 768px) {
  .nav.nav-open {
    display: flex;
    position: fixed;
    top: var(--header-h);
    left: 0;
    right: 0;
    bottom: 0;
    flex-direction: column;
    justify-content: center;
    gap: 1.5rem;
    background: var(--bg);
    padding: 2rem;
  }
  .nav.nav-open .nav-item { padding: 0.5rem 0; }
  .nav.nav-open .nav-item-ja { font-size: 1rem; }
  .nav.nav-open .nav-item-en { font-size: 0.7rem; }
}

/* ========== Hero — 背景画像＋若干ぼかし ========== */
.hero {
  position: relative;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  justify-content: center;
  padding: calc(var(--header-h) + 3rem) 1.5rem 4rem;
  text-align: left;
  overflow: hidden;
}

.hero-bg {
  position: absolute;
  inset: 0;
  z-index: 0;
  overflow: hidden;
}

.hero-bg::before {
  content: "";
  position: absolute;
  inset: -2%;
  background: url("../img/image.png") center / cover no-repeat;
  filter: blur(1.5px);
  transform: scale(1.02);
}

.hero-bg::after {
  content: "";
  position: absolute;
  inset: 0;
  z-index: 1;
  background: linear-gradient(
    to left,
    transparent 0%,
    rgba(0, 0, 0, 0.06) 22%,
    rgba(0, 0, 0, 0.2) 50%,
    rgba(0, 0, 0, 0.42) 78%,
    rgba(0, 0, 0, 0.52) 100%
  );
}

.hero .hero-inner {
  position: relative;
  z-index: 2;
}

.hero-inner {
  max-width: var(--container);
  width: 100%;
  margin: 0 auto 0 0;
  padding-left: 0;
  margin-left: clamp(6rem, 20vw, 14rem);
}


/* ----- Hero brand "folne" — ロゴ＋太字・1本線 ----- */
.hero-brand-wrap {
  display: flex;
  align-items: flex-end;
  gap: 1rem;
  margin-bottom: 1.25rem;
}

.hero-brand-text-wrap {
  position: relative;
  display: inline-block;
}

.hero-brand {
  font-family: var(--font);
  font-size: clamp(3rem, 10vw, 5rem);
  font-weight: 900;
  line-height: 1.1;
  color: #f5f2ec;
  letter-spacing: 0.04em;
  display: flex;
  justify-content: flex-start;
  flex-wrap: wrap;
  gap: 0;
}

.hero-brand-char {
  display: inline-block;
  opacity: 0;
  transform: translateY(0.6em) scale(0.96);
  filter: blur(3px);
  animation: heroCharIn 1.4s cubic-bezier(0.16, 1, 0.3, 1) calc(0.18s * var(--i)) forwards;
  text-shadow: 0 1px 4px rgba(0, 0, 0, 0.4), 0 2px 12px rgba(0, 0, 0, 0.2);
}

@keyframes heroCharIn {
  from {
    opacity: 0;
    transform: translateY(0.6em) scale(0.96);
    filter: blur(4px);
  }
  to {
    opacity: 1;
    transform: translateY(0) scale(1);
    filter: blur(0);
  }
}

/* folne 下の1本線（文字とは別） */
.hero-brand-line {
  position: absolute;
  left: 0;
  bottom: -6px;
  width: 100%;
  height: 3px;
  background: linear-gradient(90deg, #c9b8a0, #a89882);
  transform-origin: left;
  opacity: 0;
  box-shadow: 0 0 10px rgba(0, 0, 0, 0.2);
  animation: heroLineIn 1.2s cubic-bezier(0.16, 1, 0.3, 1) 1s forwards;
}

@keyframes heroLineIn {
  from {
    opacity: 0;
    transform: scaleX(0);
  }
  to {
    opacity: 0.92;
    transform: scaleX(1);
  }
}

.hero-lead {
  font-family: var(--font);
  font-size: clamp(1.35rem, 3.5vw, 1.75rem);
  font-weight: 600;
  line-height: 1.5;
  color: #ebe6dd;
  letter-spacing: 0.02em;
  margin-bottom: 0.75rem;
  opacity: 0;
  animation: heroTextIn 1.2s cubic-bezier(0.16, 1, 0.3, 1) 1.5s forwards;
  text-shadow: 0 1px 4px rgba(0, 0, 0, 0.35), 0 2px 8px rgba(0, 0, 0, 0.15);
}

.hero-sub {
  font-size: clamp(1rem, 2vw, 1.1rem);
  line-height: 1.7;
  color: #d4cdc2;
  letter-spacing: 0.02em;
  opacity: 0;
  animation: heroTextIn 1.2s cubic-bezier(0.16, 1, 0.3, 1) 1.85s forwards;
  text-shadow: 0 1px 3px rgba(0, 0, 0, 0.3), 0 2px 6px rgba(0, 0, 0, 0.12);
}

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

.hero-scroll {
  position: absolute;
  bottom: 2rem;
  left: 50%;
  transform: translateX(-50%);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.5rem;
  color: rgba(255, 255, 255, 0.95);
  font-size: 0.8rem;
  font-weight: 700;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  text-shadow: 0 1px 4px rgba(0, 0, 0, 0.5), 0 2px 8px rgba(0, 0, 0, 0.3);
}

.hero-scroll-line {
  width: 3px;
  height: 40px;
  background: linear-gradient(to bottom, rgba(255, 255, 255, 0.95), rgba(255, 255, 255, 0.25));
  border-radius: 2px;
  box-shadow: 0 0 8px rgba(0, 0, 0, 0.25);
  animation: scrollPulse 2s ease-in-out infinite;
}

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

@keyframes scrollPulse {
  0%, 100% { opacity: 0.4; transform: scaleY(0.6); }
  50% { opacity: 1; transform: scaleY(1); }
}

/* ========== Blocks — full width, narrative ========== */
.block {
  padding: var(--block-pad) 1.5rem;
  position: relative;
}

.block + .block {
  border-top: 1px solid rgba(74, 55, 40, 0.06);
}

.block-inner {
  max-width: var(--container);
  margin: 0 auto;
}

.block-title {
  font-family: var(--font);
  font-size: clamp(2rem, 5vw, 2.75rem);
  font-weight: 600;
  letter-spacing: 0.02em;
  color: var(--text);
  margin-bottom: 1.25rem;
  text-align: center;
  position: relative;
  padding-bottom: 0.75rem;
}

.block-title::after {
  content: '';
  position: absolute;
  left: 50%;
  bottom: 0;
  width: 3rem;
  height: 3px;
  background: linear-gradient(90deg, transparent, var(--accent), transparent);
  opacity: 0.6;
  transform: translateX(-50%);
  border-radius: 2px;
}

.block-lead {
  max-width: 800px;
  margin: 0 auto 3rem;
  text-align: center;
  color: var(--text-muted);
  font-size: 1rem;
  line-height: 1.8;
}

.block-lead p {
  margin: 0 0 0.75rem;
}

.block-lead p:last-child {
  margin-bottom: 0;
}


.block-note {
  text-align: center;
  font-size: 0.8rem;
  color: var(--text-dim);
  margin-top: 1rem;
}

.block--dark {
  background: var(--bg-block);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.4), 0 1px 0 rgba(74, 55, 40, 0.04);
}

.block--cta {
  background: var(--bg-block);
  text-align: center;
}

/* ========== About cards ========== */
#about .block-inner {
  max-width: min(94vw, 1200px);
}

.about-cards {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 2rem;
  align-items: stretch;
}

@media (min-width: 960px) {
  .about-cards {
    grid-template-columns: repeat(3, 1fr);
  }
}

.about-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  padding: 2.25rem 2.5rem;
  min-height: 10rem;
  transition: border-color 0.3s, box-shadow 0.3s;
  display: flex;
  flex-direction: column;
  border-radius: var(--radius);
  box-shadow: var(--shadow-soft);
}

.about-card:hover {
  border-color: var(--border-strong);
  box-shadow: var(--shadow-card);
}

.about-card-title {
  font-family: var(--font);
  font-size: 1.35rem;
  font-weight: 600;
  color: var(--text);
  margin-bottom: 0.75rem;
  flex-shrink: 0;
}

.about-card-desc {
  flex: 1;
  display: flex;
  flex-direction: column;
  color: var(--text-muted);
  font-size: 0.95rem;
  line-height: 1.85;
}

.about-card-desc p {
  margin: 0 0 1rem;
}

.about-card-desc p:last-child {
  margin-bottom: 0;
}

/* ========== Server ========== */
.server-list {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 1.5rem;
  align-items: stretch;
}

.server-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  padding: 2rem;
  transition: border-color 0.3s, box-shadow 0.3s;
  display: flex;
  flex-direction: column;
  border-radius: var(--radius);
  box-shadow: var(--shadow-soft);
}

.server-card .btn-outline,
.server-card .btn-outline--disabled {
  margin-top: auto;
  align-self: flex-end;
}

.server-card:hover {
  border-color: var(--border-strong);
  box-shadow: var(--shadow-card);
}

.server-card--muted {
  opacity: 0.85;
}

.server-card-title {
  font-family: var(--font);
  font-size: 1.25rem;
  font-weight: 600;
  color: var(--text);
  margin-bottom: 0.5rem;
}

.server-card-badge {
  display: inline-block;
  font-size: 0.7rem;
  font-weight: 500;
  color: var(--accent);
  margin-bottom: 1rem;
}

.server-card-desc {
  color: var(--text-muted);
  font-size: 0.95rem;
  line-height: 1.65;
  margin-bottom: 1rem;
}

.server-card-meta {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 1rem;
  margin-bottom: 1.25rem;
  font-size: 0.85rem;
  color: var(--text-dim);
}

.server-card-meta code {
  font-family: ui-monospace, monospace;
  padding: 0.2rem 0.5rem;
  background: var(--bg-block);
  color: var(--accent);
  border: 1px solid var(--border);
  border-radius: 4px;
}

.btn-outline {
  display: inline-block;
  font-size: 0.9rem;
  color: var(--accent);
  text-decoration: none;
  border: 1px solid var(--accent);
  padding: 0.5rem 1rem;
  transition: background 0.2s, color 0.2s, box-shadow 0.2s;
  border-radius: 4px;
}

.btn-outline:hover {
  background: var(--accent-glow);
  color: var(--text);
  box-shadow: 0 2px 8px var(--accent-glow);
}

.btn-outline--disabled {
  pointer-events: none;
  cursor: default;
  opacity: 0.75;
}

/* ========== Plugins ========== */
.plugin-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
  gap: 1.25rem;
}

.plugin-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  padding: 1.5rem;
  transition: border-color 0.3s, box-shadow 0.3s;
  border-radius: var(--radius);
  box-shadow: var(--shadow-soft);
}

.plugin-card:hover {
  border-color: var(--border-strong);
  box-shadow: var(--shadow-card);
}

.plugin-card-title {
  font-family: var(--font);
  font-size: 1.1rem;
  font-weight: 600;
  color: var(--text);
  margin-bottom: 0.25rem;
}

.plugin-card-ver {
  font-size: 0.75rem;
  color: var(--text-dim);
  margin-bottom: 0.75rem;
  display: block;
}

.plugin-card-desc {
  color: var(--text-muted);
  font-size: 0.9rem;
  line-height: 1.6;
  margin-bottom: 1rem;
}

.plugin-card-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 0.35rem;
  list-style: none;
}

.plugin-card-tags li {
  font-size: 0.7rem;
  padding: 0.2rem 0.5rem;
  background: var(--accent-glow);
  color: var(--accent);
  border-radius: 4px;
}

.plugin-card-link {
  display: inline-block;
  margin-top: 1rem;
  font-size: 0.85rem;
  font-weight: 500;
  color: var(--accent);
  text-decoration: none;
  transition: color 0.2s;
}

.plugin-card-link:hover {
  color: var(--text);
}

/* ========== Community ========== */
.community-list {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 1.5rem;
}

.community-item {
  padding: 1.5rem;
  background: var(--bg-card);
  border: 1px solid var(--border);
  transition: border-color 0.3s, box-shadow 0.3s;
  border-radius: var(--radius);
  box-shadow: var(--shadow-soft);
}

.community-item:hover {
  border-color: var(--border-strong);
  box-shadow: var(--shadow-card);
}

.community-item h4 {
  font-family: var(--font);
  font-size: 1.1rem;
  font-weight: 600;
  color: var(--text);
  margin-bottom: 0.5rem;
}

.community-item p {
  color: var(--text-muted);
  font-size: 0.9rem;
  line-height: 1.6;
}

/* ========== CTA ========== */
.btn-cta {
  display: inline-block;
  font-size: 1rem;
  font-weight: 500;
  color: #fff;
  background: var(--accent);
  text-decoration: none;
  padding: 1rem 2rem;
  border-radius: 2px;
  transition: background 0.2s, color 0.2s, box-shadow 0.2s;
}

.btn-cta:hover {
  background: var(--accent-dim);
  box-shadow: 0 0 24px var(--accent-glow);
}

/* ========== Footer ========== */
/* ========== 各種リンク ========== */
.links-list {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 1rem;
}

.link-card {
  display: inline-block;
  padding: 0.75rem 1.5rem;
  background: var(--bg-card);
  border: 1px solid var(--border);
  color: var(--text-muted);
  text-decoration: none;
  font-size: 0.95rem;
  font-weight: 500;
  transition: border-color 0.2s, color 0.2s, background 0.2s, box-shadow 0.2s;
  border-radius: 4px;
  box-shadow: var(--shadow-soft);
}

.link-card:hover {
  border-color: var(--accent);
  color: var(--accent);
  background: var(--accent-glow);
  box-shadow: var(--shadow-card);
}

.link-card--soon {
  pointer-events: none;
  cursor: default;
  color: var(--text-dim);
  opacity: 0.85;
}

.link-card--soon em {
  font-style: normal;
  font-size: 0.85em;
  margin-left: 0.35em;
  color: var(--text-dim);
}

/* ========== Footer ========== */
.footer {
  padding: 3rem 1.5rem;
  border-top: 1px solid var(--border);
  background: var(--bg);
  box-shadow: 0 -2px 20px rgba(74, 55, 40, 0.04);
}

.footer-inner {
  max-width: var(--container);
  margin: 0 auto;
  text-align: center;
}

.footer-logo {
  font-family: var(--font);
  font-size: 1.25rem;
  font-weight: 600;
  color: var(--text);
  text-decoration: none;
  display: inline-block;
  margin-bottom: 0.25rem;
}

.footer-logo:hover {
  color: var(--accent);
}

.footer-tagline {
  font-size: 0.85rem;
  color: var(--text-muted);
  margin-bottom: 1.5rem;
}

.footer-nav {
  display: flex;
  justify-content: center;
  gap: 1.5rem;
  margin-bottom: 1.5rem;
}

.footer-nav a {
  color: var(--text-muted);
  text-decoration: none;
  font-size: 0.9rem;
}

.footer-nav a:hover {
  color: var(--accent);
}

.footer-copy {
  font-size: 0.75rem;
  color: var(--text-dim);
}

/* ========== Scroll-in animation ========== */
.block-title,
.block-lead,
.about-card,
.server-card,
.plugin-card,
.community-item,
.link-card,
.block--cta .btn-cta {
  opacity: 0;
  transform: translateY(24px);
  transition: opacity 0.6s var(--ease), transform 0.6s var(--ease);
}

.block-title.visible,
.block-lead.visible,
.about-card.visible,
.server-card.visible,
.plugin-card.visible,
.community-item.visible,
.link-card.visible,
.block--cta .btn-cta.visible {
  opacity: 1;
  transform: translateY(0);
}

.plugin-card.visible { transition-delay: calc(0.04s * var(--i, 0)); }

@media (max-width: 768px) {
  .nav { display: none; }
  .menu-toggle { display: flex; }
}
