/* ==========================================================
   TRINITY INFRASOLUTIONS - Shared stylesheet
   Edit colours, fonts and spacing in the :root block below.
   ========================================================== */

/* ---------- 1. DESIGN TOKENS ---------- */
:root {
  --navy-900: #0B1B33;
  --navy-800: #0F2340;
  --navy-700: #13294B;
  --blue-600: #1F5AA6;
  --blue-700: #194B8C;
  --blue-100: #E8F0FA;
  --silver: #C3C9D1;
  --white: #FFFFFF;
  --text: #1C2430;
  --muted: #5B6675;
  --border: #D9E1EC;
  --error: #B42318;
  --success: #067647;

  --font-head: "Cormorant Garamond", "Playfair Display", Georgia, "Times New Roman", serif;
  --font-body: "Inter", system-ui, -apple-system, "Segoe UI", Roboto, Arial, sans-serif;

  --radius: 8px;
  --shadow-sm: 0 1px 3px rgba(11, 27, 51, .08);
  --shadow-md: 0 8px 24px rgba(11, 27, 51, .10);
  --container: 1200px;
  --header-h: 76px;

  --s-1: .25rem;
  --s-2: .5rem;
  --s-3: .75rem;
  --s-4: 1rem;
  --s-5: 1.5rem;
  --s-6: 2rem;
  --s-7: 3rem;
  --s-8: 4.5rem;
  --s-9: 6rem;
}

/* ---------- 2. RESET & BASE ---------- */
*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; scroll-padding-top: calc(var(--header-h) + 12px); }
body {
  margin: 0;
  font-family: var(--font-body);
  font-size: 1rem;
  line-height: 1.65;
  color: var(--text);
  background: var(--white);
  -webkit-font-smoothing: antialiased;
}
img, svg, iframe { max-width: 100%; display: block; }
img { height: auto; }
a { color: var(--blue-600); text-decoration-thickness: 1px; text-underline-offset: 3px; }
a:hover { color: var(--blue-700); }
h1, h2, h3, h4 { font-family: var(--font-head); color: var(--navy-900); line-height: 1.15; margin: 0 0 var(--s-4); font-weight: 700; }
h1 { font-size: clamp(2.2rem, 5.5vw, 3.7rem); letter-spacing: -.01em; }
h2 { font-size: clamp(1.8rem, 3.8vw, 2.6rem); }
h3 { font-size: 1.45rem; }
h4 { font-size: 1.15rem; }
p { margin: 0 0 var(--s-4); }
ul, ol { margin: 0; padding: 0; list-style: none; }

:focus-visible { outline: 3px solid #5B9BE6; outline-offset: 2px; border-radius: 4px; }
.skip-link {
  position: absolute; left: -999px; top: 8px; z-index: 200;
  background: var(--white); color: var(--navy-900); padding: .6rem 1rem; border-radius: var(--radius); font-weight: 600;
}
.skip-link:focus { left: 8px; }
.sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0,0,0,0); white-space: nowrap; border: 0; }

/* ---------- 3. LAYOUT HELPERS ---------- */
.container { width: 100%; max-width: var(--container); margin: 0 auto; padding: 0 20px; }
.section { padding: var(--s-8) 0; }
.section--light { background: var(--blue-100); }
.section--dark { background: var(--navy-900); color: #DCE4F0; }
.section--dark h2, .section--dark h3 { color: var(--white); }
.section-head { max-width: 720px; margin: 0 auto var(--s-7); text-align: center; }
.section-head p { color: var(--muted); font-size: 1.08rem; }
.section--dark .section-head p { color: #B9C6DA; }
.eyebrow { display: inline-block; font-size: .78rem; letter-spacing: .16em; text-transform: uppercase; font-weight: 600; color: var(--blue-600); margin-bottom: var(--s-3); }
.section--dark .eyebrow, .hero .eyebrow { color: var(--silver); }
.grid { display: grid; gap: var(--s-5); }
.grid-2 { grid-template-columns: 1fr; }
.grid-3 { grid-template-columns: 1fr; }
.grid-4 { grid-template-columns: 1fr; }
.center { text-align: center; }
.mt-6 { margin-top: var(--s-6); }

/* ---------- 4. BUTTONS ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: .5rem;
  padding: .85rem 1.5rem; border-radius: var(--radius); border: 2px solid transparent;
  font: 600 .98rem/1.2 var(--font-body); text-decoration: none; cursor: pointer;
  transition: background .2s, color .2s, border-color .2s, transform .2s;
}
.btn:hover { transform: translateY(-1px); }
.btn-primary { background: var(--blue-600); color: var(--white); }
.btn-primary:hover { background: var(--blue-700); color: var(--white); }
.btn-outline { background: transparent; color: var(--blue-600); border-color: var(--blue-600); }
.btn-outline:hover { background: var(--blue-600); color: var(--white); }
.btn-light { background: transparent; color: var(--white); border-color: rgba(255,255,255,.55); }
.btn-light:hover { background: var(--white); color: var(--navy-900); }
.btn-row { display: flex; flex-wrap: wrap; gap: var(--s-3); }
.btn svg { width: 18px; height: 18px; }

/* ---------- 5. HEADER / NAV ---------- */
.site-header {
  position: sticky; top: 0; z-index: 100; height: var(--header-h);
  background: rgba(11, 27, 51, .92); backdrop-filter: blur(8px);
  border-bottom: 1px solid rgba(195, 201, 209, .15);
  transition: background .25s, box-shadow .25s;
}
.site-header.is-scrolled { background: var(--navy-900); box-shadow: 0 4px 18px rgba(0,0,0,.25); }
.header-inner { height: 100%; display: flex; align-items: center; justify-content: space-between; gap: var(--s-4); }
.brand { display: flex; align-items: center; gap: .7rem; text-decoration: none; color: var(--white); }
.brand img { width: 48px; height: 48px; object-fit: contain; }
.brand-text { display: flex; flex-direction: column; line-height: 1.05; }
.brand-text strong { font-family: var(--font-head); font-size: 1.55rem; letter-spacing: .08em; color: var(--silver); font-weight: 700; }
.brand-text span { font-size: .6rem; letter-spacing: .32em; color: var(--silver); opacity: .85; margin-top: 3px; }
.nav-toggle {
  background: none; border: 1px solid rgba(195,201,209,.4); color: var(--white);
  width: 44px; height: 44px; border-radius: var(--radius); cursor: pointer;
  display: inline-flex; align-items: center; justify-content: center;
}
.nav-toggle svg { width: 24px; height: 24px; }
.primary-nav {
  position: absolute; top: var(--header-h); left: 0; right: 0;
  background: var(--navy-900); border-top: 1px solid rgba(195,201,209,.15);
  padding: var(--s-3) 20px var(--s-5);
  display: none; flex-direction: column; gap: var(--s-1);
  max-height: calc(100vh - var(--header-h)); overflow-y: auto;
}
.primary-nav.is-open { display: flex; }
.primary-nav a {
  color: #DCE4F0; text-decoration: none; padding: .8rem .4rem; font-weight: 500; font-size: 1rem;
  border-bottom: 1px solid rgba(195,201,209,.1);
}
.primary-nav a:hover { color: var(--white); }
.primary-nav a[aria-current="page"] { color: var(--white); box-shadow: inset 3px 0 0 var(--blue-600); padding-left: .9rem; }
.primary-nav .btn { margin-top: var(--s-3); border-bottom: 2px solid transparent; color: var(--white); }
.header-cta { display: none; }

/* ---------- 6. HERO ---------- */
.hero {
  position: relative; overflow: hidden; color: #DCE4F0;
  background:
    radial-gradient(900px 500px at 85% -10%, rgba(31, 90, 166, .35), transparent 60%),
    linear-gradient(160deg, var(--navy-900) 0%, var(--navy-700) 100%);
  padding: var(--s-8) 0 var(--s-8);
}
.hero h1 { color: var(--white); max-width: 18ch; }
.hero p.lead { font-size: 1.12rem; max-width: 56ch; color: #C9D5E8; margin-bottom: var(--s-6); }
.hero-pattern { position: absolute; inset: 0; pointer-events: none; opacity: .5; }
.hero-pattern svg { position: absolute; right: -80px; top: 50%; transform: translateY(-50%); width: min(620px, 90vw); height: auto; }
.hero > .container { position: relative; z-index: 1; }
.hero--page { padding: var(--s-7) 0 var(--s-7); }
.hero--page h1 { max-width: 22ch; font-size: clamp(2rem, 4.6vw, 3.1rem); }
.badge {
  display: inline-flex; align-items: center; gap: .5rem;
  border: 1px solid rgba(195,201,209,.45); color: var(--silver);
  padding: .4rem .9rem; border-radius: 999px; font-size: .82rem; font-weight: 500; margin-bottom: var(--s-5);
  background: rgba(255,255,255,.04);
}
.badge::before { content: ""; width: 8px; height: 8px; border-radius: 50%; background: #E8B130; }

/* ---------- 7. CARDS ---------- */
.card {
  background: var(--white); border: 1px solid var(--border); border-radius: var(--radius);
  padding: var(--s-6) var(--s-5); box-shadow: var(--shadow-sm);
  transition: box-shadow .25s, transform .25s, border-color .25s;
}
.card:hover { box-shadow: var(--shadow-md); transform: translateY(-3px); border-color: #BFD0E6; }
.card h3 { margin-bottom: var(--s-3); }
.card p { color: var(--muted); margin-bottom: var(--s-4); }
.card p:last-child { margin-bottom: 0; }
.card-link { font-weight: 600; text-decoration: none; display: inline-flex; align-items: center; gap: .35rem; }
.card-link::after { content: "→"; transition: transform .2s; }
.card-link:hover::after { transform: translateX(4px); }
.icon-wrap {
  width: 54px; height: 54px; border-radius: var(--radius); background: var(--blue-100); color: var(--blue-600);
  display: inline-flex; align-items: center; justify-content: center; margin-bottom: var(--s-4);
}
.icon-wrap svg { width: 28px; height: 28px; }
.section--light .icon-wrap { background: var(--white); }
.card--biz { display: flex; flex-direction: column; }
.card--biz .card-link { margin-top: auto; }
.card--biz .tag { align-self: flex-start; font-size: .72rem; font-weight: 600; letter-spacing: .08em; text-transform: uppercase; background: #FFF4D6; color: #7A5600; padding: .2rem .6rem; border-radius: 999px; margin-bottom: var(--s-3); }

/* ---------- 8. STATS ---------- */
.stats { display: grid; grid-template-columns: repeat(2, 1fr); gap: var(--s-5); text-align: center; }
.stat strong { display: block; font-family: var(--font-head); font-size: clamp(2.2rem, 5vw, 3.2rem); color: var(--white); line-height: 1; }
.stat span { color: #B9C6DA; font-size: .92rem; }

/* ---------- 9. SPLIT / MEDIA ---------- */
.split { display: grid; gap: var(--s-6); align-items: center; grid-template-columns: 1fr; }
.ph-img {
  background: linear-gradient(135deg, var(--navy-700), var(--blue-600));
  border-radius: var(--radius); min-height: 280px; color: rgba(255,255,255,.8);
  display: flex; align-items: center; justify-content: center; text-align: center; padding: var(--s-5);
  font-size: .9rem; letter-spacing: .04em; position: relative; overflow: hidden;
}
.ph-img svg { position: absolute; inset: 0; width: 100%; height: 100%; opacity: .18; }
.ph-img span { position: relative; }
.check-list li { position: relative; padding-left: 1.9rem; margin-bottom: var(--s-3); }
.check-list li::before {
  content: ""; position: absolute; left: 0; top: .42em; width: 1.1rem; height: 1.1rem; border-radius: 50%;
  background: var(--blue-600) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='white' stroke-width='3' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M5 12l5 5 9-10'/%3E%3C/svg%3E") center/70% no-repeat;
}

/* ---------- 10. PROCESS STEPS ---------- */
.steps { display: grid; gap: var(--s-4); grid-template-columns: 1fr; counter-reset: step; }
.step { position: relative; background: var(--white); border: 1px solid var(--border); border-radius: var(--radius); padding: var(--s-5); text-align: center; }
.step::before {
  counter-increment: step; content: counter(step);
  display: inline-flex; width: 38px; height: 38px; border-radius: 50%; align-items: center; justify-content: center;
  background: var(--navy-900); color: var(--silver); font-weight: 700; margin-bottom: var(--s-3);
}
.step h4 { margin-bottom: var(--s-2); }
.step p { color: var(--muted); font-size: .92rem; margin: 0; }
.flow { display: flex; flex-direction: column; gap: var(--s-3); }
.flow-item {
  background: var(--white); border: 1px solid var(--border); border-radius: var(--radius);
  padding: var(--s-4); text-align: center; position: relative;
}
.flow-item svg { width: 44px; height: 44px; margin: 0 auto var(--s-2); color: var(--blue-600); }
.flow-item strong { display: block; font-size: .95rem; color: var(--navy-900); }
.flow-item small { color: var(--muted); }
.flow-item:not(:last-child)::after {
  content: "↓"; position: absolute; left: 50%; bottom: -1.6rem; transform: translateX(-50%); color: var(--blue-600); font-size: 1.4rem; font-weight: 700;
}

/* ---------- 11. PARTNERS & DETAILS ---------- */
.avatar {
  width: 88px; height: 88px; border-radius: 50%; background: var(--navy-900); color: var(--silver);
  display: flex; align-items: center; justify-content: center; margin: 0 auto var(--s-4);
  font-family: var(--font-head); font-size: 2rem; font-weight: 700; letter-spacing: .04em;
  border: 3px solid var(--silver);
}
.partner { text-align: center; }
.partner .role { color: var(--blue-600); font-weight: 600; font-size: .9rem; margin-bottom: var(--s-3); }
.details { background: var(--white); border: 1px solid var(--border); border-radius: var(--radius); overflow: hidden; }
.details dl { margin: 0; }
.details .row { display: grid; grid-template-columns: 1fr; padding: var(--s-4) var(--s-5); border-bottom: 1px solid var(--border); gap: .15rem; }
.details .row:last-child { border-bottom: 0; }
.details dt { color: var(--muted); font-size: .85rem; font-weight: 600; text-transform: uppercase; letter-spacing: .06em; }
.details dd { margin: 0; font-weight: 500; }

/* ---------- 12. CTA BAND ---------- */
.cta-band { background: linear-gradient(135deg, var(--navy-900), var(--navy-700)); color: #DCE4F0; padding: var(--s-8) 0; text-align: center; }
.cta-band h2 { color: var(--white); }
.cta-band p { color: #B9C6DA; max-width: 56ch; margin: 0 auto var(--s-5); }
.cta-band .btn-row { justify-content: center; }

/* ---------- 13. FORMS ---------- */
.form-card { background: var(--white); border: 1px solid var(--border); border-radius: var(--radius); padding: var(--s-5); box-shadow: var(--shadow-sm); }
.field { margin-bottom: var(--s-4); }
.field label { display: block; font-weight: 600; font-size: .92rem; margin-bottom: .35rem; color: var(--navy-900); }
.field label .req { color: var(--error); }
.field input, .field select, .field textarea {
  width: 100%; padding: .8rem .9rem; border: 1.5px solid #B8C4D6; border-radius: var(--radius);
  font: inherit; color: var(--text); background: var(--white);
}
.field textarea { min-height: 130px; resize: vertical; }
.field input:focus, .field select:focus, .field textarea:focus { outline: 3px solid rgba(31,90,166,.25); border-color: var(--blue-600); }
.field.has-error input, .field.has-error select, .field.has-error textarea { border-color: var(--error); }
.error-msg { display: none; color: var(--error); font-size: .85rem; margin-top: .3rem; }
.field.has-error .error-msg { display: block; }
.hp { position: absolute; left: -9999px; width: 1px; height: 1px; overflow: hidden; }
.form-note { font-size: .85rem; color: var(--muted); margin-top: var(--s-3); }
.contact-list li { display: flex; gap: var(--s-3); margin-bottom: var(--s-4); }
.contact-list svg { width: 22px; height: 22px; color: var(--blue-600); flex: none; margin-top: 3px; }
.contact-list a { text-decoration: none; font-weight: 500; }
.contact-list a:hover { text-decoration: underline; }
.contact-list strong { display: block; color: var(--navy-900); }

/* ---------- 14. MAPS & TABS ---------- */
.map-wrap { border-radius: var(--radius); overflow: hidden; border: 1px solid var(--border); background: var(--blue-100); }
.map-wrap iframe { width: 100%; height: 340px; border: 0; }
.map-wrap figcaption { padding: .7rem 1rem; font-size: .9rem; color: var(--muted); background: var(--white); border-top: 1px solid var(--border); }
.map-wrap { margin: 0; }

/* ---------- 15. FOOTER ---------- */
.site-footer { background: var(--navy-900); color: #B9C6DA; padding-top: var(--s-8); font-size: .95rem; }
.footer-grid { display: grid; gap: var(--s-6); grid-template-columns: 1fr; padding-bottom: var(--s-7); }
.site-footer h4 { color: var(--white); font-family: var(--font-body); font-size: .85rem; letter-spacing: .14em; text-transform: uppercase; margin-bottom: var(--s-4); }
.site-footer a { color: #C9D5E8; text-decoration: none; }
.site-footer a:hover { color: var(--white); text-decoration: underline; }
.site-footer li { margin-bottom: .55rem; }
.footer-logo { width: 150px; margin-bottom: var(--s-3); }
.footer-tag { display: inline-block; margin-top: var(--s-3); font-size: .82rem; color: var(--silver); border: 1px solid rgba(195,201,209,.3); padding: .25rem .7rem; border-radius: 999px; }
.footer-bottom { border-top: 1px solid rgba(195,201,209,.15); padding: var(--s-4) 0; font-size: .85rem; display: flex; flex-direction: column; gap: .3rem; }
address { font-style: normal; }

/* ---------- 16. WHATSAPP FLOAT ---------- */
.wa-float {
  position: fixed; right: 18px; bottom: 18px; 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 18px rgba(0,0,0,.28); transition: transform .2s;
}
.wa-float:hover { transform: scale(1.07); color: #fff; }
.wa-float svg { width: 30px; height: 30px; }

/* ---------- 17. SCROLL REVEAL ---------- */
.reveal { opacity: 0; transform: translateY(22px); transition: opacity .6s ease, transform .6s ease; }
.reveal.is-visible { opacity: 1; transform: none; }
.no-js .reveal { opacity: 1; transform: none; }

/* ---------- 18. RESPONSIVE ---------- */
@media (min-width: 600px) {
  .grid-2 { grid-template-columns: repeat(2, 1fr); }
  .grid-3 { grid-template-columns: repeat(2, 1fr); }
  .grid-4 { grid-template-columns: repeat(2, 1fr); }
  .steps { grid-template-columns: repeat(2, 1fr); }
  .stats { grid-template-columns: repeat(4, 1fr); }
  .footer-bottom { flex-direction: row; justify-content: space-between; }
  .details .row { grid-template-columns: 220px 1fr; gap: var(--s-4); }
}
@media (min-width: 900px) {
  .split { grid-template-columns: 1fr 1fr; gap: var(--s-8); }
  .grid-3 { grid-template-columns: repeat(3, 1fr); }
  .grid-4 { grid-template-columns: repeat(4, 1fr); }
  .steps { grid-template-columns: repeat(5, 1fr); }
  .footer-grid { grid-template-columns: 1.4fr 1fr 1.2fr 1.4fr; }
  .flow { flex-direction: row; align-items: stretch; }
  .flow-item { flex: 1; }
  .flow-item:not(:last-child)::after { content: "→"; left: auto; right: -1.15rem; bottom: auto; top: 50%; transform: translateY(-50%); z-index: 2; background: var(--blue-100); width: 1.3rem; text-align: center; }
  .contact-grid { display: grid; grid-template-columns: 1.15fr .85fr; gap: var(--s-7); align-items: start; }
}
@media (min-width: 1100px) {
  .nav-toggle { display: none; }
  .primary-nav {
    position: static; display: flex; flex-direction: row; align-items: center; background: none; border: 0;
    padding: 0; gap: var(--s-1); max-height: none; overflow: visible;
  }
  .primary-nav a { border: 0; padding: .55rem .8rem; border-radius: 6px; font-size: .94rem; }
  .primary-nav a[aria-current="page"] { box-shadow: none; padding-left: .8rem; background: rgba(255,255,255,.1); }
  .primary-nav .btn { display: none; }
  .header-cta { display: inline-flex; padding: .65rem 1.2rem; }
  .header-right { display: flex; align-items: center; gap: var(--s-4); }
}
@media (max-width: 1099px) { .header-right .header-cta { display: none; } }
@media (min-width: 1100px) { .header-right { flex: 1; justify-content: flex-end; } }

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .reveal { opacity: 1; transform: none; transition: none; }
  .btn, .card, .wa-float { transition: none; }
}
@media print {
  .site-header, .wa-float, .cta-band { display: none; }
}
