/* Emotion Atlas — calm, modern, soft */

@import url("https://fonts.googleapis.com/css2?family=Fraunces:opsz,wght@9..144,400;9..144,500;9..144,600&family=Inter:wght@400;500;600&display=swap");

:root {
  --bg: #faf7f2;
  --surface: #ffffff;
  --surface-2: #f4efe7;
  --ink: #2c2e33;
  --muted: #767a82;
  --accent: #7c9a92;
  --accent-deep: #5f7c74;
  --line: #ece5db;
  --shadow: 0 10px 30px rgba(44, 46, 51, 0.06);
  --shadow-hover: 0 16px 40px rgba(44, 46, 51, 0.12);
  --radius: 18px;
  --radius-sm: 12px;
  --maxw: 1180px;
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: "Inter", system-ui, -apple-system, sans-serif;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

img { display: block; max-width: 100%; }

a { color: inherit; text-decoration: none; }

.wrap { width: 100%; max-width: var(--maxw); margin: 0 auto; padding: 0 24px; }

h1, h2, h3 { font-family: "Fraunces", Georgia, serif; font-weight: 500; letter-spacing: -0.01em; }

.eyebrow {
  text-transform: uppercase;
  letter-spacing: 0.18em;
  font-size: 0.72rem;
  color: var(--accent-deep);
  font-weight: 600;
  margin: 0 0 12px;
}

/* ---------- Header / Nav ---------- */
.site-header {
  position: sticky; top: 0; z-index: 50;
  background: rgba(250, 247, 242, 0.82);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--line);
}
.site-header .wrap {
  display: flex; align-items: center; justify-content: space-between;
  height: 68px;
}
.brand { display: flex; align-items: center; gap: 10px; font-family: "Fraunces", serif; font-size: 1.2rem; font-weight: 600; }
.brand .dot { width: 12px; height: 12px; border-radius: 50%; background: var(--accent); box-shadow: 0 0 0 4px rgba(124,154,146,0.18); }
.brand-logo { width: 34px; height: 34px; border-radius: 50%; object-fit: cover; background: #0d1420; }
.nav-links { display: flex; gap: 28px; font-size: 0.92rem; color: var(--muted); }
.nav-links a:hover { color: var(--ink); }

/* ---------- Hero ---------- */
.hero { padding: 72px 0 64px; text-align: center; }
.hero-globe {
  width: min(440px, 82vw); height: auto; margin: 0 auto 28px;
  border-radius: 50%;
  box-shadow: 0 24px 60px rgba(13, 20, 32, 0.45);
}
.hero h1 {
  font-size: clamp(2.4rem, 6vw, 4.2rem);
  line-height: 1.05; margin: 0 auto 20px; max-width: 15ch;
}
.hero .lede {
  font-size: clamp(1.05rem, 2.2vw, 1.28rem);
  color: var(--muted); max-width: 56ch; margin: 0 auto 32px;
}
.hero-cta { display: inline-flex; gap: 14px; flex-wrap: wrap; justify-content: center; }

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex; align-items: center; gap: 8px;
  padding: 13px 24px; border-radius: 999px; font-size: 0.95rem; font-weight: 500;
  border: 1px solid transparent; cursor: pointer; transition: all 0.2s ease;
  font-family: inherit;
}
.btn--primary { background: var(--accent); color: #fff; }
.btn--primary:hover { background: var(--accent-deep); transform: translateY(-1px); }
.btn--ghost { background: transparent; border-color: var(--line); color: var(--ink); }
.btn--ghost:hover { background: var(--surface); }
.btn--disabled { background: var(--surface-2); color: var(--muted); cursor: not-allowed; border-color: var(--line); }

/* ---------- Section ---------- */
.section { padding: 64px 0; }
.section-head { margin-bottom: 36px; }
.section-head h2 { font-size: clamp(1.6rem, 3.5vw, 2.3rem); margin: 0 0 8px; }
.section-head p { color: var(--muted); margin: 0; max-width: 60ch; }
.section-head--center { text-align: center; }
.section-head--center p { margin-left: auto; margin-right: auto; }

/* ---------- Journey arc ---------- */
.journey { background: var(--surface-2); }
.steps {
  list-style: none; margin: 0 0 48px; padding: 0;
  display: grid; grid-template-columns: repeat(5, 1fr); gap: 18px;
}
.step-card {
  position: relative; background: var(--surface); border: 1px solid var(--line);
  border-radius: var(--radius); overflow: hidden; box-shadow: var(--shadow);
  display: flex; flex-direction: column; transition: transform 0.22s ease, box-shadow 0.22s ease;
}
.step-card:hover { transform: translateY(-4px); box-shadow: var(--shadow-hover); }
.step-card > img { width: 100%; aspect-ratio: 1 / 1; object-fit: cover; display: block; }
.step-num {
  position: absolute; top: 12px; left: 12px; z-index: 2;
  width: 30px; height: 30px; border-radius: 50%;
  background: rgba(13, 20, 32, 0.6); color: #f5f0e8;
  border: 1px solid rgba(245, 240, 232, 0.5);
  display: grid; place-items: center; font-size: 0.85rem; font-weight: 600;
  font-family: "Fraunces", serif;
}
.step-body { padding: 16px 16px 20px; }
.step-body h3 { margin: 0 0 8px; font-size: 1.15rem; }
.step-body p { margin: 0; color: var(--muted); font-size: 0.9rem; line-height: 1.5; }

.journey-full { margin: 0; text-align: center; }
.journey-full img {
  width: 100%; max-width: 760px; height: auto; margin: 0 auto;
  border-radius: var(--radius); border: 1px solid var(--line);
  box-shadow: var(--shadow-hover);
}
.journey-full figcaption {
  margin-top: 16px; color: var(--muted); font-style: italic;
  font-family: "Fraunces", serif; font-size: 1.02rem;
}

@media (max-width: 900px) {
  .steps { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 520px) {
  .steps { grid-template-columns: 1fr; }
}

/* ---------- Emotion grid ---------- */
.emotion-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
  gap: 22px;
}
.emotion-card {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  overflow: hidden;
  box-shadow: var(--shadow);
  transition: transform 0.22s ease, box-shadow 0.22s ease;
  display: flex; flex-direction: column;
}
.emotion-card:hover { transform: translateY(-4px); box-shadow: var(--shadow-hover); }
.card-img-wrap { aspect-ratio: 1 / 1; overflow: hidden; background: var(--surface-2); }
.card-img { width: 100%; height: 100%; object-fit: cover; transition: transform 0.4s ease; }
.emotion-card:hover .card-img { transform: scale(1.05); }
.card-img--empty { width: 100%; height: 100%; }
.card-name {
  padding: 16px 18px; font-family: "Fraunces", serif; font-size: 1.12rem; font-weight: 500;
}

/* ---------- Guides ---------- */
.guides {
  display: grid; grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); gap: 18px;
}
.guide-card {
  display: flex; align-items: center; gap: 16px;
  background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius);
  padding: 22px; box-shadow: var(--shadow); transition: all 0.2s ease;
}
.guide-card:hover { transform: translateY(-3px); box-shadow: var(--shadow-hover); border-color: var(--accent); }
.guide-icon {
  flex: none; width: 44px; height: 44px; border-radius: 50%;
  background: var(--surface-2); color: var(--accent-deep);
  display: grid; place-items: center; font-size: 1.2rem; font-weight: 600;
}
.guide-text { display: flex; flex-direction: column; }
.guide-title { font-weight: 600; font-size: 1rem; }
.guide-meta { color: var(--muted); font-size: 0.85rem; }

/* ---------- Workbooks coming soon ---------- */
.workbooks { display: grid; grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); gap: 18px; }
.workbook-card {
  border: 1px dashed var(--line); border-radius: var(--radius);
  background: linear-gradient(180deg, var(--surface) 0%, var(--surface-2) 100%);
  padding: 32px 24px; min-height: 200px;
  display: flex; flex-direction: column; justify-content: space-between;
}
.workbook-card .ph-tag {
  align-self: flex-start; font-size: 0.72rem; letter-spacing: 0.14em; text-transform: uppercase;
  color: var(--accent-deep); background: rgba(124,154,146,0.12); padding: 5px 12px; border-radius: 999px; font-weight: 600;
}
.workbook-card .ph-title { font-family: "Fraunces", serif; font-size: 1.25rem; color: var(--muted); }
.workbook-card .ph-line { height: 8px; border-radius: 6px; background: var(--surface-2); }
.workbook-card .ph-line.short { width: 55%; }

/* ---------- Detail page ---------- */
.detail-root { padding: 40px 0 24px; }
.back-link { color: var(--muted); font-size: 0.92rem; display: inline-block; margin-bottom: 28px; }
.back-link:hover { color: var(--ink); }
.detail-head { max-width: 62ch; margin-bottom: 40px; }
.detail-head h1 { font-size: clamp(2.2rem, 5vw, 3.4rem); margin: 0 0 16px; }
.detail-head .lede { font-size: 1.2rem; color: var(--muted); margin: 0; }

.gallery { position: relative; margin: 0 -8px 56px; }
.filmstrip {
  display: flex; gap: 16px; overflow-x: auto; scroll-snap-type: x mandatory;
  padding: 8px; scrollbar-width: thin;
}
.filmstrip::-webkit-scrollbar { height: 8px; }
.filmstrip::-webkit-scrollbar-thumb { background: var(--line); border-radius: 8px; }
.frame {
  flex: 0 0 auto; width: 300px; max-width: 74vw; aspect-ratio: 1 / 1;
  scroll-snap-align: start; border: 1px solid var(--line); border-radius: var(--radius);
  overflow: hidden; padding: 0; background: var(--surface-2); cursor: zoom-in;
  box-shadow: var(--shadow); transition: transform 0.2s ease;
}
.frame:hover { transform: translateY(-3px); }
.frame img { width: 100%; height: 100%; object-fit: cover; }
.scroll-btn {
  position: absolute; top: 50%; transform: translateY(-50%); z-index: 5;
  width: 46px; height: 46px; border-radius: 50%; border: 1px solid var(--line);
  background: var(--surface); color: var(--ink); font-size: 1.5rem; line-height: 1;
  cursor: pointer; box-shadow: var(--shadow); display: grid; place-items: center;
  transition: all 0.2s ease;
}
.scroll-btn:hover { background: var(--accent); color: #fff; border-color: var(--accent); }
.scroll-btn--prev { left: -6px; }
.scroll-btn--next { right: -6px; }

.detail-block { margin-bottom: 44px; }
.detail-block h2 { font-size: 1.35rem; margin: 0 0 18px; }
.chips { display: flex; flex-wrap: wrap; gap: 12px; }
.chip {
  padding: 10px 18px; border-radius: 999px; background: var(--surface);
  border: 1px solid var(--line); font-size: 0.95rem; transition: all 0.2s ease;
}
.chip:not(.chip--disabled):hover { border-color: var(--accent); background: rgba(124,154,146,0.08); color: var(--accent-deep); transform: translateY(-2px); }
.chip--disabled { color: var(--muted); opacity: 0.6; cursor: default; }

/* ---------- Lightbox ---------- */
.lightbox {
  position: fixed; inset: 0; z-index: 100; display: none;
  align-items: center; justify-content: center;
  background: rgba(28, 30, 34, 0.86); backdrop-filter: blur(4px); padding: 24px;
}
.lightbox.open { display: flex; }
.lightbox img { max-width: min(90vw, 820px); max-height: 84vh; border-radius: var(--radius); box-shadow: 0 30px 80px rgba(0,0,0,0.4); }
.lb-btn {
  position: absolute; background: rgba(255,255,255,0.14); color: #fff; border: none;
  width: 52px; height: 52px; border-radius: 50%; font-size: 1.6rem; cursor: pointer;
  display: grid; place-items: center; transition: background 0.2s ease;
}
.lb-btn:hover { background: rgba(255,255,255,0.28); }
.lb-prev { left: 20px; top: 50%; transform: translateY(-50%); }
.lb-next { right: 20px; top: 50%; transform: translateY(-50%); }
.lb-close { top: 20px; right: 20px; width: 46px; height: 46px; font-size: 1.3rem; }

/* ---------- Footer ---------- */
.site-footer {
  border-top: 1px solid var(--line); margin-top: 40px; padding: 40px 0;
  color: var(--muted); font-size: 0.9rem;
}
.site-footer .wrap { display: flex; justify-content: space-between; flex-wrap: wrap; gap: 12px; }

.notice { color: var(--muted); background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius-sm); padding: 20px; }

/* ---------- Responsive ---------- */
@media (max-width: 640px) {
  .nav-links { display: none; }
  .hero { padding: 64px 0 48px; }
  .section { padding: 48px 0; }
  .emotion-grid { grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 16px; }
  .scroll-btn { display: none; }
  .wrap { padding: 0 18px; }
}
