/*
Theme Name: Runtime Consulting
Theme URI: http://localhost/WP/wordpress
Author: Runtime Consulting
Description: Tema sob medida da Runtime Consulting, reproducao fiel do site "TI que simplesmente roda" (tema escuro, hero ousada).
Version: 1.2.3
Requires at least: 6.0
Tested up to: 7.0
Requires PHP: 7.4
Text Domain: runtime-consulting
*/

/* ============= Runtime Consulting - Design Tokens ============= */
/* Fonts (Montserrat + JetBrains Mono) are enqueued in functions.php with preconnect. */

:root {
  /* Brand */
  --rt-mint:        #3FBFAE;
  --rt-mint-dark:   #2E8F82;
  --rt-mint-deep:   #1F6359;
  --rt-mint-soft:   #E8F6F4;
  --rt-graphite:    #243240;
  --rt-graphite-2:  #34465A;
  --rt-ink:         #0F1820;
  --rt-amber:       #F4A14C;

  /* Surfaces */
  --bg:             #F7F8F8;
  --bg-2:           #FFFFFF;
  --bg-3:           #EEF1F2;
  --line:           #DEE3E5;
  --line-2:         #C8D0D3;
  --text:           #1A2530;
  --text-muted:     #56697A;
  --text-faint:     #8A9AA8;
}

[data-theme="dark"] {
  --bg:             #07101A;
  --bg-2:           #0E1B27;
  --bg-3:           #15263A;
  --line:           #1F3245;
  --line-2:         #2D4A66;
  --text:           #ECF3F5;
  --text-muted:     #8FA8BC;
  --text-faint:     #5A7488;
  --rt-graphite:    #ECF3F5;
  --rt-graphite-2:  #C5D5DF;
  --rt-mint-soft:   rgba(63, 191, 174, 0.10);
}

[data-theme="dark"] .btn-primary {
  background: var(--rt-mint);
  color: #06231F;
}
[data-theme="dark"] .btn-primary:hover {
  background: #4ED1BF;
  box-shadow: 0 10px 28px -10px rgba(63,191,174,.6);
}
[data-theme="dark"] .btn-ghost {
  border-color: rgba(255,255,255,.18);
  color: var(--text);
}
[data-theme="dark"] .btn-ghost:hover { border-color: var(--rt-mint); color: var(--rt-mint); }

[data-theme="dark"] .nav-logo .word {
  color: var(--text);
}
[data-theme="dark"] .nav-logo img {
  filter: brightness(1.1);
}

[data-theme="dark"] .card.hover:hover {
  border-color: var(--rt-mint);
  box-shadow: 0 24px 60px -28px rgba(63,191,174,.4);
}

[data-theme="dark"] .h1, [data-theme="dark"] .h2, [data-theme="dark"] .h3 {
  color: var(--text);
}

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

html, body {
  font-family: 'Montserrat', system-ui, sans-serif;
  background: var(--bg);
  color: var(--text);
  -webkit-font-smoothing: antialiased;
  font-feature-settings: "ss01", "cv11";
  line-height: 1.5;
}

img { max-width: 100%; display: block; }

a { color: inherit; text-decoration: none; }

button { font-family: inherit; cursor: pointer; border: none; background: none; color: inherit; }

/* ============= Typography ============= */
.eyebrow {
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--rt-mint-dark);
  display: inline-flex;
  align-items: center;
  gap: 10px;
}
.eyebrow::before {
  content: "";
  width: 28px;
  height: 1px;
  background: var(--rt-mint);
}

.h1 {
  font-family: 'Montserrat', sans-serif;
  font-weight: 900;
  font-size: clamp(40px, 6.4vw, 88px);
  line-height: 0.96;
  letter-spacing: -0.025em;
  color: var(--rt-graphite);
  text-wrap: balance;
}
.h2 {
  font-weight: 900;
  font-size: clamp(32px, 4.4vw, 56px);
  line-height: 1.02;
  letter-spacing: -0.02em;
  color: var(--rt-graphite);
  text-wrap: balance;
}
.h3 {
  font-weight: 800;
  font-size: clamp(22px, 2.2vw, 28px);
  line-height: 1.15;
  letter-spacing: -0.01em;
  color: var(--rt-graphite);
}
.lead {
  font-size: clamp(17px, 1.4vw, 20px);
  line-height: 1.55;
  color: var(--text-muted);
  text-wrap: pretty;
  max-width: 56ch;
}
.mono {
  font-family: 'JetBrains Mono', ui-monospace, monospace;
  font-feature-settings: "ss02";
}

/* ============= Buttons ============= */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 14px 22px;
  border-radius: 6px;
  font-weight: 700;
  font-size: 14px;
  letter-spacing: 0.01em;
  cursor: pointer;
  transition: transform .15s ease, background .2s ease, color .2s ease, box-shadow .2s ease;
  white-space: nowrap;
}
.btn:hover { transform: translateY(-1px); }
.btn:active { transform: translateY(0); }

.btn-primary {
  background: var(--rt-graphite);
  color: #fff;
}
.btn-primary:hover { background: var(--rt-ink); box-shadow: 0 8px 22px -8px rgba(15,24,32,.4); }

.btn-mint {
  background: var(--rt-mint);
  color: #06231F;
}
.btn-mint:hover { background: #4ED1BF; box-shadow: 0 10px 28px -10px rgba(63,191,174,.6); }

.btn-amber {
  background: var(--rt-amber);
  color: #2A1A06;
}
.btn-amber:hover { background: #F8B36A; box-shadow: 0 10px 28px -10px rgba(244,161,76,.55); }

.btn-ghost {
  background: transparent;
  color: var(--rt-graphite);
  border: 1px solid var(--line-2);
}
.btn-ghost:hover { border-color: var(--rt-graphite); }

.btn svg { width: 16px; height: 16px; }

/* ============= Layout ============= */
.container {
  width: 100%;
  max-width: 1280px;
  margin: 0 auto;
  padding: 0 32px;
}
@media (max-width: 720px) { .container { padding: 0 20px; } }

section { position: relative; }

/* ============= Hex motif ============= */
.hex-grid {
  position: absolute;
  inset: 0;
  pointer-events: none;
  opacity: 0.5;
  background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='60' height='52' viewBox='0 0 60 52'><path d='M30 2 L56 17 L56 35 L30 50 L4 35 L4 17 Z' fill='none' stroke='%233FBFAE' stroke-opacity='0.18' stroke-width='1'/></svg>");
  background-size: 60px 52px;
}

/* ============= Nav ============= */
.nav {
  position: sticky;
  top: 0;
  z-index: 50;
  background: color-mix(in oklab, var(--bg) 88%, transparent);
  backdrop-filter: saturate(140%) blur(12px);
  -webkit-backdrop-filter: saturate(140%) blur(12px);
  border-bottom: 1px solid transparent;
  transition: border-color .25s ease;
}
.nav.scrolled { border-bottom-color: var(--line); }
.nav-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 18px 0;
}
.nav-logo {
  display: flex;
  align-items: center;
  gap: 12px;
}
.nav-logo img { height: 36px; width: auto; }
.nav-logo .word {
  font-weight: 900;
  font-size: 18px;
  letter-spacing: 0.02em;
  color: var(--rt-graphite);
}
.nav-logo .word small {
  display: block;
  font-size: 9px;
  font-weight: 600;
  letter-spacing: 0.32em;
  color: var(--text-faint);
  margin-top: 2px;
}
.nav-links {
  display: flex;
  gap: 6px;
  align-items: center;
}
.nav-links a.link {
  padding: 10px 14px;
  font-size: 14px;
  font-weight: 500;
  color: var(--text-muted);
  border-radius: 6px;
  transition: color .15s, background .15s;
}
.nav-links a.link:hover { color: var(--rt-graphite); background: var(--bg-3); }
.nav-links a.link.active { color: var(--rt-graphite); }

/* mobile menu toggle (hidden on desktop) - clean borderless icon button */
.nav-toggle {
  display: none;
  align-items: center;
  justify-content: center;
  width: 44px;
  height: 44px;
  margin-right: -8px;
  border-radius: 10px;
  color: var(--text);
  border: none;
  background: transparent;
  transition: background .15s ease;
}
.nav-toggle:hover,
.nav-toggle[aria-expanded="true"] { background: var(--bg-3); }
.nav-toggle svg { width: 26px; height: 26px; }
.nav-toggle .ico-close { display: none; }
.nav-toggle[aria-expanded="true"] .ico-menu { display: none; }
.nav-toggle[aria-expanded="true"] .ico-close { display: inline-flex; }

/* ============= Cards ============= */
.card {
  background: var(--bg-2);
  border: 1px solid var(--line);
  border-radius: 12px;
  transition: border-color .2s, transform .2s, box-shadow .2s;
}
.card.hover:hover {
  border-color: var(--rt-mint);
  transform: translateY(-3px);
  box-shadow: 0 24px 48px -28px rgba(63,191,174,.35);
}

/* ============= Page transitions ============= */
.page-enter {
  animation: pageIn .35s cubic-bezier(.2,.7,.2,1);
}
@keyframes pageIn {
  from { opacity: 0; transform: translateY(8px); }
  to   { opacity: 1; transform: translateY(0); }
}

/* ============= Floating WhatsApp ============= */
.whats-fab {
  position: fixed;
  right: 22px;
  bottom: 22px;
  width: 56px;
  height: 56px;
  border-radius: 50%;
  background: #25D366;
  color: white;
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 40;
  box-shadow: 0 14px 32px -10px rgba(37,211,102,.6);
  transition: transform .2s ease;
}
.whats-fab:hover { transform: scale(1.06); }
.whats-fab svg { width: 28px; height: 28px; }

/* ============= Accent badge ============= */
.pill {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 6px 12px;
  border-radius: 999px;
  font-size: 12px;
  font-weight: 600;
  background: var(--rt-mint-soft);
  color: var(--rt-mint-deep);
  border: 1px solid color-mix(in oklab, var(--rt-mint) 30%, transparent);
}
[data-theme="dark"] .pill {
  background: color-mix(in oklab, var(--rt-mint) 14%, transparent);
  color: var(--rt-mint);
}

.pill .dot {
  width: 6px; height: 6px; border-radius: 50%;
  background: var(--rt-mint);
  box-shadow: 0 0 0 3px color-mix(in oklab, var(--rt-mint) 30%, transparent);
  animation: pulse 2s ease-in-out infinite;
}
@keyframes pulse {
  0%, 100% { box-shadow: 0 0 0 3px color-mix(in oklab, var(--rt-mint) 30%, transparent); }
  50%      { box-shadow: 0 0 0 6px color-mix(in oklab, var(--rt-mint) 0%, transparent); }
}

/* ============= WordPress housekeeping ============= */
.admin-bar .nav { top: 32px; }
@media screen and (max-width: 782px) {
  .admin-bar .nav { top: 46px; }
}

/* ============================================================
   Responsive (the original design was desktop-only; these rules
   collapse the fixed inline grids on tablet/mobile. !important is
   required because the layout columns are set via inline styles.)
   ============================================================ */

/* ---------- Tablet ---------- */
@media (max-width: 980px) {
  .rtc-hero-grid,
  .rtc-about-top,
  .rtc-contact-grid,
  .rtc-services-head,
  .rtc-cta,
  .rtc-founder { grid-template-columns: 1fr !important; }

  .rtc-cta { gap: 28px !important; padding: 44px 32px !important; }

  /* keep the photo on top for the reversed founder when stacked */
  .rtc-founder--rev > :first-child { order: 2; }

  .rtc-grid-3 { grid-template-columns: repeat(2, 1fr) !important; }
  .rtc-grid-4 { grid-template-columns: repeat(2, 1fr) !important; }
  .rtc-method-grid { grid-template-columns: repeat(2, 1fr) !important; }

  /* stacked methodology steps: swap the side connector for a top one */
  .rtc-method-item { border-left: none !important; border-top: 1px dashed var(--line-2); }
  .rtc-method-item:first-child { border-top: none; }
  .rtc-method-dot { display: none; }
  .rtc-method-item .mono { margin-left: 0 !important; }
}

/* ---------- Nav becomes a hamburger ---------- */
@media (max-width: 880px) {
  .nav-toggle { display: inline-flex; }

  /* the original nav zeroes its side padding; restore breathing room on mobile
     so the logo and toggle aren't flush against the screen edges */
  .nav-inner { padding-left: 32px; padding-right: 32px; }

  .nav-links {
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    flex-direction: column;
    align-items: stretch;
    gap: 2px;
    padding: 10px 20px 18px;
    background: color-mix(in oklab, var(--bg) 96%, transparent);
    backdrop-filter: saturate(140%) blur(12px);
    -webkit-backdrop-filter: saturate(140%) blur(12px);
    border-bottom: 1px solid var(--line);
    box-shadow: 0 24px 40px -24px rgba(0, 0, 0, .5);
    display: none;
  }
  .nav-links.open { display: flex; }
  .nav-links a.link {
    display: block;
    padding: 13px 10px;
    font-size: 15px;
    border-radius: 8px;
  }
  .nav-links a.link.active { background: var(--bg-3); }
  .nav-links .btn {
    margin-left: 0 !important;
    margin-top: 8px;
    justify-content: center;
    padding: 14px 16px !important;
  }
}

/* nav side padding matches the container at the narrow breakpoint */
@media (max-width: 720px) {
  .nav-inner { padding-left: 20px; padding-right: 20px; }
}

/* ---------- Mobile ---------- */
@media (max-width: 640px) {
  .rtc-grid-3,
  .rtc-grid-4,
  .rtc-method-grid,
  .rtc-grid-2,
  .rtc-form-grid,
  .rtc-footer-grid { grid-template-columns: 1fr !important; }

  .rtc-footer-grid { gap: 36px !important; }

  /* prevent cards from overflowing: allow grid items to shrink and stack the
     service bullets into a single column so long words wrap instead of pushing */
  .card { min-width: 0; }
  .rtc-svc-card { padding: 24px !important; gap: 18px !important; }
  .rtc-svc-body { min-width: 0; }
  .rtc-svc-bullets { grid-template-columns: 1fr !important; }

  /* hero stats: 4 across -> 2x2, drop the vertical dividers */
  .rtc-hero-stats { grid-template-columns: repeat(2, 1fr) !important; }
  .rtc-hero-stats > div { border-left: none !important; padding: 20px 14px !important; }

  /* keep the big headlines from overflowing very small screens */
  .rtc-hero-grid .h1 { font-size: clamp(34px, 10vw, 60px) !important; }
  .rtc-cta { padding: 36px 22px !important; }
  .rtc-cta .h2 { font-size: clamp(28px, 8vw, 40px) !important; }

  /* tighten the generous desktop vertical rhythm on phones */
  main.page-enter > section { padding-top: 64px !important; padding-bottom: 64px !important; }

  /* enlarge the carousel dots' tap area (>=24px) without growing the visible
     bar: padding extends the hit box, background-clip keeps the bar small */
  .rtc-tst-dot {
    box-sizing: content-box;
    padding: 11px 8px;
    background-clip: content-box;
    -webkit-background-clip: content-box;
  }
}
