/*
Theme Name: ALEGO Landing
Description: Tema ALEGO dengan landing page, blog, dan artikel responsif.
Version: 1.0.0
Requires at least: 5.2
Requires PHP: 7.4
Text Domain: alego-landing
*/

:root {
  --al-bg: #f6f4ff;
  --al-surface: #fff;
  --al-ink: #1b1850;
  --al-muted: #66638c;
  --al-line: #e5e1f4;
  --al-violet: #5b3df5;
  --al-violet-dark: #442bd1;
  --al-lilac: #ece8ff;
  --al-yellow: #ffc53d;
  --al-font-display: "Bricolage Grotesque", "Trebuchet MS", sans-serif;
  --al-font-body: "Figtree", system-ui, -apple-system, "Segoe UI", sans-serif;
}

*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; scroll-padding-top: 88px; }
body {
  margin: 0;
  color: var(--al-ink);
  background: var(--al-bg);
  font: 16px/1.7 var(--al-font-body);
  -webkit-font-smoothing: antialiased;
}
body.admin-bar .site-header { top: 32px; }
a { color: inherit; }
img { max-width: 100%; height: auto; }
button, input { font: inherit; }
:focus-visible { outline: 3px solid var(--al-yellow); outline-offset: 4px; }
.screen-reader-text, .skip-link:not(:focus) {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}
.skip-link:focus {
  position: fixed;
  z-index: 10000;
  top: 12px;
  left: 12px;
  padding: 10px 16px;
  color: #fff;
  background: var(--al-ink);
  border-radius: 8px;
}
.site-container { width: min(1120px, calc(100% - 48px)); margin-inline: auto; }

/* Shared WordPress navigation */
.site-header {
  position: sticky;
  z-index: 100;
  top: 0;
  color: #fff;
  background: rgba(27, 24, 80, .97);
  box-shadow: 0 8px 28px rgba(27, 24, 80, .12);
  backdrop-filter: blur(14px);
}
.site-header__inner { min-height: 78px; display: flex; align-items: center; justify-content: space-between; gap: 28px; }
.site-brand { display: flex; flex-direction: column; min-width: 0; color: #fff; text-decoration: none; }
.site-brand__name, .site-footer__brand { font: 800 25px/1.1 var(--al-font-display); letter-spacing: -.04em; }
.site-brand__tagline { color: #c9c5e9; font-size: 12px; }
.custom-logo-link { display: inline-flex; }
.custom-logo { width: auto; max-height: 48px; }
.site-nav { display: flex; align-items: center; }
.site-nav__list { display: flex; align-items: center; gap: clamp(14px, 2.2vw, 30px); margin: 0; padding: 0; list-style: none; }
.site-nav__list a { color: #f1efff; font-size: 14px; font-weight: 600; text-decoration: none; transition: color .18s ease; }
.site-nav__list a:hover, .site-nav__list .current-menu-item > a { color: var(--al-yellow); }
.site-nav__list .menu-item:last-child a { display: inline-flex; padding: 9px 16px; color: var(--al-ink); background: var(--al-yellow); border-radius: 999px; }
.site-nav-toggle { display: none; }

/* Blog and article layouts */
.site-main { min-height: 58vh; padding: 68px 0 88px; }
.archive-heading { max-width: 720px; margin: 0 auto 42px; text-align: center; }
.eyebrow { display: inline-block; margin-bottom: 12px; color: var(--al-violet); font-size: 12px; font-weight: 800; letter-spacing: .14em; text-transform: uppercase; }
.archive-heading h1, .single-article__header h1, .empty-state h1 {
  margin: 0;
  font: 800 clamp(38px, 6vw, 64px)/1.04 var(--al-font-display);
  letter-spacing: -.045em;
}
.archive-heading h1 span { color: var(--al-violet); }
.archive-heading > p, .archive-description { max-width: 560px; margin: 16px auto 0; color: var(--al-muted); }
.archive-description > :first-child { margin-top: 0; }
.archive-search { max-width: 460px; margin: 24px auto 0; }
.search-form { display: flex; gap: 8px; }
.search-form label { flex: 1; min-width: 0; }
.search-field {
  width: 100%;
  min-height: 48px;
  padding: 10px 16px;
  color: var(--al-ink);
  background: #fff;
  border: 1px solid var(--al-line);
  border-radius: 12px;
}
.search-submit, .button-primary {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 48px;
  padding: 10px 18px;
  color: #fff;
  background: var(--al-violet);
  border: 0;
  border-radius: 12px;
  font-weight: 700;
  text-decoration: none;
  cursor: pointer;
  transition: background .18s ease, transform .18s ease;
}
.search-submit:hover, .button-primary:hover { color: #fff; background: var(--al-violet-dark); transform: translateY(-1px); }
.article-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 24px; }
.article-card {
  display: flex;
  min-width: 0;
  flex-direction: column;
  overflow: hidden;
  background: var(--al-surface);
  border: 1px solid var(--al-line);
  border-radius: 20px;
  box-shadow: 0 10px 30px rgba(27, 24, 80, .05);
  transition: transform .2s ease, box-shadow .2s ease;
}
.article-card:hover { transform: translateY(-5px); box-shadow: 0 18px 40px rgba(27, 24, 80, .11); }
.article-card__image { display: grid; place-items: center; overflow: hidden; aspect-ratio: 16 / 10; background: linear-gradient(135deg, #dcd5ff, #b8aaff); text-decoration: none; }
.article-card__image img { display: block; width: 100%; height: 100%; object-fit: cover; transition: transform .35s ease; }
.article-card:hover .article-card__image img { transform: scale(1.04); }
.article-card__placeholder { color: rgba(27, 24, 80, .7); font: 800 36px var(--al-font-display); letter-spacing: -.06em; }
.article-card__body { display: flex; flex: 1; flex-direction: column; align-items: flex-start; padding: 22px; }
.article-meta { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; color: var(--al-muted); font-size: 12px; }
.article-meta time { font-weight: 500; }
.article-category { padding: 4px 10px; color: #3926a2; background: var(--al-lilac); border-radius: 999px; font-size: 11px; font-weight: 800; text-decoration: none; }
.article-card h2 { margin: 14px 0 8px; font: 800 23px/1.2 var(--al-font-display); letter-spacing: -.025em; }
.article-card h2 a { text-decoration: none; }
.article-card h2 a:hover { color: var(--al-violet); }
.article-card__body > p { margin: 0 0 20px; color: var(--al-muted); font-size: 14px; }
.text-link, .back-link { color: var(--al-violet); font-size: 14px; font-weight: 800; text-decoration: none; }
.text-link { margin-top: auto; }
.text-link:hover, .back-link:hover { color: var(--al-violet-dark); text-decoration: underline; text-underline-offset: 4px; }
.pagination { margin-top: 42px; }
.pagination .nav-links { display: flex; flex-wrap: wrap; justify-content: center; gap: 8px; }
.pagination .page-numbers { display: grid; min-width: 42px; min-height: 42px; place-items: center; padding: 8px 12px; color: var(--al-ink); background: #fff; border: 1px solid var(--al-line); border-radius: 10px; text-decoration: none; }
.pagination .page-numbers.current, .pagination .page-numbers:hover { color: #fff; background: var(--al-violet); border-color: var(--al-violet); }
.empty-state { max-width: 680px; margin: 30px auto; padding: 60px 28px; text-align: center; background: #fff; border: 1px solid var(--al-line); border-radius: 24px; }
.empty-state p { margin: 18px 0 24px; color: var(--al-muted); }
.empty-state .search-form { max-width: 460px; margin: 20px auto 24px; }
.single-article { max-width: 820px; margin: 0 auto; }
.single-article__header { max-width: 760px; margin: 0 auto 32px; text-align: center; }
.single-article__header .back-link { display: inline-block; margin-bottom: 28px; }
.single-article__header .article-meta { justify-content: center; margin-bottom: 18px; }
.single-article__header h1 { font-size: clamp(38px, 6vw, 62px); }
.single-article__excerpt { max-width: 680px; margin: 18px auto 8px; color: var(--al-muted); font-size: 19px; }
.single-article__author { margin: 12px 0 0; color: var(--al-muted); font-size: 13px; font-weight: 700; }
.single-article__featured { overflow: hidden; margin: 0 0 42px; border-radius: 22px; background: var(--al-lilac); }
.single-article__featured img { display: block; width: 100%; max-height: 560px; object-fit: cover; }
.entry-content { max-width: 720px; margin: 0 auto; font-size: 18px; line-height: 1.85; }
.entry-content > :first-child { margin-top: 0; }
.entry-content h2, .entry-content h3, .entry-content h4 { margin: 1.8em 0 .6em; font-family: var(--al-font-display); line-height: 1.18; letter-spacing: -.025em; }
.entry-content h2 { font-size: 34px; }
.entry-content h3 { font-size: 26px; }
.entry-content p, .entry-content ul, .entry-content ol, .entry-content blockquote { margin: 0 0 1.35em; }
.entry-content a { color: var(--al-violet); }
.entry-content blockquote { margin-inline: 0; padding: 8px 0 8px 22px; color: var(--al-muted); border-left: 4px solid var(--al-violet); font-size: 21px; }
.entry-content img { border-radius: 14px; }
.entry-content figure { margin: 1.8em 0; }
.entry-content figcaption { color: var(--al-muted); font-size: 13px; text-align: center; }
.entry-content table { width: 100%; border-collapse: collapse; }
.entry-content th, .entry-content td { padding: 10px; border: 1px solid var(--al-line); text-align: left; }
.single-article__meta { max-width: 720px; margin: 34px auto 0; padding-top: 20px; border-top: 1px solid var(--al-line); }
.article-tags { display: flex; flex-wrap: wrap; gap: 8px; color: var(--al-muted); font-size: 13px; }
.article-tags a { padding: 4px 10px; color: var(--al-violet); background: #fff; border: 1px solid var(--al-line); border-radius: 999px; text-decoration: none; }
.recommended-articles { margin-top: 76px; }
.section-heading { display: flex; align-items: end; justify-content: space-between; gap: 20px; margin-bottom: 24px; }
.section-heading h2 { margin: 0; font: 800 clamp(28px, 4vw, 40px)/1.1 var(--al-font-display); letter-spacing: -.035em; }
.section-heading .eyebrow { margin-bottom: 8px; }
.page-content { max-width: 900px; }
.page-links { margin: 24px 0; }
.article-comments { max-width: 720px; margin: 38px auto 0; }
.article-comments .comments-title { font: 800 28px/1.2 var(--al-font-display); }
.article-comments .comment-list { padding-left: 22px; }
.article-comments .comment-body { margin: 18px 0; padding: 18px; background: #fff; border: 1px solid var(--al-line); border-radius: 14px; }
.article-comments .comment-meta, .article-comments .comment-notes { color: var(--al-muted); font-size: 13px; }
.article-comments .comment-form label { display: block; margin: 12px 0 5px; font-weight: 700; }
.article-comments .comment-form input:not([type="submit"]), .article-comments .comment-form textarea { width: 100%; padding: 11px 13px; border: 1px solid var(--al-line); border-radius: 10px; }
.article-comments .comment-form textarea { min-height: 150px; }

/* Shared footer */
.site-footer { color: #d3d0ed; background: #1b1850; }
.site-footer__top { display: flex; justify-content: space-between; gap: 36px; padding-top: 44px; padding-bottom: 32px; }
.site-footer__brand { display: inline-block; color: #fff; text-decoration: none; }
.site-footer__top p { max-width: 420px; margin: 10px 0 0; color: #bdb8df; font-size: 14px; }
.site-footer__links { display: flex; flex-wrap: wrap; align-items: flex-start; gap: 22px; }
.site-footer__links a, .site-footer__bottom a { color: #f1efff; font-size: 14px; font-weight: 600; text-decoration: none; }
.site-footer__links a:hover, .site-footer__bottom a:hover { color: var(--al-yellow); }
.site-footer__bottom { display: flex; justify-content: space-between; gap: 20px; padding-top: 18px; padding-bottom: 22px; border-top: 1px solid #3a358f; color: #aaa6ce; font-size: 13px; }

@media (max-width: 860px) {
  .site-container { width: min(100% - 36px, 680px); }
  .site-header__inner { min-height: 70px; }
  .site-nav-toggle {
    display: grid;
    width: 44px;
    height: 44px;
    place-items: center;
    padding: 0;
    color: #fff;
    background: transparent;
    border: 1px solid rgba(255,255,255,.28);
    border-radius: 12px;
    cursor: pointer;
  }
  .site-nav-toggle__icon, .site-nav-toggle__icon::before, .site-nav-toggle__icon::after { display: block; width: 20px; height: 2px; background: currentColor; transition: transform .2s ease; }
  .site-nav-toggle__icon { position: relative; }
  .site-nav-toggle__icon::before, .site-nav-toggle__icon::after { position: absolute; left: 0; content: ""; }
  .site-nav-toggle__icon::before { top: -6px; }
  .site-nav-toggle__icon::after { top: 6px; }
  .site-nav-toggle[aria-expanded="true"] .site-nav-toggle__icon { background: transparent; }
  .site-nav-toggle[aria-expanded="true"] .site-nav-toggle__icon::before { top: 0; transform: rotate(45deg); }
  .site-nav-toggle[aria-expanded="true"] .site-nav-toggle__icon::after { top: 0; transform: rotate(-45deg); }
  .site-nav { position: absolute; top: 100%; right: 0; left: 0; display: none; padding: 8px 18px 20px; background: #1b1850; box-shadow: 0 16px 20px rgba(27,24,80,.15); }
  .site-nav.is-open { display: block; }
  .site-nav__list { display: grid; gap: 0; width: min(100%, 680px); margin: auto; }
  .site-nav__list li { border-top: 1px solid rgba(255,255,255,.12); }
  .site-nav__list a { display: block; padding: 12px 4px; }
  .site-nav__list .menu-item:last-child a { display: inline-flex; margin-top: 10px; padding: 9px 16px; }
  .article-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 18px; }
  .article-card__body { padding: 18px; }
}
@media (max-width: 600px) {
  html { scroll-padding-top: 72px; }
  body.admin-bar .site-header { top: 46px; }
  .site-container { width: calc(100% - 32px); }
  .site-main { padding: 48px 0 64px; }
  .archive-heading { margin-bottom: 30px; }
  .archive-heading h1, .single-article__header h1, .empty-state h1 { font-size: clamp(34px, 10vw, 48px); }
  .archive-heading > p { font-size: 15px; }
  .search-form { gap: 6px; }
  .search-submit { padding-inline: 13px; }
  .article-grid { grid-template-columns: 1fr; gap: 16px; }
  .article-card { border-radius: 17px; }
  .article-card__image { aspect-ratio: 16 / 9; }
  .article-card__body { padding: 19px; }
  .article-card h2 { font-size: 22px; }
  .single-article__header { margin-bottom: 24px; }
  .single-article__header .back-link { margin-bottom: 22px; }
  .single-article__excerpt { font-size: 17px; }
  .single-article__featured { margin-bottom: 28px; border-radius: 16px; }
  .entry-content { font-size: 16px; line-height: 1.8; }
  .entry-content h2 { font-size: 29px; }
  .entry-content h3 { font-size: 23px; }
  .section-heading { align-items: flex-start; flex-direction: column; }
  .recommended-articles { margin-top: 54px; }
  .site-footer__top, .site-footer__bottom { flex-direction: column; }
  .site-footer__top { gap: 24px; padding-top: 34px; }
  .site-footer__links { gap: 18px; }
  .site-footer__bottom { gap: 8px; }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { scroll-behavior: auto !important; transition-duration: .01ms !important; animation-duration: .01ms !important; }
}
