/* ── SatuCerita public theme (landing + library) ── */
:root {
  --paper:   #f6f3ed;
  --card:    #fffdf9;
  --ink:     #15130f;
  --ink-2:   #4b463e;
  --mute:    #8a8378;
  --line:    #e4ded3;
  --green:   #1f3b2d;
  --green-2: #2d5540;
  --leaf:    #cfe0c9;
  --blush:   #f3dcd2;
  --butter:  #f3e3a6;
  --coral:   #e0633f;
  --navy:    #1d3557;
  --wine:    #5b2340;

  --serif: 'Instrument Serif', serif;
  --sans:  'Geist', system-ui, -apple-system, sans-serif;
  --ease:  cubic-bezier(.2,.8,.2,1);
}

*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
body {
  font-family: var(--sans);
  background: var(--paper);
  color: var(--ink);
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}
a { color: var(--green); text-decoration: none; }
a:hover { color: var(--coral); }
button, input, select { font: inherit; color: inherit; }
button { background: none; border: 0; cursor: pointer; }
img { display: block; max-width: 100%; }
.i { font-size: 1.15em; line-height: 1; vertical-align: -0.15em; }
.wrap { max-width: 1240px; margin: 0 auto; padding: 0 28px; }

/* ── NAV ── */
.nav {
  position: fixed; top: 16px; left: 50%; transform: translateX(-50%); z-index: 90;
  display: flex; align-items: center; gap: 28px;
  padding: 8px 8px 8px 20px;
  background: rgba(255,253,249,.82);
  backdrop-filter: blur(14px) saturate(160%);
  -webkit-backdrop-filter: blur(14px) saturate(160%);
  border: 1px solid var(--line); border-radius: 100px;
  box-shadow: 0 8px 30px -12px rgba(21,19,15,.12);
  width: max-content; max-width: calc(100% - 24px);
}
.logo { display: flex; align-items: center; gap: 8px; font-weight: 600; font-size: 17px; letter-spacing: -.02em; color: var(--ink); }
.logo:hover { color: var(--ink); }
.logo .dot { width: 22px; height: 22px; border-radius: 50%; background: var(--green); display: grid; place-items: center; color: var(--butter); font-size: 12px; }
.nav-links { display: flex; gap: 22px; }
.nav-links a { font-size: 14px; color: var(--ink-2); }
.nav-links a:hover, .nav-links a.on { color: var(--ink); }
.nav-links a.on { font-weight: 500; }

/* ── BUTTONS ── */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  padding: 12px 20px; border-radius: 100px;
  font-size: 14px; font-weight: 500; white-space: nowrap;
  transition: transform .15s, background .2s, color .2s, border-color .2s;
}
.btn:active { transform: scale(.97); }
.btn-dark { background: var(--ink); color: var(--paper); }
.btn-dark:hover { background: var(--green); color: var(--paper); }
.btn-green { background: var(--green); color: #fff; }
.btn-green:hover { background: var(--green-2); color: #fff; }
.btn-ghost { border: 1px solid var(--line); background: var(--card); color: var(--ink); }
.btn-ghost:hover { border-color: var(--ink); color: var(--ink); }
.btn-butter { background: var(--butter); color: var(--ink); }
.btn-butter:hover { background: #fff; color: var(--ink); }
.btn-sm { padding: 9px 14px; font-size: 13px; }

/* ── SECTION HEAD ── */
section { position: relative; }
.sec { padding: 120px 0; }
.eyebrow {
  display: inline-flex; align-items: center; gap: 8px;
  font-size: 13px; font-weight: 500; color: var(--green);
  background: var(--leaf); padding: 6px 12px; border-radius: 100px;
}
.h2 {
  font-family: var(--serif); font-weight: 400;
  font-size: clamp(40px, 5vw, 68px); line-height: 1; letter-spacing: -.02em;
  margin: 18px 0 16px; text-wrap: balance;
}
.h2 em { font-style: italic; color: var(--green); }
.lead { font-size: 17px; color: var(--ink-2); max-width: 520px; text-wrap: pretty; }
.head-row { display: flex; align-items: flex-end; justify-content: space-between; gap: 32px; flex-wrap: wrap; margin-bottom: 48px; }
.head-row > div:first-child { max-width: 680px; }
.head-row .lead { max-width: 440px; }

/* ── CHIPS ── */
.chips { display: flex; gap: 8px; flex-wrap: wrap; }
.chip {
  display: inline-flex; align-items: center; gap: 6px;
  padding: 10px 16px; border-radius: 100px;
  border: 1px solid var(--line); background: var(--card);
  font-size: 14px; color: var(--ink-2); white-space: nowrap;
  transition: background .2s, border-color .2s, color .2s;
}
.chip:hover { border-color: var(--ink); color: var(--ink); }
.chip.on { background: var(--ink); border-color: var(--ink); color: #fff; }
.chip .n { font-size: 12px; opacity: .55; font-variant-numeric: tabular-nums; }

/* ── TEMPLATE CARD (shared: landing + library) ── */
.tgrid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 28px 18px; }
.tc { display: flex; flex-direction: column; min-width: 0; }
.tc[hidden] { display: none; }
.tc.anim { animation: tcIn .5s var(--ease) both; animation-delay: var(--d, 0ms); }
@keyframes tcIn { from { opacity: 0; transform: translateY(14px); } }

.tc .frame {
  display: block; position: relative;
  aspect-ratio: 2 / 3;
  border-radius: 24px; overflow: hidden;
  border: 1px solid var(--line); background: var(--leaf);
  isolation: isolate;
}
.tc .frame .bg {
  position: absolute; inset: 0; width: 100%; height: 100%;
  object-fit: cover; object-position: top center;
  transition: transform .8s var(--ease);
}
.tc:hover .frame .bg { transform: scale(1.05); }
.tc .frame.has-img::after {
  content: ''; position: absolute; inset: 0; z-index: 1; pointer-events: none;
  background: linear-gradient(180deg, rgba(21,19,15,.18) 0%, transparent 22%);
}

/* fallback cover when there is no thumbnail */
.tc .cover {
  position: absolute; inset: 0;
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  text-align: center; padding: 28px 18px;
}
.tc .cover::before {
  content: '&'; position: absolute; right: -6%; bottom: -14%;
  font-family: var(--serif); font-style: italic; font-size: 260px; line-height: 1;
  opacity: .08; pointer-events: none;
}
.tc .cover .k { font-size: 9px; letter-spacing: .3em; text-transform: uppercase; opacity: .75; }
.tc .cover .n { font-family: var(--serif); font-size: clamp(28px, 2.6vw, 38px); line-height: 1.02; margin-top: 10px; overflow-wrap: anywhere; }
.tc .cover .n em { font-style: italic; display: block; font-size: .7em; margin: 2px 0; }
.tc .cover .t { margin-top: 14px; font-size: 11px; letter-spacing: .08em; opacity: .7; }
.tc .tone-0 { background: var(--green); color: #fff; } .tc .tone-0 .n em { color: var(--butter); }
.tc .tone-1 { background: var(--blush); color: var(--ink); } .tc .tone-1 .n em { color: var(--coral); }
.tc .tone-2 { background: var(--ink); color: #efe9dc; } .tc .tone-2 .n em { color: var(--butter); }
.tc .tone-3 { background: var(--leaf); color: var(--green); } .tc .tone-3 .n em { color: var(--green-2); }
.tc .tone-4 { background: var(--butter); color: var(--ink); } .tc .tone-4 .n em { color: var(--coral); }
.tc .tone-5 { background: var(--navy); color: #fff; } .tc .tone-5 .n em { color: var(--butter); }
.tc .tone-6 { background: var(--wine); color: #fff; } .tc .tone-6 .n em { color: var(--blush); }


.tc .badges { position: absolute; top: 12px; left: 12px; right: 56px; z-index: 2; display: flex; gap: 6px; flex-wrap: wrap; }
.tc .badge {
  font-size: 11px; font-weight: 600; line-height: 1.2;
  padding: 5px 10px; border-radius: 100px;
  background: #fff; color: var(--ink);
  box-shadow: 0 4px 12px -6px rgba(21,19,15,.3);
}
.tc .badge.hot { background: var(--butter); }
.tc .view {
  position: absolute; top: 12px; right: 12px; z-index: 2;
  width: 36px; height: 36px; border-radius: 50%;
  background: #fff; color: var(--ink);
  display: grid; place-items: center;
  opacity: 0; transform: scale(.8); transition: opacity .25s, transform .25s;
}
.tc:hover .view, .tc .frame:focus-visible .view { opacity: 1; transform: none; }

.tc .info { display: flex; flex-direction: column; flex: 1; padding: 14px 4px 0; }
.tc .info .ttl { font-weight: 500; font-size: 16px; line-height: 1.3; color: var(--ink); overflow-wrap: anywhere; }
.tc .info .sub { font-size: 13px; color: var(--mute); margin-top: 2px; }
.tc .info .desc {
  font-size: 13px; color: var(--ink-2); margin-top: 8px; line-height: 1.5;
  display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden;
}
.tc .acts { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; margin-top: auto; padding-top: 14px; }

.tgrid-empty {
  text-align: center; padding: 72px 20px;
  background: var(--card); border: 1px dashed var(--line); border-radius: 28px;
  color: var(--ink-2);
}
.tgrid-empty .ic { width: 52px; height: 52px; margin: 0 auto 16px; border-radius: 16px; background: var(--leaf); color: var(--green); display: grid; place-items: center; font-size: 24px; }
.tgrid-empty h3 { font-family: var(--serif); font-weight: 400; font-size: 30px; color: var(--ink); margin-bottom: 6px; }
.tgrid-empty p { font-size: 15px; max-width: 420px; margin: 0 auto; }

/* ── FOOTER ── */
footer.site-foot { padding: 70px 0 40px; }
.fgrid { display: grid; grid-template-columns: 1.6fr 1fr 1fr; gap: 32px; padding-bottom: 40px; border-bottom: 1px solid var(--line); }
.fgrid p { font-size: 14px; color: var(--ink-2); margin-top: 12px; max-width: 300px; }
.fgrid h6 { font-size: 13px; font-weight: 600; margin-bottom: 14px; }
.fgrid a:not(.logo) { display: block; font-size: 14px; color: var(--ink-2); margin-bottom: 9px; }
.fgrid a:not(.logo):hover { color: var(--ink); }
.fbot { display: flex; justify-content: space-between; padding-top: 24px; font-size: 13px; color: var(--mute); flex-wrap: wrap; gap: 10px; }
.bigword {
  font-family: var(--serif); font-size: clamp(56px, 21vw, 260px); line-height: .8; letter-spacing: -.04em;
  text-align: center; color: var(--ink); margin-top: 40px; user-select: none;
}
.bigword em { font-style: italic; color: var(--green); }

/* ── REVEAL ── */
.rv { opacity: 0; transform: translateY(28px); transition: opacity .8s var(--ease), transform .8s var(--ease); transition-delay: var(--d, 0ms); }
.rv.in { opacity: 1; transform: none; }
.no-js .rv { opacity: 1; transform: none; }

/* ── RESPONSIVE ── */
@media (max-width: 1100px) {
  .tgrid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
}
@media (max-width: 1020px) {
  .nav { gap: 16px; }
  .nav-links a:not(.keep) { display: none; }
  .fgrid { grid-template-columns: 1fr 1fr; }
  .fgrid > :first-child { grid-column: 1 / -1; }
}
@media (max-width: 760px) {
  .wrap { padding: 0 16px; }
  .sec { padding: 84px 0; }
  .head-row { margin-bottom: 32px; gap: 18px; }
  .tgrid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 22px 12px; }
  .tc .frame { border-radius: 18px; }
  .tc .badges { top: 8px; left: 8px; right: 8px; gap: 4px; }
  .tc .badge { font-size: 10px; padding: 4px 8px; }
  .tc .view { display: none; }
  .tc .cover::before { font-size: 180px; }
  .tc .cover .n { font-size: 26px; }
  .tc .info { padding-top: 10px; }
  .tc .info .ttl { font-size: 14px; }
  .tc .info .sub, .tc .info .desc { font-size: 12px; }
  .tc .acts { grid-template-columns: 1fr; gap: 6px; padding-top: 10px; }
  .tc .acts .btn { padding: 9px 10px; font-size: 12.5px; }
}
@media (max-width: 400px) {
  .nav { padding-left: 14px; gap: 12px; }
  .nav .btn { padding: 10px 14px; font-size: 13px; }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: .01ms !important; transition-duration: .01ms !important; }
  .rv { opacity: 1; transform: none; }
}
