/* ============================================================
   Royal Concrete — site chrome: header, footer, nav, overlays.
   ============================================================ */

/* ---------- HEADER ---------- */
.site-header {
  position: sticky; top: 0; z-index: 100;
  background: rgba(255,255,255,.92);
  backdrop-filter: saturate(180%) blur(10px);
  border-bottom: 1px solid transparent;
  transition: border-color .2s, box-shadow .2s;
}
.site-header.is-scrolled { border-bottom-color: var(--bg-line); box-shadow: var(--shadow-sm); }
.site-header__inner {
  display: flex; align-items: center; gap: 1.5rem;
  height: var(--header-h);
}
.site-header__logo { display: flex; align-items: center; flex-shrink: 0; }
.site-header__logo img { height: 68px; width: auto; display: block; }
@media (max-width: 900px) { .site-header__logo img { height: 54px; } }

/* Header contact block (office + WhatsApp number) */
.site-header__contact { margin-left: auto; }
.site-header__num { display: block; text-align: right; line-height: 1.25; text-decoration: none; }
.site-header__num span { display: block; font-size: .68rem; letter-spacing: .06em; text-transform: uppercase; color: var(--muted); }
.site-header__num strong { display: block; font-family: var(--font-display); font-size: 1rem; color: var(--navy); }
.site-header__num:hover strong { color: var(--cyan); }
@media (max-width: 1100px) { .site-header__contact { display: none; } }

.site-nav { margin-left: auto; }
.site-nav__list { display: flex; align-items: center; gap: .35rem; list-style: none; }
.site-nav__list > li > a {
  display: inline-flex; align-items: center; gap: .25rem;
  padding: .55rem .8rem; border-radius: var(--radius-sm);
  font-family: var(--font-display); font-weight: 600; font-size: .98rem;
  color: var(--navy); text-decoration: none; transition: .15s;
}
.site-nav__list > li > a:hover { background: var(--bg-soft); color: var(--cyan-700); }
.site-nav__list > li > a[aria-current="page"] { color: var(--cyan-700); }
.caret { font-size: .7em; opacity: .7; }

/* Dropdown */
.has-sub { position: relative; }
.sub-menu {
  position: absolute; top: calc(100% + 6px); left: 0; min-width: 250px;
  background: #fff; border: 1px solid var(--bg-line); border-radius: var(--radius);
  box-shadow: var(--shadow-md); padding: .4rem; list-style: none;
  opacity: 0; visibility: hidden; transform: translateY(6px); transition: .16s;
}
.has-sub:hover .sub-menu, .has-sub.open .sub-menu,
.has-sub:focus-within .sub-menu { opacity: 1; visibility: visible; transform: translateY(0); }
.sub-menu a {
  display: block; padding: .6rem .8rem; border-radius: var(--radius-sm);
  color: var(--ink); font-weight: 500; font-size: .92rem; text-decoration: none;
}
.sub-menu a:hover { background: var(--bg-soft); color: var(--cyan-700); }

.site-header__cta { flex-shrink: 0; }

/* Mobile toggle */
.site-header__toggle {
  display: none; flex-direction: column; gap: 5px; background: none; border: 0;
  cursor: pointer; padding: 8px; margin-left: auto;
}
.site-header__toggle span {
  width: 26px; height: 2px; background: var(--navy); border-radius: 2px; transition: .2s;
}
.site-header__toggle.is-open span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.site-header__toggle.is-open span:nth-child(2) { opacity: 0; }
.site-header__toggle.is-open span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

/* Mobile drawer */
.mobile-nav {
  border-top: 1px solid var(--bg-line); background: #fff;
  padding: 1rem var(--gutter) 1.5rem;
}
.mobile-nav ul { list-style: none; }
.mobile-nav li a {
  display: block; padding: .7rem .4rem; color: var(--navy);
  font-family: var(--font-display); font-weight: 600; text-decoration: none;
  border-bottom: 1px solid var(--bg-soft);
}
.mobile-nav .m-group {
  font-family: var(--font-mono); font-size: .72rem; letter-spacing: .14em;
  text-transform: uppercase; color: var(--muted); padding: .9rem .4rem .3rem;
}
body.nav-open { overflow: hidden; }

@media (max-width: 1024px) {
  .site-nav, .site-header__cta { display: none; }
  .site-header__toggle { display: flex; }
}
@media (min-width: 1025px) { .mobile-nav { display: none !important; } }

/* ---------- FOOTER ---------- */
.site-footer { background: var(--navy); color: #AEBccB; margin-top: 0; }
.site-footer__grid {
  display: grid; grid-template-columns: 1.4fr 1fr 1fr 1.3fr; gap: 2.5rem;
  padding: clamp(48px, 6vw, 80px) var(--gutter);
}
.site-footer__logo { height: 64px; width: auto; margin-bottom: 1rem; }
.site-footer__tag { color: #8597A8; font-size: .95rem; max-width: 32ch; }
.site-footer__social { display: flex; gap: .6rem; margin-top: 1rem; }
.site-footer__social a {
  display: inline-flex; align-items: center; justify-content: center;
  width: 38px; height: 38px; border-radius: 50%;
  background: rgba(255,255,255,.08); color: #AEBccB;
  transition: background .15s, color .15s, transform .15s;
}
.site-footer__social a:hover { background: var(--cyan); color: #fff; transform: translateY(-2px); }
.site-footer__col h4, .site-footer__col .h4 { color: #fff; font-size: 1rem; margin-bottom: 1rem; letter-spacing: .02em; }
.site-footer__col ul { list-style: none; display: grid; gap: .55rem; }
.site-footer__col a { color: #AEBccB; font-size: .92rem; text-decoration: none; transition: color .15s; }
.site-footer__col a:hover { color: var(--cyan); }
.site-footer__contact a { display: inline-block; }

.site-footer__bar { border-top: 1px solid rgba(255,255,255,.08); }
.site-footer__bar-inner {
  display: flex; justify-content: space-between; align-items: center; gap: 1rem;
  padding: 1.2rem var(--gutter); font-size: .85rem; color: #7A8B9C; flex-wrap: wrap;
}
.site-footer__credit a { color: var(--cyan); text-decoration: none; font-weight: 600; }
.site-footer__credit a:hover { text-decoration: underline; }
.site-footer__admin {
  display: inline-block; margin-left: .6rem; color: #4F6072; font-size: 1.1rem;
  text-decoration: none; transition: color .15s; vertical-align: middle;
}
.site-footer__admin:hover { color: var(--cyan); }

@media (max-width: 900px) {
  .site-footer__grid { grid-template-columns: 1fr 1fr; gap: 2rem; }
}
@media (max-width: 560px) {
  .site-footer__grid { grid-template-columns: 1fr; }
}

/* ---------- FLOATING WHATSAPP ---------- */
.wa-float {
  position: fixed; right: 20px; bottom: 20px; z-index: 90;
  width: 56px; height: 56px; border-radius: 50%;
  background: #25D366; color: #fff;
  display: flex; align-items: center; justify-content: center;
  box-shadow: 0 6px 20px rgba(37,211,102,.45); transition: transform .15s, background .15s;
}
.wa-float:hover { transform: scale(1.08); background: #1da851; text-decoration: none; }

/* ---------- COOKIE BANNER ---------- */
.cookie-banner {
  position: fixed; left: 16px; right: 16px; bottom: 16px; z-index: 95;
  max-width: 760px; margin: 0 auto;
  background: #fff; border: 1px solid var(--bg-line); border-radius: var(--radius);
  box-shadow: var(--shadow-md); padding: 1rem 1.25rem;
  display: flex; align-items: center; gap: 1rem; flex-wrap: wrap;
}
.cookie-banner[hidden] { display: none !important; }
.cookie-banner p { margin: 0; font-size: .9rem; color: var(--ink); flex: 1 1 280px; }
.cookie-banner__actions { display: flex; gap: .5rem; }
.btn--sm { padding: .5rem 1rem; font-size: .9rem; }

/* ---------- SCROLL REVEAL ----------
   Progressive enhancement: content is visible by default. Only when JS adds
   .js-reveal to <html> do we hide-then-reveal, so a JS failure never hides content. */
.js-reveal [data-reveal] { opacity: 0; transform: translateY(18px); transition: opacity .6s ease, transform .6s ease; }
.js-reveal [data-reveal].in { opacity: 1; transform: none; }
