/* ============================================================
   NuiDiary Landing Page — "Tabi no Nikki" Redesign
   Japanese journal aesthetic + modern SaaS structure
   ============================================================ */

/* 1. RESET & CUSTOM PROPERTIES
   ------------------------------------------------------------ */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

:root {
  --bg:          #fffaf5;
  --bg-soft:     #fff5ed;
  --paper:       #fffdf8;
  --paper-warm:  #fef9f2;
  --paper-cool:  #f8f5f0;

  --pink:        #ffb5b5;
  --pink-soft:   #ffe5e5;
  --pink-strong: #e8928e;
  --lavender:    #d4c5f0;
  --lavender-soft: #ede5fa;
  --mint:        #b5e0d0;
  --mint-soft:   #dff3ec;
  --peach:       #ffdab5;
  --peach-soft:  #fff0e0;
  --gold:        #c4993d;
  --gold-soft:   #f5e6c0;

  --text:        #3a2c20;
  --text-sec:    #6d5742;
  --text-muted:  #9f856a;
  --ink:         #2a1f16;
  --ink-card:    #342517;

  --font-ui:    "Zen Maru Gothic", "Hiragino Sans", "Noto Sans JP", sans-serif;
  --font-diary: "Kosugi Maru", "Zen Maru Gothic", sans-serif;
  --font-mono:  "IBM Plex Mono", "SF Mono", monospace;

  --section-gap: clamp(100px, 14vh, 180px);
  --page-pad:    clamp(20px, 4vw, 48px);
  --max-w:       1200px;
  --max-w-narrow: 720px;
  --max-w-wide:  1400px;

  --radius-s:  8px;
  --radius-m:  16px;
  --radius-l:  24px;
  --radius-xl: 32px;

  --ease-out-expo:  cubic-bezier(0.16, 1, 0.3, 1);
  --ease-out-quart: cubic-bezier(0.25, 1, 0.5, 1);
  --ease-out-soft:  cubic-bezier(0.2, 0.7, 0.2, 1);
  --ease-bounce:    cubic-bezier(0.34, 1.56, 0.64, 1);

  --dur-reveal: 700ms;
  --dur-micro:  240ms;
  --dur-slow:   1000ms;
}


/* 2. BASE & TYPOGRAPHY
   ------------------------------------------------------------ */
html {
  scroll-behavior: smooth;
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
}

body {
  font-family: var(--font-ui);
  font-weight: 400;
  font-size: 16px;
  line-height: 1.85;
  color: var(--text);
  background: var(--bg);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  font-feature-settings: "palt";
  overflow-x: hidden;
}

/* Subtle washi texture overlay */
body::before {
  content: "";
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 9999;
  opacity: 0.025;
  background-image: url("data:image/svg+xml,%3Csvg width='40' height='40' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='4' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='40' height='40' filter='url(%23n)' opacity='1'/%3E%3C/svg%3E");
  background-size: 200px 200px;
}

img { max-width: 100%; height: auto; display: block; }
a { color: inherit; text-decoration: none; }
ul, ol { list-style: none; }
button { cursor: pointer; font: inherit; border: none; background: none; color: inherit; }

h1, h2, h3 {
  font-weight: 900;
  line-height: 1.3;
  letter-spacing: -0.01em;
}

h1 { font-size: clamp(36px, 7vw, 80px); }
h2 { font-size: clamp(28px, 5vw, 48px); }
h3 { font-size: clamp(18px, 2.5vw, 24px); }


/* 3. LAYOUT PRIMITIVES
   ------------------------------------------------------------ */
.page-shell {
  width: 100%;
  max-width: var(--max-w-wide);
  margin: 0 auto;
  padding: 0 var(--page-pad);
}

.section {
  margin-bottom: var(--section-gap);
}

.section-intro {
  max-width: var(--max-w-narrow);
  margin-bottom: clamp(40px, 6vh, 72px);
}

.section-label {
  font-family: var(--font-mono);
  font-size: 11px;
  font-weight: 500;
  text-transform: uppercase;
  letter-spacing: 0.15em;
  color: var(--pink-strong);
  margin-bottom: 12px;
}

.section-body {
  color: var(--text-sec);
  font-size: clamp(14px, 1.8vw, 17px);
  margin-top: 16px;
  max-width: 580px;
}


/* 4. COMPONENT LIBRARY
   ------------------------------------------------------------ */

/* --- Buttons --- */
.button {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 14px 28px;
  border-radius: var(--radius-m);
  font-weight: 700;
  font-size: 15px;
  transition: transform var(--dur-micro) var(--ease-out-soft),
              box-shadow var(--dur-micro) var(--ease-out-soft);
  white-space: nowrap;
}
.button:hover { transform: translateY(-2px); }
.button:active { transform: translateY(0) scale(0.98); }

.button-primary {
  background: var(--text);
  color: var(--bg);
  box-shadow: 0 2px 12px rgba(58, 44, 32, 0.2);
}
.button-primary:hover {
  box-shadow: 0 6px 24px rgba(58, 44, 32, 0.25);
}

.button-secondary {
  background: transparent;
  color: var(--text);
  border: 1.5px solid rgba(58, 44, 32, 0.15);
}
.button-secondary:hover {
  border-color: rgba(58, 44, 32, 0.3);
  background: rgba(58, 44, 32, 0.03);
}

.button-block { width: 100%; justify-content: center; }

.button-arrow {
  display: flex;
  transition: transform var(--dur-micro) var(--ease-out-soft);
}
.button-arrow svg {
  width: 16px; height: 16px;
  stroke: currentColor; stroke-width: 2;
  stroke-linecap: round; stroke-linejoin: round;
  fill: none;
}
.button:hover .button-arrow { transform: translateX(3px); }

.button-small { padding: 10px 20px; font-size: 13px; }

/* --- Glass card --- */
.glass-card {
  background: rgba(255, 253, 248, 0.7);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border: 1px solid rgba(255, 255, 255, 0.6);
  border-radius: var(--radius-l);
  box-shadow: 0 4px 32px rgba(58, 44, 32, 0.06);
}

/* --- Micro label --- */
.micro-label {
  font-family: var(--font-mono);
  font-size: 10px;
  font-weight: 500;
  text-transform: uppercase;
  letter-spacing: 0.14em;
  color: var(--pink-strong);
}

.micro-label-gold { color: var(--gold); }

/* --- Feature list --- */
.feature-list {
  display: flex;
  flex-direction: column;
  gap: 8px;
  margin-top: 16px;
}
.feature-list li {
  position: relative;
  padding-left: 20px;
  font-size: 14px;
  color: var(--text-sec);
  line-height: 1.7;
}
.feature-list li::before {
  content: "";
  position: absolute;
  left: 0;
  top: 8px;
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--pink-soft);
}


/* 5. NAVIGATION
   ------------------------------------------------------------ */
.site-nav {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 1000;
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 56px;
  padding: 0 clamp(16px, 3vw, 40px);
  transition: background var(--dur-micro) ease, box-shadow var(--dur-micro) ease;
}

.nav-scrolled {
  background: rgba(255, 250, 245, 0.85);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  box-shadow: 0 1px 0 rgba(58, 44, 32, 0.06);
}

.brand {
  display: flex;
  align-items: center;
  gap: 10px;
}
.brand-mark {
  width: 32px;
  height: 32px;
  border-radius: 10px;
}
.brand-copy { display: flex; flex-direction: column; }
.brand-name {
  font-weight: 900;
  font-size: 16px;
  line-height: 1.2;
  letter-spacing: -0.02em;
}
.brand-subtitle {
  font-family: var(--font-mono);
  font-size: 9px;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  color: var(--text-muted);
  line-height: 1;
}

.nav-links {
  display: none;
  align-items: center;
  gap: 32px;
}
.nav-links a {
  font-size: 13px;
  font-weight: 500;
  color: var(--text-sec);
  position: relative;
  transition: color var(--dur-micro) ease;
}
.nav-links a::after {
  content: "";
  position: absolute;
  bottom: -4px;
  left: 50%;
  width: 0;
  height: 1.5px;
  background: var(--pink-strong);
  transition: width 0.3s var(--ease-out-expo), left 0.3s var(--ease-out-expo);
}
.nav-links a:hover { color: var(--text); }
.nav-links a:hover::after { width: 100%; left: 0; }

.nav-tools {
  display: flex;
  align-items: center;
  gap: 12px;
}

/* Language picker */
.lang-picker { position: relative; }
.lang-toggle {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 6px 12px;
  border-radius: var(--radius-s);
  font-size: 12px;
  color: var(--text-sec);
  transition: background var(--dur-micro) ease;
}
.lang-toggle:hover { background: rgba(58, 44, 32, 0.04); }

.lang-toggle-main {
  display: flex;
  align-items: center;
  gap: 6px;
}
.lang-toggle-main svg {
  width: 16px;
  height: 16px;
  stroke: currentColor;
  stroke-width: 1.5;
  stroke-linecap: round;
  stroke-linejoin: round;
  fill: none;
}
.lang-toggle-caret svg {
  width: 12px;
  height: 12px;
  stroke: currentColor;
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
  fill: none;
  transition: transform 0.2s ease;
}

.lang-dropdown {
  position: absolute;
  top: calc(100% + 6px);
  right: 0;
  min-width: 140px;
  padding: 6px;
  background: rgba(255, 253, 248, 0.95);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border: 1px solid rgba(58, 44, 32, 0.08);
  border-radius: var(--radius-m);
  box-shadow: 0 8px 32px rgba(58, 44, 32, 0.1);
  opacity: 0;
  transform: translateY(-4px);
  pointer-events: none;
  transition: opacity 0.2s ease, transform 0.2s ease;
}
.lang-dropdown.open {
  opacity: 1;
  transform: translateY(0);
  pointer-events: auto;
}

.lang-option {
  display: block;
  width: 100%;
  padding: 8px 14px;
  border-radius: var(--radius-s);
  font-size: 13px;
  text-align: left;
  transition: background var(--dur-micro) ease;
}
.lang-option:hover { background: rgba(58, 44, 32, 0.05); }
.lang-option.active {
  color: var(--pink-strong);
  font-weight: 600;
}

.nav-download {
  display: none;
}

/* Mobile hamburger */
.nav-hamburger {
  display: flex;
  flex-direction: column;
  gap: 5px;
  padding: 8px;
  cursor: pointer;
}
.nav-hamburger span {
  display: block;
  width: 20px;
  height: 1.5px;
  background: var(--text);
  border-radius: 1px;
  transition: transform 0.3s ease, opacity 0.3s ease;
}

/* Mobile menu */
.mobile-menu {
  position: fixed;
  top: 56px;
  left: 0;
  right: 0;
  background: rgba(255, 250, 245, 0.97);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  padding: 24px var(--page-pad);
  transform: translateY(-100%);
  opacity: 0;
  pointer-events: none;
  transition: transform 0.35s var(--ease-out-expo), opacity 0.35s ease;
  z-index: 999;
  border-bottom: 1px solid rgba(58, 44, 32, 0.06);
}
.mobile-menu.open {
  transform: translateY(0);
  opacity: 1;
  pointer-events: auto;
}
.mobile-menu a {
  display: block;
  padding: 14px 0;
  font-size: 16px;
  font-weight: 600;
  color: var(--text);
  border-bottom: 1px solid rgba(58, 44, 32, 0.06);
}
.mobile-menu a:last-child { border-bottom: none; }


/* 6. HERO
   ------------------------------------------------------------ */
.hero {
  min-height: 100svh;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  text-align: center;
  padding-top: 80px;
  padding-bottom: 60px;
  position: relative;
  overflow: hidden;
}

/* Background color wash */
.hero::before {
  content: "";
  position: absolute;
  inset: 0;
  background: radial-gradient(ellipse at 30% 20%, rgba(255, 181, 181, 0.1) 0%, transparent 60%),
              radial-gradient(ellipse at 70% 80%, rgba(255, 218, 181, 0.08) 0%, transparent 50%);
  pointer-events: none;
}

.hero-inner {
  position: relative;
  z-index: 2;
  max-width: 800px;
}

/* Staggered hero text entrance */
.hero-line {
  display: block;
  opacity: 0;
  transform: translateY(30px);
}
.hero.is-visible .hero-line {
  animation: hero-line-in 0.8s var(--ease-out-expo) forwards;
}
.hero.is-visible .hero-line:nth-child(1) { animation-delay: 0.1s; }
.hero.is-visible .hero-line:nth-child(2) { animation-delay: 0.22s; }
.hero.is-visible .hero-line:nth-child(3) { animation-delay: 0.34s; }

@keyframes hero-line-in {
  to { opacity: 1; transform: translateY(0); }
}

.hero h1 {
  margin-bottom: 20px;
}

.hero-subtitle {
  font-size: clamp(14px, 2vw, 18px);
  color: var(--text-sec);
  max-width: 560px;
  margin: 0 auto 32px;
  opacity: 0;
  transform: translateY(20px);
}
.hero.is-visible .hero-subtitle {
  animation: hero-line-in 0.8s var(--ease-out-expo) 0.4s forwards;
}

.hero-actions {
  display: flex;
  gap: 14px;
  justify-content: center;
  flex-wrap: wrap;
  margin-bottom: 48px;
  opacity: 0;
}
.hero.is-visible .hero-actions {
  animation: hero-line-in 0.7s var(--ease-out-expo) 0.55s forwards;
}

/* Hero visual */
.hero-visual {
  position: relative;
  width: min(600px, 85vw);
  margin: 0 auto;
  opacity: 0;
  transform: translateY(24px);
}
.hero.is-visible .hero-visual {
  animation: hero-line-in 1s var(--ease-out-expo) 0.5s forwards;
}

.hero-scrapbook {
  position: relative;
}

.hero-scrapbook-bg {
  width: 100%;
  border-radius: var(--radius-xl);
  box-shadow: 0 16px 64px rgba(58, 44, 32, 0.12);
}

.hero-nui {
  position: absolute;
  right: -6%;
  bottom: -10%;
  width: 26%;
  animation: float-bob 6s var(--ease-out-soft) infinite;
  filter: drop-shadow(0 8px 24px rgba(58, 44, 32, 0.12));
  z-index: 3;
}

.hero-diary-card {
  max-width: 340px;
  margin: -32px auto 0;
  padding: 24px 28px;
  position: relative;
  z-index: 5;
}

.hero-diary-meta {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 12px;
}
.hero-diary-date {
  font-family: var(--font-mono);
  font-size: 11px;
  color: var(--text-muted);
  letter-spacing: 0.05em;
}
.hero-diary-text {
  font-family: var(--font-diary);
  font-size: 13px;
  line-height: 1.9;
  color: var(--text);
}

/* Floating decorations */
@keyframes float-bob {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-12px); }
}

/* Sakura petals */
.petal {
  position: absolute;
  width: 10px;
  height: 10px;
  background: var(--pink-soft);
  border-radius: 50% 0 50% 0;
  opacity: 0;
  pointer-events: none;
  z-index: 1;
}
.hero.is-visible .petal {
  animation: petal-fall linear infinite;
}
.petal-1 { left: 10%; top: -5%; animation-duration: 8s; animation-delay: 0s; }
.petal-2 { left: 25%; top: -8%; animation-duration: 10s; animation-delay: 1.5s; width: 8px; height: 8px; background: var(--lavender-soft); }
.petal-3 { left: 55%; top: -3%; animation-duration: 9s; animation-delay: 3s; }
.petal-4 { left: 75%; top: -6%; animation-duration: 11s; animation-delay: 0.8s; width: 7px; height: 7px; background: var(--peach-soft); }
.petal-5 { left: 90%; top: -4%; animation-duration: 8.5s; animation-delay: 2.2s; }
.petal-6 { left: 40%; top: -7%; animation-duration: 9.5s; animation-delay: 4s; width: 9px; height: 9px; background: var(--lavender-soft); }

@keyframes petal-fall {
  0% {
    opacity: 0;
    transform: translateY(-20px) translateX(0) rotate(0deg);
  }
  10% { opacity: 0.6; }
  90% { opacity: 0.4; }
  100% {
    opacity: 0;
    transform: translateY(100vh) translateX(80px) rotate(360deg);
  }
}

/* Sparkles */
.sparkle {
  position: absolute;
  width: 6px;
  height: 6px;
  pointer-events: none;
  z-index: 1;
}
.sparkle::before {
  content: "";
  display: block;
  width: 100%;
  height: 100%;
  background: var(--gold);
  clip-path: polygon(50% 0%, 61% 35%, 98% 35%, 68% 57%, 79% 91%, 50% 70%, 21% 91%, 32% 57%, 2% 35%, 39% 35%);
  animation: sparkle-pulse 2.5s ease-in-out infinite;
}
.sparkle-1 { top: 15%; left: 8%; }
.sparkle-2 { top: 25%; right: 12%; }
.sparkle-2::before { animation-delay: 0.6s; background: var(--pink); }
.sparkle-3 { bottom: 30%; left: 15%; }
.sparkle-3::before { animation-delay: 1.2s; background: var(--lavender); }
.sparkle-4 { bottom: 20%; right: 8%; }
.sparkle-4::before { animation-delay: 1.8s; }
.sparkle-5 { top: 45%; left: 45%; }
.sparkle-5::before { animation-delay: 0.3s; background: var(--peach); }

@keyframes sparkle-pulse {
  0%, 100% { opacity: 0; transform: scale(0.5) rotate(0deg); }
  50% { opacity: 0.8; transform: scale(1) rotate(180deg); }
}


/* 7. PROOF BAR
   ------------------------------------------------------------ */
.proof-bar {
  display: flex;
  justify-content: center;
  gap: clamp(20px, 4vw, 48px);
  padding: 32px 0;
  margin-bottom: var(--section-gap);
  border-top: 1px solid rgba(58, 44, 32, 0.06);
  border-bottom: 1px solid rgba(58, 44, 32, 0.06);
  flex-wrap: wrap;
}
.proof-item {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 14px;
  color: var(--text-sec);
  font-weight: 500;
}
.proof-icon {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background: var(--pink-soft);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}
.proof-icon svg {
  width: 18px;
  height: 18px;
  stroke: var(--pink-strong);
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
  fill: none;
}
.proof-icon-lavender { background: var(--lavender-soft); }
.proof-icon-lavender svg { stroke: #9b7fd4; }
.proof-icon-mint { background: var(--mint-soft); }
.proof-icon-mint svg { stroke: #6dba9f; }


/* 8. FEATURES
   ------------------------------------------------------------ */
.features-section {
  position: relative;
}

.features-section::before {
  content: "";
  position: absolute;
  inset: -80px -100vw;
  background: radial-gradient(ellipse at 60% 30%, rgba(212, 197, 240, 0.06) 0%, transparent 50%);
  pointer-events: none;
  z-index: -1;
}

.feature-step {
  display: grid;
  grid-template-columns: 1fr;
  gap: 32px;
  align-items: center;
  margin-bottom: clamp(60px, 10vh, 120px);
}
.feature-step:last-child { margin-bottom: 0; }

.feature-step-content {
  max-width: 440px;
}

.step-number {
  font-family: var(--font-mono);
  font-size: clamp(48px, 8vw, 80px);
  font-weight: 700;
  line-height: 1;
  color: transparent;
  background: linear-gradient(135deg, var(--pink-soft), var(--lavender-soft));
  -webkit-background-clip: text;
  background-clip: text;
  margin-bottom: 16px;
  display: block;
}

.feature-step h3 {
  margin-bottom: 12px;
}

.feature-step .section-body {
  margin-top: 0;
}

/* Photo frame treatment */
.feature-media {
  position: relative;
}
.feature-media-inner {
  background: white;
  padding: 10px 10px 32px;
  border-radius: 4px;
  box-shadow: 0 4px 24px rgba(58, 44, 32, 0.08),
              0 1px 3px rgba(58, 44, 32, 0.04);
  transform: rotate(-1.5deg);
  transition: transform 0.4s var(--ease-out-soft);
}
.feature-step:nth-child(even) .feature-media-inner {
  transform: rotate(1.5deg);
}
.feature-media-inner:hover {
  transform: rotate(0deg) scale(1.02);
}
.feature-media-inner img {
  width: 100%;
  border-radius: 2px;
}

/* Vertical thread line (desktop only) */
.features-thread {
  display: none;
}


/* 9. BENTO / ACCUMULATION
   ------------------------------------------------------------ */
.bento-section {
  position: relative;
}
.bento-section::before {
  content: "";
  position: absolute;
  inset: -60px -100vw;
  background: radial-gradient(ellipse at 40% 50%, rgba(212, 197, 240, 0.05) 0%, transparent 50%);
  pointer-events: none;
  z-index: -1;
}

.bento-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 16px;
}

.bento-card {
  padding: clamp(20px, 3vw, 32px);
  transition: transform 0.4s var(--ease-out-soft), box-shadow 0.4s var(--ease-out-soft);
}
.bento-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 8px 40px rgba(58, 44, 32, 0.1);
}

.bento-label {
  font-family: var(--font-mono);
  font-size: 10px;
  font-weight: 500;
  text-transform: uppercase;
  letter-spacing: 0.14em;
  padding: 4px 10px;
  border-radius: 20px;
  display: inline-block;
  margin-bottom: 12px;
}
.bento-label-pink { background: var(--pink-soft); color: var(--pink-strong); }
.bento-label-lavender { background: var(--lavender-soft); color: #7c5db8; }
.bento-label-mint { background: var(--mint-soft); color: #4a9b7f; }
.bento-label-peach { background: var(--peach-soft); color: #b87a3d; }

.bento-card h3 { margin-bottom: 8px; }
.bento-card > p { color: var(--text-sec); font-size: 14px; }

.bento-media {
  margin-top: 20px;
  border-radius: var(--radius-m);
  overflow: hidden;
}
.bento-media img {
  width: 100%;
  transition: transform 0.6s var(--ease-out-soft);
}
.bento-card:hover .bento-media img {
  transform: scale(1.03);
}

/* Notebook lines effect on large card */
.bento-large {
  background-image:
    repeating-linear-gradient(
      0deg,
      transparent,
      transparent 27px,
      rgba(124, 92, 61, 0.05) 27px,
      rgba(124, 92, 61, 0.05) 28px
    );
  background-position: 0 20px;
}

/* Plushie icon circle */
.bento-icon-circle {
  width: 64px;
  height: 64px;
  border-radius: 50%;
  overflow: hidden;
  margin-top: 16px;
  border: 2px solid var(--lavender-soft);
}
.bento-icon-circle img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}


/* 10. BLOOM / PRICING
   ------------------------------------------------------------ */
.membership-section {
  position: relative;
  color: var(--text);
  margin-left: calc(-1 * var(--page-pad));
  margin-right: calc(-1 * var(--page-pad));
  padding: clamp(72px, 12vh, 140px) var(--page-pad);
  overflow: hidden;
  background: linear-gradient(180deg, var(--paper-warm) 0%, #fef3ea 100%);
}

/* Decorative top border */
.membership-section::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 3px;
  background: linear-gradient(90deg, var(--pink-soft), var(--lavender-soft), var(--peach-soft));
}

.membership-section .section-label {
  color: var(--pink-strong);
}
.membership-section .section-body {
  color: var(--text-sec);
}

.membership-header {
  max-width: var(--max-w-narrow);
  margin-bottom: clamp(48px, 8vh, 80px);
}

.membership-shell {
  display: grid;
  grid-template-columns: 1fr;
  gap: 24px;
  max-width: 960px;
  margin: 0 auto;
}

/* Compare: horizontal switcher on top */
.membership-compare {
  display: grid;
  grid-template-columns: 1fr;
  gap: 16px;
}

.mode-card {
  padding: clamp(28px, 4vw, 36px);
  border-radius: var(--radius-l);
  background: white;
  border: 1.5px solid rgba(58, 44, 32, 0.06);
  box-shadow: 0 2px 12px rgba(58, 44, 32, 0.04);
  transition: transform 0.4s var(--ease-out-soft), box-shadow 0.4s var(--ease-out-soft), border-color 0.3s ease;
}
.mode-card:hover {
  transform: translateY(-3px);
  box-shadow: 0 8px 32px rgba(58, 44, 32, 0.08);
}

.mode-card-featured {
  border-color: var(--pink);
  background: white;
  box-shadow: 0 2px 16px rgba(232, 146, 142, 0.12);
  position: relative;
}
.mode-card-featured::before {
  content: "";
  position: absolute;
  top: 0;
  left: 24px;
  right: 24px;
  height: 2px;
  background: linear-gradient(90deg, var(--pink), var(--lavender));
  border-radius: 0 0 2px 2px;
}
.mode-card-featured:hover {
  box-shadow: 0 12px 40px rgba(232, 146, 142, 0.15);
  border-color: var(--pink-strong);
}

.mode-card .micro-label { color: var(--text-muted); }
.mode-card-featured .micro-label { color: var(--pink-strong); }

.mode-card h3 {
  margin: 10px 0 6px;
  color: var(--text);
  font-size: clamp(20px, 3vw, 26px);
}
.mode-card .mode-text {
  color: var(--text-sec);
  font-size: 14px;
  margin-bottom: 8px;
  line-height: 1.7;
}

.mode-card .feature-list { margin-top: 20px; gap: 10px; }
.mode-card .feature-list li { color: var(--text-sec); font-size: 13px; }
.mode-card .feature-list li::before { background: var(--mint-soft); }
.mode-card-featured .feature-list li::before { background: var(--pink); }

/* Pricing card */
.membership-pricing {
  padding: clamp(32px, 4vw, 48px);
  border-radius: var(--radius-xl);
  background: white;
  border: 1.5px solid rgba(58, 44, 32, 0.06);
  box-shadow: 0 4px 24px rgba(58, 44, 32, 0.06), 0 1px 3px rgba(58, 44, 32, 0.03);
}

.membership-badge {
  display: inline-block;
  font-family: var(--font-mono);
  font-size: 10px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.14em;
  color: var(--pink-strong);
  background: var(--pink-soft);
  padding: 5px 14px;
  border-radius: 20px;
  margin-bottom: 20px;
}

.membership-pricing h3 {
  font-size: clamp(28px, 5vw, 42px);
  color: var(--text);
  margin-bottom: 10px;
  letter-spacing: -0.02em;
}
.membership-pricing-copy {
  color: var(--text-sec);
  font-size: 14px;
  margin-bottom: 32px;
  max-width: 460px;
  line-height: 1.75;
}

.price-highlight {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 16px;
  padding: 22px 28px;
  background: linear-gradient(135deg, #fff5f5, #fff0f0);
  border: 1.5px solid rgba(232, 146, 142, 0.2);
  border-radius: var(--radius-m);
  margin-bottom: 12px;
  transition: border-color 0.3s ease, box-shadow 0.3s ease;
}
.price-highlight:hover {
  border-color: rgba(232, 146, 142, 0.35);
  box-shadow: 0 4px 16px rgba(232, 146, 142, 0.08);
}
.price-label {
  font-weight: 700;
  font-size: 15px;
  color: var(--text);
}
.price-caption {
  font-size: 12px;
  color: var(--text-muted);
  margin-top: 4px;
  line-height: 1.5;
}
.price-figure {
  text-align: right;
  white-space: nowrap;
}
.price-figure strong {
  font-size: clamp(26px, 5vw, 36px);
  font-weight: 900;
  color: var(--pink-strong);
  letter-spacing: -0.02em;
}
.price-figure span {
  font-size: 13px;
  color: var(--text-muted);
  margin-left: 2px;
}

.price-line {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 16px;
  padding: 18px 28px;
  background: var(--paper-cool);
  border: 1px solid rgba(58, 44, 32, 0.04);
  border-radius: var(--radius-m);
  margin-bottom: 28px;
  transition: border-color 0.3s ease;
}
.price-line:hover {
  border-color: rgba(58, 44, 32, 0.1);
}
.price-figure-small strong {
  font-size: clamp(20px, 3.5vw, 26px);
  color: var(--text-sec);
}

.membership-pricing .feature-list { margin-top: 20px; gap: 12px; }
.membership-pricing .feature-list li { color: var(--text-sec); font-size: 14px; }
.membership-pricing .feature-list li::before {
  background: var(--pink);
}

.membership-pricing .button-primary {
  margin-top: 28px;
  background: var(--text);
  color: var(--bg);
  font-weight: 800;
  font-size: 16px;
  padding: 16px 32px;
  border-radius: var(--radius-m);
  box-shadow: 0 4px 16px rgba(58, 44, 32, 0.15);
  transition: transform var(--dur-micro) var(--ease-out-soft),
              box-shadow var(--dur-micro) var(--ease-out-soft);
}
.membership-pricing .button-primary:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 32px rgba(58, 44, 32, 0.22);
}
.membership-pricing .button-primary:active {
  transform: translateY(0) scale(0.98);
}

/* Free strip */
.membership-free-strip {
  padding: clamp(24px, 3vw, 32px);
  border-radius: var(--radius-l);
  background: white;
  border: 1px solid rgba(58, 44, 32, 0.05);
  box-shadow: 0 1px 4px rgba(58, 44, 32, 0.03);
}
.free-strip-head {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 10px;
}
.free-strip-head .micro-label {
  color: var(--text-muted);
  background: var(--paper-cool);
  padding: 3px 10px;
  border-radius: 12px;
}
.free-strip-head strong {
  color: var(--text);
  font-size: 15px;
}
.free-strip-body {
  color: var(--text-muted);
  font-size: 13px;
  margin-bottom: 16px;
  line-height: 1.7;
}
.free-strip-list {
  display: flex;
  flex-wrap: wrap;
  gap: 10px 24px;
}
.free-strip-list li {
  font-size: 13px;
  color: var(--text-sec);
  position: relative;
  padding-left: 18px;
}
.free-strip-list li::before {
  content: "";
  position: absolute;
  left: 0;
  top: 7px;
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--mint-soft);
}


/* 11. DOWNLOAD
   ------------------------------------------------------------ */
.download-section {
  position: relative;
}
.download-section::before {
  content: "";
  position: absolute;
  inset: -60px -100vw;
  background: radial-gradient(ellipse at 50% 50%, rgba(255, 218, 181, 0.08) 0%, transparent 50%);
  pointer-events: none;
  z-index: -1;
}

.download-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: clamp(32px, 5vw, 64px);
  align-items: center;
}

.download-social {
  margin-top: 32px;
  padding: 24px;
  background: var(--paper-warm);
  border-radius: var(--radius-l);
  border: 1px solid rgba(58, 44, 32, 0.06);
}
.download-social .micro-label {
  color: var(--text-muted);
  display: block;
  margin-bottom: 6px;
}
.download-social p {
  font-size: 14px;
  color: var(--text-sec);
}
.download-channel-list {
  display: flex;
  gap: 12px;
  margin-top: 12px;
}
.download-channel-list li {
  font-family: var(--font-mono);
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--text-muted);
  padding: 4px 10px;
  background: rgba(58, 44, 32, 0.04);
  border-radius: 20px;
}

/* Store buttons */
.store-grid {
  display: flex;
  gap: 12px;
  margin-top: 32px;
  flex-wrap: wrap;
}

.store-button {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 14px 24px;
  background: var(--text);
  color: var(--bg);
  border-radius: var(--radius-m);
  transition: transform var(--dur-micro) ease, opacity var(--dur-micro) ease;
  min-width: 180px;
}
.store-button:hover { transform: translateY(-2px); }
.store-button.is-disabled {
  opacity: 0.4;
  pointer-events: none;
}
.store-icon svg {
  width: 24px;
  height: 24px;
  fill: currentColor;
}
.store-icon-apple path { fill: currentColor; }
.store-copy { display: flex; flex-direction: column; }
.store-overline {
  font-size: 10px;
  opacity: 0.7;
  line-height: 1.2;
}
.store-title {
  font-size: 16px;
  font-weight: 700;
  line-height: 1.3;
}

.store-badge-shell { position: relative; }
.store-status {
  display: block;
  text-align: center;
  font-size: 11px;
  color: var(--text-muted);
  margin-top: 6px;
}

/* Download visual */
.download-visual {
  position: relative;
}
.download-preview {
  border-radius: var(--radius-xl);
  overflow: hidden;
  box-shadow: 0 8px 40px rgba(58, 44, 32, 0.08);
}
.download-preview img {
  width: 100%;
}

.download-note {
  margin-top: 20px;
  font-size: 12px;
  color: var(--text-muted);
}


/* 12. FOOTER
   ------------------------------------------------------------ */
.site-footer {
  border-top: 2px solid transparent;
  border-image: linear-gradient(90deg, var(--pink-soft), var(--lavender-soft), var(--mint-soft)) 1;
  padding: 40px 0 48px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 24px;
}

.footer-brand {
  display: flex;
  align-items: center;
  gap: 12px;
}
.footer-mark {
  width: 36px;
  height: 36px;
  border-radius: 10px;
}
.footer-brand strong {
  font-size: 15px;
  font-weight: 900;
  display: block;
}
.footer-brand p {
  font-family: var(--font-diary);
  font-size: 12px;
  color: var(--text-muted);
}

.footer-links {
  display: flex;
  gap: 24px;
}
.footer-links a {
  font-size: 13px;
  color: var(--text-muted);
  transition: color var(--dur-micro) ease;
}
.footer-links a:hover { color: var(--text); }


/* 12b. LEGAL PAGES (Privacy Policy, Terms of Service)
   ------------------------------------------------------------ */
.legal-page {
  max-width: var(--max-w-narrow);
  margin: 0 auto;
  padding: 40px 0 var(--section-gap);
}

.legal-header {
  margin-bottom: 40px;
}
.legal-header h1 {
  font-size: clamp(28px, 5vw, 44px);
  margin-bottom: 8px;
}
.legal-updated {
  font-family: var(--font-mono);
  font-size: 13px;
  color: var(--text-muted);
}

.legal-toc {
  background: var(--paper-warm);
  border-radius: var(--radius-m);
  padding: 24px 28px;
  margin-bottom: 48px;
}
.legal-toc h2 {
  font-size: 15px;
  font-weight: 700;
  margin-bottom: 12px;
}
.legal-toc ol {
  list-style: decimal;
  padding-left: 20px;
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
  gap: 4px 32px;
}
.legal-toc a {
  font-size: 14px;
  color: var(--text-sec);
  transition: color var(--dur-micro) ease;
}
.legal-toc a:hover {
  color: var(--pink-strong);
}

.legal-body section {
  margin-bottom: 40px;
}
.legal-body h2 {
  font-size: clamp(18px, 2.5vw, 24px);
  margin-bottom: 16px;
  padding-top: 8px;
  border-top: 1px solid var(--pink-soft);
}
.legal-body h3 {
  font-size: clamp(15px, 2vw, 18px);
  font-weight: 700;
  margin: 20px 0 8px;
}
.legal-body p {
  color: var(--text-sec);
  font-size: 15px;
  line-height: 1.8;
  margin-bottom: 12px;
}
.legal-body ul,
.legal-body ol {
  list-style: disc;
  padding-left: 24px;
  margin-bottom: 12px;
}
.legal-body ol {
  list-style: decimal;
}
.legal-body li {
  color: var(--text-sec);
  font-size: 15px;
  line-height: 1.7;
  margin-bottom: 4px;
}
.legal-body ul ul {
  margin-top: 4px;
  margin-bottom: 4px;
}
.legal-body a {
  color: var(--pink-strong);
  text-decoration: underline;
  text-underline-offset: 2px;
}
.legal-body a:hover {
  color: var(--text);
}
.legal-body strong {
  font-weight: 700;
  color: var(--text);
}

.legal-body table {
  width: 100%;
  border-collapse: collapse;
  margin: 16px 0;
  font-size: 14px;
}
.legal-body th,
.legal-body td {
  text-align: left;
  padding: 10px 14px;
  border: 1px solid var(--pink-soft);
  color: var(--text-sec);
  line-height: 1.6;
}
.legal-body th {
  background: var(--paper-warm);
  font-weight: 700;
  color: var(--text);
  font-size: 13px;
}


/* 13. SCROLL ANIMATIONS
   ------------------------------------------------------------ */
[data-animate] {
  opacity: 0;
}
[data-animate="fade-up"] {
  transform: translateY(40px);
}
[data-animate="fade-left"] {
  transform: translateX(-50px);
}
[data-animate="fade-right"] {
  transform: translateX(50px);
}
[data-animate="scale-in"] {
  transform: scale(0.92);
}

[data-animate].is-visible {
  opacity: 1;
  transform: none;
  transition: opacity var(--dur-reveal) var(--ease-out-expo),
              transform var(--dur-reveal) var(--ease-out-expo);
}

/* Stagger children */
[data-animate="stagger"] > * {
  opacity: 0;
  transform: translateY(24px);
}
[data-animate="stagger"].is-visible > * {
  opacity: 1;
  transform: none;
  transition: opacity var(--dur-reveal) var(--ease-out-expo),
              transform var(--dur-reveal) var(--ease-out-expo);
}


/* 14. RESPONSIVE: TABLET (min-width: 720px)
   ------------------------------------------------------------ */
@media (min-width: 720px) {
  .bento-grid {
    grid-template-columns: 1.2fr 0.8fr;
    gap: 20px;
  }
  .bento-large {
    grid-row: span 2;
  }
  .bento-wide {
    grid-column: span 2;
  }

  .membership-compare {
    grid-template-columns: 1fr 1fr;
  }
}


/* 15. RESPONSIVE: DESKTOP (min-width: 960px)
   ------------------------------------------------------------ */
@media (min-width: 960px) {
  .nav-links { display: flex; }
  .nav-download { display: inline-flex; }
  .nav-hamburger { display: none; }

  .hero {
    min-height: 100svh;
    padding-top: 100px;
  }

  .hero-visual {
    width: min(640px, 55vw);
  }

  /* Features: alternating layout */
  .feature-step {
    grid-template-columns: 1fr 1fr;
    gap: clamp(40px, 6vw, 80px);
  }
  .feature-step:nth-child(even) .feature-step-content {
    order: 2;
  }
  .feature-step:nth-child(even) .feature-media {
    order: 1;
  }

  /* Features thread line */
  .features-thread {
    display: block;
    position: absolute;
    left: 50%;
    top: 0;
    bottom: 0;
    width: 2px;
    transform: translateX(-50%);
  }
  .features-thread-line {
    display: block;
    width: 100%;
    height: 100%;
    background: repeating-linear-gradient(
      to bottom,
      transparent,
      transparent 6px,
      var(--pink-soft) 6px,
      var(--pink-soft) 12px
    );
    transform-origin: top;
    transform: scaleY(0);
    transition: transform 1.5s var(--ease-out-expo);
  }
  .features-thread.is-visible .features-thread-line {
    transform: scaleY(1);
  }

  /* Bento */
  .bento-grid { gap: 24px; }

  /* Bloom: pricing card centered */
  .membership-pricing {
    max-width: 580px;
    margin: 0 auto;
    width: 100%;
  }

  /* Download: 2-col */
  .download-grid {
    grid-template-columns: 1fr 1fr;
  }
}


/* 16. RESPONSIVE: SMALL PHONE (max-width: 520px)
   ------------------------------------------------------------ */
@media (max-width: 520px) {
  .hero h1 {
    font-size: clamp(28px, 8vw, 40px);
  }

  .brand-subtitle { display: none; }

  .hero-visual { width: 95vw; }

  .store-button {
    width: 100%;
    justify-content: center;
  }

  .proof-bar {
    flex-direction: column;
    align-items: flex-start;
    gap: 12px;
    padding: 24px 0;
  }

  .download-channel-list {
    flex-wrap: wrap;
  }

  .hero-diary-card {
    max-width: 100%;
    margin-top: -16px;
  }
}


/* 17. REDUCED MOTION
   ------------------------------------------------------------ */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }

  html { scroll-behavior: auto; }

  [data-animate],
  [data-animate] > *,
  .hero-line,
  .hero-subtitle,
  .hero-actions,
  .hero-visual {
    opacity: 1 !important;
    transform: none !important;
  }

  .petal,
  .sparkle {
    display: none !important;
  }

  .features-thread-line {
    transform: scaleY(1) !important;
  }
}


/* 18. FOCUS STYLES
   ------------------------------------------------------------ */
:focus-visible {
  outline: 3px solid var(--pink);
  outline-offset: 3px;
  border-radius: 4px;
}

a:focus:not(:focus-visible),
button:focus:not(:focus-visible) {
  outline: none;
}
