/* =========================================================================
   TOWERRUSH — MASTER STYLESHEET (site 2)
   Same block structure/classes as the rush-tower-play template, different
   visual identity: light neo-brutalist — bold ink outlines, hard offset
   shadows, flat colour blocks instead of dark glass + neon glow.
   ========================================================================= */

@import url('https://fonts.googleapis.com/css2?family=Archivo+Black&family=Work+Sans:wght@400;500;600;700;800&display=swap');

:root{
  /* --- Palette --------------------------------------------------------- */
  --bg:            #F5F6FB;   /* page background — cool off-white */
  --panel:         #FFFFFF;   /* cards, header, table stripes */
  --panel-alt:     #ECEEFA;   /* secondary panel tone */
  --ink:           #12162B;   /* near-black navy — text + borders */
  --accent-blue:   #2F5FFF;   /* primary accent */
  --accent-coral:  #FF5A36;   /* signal accent — CTA / highlight */
  --text-main:     #12162B;
  --text-muted:    #5B6178;
  --text-faint:    #8B90A6;

  /* --- Type -------------------------------------------------------------*/
  --font-display: 'Archivo Black', 'Arial Black', sans-serif;
  --font-body:    'Work Sans', 'Segoe UI', sans-serif;

  /* --- Layout ------------------------------------------------------------*/
  --max-w: 1180px;
  --radius-s: 6px;
  --radius-m: 10px;
  --radius-l: 16px;
  --header-h: 78px;
  --line-w: 2.5px;             /* signature bold-outline width */
  --shadow-hard: 6px 6px 0 var(--ink);
  --shadow-hard-sm: 4px 4px 0 var(--ink);
}

/* ---------------------------------------------------------------------- *
 * Reset
 * ---------------------------------------------------------------------- */
*, *::before, *::after{ box-sizing: border-box; }
html{ scroll-behavior: smooth; }
body{
  margin: 0;
  background: var(--bg);
  background-image:
    radial-gradient(560px 340px at 92% 0%, rgba(47,95,255,0.07), transparent 60%),
    radial-gradient(520px 320px at 4% 14%, rgba(255,90,54,0.08), transparent 55%);
  background-repeat: no-repeat;
  color: var(--text-main);
  font-family: var(--font-body);
  font-size: 16px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}
img{ max-width: 100%; height: auto; display: block; }
a{ color: inherit; text-decoration: none; }
button{ font-family: inherit; cursor: pointer; }
ul, ol{ padding-left: 1.3em; }
:focus-visible{ outline: 3px solid var(--accent-blue); outline-offset: 2px; }

@media (prefers-reduced-motion: reduce){
  *{ animation-duration: 0.001ms !important; transition-duration: 0.001ms !important; }
  html{ scroll-behavior: auto; }
}

/* ---------------------------------------------------------------------- *
 * HEADER
 * ---------------------------------------------------------------------- */
.site-header{
  position: sticky;
  top: 0;
  z-index: 100;
  height: var(--header-h);
  display: flex;
  align-items: center;
  background: var(--panel);
  border-bottom: var(--line-w) solid var(--ink);
  transition: box-shadow .2s ease;
}
.site-header.is-scrolled{ box-shadow: 0 6px 0 rgba(18,22,43,0.06); }
.header-inner{
  width: 100%;
  max-width: var(--max-w);
  margin: 0 auto;
  padding: 0 24px;
  display: flex;
  align-items: center;
  gap: 20px;
}
.logo{ display: flex; align-items: center; flex-shrink: 0; }
.logo img{ height: 30px; width: auto; }

.main-nav{ display: flex; align-items: center; gap: 4px; margin-left: 8px; }
.main-nav a{
  padding: 8px 14px;
  border-radius: var(--radius-s);
  font-family: var(--font-body);
  font-size: 14px;
  font-weight: 700;
  color: var(--text-muted);
  transition: color .15s ease, background-color .15s ease;
  white-space: nowrap;
}
.main-nav a:hover{ color: var(--ink); background: var(--panel-alt); }
.main-nav a[aria-current="page"]{
  color: var(--ink);
  background: var(--panel-alt);
  box-shadow: inset 0 -3px 0 var(--accent-coral);
}

.header-right{ display: flex; align-items: center; gap: 10px; margin-left: auto; }

/* Language switcher --------------------------------------------------- */
.lang-switch{ position: relative; }
.lang-switch-btn{
  display: flex; align-items: center; gap: 8px;
  background: var(--panel);
  border: var(--line-w) solid var(--ink);
  color: var(--text-main);
  padding: 7px 12px;
  border-radius: var(--radius-s);
  font-size: 14px;
  font-family: var(--font-body);
  font-weight: 700;
}
.lang-switch-btn .flag{ font-size: 16px; line-height: 1; }
.lang-switch-btn .chev{
  width: 9px; height: 9px;
  border-right: 2px solid var(--ink);
  border-bottom: 2px solid var(--ink);
  transform: rotate(45deg);
  transition: transform .18s ease;
  margin-top: -3px;
}
.lang-switch.is-open .lang-switch-btn .chev{ transform: rotate(-135deg); margin-top: 3px; }

.lang-menu{
  position: absolute;
  top: calc(100% + 10px);
  right: 0;
  min-width: 200px;
  max-height: 320px;
  overflow-y: auto;
  background: var(--panel);
  border: var(--line-w) solid var(--ink);
  border-radius: var(--radius-m);
  padding: 6px;
  box-shadow: var(--shadow-hard);
  display: none;
  z-index: 200;
}
.lang-switch.is-open .lang-menu{ display: block; }
.lang-menu a{
  display: flex; align-items: center; gap: 10px;
  padding: 9px 10px;
  border-radius: var(--radius-s);
  font-size: 14px;
  font-weight: 600;
  color: var(--text-muted);
}
.lang-menu a:hover{ background: var(--panel-alt); color: var(--ink); }
.lang-menu a[aria-current="true"]{ color: var(--ink); background: var(--panel-alt); }
.lang-menu a .flag{ font-size: 17px; }
.lang-menu a .check{ margin-left: auto; color: var(--accent-coral); font-size: 13px; font-weight: 800; }

/* CTA buttons in header ------------------------------------------------ */
.btn{
  display: inline-flex; align-items: center; justify-content: center;
  font-family: var(--font-body);
  font-weight: 800;
  font-size: 14px;
  letter-spacing: .01em;
  border-radius: var(--radius-s);
  padding: 10px 18px;
  border: var(--line-w) solid var(--ink);
  transition: transform .12s ease, box-shadow .12s ease, background-color .12s ease;
  white-space: nowrap;
  box-shadow: var(--shadow-hard-sm);
}
.btn:hover{ transform: translate(-2px, -2px); box-shadow: 6px 6px 0 var(--ink); }
.btn:active{ transform: translate(0,0); box-shadow: 1px 1px 0 var(--ink); }
.btn-ghost{
  color: var(--ink);
  background: var(--panel);
}
.btn-primary{
  color: var(--panel);
  background: var(--accent-blue);
}

/* Mobile nav toggle ------------------------------------------------------*/
.nav-toggle{
  display: none;
  width: 40px; height: 40px;
  border-radius: var(--radius-s);
  border: var(--line-w) solid var(--ink);
  background: var(--panel);
  align-items: center; justify-content: center;
  flex-shrink: 0;
}
.nav-toggle span, .nav-toggle span::before, .nav-toggle span::after{
  content: ""; display: block;
  width: 18px; height: 2.5px;
  background: var(--ink);
  position: relative;
  transition: transform .2s ease, opacity .2s ease;
}
.nav-toggle span::before{ position: absolute; top: -6px; }
.nav-toggle span::after{ position: absolute; top: 6px; }
.nav-toggle[aria-expanded="true"] span{ background: transparent; }
.nav-toggle[aria-expanded="true"] span::before{ top: 0; transform: rotate(45deg); }
.nav-toggle[aria-expanded="true"] span::after{ top: 0; transform: rotate(-45deg); }

/* ---------------------------------------------------------------------- *
 * MAIN — every element inside <main> is styled directly (no wrapper divs)
 * ---------------------------------------------------------------------- */
main{
  display: block;
  max-width: var(--max-w);
  margin: 0 auto;
  padding: 56px 24px 80px;
}

main h1{
  font-family: var(--font-display);
  font-size: clamp(30px, 4.6vw, 48px);
  font-weight: 900;
  line-height: 1.08;
  letter-spacing: -0.005em;
  margin: 0 0 16px;
  color: var(--ink);
}
main h2{
  font-family: var(--font-display);
  font-size: clamp(21px, 2.8vw, 28px);
  font-weight: 900;
  line-height: 1.2;
  margin: 48px 0 18px;
  color: var(--ink);
  position: relative;
  display: inline-block;
  padding-bottom: 6px;
}
main h2::after{
  content: "";
  position: absolute;
  left: 0; bottom: 0;
  width: 46px; height: 5px;
  background: var(--accent-coral);
}
main h3{
  font-family: var(--font-body);
  font-size: 19px;
  font-weight: 800;
  margin: 34px 0 14px;
  color: var(--ink);
}
main h4{
  font-family: var(--font-body);
  font-size: 14px;
  font-weight: 800;
  margin: 26px 0 10px;
  color: var(--accent-blue);
  text-transform: uppercase;
  letter-spacing: .06em;
}
main p{
  font-size: 16px;
  color: var(--text-muted);
  margin: 0 auto 18px;
  max-width: 74ch;
}
main .lede{
  font-size: 18px;
  color: var(--text-main);
  font-weight: 500;
  max-width: 62ch;
}
main a.inline-link{
  color: var(--accent-blue);
  border-bottom: 2px solid var(--accent-blue);
  font-weight: 600;
}
main a.inline-link:hover{ background: var(--panel-alt); }

main ul, main ol{
  color: var(--text-muted);
  max-width: 74ch;
  margin: 0 auto 20px;
  text-align: left;
}
main li{ margin-bottom: 8px; }
main li::marker{ color: var(--accent-coral); font-weight: 800; }

main blockquote{
  margin: 28px auto;
  max-width: 74ch;
  padding: 18px 22px;
  border: var(--line-w) solid var(--ink);
  border-left-width: 6px;
  border-left-color: var(--accent-blue);
  background: var(--panel);
  border-radius: 0 var(--radius-s) var(--radius-s) 0;
  color: var(--ink);
  text-align: left;
  font-style: italic;
}

main hr{
  border: none;
  border-top: var(--line-w) solid var(--ink);
  margin: 44px 0;
}

/* Hero -------------------------------------------------------------------
   Single centred column — copy first, image below, nothing side-by-side. */
.hero{
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  gap: 30px;
  padding: 12px 0 16px;
}
.hero-copy{ max-width: 760px; }
.hero-copy h1{ margin: 0 auto 14px; }
.hero-copy .lede{ margin-left: auto; margin-right: auto; }
.hero-actions{ display: flex; gap: 14px; margin-top: 26px; flex-wrap: wrap; justify-content: center; }
.hero-figure{
  position: relative;
  width: 100%;
  max-width: 760px;
  border-radius: var(--radius-l);
  overflow: hidden;
  border: var(--line-w) solid var(--ink);
  box-shadow: 8px 8px 0 var(--ink);
}
.hero-figure img{ width: 100%; }

/* Content images ----------------------------------------------------------
   Reusable insertion point for images placed between paragraphs. */
main figure.content-image{ margin: 32px 0; }
main figure.content-image img{
  width: 100%;
  border-radius: var(--radius-m);
  border: var(--line-w) solid var(--ink);
}
main figure.content-image figcaption{
  margin-top: 10px;
  font-size: 13px;
  font-weight: 600;
  color: var(--text-faint);
  text-align: center;
}

/* Centered CTA button template ------------------------------------------ */
.cta-block{
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 10px;
  text-align: center;
  margin: 46px auto;
  padding: 36px 24px;
  max-width: 560px;
  background: var(--panel);
  border: var(--line-w) solid var(--ink);
  border-radius: var(--radius-l);
  box-shadow: var(--shadow-hard);
}
.cta-block .btn-primary{
  padding: 15px 40px;
  font-size: 16px;
  border-radius: 999px;
}
.cta-block .cta-note{ font-size: 13px; color: var(--text-faint); margin-top: 4px; }

/* Table --------------------------------------------------------------------
   Wrapped so wide tables scroll internally on mobile instead of
   stretching the page. */
.table-wrap{
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
  margin: 28px 0;
  border: var(--line-w) solid var(--ink);
  border-radius: var(--radius-m);
  background: var(--panel);
}
main table{
  width: 100%;
  min-width: 520px;
  border-collapse: collapse;
  font-size: 14.5px;
}
main table caption{
  text-align: left;
  padding: 14px 18px 0;
  color: var(--text-faint);
  font-size: 13px;
  font-weight: 600;
}
main thead th{
  text-align: left;
  font-family: var(--font-body);
  font-size: 12.5px;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: .05em;
  color: var(--ink);
  background: var(--panel-alt);
  padding: 14px 18px;
  border-bottom: var(--line-w) solid var(--ink);
  white-space: nowrap;
}
main tbody td{
  padding: 14px 18px;
  border-bottom: 1px solid #DDE0F0;
  color: var(--text-muted);
}
main tbody tr:last-child td{ border-bottom: none; }
main tbody tr:hover{ background: var(--panel-alt); }

/* Author block ------------------------------------------------------------
   Placed in <main> after the body copy. */
.author-block{
  display: flex;
  align-items: center;
  gap: 18px;
  margin: 56px 0 8px;
  padding: 22px;
  background: var(--panel);
  border: var(--line-w) solid var(--ink);
  border-radius: var(--radius-m);
  box-shadow: var(--shadow-hard-sm);
}
.author-block .avatar{
  width: 64px; height: 64px;
  border-radius: 50%;
  overflow: hidden;
  flex-shrink: 0;
  border: var(--line-w) solid var(--ink);
}
.author-block .avatar img{ width: 100%; height: 100%; object-fit: cover; }
.author-block .author-meta{ min-width: 0; }
.author-block .author-name{
  font-family: var(--font-body);
  font-weight: 800;
  font-size: 15px;
  color: var(--ink);
}
.author-block .author-role{
  font-size: 12.5px;
  font-weight: 700;
  color: var(--accent-blue);
  margin-bottom: 6px;
}
.author-block .author-opinion{
  font-size: 14px;
  color: var(--text-muted);
  margin: 0;
}

/* 404 page ---------------------------------------------------------------*/
.error-page{
  min-height: 60vh;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: 60px 24px;
}
.error-page .error-code{
  font-family: var(--font-display);
  font-weight: 900;
  font-size: clamp(70px, 15vw, 150px);
  line-height: 1;
  color: var(--ink);
  -webkit-text-stroke: 2px var(--accent-coral);
}
.error-page h1{ margin: 6px 0 12px; }
.error-page p{ margin: 0 auto 28px; }

/* ---------------------------------------------------------------------- *
 * FOOTER
 * ---------------------------------------------------------------------- */
.site-footer{
  border-top: var(--line-w) solid var(--ink);
  background: var(--panel-alt);
  padding: 40px 24px 32px;
}
.footer-inner{ max-width: var(--max-w); margin: 0 auto; }

.footer-orgs{
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-bottom: 24px;
}
.footer-orgs a{
  display: inline-flex;
  align-items: center;
  padding: 8px 16px;
  border: var(--line-w) solid var(--ink);
  border-radius: 999px;
  background: var(--panel);
  font-size: 13px;
  font-weight: 700;
  color: var(--text-muted);
  transition: background-color .15s ease, color .15s ease;
}
.footer-orgs a:hover{ background: var(--accent-blue); color: var(--panel); border-color: var(--ink); }

.footer-disclaimer{
  font-size: 12.5px;
  line-height: 1.7;
  color: var(--text-faint);
  max-width: 90ch;
  margin: 0;
}

/* ---------------------------------------------------------------------- *
 * BACK TO TOP
 * ---------------------------------------------------------------------- */
.back-to-top{
  position: fixed;
  right: 22px;
  bottom: 26px;
  width: 46px; height: 46px;
  border-radius: var(--radius-s);
  border: var(--line-w) solid var(--ink);
  background: var(--accent-coral);
  color: var(--panel);
  display: flex; align-items: center; justify-content: center;
  box-shadow: var(--shadow-hard-sm);
  opacity: 0;
  visibility: hidden;
  transform: translateY(10px);
  transition: opacity .25s ease, transform .2s ease, visibility .25s ease;
  z-index: 90;
}
.back-to-top.is-visible{ opacity: 1; visibility: visible; transform: translateY(0); }
.back-to-top:hover{ transform: translate(-2px,-2px); box-shadow: 6px 6px 0 var(--ink); }
.back-to-top svg{ width: 18px; height: 18px; }

/* ---------------------------------------------------------------------- *
 * RTL support (Urdu)
 * ---------------------------------------------------------------------- */
html[dir="rtl"] main blockquote{ border-left-width: var(--line-w); border-right-width: 6px; border-right-color: var(--accent-blue); border-radius: var(--radius-s) 0 0 var(--radius-s); text-align: right; }
html[dir="rtl"] main thead th, html[dir="rtl"] main table caption{ text-align: right; }
html[dir="rtl"] .back-to-top{ right: auto; left: 22px; }
html[dir="rtl"] .lang-menu{ right: auto; left: 0; }
html[dir="rtl"] main h2::after{ left: auto; right: 0; }
html[dir="rtl"] main ul, html[dir="rtl"] main ol{ text-align: right; padding-left: 0; padding-right: 1.3em; }

/* ---------------------------------------------------------------------- *
 * RESPONSIVE
 * ---------------------------------------------------------------------- */
@media (max-width: 860px){
  .main-nav{ display: none; }
  .nav-toggle{ display: flex; }

  .header-right{
    position: fixed;
    top: var(--header-h);
    left: 0; right: 0;
    background: var(--panel);
    border-bottom: var(--line-w) solid var(--ink);
    flex-direction: column;
    align-items: stretch;
    gap: 10px;
    padding: 16px 20px 22px;
    transform: translateY(-8px);
    opacity: 0;
    visibility: hidden;
    transition: opacity .2s ease, transform .2s ease, visibility .2s ease;
  }
  .header-right.is-open{
    transform: translateY(0);
    opacity: 1;
    visibility: visible;
  }
  .header-right .main-nav-mobile{
    display: flex;
    flex-direction: column;
    gap: 4px;
    border-bottom: 1px solid #DDE0F0;
    padding-bottom: 12px;
    margin-bottom: 6px;
  }
  .header-right .main-nav-mobile a{
    padding: 10px 6px;
    font-family: var(--font-body);
    font-weight: 700;
    color: var(--text-muted);
  }
  .header-right .main-nav-mobile a[aria-current="page"]{ color: var(--ink); }
  .lang-switch{ width: 100%; }
  .lang-switch-btn{ width: 100%; justify-content: space-between; }
  .lang-menu{ position: static; width: 100%; margin-top: 8px; box-shadow: none; }
  .header-right .btn{ width: 100%; }
}

@media (max-width: 640px){
  main{ padding: 36px 18px 64px; }
  .cta-block{ padding: 28px 18px; margin: 34px auto; }
  .author-block{ flex-direction: column; text-align: center; }
  .footer-orgs{ justify-content: center; }
}

@media (max-width: 420px){
  .logo img{ height: 24px; }
  main h1{ font-size: 28px; }
}
.demo-wrapper {
  display: flex;
  justify-content: center;
  align-items: center;
  padding: 24px 16px;
}

.demo-frame {
  position: relative;
  width: 100%;
  max-width: 850px;
  aspect-ratio: 16 / 9;
  background: #111;
  border-radius: 12px;
  overflow: hidden;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.15);
  border: 1px solid rgba(0, 0, 0, 0.08);
}

.demo-frame iframe {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  border: 0;
}

@media (max-width: 600px) {
  .demo-wrapper {
    padding: 12px 8px;
  }

  .demo-frame {
    border-radius: 8px;
  }
}