/* ============================================================
   TAVICONSTROI · Remodelações Tavira — shared design system
   Serif display (Spectral) + grotesk body (Archivo)
   Warm graphite / paper base, single dynamic accent
   ============================================================ */

@import url('https://fonts.googleapis.com/css2?family=Inter:ital,wght@0,300;0,400;0,500;0,600;0,700;0,800;1,400&display=swap');

:root {
  /* palette */
  --paper: #F5F5F7;
  --paper-2: #FAFAFC;
  --surface: #FFFFFF;
  --ink: #1D1D1F;
  --ink-2: #424245;
  --ink-3: #86868B;
  --line: #E8E8ED;
  --line-2: #D2D2D7;

  /* accent — overridden by Tweaks (single source; shades derived) */
  --accent: #DEB668;        /* gold, per client swap */
  --accent-deep: color-mix(in srgb, var(--accent) 76%, #1a0e07);
  --accent-tint: color-mix(in srgb, var(--accent) 13%, #fff);
  --on-accent: #FFFFFF;

  --wa: #25A05A;            /* whatsapp green, stays constant */

  /* type — Apple-style: one tight sans family throughout */
  --serif: 'Inter', system-ui, -apple-system, sans-serif;
  --sans: 'Inter', system-ui, -apple-system, sans-serif;
  --expand: 'Inter', system-ui, sans-serif;

  /* metrics */
  --maxw: 1240px;
  --gutter: clamp(20px, 5vw, 64px);
  --radius: 12px;
  --radius-lg: 18px;

  --shadow-sm: 0 1px 2px rgba(0,0,0,.04);
  --shadow-md: 0 3px 5px 0 rgba(0,0,0,.10);
  --shadow-lg: 3px 5px 30px rgba(0,0,0,.22);

  --ease: cubic-bezier(.22,.61,.36,1);
}

* { box-sizing: border-box; }

html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; max-width: 100%; overflow-x: hidden; }

body {
  margin: 0;
  max-width: 100vw;
  overflow-x: hidden;
  font-family: var(--sans);
  color: var(--ink);
  background: var(--paper);
  font-size: 17px;
  line-height: 1.6;
  font-feature-settings: "ss01", "cv01";
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

img { max-width: 100%; display: block; }
a { color: inherit; text-decoration: none; }
button { font-family: inherit; }

::selection { background: var(--accent); color: var(--on-accent); }

/* ---------- layout ---------- */
.wrap { width: 100%; max-width: var(--maxw); margin-inline: auto; padding-inline: var(--gutter); }
.section { padding-block: clamp(20px, 2.4vw, 32px); }
.section--tight { padding-block: clamp(14px, 1.8vw, 22px); }

.eyebrow {
  font-family: var(--sans);
  font-weight: 700;
  font-size: 12.5px;
  letter-spacing: .22em;
  text-transform: uppercase;
  color: var(--accent);
  display: inline-flex;
  align-items: center;
  gap: 12px;
  margin: 0 0 22px;
}
.eyebrow::before {
  content: "";
  width: 28px; height: 2px;
  background: var(--accent);
  display: inline-block;
}
.eyebrow--center { justify-content: center; }
.eyebrow--muted { color: var(--ink-3); }
.eyebrow--muted::before { background: var(--line-2); }

h1, h2, h3, h4 { font-family: var(--serif); font-weight: 600; line-height: 1.07; letter-spacing: -.02em; margin: 0; color: var(--ink); text-wrap: balance; }

.display {
  font-size: clamp(38px, 5.6vw, 72px);
  font-weight: 600;
  line-height: 1.05;
  letter-spacing: -.03em;
}
.h-section { font-size: clamp(28px, 3.6vw, 46px); line-height: 1.08; font-weight: 600; letter-spacing: -.02em; }
.h-card { font-size: clamp(19px, 1.8vw, 22px); line-height: 1.2; font-weight: 600; letter-spacing: -.01em; }

.lead { font-size: clamp(17px, 1.4vw, 19px); line-height: 1.5; color: var(--ink-2); text-wrap: pretty; font-weight: 400; }
.muted { color: var(--ink-2); }

.serif-italic { font-family: var(--serif); font-style: italic; font-weight: 500; }

/* ---------- buttons ---------- */
.btn {
  --bg: var(--ink); --fg: #fff; --bd: var(--ink);
  display: inline-flex; align-items: center; justify-content: center; gap: 10px;
  padding: 12px 24px;
  min-height: 44px;
  background: var(--bg); color: var(--fg);
  border: 1px solid var(--bd);
  border-radius: 980px;
  font-weight: 400; font-size: 15px; letter-spacing: 0;
  cursor: pointer;
  transition: transform .15s var(--ease), background .2s var(--ease), color .2s var(--ease), border-color .2s var(--ease);
  white-space: nowrap;
}
.btn svg { width: 18px; height: 18px; flex: none; }
.btn:hover { opacity: .88; }
.btn:active { transform: scale(.96); }
.btn--accent { --bg: var(--accent); --fg: var(--on-accent); --bd: var(--accent); }
.btn--accent:hover { --bg: var(--accent-deep); --bd: var(--accent-deep); }
.btn--ghost { --bg: transparent; --fg: var(--ink); --bd: var(--line-2); }
.btn--ghost:hover { --bd: var(--ink); background: transparent; }
.btn--light { --bg: #fff; --fg: var(--ink); --bd: #fff; }
.btn--wa { --bg: var(--wa); --fg: #fff; --bd: var(--wa); }
.btn--wa:hover { --bg: #1c8748; --bd: #1c8748; }
.btn--lg { padding: 14px 28px; font-size: 16px; }
.hero__cta .btn--lg { padding: 13px 20px; font-size: 15px; gap: 8px; }
@media (max-width: 480px) { .hero__cta .btn--lg { padding: 12px 16px; font-size: 14px; } }
.btn--block { width: 100%; }

.link-arrow {
  display: inline-flex; align-items: center; gap: 8px;
  font-weight: 600; font-size: 15px; color: var(--ink);
  border-bottom: 1.5px solid var(--accent);
  padding-bottom: 2px;
  transition: gap .25s var(--ease), color .25s var(--ease);
}
.link-arrow:hover { gap: 13px; color: var(--accent); }
.link-arrow svg { width: 16px; height: 16px; }

/* ---------- chips / tags ---------- */
.tag {
  display: inline-flex; align-items: center; gap: 7px;
  font-size: 12px; font-weight: 700; letter-spacing: .1em; text-transform: uppercase;
  color: var(--ink-2);
  background: var(--surface);
  border: 1px solid var(--line);
  padding: 7px 13px; border-radius: 100px;
}
.tag .dot { width: 6px; height: 6px; border-radius: 50%; background: var(--accent); }

/* ---------- trust ticks ---------- */
.tick { display: flex; align-items: center; gap: 11px; font-weight: 500; color: var(--ink); font-size: 15.5px; }
.tick svg { width: 19px; height: 19px; flex: none; color: var(--accent); }

/* ---------- placeholder imagery ---------- */
.ph {
  position: relative;
  background-color: var(--paper-2);
  background-image:
    repeating-linear-gradient(135deg, rgba(22,20,15,.045) 0 2px, transparent 2px 12px);
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  overflow: hidden;
  display: flex; align-items: flex-end;
  color: var(--ink-3);
}
.ph--ink {
  background-color: #20201c;
  background-image: repeating-linear-gradient(135deg, rgba(255,255,255,.05) 0 2px, transparent 2px 12px);
  border-color: #34332d;
  color: rgba(255,255,255,.55);
}
.ph__label {
  font-family: 'Spectral', monospace;
  font-size: 12px; letter-spacing: .04em;
  padding: 12px 14px;
  display: inline-flex; align-items: center; gap: 8px;
  font-family: ui-monospace, 'SF Mono', Menlo, monospace;
  font-weight: 500;
}
.ph__label::before { content: "▢"; opacity: .6; }
.ph__center {
  position: absolute; inset: 0; display: flex; align-items: center; justify-content: center;
  text-align: center; padding: 16px;
}
.ph img { z-index: 0; }

/* ---------- cards ---------- */
.card {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  transition: border-color .3s var(--ease);
}
.card--hover { transition: transform .3s var(--ease), box-shadow .3s var(--ease), border-color .3s var(--ease); }
.card--hover:hover { transform: translateY(-4px); box-shadow: var(--shadow-md); border-color: var(--line-2); }

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

/* ---------- header ---------- */
.site-header {
  position: sticky; top: 0; z-index: 80;
  background: color-mix(in srgb, var(--paper) 86%, transparent);
  backdrop-filter: blur(14px) saturate(1.2);
  border-bottom: 1px solid transparent;
  transition: border-color .3s var(--ease), background .3s var(--ease);
}
.site-header[data-stuck="true"] { border-bottom-color: var(--line); background: color-mix(in srgb, var(--paper) 94%, transparent); }
.nav { display: flex; align-items: center; justify-content: space-between; height: 78px; gap: 16px; }
.brand { display: flex; align-items: center; gap: 12px; flex: none; }
.brand__mark {
  width: 38px; height: 38px; border-radius: 5px;
  background: var(--ink); color: #fff;
  display: grid; place-items: center;
  font-family: var(--expand); font-weight: 800; font-size: 19px;
  letter-spacing: -.04em;
}
.brand__name { font-family: var(--expand); font-weight: 700; font-size: 18px; letter-spacing: .02em; line-height: 1; }
.brand__name small { display: block; font-family: var(--sans); font-weight: 600; font-size: 10px; letter-spacing: .26em; color: var(--ink-3); margin-top: 4px; text-transform: uppercase; }
.nav__links { display: flex; align-items: center; gap: 10px; min-width: 0; }
.nav__links a { font-weight: 500; font-size: 12.5px; color: var(--ink-2); transition: color .2s; position: relative; padding-block: 6px; white-space: nowrap; }
.nav__links a:hover { color: var(--ink); }
.nav__right { display: flex; align-items: center; gap: 8px; flex: none; }
.nav__right .btn--accent { white-space: nowrap; padding: 9px 12px; font-size: 12.5px; }

/* lang switcher */
.lang { display: inline-flex; border: 1px solid var(--line-2); border-radius: 100px; overflow: hidden; background: var(--surface); }
.lang button {
  border: 0; background: transparent; cursor: pointer;
  font-weight: 700; font-size: 12px; letter-spacing: .06em;
  padding: 8px 11px; color: var(--ink-3);
  transition: color .2s, background .2s;
}
.lang button[data-on="true"] { background: var(--ink); color: #fff; }
.lang button:not([data-on="true"]):hover { color: var(--ink); }

.burger { display: none; background: transparent; border: 1px solid var(--line-2); border-radius: 6px; width: 44px; height: 44px; cursor: pointer; align-items: center; justify-content: center; }
.burger svg { width: 20px; height: 20px; }

/* ---------- footer ---------- */
.site-footer { background: var(--ink); color: #C9C4B8; padding-block: clamp(56px,7vw,88px) 36px; }
.site-footer h4 { color: #fff; font-family: var(--sans); font-size: 13px; letter-spacing: .16em; text-transform: uppercase; font-weight: 700; margin: 0 0 18px; }
.site-footer a { color: #C9C4B8; transition: color .2s; }
.site-footer a:hover { color: #fff; }
.footer-grid { display: grid; grid-template-columns: 1.6fr 1fr 1fr 1.2fr; gap: 48px; }
.footer-bottom { display: flex; justify-content: space-between; gap: 20px; flex-wrap: wrap; margin-top: 56px; padding-top: 26px; border-top: 1px solid rgba(255,255,255,.12); font-size: 13.5px; color: #8E897C; }

/* ---------- reveal on scroll ---------- */
.reveal { opacity: 0; transform: translateY(22px); transition: opacity .8s var(--ease), transform .8s var(--ease); }
.reveal.in { opacity: 1; transform: none; }
@media (prefers-reduced-motion: reduce) { .reveal { opacity: 1; transform: none; transition: none; } }

/* ---------- responsive ---------- */
@media (max-width: 1068px) {
  .svc-grid { grid-template-columns: 1fr 1fr !important; }
}
@media (max-width: 940px) {
  .nav__links { display: none; }
  .burger { display: inline-flex; }
  .nav__right .btn--accent { display: none; }
}
@media (max-width: 833px) {
  .footer-grid { grid-template-columns: 1fr 1fr; gap: 36px; }
  .hero__grid, .about__grid, .proj__featured, .reviews__grid, .faq__grid, .contact__grid, .calc__grid, .pf__modal-grid { grid-template-columns: 1fr !important; }
  .faq__side, .calc__estimate { position: static !important; top: auto !important; }
  .hero__rating, .hero__cert { position: static !important; left: auto !important; right: auto !important; top: auto !important; bottom: auto !important; max-width: 100% !important; }
  .hero__rating { margin-top: 16px; }
  .hero__cert { display: inline-flex; margin-top: 12px; }
  .reviews__cards { grid-template-columns: 1fr !important; }
  .contact__section { height: auto !important; min-height: 0 !important; padding-bottom: 40px; }
  .cta__band { height: auto !important; min-height: 0 !important; padding-block: 28px !important; top: 0 !important; }
}
@media (max-width: 640px) {
  .svc-grid { grid-template-columns: 1fr !important; }
  body { font-size: 16px; }
  .footer-grid { grid-template-columns: 1fr; }
  .nav__right { gap: 8px !important; }
  .lang button { padding: 7px 8px; font-size: 11px; }
  .hero__ticks, .about__certs, .contact__items { grid-template-columns: 1fr !important; }
  .about__photos { grid-template-columns: 1fr 1fr !important; }
}

/* whatsapp floating */
.wa-fab {
  position: fixed; right: 20px; bottom: 20px; z-index: 70;
  width: 44px; height: 44px; border-radius: 50%;
  background: var(--wa); color: #fff;
  display: grid; place-items: center;
  box-shadow: 0 10px 28px rgba(37,160,90,.45);
  border: 0; cursor: pointer;
  transition: transform .3s var(--ease);
}
.wa-fab:hover { transform: scale(1.07); }
.wa-fab svg { width: 24px; height: 24px; }
