/* ==========================================================================
   GEOMASTER — Design System
   Grounded in the subject: electrical-resistivity surveying reads the earth
   in strata; the site borrows that visual grammar (banded layers, a probe
   line, data set in mono type) instead of generic SaaS gradients.
   ========================================================================== */

:root {
  /* Color — 6 named tokens */
  --ink: #062A42;          /* brand-blue-deepest — text, headlines */
  --blue: #0B3D66;         /* brand-blue-deep — primary accent, links, CTA */
  --blue-soft: #4E7796;    /* tints of blue for secondary text on dark */
  --emerald: #0FA968;      /* secondary accent — used sparingly */
  --sand: #C9A876;         /* tertiary warm accent — eyebrows, dividers */
  --paper: #F7F9F8;        /* page background — cool off-white, not cream */
  --paper-deep: #EDF2F0;   /* alternating section background */
  --white: #FFFFFF;

  --line: rgba(6, 42, 66, 0.12);
  --line-soft: rgba(6, 42, 66, 0.07);
  --shadow-1: 0 1px 2px rgba(6, 42, 66, 0.06);
  --shadow-2: 0 12px 32px -12px rgba(6, 42, 66, 0.18);

  /* Type */
  --f-display: 'Bricolage Grotesque', 'Segoe UI', system-ui, sans-serif;
  --f-body: 'Figtree', 'Segoe UI', system-ui, sans-serif;
  --f-mono: 'IBM Plex Mono', 'SFMono-Regular', Consolas, monospace;
  --f-arabic: 'IBM Plex Sans Arabic', 'Segoe UI', Tahoma, sans-serif;

  /* Rhythm */
  --container: 1180px;
  --gap: clamp(1.25rem, 3vw, 2.5rem);
  --section-pad: clamp(4rem, 9vw, 8rem);
  --radius: 18px;
  --radius-sm: 10px;

  --ease: cubic-bezier(0.16, 1, 0.3, 1);
}

/* ---------- Reset ---------- */
*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; }
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { animation-duration: 0.001ms !important; animation-iteration-count: 1 !important; transition-duration: 0.001ms !important; scroll-behavior: auto !important; }
}
body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: var(--f-body);
  font-size: 16px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}
html[dir="rtl"] body { font-family: var(--f-arabic); }
img { max-width: 100%; display: block; }
a { color: inherit; text-decoration: none; }
ul { list-style: none; margin: 0; padding: 0; }
h1, h2, h3, h4 { font-family: var(--f-display); font-weight: 700; margin: 0; letter-spacing: -0.01em; }
p { margin: 0; }
button { font: inherit; cursor: pointer; }
input, textarea, select { font: inherit; }

/* Visible keyboard focus everywhere */
a:focus-visible, button:focus-visible, input:focus-visible, textarea:focus-visible, select:focus-visible, summary:focus-visible {
  outline: 2px solid var(--emerald);
  outline-offset: 3px;
  border-radius: 4px;
}

.skip-link {
  position: absolute; left: -999px; top: 0; z-index: 200;
  background: var(--ink); color: var(--white); padding: 0.8rem 1.2rem; border-radius: 0 0 8px 0;
}
.skip-link:focus { left: 0; }

/* ---------- Layout primitives ---------- */
.container { max-width: var(--container); margin-inline: auto; padding-inline: clamp(1.25rem, 4vw, 2.5rem); }
.section { padding-block: var(--section-pad); }
.section--alt { background: var(--paper-deep); }
.section-head { max-width: 640px; margin-bottom: clamp(2.5rem, 5vw, 4rem); }
.eyebrow {
  font-family: var(--f-mono); font-size: 0.78rem; letter-spacing: 0.14em; text-transform: uppercase;
  color: var(--sand); display: flex; align-items: center; gap: 0.6em; margin-bottom: 1rem;
}
.eyebrow::before { content: ""; width: 22px; height: 1px; background: var(--sand); display: inline-block; }
html[dir="rtl"] .eyebrow::before { display: none; }
h2.h-title { font-size: clamp(1.9rem, 3.4vw, 2.7rem); line-height: 1.15; }
.lede { font-size: clamp(1.02rem, 1.6vw, 1.18rem); color: var(--blue-soft); margin-top: 1rem; max-width: 54ch; }

.grid { display: grid; gap: var(--gap); }
.grid-2 { grid-template-columns: repeat(2, 1fr); }
.grid-3 { grid-template-columns: repeat(3, 1fr); }
.grid-4 { grid-template-columns: repeat(4, 1fr); }
@media (max-width: 900px) { .grid-3, .grid-4 { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 620px) { .grid-2, .grid-3, .grid-4 { grid-template-columns: 1fr; } }

.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 0.55em;
  padding: 0.95rem 1.6rem; border-radius: 999px; font-weight: 600; font-size: 0.98rem;
  border: 1px solid transparent; transition: transform 0.35s var(--ease), background 0.25s, box-shadow 0.25s;
  white-space: nowrap;
}
.btn:hover { transform: translateY(-2px); }
.btn-primary { background: var(--ink); color: var(--white); box-shadow: var(--shadow-2); }
.btn-primary:hover { background: var(--blue); }
.btn-whatsapp { background: var(--emerald); color: var(--white); }
.btn-whatsapp:hover { background: #0b8f57; }
.btn-ghost { background: transparent; color: var(--ink); border-color: var(--line); }
.btn-ghost:hover { border-color: var(--ink); }
.btn-sm { padding: 0.65rem 1.1rem; font-size: 0.88rem; }

.card {
  background: var(--white); border: 1px solid var(--line-soft); border-radius: var(--radius);
  padding: clamp(1.5rem, 3vw, 2.1rem);
}

/* ---------- reveal-on-scroll (subtle, orchestrated once per element) ---------- */
.reveal { opacity: 0; transform: translateY(14px); transition: opacity 0.7s var(--ease), transform 0.7s var(--ease); }
.reveal.is-visible { opacity: 1; transform: none; }

/* ==========================================================================
   Utility bar + Header
   ========================================================================== */
.utility-bar {
  background: var(--ink); color: rgba(255,255,255,0.82); font-size: 0.82rem;
}
.utility-bar .container { display: flex; align-items: center; justify-content: space-between; padding-block: 0.55rem; gap: 1rem; }
.utility-bar a { opacity: 0.9; }
.utility-bar a:hover { opacity: 1; color: var(--sand); }
.utility-left, .utility-right { display: flex; align-items: center; gap: 1.3rem; flex-wrap: wrap; }
.utility-right { gap: 0.85rem; }
.utility-right svg { width: 15px; height: 15px; }
@media (max-width: 720px) { .utility-left span:first-child { display: none; } }

header.site-header {
  position: sticky; top: 0; z-index: 100; background: rgba(247,249,248,0.86);
  backdrop-filter: blur(10px); -webkit-backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--line-soft);
}
.nav-row { display: flex; align-items: center; justify-content: space-between; padding-block: 0.9rem; gap: 1.5rem; }
.brand { display: flex; align-items: center; gap: 0.65rem; font-family: var(--f-display); font-weight: 700; font-size: 1.18rem; color: var(--ink); }
.brand img { width: 34px; height: 34px; }
.brand small { display: block; font-family: var(--f-mono); font-weight: 400; font-size: 0.62rem; letter-spacing: 0.08em; color: var(--sand); text-transform: uppercase; }
.main-nav { display: flex; gap: clamp(1rem, 2vw, 2rem); align-items: center; }
.main-nav a { font-size: 0.94rem; font-weight: 500; color: var(--ink); opacity: 0.82; padding-block: 0.3rem; position: relative; }
.main-nav a:hover { opacity: 1; }
.main-nav a::after { content: ""; position: absolute; left: 0; bottom: -2px; width: 0; height: 2px; background: var(--emerald); transition: width 0.3s var(--ease); }
.main-nav a:hover::after { width: 100%; }
.nav-right { display: flex; align-items: center; gap: 1rem; }
.lang-switch { display: flex; border: 1px solid var(--line); border-radius: 999px; overflow: hidden; }
.lang-switch button { background: none; border: 0; padding: 0.4rem 0.7rem; font-family: var(--f-mono); font-size: 0.78rem; color: var(--ink); opacity: 0.6; }
.lang-switch button.active { background: var(--ink); color: var(--white); opacity: 1; }
.nav-toggle { display: none; background: none; border: 0; }
@media (max-width: 880px) {
  .main-nav { position: fixed; inset: 64px 0 0 0; background: var(--paper); flex-direction: column; padding: 2rem 1.5rem; gap: 1.5rem; transform: translateY(-8px); opacity: 0; pointer-events: none; transition: opacity 0.25s var(--ease), transform 0.25s var(--ease); }
  .main-nav.open { opacity: 1; transform: none; pointer-events: auto; }
  .nav-toggle { display: block; }
  .main-nav a { font-size: 1.15rem; }
}

/* ==========================================================================
   Hero — signature stratigraphy motif
   ========================================================================== */
.hero { position: relative; overflow: hidden; padding-top: clamp(3.5rem, 8vw, 6rem); }
.hero-inner { position: relative; z-index: 2; max-width: 760px; }
.hero h1 { font-size: clamp(2.3rem, 5.4vw, 4.1rem); line-height: 1.06; color: var(--ink); }
.hero h1 em { font-style: normal; color: var(--blue); }
.hero .lede { max-width: 56ch; }
.hero-cta { display: flex; gap: 1rem; margin-top: 2.2rem; flex-wrap: wrap; }
.hero-stats { display: flex; gap: clamp(1.5rem, 4vw, 3.2rem); margin-top: clamp(3rem, 7vw, 4.5rem); flex-wrap: wrap; padding-top: 2rem; border-top: 1px solid var(--line); }
.stat b { display: block; font-family: var(--f-mono); font-size: clamp(1.3rem, 2.4vw, 1.7rem); color: var(--ink); }
.stat span { font-size: 0.85rem; color: var(--blue-soft); }

.strata { position: absolute; inset: auto 0 0 0; height: 46%; z-index: 1; pointer-events: none; }
.strata svg { width: 100%; height: 100%; display: block; }
.probe-line { transform-origin: top; animation: probe-drop 2.6s var(--ease) 0.3s both; }
@keyframes probe-drop { from { transform: scaleY(0); opacity: 0; } to { transform: scaleY(1); opacity: 1; } }
@media (prefers-reduced-motion: reduce) { .probe-line { animation: none; } }

/* ==========================================================================
   Services
   ========================================================================== */
.svc-card { position: relative; transition: transform 0.4s var(--ease), box-shadow 0.4s var(--ease); }
.svc-card:hover { transform: translateY(-4px); box-shadow: var(--shadow-2); }
.svc-num { font-family: var(--f-mono); font-size: 0.78rem; color: var(--sand); }
.svc-card h3 { font-size: 1.15rem; margin-block: 0.6rem 0.5rem; }
.svc-card p { color: var(--blue-soft); font-size: 0.94rem; }

/* ==========================================================================
   Method — real sequence, numbers carry meaning
   ========================================================================== */
.method-list { display: flex; flex-direction: column; }
.method-item { display: grid; grid-template-columns: 84px 1fr; gap: clamp(1rem, 3vw, 2.2rem); padding-block: clamp(1.4rem, 3vw, 2rem); border-top: 1px solid var(--line); }
.method-item:last-child { border-bottom: 1px solid var(--line); }
.method-num { font-family: var(--f-mono); font-size: 1.5rem; color: var(--sand); }
.method-item h3 { font-size: 1.15rem; margin-bottom: 0.4rem; }
.method-item p { color: var(--blue-soft); max-width: 62ch; }
@media (max-width: 620px) { .method-item { grid-template-columns: 44px 1fr; } .method-num { font-size: 1.1rem; } }

/* ==========================================================================
   Trust strip
   ========================================================================== */
.trust-item { display: flex; gap: 0.9rem; }
.trust-mark { flex: none; width: 30px; height: 30px; border-radius: 50%; background: var(--ink); color: var(--white); display: flex; align-items: center; justify-content: center; font-size: 0.85rem; }
.trust-item h3 { font-size: 1.02rem; margin-bottom: 0.3rem; }
.trust-item p { color: var(--blue-soft); font-size: 0.92rem; }

/* ==========================================================================
   Carte de visite (digital business card)
   ========================================================================== */
.card-section .container { display: grid; grid-template-columns: 1.05fr 0.95fr; gap: clamp(2rem, 5vw, 4rem); align-items: center; }
@media (max-width: 900px) { .card-section .container { grid-template-columns: 1fr; } }
.biz-card {
  background: linear-gradient(165deg, var(--ink), var(--blue));
  border-radius: 22px; padding: clamp(1.8rem, 4vw, 2.6rem); color: var(--white); position: relative; overflow: hidden;
  box-shadow: var(--shadow-2);
}
.biz-card::after {
  content: ""; position: absolute; left: 0; right: 0; bottom: 0; height: 40%;
  background: linear-gradient(180deg, transparent, rgba(201,168,118,0.16) 40%, rgba(15,169,104,0.14) 70%, rgba(6,42,66,0.3));
}
.biz-top { display: flex; align-items: center; gap: 0.7rem; position: relative; z-index: 1; }
.biz-top img { width: 40px; height: 40px; }
.biz-top b { font-family: var(--f-display); font-size: 1.15rem; }
.biz-top small { display: block; font-family: var(--f-mono); font-size: 0.62rem; letter-spacing: 0.08em; color: var(--sand); text-transform: uppercase; }
.biz-name { margin-top: clamp(1.6rem, 4vw, 2.4rem); position: relative; z-index: 1; }
.biz-name b { font-size: 1.3rem; font-family: var(--f-display); }
.biz-name span { display: block; color: var(--emerald); font-size: 0.82rem; letter-spacing: 0.06em; text-transform: uppercase; margin-top: 0.25rem; }
.biz-rows { margin-top: 1.4rem; display: flex; flex-direction: column; gap: 0.55rem; position: relative; z-index: 1; }
.biz-rows a { font-family: var(--f-mono); font-size: 0.92rem; color: rgba(255,255,255,0.92); display: flex; gap: 0.6em; }
.biz-rows a span:first-child { color: var(--sand); width: 4.2em; flex: none; }
.dl-buttons { display: flex; flex-direction: column; gap: 0.7rem; margin-top: 1.4rem; }
.dl-btn {
  display: flex; align-items: center; gap: 0.9rem; padding: 0.85rem 1.1rem;
  background: var(--white); border: 1px solid var(--line); border-radius: var(--radius-sm);
  font-weight: 600; font-size: 0.94rem; color: var(--ink);
  transition: transform 0.3s var(--ease), border-color 0.3s, box-shadow 0.3s;
}
.dl-btn:hover { transform: translateY(-2px) translateX(2px); border-color: var(--emerald); box-shadow: var(--shadow-1); }
.dl-icon { flex: none; width: 38px; height: 38px; border-radius: 50%; background: var(--paper-deep); color: var(--blue); display: flex; align-items: center; justify-content: center; }
.dl-icon svg { width: 19px; height: 19px; }
.dl-btn:hover .dl-icon { background: var(--emerald); color: var(--white); }
html[dir="rtl"] .dl-btn:hover { transform: translateY(-2px) translateX(-2px); }

/* ==========================================================================
   Zones
   ========================================================================== */
.zones-chip { display: inline-flex; padding: 0.45rem 0.9rem; border: 1px solid var(--line); border-radius: 999px; font-size: 0.85rem; margin: 0.25rem; }
.zones-wrap { display: flex; flex-wrap: wrap; margin: -0.25rem; }
.zones-note { margin-top: 1.6rem; font-size: 0.95rem; color: var(--blue-soft); }

/* ==========================================================================
   FAQ
   ========================================================================== */
.faq-item { border-top: 1px solid var(--line); }
.faq-item:last-child { border-bottom: 1px solid var(--line); }
.faq-item summary { cursor: pointer; list-style: none; display: flex; justify-content: space-between; align-items: center; gap: 1rem; padding-block: 1.3rem; font-weight: 600; font-family: var(--f-display); font-size: 1.02rem; }
.faq-item summary::-webkit-details-marker { display: none; }
.faq-plus { flex: none; font-family: var(--f-mono); color: var(--sand); transition: transform 0.3s var(--ease); }
.faq-item[open] .faq-plus { transform: rotate(45deg); }
.faq-item p { padding-bottom: 1.3rem; color: var(--blue-soft); max-width: 68ch; }

/* ==========================================================================
   Contact + form
   ========================================================================== */
.contact-grid { display: grid; grid-template-columns: 0.9fr 1.1fr; gap: clamp(2rem, 5vw, 4rem); }
@media (max-width: 900px) { .contact-grid { grid-template-columns: 1fr; } }
.contact-rows a { display: flex; gap: 0.8rem; align-items: center; padding-block: 0.9rem; border-top: 1px solid var(--line); font-size: 0.98rem; }
.contact-rows a:first-child { border-top: 0; }
.contact-rows svg { width: 18px; height: 18px; color: var(--sand); flex: none; }
.map-frame { margin-top: 1.6rem; border-radius: var(--radius-sm); overflow: hidden; border: 1px solid var(--line); }
.map-frame iframe { width: 100%; height: 220px; border: 0; display: block; }

.field { margin-bottom: 1.1rem; }
.field label { display: block; font-size: 0.85rem; margin-bottom: 0.4rem; color: var(--ink); font-weight: 600; }
.field input, .field textarea {
  width: 100%; padding: 0.85rem 1rem; border: 1px solid var(--line); border-radius: var(--radius-sm);
  background: var(--white); color: var(--ink); transition: border-color 0.25s;
}
.field input:focus, .field textarea:focus { border-color: var(--blue); }
.field-row { display: grid; grid-template-columns: 1fr 1fr; gap: 1rem; }
@media (max-width: 560px) { .field-row { grid-template-columns: 1fr; } }
.hp { position: absolute; left: -9999px; }
.form-note { font-size: 0.82rem; color: var(--blue-soft); margin-top: 0.9rem; }

/* ==========================================================================
   Social + Footer
   ========================================================================== */
.social-row { display: flex; gap: 0.8rem; }
.social-row a {
  width: 42px; height: 42px; border-radius: 50%; border: 1px solid var(--line); display: flex; align-items: center; justify-content: center;
  transition: transform 0.3s var(--ease), border-color 0.3s;
}
.social-row a:hover { transform: translateY(-3px); border-color: var(--ink); }
.social-row svg { width: 19px; height: 19px; }

footer.site-footer { background: var(--ink); color: rgba(255,255,255,0.72); }
footer.site-footer .container { padding-block: clamp(3rem, 6vw, 4.5rem) 2rem; }
.footer-top { display: grid; grid-template-columns: 1.3fr 0.9fr 0.9fr 1fr; gap: 2.5rem; }
@media (max-width: 860px) { .footer-top { grid-template-columns: 1fr 1fr; } }
@media (max-width: 560px) { .footer-top { grid-template-columns: 1fr; } }
.footer-brand { display: flex; align-items: center; gap: 0.6rem; font-family: var(--f-display); font-weight: 700; color: var(--white); font-size: 1.1rem; }
.footer-brand img { width: 30px; height: 30px; }
footer .foot-col h4 { font-family: var(--f-mono); font-size: 0.76rem; letter-spacing: 0.1em; text-transform: uppercase; color: var(--sand); margin-bottom: 1rem; }
footer .foot-col a, footer .foot-col p { display: block; font-size: 0.9rem; margin-bottom: 0.65rem; color: rgba(255,255,255,0.72); }
footer .foot-col a:hover { color: var(--white); }
footer .social-row a { border-color: rgba(255,255,255,0.18); }
footer .social-row a:hover { border-color: var(--white); }
footer .social-row svg { color: var(--white); }
.footer-bottom { border-top: 1px solid rgba(255,255,255,0.14); margin-top: 2.6rem; padding-top: 1.6rem; display: flex; justify-content: space-between; flex-wrap: wrap; gap: 1rem; font-size: 0.82rem; }
.footer-bottom a { color: rgba(255,255,255,0.6); }
.footer-bottom a:hover { color: var(--white); }

/* WhatsApp floating button */
.wa-float { position: fixed; right: 1.3rem; bottom: 1.3rem; z-index: 90; background: var(--emerald); color: var(--white); width: 58px; height: 58px; border-radius: 50%; display: flex; align-items: center; justify-content: center; box-shadow: var(--shadow-2); transition: transform 0.3s var(--ease); }
.wa-float:hover { transform: scale(1.08); }
.wa-float svg { width: 27px; height: 27px; }
html[dir="rtl"] .wa-float { right: auto; left: 1.3rem; }

/* RTL adjustments */
html[dir="rtl"] .eyebrow { flex-direction: row-reverse; }
html[dir="rtl"] .main-nav a::after { left: auto; right: 0; }
html[dir="rtl"] .trust-item, html[dir="rtl"] .contact-rows a, html[dir="rtl"] .biz-rows a { flex-direction: row-reverse; text-align: right; }
html[dir="rtl"] .method-item { grid-template-columns: 1fr 84px; }
html[dir="rtl"] .method-item > *:first-child { order: 2; }
html[dir="rtl"] .stat, html[dir="rtl"] .field label { text-align: right; }
