/*
 * Thrinakie 2026 — base: token, tipografia, pulsanti, intestazione, menu, hero.
 * Identita' del sito thrinakie.it (bordeaux, sabbia, serif) in chiave moderna. Mobile-first.
 * Tutte le animazioni sono disattivate con prefers-reduced-motion (vedi thrinakie2026_pages.css).
 */

body[data-ms-layout="thrinakie2026"] {
  --t-wine: #6e0c0c;
  --t-burg: #760011;
  --t-deep: #2b0408;
  --t-deep-2: #3f080c;
  --t-bone: #f6f3ea;
  --t-sand: #e2e2d7;
  --t-taupe: #8a8669;
  --t-taupe-d: #5f5c45;
  --t-rose: #e9c9c4;
  --t-ink: #2a1214;
  --t-muted: #6b5f5c;
  --t-line: rgba(110, 12, 12, 0.16);
  --t-serif: "Iowan Old Style", "Palatino Linotype", Palatino, "Book Antiqua", "Times New Roman", Times, serif;
  --t-sans: system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  --t-ease: cubic-bezier(0.22, 1, 0.36, 1);
  --t-header-h: 72px;

  /* Il resto del portale (elenco e scheda immobile) prende i colori della casa. */
  --brand: #760011;
  --brand-strong: #6e0c0c;
  --brand-2: #6e0c0c;
  --brand-soft: #9b2b3a;
  --brand-rgb: 118, 0, 17;
  --brand-ghost: #f6e9e9;
  --brand-wash: #f6f3ea;
  --accent: #9b2b3a;
  --bg: #f6f3ea;
  --surface: #fffdfa;
  --surface-2: #f6f3ea;
  --card: #fffdfa;
  --card-soft: #f6f3ea;
  --line: #e4dcd4;
  --muted: #6b5f5c;
  --page-bg: linear-gradient(180deg, #f8f5ee 0%, #ece7da 100%);
  --hero-bg: linear-gradient(180deg, #f8f5ee 0%, #ece7da 100%);
  --footer-bg: #1a0205;
  --shadow-soft: 0 10px 30px rgba(110, 12, 12, 0.08);
  --shadow-strong: 0 16px 40px rgba(110, 12, 12, 0.14);
  --focus-ring: 0 0 0 3px rgba(118, 0, 17, 0.22);
  --text: #2a1214;
  --ink: #2a1214;
  --ink-strong: #2a1214;

  background: var(--t-bone);
  color: var(--t-ink);
  font-family: var(--t-sans);
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

/* Il portale colora p/li/span/label con var(--ink) !important: nelle sezioni scure la variabile diventa chiara. */
.t-hero,
.t-cta,
.t-markets,
.t-office,
.t-footer,
.t-menu,
.t-marquee {
  --ink: #fff;
  --ink-strong: #fff;
}

.t-search {
  --ink: #2a1214;
  --ink-strong: #2a1214;
}

body[data-ms-layout="thrinakie2026"] .sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  margin: -1px;
  padding: 0;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
  border: 0;
}

.t-root {
  overflow-x: clip;
}

.t-wrap {
  width: min(1240px, 100% - 40px);
  margin-inline: auto;
}

@media (min-width: 720px) {
  .t-wrap {
    width: min(1240px, 100% - 64px);
  }
}

.t-ico {
  width: 20px;
  height: 20px;
  flex: 0 0 auto;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.7;
  stroke-linecap: round;
  stroke-linejoin: round;
}

/* ------------------------------------------------------------ tipografia */
.t-kicker {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  margin: 0 0 18px;
  font: 600 0.75rem/1.2 var(--t-sans);
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--t-rose);
}

.t-kicker::before {
  content: "";
  width: 28px;
  height: 1px;
  background: currentColor;
  opacity: 0.8;
}

.t-kicker--dark {
  color: var(--t-wine);
}

.t-display {
  margin: 0;
  font: 400 clamp(2.4rem, 1.1rem + 6.4vw, 5.8rem) / 1.03 var(--t-serif);
  letter-spacing: -0.02em;
  color: #fff;
  text-wrap: balance;
}

.t-display--page {
  font-size: clamp(2.1rem, 1rem + 4.8vw, 4.5rem);
  max-width: 17ch;
}

.t-h2 {
  margin: 0 0 18px;
  font: 400 clamp(1.8rem, 1.1rem + 3vw, 3.3rem) / 1.08 var(--t-serif);
  letter-spacing: -0.015em;
  color: var(--t-wine);
  text-wrap: balance;
}

.t-h2--light {
  color: #fff;
}

.t-lead {
  margin: 22px 0 0;
  max-width: 54ch;
  font: 400 clamp(1.02rem, 0.95rem + 0.5vw, 1.25rem) / 1.65 var(--t-sans);
  color: rgba(255, 255, 255, 0.82);
}

.t-copy {
  margin: 0 0 16px;
  max-width: 62ch;
  font: 400 1.04rem / 1.75 var(--t-sans);
  color: var(--t-muted);
}

.t-link {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  min-height: 44px;
  font: 600 0.95rem var(--t-sans);
  color: var(--t-wine);
  text-decoration: none;
  border-bottom: 1px solid currentColor;
}

.t-link .t-ico {
  transition: transform 0.4s var(--t-ease);
}

.t-link:hover .t-ico {
  transform: translateX(5px);
}

.t-center {
  margin: 36px 0 0;
  text-align: center;
}

/* ------------------------------------------------------------ pulsanti */
.t-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 30px;
}

.t-actions--center {
  justify-content: center;
}

.t-btn {
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  min-height: 52px;
  padding: 0 26px;
  border: 1px solid transparent;
  border-radius: 999px;
  font: 600 0.97rem var(--t-sans);
  letter-spacing: 0.01em;
  text-decoration: none;
  cursor: pointer;
  overflow: hidden;
  isolation: isolate;
  transition: transform 0.4s var(--t-ease), background-color 0.3s, color 0.3s, border-color 0.3s, box-shadow 0.4s;
  -webkit-tap-highlight-color: transparent;
}

.t-btn::after {
  content: "";
  position: absolute;
  inset: 0;
  z-index: -1;
  background: linear-gradient(110deg, transparent 30%, rgba(255, 255, 255, 0.35) 50%, transparent 70%);
  transform: translateX(-120%);
  transition: transform 0.8s var(--t-ease);
}

.t-btn:hover::after {
  transform: translateX(120%);
}

.t-btn:hover {
  transform: translateY(-2px);
}

.t-btn--light {
  background: var(--t-bone);
  color: var(--t-wine);
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.25);
}

.t-btn--ghost {
  background: rgba(255, 255, 255, 0.06);
  border-color: rgba(255, 255, 255, 0.4);
  color: #fff;
}

.t-btn--ghost:hover {
  background: rgba(255, 255, 255, 0.16);
}

.t-btn--wine {
  background: var(--t-wine);
  color: #fff;
  box-shadow: 0 12px 28px rgba(110, 12, 12, 0.3);
}

.t-btn--wine:hover {
  background: var(--t-burg);
}

body[data-ms-layout="thrinakie2026"] a:focus-visible,
body[data-ms-layout="thrinakie2026"] button:focus-visible,
body[data-ms-layout="thrinakie2026"] input:focus-visible,
body[data-ms-layout="thrinakie2026"] select:focus-visible,
body[data-ms-layout="thrinakie2026"] [tabindex]:focus-visible {
  outline: 2px solid var(--t-rose);
  outline-offset: 3px;
}

/* ------------------------------------------------------------ intestazione */
.t-header {
  position: fixed;
  inset: 0 0 auto 0;
  z-index: 60;
  padding-top: env(safe-area-inset-top);
  transition: background-color 0.4s, box-shadow 0.4s, transform 0.5s var(--t-ease);
}

body:not([data-t-page]) .t-header {
  position: sticky;
  background: var(--t-deep);
}

.t-header.is-scrolled {
  background: rgba(43, 4, 8, 0.86);
  -webkit-backdrop-filter: blur(16px) saturate(1.3);
  backdrop-filter: blur(16px) saturate(1.3);
  box-shadow: 0 10px 40px rgba(0, 0, 0, 0.3);
}

.t-header-inner {
  display: flex;
  align-items: center;
  gap: 16px;
  width: min(1320px, 100% - 28px);
  min-height: var(--t-header-h);
  margin-inline: auto;
}

.t-brand {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  min-height: 48px;
  margin-right: auto;
  color: #fff;
  text-decoration: none;
}

.t-brand-seal {
  width: 52px;
  height: 52px;
  color: var(--t-rose);
  --t-leg: #d7a5a1;
  --t-face: #2b0408;
  transition: transform 0.9s var(--t-ease);
}

.t-brand:hover .t-brand-seal {
  transform: rotate(120deg);
}

.t-brand-text {
  display: grid;
  line-height: 1;
}

.t-brand-text b {
  font: 400 clamp(1.45rem, 1.2rem + 1vw, 1.9rem) / 1 var(--t-serif);
  letter-spacing: 0.01em;
}

.t-brand-text i {
  margin-top: 5px;
  font: 600 0.58rem/1 var(--t-sans);
  font-style: normal;
  letter-spacing: 0.34em;
  text-transform: uppercase;
  color: var(--t-rose);
}

.t-nav {
  display: none;
  align-items: center;
  gap: 2px;
  padding: 6px;
  border-radius: 999px;
  background: linear-gradient(180deg, rgba(140, 0, 24, 0.95), rgba(96, 0, 16, 0.95));
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.28), inset 0 1px 0 rgba(255, 255, 255, 0.14);
}

.t-nav a {
  position: relative;
  padding: 11px 17px;
  border-radius: 999px;
  font: 400 1.04rem / 1 var(--t-serif);
  color: #fff;
  text-decoration: none;
  white-space: nowrap;
  transition: background-color 0.3s;
}

.t-nav a:hover {
  background: rgba(255, 255, 255, 0.13);
}

.t-nav a.is-active {
  background: rgba(255, 255, 255, 0.2);
}

.t-call {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  min-width: 48px;
  min-height: 48px;
  border-radius: 999px;
  color: #fff;
  background: rgba(255, 255, 255, 0.1);
  border: 1px solid rgba(255, 255, 255, 0.22);
  font: 600 0.92rem var(--t-sans);
  text-decoration: none;
}

.t-call span {
  display: none;
}

.t-burger {
  position: relative;
  width: 48px;
  height: 48px;
  border: 0;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.1);
  cursor: pointer;
  -webkit-tap-highlight-color: transparent;
}

.t-burger i {
  position: absolute;
  left: 14px;
  right: 14px;
  height: 2px;
  background: #fff;
  border-radius: 2px;
  transition: transform 0.4s var(--t-ease), opacity 0.2s;
}

.t-burger i:nth-child(1) {
  top: 17px;
}

.t-burger i:nth-child(2) {
  top: 23px;
}

.t-burger i:nth-child(3) {
  top: 29px;
}

.t-burger[aria-expanded="true"] i:nth-child(1) {
  transform: translateY(6px) rotate(45deg);
}

.t-burger[aria-expanded="true"] i:nth-child(2) {
  opacity: 0;
}

.t-burger[aria-expanded="true"] i:nth-child(3) {
  transform: translateY(-6px) rotate(-45deg);
}

.t-progress {
  height: 2px;
  background: transparent;
}

.t-progress i {
  display: block;
  height: 100%;
  width: 100%;
  background: linear-gradient(90deg, var(--t-rose), #fff);
  transform: scaleX(0);
  transform-origin: left;
}

@media (min-width: 1040px) {
  .t-header {
    --t-header-h: 88px;
  }

  .t-nav {
    display: flex;
  }

  .t-burger {
    display: none;
  }

  .t-brand {
    margin-right: 0;
    flex: 1 1 0;
  }

  .t-call {
    padding: 0 20px;
    flex: 0 0 auto;
  }

  .t-call span {
    display: inline;
  }
}

@media (min-width: 1040px) and (max-width: 1239px) {
  .t-call span {
    display: none;
  }

  .t-call {
    padding: 0;
    width: 48px;
  }
}
