/*
Theme Name: GR1618 Labs
Theme URI: https://gr1618.io
Author: GR1618
Description: Tema do GR1618 Labs: ferramentas pequenas para os combinados do dia a dia. Grafite, cobalto e lima, com a grade do retângulo de Fibonacci.
Version: 1.2.1
Requires at least: 6.5
Tested up to: 6.8
Requires PHP: 7.4
License: GNU General Public License v2 or later
License URI: https://www.gnu.org/licenses/gpl-2.0.html
Text Domain: gr1618-labs
*/

/* Fibonacci rectangle 13:8: squares 8, 5, 3, 2, 1, 1 joined by 1px hairlines. */
.fib { display: grid; grid-template-columns: 8fr 5fr; aspect-ratio: 13 / 8; gap: 1px; background: #DCDFE5; border: 1px solid #DCDFE5; }
.fib-r { display: grid; grid-template-rows: 5fr 3fr; gap: 1px; min-height: 0; }
.fib-rb { display: grid; grid-template-columns: 3fr 2fr; gap: 1px; min-height: 0; }
.fib-rbr { display: grid; grid-template-rows: 2fr 1fr; gap: 1px; min-height: 0; }
.fib-rbrb { display: grid; grid-template-columns: 1fr 1fr; gap: 1px; min-height: 0; }
.fib > *, .fib-r > *, .fib-rb > *, .fib-rbr > *, .fib-rbrb > * { margin: 0 !important; }
.cell { min-width: 0; min-height: 0; overflow: hidden; box-sizing: border-box; background: #FFFFFF; }
.cell--muted { background: #F3F4F6; }
.cell--signal { background: #C6F24E; }

/* Golden split: main 1.618 : side 1. */
.gold { display: grid; grid-template-columns: minmax(0, 1.618fr) minmax(0, 1fr); }

@media (max-width: 820px) {
  .fib { aspect-ratio: auto; grid-template-columns: 1fr; }
  .fib .gl-fig { aspect-ratio: 1 / 1; }
  .fib-r, .fib-rb, .fib-rbr { grid-template-rows: none; grid-template-columns: 1fr; }
  .fib-rbrb { grid-template-columns: 1fr 1fr; }
  .cell { min-height: 120px; }
  .gold { grid-template-columns: 1fr; }
}

/* Lab label: mono, uppercase. */
.gl-label, .gl-label a { font-family: var(--wp--preset--font-family--mono); font-size: 12px; line-height: 16px; letter-spacing: 0.08em; text-transform: uppercase; color: var(--wp--preset--color--ink-muted); text-decoration: none; }
.gl-label--brand, .gl-label--brand a { color: var(--wp--preset--color--brand); }

/* Query cells inside the Fibonacci grid (Blog). */
.fib .wp-block-query, .fib .wp-block-post-template, .fib .wp-block-post { height: 100%; margin: 0; padding: 0; list-style: none; }
.fib .wp-block-post { display: flex; flex-direction: column; gap: 12px; box-sizing: border-box; }
.fib .wp-block-post-title { margin: 0; font-family: var(--wp--preset--font-family--display); font-weight: 700; letter-spacing: -0.02em; line-height: 1.15; }
.fib .wp-block-post-title a { color: var(--wp--preset--color--ink); text-decoration: none; }
.fib .wp-block-post-title a:hover { color: var(--wp--preset--color--brand); }
.fib .wp-block-post-date { margin-top: auto; }
.cell-8 .wp-block-post { padding: clamp(24px, 4vw, 48px); }
.cell-8 .wp-block-post-title { font-size: clamp(30px, 4vw, 48px); }
.cell-8 .wp-block-post-excerpt { font-size: 18px; color: var(--wp--preset--color--ink-soft); }
.cell-5 .wp-block-post { padding: 28px; }
.cell-5 .wp-block-post-title { font-size: 26px; }
.cell-5 .wp-block-post-excerpt { font-size: 15px; color: var(--wp--preset--color--ink-muted); }
.cell-3 .wp-block-post { padding: 20px; }
.cell-3 .wp-block-post-title { font-size: 18px; }
.fib .wp-block-query-no-results { padding: 20px; }
.fib .wp-block-post-excerpt p { margin: 0; }

/* Post list rows (Blog, archives). */
.gl-rows .wp-block-post-template { margin: 0; padding: 0; list-style: none; border-top: 1px solid var(--wp--preset--color--border); }
.gl-rows .wp-block-post { display: grid; grid-template-columns: 160px minmax(0, 1fr) auto; gap: 8px 24px; align-items: baseline; padding: 20px 0; border-bottom: 1px solid var(--wp--preset--color--border); margin: 0; }
.gl-rows .wp-block-post > * { margin: 0; }
.gl-rows .wp-block-post-title { font-size: 20px; font-weight: 600; grid-column: 2; grid-row: 1; }
.gl-rows .wp-block-post-title a { color: var(--wp--preset--color--ink); text-decoration: none; }
.gl-rows .wp-block-post-excerpt { grid-column: 2; font-size: 15px; color: var(--wp--preset--color--ink-muted); }
.gl-rows .wp-block-post-excerpt p { margin: 0; }
.gl-rows .wp-block-post-terms { grid-column: 1; grid-row: 1; }
.gl-rows .wp-block-post-date { grid-column: 3; grid-row: 1; }
@media (max-width: 640px) { .gl-rows .wp-block-post { grid-template-columns: 1fr; } .gl-rows .wp-block-post > * { grid-column: 1 !important; grid-row: auto !important; } }

/* Aside card and golden columns in page content (legal pages, single post). */
.gl-aside { padding: 24px; border-radius: 16px; background: var(--wp--preset--color--card); border: 1px solid var(--wp--preset--color--border); }
.gl-aside ul { padding-left: 18px; }
.gl-aside li::marker { color: var(--wp--preset--color--brand); }
.gl-gold { gap: 48px !important; }
.gl-section-rule h2 { padding-top: 24px; border-top: 1px solid var(--wp--preset--color--border); font-size: 22px; }

/* Single post. */
.gl-single .wp-block-post-content > h2 { margin-top: 40px; font-size: 26px; }
.gl-single .wp-block-post-content p, .gl-single .wp-block-post-content li { font-size: 17px; line-height: 28px; }

/* Header and footer links. */
.gl-nav a { color: var(--wp--preset--color--ink-soft); text-decoration: none; padding: 10px 0; }
.gl-nav a:hover { color: var(--wp--preset--color--ink); }
.gl-footer a { color: #EEF0F4; text-decoration: none; padding: 10px 0; }
.gl-footer a:hover { color: #FFFFFF; text-decoration: underline; }

/* Layout shell: sections carry their own width; no gaps between header, main and footer. */
.wp-site-blocks > * + * { margin-block-start: 0; }
main.wp-block-group > * { margin-block-start: 0; }
.gl-wrap { max-width: 1120px; margin-left: auto !important; margin-right: auto !important; padding-left: 24px; padding-right: 24px; }
.gl-section { padding-top: 0; padding-bottom: 96px; display: flex; flex-direction: column; gap: 32px; }
.gl-section > * { margin: 0 !important; }
.gl-blog-grid { padding-bottom: 56px; }
.gl-more { gap: 24px; }
.gl-soon { margin: 0; }
.wp-block-query-no-results { height: 100%; display: flex; align-items: flex-end; }
.cell .wp-block-query-no-results { padding: 20px; box-sizing: border-box; }

/* Front page "Do blog": big post | two small. */
.gl-frontposts { gap: 1px; background: #DCDFE5; border: 1px solid #DCDFE5; }
.gl-frontposts > *, .gl-frontposts-side > * { margin: 0 !important; }
.gl-frontposts-side { display: grid; grid-template-rows: 1fr 1fr; gap: 1px; }
.gl-frontposts .cell-8 { min-height: 300px; }
.gl-frontposts .cell-8 .wp-block-post-title { font-size: clamp(26px, 3vw, 34px); }
.gl-frontposts .cell-3 .wp-block-post { padding: 24px; }
.gl-frontposts .cell-3 .wp-block-post-title { font-size: 19px; font-weight: 600; }
.gl-frontposts .wp-block-query, .gl-frontposts .wp-block-post-template, .gl-frontposts .wp-block-post { height: 100%; margin: 0; padding: 0; list-style: none; }
.gl-frontposts .wp-block-post { display: flex; flex-direction: column; gap: 12px; box-sizing: border-box; }
.gl-frontposts .wp-block-post > * { margin: 0; }
.gl-frontposts .wp-block-post-title { margin: 0; font-family: var(--wp--preset--font-family--display); letter-spacing: -0.02em; line-height: 1.15; }
.gl-frontposts .wp-block-post-title a { color: var(--wp--preset--color--ink); text-decoration: none; }
.gl-frontposts .wp-block-post-date { margin-top: auto; }
.gl-frontposts .cell-8 .wp-block-post { padding: clamp(24px, 4vw, 40px); }
.gl-frontposts .cell-8 .wp-block-post-excerpt { font-size: 17px; color: var(--wp--preset--color--ink-soft); }
.fib .wp-block-post > * { margin: 0; }

/* Blog: category cells in the small squares. */
.gl-catcell { height: 100%; box-sizing: border-box; padding: 12px; display: flex; align-items: flex-end; font-family: var(--wp--preset--font-family--mono); font-size: 11px; font-weight: 500; letter-spacing: 0.08em; color: #363B45; text-decoration: none; }
.gl-catcell:hover { color: #2340D9; }
.gl-catcell--mini { align-items: center; justify-content: center; color: #0F1115; }

/* Page and post heads. */
.gl-page-head { padding-top: 64px; padding-bottom: 32px; display: flex; flex-direction: column; gap: 14px; }
.gl-page-head > *, .gl-single-head > * { margin: 0 !important; }
.gl-page-head .wp-block-post-title, .gl-page-head .wp-block-query-title { font-size: clamp(36px, 5vw, 52px); }
.gl-page-body { padding-bottom: 96px; }
.gl-single-head { padding-top: 56px; padding-bottom: 32px; display: flex; flex-direction: column; gap: 18px; border-bottom: 1px solid #DCDFE5; box-sizing: content-box; }
@media (min-width: 1168px) { .gl-single-head { max-width: 1120px; } }
.gl-back { align-self: flex-start; font-family: var(--wp--preset--font-family--mono); font-size: 12px; letter-spacing: 0.08em; padding: 10px 0; text-decoration: none; }
.gl-single-head .wp-block-post-title { font-size: clamp(36px, 5vw, 56px); line-height: 1.05; letter-spacing: -0.03em; }
.gl-lede { font-size: 20px; line-height: 31px; color: #363B45; }
.gl-lede p { margin: 0; }
.gl-meta { gap: 12px; }
.gl-meta > * { margin: 0; }
.gl-single { padding-top: 40px; padding-bottom: 88px; }
.gl-single > * { margin: 0 !important; }
.gl-single-main { max-width: 680px; }
.gl-single-main .wp-block-post-content > h2 { margin-top: 40px; font-size: 26px; line-height: 32px; }
.gl-single-main .wp-block-post-content p, .gl-single-main .wp-block-post-content li { font-size: 17px; line-height: 28px; }
.gl-post-aside { display: flex; flex-direction: column; gap: 16px; align-self: start; }
.gl-comments { margin-top: 56px; padding-top: 24px; border-top: 1px solid #DCDFE5; }
.gl-comments input[type=text], .gl-comments input[type=email], .gl-comments input[type=url], .gl-comments textarea { width: 100%; box-sizing: border-box; padding: 12px 14px; border: 1px solid #878D99; border-radius: 10px; font: inherit; background: #FFFFFF; }
.gl-comments input[type=submit] { min-height: 48px; padding: 0 22px; border: 0; border-radius: 10px; background: #2340D9; color: #FFFFFF; font-weight: 600; font-size: 15px; cursor: pointer; }

/* Golden columns inside page content (legal pages). */
.wp-block-columns.gl-gold { gap: 48px; }
.gl-legal-section { padding-top: 24px; border-top: 1px solid #DCDFE5; }
.gl-legal-section h2 { font-size: 22px; line-height: 28px; margin: 0 0 10px; }
.gl-legal-section p { margin: 0 0 10px; font-size: 16px; line-height: 26px; color: #363B45; }
.gl-aside { position: sticky; top: 24px; }
.gl-aside p.gl-label { margin: 0 0 14px; }
.gl-aside ul { margin: 0; display: flex; flex-direction: column; gap: 12px; font-size: 15px; line-height: 22px; }
.gl-intro { font-size: 18px; line-height: 29px; color: #363B45; }
.wp-block-query-pagination { margin-top: 24px; font-family: var(--wp--preset--font-family--mono); font-size: 13px; }
.gl-wrap { box-sizing: content-box; }
.gl-frontposts-section { padding-top: 96px; }
.fib .wp-block-post > .wp-block-post-date, .gl-frontposts .wp-block-post > .wp-block-post-date { margin-top: auto; }
.gl-single-head { border-bottom: 0; }
.gl-single-head::after { content: ""; display: block; height: 1px; background: #DCDFE5; margin-top: 14px; }
