/* ============================================================
   Openflow Group — US Website
   Dark professional theme
   ============================================================ */

:root {
  --bg: #0a0a0f;
  --bg-soft: #111118;
  --bg-card: #15151e;
  --border: #23232f;
  --text: #f2f2f5;
  --text-muted: #9a9aa8;
  --accent: #f06314;       /* Openflow brand orange, sampled from the logo */
  --accent-soft: #f58b4a;
  --accent-glow: rgba(240, 99, 20, 0.22);
  --radius: 14px;
  --font-display: 'Space Grotesk', sans-serif;
  --font-body: 'Inter', sans-serif;
  --container: 1180px;
}

* { margin: 0; padding: 0; box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  font-family: var(--font-body);
  background: var(--bg);
  color: var(--text);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

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

.container {
  max-width: var(--container);
  margin: 0 auto;
  padding: 0 24px;
}

.section { padding: 96px 0; }

/* ============ Section heads ============ */
.section__head { max-width: 720px; margin-bottom: 56px; }

.section__tag {
  display: inline-block;
  font-size: 0.8rem;
  font-weight: 600;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--accent-soft);
  border: 1px solid var(--border);
  border-radius: 999px;
  padding: 6px 16px;
  margin-bottom: 20px;
}

.section__title {
  font-family: var(--font-display);
  font-size: clamp(1.8rem, 4vw, 2.6rem);
  font-weight: 600;
  line-height: 1.2;
}

.section__lead {
  margin-top: 16px;
  color: var(--text-muted);
  font-size: 1.05rem;
}

/* ============ Header ============ */
.header {
  position: fixed;
  inset: 0 0 auto 0;
  z-index: 100;
  background: rgba(10, 10, 15, 0.75);
  backdrop-filter: blur(14px);
  border-bottom: 1px solid transparent;
  transition: border-color 0.3s;
}

.header.is-scrolled { border-bottom-color: var(--border); }

.header__inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 72px;
}

.logo {
  display: inline-flex;
  align-items: center;
  font-family: var(--font-display);
  font-size: 1.35rem;
  font-weight: 700;
  letter-spacing: -0.02em;
}

.logo span { color: var(--accent); }

.logo__img { height: 34px; width: auto; }
.logo__img--footer { height: 28px; }

.nav { display: flex; align-items: center; gap: 32px; }

.nav__link {
  font-size: 0.95rem;
  font-weight: 500;
  color: var(--text-muted);
  transition: color 0.2s;
}

.nav__link:hover { color: var(--text); }

.nav__link--cta {
  color: var(--text);
  background: var(--accent);
  padding: 9px 22px;
  border-radius: 999px;
  transition: background 0.2s;
}

.nav__link--cta:hover { background: var(--accent-soft); }

.nav-toggle {
  display: none;
  flex-direction: column;
  gap: 5px;
  background: none;
  border: none;
  cursor: pointer;
  padding: 8px;
}

.nav-toggle span {
  width: 24px;
  height: 2px;
  background: var(--text);
  border-radius: 2px;
  transition: transform 0.25s, opacity 0.25s;
}

/* ============ Hero ============ */
.hero {
  position: relative;
  min-height: 100vh;
  display: flex;
  align-items: center;
  overflow: hidden;
  padding-top: 72px;
}

.hero__glow {
  position: absolute;
  top: -200px;
  right: -200px;
  width: 700px;
  height: 700px;
  background: radial-gradient(circle, var(--accent-glow), transparent 65%);
  pointer-events: none;
}

.hero__content { position: relative; }

.hero__title {
  font-family: var(--font-display);
  line-height: 1.05;
  margin-bottom: 28px;
}

.hero__open {
  display: block;
  font-size: clamp(4rem, 14vw, 10rem);
  font-weight: 700;
  letter-spacing: 0.02em;
  background: linear-gradient(120deg, var(--text) 30%, var(--accent-soft));
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
}

.hero__flow {
  display: block;
  font-size: clamp(1.4rem, 3.4vw, 2.4rem);
  font-weight: 500;
  color: var(--text-muted);
  max-width: 640px;
}

.hero__subtitle {
  max-width: 600px;
  color: var(--text-muted);
  font-size: 1.1rem;
  margin-bottom: 40px;
}

.hero__actions { display: flex; gap: 16px; flex-wrap: wrap; }

.btn {
  display: inline-block;
  font-weight: 600;
  font-size: 1rem;
  padding: 14px 34px;
  border-radius: 999px;
  transition: background 0.2s, border-color 0.2s, transform 0.2s;
}

.btn:hover { transform: translateY(-2px); }

.btn--primary { background: var(--accent); color: #fff; }
.btn--primary:hover { background: var(--accent-soft); }

.btn--ghost {
  border: 1px solid var(--border);
  color: var(--text);
}

.btn--ghost:hover { border-color: var(--accent); }

/* ============ Clients ============ */
.clients { padding-top: 40px; padding-bottom: 40px; }

.clients__label {
  text-align: center;
  font-size: 0.85rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--text-muted);
  margin-bottom: 32px;
}

/* ============ Logo marquee (infinite scrolling carousel) ============ */
.marquee {
  overflow: hidden;
  position: relative;
  /* fade the edges */
  -webkit-mask-image: linear-gradient(to right, transparent, #000 8%, #000 92%, transparent);
  mask-image: linear-gradient(to right, transparent, #000 8%, #000 92%, transparent);
}

.marquee__track {
  display: flex;
  align-items: center;
  width: max-content;
  padding: 8px 0;
  animation: marquee-scroll 38s linear infinite;
}

.marquee--reverse .marquee__track {
  animation-direction: reverse;
  animation-duration: 32s;
}

.marquee:hover .marquee__track { animation-play-state: paused; }

.marquee__logo {
  height: 44px;
  width: auto;
  flex-shrink: 0;
  margin-right: 72px; /* margin (not flex gap) so each half of the track has identical width for a seamless loop */
  opacity: 0.75;
  filter: grayscale(35%);
  transition: opacity 0.2s, filter 0.2s;
}

.marquee__logo:hover { opacity: 1; filter: none; }

@keyframes marquee-scroll {
  from { transform: translateX(0); }
  to   { transform: translateX(-50%); }
}

@media (prefers-reduced-motion: reduce) {
  .marquee__track { animation: none; flex-wrap: wrap; justify-content: center; width: 100%; }
}

/* ============ Metrics ============ */
.metrics { padding-top: 56px; padding-bottom: 56px; }

.metrics__grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 32px;
  text-align: center;
  border-top: 1px solid var(--border);
  border-bottom: 1px solid var(--border);
  padding: 56px 0;
}

.metric__number,
.metric__plus {
  font-family: var(--font-display);
  font-size: clamp(2.4rem, 6vw, 4rem);
  font-weight: 700;
  color: var(--accent-soft);
}

.metric__label {
  margin-top: 8px;
  color: var(--text-muted);
  font-size: 1rem;
}

/* ============ Specialties ============ */
.specialties__grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 20px;
}

@media (max-width: 1100px) {
  .specialties__grid { grid-template-columns: repeat(3, 1fr); }
}

.card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 32px 28px;
  transition: border-color 0.25s, transform 0.25s;
}

.card:hover {
  border-color: var(--accent);
  transform: translateY(-4px);
}

.card__index {
  font-family: var(--font-display);
  font-size: 0.9rem;
  font-weight: 600;
  color: var(--accent-soft);
}

.card__title {
  font-family: var(--font-display);
  font-size: 1.25rem;
  font-weight: 600;
  margin: 14px 0 10px;
}

.card__text {
  color: var(--text-muted);
  font-size: 0.95rem;
}

/* ============ Framework ============ */
.framework { background: var(--bg-soft); }

.framework__grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 24px;
}

.pillar {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 40px 36px;
}

.pillar__badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 64px;
  height: 64px;
  border-radius: 18px;
  background: var(--accent-glow);
  color: var(--accent-soft);
  font-family: var(--font-display);
  font-size: 1.4rem;
  font-weight: 700;
  margin-bottom: 24px;
}

.pillar__title {
  font-family: var(--font-display);
  font-size: 1.5rem;
  font-weight: 600;
  margin-bottom: 14px;
}

.pillar__text { color: var(--text-muted); }

/* ============ Testimonials ============ */
.testimonials { background: var(--bg-soft); }

.testimonials__grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 24px;
}

.quote {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 36px 32px;
  display: flex;
  flex-direction: column;
  gap: 24px;
}

.quote__text {
  font-size: 1.1rem;
  line-height: 1.7;
  color: var(--text);
}

.quote__author {
  display: flex;
  align-items: center;
  gap: 16px;
  margin-top: auto;
}

.quote__photo {
  width: 56px;
  height: 56px;
  border-radius: 50%;
  object-fit: cover;
  border: 2px solid var(--accent);
}

.quote__meta { display: flex; flex-direction: column; }
.quote__meta strong { font-weight: 600; }
.quote__meta span { color: var(--text-muted); font-size: 0.9rem; }

/* ============ Latin America dot map ============ */
.latam { background: var(--bg-soft); }

.latam__grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 56px;
  align-items: center;
}

.latam__list {
  list-style: none;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
  margin-top: 36px;
}

.latam__item {
  display: flex;
  align-items: center;
  gap: 12px;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 12px 16px;
  cursor: default;
  transition: border-color 0.2s, transform 0.2s;
}

.latam__item:hover {
  border-color: var(--accent);
  transform: translateX(4px);
}

.latam__flag { font-size: 1.35rem; line-height: 1; }

.latam__item strong { font-weight: 600; font-size: 0.95rem; }

.latam__badge {
  margin-left: auto;
  font-size: 0.7rem;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--accent-soft);
  background: var(--accent-glow);
  border-radius: 999px;
  padding: 3px 10px;
  white-space: nowrap;
}

.latam__map { display: flex; justify-content: center; }

.latam__svg { width: 100%; max-width: 460px; height: auto; }

.map-dot { fill: #262633; }

.map-dot--active {
  fill: var(--accent);
  transition: opacity 0.25s;
}

/* When a country is hovered in the list, dim the others */
.latam__svg.is-focused .map-dot--active:not(.is-current) { opacity: 0.25; }

.map-pin {
  fill: var(--accent);
  stroke: #fff;
  stroke-width: 2;
}

.map-pulse {
  fill: none;
  stroke: var(--accent);
  stroke-width: 2;
  transform-box: fill-box;
  transform-origin: center;
  animation: map-pulse 2.4s ease-out infinite;
}

@keyframes map-pulse {
  0%   { transform: scale(1);   opacity: 0.9; }
  100% { transform: scale(2.4); opacity: 0; }
}

.map-label {
  fill: var(--text);
  font-family: var(--font-display);
  font-size: 17px;
  font-weight: 600;
  paint-order: stroke;
  stroke: var(--bg-soft);
  stroke-width: 6px;
  stroke-linejoin: round;
}

@media (max-width: 900px) {
  .latam__grid { grid-template-columns: 1fr; gap: 40px; }
  .latam__map { order: -1; }
}

@media (prefers-reduced-motion: reduce) {
  .map-pulse { animation: none; opacity: 0.5; }
}

/* ============ Global / Brazil card ============ */
.brazil-card {
  position: relative;
  display: grid;
  grid-template-columns: 1.4fr 1fr;
  align-items: center;
  gap: 32px;
  overflow: hidden;
  background: linear-gradient(135deg, var(--bg-card) 40%, rgba(240, 99, 20, 0.12));
  border: 1px solid var(--border);
  border-radius: 24px;
  padding: 56px;
  transition: border-color 0.3s, transform 0.3s;
}

.brazil-card:hover {
  border-color: var(--accent);
  transform: translateY(-4px);
}

.brazil-card__glow {
  position: absolute;
  right: -120px;
  top: -120px;
  width: 420px;
  height: 420px;
  background: radial-gradient(circle, var(--accent-glow), transparent 65%);
  pointer-events: none;
}

.brazil-card__content { position: relative; }

.brazil-card__badge {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: 0.8rem;
  font-weight: 600;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--accent-soft);
  border: 1px solid var(--border);
  border-radius: 999px;
  padding: 6px 16px;
  margin-bottom: 24px;
}

.brazil-card__title {
  font-family: var(--font-display);
  font-size: clamp(1.7rem, 3.6vw, 2.4rem);
  font-weight: 600;
  line-height: 1.15;
  margin-bottom: 16px;
}

.brazil-card__text {
  color: var(--text-muted);
  max-width: 480px;
  margin-bottom: 28px;
}

.brazil-card__cta {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-weight: 600;
  font-size: 1.05rem;
  color: var(--accent-soft);
  transition: gap 0.25s;
}

.brazil-card:hover .brazil-card__cta { gap: 16px; }

/* Concentric rings visual with BR mark */
.brazil-card__visual {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 240px;
}

.brazil-card__flag {
  position: relative;
  z-index: 2;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 92px;
  height: 92px;
  border-radius: 50%;
  background: var(--accent);
  color: #fff;
  font-family: var(--font-display);
  font-size: 1.6rem;
  font-weight: 700;
  letter-spacing: 0.04em;
  box-shadow: 0 0 60px var(--accent-glow);
}

.brazil-card__ring {
  position: absolute;
  border: 1px solid rgba(240, 99, 20, 0.35);
  border-radius: 50%;
  width: 160px;
  height: 160px;
  animation: ring-pulse 3.2s ease-out infinite;
}

.brazil-card__ring--2 { width: 230px; height: 230px; animation-delay: 0.5s; }
.brazil-card__ring--3 { width: 300px; height: 300px; animation-delay: 1s; }

@keyframes ring-pulse {
  0%   { transform: scale(0.92); opacity: 0.2; }
  50%  { opacity: 0.7; }
  100% { transform: scale(1.06); opacity: 0.1; }
}

@media (max-width: 900px) {
  .brazil-card { grid-template-columns: 1fr; padding: 40px 28px; }
  .brazil-card__visual { min-height: 220px; }
}

@media (prefers-reduced-motion: reduce) {
  .brazil-card__ring { animation: none; opacity: 0.4; }
}

/* ============ Contact ============ */
.contact__grid {
  display: grid;
  grid-template-columns: 1fr 1.2fr;
  gap: 40px;
  align-items: stretch;
}

.contact__info {
  display: flex;
  flex-direction: column;
  gap: 28px;
}

.contact__label {
  display: block;
  font-size: 0.8rem;
  font-weight: 600;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--accent-soft);
  margin-bottom: 6px;
}

.contact__value {
  font-size: 1.1rem;
  font-weight: 500;
  font-style: normal;
  transition: color 0.2s;
}

a.contact__value:hover { color: var(--accent-soft); }

.contact__address { color: var(--text-muted); line-height: 1.7; }

.contact__social { display: flex; gap: 20px; }

.contact__social a {
  font-weight: 500;
  color: var(--text-muted);
  border-bottom: 1px solid var(--border);
  transition: color 0.2s, border-color 0.2s;
}

.contact__social a:hover { color: var(--text); border-color: var(--accent); }

/* Map placeholder — replaced later by the Google Maps iframe */
.contact__map {
  min-height: 380px;
  border: 1px dashed var(--border);
  border-radius: var(--radius);
  overflow: hidden;
  background: var(--bg-card);
}

.contact__map iframe { width: 100%; height: 100%; min-height: 380px; border: 0; }

.map-placeholder {
  height: 100%;
  min-height: 380px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  gap: 12px;
  padding: 32px;
  color: var(--text-muted);
}

.map-placeholder__icon { color: var(--accent-soft); }

.map-placeholder__title {
  font-family: var(--font-display);
  font-size: 1.15rem;
  font-weight: 600;
  color: var(--text);
}

.map-placeholder__text { font-size: 0.95rem; max-width: 320px; }

/* ============ Footer ============ */
.footer {
  border-top: 1px solid var(--border);
  padding: 40px 0;
}

.footer__inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  flex-wrap: wrap;
}

.logo--footer { font-size: 1.15rem; }

.footer__copy { color: var(--text-muted); font-size: 0.9rem; }

.footer__social { display: flex; gap: 20px; }

.footer__social a {
  color: var(--text-muted);
  font-size: 0.9rem;
  transition: color 0.2s;
}

.footer__social a:hover { color: var(--text); }

/* ============ Reveal animation ============ */
.reveal {
  opacity: 0;
  transform: translateY(24px);
  transition: opacity 0.6s ease, transform 0.6s ease;
}

.reveal.is-visible {
  opacity: 1;
  transform: none;
}

/* ============ Responsive ============ */
@media (max-width: 900px) {
  .specialties__grid { grid-template-columns: repeat(2, 1fr); }
  .framework__grid,
  .testimonials__grid,
  .contact__grid { grid-template-columns: 1fr; }
}

@media (max-width: 680px) {
  .section { padding: 64px 0; }

  .nav {
    position: fixed;
    top: 72px;
    left: 0;
    right: 0;
    flex-direction: column;
    align-items: flex-start;
    gap: 0;
    background: var(--bg-soft);
    border-bottom: 1px solid var(--border);
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.3s ease;
  }

  .nav.is-open { max-height: 360px; }

  .nav__link {
    width: 100%;
    padding: 16px 24px;
    border-top: 1px solid var(--border);
  }

  .nav__link--cta {
    background: none;
    color: var(--accent-soft);
    border-radius: 0;
  }

  .nav-toggle { display: flex; }

  .nav-toggle.is-open span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
  .nav-toggle.is-open span:nth-child(2) { opacity: 0; }
  .nav-toggle.is-open span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

  .specialties__grid { grid-template-columns: 1fr; }
  .metrics__grid { grid-template-columns: 1fr; gap: 40px; }
}
