/*
Theme Name:        TILEor 2026
Theme URI:         https://www.tileor.it/
Description:       Tema leggero di TILEor srl: intestazione, menu, pagine interne e stile della home. Funziona con il plugin Tileor Hero e con Contact Form 7.
Author:            TILEor srl
Version:           1.3.0
Requires at least: 6.0
Requires PHP:      7.4
License:           GPL-2.0-or-later
Text Domain:       tileor-2026
*/

/* ---------- Base ---------- */
:root {
  --t-ground: #ECEBE7;
  --t-ground-2: #E2E0DA;
  --t-ink: #141414;
  --t-body: #2E2D2A;
  --t-muted: #5A5852;
  --t-line: #CFCCC4;
  --t-accent: #7A5C24;
  --t-dark: #141414;
  --t-dark-line: #3A3936;
  --t-dark-muted: #A9A6A0;
  --t-gold: #C9A66B;
  --t-font: "Inter Tight", system-ui, -apple-system, "Segoe UI", sans-serif;
  --t-mono: "IBM Plex Mono", ui-monospace, SFMono-Regular, Menlo, monospace;
  --t-header-h: 88px;
}
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; scroll-padding-top: calc(var(--t-header-h) + 16px); }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }
html, body { overflow-x: clip; }
body {
  margin: 0;
  background: var(--t-ground);
  color: var(--t-body);
  font-family: var(--t-font);
  font-size: 17px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}
img, video { max-width: 100%; height: auto; }
a { color: var(--t-ink); text-decoration-thickness: 1px; text-underline-offset: 3px; }
a:hover { color: var(--t-accent); }
h1, h2, h3, h4, h5, h6 {
  font-family: var(--t-font); color: var(--t-ink); font-weight: 400;
  letter-spacing: -.03em; line-height: 1.1; margin: 0 0 .6em;
}
:focus-visible { outline: 2px solid var(--t-gold); outline-offset: 3px; }

.t-wrap { max-width: 1320px; margin: 0 auto; padding: 0 40px; }
@media (max-width: 640px) { .t-wrap { padding: 0 16px; } }
.t-mono { font-family: var(--t-mono); letter-spacing: .05em; text-transform: uppercase; }

.screen-reader-text {
  border: 0; clip: rect(1px, 1px, 1px, 1px); clip-path: inset(50%);
  height: 1px; width: 1px; margin: -1px; overflow: hidden; padding: 0; position: absolute; word-wrap: normal !important;
}
.t-skip:focus {
  clip: auto; clip-path: none; width: auto; height: auto; margin: 0; z-index: 1000;
  left: 16px; top: 16px; padding: 12px 16px; background: var(--t-ink); color: var(--t-ground);
}

/* ---------- Intestazione ---------- */
.t-header {
  position: sticky; top: 0; z-index: 100;
  background: var(--t-ground); /* opaca: il riquadro chiaro del logo si fonde sempre con lo sfondo */
  border-bottom: 1px solid var(--t-line);
}
body.admin-bar .t-header { top: 32px; }
@media (max-width: 782px) { body.admin-bar .t-header { top: 46px; } }
@media (max-width: 600px) { body.admin-bar .t-header { top: 0; } }

.t-header-row { display: flex; align-items: center; justify-content: space-between; gap: 24px; min-height: var(--t-header-h); }
.t-logo { display: inline-flex; align-items: center; min-height: 44px; flex: none; }
.t-logo img { display: block; height: 60px; width: auto; }
@media (max-width: 640px) { .t-logo img { height: 46px; } }

.t-nav { display: flex; align-items: center; gap: 28px; }
.t-menu { display: flex; align-items: center; gap: 28px; margin: 0; padding: 0; list-style: none; }
.t-menu li { margin: 0; }
.t-menu a {
  display: inline-flex; align-items: center; min-height: 44px; font-size: 15px;
  color: var(--t-ink); text-decoration: none; border-bottom: 1px solid transparent;
  transition: border-color .2s ease;
}
.t-menu a:hover, .t-menu .current-menu-item > a { color: var(--t-ink); border-bottom-color: var(--t-ink); }
.t-menu .sub-menu { display: none; }

.t-btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 10px; min-height: 44px; padding: 0 20px;
  background: var(--t-ink); color: var(--t-ground); font: inherit; font-size: 15px; font-weight: 500;
  text-decoration: none; border: 1px solid var(--t-ink); cursor: pointer; transition: background .2s, color .2s;
}
.t-btn:hover { background: transparent; color: var(--t-ink); }
.t-icon-link {
  display: inline-flex; align-items: center; justify-content: center; width: 44px; height: 44px;
  border-radius: 50%; border: 1px solid var(--t-line); color: var(--t-ink); transition: background .2s, border-color .2s, color .2s;
}
.t-icon-link:hover { background: var(--t-ink); border-color: var(--t-ink); color: var(--t-ground); }

.t-menu-btn {
  display: none; align-items: center; gap: 10px; min-height: 44px; padding: 0 16px;
  background: transparent; border: 1px solid var(--t-ink); color: var(--t-ink);
  font: inherit; font-size: 15px; cursor: pointer;
}
.t-menu-btn[aria-expanded="true"] { background: var(--t-ink); color: var(--t-ground); }

@media (max-width: 900px) {
  .t-menu-btn { display: inline-flex; }
  .t-nav {
    display: none; position: absolute; left: 0; right: 0; top: 100%;
    flex-direction: column; align-items: stretch; gap: 0;
    background: var(--t-ground); border-bottom: 1px solid var(--t-line); padding: 8px 16px 24px;
  }
  .t-nav.is-open { display: flex; }
  .t-menu { flex-direction: column; align-items: stretch; gap: 0; }
  .t-menu a { width: 100%; min-height: 56px; font-size: 22px; letter-spacing: -.02em; border-bottom: 1px solid var(--t-line); }
  .t-menu a:hover { border-bottom-color: var(--t-ink); }
  .t-nav-extra { display: flex; gap: 12px; align-items: center; margin-top: 20px; }
  .t-nav-extra .t-btn { flex: 1 1 auto; min-height: 52px; }
}
@media (min-width: 901px) { .t-nav-extra { display: flex; gap: 12px; align-items: center; } }

/* ---------- Pagine interne ---------- */
.t-main { min-height: 50vh; }
.t-page { padding: 96px 0 128px; }
.t-page-head { margin-bottom: 56px; }
.t-page-head .t-mono { display: block; font-size: 13px; color: var(--t-accent); margin-bottom: 20px; }
.t-page-title { font-size: clamp(40px, 5.6vw, 76px); letter-spacing: -.045em; line-height: 1; margin: 0; }
.t-content { max-width: 820px; font-size: 18px; }
.t-content > * + * { margin-top: 1.1em; }
.t-content h2 { font-size: clamp(28px, 3.4vw, 40px); margin-top: 1.6em; }
.t-content h3 { font-size: 24px; margin-top: 1.4em; }
.t-content p, .t-content ul, .t-content ol { margin-bottom: 0; }
.t-content img { display: block; }
.t-content .alignwide { max-width: 1240px; }
.t-content .alignfull { width: 100vw; max-width: 100vw; margin-left: calc(50% - 50vw); }

.t-list { list-style: none; margin: 0; padding: 0; border-top: 1px solid var(--t-line); max-width: 960px; }
.t-list li { border-bottom: 1px solid var(--t-line); }
.t-list a { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 8px 32px; padding: 28px 0; text-decoration: none; }
.t-list a:hover { padding-left: 12px; transition: padding .2s ease; }
.t-list-title { font-size: clamp(24px, 2.6vw, 34px); letter-spacing: -.02em; line-height: 1.15; }
.t-list-date { font-size: 12px; color: var(--t-muted); }
.t-pagination { margin-top: 40px; display: flex; gap: 16px; }

/* Moduli Contact Form 7 fuori dalla home */
.t-content .wpcf7 input[type="text"], .t-content .wpcf7 input[type="email"], .t-content .wpcf7 input[type="tel"],
.t-content .wpcf7 textarea, .t-content .wpcf7 select {
  width: 100%; font: inherit; color: var(--t-ink); background: transparent; border: 0;
  border-bottom: 1px solid var(--t-line); border-radius: 0; padding: 12px 0; min-height: 44px;
}
.t-content .wpcf7 input[type="submit"] {
  min-height: 52px; padding: 0 32px; border: 0; background: var(--t-ink); color: var(--t-ground);
  font: inherit; font-weight: 500; cursor: pointer;
}

/* ---------- Piè di pagina (pagine interne; in home c'è quello della landing) ---------- */
.t-footer { background: var(--t-dark); color: var(--t-ground); }
.t-footer-cta { padding: 96px 0 72px; display: flex; flex-wrap: wrap; gap: 32px; align-items: flex-end; justify-content: space-between; }
.t-footer-cta h2 { color: var(--t-ground); font-size: clamp(36px, 4.6vw, 64px); letter-spacing: -.04em; margin: 0; max-width: 720px; }
.t-footer-cta .t-btn { background: var(--t-ground); color: var(--t-ink); border-color: var(--t-ground); min-height: 52px; padding: 0 28px; }
.t-footer-cta .t-btn:hover { background: transparent; color: var(--t-ground); }
.t-footer-bottom {
  border-top: 1px solid var(--t-dark-line); padding: 32px 0 40px;
  display: flex; flex-wrap: wrap; gap: 16px 40px; justify-content: space-between; align-items: center;
}
.t-footer-bottom small { font-size: 11px; color: var(--t-dark-muted); }
.t-footer-bottom nav { display: flex; gap: 24px; align-items: center; }
.t-footer-bottom nav a { color: #C4C1BB; font-size: 11px; padding: 12px 0; text-decoration: none; }
.t-footer-bottom nav a:hover { color: var(--t-ground); }
.t-footer .t-logo img { height: 48px; }

/* ---------- 404 ---------- */
.t-404 { padding: 160px 0; }
.t-404 p { font-size: 19px; max-width: 520px; }
