/* =========================================================
   ConsTrust — styles
   Colors and fonts are defined once here (the :root block).
   ========================================================= */

:root {
  /* Brand colors, taken from the ConsTrust logo */
  --blue:      #1B75BC;   /* "Cons" — buttons, links, bars */
  --blue-deep: #0E3B61;   /* darker blue for dark sections */
  --purple:    #91278F;   /* "Trust" — accent: signboard, "under construction" */
  --grey:      #6D6F71;   /* tagline grey — secondary text */

  --paper:  #F8F9FB;   /* page background */
  --stone:  #E9EDF2;   /* light panels */
  --ink:    #1B2230;   /* text */
  --mute:   var(--grey);
  --line:   rgba(27, 34, 48, .14);
  --wa:     #25D366;

  --font: "Archivo", system-ui, -apple-system, "Segoe UI", sans-serif;
  --wrap: 1240px;
  --gut: clamp(20px, 4vw, 48px);
  --sec: clamp(72px, 10vw, 140px);
}

*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; scroll-padding-top: 80px; }
body {
  margin: 0;
  font-family: var(--font);
  font-size: 17px;
  line-height: 1.6;
  color: var(--ink);
  background: var(--paper);
  -webkit-font-smoothing: antialiased;
}
img { display: block; max-width: 100%; }
a { color: inherit; }
h1, h2, h3, p, ul, ol, dl, dd, figure { margin: 0; }
ul, ol { padding: 0; list-style: none; }

:focus-visible { outline: 3px solid var(--purple); outline-offset: 3px; }

.wrap { width: 100%; max-width: var(--wrap); margin-inline: auto; padding-inline: var(--gut); }
.sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); }
.skip { position: absolute; left: -999px; top: 8px; background: var(--ink); color: var(--paper); padding: 8px 14px; z-index: 100; }
.skip:focus { left: 8px; }
.muted { color: var(--mute); }

/* ---------- Type ---------- */
.h2 {
  font-size: clamp(1.9rem, 3.6vw, 2.9rem);
  font-stretch: 118%;
  font-weight: 650;
  line-height: 1.05;
  letter-spacing: -0.015em;
  max-width: 22ch;
}
dt { font-size: .82rem; font-stretch: 85%; font-weight: 500; color: var(--mute); }

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center;
  gap: 8px;
  min-height: 50px; padding: 0 24px;
  font: inherit; font-size: .95rem; font-weight: 600; font-stretch: 105%;
  text-decoration: none; cursor: pointer;
  border: 1.5px solid transparent; border-radius: 2px;
  transition: background-color .2s, color .2s, border-color .2s;
}
.btn--sm { min-height: 40px; padding: 0 16px; font-size: .88rem; }
.btn--brand { background: var(--blue); color: #fff; }
.btn--brand:hover { background: var(--blue-deep); }
.btn--light { background: var(--paper); color: var(--ink); }
.btn--light:hover { background: #fff; color: var(--blue); }
.btn--ghost { border-color: rgba(246,246,242,.7); color: var(--paper); }
.btn--ghost:hover { background: rgba(246,246,242,.12); }
.btn--line { border-color: var(--ink); color: var(--ink); background: transparent; }
.btn--line:hover { background: var(--ink); color: var(--paper); }

.badge {
  display: inline-block; padding: 3px 9px;
  font-size: .76rem; font-weight: 600; font-stretch: 90%;
  border-radius: 2px; white-space: nowrap;
}
.badge--ongoing   { background: var(--purple); color: #fff; }
.badge--completed { background: var(--stone); color: var(--ink); }
.badge--design    { background: var(--blue); color: #fff; }

/* ---------- Nav ---------- */
.nav {
  position: sticky; top: 0; z-index: 50;
  background: rgba(246,246,242,.94);
  backdrop-filter: saturate(140%) blur(10px);
  border-bottom: 1px solid var(--line);
}
.nav__inner { display: flex; align-items: center; gap: 32px; height: 72px; }
.brand { display: flex; align-items: center; gap: 10px; text-decoration: none; font-weight: 700; font-stretch: 120%; font-size: 1.15rem; letter-spacing: -0.01em; }
.brand img { height: 46px; width: auto; }
.nav__links { display: flex; gap: 28px; margin-left: auto; }
.nav__links a { text-decoration: none; font-size: .95rem; font-weight: 500; padding: 6px 0; border-bottom: 2px solid transparent; }
.nav__links a:hover { border-color: var(--blue); color: var(--blue); }
.nav__toggle { display: none; }

/* ---------- Hero ---------- */
.hero {
  position: relative;
  min-height: min(88vh, 860px);
  display: flex; align-items: flex-end;
  color: var(--paper);
  background: var(--blue-deep);          /* shows while the photo loads */
  overflow: hidden;
}
.hero__img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.hero__shade {
  position: absolute; inset: 0;
  background:
    linear-gradient(90deg, rgba(8,28,48,.72) 0%, rgba(8,28,48,.35) 45%, rgba(8,28,48,0) 70%),
    linear-gradient(0deg, rgba(8,28,48,.55) 0%, rgba(8,28,48,0) 45%);
}
.hero__inner {
  position: relative;
  display: grid; grid-template-columns: 1fr 380px; gap: 48px; align-items: end;
  padding-top: 120px; padding-bottom: clamp(40px, 6vw, 72px);
}
.hero__title {
  font-size: clamp(3rem, 8.2vw, 7.4rem);
  font-stretch: 125%;
  font-weight: 750;
  line-height: .92;
  letter-spacing: -0.03em;
  max-width: 9ch;
}
.hero__lead { margin-top: 24px; max-width: 36ch; font-size: clamp(1.05rem, 1.4vw, 1.25rem); color: rgba(246,246,242,.9); }
.hero__actions { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 32px; }

/* The signboard */
.sign {
  background: var(--paper); color: var(--ink);
  border-top: 10px solid var(--purple);
  box-shadow: 0 30px 60px -20px rgba(0,0,0,.45);
}
.sign__head {
  display: flex; justify-content: space-between; align-items: center; gap: 12px;
  padding: 14px 22px 0;
  font-size: .85rem; font-weight: 600; font-stretch: 90%; color: var(--mute);
}
.sign__name { padding: 6px 22px 16px; font-size: 1.9rem; font-stretch: 120%; font-weight: 700; line-height: 1.05; letter-spacing: -0.02em; }
.sign__facts { border-top: 1px solid var(--line); }
.sign__facts div { display: grid; grid-template-columns: 112px 1fr; gap: 12px; padding: 9px 22px; border-bottom: 1px solid var(--line); }
.sign__facts dd { font-size: .95rem; font-weight: 500; line-height: 1.4; }
.sign__link {
  display: block; padding: 16px 22px;
  background: var(--blue); color: var(--paper);
  font-weight: 600; text-decoration: none;
}
.sign__link:hover { background: var(--blue-deep); }

/* One page-load moment */
@media (prefers-reduced-motion: no-preference) {
  .hero__copy > * { animation: rise .8s cubic-bezier(.2,.7,.2,1) both; }
  .hero__lead    { animation-delay: .08s !important; }
  .hero__actions { animation-delay: .16s !important; }
  .sign { animation: rise .9s .3s cubic-bezier(.2,.7,.2,1) both; }
  @keyframes rise { from { opacity: 0; transform: translateY(24px); } to { opacity: 1; transform: none; } }
}

/* ---------- Intro ---------- */
.intro {
  display: grid; grid-template-columns: 1fr auto; gap: 64px; align-items: end;
  padding-top: var(--sec); padding-bottom: calc(var(--sec) * .7);
}
.intro__statement {
  font-size: clamp(1.35rem, 2.4vw, 2rem);
  font-stretch: 108%;
  font-weight: 450;
  line-height: 1.32;
  letter-spacing: -0.01em;
  max-width: 34ch;
}
.intro__facts { display: flex; gap: 40px; }
.intro__facts dd { font-size: clamp(2.4rem, 4vw, 3.4rem); font-stretch: 125%; font-weight: 700; line-height: 1; letter-spacing: -0.03em; margin-top: 6px; }

/* ---------- Featured project ---------- */
.feature { background: var(--stone); padding-block: var(--sec); }
.feature__grid { display: grid; grid-template-columns: 1.05fr 1fr; gap: clamp(32px, 5vw, 80px); align-items: center; }
.feature__media { background: var(--stone); aspect-ratio: 4 / 5; overflow: hidden; }
.feature__media img { width: 100%; height: 100%; object-fit: cover; }
.feature__body .muted { margin-top: 14px; }
.units { margin-top: 32px; border-top: 1px solid var(--line); }
.unit { display: grid; grid-template-columns: 9.5rem 1fr 4.5rem; gap: 6px 18px; align-items: center; padding: 16px 0; border-bottom: 1px solid var(--line); }
.unit__name { font-weight: 650; font-stretch: 110%; line-height: 1.2; }
.unit__name small { display: block; font-weight: 400; font-stretch: 100%; color: var(--mute); font-size: .85rem; margin-top: 2px; }
.unit__bar { height: 14px; background: rgba(29,34,28,.08); }
.unit__bar span { display: block; height: 100%; background: var(--blue); }
.unit__area { text-align: right; font-weight: 700; font-stretch: 115%; font-variant-numeric: tabular-nums; }
.unit__extra { grid-column: 2 / 4; font-size: .85rem; color: var(--mute); margin-top: -2px; }
.feature__actions { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 32px; }

/* ---------- Section head ---------- */
.section-head { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: end; gap: 20px 40px; margin-bottom: 40px; }
.section-head__note { max-width: 32ch; }

/* ---------- Projects ---------- */
.projects { padding-block: var(--sec); }
.filter { display: flex; gap: 4px; padding: 4px; background: var(--stone); border-radius: 3px; }
.filter button {
  font: inherit; font-size: .9rem; font-weight: 550;
  border: 0; border-radius: 2px; background: transparent; color: var(--mute);
  padding: 9px 16px; cursor: pointer;
}
.filter button[aria-selected="true"] { background: #fff; color: var(--blue); box-shadow: 0 1px 2px rgba(0,0,0,.08); }

.grid { display: grid; grid-template-columns: repeat(12, 1fr); gap: 48px 28px; }
.card { grid-column: span 6; }
.card:nth-child(4n+1), .card:nth-child(4n+4) { grid-column: span 7; }
.card:nth-child(4n+2), .card:nth-child(4n+3) { grid-column: span 5; }
.card:only-child { grid-column: span 7; }
.card a { text-decoration: none; display: block; }
.card__media { position: relative; height: clamp(220px, 26vw, 370px); background: var(--stone); overflow: hidden; }
.card__media img { width: 100%; height: 100%; object-fit: cover; transition: transform .6s cubic-bezier(.2,.7,.2,1); }
.card a:hover .card__media img { transform: scale(1.03); }
.card__media .badge { position: absolute; left: 14px; top: 14px; }
.card__body { display: flex; justify-content: space-between; gap: 16px; padding-top: 16px; }
.card__name { font-size: 1.35rem; font-stretch: 115%; font-weight: 650; line-height: 1.15; letter-spacing: -0.01em; }
.card a:hover .card__name { text-decoration: underline; text-underline-offset: 4px; text-decoration-thickness: 2px; }
.card__tag { color: var(--mute); margin-top: 4px; max-width: 40ch; }
.card__meta { text-align: right; font-size: .9rem; color: var(--mute); white-space: nowrap; line-height: 1.5; }
.card__meta strong { display: block; color: var(--ink); font-weight: 600; }

/* ---------- Services ---------- */
.services { background: var(--blue-deep); color: var(--paper); padding-block: var(--sec); }
.services__grid { display: grid; grid-template-columns: 1fr 2fr; gap: 48px; }
.services__list { display: grid; grid-template-columns: 1fr 1fr; gap: 0 48px; }
.services__list li { padding: 24px 0 32px; border-top: 1px solid rgba(246,246,242,.25); }
.services__list h3 { font-size: 1.25rem; font-stretch: 115%; font-weight: 650; line-height: 1.2; }
.services__list p { margin-top: 10px; color: rgba(246,246,242,.78); max-width: 42ch; }

/* ---------- Designs ---------- */
.designs { padding-block: var(--sec); }
.design { display: grid; grid-template-columns: 280px 1fr; gap: 40px; padding: 32px 0; border-top: 1px solid var(--line); }
.design:last-child { border-bottom: 1px solid var(--line); }
.design__name { font-size: 1.35rem; font-stretch: 115%; font-weight: 650; line-height: 1.15; }
.design__info p { color: var(--mute); margin-top: 8px; }
.design__info a { display: inline-block; margin-top: 16px; font-weight: 600; color: var(--blue); text-underline-offset: 4px; }
.strip { display: flex; gap: 12px; overflow-x: auto; scroll-snap-type: x mandatory; padding-bottom: 10px; scrollbar-width: thin; }
.strip a { flex: 0 0 auto; scroll-snap-align: start; background: var(--stone); }
.strip img { height: 220px; width: auto; min-width: 200px; object-fit: cover; }

/* ---------- About ---------- */
.about { background: var(--stone); padding-block: var(--sec); }
.about__grid { display: grid; grid-template-columns: 1.3fr 1fr; gap: clamp(40px, 6vw, 100px); }
.about__grid p { margin-top: 20px; max-width: 58ch; }
.about__media { margin-top: 36px; background: var(--stone); aspect-ratio: 16 / 10; overflow: hidden; }
.about__media img { width: 100%; height: 100%; object-fit: cover; }

.timeline { position: relative; align-self: start; padding-left: 28px; margin-top: 8px; }
.timeline::before { content: ""; position: absolute; left: 5px; top: 10px; bottom: 10px; width: 2px; background: var(--line); }
.timeline li { position: relative; display: grid; grid-template-columns: 5rem 1fr; gap: 12px; padding: 14px 0; border-bottom: 1px solid var(--line); }
.timeline li::before { content: ""; position: absolute; left: -28px; top: 22px; width: 12px; height: 12px; border-radius: 50%; background: var(--paper); border: 2px solid var(--blue); }
.timeline li.is-now::before { background: var(--purple); border-color: var(--purple); }
.timeline__year { font-weight: 700; font-stretch: 120%; font-variant-numeric: tabular-nums; }
.timeline a { color: var(--blue); text-underline-offset: 4px; }

/* ---------- Contact ---------- */
.contact { display: grid; grid-template-columns: 1fr 1.15fr; gap: clamp(40px, 6vw, 100px); padding-block: var(--sec) 56px; }
.contact__intro > p { margin-top: 18px; max-width: 44ch; color: var(--mute); }
.contact__details { margin-top: 36px; }
.contact__details div { padding: 14px 0; border-top: 1px solid var(--line); }
.contact__details dd { font-size: 1.1rem; font-weight: 550; margin-top: 2px; }
.contact__details a { color: var(--blue); text-underline-offset: 4px; }

.form { display: grid; gap: 18px; align-content: start; }
.form label { display: grid; gap: 6px; font-size: .9rem; font-weight: 600; }
.form .opt { font-weight: 400; color: var(--mute); }
.form input, .form select, .form textarea {
  font: inherit; font-size: 1rem; font-weight: 400; color: var(--ink);
  background: #fff; border: 1.5px solid var(--line); border-radius: 2px;
  padding: 13px 14px; width: 100%;
}
.form input:focus, .form select:focus, .form textarea:focus { outline: none; border-color: var(--blue); box-shadow: 0 0 0 3px rgba(27,117,188,.2); }
.form [aria-invalid="true"] { border-color: #A23B2A; }
.form__error { color: #A23B2A; font-weight: 550; font-size: .95rem; }
.form__actions { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 6px; }

.map { padding-bottom: var(--sec); }
.map iframe { display: block; width: 100%; height: 380px; border: 0; filter: grayscale(.6) contrast(1.05); background: var(--stone); }

/* ---------- Footer ---------- */
.footer { background: #fff; border-top: 1px solid var(--line); color: var(--mute); padding-block: 56px; font-size: .95rem; }
.footer__inner { display: grid; grid-template-columns: auto 1fr auto; gap: 20px 48px; align-items: center; }
.brand--footer img { height: 40px; width: auto; }
.footer__links { display: flex; gap: 24px; flex-wrap: wrap; }
.footer__links a { color: var(--blue); text-underline-offset: 4px; }
.footer__copy { grid-column: 1 / -1; padding-top: 24px; border-top: 1px solid var(--line); font-size: .85rem; }

/* ---------- WhatsApp button ---------- */
.wa-float {
  position: fixed; right: 20px; bottom: 20px; z-index: 60;
  width: 58px; height: 58px; border-radius: 50%;
  display: grid; place-items: center;
  background: var(--wa); color: #fff;
  box-shadow: 0 10px 24px -6px rgba(0,0,0,.35);
  transition: transform .2s;
}
.wa-float:hover { transform: scale(1.06); }

/* =========================================================
   Project page
   ========================================================= */
.p-hero { position: relative; min-height: 70vh; display: flex; align-items: flex-end; color: var(--paper); background: var(--blue-deep); overflow: hidden; }
.p-hero .hero__img { position: absolute; inset: 0; }
.p-hero__inner { position: relative; padding-top: 140px; padding-bottom: 56px; }
.p-hero__back { display: inline-block; margin-bottom: 28px; color: var(--paper); font-weight: 550; text-underline-offset: 4px; }
.p-hero h1 { font-size: clamp(2.6rem, 6.4vw, 5.6rem); font-stretch: 125%; font-weight: 750; line-height: .95; letter-spacing: -0.03em; max-width: 14ch; }
.p-hero p { margin-top: 18px; font-size: clamp(1.05rem, 1.5vw, 1.3rem); max-width: 40ch; color: rgba(246,246,242,.9); }
.p-hero .badge { margin-bottom: 18px; }

.p-body { display: grid; grid-template-columns: 1.4fr 1fr; gap: clamp(40px, 6vw, 100px); padding-block: var(--sec); }
.p-body__text p { font-size: 1.12rem; line-height: 1.7; max-width: 60ch; }
.p-body__text p + p { margin-top: 18px; }
.p-body__text .units { margin-top: 40px; }
.p-facts { align-self: start; position: sticky; top: 100px; background: var(--stone); padding: 8px 24px 24px; border-top: 10px solid var(--blue); }
.p-facts.is-ongoing { border-top-color: var(--purple); }
.p-facts dl div { display: grid; grid-template-columns: 7rem 1fr; gap: 12px; padding: 12px 0; border-bottom: 1px solid var(--line); }
.p-facts dd { font-weight: 550; }
.p-facts .btn { width: 100%; margin-top: 20px; }
.p-facts .btn + .btn { margin-top: 10px; }

.gallery { padding-bottom: var(--sec); }
.gallery__grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 14px; }
.gallery__grid button { padding: 0; border: 0; background: var(--stone); cursor: zoom-in; aspect-ratio: 4 / 3; overflow: hidden; }
.gallery__grid button:first-child { grid-column: span 2; grid-row: span 2; aspect-ratio: auto; }
.gallery__grid img { width: 100%; height: 100%; object-fit: cover; }

.lightbox { position: fixed; inset: 0; z-index: 80; background: rgba(15,18,14,.94); display: grid; grid-template-rows: 1fr auto; padding: 20px; }
.lightbox[hidden] { display: none; }
.lightbox figure { display: grid; place-items: center; min-height: 0; }
.lightbox img { max-width: 100%; max-height: calc(100vh - 120px); object-fit: contain; }
.lightbox__bar { display: flex; justify-content: space-between; align-items: center; gap: 12px; color: var(--paper); padding-top: 14px; }
.lightbox__bar button { font: inherit; font-weight: 600; background: transparent; color: var(--paper); border: 1.5px solid rgba(246,246,242,.5); border-radius: 2px; padding: 10px 18px; cursor: pointer; }
.lightbox__bar button:hover { background: rgba(246,246,242,.12); }
.lightbox__caption { flex: 1; text-align: center; font-size: .95rem; }

.more { padding-bottom: var(--sec); }

/* =========================================================
   Responsive
   ========================================================= */
@media (max-width: 1000px) {
  .hero__inner { grid-template-columns: 1fr; }
  .sign { max-width: 440px; }
  .intro { grid-template-columns: 1fr; gap: 40px; }
  .services__grid { grid-template-columns: 1fr; }
  .p-body { grid-template-columns: 1fr; }
  .p-facts { position: static; }
}

@media (max-width: 860px) {
  .nav__links {
    position: absolute; left: 0; right: 0; top: 72px;
    flex-direction: column; gap: 0;
    background: var(--paper); border-bottom: 1px solid var(--line);
    padding: 8px var(--gut) 20px;
    display: none;
  }
  .nav__links.is-open { display: flex; }
  .nav__links a { padding: 14px 0; border-bottom: 1px solid var(--line); font-size: 1.05rem; }
  .nav__cta { margin-left: auto; }
  .nav__toggle {
    display: grid; gap: 6px; place-content: center;
    width: 44px; height: 44px; background: transparent; border: 0; cursor: pointer;
  }
  .nav__toggle i { display: block; width: 22px; height: 2px; background: var(--ink); transition: transform .2s; }
  .nav__toggle[aria-expanded="true"] i:first-of-type { transform: translateY(4px) rotate(45deg); }
  .nav__toggle[aria-expanded="true"] i:last-of-type  { transform: translateY(-4px) rotate(-45deg); }

  .feature__grid, .about__grid, .contact { grid-template-columns: 1fr; }
  .feature__media { aspect-ratio: 4 / 3; }
  .grid { grid-template-columns: 1fr; gap: 40px; }
  .card, .card:nth-child(n) { grid-column: auto; }
  .services__list { grid-template-columns: 1fr; }
  .design { grid-template-columns: 1fr; gap: 20px; }
  .footer__inner { grid-template-columns: 1fr; }
}

@media (max-width: 560px) {
  body { font-size: 16px; }
  .nav__cta { display: none; }
  .nav__toggle { margin-left: auto; }
  .hero { min-height: 0; }
  .hero__inner { padding-top: 64px; gap: 36px; }
  .hero__actions .btn { flex: 1 1 100%; }
  .sign__facts div { grid-template-columns: 96px 1fr; }
  .intro__facts { gap: 28px; }
  .unit { grid-template-columns: 1fr 4rem; }
  .unit__bar { grid-column: 1 / -1; grid-row: 2; }
  .unit__extra { grid-column: 1 / -1; }
  .card__body { flex-direction: column; gap: 6px; }
  .card__meta { text-align: left; }
  .card__meta strong { display: inline; margin-right: 8px; }
  .strip img { height: 180px; }
  .gallery__grid button:first-child { grid-column: auto; grid-row: auto; aspect-ratio: 4 / 3; }
  .form__actions .btn { flex: 1 1 100%; }
  .lightbox__caption { display: none; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { transition: none !important; animation: none !important; }
}
