/*
Theme Name: Llamly
Theme URI: https://llamly.com/
Author: DotRex Studio
Description: Block theme for llamly.com: blog, guides and pages in the look of the Llamly landing page.
Version: 1.0.0
Requires at least: 6.6
Requires PHP: 8.0
License: GPLv2 or later
License URI: https://www.gnu.org/licenses/gpl-2.0.html
Text Domain: llamly
*/

/* ---------- Tokens (same names and values as the landing page) ---------- */
:root {
	--navy: #1C222B; --deep: #141920; --panel: #232B36; --panel2: #2B3441;
	--line: rgba(255,255,255,.10); --line2: rgba(255,255,255,.16);
	--pool: #2EE6A6; --pool-h: #5CF0BD; --pool-ink: #06352A; --sun: #FBBF27;
	--tx: #F3F6F9; --tx2: #B4BECA; --tx3: #8F9BA8;
	--ease: cubic-bezier(.2,.8,.2,1);
	--head: 'Bricolage Grotesque', Inter, system-ui, sans-serif;
	--mono: 'JetBrains Mono', ui-monospace, monospace;
}
@media (max-width: 640px) {
	:root {
		--wp--style--root--padding-left: 20px;
		--wp--style--root--padding-right: 20px;
	}
}

html { -webkit-text-size-adjust: 100%; scroll-padding-top: 96px; }
body { -webkit-font-smoothing: antialiased; }
img { max-width: 100%; height: auto; }
:focus-visible { outline: 3px solid var(--pool); outline-offset: 3px; border-radius: 8px; }
.wp-site-blocks { display: flex; flex-direction: column; min-height: 100vh; }
.wp-site-blocks > main { flex: 1 0 auto; }
.wp-site-blocks > * + * { margin-block-start: 0; }

/* ---------- Pieces copied from the landing page ---------- */
.skip { position: absolute; left: 16px; top: -64px; background: var(--pool); color: var(--pool-ink); padding: 12px 16px; border-radius: 10px; z-index: 100; text-decoration: none; font-weight: 700; }
.skip:focus { top: 16px; }
.wrap { max-width: 1272px; margin: 0 auto; padding: 0 32px; }
.h { font-family: var(--head); font-weight: 800; letter-spacing: -.035em; line-height: 1; }
.eyebrow { font-family: var(--mono); font-size: 12.5px; font-weight: 500; letter-spacing: .08em; text-transform: uppercase; color: var(--pool); }
.eyebrow a { color: inherit; text-decoration: none; }
.eyebrow a:hover { color: var(--pool-h); }

.btn { display: inline-flex; align-items: center; justify-content: center; gap: 10px; min-height: 52px; padding: 14px 24px; border-radius: 12px; font-weight: 650; font-size: 16px; line-height: 1.2; text-decoration: none; border: 1.5px solid transparent; cursor: pointer; transition: transform .15s var(--ease), background .15s, border-color .15s; }
.btn:hover { transform: translateY(-1px); }
.btn svg { width: 18px; height: 18px; flex: none; }
.btn svg:last-child:not(:first-child) { transition: transform .15s var(--ease); }
.btn:hover svg:last-child:not(:first-child) { transform: translateX(3px); }
.btn-pool { background: var(--pool); color: var(--pool-ink); }
.btn-pool:hover { background: var(--pool-h); color: var(--pool-ink); }
.btn-line { border-color: var(--line2); color: var(--tx); }
.btn-line:hover { border-color: rgba(255,255,255,.5); color: #fff; }
.btn-navy { background: var(--navy); color: #fff; }
.btn-navy:hover { color: #fff; }
.btn-sm { min-height: 44px; padding: 10px 18px; font-size: 15px; border-radius: 10px; }

/* Top bar */
.top { position: fixed; top: 0; left: 0; right: 0; z-index: 50; background: transparent; border-bottom: 1px solid transparent; transition: background .35s ease, border-color .35s ease, backdrop-filter .35s ease, -webkit-backdrop-filter .35s ease; }
.admin-bar .top { top: var(--wp-admin--admin-bar--height, 32px); }
.top .wrap { display: grid; grid-template-columns: 1fr auto 1fr; align-items: center; gap: 20px; min-height: 64px; transition: padding .35s ease; }
.top .logo { justify-self: start; }
.top .top-cta { justify-self: end; transition: background .35s ease, border-color .35s ease, color .35s ease, opacity .35s ease; }
.top .logo, .top nav { filter: grayscale(1); opacity: .72; transition: filter .35s ease, opacity .35s ease; }
.top:not(.scrolled) .wrap { padding-top: 28px; }
.top:not(.scrolled) .logo { opacity: .6; }
.top:not(.scrolled) .top-cta { background: transparent; border-color: rgba(255,255,255,.9); color: #fff; opacity: .65; }
.top:not(.scrolled) .top-cta:hover { opacity: 1; background: rgba(255,255,255,.08); }
.top.scrolled { background: rgba(28,34,43,.55); backdrop-filter: blur(18px) saturate(160%); -webkit-backdrop-filter: blur(18px) saturate(160%); border-bottom-color: rgba(255,255,255,.08); box-shadow: 0 8px 32px rgba(0,0,0,.18); }
.top.scrolled .logo, .top.scrolled nav { filter: none; opacity: 1; }
.top .logo:hover, .top nav:hover { filter: none; opacity: 1; }
.logo { display: flex; align-items: center; gap: 10px; text-decoration: none; min-height: 44px; }
.logo .ic { width: 36px; height: 36px; }
.logo .wm { height: 27px; width: auto; }
.top nav { display: flex; align-items: center; gap: 26px; font-weight: 550; font-size: 14px; }
.top nav a:not(.btn) { position: relative; text-decoration: none; color: var(--tx2); padding: 12px 0; transition: color .2s ease; }
.top nav a:not(.btn):after { content: ""; position: absolute; left: 50%; right: 50%; bottom: 6px; height: 2px; border-radius: 2px; background: var(--pool); transition: left .25s var(--ease), right .25s var(--ease); }
.top nav a:not(.btn):hover:after, .top nav a:not(.btn):focus-visible:after { left: 0; right: 0; }
.top nav a:not(.btn):hover { color: #fff; }

/* Footer */
.site-footer { background: var(--deep); color: var(--tx3); font-size: 14px; line-height: 1.6; padding: 36px 0 44px; }
.site-footer .wrap { display: flex; align-items: center; justify-content: space-between; gap: 24px; flex-wrap: wrap; }
.site-footer .wm { height: 26px; width: auto; }
.site-footer p { flex: 1; min-width: 260px; max-width: 52em; margin: 0; }
.site-footer nav { display: flex; gap: 20px; flex-wrap: wrap; }
.site-footer nav a { padding: 12px 2px; color: var(--tx2); }
.site-footer nav a:hover { color: #fff; }

/* Closing call to action (landing "final-box") */
.final-box { position: relative; display: grid; grid-template-columns: auto minmax(0,1fr) auto; gap: 48px; align-items: center; padding: 56px 64px; border-radius: 32px; background: radial-gradient(120% 140% at 0% 0%, #5CF0BD 0%, var(--pool) 45%, #1FC98F 100%); color: var(--navy); box-shadow: 0 30px 80px rgba(0,0,0,.35); overflow: hidden; }
.final-box:after { content: ""; position: absolute; right: -120px; top: -120px; width: 360px; height: 360px; border-radius: 50%; background: rgba(255,255,255,.14); pointer-events: none; }
.final-box > * { position: relative; z-index: 1; }
.final-box img { width: 140px; height: auto; filter: drop-shadow(0 14px 24px rgba(6,53,42,.25)); }
.final-box h2 { margin: 0; color: var(--navy); font-size: clamp(30px, 3.2vw, 46px); letter-spacing: -.04em; }
.final-box p { margin: 14px 0 0; font-size: 18px; line-height: 1.55; color: #0B3B30; max-width: 30em; }
.final-box .side { text-align: center; }
.final-box .micro { margin-top: 12px; font-size: 14px; }
.final-box :focus-visible { outline-color: var(--navy); }

/* ---------- Page structure ---------- */
.page-head { padding-top: 168px; padding-bottom: 8px; }
.page-head .eyebrow { margin: 0; }
.page-head h1, .page-head .wp-block-post-title, .page-head .wp-block-query-title { margin-top: 16px; }
.page-head .lead, .page-head .wp-block-post-excerpt { margin-top: 20px; font-size: 19px; line-height: 1.55; color: var(--tx2); max-width: 36em; }
.page-head .wp-block-post-excerpt__excerpt { margin: 0; }
.page-head .meta { margin-top: 20px; display: flex; flex-wrap: wrap; gap: 6px 16px; }
.section { padding-top: 56px; padding-bottom: 96px; }
.cta-wrap { padding-bottom: 96px; }
.back-link { margin-top: 56px; }
.back-link a { display: inline-flex; align-items: center; gap: 8px; color: var(--pool); font-weight: 600; text-decoration: underline; text-decoration-thickness: 1px; text-underline-offset: 4px; }

/* ---------- Cards (guides and posts lists, same as the landing's guide cards) ---------- */
.cards { display: grid; grid-template-columns: repeat(3, minmax(0,1fr)); gap: 16px; padding: 0; margin: 0; list-style: none; }
.cards > li { display: flex; margin: 0; }
.card { position: relative; display: flex; flex-direction: column; width: 100%; padding: 26px 26px 24px; border: 1px solid var(--line2); border-radius: 16px; background: var(--panel); transition: transform .15s var(--ease), border-color .15s, background .15s; }
.card:hover, .card:focus-within { transform: translateY(-2px); border-color: rgba(46,230,166,.55); background: var(--panel2); }
.card > * { margin: 0; }
.card .wp-block-post-date { order: -1; margin-bottom: 14px; }
.card .wp-block-post-title { font-family: var(--head); font-weight: 700; font-size: 21px; letter-spacing: -.02em; line-height: 1.2; color: #fff; }
.card .wp-block-post-title a { color: inherit; text-decoration: none; }
.card .wp-block-post-title a:after { content: ""; position: absolute; inset: 0; border-radius: 16px; }
.card .wp-block-post-excerpt { flex: 1; margin-top: 10px; font-size: 15px; line-height: 1.5; color: var(--tx2); }
.card .wp-block-post-excerpt__excerpt { margin: 0; }
.card .more { display: inline-flex; align-items: center; gap: 8px; margin-top: 18px; color: var(--pool); font-weight: 600; font-size: 15px; text-decoration: underline; text-decoration-thickness: 1px; text-underline-offset: 4px; }
.card .more:after { content: "→"; text-decoration: none; transition: transform .15s var(--ease); }
.card:hover .more:after { transform: translateX(3px); }
.wp-block-query-pagination { margin-top: 40px; gap: 12px; font-weight: 600; }
.wp-block-query-pagination a { color: var(--pool); }
.no-results { color: var(--tx2); }

/* ---------- Reading (post and guide content) ---------- */
.prose { font-size: 17.5px; line-height: 1.75; color: var(--tx); }
.prose > * + * { margin-block-start: 1.15em; }
.prose > h2 { margin-block-start: 2.1em; }
.prose > h3 { margin-block-start: 1.8em; }
.prose > h2 + *, .prose > h3 + * { margin-block-start: .7em; }
.prose p, .prose li { color: var(--tx2); }
.prose strong, .prose b { color: #fff; font-weight: 600; }
.prose a { color: var(--pool); text-decoration-thickness: 1px; text-underline-offset: 3px; }
.prose a:hover { color: var(--pool-h); }
.prose :not(pre) > code { font-family: var(--mono); font-size: .86em; padding: .15em .4em; border-radius: 6px; background: var(--panel2); color: #fff; overflow-wrap: anywhere; }
.prose pre.wp-block-code { overflow-x: auto; white-space: pre; tab-size: 2; }
.prose pre.wp-block-code code { font-family: inherit; white-space: inherit; }
.prose ul, .prose ol { padding-left: 0; list-style: none; }
.prose li + li { margin-top: .55em; }
.prose ul > li { position: relative; padding-left: 26px; }
.prose ul > li:before { content: ""; position: absolute; left: 6px; top: .72em; width: 7px; height: 7px; border-radius: 50%; background: var(--pool); }
.prose ol { counter-reset: step; }
.prose ol > li { position: relative; counter-increment: step; padding-left: 44px; min-height: 28px; }
.prose ol > li:before { content: counter(step); position: absolute; left: 0; top: .1em; display: inline-flex; align-items: center; justify-content: center; width: 28px; height: 28px; border-radius: 8px; background: var(--pool); color: var(--pool-ink); font: 600 13px/1 var(--mono); }
.prose li > ul, .prose li > ol { margin-top: .55em; }
.prose .wp-block-image img { border: 1px solid var(--line2); border-radius: 14px; box-shadow: 0 24px 60px rgba(0,0,0,.35); }
.prose .wp-block-image figcaption { margin-top: 12px; text-align: left; color: var(--tx3); font-size: 14px; }
.prose .wp-block-quote { border-radius: 0 12px 12px 0; }
.prose .wp-block-quote p { color: var(--tx2); }
.prose .wp-block-quote > * + * { margin-top: .6em; }
.prose .wp-block-table { overflow-x: auto; }
.prose .wp-block-table table { width: 100%; border-collapse: collapse; font-size: 15.5px; line-height: 1.5; }
.prose .wp-block-table th, .prose .wp-block-table td { padding: 12px 14px; border: 0; border-bottom: 1px solid var(--line2); text-align: left; vertical-align: top; color: var(--tx2); }
.prose .wp-block-table th { color: #fff; font-weight: 600; background: var(--panel); }
.prose .wp-block-table thead { border-bottom: 0; }
.prose hr, .prose .wp-block-separator { border: 0; border-top: 1px solid var(--line2); }

/* ---------- 404 and search ---------- */
.not-found { padding-bottom: 96px; }
.not-found-art { width: 160px; height: auto; margin-bottom: 24px; }
.actions { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 32px; }
.wp-block-search__inside-wrapper { border: 1px solid var(--line2) !important; border-radius: 12px; background: var(--panel); padding: 4px !important; }
.wp-block-search__input { background: transparent; border: 0; color: var(--tx); font-size: 16px; padding: 10px 12px; }
.wp-block-search__input::placeholder { color: var(--tx3); }
.wp-block-search__button { margin-left: 4px; border-radius: 9px !important; }

/* ---------- Responsive (same breakpoints as the landing page) ---------- */
@media (max-width: 1160px) {
	.final-box { grid-template-columns: auto minmax(0,1fr); }
	.final-box .side { grid-column: 2; text-align: left; }
}
@media (max-width: 1100px) {
	.cards { grid-template-columns: repeat(2, minmax(0,1fr)); }
}
@media (max-width: 960px) {
	.top nav { display: none; }
	.top .wrap { grid-template-columns: 1fr auto; }
	.top .top-cta { white-space: nowrap; }
	.page-head { padding-top: 136px; }
}
@media (max-width: 640px) {
	.wrap { padding: 0 20px; }
	.cards { grid-template-columns: minmax(0,1fr); gap: 12px; }
	.card { padding: 20px; }
	.section { padding-top: 40px; padding-bottom: 72px; }
	.cta-wrap { padding-bottom: 72px; }
	.final-box { grid-template-columns: 1fr; gap: 24px; padding: 36px 24px; border-radius: 24px; }
	.final-box .side { grid-column: 1; text-align: left; }
	.final-box img { width: 104px; }
	.final-box .btn { width: 100%; }
	.site-footer .wrap { flex-direction: column; align-items: flex-start; gap: 12px; }
	.site-footer p { min-width: 0; }
	.prose { font-size: 17px; }
	.prose ol > li { padding-left: 40px; }
}
@media (max-width: 400px) {
	.logo .wm { height: 23px; }
	.logo .ic { width: 32px; height: 32px; }
	.top .btn-sm { padding: 10px 14px; font-size: 14px; }
}
@media (prefers-reduced-motion: reduce) {
	html { scroll-behavior: auto; }
	*, *:before, *:after { animation: none !important; transition: none !important; }
}
