:root{
  --bg: #07090d;
  --text: rgba(255,255,255,.92);
  --muted: rgba(255,255,255,.70);
  --border: rgba(255,255,255,.10);
  --panel: rgba(255,255,255,.03);
  --panel-2: rgba(255,255,255,.06);

  --radius: 18px;

  --font-sans: "Lato", system-ui, -apple-system, Segoe UI, Roboto, Arial, sans-serif;
  --font-display: "Space Grotesk", "Lato", system-ui, -apple-system, Segoe UI, Roboto, Arial, sans-serif;

  --container: 1180px;
  --container-wide: 1180px; /* keep header/footer aligned to content */
  --container-pad: clamp(14px, 3vw, 30px);
  --section-y: clamp(28px, 4.8vw, 72px);

  --shadow: 0 18px 70px rgba(0,0,0,.34);

  /* link hover behavior */
  --link: rgba(255,255,255,.82);
  --link-hover: #fff;
}

/* Theme wrapper: theme.js should toggle html[data-theme="light"] / "dark" */
html[data-theme="light"]{
  --bg: #d9dde4;
  --text: rgba(18,18,22,.95);
  --muted: rgba(18,18,22,.70);
  --border: rgba(18,18,22,.12);
  --panel: rgba(255,255,255,.40);
  --panel-2: rgba(255,255,255,.60);

  --shadow: 0 18px 55px rgba(0,0,0,.16);

  --link: rgba(18,18,22,.78);
  --link-hover: rgba(18,18,22,.95);
}

*{ box-sizing: border-box; }

html{
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
  scroll-behavior: smooth;
}

body{
  margin:0;
  min-height: 100svh;
  display:flex;
  flex-direction: column;
  font-family: var(--font-sans);
  color: var(--text);
  background: var(--bg);
  line-height: 1.55;
  overflow-x: hidden;
}

main{ flex: 1; }
a{ color: inherit; text-decoration: none; }
a:visited{ color: inherit; }

h1,h2,h3,h4{
  font-family: var(--font-display);
  letter-spacing: -0.4px;
  margin: 0 0 10px;
}

h1{ font-size: clamp(30px, 3.4vw, 52px); line-height: 1.05; }
h2{ font-size: clamp(22px, 2.2vw, 32px); line-height: 1.15; }
h3{ font-size: clamp(18px, 1.6vw, 24px); line-height: 1.2; }

p{
  margin: 0 0 12px;
  color: var(--muted);
  font-size: clamp(14px, 1.05vw, 16px);
  line-height: 1.75;
}

.page-bg{
  position: fixed;
  inset: 0;
  z-index: -1;
  pointer-events: none;
  background:
    radial-gradient(900px 420px at 20% 20%, rgba(25,60,255,.18), transparent 70%),
    radial-gradient(900px 420px at 85% 25%, rgba(255,70,70,.10), transparent 70%),
    radial-gradient(900px 520px at 70% 80%, rgba(170,60,255,.10), transparent 70%),
    linear-gradient(to bottom, rgba(255,255,255,.04), transparent 45%);
}

html[data-theme="light"] .page-bg{
  background:
    radial-gradient(900px 420px at 20% 20%, rgba(25,60,255,.10), transparent 70%),
    radial-gradient(900px 420px at 85% 25%, rgba(255,70,70,.06), transparent 70%),
    radial-gradient(900px 520px at 70% 80%, rgba(170,60,255,.06), transparent 70%),
    linear-gradient(to bottom, rgba(255,255,255,.50), transparent 55%);
}

.container{
  width: min(var(--container), 100% - (var(--container-pad) * 2));
  margin-inline: auto;
}

.container--wide{
  width: min(var(--container-wide), 100% - (var(--container-pad) * 2));
  margin-inline: auto;
}

.section{ padding-block: var(--section-y); }

/* Header/Nav */
.site-header{
  position: sticky;
  top: 0;
  z-index: 20;
  backdrop-filter: blur(10px);
  background: linear-gradient(to bottom, rgba(0,0,0,.55), rgba(0,0,0,.15));
  border-bottom: 1px solid rgba(255,255,255,.10);
}

html[data-theme="light"] .site-header{
  background: linear-gradient(to bottom, rgba(255,255,255,.75), rgba(255,255,255,.40));
  border-bottom-color: rgba(18,18,22,.14);
}

.site-header__inner{
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  padding: 14px 0;
}

.brand{
  display: flex;
  align-items: center;
  line-height: 1;
  color: var(--text);
  font-weight: 900;
  letter-spacing: -0.45px;
  font-family: var(--font-display);
  font-size: clamp(16px, 1.5vw, 20px);
  white-space: nowrap;
}

.nav{
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: clamp(12px, 1.7vw, 20px);
  flex-wrap: wrap;
}

.nav__link{
  color: var(--link);
  font-weight: 900;
  letter-spacing: .2px;
  font-size: clamp(13px, 1.05vw, 15px);
  padding: 10px 0; /* text-only */
  border-radius: 0;
  transition: color .15s ease, transform .15s ease;
  white-space: nowrap;
  transform-origin: center;
}

.nav__link:hover,
.nav__link:focus-visible{
  transform: scale(1.10);
  color: var(--link-hover);
  outline: none;
}

@media (max-width: 640px){
  .site-header__inner{
    flex-direction: column;
    align-items: flex-start;
  }
  .nav{
    width: 100%;
    justify-content: flex-start;
  }
}

/* Footer */
.site-footer{
  border-top: 1px solid rgba(255,255,255,.12);
  background: rgba(0,0,0,.28);
}

html[data-theme="light"] .site-footer{
  background: rgba(255,255,255,.55);
  border-top-color: rgba(18,18,22,.14);
}


.footer-top--two{
  padding: clamp(15px, 2.8vw, 15px) 0;
  display: grid;
  grid-template-columns: minmax(280px, 520px) minmax(280px, 520px);
  grid-template-areas:
    "brandTop newsTop"
    "brandActions newsActions"
    ". newsTiny";
  justify-content: center;
  align-items: start;
  column-gap: clamp(15px, 3vw, 15px);
  row-gap: 12px;
  text-align: center;
}

.footer-brandTop{ grid-area: brandTop; display:flex; flex-direction:column; align-items:center; }
.footer-newsTop{ grid-area: newsTop; display:flex; flex-direction:column; align-items:center; }

.footer-brandActions{
  grid-area: brandActions;
  display:flex;
  align-items:center;
  justify-content:center;
}

.footer-newsActions{
  grid-area: newsActions;
  display:flex;
  align-items:center;
  justify-content:center;
}

.footer-newsTiny{
  grid-area: newsTiny;
  display:flex;
  justify-content:center;
}

.footer-logo,
.footer-head{
  font-family: var(--font-display);
  font-weight: 800;
  letter-spacing: -0.4px;
  font-size: clamp(16px, 1.5vw, 20px);
  margin: 0 0 8px;
  color: var(--text);
  text-transform: none;
}

.footer-desc,
.footer-small{
  margin: 0 0 12px;
  color: var(--muted);
  font-size: clamp(13px, 1.0vw, 14px);
}


.footer-newsletterActions{
  margin-top: 0;
  width: 100%;
  display:flex;
  flex-direction: column;
  align-items: center;
}

.footer-social{
  display:flex;
  flex-wrap: nowrap; /* desktop: one row */
  gap: 10px;
  justify-content: center;
  align-items: center;
  margin-top: 0;
}

.social{
  display:inline-flex;
  align-items:center;
  justify-content:center;
  gap: 8px;
  height: 44px;              /* match newsletter input/button */
  padding: 0 16px;           /* match button rhythm */
  border-radius: 14px;
  border: 1px solid var(--border);
  background: var(--panel);
  color: var(--text);
  font-weight: 900;
  font-size: 14px;
  letter-spacing: .2px;
  transition: transform .15s ease, background .15s ease, border-color .15s ease;
  white-space: nowrap;
}

.social svg{ width: 1.1em; height: 1.1em; }

.social:hover{
  transform: translateY(-1px);
  background: var(--panel-2);
  border-color: color-mix(in srgb, var(--border) 60%, transparent);
}

.newsletter{
  display:flex;
  gap: 8px;
  align-items:center;
  justify-content: center;
  flex-wrap: nowrap;
  width: min(520px, 100%);
}

.newsletter-input{
  flex: 1;
  height: 44px;
  border-radius: 14px;
  border: 1px solid var(--border);
  background: var(--panel);
  color: var(--text);
  padding: 0 14px;
  font-size: 14px;
  outline: none;
}

.newsletter-input::placeholder{ color: color-mix(in srgb, var(--muted) 70%, transparent); }

.newsletter-input:focus{
  border-color: color-mix(in srgb, var(--border) 70%, #fff 30%);
  background: var(--panel-2);
}

.newsletter-btn{
  height: 44px;
  padding: 0 16px;
  border-radius: 14px;
  border: 1px solid var(--border);
  background: var(--panel);
  color: var(--text);
  font-weight: 900;
  font-size: 14px;
  cursor: pointer;
  transition: transform .15s ease, background .15s ease, border-color .15s ease;
}

.newsletter-btn:hover{
  transform: translateY(-1px);
  background: var(--panel-2);
  border-color: color-mix(in srgb, var(--border) 60%, transparent);
}

.footer-tiny{
  margin-top: 8px;
  color: var(--muted);
  font-size: 12px;
  line-height: 1.55;
}

.footer-tiny a{
  font-weight: 900;
  color: var(--link);
}
.footer-tiny a:hover{ color: var(--link-hover); }


@media (max-width: 760px){
  .footer-top--two{
    grid-template-columns: 1fr;
    grid-template-areas:
      "brandTop"
      "brandActions"
      "newsTop"
      "newsActions"
      "newsTiny";
  }
  .footer-social{ flex-wrap: wrap; justify-content: center; }
  .newsletter{ width: 100%; }
}

.footer-bottom{
  padding: 14px 0;
  border-top: 1px solid rgba(255,255,255,.12);
  display:flex;
  align-items:center;
  gap: 14px;
  flex-wrap: nowrap; /* keep single line on desktop */
}

html[data-theme="light"] .footer-bottom{
  border-top-color: rgba(18,18,22,.14);
}

.footer-bottom small{
  color: var(--muted);
  font-size: 13px;
  font-weight: 700;
  white-space: nowrap;
}

.footer-bottom-links{
  margin-left: auto;
  display:flex;
  align-items:center;
  justify-content:flex-end;
  gap: 14px;
  flex-wrap: nowrap; /* single row */
  padding-right: 4px; /* breathing room so last item never clips */
}

.footer-bottom-links a{
  color: var(--link);
  font-weight: 900;
  letter-spacing: .2px;
  font-size: 13px;
  padding: 6px 0;
  transition: transform .15s ease, color .15s ease;
  white-space: nowrap;
  transform-origin: center;
}

.footer-bottom-links a:hover,
.footer-bottom-links a:focus-visible{
  transform: scale(1.10);
  color: var(--link-hover);
  outline: none;
}

html[data-theme="light"] .footer-bottom-links a:hover,
html[data-theme="light"] .footer-bottom-links a:focus-visible{
  /* in light mode: stay dark, just emphasize */
  color: rgba(18,18,22,.95);
}

/* Responsive */
@media (max-width: 900px){
  .footer-top--two{
    grid-template-columns: 1fr;
    text-align: left;
  }
  .footer-brand,
  .footer-newsletter{
    align-items: flex-start;
    min-height: 0;
  }
  .footer-social{
    flex-wrap: wrap; /* mobile: can wrap to 2 rows */
    justify-content: flex-start;
  }
  .newsletter{
    justify-content: flex-start;
  }
  .footer-bottom{
    flex-wrap: wrap;
  }
  .footer-bottom-links{
    margin-left: 0;
    justify-content: flex-start;
    flex-wrap: wrap;
  }
}

@media (max-width: 520px){
  .footer-bottom-links a{
    font-size: 12px;
  }
}
