/*
Theme Name: Alessio Treccarichi
Theme URI: https://www.alessiotreccarichi.it/
Author: Alessio Treccarichi
Author URI: https://www.alessiotreccarichi.it/
Description: Tema WordPress su misura per alessiotreccarichi.it — amministrazione condominiale, patrimonio immobiliare, consulenza tecnica ed editoria. Palette crema/nero/rosso, tipografia Space Grotesk + Cormorant Garamond, homepage one-page a sezioni, template landing per il libro, dati strutturati JSON-LD, form con risposta automatica e pubblicazione multi-canale (tramite plugin AT Toolkit).
Version: 1.0.0
Requires at least: 6.2
Tested up to: 7.0
Requires PHP: 7.4
License: GNU General Public License v2 or later
License URI: http://www.gnu.org/licenses/gpl-2.0.html
Text Domain: alessio-treccarichi
Tags: one-column, custom-menu, custom-logo, featured-images, translation-ready, blog, editor-style, block-styles, wide-blocks, threaded-comments
*/

/*--------------------------------------------------------------
INDICE
1.  Token / variabili
2.  Reset e base
3.  Tipografia
4.  Utility di layout
5.  Componenti (eyebrow, bottoni, card, grana, marquee)
6.  Header e navigazione
7.  Hero e sezioni home
8.  Blog: archivi, articolo singolo, paginazione
9.  Commenti
10. Form
11. Widget e sidebar
12. Footer
13. Classi core WordPress
14. Responsive
15. Accessibilità e stampa
--------------------------------------------------------------*/

/*--------------------------------------------------------------
1. TOKEN
--------------------------------------------------------------*/
:root {
  --at-bg: #FBF9F4;
  --at-bg-paper: #F2EFE7;
  --at-ink: #0E0E0E;
  --at-ink-soft: #2A2A2A;
  --at-muted: #6B6B66;
  --at-line: #D9D5C9;
  --at-red: #C8261C;
  --at-red-deep: #8E1A14;

  --at-font-display: 'Space Grotesk', -apple-system, BlinkMacSystemFont, 'Segoe UI', system-ui, sans-serif;
  --at-font-serif: 'Cormorant Garamond', 'Times New Roman', Times, serif;
  --at-font-body: 'Space Grotesk', -apple-system, BlinkMacSystemFont, 'Segoe UI', system-ui, sans-serif;

  --at-max: 1180px;
  --at-max-narrow: 760px;
  --at-gutter: 24px;

  --at-space-section: clamp(56px, 8vw, 112px);
  --at-radius: 0px;
  --at-shadow-hard: 6px 6px 0 var(--at-ink);
  --at-shadow-hard-sm: 4px 4px 0 var(--at-ink);
  --at-ease: cubic-bezier(0.65, 0, 0.35, 1);
}

/*--------------------------------------------------------------
2. RESET E BASE
--------------------------------------------------------------*/
*, *::before, *::after { box-sizing: border-box; }

html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }

body {
  margin: 0;
  background: var(--at-bg);
  color: var(--at-ink);
  font-family: var(--at-font-body);
  font-size: 16px;
  line-height: 1.65;
  font-weight: 500;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  font-feature-settings: "ss01", "ss02";
  overflow-x: hidden;
}

img, svg, video, iframe { max-width: 100%; height: auto; display: block; }
figure { margin: 0; }
hr { border: 0; border-top: 1px solid var(--at-line); margin: 40px 0; }

::selection { background: var(--at-ink); color: var(--at-bg); }

a { color: var(--at-ink); text-decoration: none; transition: color 200ms var(--at-ease); }
a:hover { color: var(--at-red); }

/*--------------------------------------------------------------
3. TIPOGRAFIA
--------------------------------------------------------------*/
h1, h2, h3, h4, h5, h6 {
  font-family: var(--at-font-display);
  font-weight: 700;
  line-height: 1.08;
  letter-spacing: -0.02em;
  margin: 0 0 0.5em;
  color: var(--at-ink);
}

h1 { font-size: clamp(38px, 6vw, 76px); }
h2 { font-size: clamp(30px, 4.2vw, 52px); }
h3 { font-size: clamp(22px, 2.6vw, 32px); }
h4 { font-size: clamp(19px, 2vw, 24px); }
h5 { font-size: 18px; }
h6 { font-size: 16px; }

p { margin: 0 0 1.2em; }
p:last-child { margin-bottom: 0; }

.at-serif { font-family: var(--at-font-serif); font-weight: 500; letter-spacing: 0; }
.at-serif-i { font-family: var(--at-font-serif); font-style: italic; font-weight: 500; }
.at-display { font-family: var(--at-font-display); }

.at-lead {
  font-family: var(--at-font-serif);
  font-size: clamp(19px, 2.2vw, 25px);
  line-height: 1.5;
  color: var(--at-ink-soft);
}

.at-eyebrow {
  display: inline-block;
  text-transform: uppercase;
  letter-spacing: 0.22em;
  font-size: 11px;
  font-weight: 700;
  font-family: var(--at-font-display);
  color: var(--at-muted);
  margin-bottom: 18px;
}
.at-eyebrow--red { color: var(--at-red); }

.at-muted { color: var(--at-muted); }
.at-small { font-size: 14px; }
.at-mono-num {
  font-family: var(--at-font-display);
  font-weight: 700;
  font-variant-numeric: tabular-nums;
}

blockquote {
  margin: 32px 0;
  padding: 4px 0 4px 28px;
  border-left: 3px solid var(--at-red);
  font-family: var(--at-font-serif);
  font-size: clamp(20px, 2.4vw, 27px);
  line-height: 1.45;
  font-style: italic;
  color: var(--at-ink-soft);
}
blockquote cite { display: block; margin-top: 14px; font-family: var(--at-font-display); font-style: normal; font-size: 13px; letter-spacing: 0.12em; text-transform: uppercase; color: var(--at-muted); }

code, kbd, pre, samp { font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace; font-size: 0.92em; }
code { background: var(--at-bg-paper); border: 1px solid var(--at-line); padding: 2px 6px; }
pre { background: var(--at-ink); color: var(--at-bg); padding: 24px; overflow-x: auto; border: 0; }
pre code { background: none; border: 0; color: inherit; padding: 0; }

table { width: 100%; border-collapse: collapse; margin: 0 0 28px; font-size: 15px; }
th, td { border: 1px solid var(--at-line); padding: 12px 14px; text-align: left; }
th { background: var(--at-bg-paper); font-family: var(--at-font-display); font-weight: 700; text-transform: uppercase; letter-spacing: 0.08em; font-size: 12px; }

ul, ol { padding-left: 1.3em; margin: 0 0 1.2em; }
li { margin-bottom: 0.45em; }

/*--------------------------------------------------------------
4. UTILITY DI LAYOUT
--------------------------------------------------------------*/
.at-container { width: 100%; max-width: var(--at-max); margin: 0 auto; padding-left: var(--at-gutter); padding-right: var(--at-gutter); }
.at-container--narrow { max-width: var(--at-max-narrow); }
.at-container--wide { max-width: 1400px; }

.at-section { padding-top: var(--at-space-section); padding-bottom: var(--at-space-section); position: relative; }
.at-section--paper { background: var(--at-bg-paper); }
.at-section--ink { background: var(--at-ink); color: var(--at-bg); }
.at-section--ink h1, .at-section--ink h2, .at-section--ink h3 { color: var(--at-bg); }
.at-section--ink .at-eyebrow { color: rgba(251,249,244,0.6); }
.at-section--ink a { color: var(--at-bg); }
.at-section--bordered { border-top: 1px solid var(--at-line); }

.at-grid { display: grid; gap: 28px; }
.at-grid--2 { grid-template-columns: repeat(2, 1fr); }
.at-grid--3 { grid-template-columns: repeat(3, 1fr); }
.at-grid--4 { grid-template-columns: repeat(4, 1fr); }
.at-grid--sidebar { grid-template-columns: minmax(0, 1fr) 320px; gap: 56px; align-items: start; }
.at-grid--split { grid-template-columns: 0.9fr 1.1fr; gap: 56px; align-items: center; }

.at-stack > * + * { margin-top: 18px; }
.at-center { text-align: center; }
.at-flex { display: flex; gap: 16px; flex-wrap: wrap; align-items: center; }
.at-mt-0 { margin-top: 0; }
.at-mb-0 { margin-bottom: 0; }
.at-mt-32 { margin-top: 32px; }
.at-mt-48 { margin-top: 48px; }

.at-rule { height: 1px; background: var(--at-line); border: 0; margin: 0; }

.at-section-head { max-width: 780px; margin-bottom: 52px; }
.at-section-head--center { margin-left: auto; margin-right: auto; text-align: center; }
.at-section-head p { color: var(--at-muted); }

/*--------------------------------------------------------------
5. COMPONENTI
--------------------------------------------------------------*/

/* Grana */
.at-grain { position: relative; }
.at-grain::before {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
  background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='220' height='220'><filter id='n'><feTurbulence type='fractalNoise' baseFrequency='0.85' numOctaves='2' stitchTiles='stitch'/><feColorMatrix values='0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0.18 0'/></filter><rect width='100%25' height='100%25' filter='url(%23n)'/></svg>");
  opacity: 0.6;
  mix-blend-mode: multiply;
  z-index: 0;
}
.at-grain > * { position: relative; z-index: 1; }

/* Link underline animato */
.at-link-underline { position: relative; }
.at-link-underline::after {
  content: "";
  position: absolute;
  left: 0; bottom: -4px;
  height: 1px; width: 100%;
  background: currentColor;
  transform: scaleX(0);
  transform-origin: right;
  transition: transform 350ms var(--at-ease);
}
.at-link-underline:hover::after { transform: scaleX(1); transform-origin: left; }

/* Bottoni */
.at-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  font-family: var(--at-font-display);
  font-weight: 700;
  font-size: 14px;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  padding: 15px 26px;
  border: 2px solid var(--at-ink);
  background: var(--at-bg);
  color: var(--at-ink);
  cursor: pointer;
  border-radius: var(--at-radius);
  box-shadow: var(--at-shadow-hard-sm);
  transition: transform 180ms var(--at-ease), box-shadow 180ms var(--at-ease), background-color 180ms var(--at-ease), color 180ms var(--at-ease);
  text-align: center;
}
.at-btn:hover { transform: translate(-2px, -2px); box-shadow: var(--at-shadow-hard); color: var(--at-ink); }
.at-btn:active { transform: translate(2px, 2px); box-shadow: 0 0 0 var(--at-ink); }

.at-btn--red { background: var(--at-red); border-color: var(--at-ink); color: #fff; }
.at-btn--red:hover { background: var(--at-red-deep); color: #fff; }

.at-btn--ink { background: var(--at-ink); color: var(--at-bg); }
.at-btn--ink:hover { background: var(--at-ink-soft); color: var(--at-bg); }

.at-btn--ghost { background: transparent; box-shadow: none; }
.at-btn--ghost:hover { background: var(--at-ink); color: var(--at-bg); box-shadow: none; transform: none; }

.at-btn--sm { padding: 11px 18px; font-size: 12px; }
.at-btn--full { width: 100%; }

/* Card */
.at-card {
  background: var(--at-bg);
  border: 1px solid var(--at-line);
  padding: 32px;
  position: relative;
  transition: transform 220ms var(--at-ease), box-shadow 220ms var(--at-ease), border-color 220ms var(--at-ease);
}
.at-card--hover:hover { transform: translate(-3px, -3px); box-shadow: var(--at-shadow-hard-sm); border-color: var(--at-ink); }
.at-card__num {
  font-family: var(--at-font-display);
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.2em;
  color: var(--at-red);
  display: block;
  margin-bottom: 14px;
}
.at-card h3 { margin-bottom: 10px; }
.at-card p { color: var(--at-muted); font-size: 15px; }

/* Foto con ombra dura */
.at-photo-shadow { position: relative; display: inline-block; }
.at-photo-shadow img { border: 1px solid var(--at-ink); position: relative; z-index: 1; width: 100%; }
.at-photo-shadow::after {
  content: "";
  position: absolute;
  inset: 14px -14px -14px 14px;
  border: 1px solid var(--at-ink);
  z-index: 0;
}

/* Marquee */
.at-marquee {
  overflow: hidden;
  border-top: 1px solid var(--at-ink);
  border-bottom: 1px solid var(--at-ink);
  background: var(--at-ink);
  color: var(--at-bg);
  padding: 14px 0;
}
.at-marquee__track {
  display: flex;
  width: max-content;
  animation: at-marquee 38s linear infinite;
}
.at-marquee__item {
  font-family: var(--at-font-display);
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.18em;
  font-size: 13px;
  padding: 0 28px;
  white-space: nowrap;
  display: inline-flex;
  align-items: center;
  gap: 28px;
}
.at-marquee__item::after { content: "•"; color: var(--at-red); }
@keyframes at-marquee { from { transform: translateX(0); } to { transform: translateX(-50%); } }
.at-marquee:hover .at-marquee__track { animation-play-state: paused; }

/* Badge */
.at-badge {
  display: inline-block;
  font-family: var(--at-font-display);
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  padding: 6px 12px;
  border: 1px solid var(--at-line);
  background: var(--at-bg-paper);
  color: var(--at-muted);
}
.at-badge--red { background: var(--at-red); border-color: var(--at-red); color: #fff; }

/* Accordion FAQ */
.at-accordion { border-top: 1px solid var(--at-line); }
.at-accordion__item { border-bottom: 1px solid var(--at-line); }
.at-accordion__btn {
  width: 100%;
  background: none;
  border: 0;
  padding: 24px 40px 24px 0;
  text-align: left;
  font-family: var(--at-font-display);
  font-size: clamp(17px, 2vw, 21px);
  font-weight: 700;
  line-height: 1.3;
  color: var(--at-ink);
  cursor: pointer;
  position: relative;
}
.at-accordion__btn::after {
  content: "+";
  position: absolute;
  right: 4px; top: 50%;
  transform: translateY(-50%);
  font-size: 26px;
  font-weight: 500;
  color: var(--at-red);
  transition: transform 250ms var(--at-ease);
}
.at-accordion__btn[aria-expanded="true"]::after { transform: translateY(-50%) rotate(45deg); }
.at-accordion__panel { display: none; padding: 0 40px 26px 0; color: var(--at-muted); }
.at-accordion__panel.is-open { display: block; }

/* Reveal allo scroll */
.at-reveal { opacity: 0; transform: translateY(22px); transition: opacity 700ms var(--at-ease), transform 700ms var(--at-ease); }
.at-reveal.is-visible { opacity: 1; transform: none; }

/*--------------------------------------------------------------
6. HEADER E NAVIGAZIONE
--------------------------------------------------------------*/
.at-header {
  position: sticky;
  top: 0;
  z-index: 90;
  background: rgba(251, 249, 244, 0.92);
  backdrop-filter: saturate(180%) blur(10px);
  -webkit-backdrop-filter: saturate(180%) blur(10px);
  border-bottom: 1px solid transparent;
  transition: border-color 250ms var(--at-ease), box-shadow 250ms var(--at-ease);
}
.at-header.is-scrolled { border-bottom-color: var(--at-line); }
.admin-bar .at-header { top: 32px; }

.at-header__inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  min-height: 76px;
}

.at-brand { display: flex; align-items: center; gap: 12px; }
.at-brand__name {
  font-family: var(--at-font-display);
  font-weight: 700;
  font-size: 17px;
  letter-spacing: -0.01em;
  line-height: 1.1;
  margin: 0;
}
.at-brand__tag {
  display: block;
  font-size: 10px;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--at-muted);
  font-weight: 700;
  margin-top: 3px;
}
.at-brand img { max-height: 44px; width: auto; }

.at-nav ul { list-style: none; margin: 0; padding: 0; display: flex; align-items: center; gap: 28px; }
.at-nav li { margin: 0; position: relative; }
.at-nav a {
  font-family: var(--at-font-display);
  font-size: 13px;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--at-ink-soft);
  position: relative;
  padding: 6px 0;
  display: inline-block;
}
.at-nav a::after {
  content: "";
  position: absolute;
  left: 0; bottom: 0;
  height: 2px; width: 100%;
  background: var(--at-red);
  transform: scaleX(0);
  transform-origin: right;
  transition: transform 300ms var(--at-ease);
}
.at-nav a:hover::after,
.at-nav .current-menu-item > a::after,
.at-nav .current_page_item > a::after,
.at-nav .is-active > a::after { transform: scaleX(1); transform-origin: left; }
.at-nav .current-menu-item > a { color: var(--at-ink); }

/* Sottomenu */
.at-nav .sub-menu {
  position: absolute;
  top: 100%; left: 0;
  min-width: 220px;
  background: var(--at-bg);
  border: 1px solid var(--at-ink);
  box-shadow: var(--at-shadow-hard-sm);
  padding: 10px 0;
  display: block;
  flex-direction: column;
  gap: 0;
  opacity: 0;
  visibility: hidden;
  transform: translateY(8px);
  transition: opacity 200ms var(--at-ease), transform 200ms var(--at-ease), visibility 200ms;
}
.at-nav li:hover > .sub-menu,
.at-nav li:focus-within > .sub-menu { opacity: 1; visibility: visible; transform: none; }
.at-nav .sub-menu li { width: 100%; }
.at-nav .sub-menu a { display: block; padding: 9px 18px; letter-spacing: 0.06em; }
.at-nav .sub-menu a::after { display: none; }
.at-nav .sub-menu a:hover { background: var(--at-bg-paper); color: var(--at-red); }

.at-header__actions { display: flex; align-items: center; gap: 14px; }

/* Toggle mobile */
.at-burger {
  display: none;
  width: 44px; height: 44px;
  border: 1px solid var(--at-ink);
  background: var(--at-bg);
  cursor: pointer;
  align-items: center;
  justify-content: center;
  padding: 0;
}
.at-burger span { display: block; width: 20px; height: 2px; background: var(--at-ink); position: relative; transition: background 200ms; }
.at-burger span::before, .at-burger span::after {
  content: ""; position: absolute; left: 0; width: 20px; height: 2px; background: var(--at-ink);
  transition: transform 250ms var(--at-ease), top 250ms var(--at-ease);
}
.at-burger span::before { top: -6px; }
.at-burger span::after { top: 6px; }
.at-burger[aria-expanded="true"] span { background: transparent; }
.at-burger[aria-expanded="true"] span::before { top: 0; transform: rotate(45deg); }
.at-burger[aria-expanded="true"] span::after { top: 0; transform: rotate(-45deg); }

.at-mobile-nav {
  display: none;
  border-top: 1px solid var(--at-line);
  background: var(--at-bg);
  padding: 20px 0 28px;
}
.at-mobile-nav.is-open { display: block; }
.at-mobile-nav ul { list-style: none; margin: 0; padding: 0; }
.at-mobile-nav li { border-bottom: 1px solid var(--at-line); }
.at-mobile-nav a {
  display: block;
  padding: 15px 0;
  font-family: var(--at-font-display);
  font-weight: 700;
  font-size: 15px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}
.at-mobile-nav .sub-menu { padding-left: 18px; }
.at-mobile-nav .at-btn { margin-top: 22px; }

/* CTA sticky mobile */
.at-sticky-cta {
  position: fixed;
  left: 0; right: 0; bottom: 0;
  z-index: 95;
  background: var(--at-ink);
  padding: 12px 16px;
  display: none;
  gap: 10px;
  align-items: center;
  justify-content: space-between;
  transform: translateY(100%);
  transition: transform 300ms var(--at-ease);
}
.at-sticky-cta.is-visible { transform: none; }
.at-sticky-cta__label { color: var(--at-bg); font-family: var(--at-font-display); font-size: 12px; font-weight: 700; text-transform: uppercase; letter-spacing: 0.1em; }

/*--------------------------------------------------------------
7. HERO E SEZIONI HOME
--------------------------------------------------------------*/
.at-hero { padding-top: clamp(48px, 7vw, 96px); padding-bottom: clamp(48px, 7vw, 96px); position: relative; overflow: hidden; }
.at-hero__grid { display: grid; grid-template-columns: 1.15fr 0.85fr; gap: 64px; align-items: center; }
.at-hero h1 { margin-bottom: 22px; }
.at-hero h1 em { font-family: var(--at-font-serif); font-style: italic; font-weight: 500; letter-spacing: 0; }
.at-hero__sub { max-width: 520px; }
.at-hero__actions { margin-top: 34px; display: flex; gap: 14px; flex-wrap: wrap; }
.at-hero__meta { margin-top: 44px; display: flex; gap: 40px; flex-wrap: wrap; border-top: 1px solid var(--at-line); padding-top: 24px; }
.at-hero__meta dt { font-size: 11px; text-transform: uppercase; letter-spacing: 0.18em; color: var(--at-muted); font-weight: 700; margin-bottom: 6px; }
.at-hero__meta dd { margin: 0; font-family: var(--at-font-display); font-weight: 700; font-size: 15px; }

/* Aziende */
.at-company { display: grid; grid-template-columns: 44px 1fr; gap: 20px; padding: 30px 0; border-bottom: 1px solid var(--at-line); }
.at-company:first-child { border-top: 1px solid var(--at-line); }
.at-company__idx { font-family: var(--at-font-display); font-weight: 700; font-size: 12px; letter-spacing: 0.14em; color: var(--at-red); padding-top: 6px; }
.at-company__role { font-size: 12px; text-transform: uppercase; letter-spacing: 0.16em; color: var(--at-muted); font-weight: 700; margin-bottom: 8px; }
.at-company h3 { margin-bottom: 8px; }
.at-company p { color: var(--at-muted); max-width: 62ch; }
.at-company__link { display: inline-block; margin-top: 12px; font-family: var(--at-font-display); font-weight: 700; font-size: 13px; letter-spacing: 0.08em; text-transform: uppercase; color: var(--at-red); }

/* Blocco libro */
.at-book { display: grid; grid-template-columns: 0.8fr 1.2fr; gap: 60px; align-items: center; }
.at-book__cover img { border: 1px solid var(--at-ink); box-shadow: var(--at-shadow-hard); }
.at-book__points { list-style: none; padding: 0; margin: 26px 0 0; }
.at-book__points li { padding-left: 28px; position: relative; margin-bottom: 12px; color: var(--at-ink-soft); }
.at-book__points li::before { content: "→"; position: absolute; left: 0; color: var(--at-red); font-weight: 700; }

/* Statistiche */
.at-stat { border-left: 2px solid var(--at-red); padding-left: 20px; }
.at-stat__num { font-family: var(--at-font-display); font-weight: 700; font-size: clamp(34px, 4.5vw, 54px); line-height: 1; letter-spacing: -0.03em; }
.at-stat__label { font-size: 12px; text-transform: uppercase; letter-spacing: 0.16em; color: var(--at-muted); font-weight: 700; margin-top: 10px; }

/*--------------------------------------------------------------
8. BLOG
--------------------------------------------------------------*/
.at-page-header { padding: clamp(48px, 6vw, 84px) 0 0; }
.at-page-header h1 { margin-bottom: 14px; }
.at-page-header p { color: var(--at-muted); max-width: 60ch; }

.at-posts { display: grid; grid-template-columns: repeat(auto-fill, minmax(320px, 1fr)); gap: 40px; }

.at-post-card { display: flex; flex-direction: column; border: 1px solid var(--at-line); background: var(--at-bg); transition: transform 240ms var(--at-ease), box-shadow 240ms var(--at-ease), border-color 240ms var(--at-ease); }
.at-post-card:hover { transform: translate(-3px, -3px); box-shadow: var(--at-shadow-hard-sm); border-color: var(--at-ink); }
.at-post-card__thumb { overflow: hidden; border-bottom: 1px solid var(--at-line); aspect-ratio: 16 / 10; }
.at-post-card__thumb img { width: 100%; height: 100%; object-fit: cover; transition: transform 700ms var(--at-ease); }
.at-post-card:hover .at-post-card__thumb img { transform: scale(1.04); }
.at-post-card__body { padding: 26px; display: flex; flex-direction: column; flex: 1; }
.at-post-card__meta { font-size: 11px; text-transform: uppercase; letter-spacing: 0.16em; font-weight: 700; color: var(--at-muted); margin-bottom: 12px; display: flex; gap: 12px; flex-wrap: wrap; }
.at-post-card__meta a { color: var(--at-red); }
.at-post-card h2, .at-post-card h3 { font-size: clamp(20px, 2.2vw, 25px); margin-bottom: 12px; line-height: 1.2; }
.at-post-card p { color: var(--at-muted); font-size: 15px; margin-bottom: 20px; }
.at-post-card__more { margin-top: auto; font-family: var(--at-font-display); font-size: 12px; font-weight: 700; letter-spacing: 0.12em; text-transform: uppercase; color: var(--at-ink); display: inline-flex; align-items: center; gap: 8px; }
.at-post-card__more::after { content: "→"; transition: transform 250ms var(--at-ease); }
.at-post-card:hover .at-post-card__more::after { transform: translateX(5px); }

/* Sticky */
.at-post-card.sticky { border-color: var(--at-ink); box-shadow: var(--at-shadow-hard-sm); }

/* Articolo singolo */
.at-single { padding: clamp(40px, 5vw, 72px) 0 var(--at-space-section); }
.at-single__header { max-width: 820px; margin: 0 auto 44px; text-align: center; }
.at-single__meta { display: flex; gap: 18px; justify-content: center; flex-wrap: wrap; font-size: 11px; text-transform: uppercase; letter-spacing: 0.16em; font-weight: 700; color: var(--at-muted); margin-bottom: 20px; }
.at-single__meta a { color: var(--at-red); }
.at-single__thumb { margin: 0 0 48px; }
.at-single__thumb img { width: 100%; border: 1px solid var(--at-ink); }

.at-content { max-width: var(--at-max-narrow); margin: 0 auto; font-size: 17px; line-height: 1.75; }
.at-content h2 { margin-top: 48px; }
.at-content h3 { margin-top: 36px; }
.at-content > *:first-child { margin-top: 0; }
.at-content a { color: var(--at-red); text-decoration: underline; text-underline-offset: 3px; text-decoration-thickness: 1px; }
.at-content a:hover { color: var(--at-red-deep); }
.at-content img { margin: 32px 0; border: 1px solid var(--at-line); }

.at-tags { max-width: var(--at-max-narrow); margin: 48px auto 0; display: flex; gap: 10px; flex-wrap: wrap; }
.at-tags a { font-size: 11px; text-transform: uppercase; letter-spacing: 0.12em; font-weight: 700; padding: 7px 13px; border: 1px solid var(--at-line); color: var(--at-muted); }
.at-tags a:hover { border-color: var(--at-ink); color: var(--at-ink); }

.at-author-box { max-width: var(--at-max-narrow); margin: 56px auto 0; display: grid; grid-template-columns: 84px 1fr; gap: 24px; padding: 32px; background: var(--at-bg-paper); border: 1px solid var(--at-line); }
.at-author-box img { border-radius: 50%; border: 1px solid var(--at-ink); }
.at-author-box h4 { margin-bottom: 8px; }
.at-author-box p { font-size: 15px; color: var(--at-muted); margin: 0; }

.at-post-nav { max-width: var(--at-max-narrow); margin: 56px auto 0; display: grid; grid-template-columns: 1fr 1fr; gap: 24px; border-top: 1px solid var(--at-line); padding-top: 32px; }
.at-post-nav__item span { display: block; font-size: 11px; text-transform: uppercase; letter-spacing: 0.16em; font-weight: 700; color: var(--at-muted); margin-bottom: 8px; }
.at-post-nav__item--next { text-align: right; }
.at-post-nav__item a { font-family: var(--at-font-display); font-weight: 700; font-size: 16px; line-height: 1.3; }

/* Paginazione */
.at-pagination { margin-top: 64px; display: flex; justify-content: center; }
.at-pagination .nav-links { display: flex; gap: 8px; flex-wrap: wrap; align-items: center; }
.at-pagination .page-numbers {
  display: inline-flex; align-items: center; justify-content: center;
  min-width: 44px; height: 44px; padding: 0 12px;
  border: 1px solid var(--at-line);
  font-family: var(--at-font-display); font-weight: 700; font-size: 14px;
  color: var(--at-ink-soft);
  transition: all 200ms var(--at-ease);
}
.at-pagination .page-numbers:hover { border-color: var(--at-ink); }
.at-pagination .page-numbers.current { background: var(--at-ink); border-color: var(--at-ink); color: var(--at-bg); }
.at-pagination .dots { border-color: transparent; }

/*--------------------------------------------------------------
9. COMMENTI
--------------------------------------------------------------*/
.at-comments { max-width: var(--at-max-narrow); margin: 72px auto 0; padding-top: 48px; border-top: 1px solid var(--at-line); }
.at-comments__title { font-size: clamp(22px, 3vw, 30px); margin-bottom: 36px; }
.comment-list { list-style: none; padding: 0; margin: 0 0 48px; }
.comment-list li { margin-bottom: 28px; }
.comment-list .children { list-style: none; padding-left: 32px; margin-top: 28px; border-left: 1px solid var(--at-line); }
.comment-body { background: var(--at-bg-paper); border: 1px solid var(--at-line); padding: 24px; }
.comment-author { display: flex; align-items: center; gap: 12px; margin-bottom: 12px; font-family: var(--at-font-display); font-weight: 700; font-size: 15px; }
.comment-author img { border-radius: 50%; }
.comment-metadata { font-size: 11px; text-transform: uppercase; letter-spacing: 0.14em; color: var(--at-muted); margin-bottom: 14px; }
.comment-metadata a { color: var(--at-muted); }
.reply { margin-top: 12px; }
.comment-reply-link { font-size: 11px; text-transform: uppercase; letter-spacing: 0.14em; font-weight: 700; color: var(--at-red); }
.comment-respond { padding-top: 8px; }
.comment-reply-title { font-size: 22px; margin-bottom: 20px; }

/*--------------------------------------------------------------
10. FORM
--------------------------------------------------------------*/
.at-form { display: grid; gap: 18px; }
.at-form__row { display: grid; grid-template-columns: 1fr 1fr; gap: 18px; }
.at-field label,
.at-form label {
  display: block;
  font-family: var(--at-font-display);
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.16em;
  color: var(--at-muted);
  margin-bottom: 8px;
}
input[type="text"], input[type="email"], input[type="url"], input[type="tel"],
input[type="password"], input[type="search"], input[type="number"], input[type="date"],
select, textarea {
  width: 100%;
  padding: 14px 16px;
  border: 1px solid var(--at-line);
  background: var(--at-bg);
  color: var(--at-ink);
  font-family: var(--at-font-body);
  font-size: 15px;
  border-radius: var(--at-radius);
  transition: border-color 200ms var(--at-ease), box-shadow 200ms var(--at-ease);
}
input:focus, select:focus, textarea:focus {
  outline: none;
  border-color: var(--at-ink);
  box-shadow: 3px 3px 0 var(--at-ink);
}
textarea { min-height: 150px; resize: vertical; }
::placeholder { color: #A9A69D; }

.at-form__consent { display: flex; gap: 10px; align-items: flex-start; }
.at-form__consent input { width: 18px; height: 18px; margin-top: 3px; flex: 0 0 auto; }
.at-form__consent label { text-transform: none; letter-spacing: 0; font-size: 13px; font-weight: 500; color: var(--at-muted); margin: 0; line-height: 1.5; }
.at-form__consent a { color: var(--at-red); text-decoration: underline; }

.at-form__hp { position: absolute !important; left: -9999px !important; width: 1px; height: 1px; overflow: hidden; }

.at-form__msg { display: none; padding: 16px 18px; border: 1px solid; font-size: 14px; font-weight: 700; font-family: var(--at-font-display); }
.at-form__msg.is-visible { display: block; }
.at-form__msg--ok { border-color: #2F7D4F; background: #EAF5EE; color: #1F5B39; }
.at-form__msg--err { border-color: var(--at-red); background: #FBEDEC; color: var(--at-red-deep); }

.at-search-form { display: flex; gap: 0; }
.at-search-form input[type="search"] { border-right: 0; }
.at-search-form .at-btn { box-shadow: none; }
.at-search-form .at-btn:hover { transform: none; box-shadow: none; }

/*--------------------------------------------------------------
11. WIDGET E SIDEBAR
--------------------------------------------------------------*/
.at-sidebar .widget { margin-bottom: 44px; }
.at-sidebar .widget-title, .at-sidebar .wp-block-heading {
  font-family: var(--at-font-display);
  font-size: 12px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.18em;
  color: var(--at-muted);
  padding-bottom: 12px;
  border-bottom: 1px solid var(--at-line);
  margin-bottom: 20px;
}
.at-sidebar ul { list-style: none; padding: 0; margin: 0; }
.at-sidebar li { padding: 9px 0; border-bottom: 1px solid var(--at-line); font-size: 15px; }
.at-sidebar li:last-child { border-bottom: 0; }
.at-sidebar a:hover { color: var(--at-red); }

/*--------------------------------------------------------------
12. FOOTER
--------------------------------------------------------------*/
.at-footer { background: var(--at-ink); color: var(--at-bg); padding: clamp(56px, 7vw, 88px) 0 0; margin-top: var(--at-space-section); }
.at-footer a { color: var(--at-bg); }
.at-footer a:hover { color: var(--at-red); }
.at-footer__grid { display: grid; grid-template-columns: 1.4fr 1fr 1fr 1.2fr; gap: 44px; padding-bottom: 56px; }
.at-footer h2, .at-footer h3, .at-footer .widget-title {
  font-family: var(--at-font-display);
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.2em;
  color: rgba(251,249,244,0.55);
  margin-bottom: 20px;
}
.at-footer__brand-name { font-family: var(--at-font-display); font-size: 22px; font-weight: 700; color: var(--at-bg); margin-bottom: 12px; letter-spacing: -0.01em; }
.at-footer p, .at-footer li { color: rgba(251,249,244,0.7); font-size: 15px; }
.at-footer ul { list-style: none; padding: 0; margin: 0; }
.at-footer li { margin-bottom: 10px; }
.at-footer .widget { margin-bottom: 0; }

.at-social { display: flex; gap: 10px; margin-top: 20px; }
.at-social a {
  width: 40px; height: 40px;
  border: 1px solid rgba(251,249,244,0.3);
  display: inline-flex; align-items: center; justify-content: center;
  transition: background 220ms var(--at-ease), border-color 220ms var(--at-ease), transform 220ms var(--at-ease);
}
.at-social a:hover { background: var(--at-red); border-color: var(--at-red); transform: translateY(-3px); }
.at-social svg { width: 17px; height: 17px; fill: currentColor; }

.at-footer__bottom {
  border-top: 1px solid rgba(251,249,244,0.16);
  padding: 26px 0 34px;
  display: flex;
  justify-content: space-between;
  gap: 20px;
  flex-wrap: wrap;
  font-size: 12px;
  color: rgba(251,249,244,0.55);
}
.at-footer__bottom a { color: rgba(251,249,244,0.7); }
.at-footer__legal { display: flex; gap: 20px; flex-wrap: wrap; }

/*--------------------------------------------------------------
13. CLASSI CORE WORDPRESS
--------------------------------------------------------------*/
.screen-reader-text {
  border: 0; clip-path: inset(50%); height: 1px; margin: -1px; overflow: hidden;
  padding: 0; position: absolute !important; width: 1px; word-wrap: normal !important;
}
.screen-reader-text:focus {
  background-color: var(--at-bg); clip-path: none; color: var(--at-ink);
  display: block; font-size: 14px; font-weight: 700; height: auto;
  left: 8px; top: 8px; line-height: normal; padding: 15px 23px 14px;
  text-decoration: none; width: auto; z-index: 100000;
  border: 2px solid var(--at-ink);
}
.alignleft { float: left; margin-right: 1.5em; margin-bottom: 1em; }
.alignright { float: right; margin-left: 1.5em; margin-bottom: 1em; }
.aligncenter { display: block; margin-left: auto; margin-right: auto; }
.alignwide { max-width: 1180px; margin-left: calc(50% - 590px); width: 1180px; }
.alignfull { max-width: 100vw; width: 100vw; margin-left: calc(50% - 50vw); }
.wp-caption { max-width: 100%; }
.wp-caption-text, .wp-block-image figcaption {
  font-size: 13px; color: var(--at-muted); text-align: center; margin-top: 10px;
  font-family: var(--at-font-display); letter-spacing: 0.04em;
}
.wp-block-button__link { border-radius: 0 !important; font-family: var(--at-font-display); font-weight: 700; text-transform: uppercase; letter-spacing: 0.06em; }
.wp-block-pullquote, .wp-block-quote { border-left: 3px solid var(--at-red); }
.at-skip-link { position: absolute; }

/*--------------------------------------------------------------
14. RESPONSIVE
--------------------------------------------------------------*/
@media (max-width: 1024px) {
  .at-grid--sidebar { grid-template-columns: 1fr; gap: 56px; }
  .at-footer__grid { grid-template-columns: 1fr 1fr; }
  .at-hero__grid { grid-template-columns: 1fr; gap: 44px; }
  .at-book { grid-template-columns: 1fr; gap: 40px; }
  .at-grid--split { grid-template-columns: 1fr; gap: 40px; }
  .at-grid--4 { grid-template-columns: repeat(2, 1fr); }
}

@media (max-width: 900px) {
  .at-nav { display: none; }
  .at-burger { display: inline-flex; }
  .at-header__actions .at-btn { display: none; }
  .at-sticky-cta { display: flex; }
  .at-grid--3 { grid-template-columns: 1fr; }
}

@media (max-width: 680px) {
  :root { --at-gutter: 18px; }
  .at-grid--2, .at-grid--4 { grid-template-columns: 1fr; }
  .at-form__row { grid-template-columns: 1fr; }
  .at-post-nav { grid-template-columns: 1fr; }
  .at-post-nav__item--next { text-align: left; }
  .at-author-box { grid-template-columns: 1fr; }
  .at-hero__meta { gap: 24px; }
  .at-alignwide, .alignwide { max-width: 100%; margin-left: 0; width: auto; }
  .at-single__meta { justify-content: flex-start; }
  .at-single__header { text-align: left; }
  .at-photo-shadow::after { inset: 10px -10px -10px 10px; }
}

/*--------------------------------------------------------------
15. ACCESSIBILITÀ E STAMPA
--------------------------------------------------------------*/
:focus-visible { outline: 3px solid var(--at-red); outline-offset: 3px; }

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
  .at-reveal { opacity: 1; transform: none; }
}

@media print {
  .at-header, .at-footer, .at-sticky-cta, .at-comments, .at-sidebar { display: none !important; }
  body { background: #fff; color: #000; }
  .at-content { max-width: 100%; }
}
