/* ============================================================
   TENANTO — BASE + SHARED COMPONENTS
   ============================================================ */

*, *::before, *::after { box-sizing: border-box; }
* { margin: 0; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
body {
  font-family: var(--font-body);
  font-size: var(--fs-base);
  line-height: var(--lh-normal);
  color: var(--text);
  background: var(--bg);
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}
img, svg { display: block; max-width: 100%; }
a { color: inherit; text-decoration: none; }
button { font: inherit; cursor: pointer; border: none; background: none; color: inherit; }
ul, ol { list-style: none; padding: 0; }
:focus-visible { outline: 3px solid var(--teal-400); outline-offset: 2px; border-radius: 4px; }

h1, h2, h3, h4, h5 {
  font-family: var(--font-head);
  color: var(--text-strong);
  line-height: var(--lh-tight);
  letter-spacing: var(--tracking-tight);
  font-weight: var(--fw-bold);
}
.mono { font-family: var(--font-mono); font-feature-settings: "tnum" 1; }

/* ---------- LAYOUT ---------- */
.container { width: 100%; max-width: var(--container); margin-inline: auto; padding-inline: var(--gutter); }
.container-wide { max-width: var(--container-wide); }
.container-narrow { max-width: var(--container-narrow); }
.section { padding-block: clamp(56px, 8vw, 112px); }
.section-sm { padding-block: clamp(40px, 5vw, 72px); }

.eyebrow {
  display: inline-flex; align-items: center; gap: 8px;
  font-family: var(--font-head);
  font-size: var(--fs-xs); font-weight: var(--fw-bold);
  letter-spacing: var(--tracking-caps); text-transform: uppercase;
  color: var(--teal-700);
}
.eyebrow::before { content: ""; width: 18px; height: 2px; background: var(--teal-500); border-radius: 2px; }
.eyebrow.on-navy { color: var(--teal-300); }
.eyebrow.on-navy::before { background: var(--teal-400); }

.section-head { max-width: 680px; }
.section-head.center { margin-inline: auto; text-align: center; }
.section-head h2 { font-size: var(--fs-h2); margin-top: 14px; }
.section-head .lede { font-size: var(--fs-lg); color: var(--text-muted); margin-top: 16px; line-height: var(--lh-relaxed); text-wrap: pretty; }

/* ---------- BUTTONS ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 9px;
  font-family: var(--font-head); font-weight: var(--fw-semi); font-size: var(--fs-sm);
  padding: 12px 22px; border-radius: var(--r-sm); line-height: 1;
  transition: transform .14s var(--ease), background .14s var(--ease), box-shadow .14s var(--ease), color .14s var(--ease);
  white-space: nowrap; cursor: pointer;
}
.btn svg { width: 17px; height: 17px; }
.btn:active { transform: translateY(1px); }
.btn-primary { background: var(--primary); color: #fff; box-shadow: var(--sh-sm); }
.btn-primary:hover { background: var(--primary-hover); box-shadow: var(--sh-md); }
.btn-accent { background: var(--accent); color: #fff; box-shadow: var(--sh-sm); }
.btn-accent:hover { background: var(--accent-hover); box-shadow: var(--sh-md); }
.btn-ghost { background: transparent; color: var(--text-strong); box-shadow: inset 0 0 0 1px var(--border-strong); }
.btn-ghost:hover { background: var(--surface); box-shadow: inset 0 0 0 1px var(--navy-300); }
.btn-ghost-light { background: rgba(255,255,255,.08); color: #fff; box-shadow: inset 0 0 0 1px rgba(255,255,255,.22); }
.btn-ghost-light:hover { background: rgba(255,255,255,.15); }
.btn-link { padding: 0; color: var(--navy-700); font-family: var(--font-head); font-weight: var(--fw-semi); display: inline-flex; align-items: center; gap: 6px; }
.btn-link svg { width: 16px; height: 16px; transition: transform .16s var(--ease); }
.btn-link:hover svg { transform: translateX(3px); }
.btn-lg { padding: 15px 28px; font-size: var(--fs-base); border-radius: var(--r-md); }
.btn-block { width: 100%; }

/* ---------- BADGES / STATUS PILLS ---------- */
.badge {
  display: inline-flex; align-items: center; gap: 6px;
  font-family: var(--font-head); font-weight: var(--fw-semi);
  font-size: var(--fs-2xs); letter-spacing: .01em;
  padding: 4px 10px 4px 8px; border-radius: var(--r-full); line-height: 1.3;
  white-space: nowrap;
}
.badge .dot { width: 7px; height: 7px; border-radius: 50%; flex: none; }
.badge.plain { padding: 4px 10px; }

.b-paid    { background: var(--pay-paid-bg);    color: var(--pay-paid-fg); }    .b-paid .dot    { background: var(--pay-paid-dot); }
.b-due     { background: var(--pay-due-bg);     color: var(--pay-due-fg); }     .b-due .dot     { background: var(--pay-due-dot); }
.b-late    { background: var(--pay-late-bg);    color: var(--pay-late-fg); }    .b-late .dot    { background: var(--pay-late-dot); }
.b-partial { background: var(--pay-partial-bg); color: var(--pay-partial-fg); }.b-partial .dot { background: var(--pay-partial-dot); }
.b-void    { background: var(--pay-void-bg);    color: var(--pay-void-fg); }    .b-void .dot    { background: var(--pay-void-dot); }

.b-free    { background: var(--unit-free-bg);   color: var(--unit-free-fg); }
.b-rented  { background: var(--unit-rented-bg); color: var(--unit-rented-fg); }
.b-resv    { background: var(--unit-resv-bg);   color: var(--unit-resv-fg); }
.b-renov   { background: var(--unit-renov-bg);  color: var(--unit-renov-fg); }
.b-na      { background: var(--unit-na-bg);     color: var(--unit-na-fg); }

.b-active  { background: var(--lease-active-bg); color: var(--lease-active-fg); }
.b-ending  { background: var(--lease-ending-bg); color: var(--lease-ending-fg); }
.b-ended   { background: var(--lease-ended-bg);  color: var(--lease-ended-fg); }
.b-sign    { background: var(--lease-sign-bg);   color: var(--lease-sign-fg); }
.b-term    { background: var(--lease-term-bg);   color: var(--lease-term-fg); }

.b-new     { background: var(--issue-new-bg);  color: var(--issue-new-fg); }
.b-acc     { background: var(--issue-acc-bg);  color: var(--issue-acc-fg); }
.b-prog    { background: var(--issue-prog-bg); color: var(--issue-prog-fg); }
.b-wait    { background: var(--issue-wait-bg); color: var(--issue-wait-fg); }
.b-done    { background: var(--issue-done-bg); color: var(--issue-done-fg); }

/* ---------- LOGO LOCKUP ---------- */
.logo { display: inline-flex; align-items: center; gap: 11px; }
.logo .mark { width: 36px; height: 36px; border-radius: 10px; flex: none; }
.logo .wordmark {
  font-family: var(--font-head); font-weight: var(--fw-extra);
  font-size: 1.32rem; letter-spacing: -0.02em; color: var(--navy-800);
}
.logo .wordmark .dot { color: var(--teal-500); }
.logo.on-navy .wordmark { color: #fff; }
.logo.lg .mark { width: 48px; height: 48px; border-radius: 13px; }
.logo.lg .wordmark { font-size: 1.7rem; }

/* ---------- CARD ---------- */
.card {
  background: var(--surface); border: 1px solid var(--border);
  border-radius: var(--r-lg); box-shadow: var(--sh-sm);
}

/* ---------- HEADER / NAV ---------- */
.site-header {
  position: sticky; top: 0; z-index: 100;
  background: rgba(248,247,244,0.82); backdrop-filter: saturate(180%) blur(14px);
  border-bottom: 1px solid transparent; transition: border-color .25s var(--ease), box-shadow .25s var(--ease), background .25s var(--ease);
}
.site-header.scrolled { border-bottom-color: var(--border); box-shadow: var(--sh-sm); background: rgba(248,247,244,0.92); }
.nav { display: flex; align-items: center; height: var(--nav-h); gap: var(--sp-8); }
.nav-links { display: flex; align-items: center; gap: 2px; margin-left: var(--sp-4); }
.nav-links a {
  font-family: var(--font-head); font-size: var(--fs-sm); font-weight: var(--fw-medium);
  color: var(--text-muted); padding: 8px 13px; border-radius: var(--r-xs);
  transition: color .14s var(--ease), background .14s var(--ease);
}
.nav-links a:hover { color: var(--text-strong); background: rgba(31,58,95,0.05); }
.nav-actions { display: flex; align-items: center; gap: 14px; margin-left: auto; }
.nav-login { font-family: var(--font-head); font-size: var(--fs-sm); font-weight: var(--fw-semi); color: var(--text-strong); }
.nav-login:hover { color: var(--navy-700); }
.nav-toggle { display: none; width: 42px; height: 42px; border-radius: var(--r-sm); align-items: center; justify-content: center; color: var(--text-strong); }
.nav-toggle:hover { background: rgba(31,58,95,0.06); }

/* mobile menu */
.mobile-menu {
  display: block; position: fixed; inset: var(--nav-h) 0 0; z-index: 99;
  background: var(--bg); padding: 24px var(--gutter) 32px;
  transform: translateY(-12px); opacity: 0; visibility: hidden; pointer-events: none;
  transition: opacity .22s var(--ease), transform .22s var(--ease), visibility .22s;
  overflow-y: auto;
}
.mobile-menu.open { transform: none; opacity: 1; visibility: visible; pointer-events: auto; }
.mobile-menu nav { display: flex; flex-direction: column; gap: 2px; }
.mobile-menu nav a {
  font-family: var(--font-head); font-size: 1.15rem; font-weight: var(--fw-semi);
  color: var(--text-strong); padding: 15px 8px; border-bottom: 1px solid var(--border);
}
.mm-actions { display: flex; flex-direction: column; gap: 12px; margin-top: 24px; }
@media (min-width: 941px) { .mobile-menu { display: none; } }

/* ---------- FOOTER ---------- */
.site-footer { background: var(--navy-900); color: var(--text-on-navy-muted); padding-block: clamp(48px,6vw,80px) 32px; }
.footer-grid { display: grid; grid-template-columns: 1.6fr 1fr 1fr 1fr; gap: var(--sp-10); }
.footer-brand p { margin-top: 18px; max-width: 300px; line-height: var(--lh-relaxed); font-size: var(--fs-sm); }
.footer-col h4 { color: #fff; font-size: var(--fs-sm); font-family: var(--font-head); letter-spacing: var(--tracking-caps); text-transform: uppercase; font-weight: var(--fw-bold); margin-bottom: 16px; }
.footer-col ul { display: flex; flex-direction: column; gap: 11px; }
.footer-col a { font-size: var(--fs-sm); color: var(--text-on-navy-muted); transition: color .14s var(--ease); }
.footer-col a:hover { color: #fff; }
.footer-bottom { display: flex; align-items: center; justify-content: space-between; gap: 20px; margin-top: var(--sp-12); padding-top: 26px; border-top: 1px solid var(--border-navy); font-size: var(--fs-xs); flex-wrap: wrap; }
.lang-switch { display: inline-flex; border: 1px solid var(--border-navy); border-radius: var(--r-full); overflow: hidden; }
.lang-switch button { padding: 5px 13px; font-family: var(--font-head); font-size: var(--fs-xs); font-weight: var(--fw-semi); color: var(--text-on-navy-muted); }
.lang-switch button.active { background: rgba(255,255,255,0.12); color: #fff; }

/* ---------- ICON CHIP ---------- */
.icon-chip {
  width: 48px; height: 48px; border-radius: var(--r-md); flex: none;
  display: flex; align-items: center; justify-content: center;
  background: var(--navy-100); color: var(--navy-700);
}
.icon-chip svg { width: 24px; height: 24px; }
.icon-chip.teal { background: var(--teal-100); color: var(--teal-700); }
.icon-chip.amber { background: var(--amber-100); color: var(--amber-700); }
.icon-chip.blue { background: var(--blue-100); color: var(--blue-700); }
.icon-chip.red { background: var(--red-100); color: var(--red-700); }

/* ---------- REVEAL ON SCROLL ---------- */
.reveal { opacity: 0; transform: translateY(18px); transition: opacity .6s var(--ease-out), transform .6s var(--ease-out); }
.reveal.in { opacity: 1; transform: none; }
@media (prefers-reduced-motion: reduce) { .reveal { opacity: 1; transform: none; transition: none; } html { scroll-behavior: auto; } }

/* ---------- RESPONSIVE NAV ---------- */
@media (max-width: 940px) {
  .nav-links, .nav-actions .btn, .nav-actions .nav-login { display: none; }
  .nav-toggle { display: flex; }
  .nav-actions { margin-left: auto; }
  .footer-grid { grid-template-columns: 1fr 1fr; gap: var(--sp-8); }
  .footer-brand { grid-column: 1 / -1; }
}
@media (max-width: 560px) {
  .footer-grid { grid-template-columns: 1fr 1fr; }
}
