/* ============================================================
   v2 — Masthead logo (overhanging on home, inline on inner pages)
   ============================================================ */

/* Common masthead-r (top-right buttons + login) — shared by both mastheads */
.masthead-r {
  display: flex;
  align-items: center;
  gap: 16px;
  justify-content: flex-end;
}
.masthead .ed-link,
.masthead-r .ed-link {
  color: var(--ink-3);
  font-family: "JetBrains Mono", ui-monospace, monospace;
  font-size: 11px;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  text-decoration: none;
  transition: color .12s;
}
.masthead .ed-link:hover { color: var(--blue); }
.masthead .btn-mini,
.masthead-r .btn-mini {
  font-family: "JetBrains Mono", ui-monospace, monospace;
  font-size: 11px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  font-weight: 500;
  padding: 8px 14px;
  background: var(--ink);
  color: #fff;
  border: 1px solid var(--ink);
  text-decoration: none;
  transition: background .12s;
}
.masthead .btn-mini:hover { background: var(--blue); border-color: var(--blue); }

/* ============== Home masthead — overhanging logo ============== */
.masthead-home {
  overflow: visible;
  position: sticky;
  top: 0;
  z-index: 50;
}
.masthead-home .brand-logo-wrap {
  /* Holds a placeholder cell in the masthead grid; the actual <a> is absolute */
  width: 170px;
  height: 1px;
  position: static;
}
.masthead-home .brand-logo-link {
  /* Anchor to the masthead; left = gutter so the logo starts on the same vertical
     line as the hero content (which has padding-left: var(--gutter)).
     top:0 + bottom:0 + margin:auto vertically centers the absolutely
     positioned link inside the masthead's padding-box — works without
     relying on percentage-of-containing-block math. */
  position: absolute;
  top: 0;
  bottom: 0;
  left: var(--gutter);
  margin: auto 0;
  height: 60px;
  display: block;
  line-height: 0;
  z-index: 60;
  pointer-events: auto;
}
.masthead-home .brand-logo-img {
  display: block;
  height: 60px;
  width: auto;
}

/* ============================================================
   BigTech 100 v2 — large company logos filling row height
   ============================================================ */
.ranking-table .td-co .v2-logo {
  width: 72px;
  height: 72px;
  padding: 8px;
  border-color: var(--rule-soft);
}
.ranking-table .td-co .v2-logo img {
  max-width: 100%;
  max-height: 100%;
  object-fit: contain;
}
.ranking-table .td-co .v2-logo .v2-logo-fallback {
  font-size: 18px;
}
/* Reduce vertical padding so row stays tight around the logo */
.ranking-table .row td { padding: 8px 12px; }
.ranking-table .row .td-co { padding-left: 0; }
.ranking-table .co { gap: 18px; }

/* ============== Inner pages masthead — flat logo, same alignment as home ============== */
.masthead-inner .brand-logo-wrap-inner {
  width: auto;
  height: auto;
  position: static;
}
.masthead-inner .brand-logo-link-inner {
  display: inline-block;
  position: static;
  line-height: 0;
}
.masthead-inner .brand-logo-img-inner {
  display: block;
  height: 52px;
  width: auto;
}

@media (max-width: 720px) {
  /* Tighten the brand placeholder; logo stays the same 60px and stays
     vertically centered via the absolute-+-margin trick above. */
  .masthead-home .brand-logo-wrap { width: 110px; }
  .masthead-inner .brand-logo-img-inner { height: 36px; }
}

/* ============================================================
   v2 — Final CTA block (Telegram + email subscribe)
   Used on every v2 page via {% include "v2/components/final_cta.html" %}
   ============================================================ */

.cta-big {
  padding: 80px var(--gutter);
  background: var(--paper-2);
  border-top: 1px solid var(--rule-soft);
}
.cta-big-grid {
  max-width: var(--max-w);
  margin: 0 auto;
  display: grid;
  grid-template-columns: 1.2fr 1fr;
  gap: 24px;
}
.cta-big-card {
  padding: 48px 44px;
  display: flex;
  flex-direction: column;
  gap: 18px;
  min-height: 280px;
}
.cta-big-dark {
  background: linear-gradient(135deg, var(--navy-deep) 0%, var(--navy-2) 100%);
  color: #EAF0FB;
  position: relative;
  overflow: hidden;
}
.cta-big-dark::after {
  content: "";
  position: absolute;
  right: -160px; top: -160px;
  width: 480px; height: 480px;
  background: radial-gradient(circle, rgba(59,130,246,0.32), transparent 65%);
  pointer-events: none;
}
.cta-big-light {
  background: #fff;
  border: 1px solid var(--rule-soft);
}
.cta-big-eyebrow {
  font-family: "JetBrains Mono", ui-monospace, monospace;
  font-size: 11px;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--blue-bright);
  position: relative;
  z-index: 1;
}
.cta-big-light .cta-big-eyebrow { color: var(--blue); }
.cta-big-h {
  font-family: "Source Serif 4", Georgia, serif;
  font-size: 40px;
  font-weight: 400;
  letter-spacing: -0.02em;
  margin: 0;
  line-height: 1.05;
  position: relative;
  z-index: 1;
}
.cta-big-card p {
  font-size: 16px;
  line-height: 1.5;
  margin: 0;
  position: relative;
  z-index: 1;
  flex: 1;
}
.cta-big-dark p { color: rgba(234,240,251,0.78); }
.cta-big-light p { color: var(--ink-2); }
.cta-big-card .btn { align-self: flex-start; position: relative; z-index: 1; }

.news-form {
  display: flex;
  border: 1px solid var(--ink);
  background: #fff;
  position: relative;
  z-index: 1;
}
.news-form input {
  flex: 1;
  border: none;
  outline: none;
  background: transparent;
  padding: 14px 16px;
  font-family: inherit;
  font-size: 15px;
  color: var(--ink);
}
.news-form input::placeholder { color: var(--ink-4); font-style: italic; }
.news-form button {
  border: none;
  background: var(--blue);
  color: #fff;
  padding: 14px 22px;
  font-family: "JetBrains Mono", ui-monospace, monospace;
  font-size: 12px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  cursor: pointer;
  transition: background .15s;
}
.news-form button:hover { background: var(--blue-2); }
.news-tos {
  font-size: 12px;
  color: var(--ink-3);
  position: relative;
  z-index: 1;
}

@media (max-width: 1024px) {
  .cta-big-grid { grid-template-columns: 1fr; }
}
@media (max-width: 720px) {
  .cta-big { padding: 48px var(--gutter); }
  .cta-big-card { padding: 28px 22px; min-height: auto; }
  .cta-big-h { font-size: 26px; line-height: 1.1; }
  .news-form { flex-direction: column; }
  .news-form button { padding: 12px 16px; }
}

/* ============== v2 Footer ============== */
.v2-footer {
  background: var(--navy-deep);
  color: rgba(234,240,251,0.7);
  padding: 64px var(--gutter);
  margin-top: 80px;
}
.v2-footer-inner {
  max-width: var(--max-w);
  margin: 0 auto;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 64px;
}
.v2-footer-name {
  font-family: "Source Serif 4", Georgia, serif;
  font-size: 28px;
  color: #fff;
  margin-bottom: 16px;
}
.v2-footer-tagline {
  font-family: "JetBrains Mono", ui-monospace, monospace;
  font-size: 11px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: rgba(220,231,250,0.5);
}
.v2-footer-links {
  display: flex;
  flex-direction: column;
  gap: 12px;
  align-items: flex-end;
}
.v2-footer-link {
  color: rgba(234,240,251,0.85);
  font-family: "JetBrains Mono", ui-monospace, monospace;
  font-size: 12px;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  text-decoration: none;
  transition: color .12s;
}
.v2-footer-link:hover { color: var(--blue-bright); }
.v2-footer-link-muted { color: rgba(220,231,250,0.5); font-size: 11px; }
.v2-footer-copy {
  margin-top: 32px;
  font-family: "JetBrains Mono", ui-monospace, monospace;
  font-size: 11px;
  letter-spacing: 0.08em;
  color: rgba(220,231,250,0.6);
}
.v2-footer-legal {
  margin-top: 8px;
  font-family: "JetBrains Mono", ui-monospace, monospace;
  font-size: 10px;
  letter-spacing: 0.06em;
  color: rgba(220,231,250,0.35);
}

/* Floating Telegram button — exact v1 style */
.telegram-button {
  position: fixed;
  left: 20px;
  right: auto;
  bottom: 20px;
  border-radius: 50%;
  width: 50px;
  height: 50px;
  background-color: #2ca5e0;
  background-image: url("data:image/svg+xml;charset=UTF-8,%3csvg role='img' xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3e%3cpath fill='%23FFF' d='M23.91 3.79L20.3 20.84c-.25 1.21-.98 1.5-2 .94l-5.5-4.07-2.66 2.57c-.3.3-.55.56-1.1.56-.72 0-.6-.27-.84-.95L6.3 13.7l-5.45-1.7c-1.18-.35-1.19-1.16.26-1.75l21.26-8.2c.97-.43 1.9.24 1.53 1.73z'/%3e%3c/svg%3e");
  background-size: 50%;
  background-repeat: no-repeat;
  background-position: 50% 50%;
  z-index: 999;
}
.telegram-button:before,
.telegram-button:after {
  content: " ";
  display: block;
  position: absolute;
  border: 1px solid #2ca5e0;
  left: -20px; right: -20px; top: -20px; bottom: -20px;
  border-radius: 50%;
  animation: tg-pulse 1.5s linear infinite;
  opacity: 0;
}
.telegram-button:after { animation-delay: .5s; }
@keyframes tg-pulse {
  0%   { transform: scale(0.5); opacity: 0; }
  50%  { opacity: 1; }
  100% { transform: scale(1.2); opacity: 0; }
}
.sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0,0,0,0); white-space: nowrap; border-width: 0; }

@media (max-width: 720px) {
  .v2-footer { padding: 40px var(--gutter); margin-top: 0; }
  .v2-footer-inner { grid-template-columns: 1fr; gap: 28px; }
  .v2-footer-links { align-items: flex-start; }
}
