/*
Theme Name: DSNet Quaderno
Theme URI: https://www.dsnet.it/
Author: DSNet
Description: Tema magazine leggero e originale per DSNet.
Version: 1.0.0
Text Domain: dsnet-quaderno
*/

:root {
  --ink: #17233e;
  --muted: #5f6875;
  --paper: #f7f5ef;
  --card: #ffffff;
  --line: #dcd8cf;
  --accent: #2c7a70;
  --warm: #d66847;
  --shadow: 0 16px 38px rgba(23, 35, 62, .08);
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  color: var(--ink);
  background: var(--paper);
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  line-height: 1.7;
}
a { color: var(--accent); text-decoration-thickness: .08em; text-underline-offset: .18em; }
a:hover, a:focus { color: var(--warm); }
img { display: block; max-width: 100%; height: auto; }
.wrap { width: min(1160px, calc(100% - 36px)); margin-inline: auto; }
.skip-link { position: absolute; left: -9999px; }
.skip-link:focus { left: 18px; top: 18px; z-index: 100; padding: 10px 14px; background: #fff; }

.site-header { background: rgba(255,255,255,.96); border-bottom: 1px solid var(--line); }
.header-inner { display: flex; align-items: center; justify-content: space-between; gap: 28px; min-height: 92px; }
.brand { display: flex; align-items: center; gap: 13px; color: var(--ink); text-decoration: none; }
.brand-mark { width: 46px; height: 46px; }
.brand-copy { display: grid; line-height: 1.1; }
.brand-name { font-family: Georgia, serif; font-size: clamp(1.45rem, 3vw, 2rem); font-weight: 700; }
.brand-note { margin-top: 7px; color: var(--muted); font-size: .74rem; letter-spacing: .14em; text-transform: uppercase; }
.main-nav ul { display: flex; flex-wrap: wrap; gap: 8px 20px; margin: 0; padding: 0; list-style: none; }
.main-nav a { color: var(--ink); font-size: .92rem; font-weight: 700; text-decoration: none; }

.site-main { padding-block: 42px 64px; }
.intro { display: grid; grid-template-columns: 1.2fr .8fr; gap: 26px; align-items: end; margin-bottom: 34px; }
.eyebrow { color: var(--warm); font-size: .75rem; font-weight: 800; letter-spacing: .14em; text-transform: uppercase; }
.intro h1 { max-width: 760px; margin: 5px 0 0; font-family: Georgia, serif; font-size: clamp(2.15rem, 6vw, 4.4rem); line-height: 1.02; letter-spacing: -.035em; }
.intro p { margin: 0; color: var(--muted); font-size: 1.05rem; }
.content-grid { display: grid; grid-template-columns: minmax(0, 1fr) 310px; gap: 34px; align-items: start; }
.posts-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 22px; }
.post-card { overflow: hidden; background: var(--card); border: 1px solid var(--line); border-radius: 18px; box-shadow: var(--shadow); }
.post-card:first-child { grid-column: 1 / -1; }
.post-card:first-child .card-link { grid-template-columns: 1.1fr .9fr; }
.card-link { display: grid; height: 100%; color: inherit; text-decoration: none; }
.post-card:not(:first-child) .card-link { grid-template-rows: auto 1fr; }
.card-media { aspect-ratio: 16 / 9; background: #dde7e2; overflow: hidden; }
.card-media img { width: 100%; height: 100%; object-fit: cover; transition: transform .35s ease; }
.card-link:hover img { transform: scale(1.025); }
.card-body { padding: 23px; }
.card-meta, .entry-meta { color: var(--muted); font-size: .8rem; font-weight: 700; letter-spacing: .04em; text-transform: uppercase; }
.card-title { margin: 8px 0 10px; font-family: Georgia, serif; font-size: clamp(1.35rem, 3vw, 2rem); line-height: 1.15; }
.card-excerpt { margin: 0; color: var(--muted); }
.pagination { grid-column: 1 / -1; margin-top: 18px; }

.sidebar { position: sticky; top: 24px; display: grid; gap: 18px; }
.widget { padding: 22px; background: #fff; border: 1px solid var(--line); border-radius: 16px; }
.widget-title { margin: 0 0 14px; font-family: Georgia, serif; font-size: 1.2rem; }
.widget ul { margin: 0; padding-left: 19px; }
.widget li + li { margin-top: 8px; }
.widget_search input[type="search"] { width: 100%; padding: 11px; border: 1px solid var(--line); border-radius: 8px; }
.widget_search input[type="submit"] { margin-top: 8px; padding: 10px 14px; color: #fff; background: var(--accent); border: 0; border-radius: 8px; }

.article-shell { background: #fff; border: 1px solid var(--line); border-radius: 20px; box-shadow: var(--shadow); overflow: hidden; }
.entry-hero { width: 100%; aspect-ratio: 16 / 8; object-fit: cover; }
.entry-inner { max-width: 760px; margin-inline: auto; padding: clamp(27px, 6vw, 64px); }
.entry-title { margin: 8px 0 15px; font-family: Georgia, serif; font-size: clamp(2rem, 5vw, 3.5rem); line-height: 1.08; letter-spacing: -.025em; }
.entry-content { font-size: 1.06rem; }
.entry-content h2 { margin-top: 2em; font-family: Georgia, serif; line-height: 1.2; }
.entry-content a { overflow-wrap: anywhere; }
.entry-content input:not([type="checkbox"]), .entry-content textarea { width: 100%; padding: 12px; border: 1px solid var(--line); border-radius: 8px; }
.entry-content input[type="submit"] { width: auto; padding: 12px 18px; color: #fff; background: var(--accent); border: 0; cursor: pointer; }

.site-footer { padding: 35px 0; color: #e7eceb; background: var(--ink); }
.footer-inner { display: grid; grid-template-columns: 1fr auto; gap: 28px; align-items: end; }
.footer-inner p { margin: 0; max-width: 760px; font-size: .87rem; }
.powered { white-space: nowrap; color: #fff; font-weight: 700; }

@media (max-width: 860px) {
  .header-inner, .footer-inner { align-items: flex-start; flex-direction: column; display: flex; padding-block: 20px; }
  .intro { grid-template-columns: 1fr; }
  .content-grid { grid-template-columns: 1fr; }
  .sidebar { position: static; }
}

@media (max-width: 620px) {
  .wrap { width: min(100% - 24px, 1160px); }
  .main-nav ul { gap: 8px 13px; }
  .site-main { padding-top: 28px; }
  .posts-grid { grid-template-columns: 1fr; }
  .post-card:first-child { grid-column: auto; }
  .post-card:first-child .card-link { grid-template-columns: 1fr; }
  .entry-inner { padding: 25px 20px 34px; }
}
