/*
Theme Name: Decodificando Editorial
Description: Tema editorial em blocos para tecnologia, hardware e programação.
Version: 1.1.2
Requires at least: 6.6
Requires PHP: 7.4
Text Domain: decodificando
License: GNU General Public License v2 or later
*/

:root {
    --ink: #0d1b26;
    --muted: #485c68;
    --paper: #f2f5f7;
    --line: #d6dfe4;
    --blue: #005968;
    --night: #07131e;
    --cyan: #76edf4;
    --mono: ui-monospace, SFMono-Regular, Consolas, monospace;
}
* { box-sizing: border-box; }
body { margin: 0; background: var(--paper); color: var(--ink); }
a { color: var(--blue); text-underline-offset: .18em; }
:where(a, button, input, select, summary, textarea):focus-visible { outline: 3px solid #c56b12; outline-offset: 3px; }
.dc-frame { width: min(1200px, calc(100% - 64px)); margin-inline: auto; }

.dc-header { background: var(--night); color: #effaff; }
.dc-masthead { display: flex; align-items: center; justify-content: space-between; gap: 20px; padding-block: 17px; }
.dc-identity { display: flex; align-items: center; gap: 19px; min-width: 0; }
.dc-brand { display: inline-flex; align-items: center; gap: 10px; color: inherit; text-decoration: none; font-size: clamp(1.4rem, 2.8vw, 2.05rem); letter-spacing: -.065em; font-weight: 850; line-height: 1.05; }
.dc-mark { display: block; flex: none; width: 44px; aspect-ratio: 1; border-radius: 9px; background: #07131e url(assets/brand-mark.webp) center / cover no-repeat; }
.dc-tagline { color: #a9c0cb; font-size: .8rem; border-left: 1px solid #35515d; padding-left: 19px; }
.dc-navigation { border-block: 1px solid #29424f; background: #10212e; }
.dc-nav { display: flex; align-items: center; flex-wrap: wrap; gap: 4px clamp(9px, 2.05vw, 28px); padding-block: 8px; }
.dc-nav a { color: #dfeef3; padding: 5px 0; font-size: .86rem; font-weight: 700; text-decoration: none; }
.dc-nav a:hover { color: var(--cyan); text-decoration: underline; }
.dc-nav a:first-child { color: var(--cyan); }
.dc-nav a:last-child { margin-left: auto; color: var(--cyan); }

.dc-search { position: relative; flex: none; }
.dc-search summary { display: flex; align-items: center; gap: 10px; cursor: pointer; list-style: none; color: #effaff; border: 1px solid #48616e; border-radius: 5px; padding: 7px 11px; font-weight: 700; font-size: .84rem; }
.dc-search summary::before { content: ''; width: 16px; height: 16px; background: currentColor; mask: url(assets/search.svg) center / contain no-repeat; }
.dc-search summary::-webkit-details-marker { display: none; }
.dc-search form { display: flex; position: absolute; right: 0; top: calc(100% + 8px); width: min(340px, 84vw); z-index: 3; background: #fff; border: 1px solid var(--line); padding: 9px; gap: 6px; box-shadow: 0 12px 35px #101a2b26; }
.dc-search input { min-width: 0; width: 100%; padding: 7px; font: inherit; }
.dc-search button, .dc-tool button { border: 0; border-radius: 5px; background: var(--blue); color: #fff; padding: 8px 12px; font: inherit; cursor: pointer; }

.dc-home { padding: 26px 0 56px; }
.dc-kicker { font: 750 .73rem/1.4 var(--mono); text-transform: uppercase; letter-spacing: .11em; color: var(--blue); }
.dc-news-heading, .dc-section-head { display: flex; justify-content: space-between; align-items: end; gap: 8px 16px; margin-bottom: 17px; padding-bottom: 13px; border-bottom: 1px solid #bccbd3; }
.dc-news-heading p, .dc-section-head p { margin: 0 0 5px; }
.dc-news-heading h1 { margin: 0; font-size: clamp(2.05rem, 4.4vw, 3.65rem); line-height: 1; letter-spacing: -.065em; }
.dc-news-heading a, .dc-section-head a { font-size: .87rem; font-weight: 750; }
.dc-news-grid { display: grid; grid-template-columns: minmax(0, 2.5fr) minmax(260px, 1fr); gap: 20px; }
.dc-lead, .dc-lead .wp-block-post-template { min-width: 0; margin: 0; }
.dc-lead-card { display: grid; grid-template-rows: auto 1fr; overflow: hidden; background: #fff; border: 1px solid var(--line); border-radius: 8px; }
.dc-lead-art { overflow: hidden; background: #071b2e url(assets/chip.svg) center / auto 115% no-repeat; aspect-ratio: 2.4; }
.dc-lead-art:has(.wp-block-post-featured-image) { background: #0d1b26; }
.dc-lead-art .wp-block-post-featured-image, .dc-lead-art .wp-block-post-featured-image a, .dc-lead-art .wp-block-post-featured-image img { display: block; width: 100%; height: 100%; margin: 0; }
.dc-lead-art .wp-block-post-featured-image img { object-fit: cover; }
.dc-lead-copy { padding: clamp(17px, 3vw, 30px); }
.dc-lead-copy > .dc-kicker { display: inline-block; border-left: 3px solid #008498; padding-left: 8px; margin-right: 12px; }
.dc-lead-copy > .taxonomy-category { display: inline; }
.dc-lead-copy .wp-block-post-title { font-size: clamp(1.82rem, 4vw, 3.38rem); line-height: 1.06; letter-spacing: -.06em; margin: 9px 0; }
.dc-lead-copy .wp-block-post-title a, .dc-list .wp-block-post-title a { color: var(--ink); text-decoration: none; }
.dc-lead-copy .wp-block-post-title a:hover, .dc-list .wp-block-post-title a:hover { text-decoration: underline; }
.dc-lead-copy .wp-block-post-excerpt p { color: var(--muted); margin: 6px 0; }
.dc-lead-copy .wp-block-post-excerpt__more-link { font-size: .88rem; font-weight: 800; }

.dc-topics { align-self: start; min-width: 0; background: #fff; border: 1px solid var(--line); border-radius: 8px; padding: 16px 18px 9px; }
.dc-topics h2 { font-size: 1.3rem; letter-spacing: -.035em; margin: 0; padding: 3px 0 12px; border-bottom: 2px solid var(--blue); }
.dc-topics ul { margin: 0; padding: 0; list-style: none; }
.dc-topics li + li { border-top: 1px solid var(--line); }
.dc-topics a { display: flex; align-items: center; justify-content: space-between; padding: 10px 0; gap: 10px; text-decoration: none; }
.dc-topics strong, .dc-topics small { display: block; }
.dc-topics strong { color: var(--ink); font-size: 1rem; line-height: 1.25; }
.dc-topics small { color: var(--muted); font-size: .78rem; margin-top: 3px; line-height: 1.35; }
.dc-topics a:hover strong { color: var(--blue); text-decoration: underline; }

.dc-section { margin-top: 31px; }
.dc-section-head h2 { margin: 4px 0 0; font-size: clamp(1.55rem, 3.3vw, 2.32rem); letter-spacing: -.05em; line-height: 1.06; }
.dc-recent:not(:has(.wp-block-post)) { display: none; }
.dc-empty, .dc-list .wp-block-query-no-results { padding: 16px; background: #fff; border: 1px solid var(--line); border-radius: 7px; }
.dc-list .wp-block-post-template { gap: 15px; margin: 0; }
.dc-list .wp-block-post { display: block; background: #fff; border: 1px solid var(--line); border-radius: 8px; padding: 16px; min-width: 0; }
.dc-list .wp-block-post-featured-image { margin: 0 0 13px; }
.dc-list .wp-block-post-featured-image img { aspect-ratio: 16/9; object-fit: cover; border-radius: 5px; }
.dc-list .wp-block-post-title { font-size: 1.25rem; letter-spacing: -.025em; margin: .42rem 0; }
.dc-list .wp-block-post-excerpt p { font-size: .93rem; color: var(--muted); margin: .55em 0 0; }
.dc-list .wp-block-query-pagination { margin-block: 20px 0; }
:where(.dc-lead, .dc-list, .dc-article) .wp-block-post-date { font: 700 .73rem/1.4 var(--mono); color: var(--muted); margin-top: 12px; }
:where(.dc-lead, .dc-list, .dc-article) .taxonomy-category { font: 750 .73rem/1.4 var(--mono); text-transform: uppercase; }
.dc-tool-promo { display: flex; justify-content: space-between; align-items: center; gap: 14px; padding: 20px; border: 1px solid #bbd8dd; border-left: 4px solid #008498; border-radius: 6px; background: #e9f4f5; }
.dc-tool-promo h2 { margin: 3px 0; font-size: 1.5rem; letter-spacing: -.04em; }
.dc-tool-promo p { margin: 0; color: var(--muted); }
.dc-tool-promo a { font-weight: 800; }

.dc-article { margin: 31px auto 56px; max-width: 860px; width: calc(100% - 40px); background: #fff; border: 1px solid var(--line); padding: clamp(20px, 4vw, 48px); border-radius: 8px; }
.dc-story { border-top: 4px solid #008498; }
.dc-article h1, .dc-archive h1 { font-size: clamp(2.05rem, 5vw, 3.55rem); line-height: 1.05; letter-spacing: -.06em; margin: 9px 0 15px; }
.dc-article h2 { font-size: 1.47rem; line-height: 1.23; margin: 1.5em 0 .4em; }
.dc-article h3 { margin: 1.05em 0 .22em; }
.dc-article .wp-block-post-content { margin-top: 22px; overflow-wrap: anywhere; }
.dc-article .wp-block-post-content :where(p, ul, ol) { margin-block: 0 .8em; }
.dc-story .wp-block-post-content { font-size: clamp(1rem, 1.55vw, 1.11rem); }
.dc-article .wp-block-post-featured-image { margin-block: 17px 0; }
.dc-article .wp-block-post-featured-image img { border-radius: 6px; }
.dc-archive { padding: 32px 0 55px; min-height: 53vh; }
.dc-archive .wp-block-term-description { margin-bottom: 16px; color: var(--muted); }

.dc-footer { background: var(--night); color: #cddfe6; padding: 34px 0 16px; }
.dc-footer .dc-kicker { color: var(--cyan); }
.dc-footer a { color: #e2f1f7; text-decoration: none; }
.dc-footer a:hover { text-decoration: underline; }
.dc-footer-grid { display: grid; grid-template-columns: 1.7fr 1fr 1fr; gap: 22px; }
.dc-footer ul { list-style: none; padding: 0; display: grid; gap: 5px; margin: .6em 0 0; }
.dc-footer-bottom { border-top: 1px solid #36505b; margin-top: 23px; padding-top: 11px; font-size: .82rem; }

.dc-tool { background: #f0f7f8; border: 1px solid #c5dadd; border-radius: 7px; margin: 18px 0; padding: 16px; }
.dc-tool label { display: block; font-weight: 700; margin: .55em 0; }
.dc-tool input, .dc-tool select, .dc-contact textarea { border: 1px solid #8195a0; border-radius: 4px; min-height: 38px; padding: 5px 8px; font: inherit; width: min(100%, 320px); display: block; background: #fff; color: var(--ink); }
.dc-contact textarea { width: 100%; resize: vertical; }
.dc-tool output { display: block; font-weight: 800; margin-top: 12px; }

@media (max-width: 820px) {
    .dc-frame { width: calc(100% - 32px); }
    .dc-news-grid { grid-template-columns: minmax(0, 1.65fr) minmax(220px, 1fr); gap: 13px; }
    .dc-lead-art { aspect-ratio: 1.75; }
    .dc-tagline { display: none; }
}
@media (max-width: 630px) {
    .dc-masthead { padding-block: 11px; gap: 9px; }
    .dc-mark { width: 36px; }
    .dc-nav { column-gap: 13px; padding-block: 5px; }
    .dc-nav a { font-size: .78rem; padding-block: 5px; }
    .dc-nav a:last-child { margin-left: 0; }
    .dc-home { padding-top: 19px; }
    .dc-news-heading { flex-wrap: wrap; }
    .dc-news-grid { grid-template-columns: minmax(0, 1fr); }
    .dc-topics { padding-inline: 14px; }
    .dc-topics ul { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); column-gap: 12px; }
    .dc-topics li:nth-child(-n + 2) { border-top: 0; }
    .dc-list .wp-block-post-template.is-layout-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .dc-footer-grid { grid-template-columns: 1fr 1fr; }
    .dc-footer-grid > div:first-child { grid-column: 1 / -1; }
}
@media (max-width: 450px) {
    .dc-list .wp-block-post-template.is-layout-grid { grid-template-columns: 1fr; }
    .dc-tool-promo { align-items: start; flex-direction: column; gap: 7px; }
}
