/*
Theme Name: Lufthi
Theme URI: https://lufthi.com
Author: Abdulrahman Lufthi
Description: Tema custom Lufthi.com — blog teknologi & AI dengan desain gelap modern, siap monetisasi (slot AdSense, disclosure afiliasi, newsletter).
Version: 1.0
License: GPL-2.0-or-later
Text Domain: lufthi
*/

:root {
  --bg: #0b0f19;
  --bg-soft: #111827;
  --card: #151d2e;
  --border: #24304a;
  --text: #e5eaf3;
  --muted: #94a3b8;
  --accent: #38bdf8;
  --accent-2: #818cf8;
  --grad: linear-gradient(100deg, #38bdf8, #818cf8);
  --radius: 14px;
  --font-body: 'Inter', system-ui, sans-serif;
  --font-head: 'Sora', 'Inter', sans-serif;
}
* { margin: 0; padding: 0; box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  font-family: var(--font-body);
  background: var(--bg);
  color: var(--text);
  line-height: 1.7;
  -webkit-font-smoothing: antialiased;
}
.container { max-width: 1080px; margin: 0 auto; padding: 0 20px; }
h1,h2,h3,h4 { font-family: var(--font-head); line-height: 1.25; }
a { color: var(--accent); text-decoration: none; }

/* ── header ── */
.site-header {
  position: sticky; top: 0; z-index: 50;
  background: rgba(11,15,25,.85);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--border);
}
.nav-wrap { display: flex; align-items: center; justify-content: space-between; height: 64px; }
.logo {
  font-family: var(--font-head); font-weight: 800; font-size: 1.35rem; color: var(--text);
}
.logo span { background: var(--grad); -webkit-background-clip: text; background-clip: text; color: transparent; }
.nav { display: flex; gap: 26px; }
.nav a { color: var(--muted); font-weight: 500; font-size: .95rem; transition: color .2s; }
.nav a:hover { color: var(--text); }
.nav-toggle { display: none; background: none; border: 0; color: var(--text); font-size: 1.5rem; cursor: pointer; }

/* ── hero ── */
.hero { padding: 90px 0 70px; text-align: center;
  background:
    radial-gradient(600px 300px at 20% 0%, rgba(56,189,248,.12), transparent),
    radial-gradient(600px 300px at 80% 10%, rgba(129,140,248,.12), transparent);
}
.hero-kicker { color: var(--accent); font-weight: 600; letter-spacing: .12em; text-transform: uppercase; font-size: .8rem; margin-bottom: 18px; }
.hero h1 { font-size: clamp(2.2rem, 5.5vw, 3.6rem); font-weight: 800; max-width: 760px; margin: 0 auto 22px; }
.hero h1 em { font-style: normal; background: var(--grad); -webkit-background-clip: text; background-clip: text; color: transparent; }
.hero-sub { color: var(--muted); max-width: 640px; margin: 0 auto 32px; font-size: 1.1rem; }
.hero-cta { display: flex; gap: 14px; justify-content: center; flex-wrap: wrap; }
.btn { display: inline-block; padding: 13px 28px; border-radius: 999px; font-weight: 600; transition: transform .15s, box-shadow .15s; }
.btn-primary { background: var(--grad); color: #06121f; }
.btn-primary:hover { transform: translateY(-2px); box-shadow: 0 8px 30px rgba(56,189,248,.35); }
.btn-ghost { border: 1px solid var(--border); color: var(--text); }
.btn-ghost:hover { border-color: var(--accent); }

/* ── sections & cards ── */
.section { padding: 56px 0; }
.section-head { display: flex; align-items: baseline; justify-content: space-between; margin-bottom: 28px; }
.section-head h2 { font-size: 1.7rem; }
.see-all { color: var(--muted); font-size: .95rem; }
.see-all:hover { color: var(--accent); }
.grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); gap: 22px; }
.card {
  background: var(--card); border: 1px solid var(--border); border-radius: var(--radius);
  transition: transform .18s, border-color .18s;
}
.card:hover { transform: translateY(-4px); border-color: var(--accent); }
.card a { display: block; padding: 24px; color: inherit; height: 100%; }
.card-cat { color: var(--accent); font-size: .75rem; font-weight: 700; text-transform: uppercase; letter-spacing: .08em; }
.card h3 { margin: 10px 0 10px; font-size: 1.15rem; }
.card p { color: var(--muted); font-size: .93rem; display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; }
.card-meta { margin-top: 16px; color: var(--muted); font-size: .8rem; }

.page-head { padding: 60px 0 10px; text-align: center; }
.page-head h1 { font-size: 2.2rem; margin-bottom: 10px; }
.page-head p { color: var(--muted); max-width: 560px; margin: 0 auto 30px; }
.page-head + .grid { margin-bottom: 70px; }

/* ── post ── */
.post { max-width: 760px; padding-top: 50px; }
.post-head { text-align: center; margin-bottom: 30px; }
.post-cat { font-size: .8rem; font-weight: 700; text-transform: uppercase; letter-spacing: .08em; }
.post-head h1 { font-size: clamp(1.8rem, 4vw, 2.6rem); margin: 14px 0; }
.post-meta { color: var(--muted); font-size: .9rem; }
.prose { font-size: 1.06rem; }
.prose h2 { margin: 42px 0 16px; font-size: 1.55rem; }
.prose h3 { margin: 32px 0 12px; font-size: 1.2rem; }
.prose p { margin-bottom: 18px; }
.prose ul, .prose ol { margin: 0 0 18px 24px; }
.prose li { margin-bottom: 8px; }
.prose blockquote { border-left: 3px solid var(--accent); padding: 4px 20px; margin: 24px 0; color: var(--muted); font-style: italic; }
.prose code { background: var(--bg-soft); border: 1px solid var(--border); border-radius: 6px; padding: 2px 7px; font-size: .9em; }
.prose pre { background: var(--bg-soft); border: 1px solid var(--border); border-radius: var(--radius); padding: 18px; overflow-x: auto; margin-bottom: 18px; }
.prose pre code { background: none; border: 0; padding: 0; }
.prose table { width: 100%; border-collapse: collapse; margin-bottom: 20px; font-size: .95rem; }
.prose th, .prose td { border: 1px solid var(--border); padding: 10px 14px; text-align: left; }
.prose th { background: var(--bg-soft); }
.prose img { max-width: 100%; border-radius: var(--radius); }
.prose strong { color: #fff; }
.page-prose { max-width: 760px; margin: 0 auto; padding: 50px 20px 70px; }
.page-prose h1 { font-size: 2.1rem; margin-bottom: 24px; }

/* affiliate CTA box — pakai di markdown: <div class="cta-box">...</div> */
.cta-box {
  background: linear-gradient(135deg, rgba(56,189,248,.1), rgba(129,140,248,.1));
  border: 1px solid var(--accent); border-radius: var(--radius);
  padding: 24px; margin: 28px 0;
}
.cta-box a.btn { margin-top: 8px; }

.disclosure {
  margin: 36px 0; padding: 16px 20px; border-radius: var(--radius);
  background: var(--bg-soft); border: 1px solid var(--border);
  color: var(--muted); font-size: .87rem;
}

/* ad slots — invisible sampai diisi kode AdSense */
.ad-slot:empty { display: none; }
.ad-slot { margin: 30px auto; text-align: center; }

/* ── newsletter ── */
.newsletter { background: var(--bg-soft); border-top: 1px solid var(--border); border-bottom: 1px solid var(--border); padding: 60px 0; text-align: center; margin-top: 40px; }
.newsletter h2 { font-size: 1.6rem; margin-bottom: 10px; }
.newsletter p { color: var(--muted); max-width: 520px; margin: 0 auto 26px; }
.nl-form { display: flex; gap: 10px; justify-content: center; flex-wrap: wrap; }
.nl-form input {
  background: var(--bg); border: 1px solid var(--border); color: var(--text);
  padding: 13px 18px; border-radius: 999px; width: min(340px, 100%); font-size: 1rem;
}
.nl-form input:focus { outline: none; border-color: var(--accent); }
.nl-form button { background: var(--grad); color: #06121f; border: 0; padding: 13px 28px; border-radius: 999px; font-weight: 700; font-size: 1rem; cursor: pointer; }

/* ── footer ── */
.site-footer { padding: 56px 0 24px; }
.footer-grid { display: grid; grid-template-columns: 2fr 1fr 1fr; gap: 36px; margin-bottom: 36px; }
.footer-grid p { color: var(--muted); font-size: .9rem; margin-top: 12px; }
.footer-grid h4 { margin-bottom: 14px; font-size: .95rem; }
.footer-grid a { display: block; color: var(--muted); font-size: .9rem; margin-bottom: 8px; }
.footer-grid a:hover { color: var(--accent); }
.footer-grid a.logo { display: inline; font-size: 1.2rem; }
.copyright { border-top: 1px solid var(--border); padding-top: 22px; color: var(--muted); font-size: .85rem; text-align: center; }

/* ── mobile ── */
@media (max-width: 720px) {
  .nav { display: none; position: absolute; top: 64px; left: 0; right: 0;
    background: var(--bg-soft); flex-direction: column; padding: 20px; gap: 16px;
    border-bottom: 1px solid var(--border); }
  .nav.open { display: flex; }
  .nav-toggle { display: block; }
  .footer-grid { grid-template-columns: 1fr; }
  .hero { padding: 60px 0 50px; }
}

/* ── WordPress specific ── */
.wp-block-image img, .prose img { height: auto; }
.aligncenter { display: block; margin: 0 auto; }
.screen-reader-text { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0,0,0,0); }
.pagination { display: flex; gap: 10px; justify-content: center; margin: 40px 0 70px; }
.pagination .page-numbers { padding: 8px 16px; border: 1px solid var(--border); border-radius: 8px; color: var(--muted); }
.pagination .current, .pagination .page-numbers:hover { border-color: var(--accent); color: var(--text); }
