/* Ribeira Materiais: a builders' merchant in Lisbon (demo). Terracotta brick,
   charcoal and sand; Archivo, condensed for headings. */
:root {
  --brand: #b4532a;
  --brand-dark: #8f3f1e;
  --ink: #1f2421;
  --ink-2: #3b413d;
  --muted: #6b716c;
  --sand: #f6efe7;
  --paper: #fbf8f4;
  --line: #e6ded3;
  --font: "Archivo", "Helvetica Neue", Arial, sans-serif;
}
* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body { margin: 0; background: var(--paper); color: var(--ink); font: 16px/1.6 var(--font); -webkit-font-smoothing: antialiased; }
img { max-width: 100%; display: block; }
a { color: inherit; }
h1, h2, h3 { font-stretch: 75%; font-weight: 800; line-height: 1.02; letter-spacing: -0.01em; margin: 0; text-wrap: balance; }
h2 { font-size: clamp(34px, 5vw, 56px); }
h3 { font-size: 22px; font-stretch: 87%; }
p { margin: 0; }
.wrap { width: 100%; max-width: 1200px; margin: 0 auto; padding-inline: clamp(16px, 4vw, 32px); }
:focus-visible { outline: 3px solid var(--brand); outline-offset: 3px; }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } * { animation: none !important; transition: none !important; } }

.demo-bar { display: flex; flex-wrap: wrap; gap: 4px 12px; justify-content: center; padding: 8px 16px; background: var(--ink); color: #d9dcd8; font-size: 13px; text-align: center; }
.demo-bar a { color: #f0b48f; font-weight: 600; }

.top { position: sticky; top: 0; z-index: 20; background: rgba(251, 248, 244, 0.92); backdrop-filter: blur(10px); border-bottom: 1px solid var(--line); }
.top-in { display: flex; align-items: center; gap: 24px; min-height: 68px; }
.brand { display: flex; align-items: center; gap: 10px; text-decoration: none; font-size: 20px; font-stretch: 87%; }
.brand b { font-weight: 900; }
.nav { display: flex; gap: 22px; margin-left: 12px; }
.nav a { text-decoration: none; font-weight: 600; color: var(--ink-2); }
.nav a:hover { color: var(--brand); }
.top-act { margin-left: auto; display: flex; align-items: center; gap: 12px; }
.lang { display: flex; border: 1px solid var(--line); border-radius: 999px; overflow: hidden; }
.lang button { border: 0; background: transparent; padding: 6px 10px; font: 700 12px var(--font); color: var(--muted); cursor: pointer; }
.lang button[aria-pressed="true"] { background: var(--ink); color: #fff; }

.btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; padding: 11px 18px; border-radius: 8px; font: 700 15px var(--font); text-decoration: none; border: 1px solid transparent; cursor: pointer; transition: background 0.15s, transform 0.15s; }
.btn-lg { padding: 15px 24px; font-size: 16px; }
.btn-brand { background: var(--brand); color: #fff; }
.btn-brand:hover { background: var(--brand-dark); }
.btn-light { background: #fff; color: var(--ink); }
.btn-light:hover { background: var(--sand); }
.btn-outline { background: transparent; color: var(--ink); border-color: #cfc5b8; }
.btn-outline:hover { border-color: var(--brand); color: var(--brand); }
.btn:disabled { opacity: 0.6; cursor: default; }

/* Hero: the photo full bleed, the words on a dark wash */
.hero { position: relative; min-height: min(86vh, 760px); display: flex; align-items: flex-end; color: #fff; overflow: hidden; }
.hero-img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.hero::after { content: ""; position: absolute; inset: 0; background: linear-gradient(90deg, rgba(20, 24, 22, 0.92) 0%, rgba(20, 24, 22, 0.7) 45%, rgba(20, 24, 22, 0.25) 100%); }
.hero-in { position: relative; z-index: 1; display: grid; grid-template-columns: minmax(0, 1.4fr) minmax(0, 1fr); gap: 40px; align-items: end; padding-block: 120px 64px; }
.kicker { font-weight: 700; color: #f0b48f; letter-spacing: 0.02em; }
.hero h1 { margin-top: 14px; font-size: clamp(52px, 9vw, 112px); font-weight: 900; }
.lead { margin-top: 20px; max-width: 34em; font-size: clamp(17px, 1.6vw, 20px); color: #e7e9e6; }
.cta-row { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 30px; }

.live-card { background: #fff; color: var(--ink); border-radius: 16px; padding: 20px; box-shadow: 0 30px 60px -20px rgba(0, 0, 0, 0.5); }
.live-top { display: flex; align-items: center; gap: 8px; font-size: 13px; font-weight: 700; color: var(--brand); }
.dot { width: 9px; height: 9px; border-radius: 50%; background: #16a34a; box-shadow: 0 0 0 0 rgba(22, 163, 74, 0.5); animation: pulse 1.8s infinite; }
@keyframes pulse { 70% { box-shadow: 0 0 0 10px rgba(22, 163, 74, 0); } 100% { box-shadow: 0 0 0 0 rgba(22, 163, 74, 0); } }
.live-ref { margin-top: 10px; font-size: 13px; color: var(--muted); }
.live-title { margin-top: 4px; font-size: 19px; font-weight: 800; font-stretch: 87%; line-height: 1.2; }
.live-steps { display: grid; grid-template-columns: repeat(3, 1fr); gap: 6px; margin-top: 16px; }
.live-steps span { padding-top: 8px; border-top: 4px solid var(--line); font-size: 12.5px; font-weight: 700; color: var(--muted); }
.live-steps .on { border-color: var(--brand); color: var(--ink); }
.live-link { display: inline-block; margin-top: 16px; font-weight: 700; color: var(--brand); }

.facts { background: var(--ink); color: #fff; }
.facts-in { display: grid; grid-template-columns: repeat(4, 1fr); }
.facts-in div { padding: 22px 18px; border-left: 1px solid #343a36; display: grid; gap: 2px; }
.facts-in div:first-child { border-left: 0; padding-left: 0; }
.facts-in b { font-size: 18px; font-stretch: 87%; }
.facts-in span { font-size: 14px; color: #b9bdb9; }

.section { padding-block: clamp(64px, 9vw, 112px); }
.head { max-width: 680px; display: grid; gap: 12px; margin-bottom: 40px; }
.head p { color: var(--muted); font-size: 18px; }

.cats { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 18px; }
.cat { background: #fff; border: 1px solid var(--line); border-radius: 14px; overflow: hidden; display: flex; flex-direction: column; }
.cat img { aspect-ratio: 4 / 3; object-fit: cover; width: 100%; }
.cat > div { padding: 16px 18px 18px; display: grid; gap: 6px; }
.cat p { color: var(--muted); font-size: 15px; }
.price { font-weight: 800; color: var(--brand); }

.dark { background: var(--ink); color: #fff; }
.dark .head p { color: #b9bdb9; }
.steps { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 18px; counter-reset: s; }
.steps li { counter-increment: s; display: grid; gap: 8px; align-content: start; }
.steps img { aspect-ratio: 1 / 1; object-fit: cover; width: 100%; border-radius: 12px; }
.steps b { font-size: 22px; font-stretch: 87%; margin-top: 6px; }
.steps b::before { content: counter(s) " "; color: #f0b48f; }
.steps p { color: #c7cbc7; font-size: 15px; }

.track { display: grid; grid-template-columns: minmax(0, 1.2fr) minmax(0, 0.8fr); gap: 48px; align-items: center; }
.track h2 + p { margin-top: 14px; font-size: 18px; color: var(--ink-2); max-width: 32em; }
.track .note { margin: 14px 0 24px; color: var(--muted); }
.phone { justify-self: center; width: 280px; padding: 10px; border-radius: 40px; background: #121514; box-shadow: 0 40px 70px -30px rgba(0, 0, 0, 0.45); }
.phone-in { border-radius: 30px; overflow: hidden; background: #f4f1ec; height: 540px; display: flex; flex-direction: column; }
.ph-head { display: flex; align-items: center; gap: 8px; padding: 34px 14px 12px; background: #fff; font-size: 14px; }
.ph-head small { margin-left: auto; color: var(--muted); }
.ph-logo { width: 26px; height: 26px; border-radius: 6px; background: var(--brand); color: #fff; display: grid; place-items: center; font-weight: 900; }
.ph-card { margin: 12px; padding: 16px; border-radius: 16px; background: #fff; display: grid; gap: 2px; }
.ph-card small { color: var(--muted); margin-top: 6px; }
.ph-time { font-size: 44px; font-weight: 900; font-stretch: 75%; line-height: 1; }
.ph-steps { display: grid; grid-template-columns: repeat(3, 1fr); gap: 4px; margin-top: 12px; }
.ph-steps i { height: 4px; border-radius: 2px; background: var(--line); }
.ph-steps .on { background: var(--brand); }
.ph-map { position: relative; flex: 1; margin: 0 12px 12px; border-radius: 16px; overflow: hidden;
  background: linear-gradient(0deg, transparent 47%, #e3dbd0 47%, #e3dbd0 53%, transparent 53%), linear-gradient(90deg, transparent 30%, #e3dbd0 30%, #e3dbd0 35%, transparent 35%), linear-gradient(90deg, transparent 72%, #e3dbd0 72%, #e3dbd0 76%, transparent 76%), #ece6dc; }
.ph-route { position: absolute; left: 32%; top: 18%; width: 42%; height: 32%; border-left: 4px dashed var(--brand); border-bottom: 4px dashed var(--brand); }
.ph-van { position: absolute; left: calc(32% - 9px); top: 38%; width: 22px; height: 22px; border-radius: 50%; background: var(--ink); border: 4px solid #fff; box-shadow: 0 2px 6px rgba(0, 0, 0, 0.3); animation: drive 6s ease-in-out infinite alternate; }
.ph-pin { position: absolute; left: calc(74% - 8px); top: calc(50% - 8px); width: 18px; height: 18px; border-radius: 50% 50% 50% 0; transform: rotate(-45deg); background: var(--brand); }
@keyframes drive { to { top: calc(50% - 11px); left: calc(52% - 9px); } }

.sand { background: var(--sand); }
.order { display: grid; grid-template-columns: minmax(0, 0.9fr) minmax(0, 1.1fr); gap: 48px; align-items: start; }
.order h2 + p { margin-top: 14px; font-size: 18px; color: var(--ink-2); }
.ticks { list-style: none; padding: 0; margin: 24px 0 0; display: grid; gap: 10px; }
.ticks li { padding-left: 28px; position: relative; }
.ticks li::before { content: ""; position: absolute; left: 0; top: 6px; width: 14px; height: 8px; border-left: 3px solid var(--brand); border-bottom: 3px solid var(--brand); transform: rotate(-45deg); }
.form { background: #fff; border-radius: 16px; padding: clamp(20px, 3vw, 32px); display: grid; gap: 14px; border: 1px solid var(--line); }
.row2 { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
.form label { display: grid; gap: 6px; font-weight: 700; font-size: 14px; }
.form input, .form textarea { width: 100%; font: 400 16px var(--font); padding: 12px 14px; border: 1px solid #d9d0c4; border-radius: 8px; background: #fff; color: var(--ink); }
.form input:focus, .form textarea:focus { outline: 2px solid var(--brand); border-color: var(--brand); }
.hp { position: absolute; left: -9999px; }
.status { min-height: 1.4em; font-weight: 600; }
.status[data-kind="error"] { color: #b42318; }
.status[data-kind="ok"] { color: #15803d; }

.contact { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 48px; align-items: center; }
.contact h2 { margin-bottom: 18px; }
.contact p { font-size: 18px; color: var(--ink-2); margin-top: 6px; }
.contact img { border-radius: 16px; aspect-ratio: 4 / 3; object-fit: cover; width: 100%; }

.foot { border-top: 1px solid var(--line); padding-block: 24px 36px; color: var(--muted); font-size: 14px; }
.foot-in { display: flex; flex-wrap: wrap; gap: 8px 24px; align-items: center; }
.powered { margin-left: auto; text-decoration: none; display: inline-flex; gap: 6px; align-items: center; padding: 8px 12px; border: 1px solid var(--line); border-radius: 999px; }
.powered b { color: #b28228; }

@media (max-width: 960px) {
  .nav { display: none; }
  .hero-in, .track, .order, .contact { grid-template-columns: minmax(0, 1fr); }
  .hero-in { padding-block: 80px 40px; }
  .cats, .steps { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .facts-in { grid-template-columns: repeat(2, 1fr); }
  .facts-in div:nth-child(3) { border-left: 0; padding-left: 0; }
}
@media (max-width: 560px) {
  .top-act .btn { display: none; }
  .cats, .steps, .row2 { grid-template-columns: minmax(0, 1fr); }
  .facts-in { grid-template-columns: 1fr; }
  .facts-in div { border-left: 0; padding-left: 0; border-top: 1px solid #343a36; }
  .powered { margin-left: 0; }
}
