/* =========================================================
   TFW site.css
   Header/Footer + hero/tiles + slideshow fade animation
   Includes fixes for "repeating blue band" on scroll
   ========================================================= */

:root{
  --bg: #0b1220;
  --panel: rgba(255,255,255,0.06);
  --panel2: rgba(255,255,255,0.10);
  --text: rgba(255,255,255,0.92);
  --muted: rgba(255,255,255,0.72);
  --border: rgba(255,255,255,0.14);

  --blue: #2b6cff;
  --blue2: #1b4ed8;

  --radius: 16px;
  --radius-sm: 12px;

  --shadow: 0 18px 42px rgba(0,0,0,0.35);
  --max: 1100px;
}

/* =========================================================
   Base reset + background (critical scroll fix)
   ========================================================= */

*,
*::before,
*::after{ box-sizing: border-box; }

html, body{ height: 100%; }

html{
  /* ensure the viewport always has a base color behind gradients */
  background: var(--bg);

  /* helps prevent odd tiling artifacts on some renderers */
  background-repeat: no-repeat;
}

body{
  margin: 0;
  font-family: system-ui, -apple-system, "Segoe UI", Roboto, Helvetica, Arial, "Apple Color Emoji", "Segoe UI Emoji";
  color: var(--text);

  /* IMPORTANT:
     1) no-repeat stops "bands" from tiling
     2) fixed locks the gradient to viewport so it doesn't re-paint in bands while scrolling
     3) background-size: cover prevents edge tiling artifacts
  */
  background:
    radial-gradient(900px 420px at 12% 10%, rgba(43,108,255,0.28), transparent 60%),
    radial-gradient(900px 520px at 85% 0%, rgba(43,108,255,0.18), transparent 55%),
    radial-gradient(700px 420px at 70% 80%, rgba(27,78,216,0.14), transparent 55%),
    var(--bg);

  background-repeat: no-repeat;
  background-attachment: fixed;
  background-size: cover;

  line-height: 1.45;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

img{ max-width: 100%; display: block; }
a{ color: inherit; text-decoration: none; }
a:hover{ text-decoration: underline; text-underline-offset: 3px; }

.container{
  width: min(100% - 32px, var(--max));
  margin-inline: auto;
}

.page{ padding-bottom: 42px; }

.lead{
  color: var(--muted);
  font-size: 1.05rem;
  max-width: 60ch;
}

/* =========================================================
   Accessibility helpers
   ========================================================= */

.sr-only{
  position: absolute !important;
  width: 1px; height: 1px;
  padding: 0; margin: -1px;
  overflow: hidden;
  clip: rect(0,0,0,0);
  white-space: nowrap;
  border: 0;
}

/* =========================================================
   Header
   ========================================================= */

.site-header{
  position: sticky;
  top: 0;
  z-index: 50;
  backdrop-filter: blur(10px);
  background: rgba(11,18,32,0.78);
  border-bottom: 1px solid var(--border);
}

.topbar{
  border-bottom: 1px solid rgba(255,255,255,0.10);
  background: rgba(0,0,0,0.18);
}

.topbar-inner{
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 8px 0;
}

.topbar-left,
.topbar-right{
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
}

.topbar-link{
  color: rgba(255,255,255,0.80);
  font-size: 0.95rem;
  text-decoration: none;
}

.topbar-link:hover{
  color: rgba(255,255,255,0.96);
  text-decoration: none;
}

.sep{ color: rgba(255,255,255,0.45); }

.nav-wrap{ padding: 12px 0; }

.nav-inner{
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
}

.brand{
  display: flex;
  align-items: center;
  gap: 10px;
  text-decoration: none;
}

.brand-logo{
  width: 280px;
  height: auto;
  object-fit: contain;
}

.nav-toggle{
  display: none;
  align-items: center;
  justify-content: center;
  width: 44px;
  height: 44px;
  border-radius: var(--radius-sm);
  border: 1px solid var(--border);
  background: rgba(255,255,255,0.06);
  color: var(--text);
  cursor: pointer;
}

.nav-toggle:hover{ background: rgba(255,255,255,0.10); }

.hamburger{
  width: 18px;
  height: 2px;
  background: rgba(255,255,255,0.88);
  position: relative;
  border-radius: 2px;
}

.hamburger::before,
.hamburger::after{
  content: "";
  position: absolute;
  left: 0;
  width: 18px;
  height: 2px;
  background: rgba(255,255,255,0.88);
  border-radius: 2px;
}

.hamburger::before{ top: -6px; }
.hamburger::after{ top: 6px; }

.nav{
  display: flex;
  align-items: center;
  gap: 8px;
}

.nav-link{
  display: inline-flex;
  align-items: center;
  padding: 10px 12px;
  border-radius: 12px;
  color: rgba(255,255,255,0.75);
  border: 1px solid transparent;
  text-decoration: none;
  transition: background 140ms ease, border-color 140ms ease, transform 140ms ease, color 140ms ease;
}

.nav-link:hover{
  color: rgba(255,255,255,0.95);
  background: rgba(255,255,255,0.06);
  text-decoration: none;
}

.nav-link:active{ transform: translateY(0); }

.nav-link.is-active{
  color: rgba(255,255,255,0.95);
  border-color: rgba(43,108,255,0.35);
  background: rgba(43,108,255,0.12);
}

@media (max-width: 960px){
  .brand-logo{ width: 220px; }
  .topbar-right{ display: none; }
}

@media (max-width: 860px){
  .nav-toggle{ display: inline-flex; }

  #primary-nav{
    position: absolute;
    right: 16px;
    top: 110px;
    display: none;
    flex-direction: column;
    align-items: stretch;
    width: min(340px, calc(100vw - 32px));
    padding: 10px;
    border-radius: var(--radius);
    border: 1px solid var(--border);
    background: rgba(11,18,32,0.95);
    box-shadow: var(--shadow);
  }

  #primary-nav.is-open{ display: flex; }
  .nav-link{ padding: 12px 12px; }
}

/* =========================================================
   Buttons
   ========================================================= */

.btn{
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  padding: 10px 14px;
  border-radius: 14px;
  border: 1px solid var(--border);
  background: rgba(255,255,255,0.06);
  color: var(--text);
  font-weight: 650;
  cursor: pointer;
  text-decoration: none;
  transition: transform 140ms ease, background 140ms ease, border-color 140ms ease;
}

.btn:hover{
  transform: translateY(-1px);
  background: rgba(255,255,255,0.10);
  text-decoration: none;
}

.btn-primary{
  border-color: rgba(43,108,255,0.55);
  background: linear-gradient(180deg, rgba(43,108,255,0.95), rgba(27,78,216,0.95));
}

.btn-primary:hover{
  background: linear-gradient(180deg, rgba(43,108,255,1), rgba(27,78,216,1));
}

.btn-outline{
  border-color: rgba(255,255,255,0.20);
  background: transparent;
}

/* =========================================================
   Common panels
   ========================================================= */

.hero-card,
.tile{
  border-radius: var(--radius);
  border: 1px solid var(--border);
  background: var(--panel);
  box-shadow: 0 14px 30px rgba(0,0,0,0.18);
}

.hero-card{ padding: 16px; }

.card-title{
  margin: 0 0 10px;
  font-size: 1.05rem;
}

.icon-list{
  list-style: none;
  padding: 0;
  margin: 0;
  display: grid;
  gap: 10px;
}

.icon-list li{
  display: flex;
  gap: 10px;
  align-items: center;
  color: var(--muted);
}

.icon-list .dot{
  width: 8px;
  height: 8px;
  border-radius: 999px;
  background: rgba(43,108,255,0.90);
  box-shadow: 0 0 0 4px rgba(43,108,255,0.18);
}

/* =========================================================
   Home page layout
   ========================================================= */

.hero{ padding: 34px 0 10px; }

.hero-inner{
  display: grid;
  grid-template-columns: 1.2fr 0.8fr;
  gap: 18px;
  align-items: start;
}

.hero-copy h1{
  margin: 0 0 10px;
  font-size: clamp(1.8rem, 2.6vw, 2.6rem);
  line-height: 1.15;
  letter-spacing: -0.3px;
}

.hero-copy .lead{ margin: 0 0 16px; }

.hero-cta{
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
}

.tiles-grid{
  display: grid;
  gap: 12px;
  margin-top: 14px;
}

/* Make the 3 home tiles sit side-by-side */
.tiles-grid{
  display: grid;
  gap: 12px;
  margin-top: 14px;
  grid-template-columns: repeat(3, 1fr);
}

/* Responsive: 2-up, then 1-up */
@media (max-width: 980px){
  .tiles-grid{ grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 560px){
  .tiles-grid{ grid-template-columns: 1fr; }
}

.tile{ padding: 14px; }
.tile h3{ margin: 0 0 6px; font-size: 1.05rem; }
.tile p{ margin: 0; color: var(--muted); }

@media (max-width: 860px){
  .hero-inner{ grid-template-columns: 1fr; }
}

/* =========================================================
   Slideshow (fade overlay)
   ========================================================= */

.slideshow{
  position: relative;
  width: 100%;
  border-radius: var(--radius);
  overflow: hidden;
  border: 1px solid var(--border);
  background: rgba(255,255,255,0.05);
  box-shadow: var(--shadow);

  /* adjust this freely for size */
  aspect-ratio: 21 / 9;
}

/* keep selector specific */
.slideshow img.slide{
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;

  opacity: 0;
  transform: scale(1.03);
  transition: opacity 900ms ease, transform 1400ms ease;
  will-change: opacity, transform;
}

.slideshow img.slide.is-active{
  opacity: 1;
  transform: scale(1.0);
}

.slideshow::after{
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
  background: linear-gradient(180deg, rgba(0,0,0,0.08), rgba(0,0,0,0.34));
}

@media (prefers-reduced-motion: reduce){
  .slideshow img.slide{ transition: none; }
}

/* =========================================================
   Desktop specs layout (for desktops.html)
   ========================================================= */

.spec-card{ padding: 16px; }

.spec-grid{
  display: grid;
  grid-template-columns: 220px 1fr;
  gap: 16px;
  align-items: start;
}

.spec-media img{
  width: 100%;
  height: auto;
  border-radius: var(--radius-sm);
  border: 1px solid var(--border);
  background: rgba(255,255,255,0.04);
}

.muted{ color: var(--muted); }

.spec-kicker{
  color: rgba(255,255,255,0.85);
  font-weight: 650;
  margin: 0 0 6px;
}

.spec-price{
  margin: 6px 0 0;
  font-size: 1.65rem;
  font-weight: 800;
  color: var(--blue);
}

.spec-list{
  margin: 10px 0 0;
  padding-left: 18px;
  color: var(--muted);
  display: grid;
  gap: 6px;
}

@media (max-width: 860px){
  .spec-grid{ grid-template-columns: 1fr; }
  .spec-media{ max-width: 320px; }
}

/* =========================================================
   Footer
   ========================================================= */

.site-footer{
  margin-top: 22px;
  border-top: 1px solid var(--border);
  background: rgba(11,18,32,0.65);
  padding: 26px 0 18px;
  color: var(--muted);
}

.footer-grid{
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 16px;
}

.footer-title{
  margin: 0 0 8px;
  font-size: 1.02rem;
  color: rgba(255,255,255,0.92);
}

.footer-text{
  margin: 0 0 10px;
  color: rgba(255,255,255,0.70);
}

.footer-text a{
  color: rgba(255,255,255,0.82);
  text-decoration: none;
}

.footer-text a:hover{
  color: rgba(255,255,255,0.96);
  text-decoration: underline;
  text-underline-offset: 3px;
}

.footer-list{
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  gap: 8px;
  color: rgba(255,255,255,0.70);
}

.footer-list a{
  color: rgba(255,255,255,0.82);
  text-decoration: none;
}

.footer-list a:hover{
  color: rgba(255,255,255,0.96);
  text-decoration: underline;
  text-underline-offset: 3px;
}

.footer-bottom{
  margin-top: 16px;
  padding-top: 14px;
  border-top: 1px solid rgba(255,255,255,0.10);
  color: rgba(255,255,255,0.62);
}

@media (max-width: 980px){
  .footer-grid{ grid-template-columns: repeat(2, 1fr); }
}

@media (max-width: 560px){
  .footer-grid{ grid-template-columns: 1fr; }
}

/* =========================================================
   Small utilities
   ========================================================= */

.mt-2{ margin-top: 8px; }
.mt-3{ margin-top: 12px; }
.mt-4{ margin-top: 18px; }
