/* ==========================================================================
   Resepi Fesbuk — static theme
   Design language: Trajectory (Fraunces display serif, terracotta accent,
   pastel sky field, cream paper). Zero JS required for content.
   ========================================================================== */

:root {
  --cream: #faf7f2;
  --cream-deep: #f3ede2;
  --ink: #1a1815;
  --ink-soft: #47403a;
  --ink-mute: #7d736a;
  --line: #e3d9c9;
  --terracotta: #c2542a;
  --terracotta-soft: #e8a882;
  --pandan: #4a6b4a;
  --sky-1: #dfe9f3;
  --sky-2: #f6e0d8;
  --sky-3: #e9e2f3;
  --sky-4: #fdf3e3;

  --font-display: "Fraunces", Georgia, "Times New Roman", serif;
  --font-body: "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  --font-mono: "JetBrains Mono", ui-monospace, monospace;

  --max: 1180px;
  --radius: 14px;
}

*, *::before, *::after { box-sizing: border-box; }
* { -webkit-tap-highlight-color: transparent; }

html {
  scroll-behavior: smooth;
  -webkit-text-size-adjust: 100%;
  scroll-padding-top: 84px;
}

body {
  margin: 0;
  background: var(--cream);
  color: var(--ink);
  font-family: var(--font-body);
  font-size: 17px;
  line-height: 1.65;
  font-feature-settings: "ss01", "cv01";
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
}

::selection { background: var(--terracotta); color: #fff; }

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

a { color: var(--terracotta); text-decoration: none; }
a:hover { text-decoration: underline; }

/* ---------- Type ---------- */
h1, h2, h3, h4 {
  font-family: var(--font-display);
  font-weight: 400;
  letter-spacing: -0.02em;
  line-height: 1.1;
  margin: 0 0 .5em;
  color: var(--ink);
}
h1 { font-size: clamp(2rem, 5vw, 3.4rem); font-weight: 300; letter-spacing: -0.03em; }
h2 { font-size: clamp(1.45rem, 3vw, 2rem); }
h3 { font-size: 1.2rem; }

.display { font-family: var(--font-display); font-weight: 300; letter-spacing: -0.03em; line-height: .98; }
.display em { font-style: italic; font-weight: 400; color: var(--terracotta); }

.eyebrow {
  font-family: var(--font-mono);
  font-size: .68rem;
  letter-spacing: .18em;
  text-transform: uppercase;
  color: var(--ink-mute);
  display: block;
  margin-bottom: .9rem;
}

p { margin: 0 0 1em; }

/* ---------- Layout ---------- */
.wrap { max-width: var(--max); margin: 0 auto; padding: 0 20px; }
.wrap-narrow { max-width: 760px; margin: 0 auto; padding: 0 20px; }

section { padding: 72px 0; }

/* ---------- Header ---------- */
.site-header {
  position: sticky; top: 0; z-index: 50;
  background: rgba(250, 247, 242, .88);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--line);
}
.site-header .wrap {
  display: flex; align-items: center; justify-content: space-between;
  gap: 20px; height: 68px;
}
.brand {
  font-family: var(--font-display);
  font-size: 1.32rem; font-weight: 500;
  letter-spacing: -0.02em; color: var(--ink);
  text-decoration: none; white-space: nowrap;
}
.brand:hover { text-decoration: none; }
.brand em { font-style: italic; color: var(--terracotta); }

.site-nav { display: flex; gap: 26px; align-items: center; }
.site-nav a {
  color: var(--ink-soft); font-size: .93rem; font-weight: 500;
  text-decoration: none; white-space: nowrap;
}
.site-nav a:hover { color: var(--terracotta); text-decoration: none; }

@media (max-width: 780px) {
  .site-nav { gap: 16px; }
  .site-nav a.hide-sm { display: none; }
}

/* ---------- Hero ---------- */
.sky-field {
  background:
    radial-gradient(58% 44% at 18% 12%, var(--sky-1) 0%, transparent 62%),
    radial-gradient(52% 42% at 84% 22%, var(--sky-2) 0%, transparent 60%),
    radial-gradient(62% 50% at 50% 88%, var(--sky-3) 0%, transparent 64%),
    radial-gradient(48% 38% at 92% 76%, var(--sky-4) 0%, transparent 58%),
    linear-gradient(180deg, var(--cream) 0%, var(--cream-deep) 100%);
}

.hero { padding: 84px 0 64px; text-align: center; }
.hero h1 { max-width: 20ch; margin: 0 auto .4em; }
.hero .lede {
  font-size: 1.12rem; color: var(--ink-soft);
  max-width: 56ch; margin: 0 auto 1.6em;
}
.hero-meta {
  font-family: var(--font-mono); font-size: .74rem;
  letter-spacing: .12em; text-transform: uppercase; color: var(--ink-mute);
}

/* ---------- Search ---------- */
.search-box { max-width: 520px; margin: 0 auto 8px; }
.search-box input {
  width: 100%; padding: 15px 20px; font-size: 1rem;
  font-family: var(--font-body); color: var(--ink);
  background: #fff; border: 1px solid var(--line); border-radius: 99px;
  outline: none; transition: border-color .2s, box-shadow .2s;
}
.search-box input:focus {
  border-color: var(--terracotta-soft);
  box-shadow: 0 0 0 4px rgba(194, 84, 42, .09);
}

/* ---------- Filter pills ---------- */
.pills { display: flex; flex-wrap: wrap; gap: 9px; justify-content: center; margin: 26px 0 0; }
.pill {
  display: inline-block; padding: 7px 15px; border-radius: 99px;
  border: 1px solid var(--line); background: transparent;
  color: var(--ink-soft); font-size: .85rem; font-weight: 500;
  text-decoration: none; transition: all .2s; white-space: nowrap;
}
.pill:hover { border-color: var(--ink-mute); color: var(--ink); text-decoration: none; }
.pill[aria-current="page"], .pill.active {
  background: var(--ink); border-color: var(--ink); color: var(--cream);
}

/* ---------- Recipe grid ---------- */
.grid {
  display: grid; gap: 26px;
  grid-template-columns: repeat(auto-fill, minmax(268px, 1fr));
}
.rcard {
  display: flex; flex-direction: column;
  background: #fff; border: 1px solid var(--line);
  border-radius: var(--radius); overflow: hidden;
  text-decoration: none; color: inherit;
  transition: transform .45s cubic-bezier(.22,1,.36,1),
              box-shadow .45s cubic-bezier(.22,1,.36,1),
              border-color .3s;
}
.rcard:hover {
  transform: translateY(-6px);
  border-color: var(--terracotta-soft);
  box-shadow: 0 22px 48px -18px rgba(120, 72, 40, .28);
  text-decoration: none;
}
.rcard-img {
  aspect-ratio: 4/3; overflow: hidden; background: var(--cream-deep);
}
.rcard-img img {
  width: 100%; height: 100%; object-fit: cover;
  transition: transform .9s cubic-bezier(.22,1,.36,1);
}
.rcard:hover .rcard-img img { transform: scale(1.055); }
.rcard-body { padding: 18px 20px 22px; display: flex; flex-direction: column; flex: 1; }
.rcard-cat {
  font-family: var(--font-mono); font-size: .64rem; letter-spacing: .14em;
  text-transform: uppercase; color: var(--terracotta); margin-bottom: 9px;
}
.rcard h3 {
  font-size: 1.13rem; line-height: 1.28; margin: 0 0 9px;
  letter-spacing: -0.015em; font-weight: 500;
}
.rcard p {
  font-size: .89rem; color: var(--ink-mute); line-height: 1.55;
  margin: 0 0 14px; flex: 1;
  display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical;
  overflow: hidden;
}
.rcard-foot {
  font-family: var(--font-mono); font-size: .7rem; letter-spacing: .06em;
  color: var(--ink-mute); text-transform: uppercase;
  display: flex; gap: 14px; align-items: center;
}

/* ---------- Recipe detail ---------- */
.recipe-head { padding: 44px 0 30px; }
.breadcrumb {
  font-size: .82rem; color: var(--ink-mute); margin-bottom: 20px;
  display: flex; flex-wrap: wrap; gap: 8px; align-items: center;
}
.breadcrumb a { color: var(--ink-mute); }
.breadcrumb a:hover { color: var(--terracotta); }
.breadcrumb span[aria-hidden] { opacity: .45; }

.recipe-hero-img {
  width: 100%; max-height: 520px; object-fit: cover;
  border-radius: var(--radius); margin: 26px 0 34px;
  border: 1px solid var(--line);
}

.recipe-intro { font-size: 1.06rem; color: var(--ink-soft); margin-bottom: 1.6em; }

.recipe-facts {
  display: flex; flex-wrap: wrap; gap: 10px; margin: 0 0 30px;
  padding: 16px 0; border-top: 1px solid var(--line); border-bottom: 1px solid var(--line);
}
.fact {
  font-family: var(--font-mono); font-size: .72rem; letter-spacing: .07em;
  text-transform: uppercase; color: var(--ink-soft);
  background: var(--cream-deep); padding: 5px 12px; border-radius: 99px;
}

.recipe-cols { display: grid; grid-template-columns: 300px 1fr; gap: 46px; align-items: start; }
@media (max-width: 860px) { .recipe-cols { grid-template-columns: 1fr; gap: 34px; } }

.ing-box {
  background: #fff; border: 1px solid var(--line);
  border-radius: var(--radius); padding: 24px 26px;
  position: sticky; top: 88px;
}
@media (max-width: 860px) { .ing-box { position: static; } }
.ing-box h2 { font-size: 1.02rem; font-family: var(--font-mono); letter-spacing: .14em; text-transform: uppercase; color: var(--ink-mute); font-weight: 500; margin-bottom: 16px; }
.ing-box ul { list-style: none; margin: 0; padding: 0; }
.ing-box li {
  padding: 8px 0 8px 22px; position: relative;
  font-size: .93rem; line-height: 1.5; border-bottom: 1px solid var(--cream-deep);
}
.ing-box li:last-child { border-bottom: none; }
.ing-box li::before {
  content: ""; position: absolute; left: 4px; top: 16px;
  width: 6px; height: 6px; border-radius: 50%; background: var(--terracotta-soft);
}

.steps { counter-reset: step; list-style: none; margin: 0; padding: 0; }
.steps > li {
  counter-increment: step; position: relative;
  padding: 0 0 26px 52px; margin-bottom: 4px;
}
.steps > li::before {
  content: counter(step);
  position: absolute; left: 0; top: -2px;
  width: 34px; height: 34px; border-radius: 50%;
  background: var(--cream-deep); border: 1px solid var(--line);
  display: flex; align-items: center; justify-content: center;
  font-family: var(--font-mono); font-size: .82rem; color: var(--terracotta);
  font-weight: 600;
}
.steps > li::after {
  content: ""; position: absolute; left: 17px; top: 36px; bottom: 4px;
  width: 1px; background: var(--line);
}
.steps > li:last-child::after { display: none; }
.steps .substep {
  display: block; font-family: var(--font-display); font-size: 1.08rem;
  color: var(--ink); margin: 0 0 6px; letter-spacing: -0.01em;
}

.tips-box {
  margin-top: 40px; padding: 26px 30px;
  background: var(--sky-4); border-left: 3px solid var(--terracotta);
  border-radius: 0 var(--radius) var(--radius) 0;
}
.tips-box h2 { font-size: 1rem; font-family: var(--font-mono); letter-spacing: .14em; text-transform: uppercase; color: var(--terracotta); font-weight: 600; margin-bottom: 14px; }
.tips-box ul { margin: 0; padding-left: 20px; }
.tips-box li { margin-bottom: 10px; font-size: .95rem; line-height: 1.6; }
.tips-box li:last-child { margin-bottom: 0; }

/* ---------- Source / attribution ---------- */
.source-note {
  margin-top: 44px; padding-top: 22px; border-top: 1px solid var(--line);
  font-size: .84rem; color: var(--ink-mute);
}

/* ---------- Category cards (home) ---------- */
.cat-grid { display: grid; gap: 14px; grid-template-columns: repeat(auto-fill, minmax(178px, 1fr)); }
.cat-card {
  display: flex; align-items: center; justify-content: space-between; gap: 10px;
  padding: 17px 20px; background: #fff; border: 1px solid var(--line);
  border-radius: 12px; color: var(--ink); text-decoration: none;
  font-weight: 500; font-size: .95rem; transition: all .25s;
}
.cat-card:hover {
  border-color: var(--terracotta-soft); color: var(--terracotta);
  transform: translateY(-2px); text-decoration: none;
}
.cat-card .n {
  font-family: var(--font-mono); font-size: .74rem; color: var(--ink-mute);
}

/* ---------- Pagination ---------- */
.pager { display: flex; gap: 8px; justify-content: center; align-items: center; margin-top: 54px; flex-wrap: wrap; }
.pager a, .pager span {
  min-width: 42px; height: 42px; padding: 0 14px;
  display: inline-flex; align-items: center; justify-content: center;
  border: 1px solid var(--line); border-radius: 10px;
  color: var(--ink-soft); font-size: .9rem; text-decoration: none;
  transition: all .2s;
}
.pager a:hover { border-color: var(--terracotta); color: var(--terracotta); text-decoration: none; }
.pager .current { background: var(--ink); border-color: var(--ink); color: var(--cream); }
.pager .gap { border: none; }

/* ---------- Footer ---------- */
.site-footer {
  border-top: 1px solid var(--line); background: var(--cream-deep);
  padding: 56px 0 40px; margin-top: 60px;
}
.footer-grid { display: grid; grid-template-columns: 1.6fr 1fr 1fr; gap: 40px; margin-bottom: 40px; }
@media (max-width: 780px) { .footer-grid { grid-template-columns: 1fr; gap: 28px; } }
.footer-grid h4 {
  font-family: var(--font-mono); font-size: .7rem; letter-spacing: .15em;
  text-transform: uppercase; color: var(--ink-mute); margin-bottom: 14px;
  font-weight: 600;
}
.footer-grid ul { list-style: none; margin: 0; padding: 0; }
.footer-grid li { margin-bottom: 9px; }
.footer-grid a { color: var(--ink-soft); font-size: .9rem; }
.footer-grid a:hover { color: var(--terracotta); }
.footer-about { font-size: .9rem; color: var(--ink-soft); line-height: 1.65; max-width: 40ch; }
.footer-base {
  border-top: 1px solid var(--line); padding-top: 24px;
  font-size: .82rem; color: var(--ink-mute);
  display: flex; justify-content: space-between; gap: 16px; flex-wrap: wrap;
}

/* ---------- Utility ---------- */
.center { text-align: center; }
.mt-0 { margin-top: 0; }
.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;
}

/* ---------- Empty state ---------- */
.empty { text-align: center; padding: 60px 20px; color: var(--ink-mute); }

/* ---------- Reduced motion ---------- */
/* ---------- Share bar ---------- */
.share-bar {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
  margin: 26px 0 34px;
  padding: 16px 0;
  border-top: 1px solid var(--rule, #e7e1d8);
  border-bottom: 1px solid var(--rule, #e7e1d8);
}
.share-label {
  font-size: .78rem;
  letter-spacing: .08em;
  text-transform: uppercase;
  color: var(--ink-mute, #8a8175);
  margin-right: 4px;
}
.share-btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 7px 13px;
  border-radius: 999px;
  border: 1px solid var(--rule, #e7e1d8);
  background: #fff;
  color: var(--ink, #2c2723);
  font-size: .82rem;
  font-weight: 500;
  line-height: 1;
  text-decoration: none;
  cursor: pointer;
  font-family: inherit;
  transition: background .18s ease, border-color .18s ease, transform .18s ease;
}
.share-btn:hover { background: var(--cream-deep, #f6f1e8); transform: translateY(-1px); }
.share-btn:focus-visible { outline: 2px solid var(--accent, #C25E3A); outline-offset: 2px; }
.share-btn svg { flex: 0 0 auto; }
.share-whatsapp:hover { color: #128C7E; border-color: #25D366; }
.share-telegram:hover { color: #229ED9; border-color: #229ED9; }
.share-facebook:hover { color: #1877F2; border-color: #1877F2; }
.share-x:hover { color: #000; border-color: #000; }
.share-pinterest:hover { color: #E60023; border-color: #E60023; }
.share-threads:hover { color: #000; border-color: #000; }
.share-linkedin:hover { color: #0A66C2; border-color: #0A66C2; }
.share-email:hover { color: var(--accent, #C25E3A); border-color: var(--accent, #C25E3A); }
.share-copy:hover { color: var(--accent, #C25E3A); border-color: var(--accent, #C25E3A); }

@media (max-width: 560px) {
  .share-btn span { display: none; }
  .share-btn { padding: 9px; }
  .share-copy span { display: inline; }
}

/* ---------- Related recipes ---------- */
.related-block {
  margin: 44px 0 20px;
  padding-top: 28px;
  border-top: 2px solid var(--rule, #e7e1d8);
}
.related-block h2 { font-size: 1.12rem; margin: 0 0 16px; }
.related-list {
  list-style: none;
  padding: 0;
  margin: 0;
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
  gap: 10px 22px;
}
.related-list li { margin: 0; }
.related-list a {
  display: block;
  padding: 10px 14px;
  border-radius: 10px;
  background: var(--cream-deep, #f6f1e8);
  font-size: .9rem;
  line-height: 1.35;
  text-decoration: none;
  color: var(--ink, #2c2723);
  transition: background .18s ease, color .18s ease;
}
.related-list a:hover { background: var(--accent, #C25E3A); color: #fff; }

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