/* ============================================================
   메모리 사이클 리서치 - Editorial Premium Style
   High-end, Minimalist, Cinematic Scrollytelling
   ============================================================ */

:root {
  --c-bg: #ffffff;
  --c-bg-alt: #f8fafc;
  --c-text-main: #0f172a;
  --c-text-sub: #64748b;
  --c-text-mute: #94a3b8;
  --c-accent: #3b82f6;
  --c-border: #e2e8f0;
  
  --font-sans: -apple-system, BlinkMacSystemFont, "Helvetica Neue", "Apple SD Gothic Neo", "Noto Sans KR", sans-serif;
  --font-serif: "Playfair Display", "Times New Roman", serif;
  
  --layout-max: 1200px;
  --space-unit: 8px;
}

*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { font-size: 16px; scroll-behavior: smooth; }
body { font-family: var(--font-sans); color: var(--c-text-main); background: var(--c-bg); line-height: 1.6; font-weight: 400; overflow-x: hidden; -webkit-font-smoothing: antialiased; }
.has-mobile-cta { padding-bottom: 190px; }

/* 隱藏原生滾動條，提升沉浸感 */
::-webkit-scrollbar { width: 6px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb { background: #cbd5e1; }

a { color: inherit; text-decoration: none; }
a:focus-visible, button:focus-visible, [role="button"]:focus-visible {
  outline: 3px solid rgba(59, 130, 246, 0.45);
  outline-offset: 4px;
}
.sr-only {
  position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px;
  overflow: hidden; clip: rect(0, 0, 0, 0); white-space: nowrap; border: 0;
}
img { max-width: 100%; height: auto; display: block; }

/* === 基礎動畫 === */
@keyframes fadeInUp {
  from { opacity: 0; transform: translateY(30px); }
  to { opacity: 1; transform: translateY(0); }
}
.js-fade { opacity: 1; }
.js-enhanced .js-fade { opacity: 0; }
.fade-in { animation: fadeInUp 1s cubic-bezier(0.16, 1, 0.3, 1) forwards; opacity: 0; }
.delay-1 { animation-delay: 0.2s; }
.delay-2 { animation-delay: 0.4s; }
.delay-3 { animation-delay: 0.6s; }

/* === 頂部隱形導覽列 === */
.ed-nav {
  position: fixed; top: 0; left: 0; right: 0; z-index: 100;
  padding: 24px; display: flex; justify-content: space-between; align-items: center;
  background: linear-gradient(to bottom, rgba(255,255,255,0.9) 0%, rgba(255,255,255,0) 100%);
  pointer-events: none; /* 讓導覽列不阻擋點擊，除了 Logo */
}
.ed-nav__logo {
  font-size: 1rem; font-weight: 700; letter-spacing: -0.5px;
  pointer-events: auto; display: flex; align-items: center; gap: 8px;
}
.ed-nav__logo span { font-weight: 300; color: var(--c-text-sub); }

/* === 首屏 (Hero) 滿版 === */
.ed-hero {
  display: flex; flex-direction: column;
  padding: 0; position: relative; overflow: hidden;
  background: var(--c-bg-alt);
}
.ed-hero__bg {
  position: relative; top: 0; left: 0; width: 100%; height: 45vh; min-height: 300px;
  z-index: 0; object-fit: cover; object-position: center center;
  opacity: 1; 
}

.ed-hero__content {
  position: relative; z-index: 10; max-width: var(--layout-max); margin: 0 auto; width: 100%;
  padding: 40px 24px 80px 24px;
}
.ed-hero__eyebrow {
  font-size: 0.85rem; text-transform: uppercase; letter-spacing: 2px;
  font-weight: 600; color: var(--c-accent); margin-bottom: 24px;
}
.ed-hero__title {
  font-size: clamp(2.4rem, 11vw, 3.5rem); font-weight: 200; line-height: 1.12; letter-spacing: -1.5px;
  margin-bottom: 24px; max-width: 800px;
}
.ed-hero__title strong { font-weight: 600; }
.ed-hero__desc {
  font-size: 1.1rem; color: var(--c-text-sub); font-weight: 300;
  max-width: 500px; line-height: 1.8; margin-bottom: 40px;
}

/* 電腦版 CTA (手機版隱藏) */
.ed-hero__cta-desktop { display: none; }
.ed-input-group {
  display: flex; width: 100%; max-width: 480px;
  border: 1px solid var(--c-border); background: #fff;
}
.ed-input-group input {
  border: none; background: transparent; font-size: 1rem; flex: 1; outline: none; font-family: inherit;
  padding: 16px 24px;
}
.ed-input-group input::placeholder { color: var(--c-text-mute); font-weight: 300; }
.ed-input-group .ed-cta-button { flex: 0 0 auto; min-height: 56px; }
.ed-input-group button {
  background: var(--c-text-main); color: #fff;
  border: none; font-size: 0.95rem; font-weight: 600;
  cursor: pointer; text-transform: uppercase; letter-spacing: 1px;
  padding: 0 32px;
}

.ed-cta-button {
  display: inline-flex; align-items: center; justify-content: center;
  min-height: 54px; padding: 14px 28px; background: var(--c-text-main); color: #fff;
  border: 1px solid var(--c-text-main); font-size: 0.95rem; font-weight: 600;
  letter-spacing: 0.04em; cursor: pointer;
}
.ed-cta-button.is-disabled {
  background: #cbd5e1; border-color: #cbd5e1; color: #475569;
  cursor: not-allowed;
}
.ed-cta-note { display: block; max-width: 520px; margin-top: 10px; font-size: 0.78rem; color: var(--c-text-sub); }
#subscription-cta { scroll-margin-top: 80px; }
.ed-return-cta { display: none; padding: 0 24px 96px; text-align: center; }

/* === 高級章節區塊 === */
.ed-section { padding: 80px 24px; } /* 手機版縮小間距，原為 120px */
.ed-section--alt { background: var(--c-bg-alt); }
.ed-container { max-width: var(--layout-max); margin: 0 auto; }

.ed-section-head { margin-bottom: 80px; }
.ed-section-index {
  font-size: 0.75rem; color: var(--c-text-mute); letter-spacing: 3px; margin-bottom: 16px; display: block;
}
.ed-section-title { font-size: 2.5rem; font-weight: 300; letter-spacing: -1px; line-height: 1.2; }

/* === 數據視覺化區塊 (左文右圖 / 上下堆疊) === */
.ed-split { display: grid; grid-template-columns: 1fr; gap: 40px; align-items: center; }
.ed-split__visual img {
  width: 100%; aspect-ratio: 4/3; object-fit: cover;
  /* 圖片 2 佔位區，完全沒有圓角與陰影，呈現純粹的畫布感 */
  filter: grayscale(20%) contrast(1.1);
}
.ed-split__text p { font-size: 1.05rem; color: var(--c-text-sub); margin-bottom: 24px; font-weight: 300; }

/* === 財報風格無框表格 === */
/* 手機版使用橫向滑動 (Swipeable Cards)，電腦版顯示表格 */
.ed-table-wrap { overflow-x: auto; padding-bottom: 20px; }
.ed-table { width: 100%; border-collapse: collapse; min-width: 600px; }
.ed-table th, .ed-table td {
  padding: 24px 16px; text-align: left; border-bottom: 1px solid var(--c-border);
}
.ed-table th { font-size: 0.85rem; font-weight: 600; color: var(--c-text-mute); text-transform: uppercase; letter-spacing: 1px; border-bottom: 2px solid var(--c-text-main); }
.ed-table td { font-size: 1rem; font-weight: 300; vertical-align: top; }
.ed-table strong { font-weight: 600; color: var(--c-text-main); }

/* 極簡 Tag 標籤 */
.ed-tag {
  display: inline-block; padding: 4px 10px; border: 1px solid var(--c-border);
  font-size: 0.75rem; letter-spacing: 1px; color: var(--c-text-sub); text-transform: uppercase;
}

/* === 極簡文字排版 (About / Legal) === */
.ed-text-block { max-width: 700px; margin: 0 auto; }
.ed-text-block h2 { font-size: 2rem; font-weight: 300; margin-bottom: 24px; }
.ed-text-block h3 { font-size: 1.2rem; font-weight: 600; margin: 40px 0 16px; }
.ed-text-block p { font-size: 1rem; color: var(--c-text-sub); margin-bottom: 16px; font-weight: 300; }
.ed-text-block ul { margin-left: 20px; color: var(--c-text-sub); font-weight: 300; margin-bottom: 24px; }
.ed-text-block li { margin-bottom: 8px; }
.ed-text-block a:not(.ed-cta-button) { text-decoration: underline; text-underline-offset: 4px; }
.ed-article-meta { color: var(--c-text-mute); font-size: 0.85rem; margin-bottom: 36px; }
.ed-article-card { display: block; padding: 24px; background: #fff; border: 1px solid var(--c-border); }
.ed-article-card:hover { border-color: #94a3b8; }
.ed-article-card__type { font-size: 0.75rem; color: var(--c-text-mute); margin-bottom: 8px; }
.ed-operator-list { list-style: none; margin-left: 0 !important; }
.ed-operator-list strong { display: inline-block; min-width: 160px; color: var(--c-text-main); }

/* === 手機版專屬 - 吸底毛玻璃 CTA (Bottom Sheet) === */
.ed-mobile-cta {
  position: fixed; bottom: 0; left: 0; right: 0; z-index: 90;
  background: rgba(255, 255, 255, 0.75);
  backdrop-filter: blur(20px); -webkit-backdrop-filter: blur(20px);
  border-top: 1px solid rgba(0,0,0,0.05);
  padding: 16px 24px 32px; /* 預留 iPhone 底部安全區 */
  display: flex; flex-direction: column; gap: 12px;
  transform: translateY(0); transition: transform 0.4s cubic-bezier(0.16, 1, 0.3, 1);
}
.ed-mobile-cta.is-hidden { transform: translateY(100%); }
.ed-mobile-cta__hint { font-size: 0.75rem; color: var(--c-text-sub); text-align: center; }
.ed-mobile-cta__input {
  width: 100%; padding: 14px 16px; border: 1px solid var(--c-border);
  background: #fff; font-size: 1rem; outline: none; border-radius: 0; /* 拒絕圓角 */
}
.ed-mobile-cta__btn {
  width: 100%; padding: 16px; background: var(--c-text-main); color: #fff;
  border: none; font-size: 0.95rem; font-weight: 600; text-transform: uppercase;
  letter-spacing: 1px; cursor: pointer; border-radius: 0;
}

/* === Footer === */
.ed-footer { padding: 80px 24px; background: var(--c-bg); border-top: 1px solid var(--c-border); text-align: center; }
.ed-footer__links { display: flex; justify-content: center; gap: 24px; margin-bottom: 32px; flex-wrap: wrap; }
.ed-footer__links a { font-size: 0.85rem; color: var(--c-text-sub); text-transform: uppercase; letter-spacing: 1px; }
.ed-footer__legal { font-size: 0.75rem; color: var(--c-text-mute); max-width: 600px; margin: 0 auto; }
.ed-footer__legal p + p { margin-top: 8px; }

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

/* === Desktop 斷點 (min-width: 768px) === */
@media (min-width: 768px) {
  .has-mobile-cta { padding-bottom: 0; }
  .ed-hero {
    min-height: 100vh;
    display: flex; flex-direction: column; justify-content: center;
    padding: 0 48px;
  }
  .ed-hero__content {
    padding: 0;
  }
  .ed-hero__title { font-size: 5rem; }
  .ed-hero__bg { 
    position: absolute; top: 0; bottom: 0;
    width: 60%; height: 100%; opacity: 1; left: auto; right: 0;
    mask-image: linear-gradient(to right, rgba(0,0,0,0) 0%, rgba(0,0,0,1) 40%);
    -webkit-mask-image: linear-gradient(to right, rgba(0,0,0,0) 0%, rgba(0,0,0,1) 40%);
  }
  
  .ed-mobile-cta { display: none; } /* 隱藏手機底欄 */
  .ed-hero__cta-desktop { display: block; } /* 顯示首屏 CTA */
  .ed-return-cta { display: block; }
  
  .ed-section { padding: 160px 48px; }
  .ed-section-title { font-size: 3.5rem; }
  
  .ed-split { grid-template-columns: 1fr 1fr; gap: 80px; }
}

/* 確保免責聲明等不突兀 */
.compliance-hint {
  font-size: 0.7rem; color: var(--c-text-mute); display: block; margin-top: 8px;
}
