﻿/* ==========================
   ROOT VARIABLES (FULL COLOR SYSTEM)
========================== */
:root {
  /* BRAND COLORS */
  --primary: #4f46e5;
  --primary-light: #e0e7ff;
  --primary-dark: #3730d6;
  --secondary: #06b6d4;

  /* TEXT COLORS */
  --text-primary: #0f172a;
  --text-secondary: #64748b;
  --text-dark: #1e293b;
  --text-light: #f7f7f7;

  /* BACKGROUNDS */
  --bg-page: #f8fafc;
  --bg-hero-gradient-start: #f8fafc;
  --bg-hero-gradient-end: #eff6ff;
  --bg-section: #ffffff;
  --bg-secondary-section: #f1f5f9;
  --bg-footer: #0f172a;
  --bg-header: rgba(255, 255, 255, 0.8);
  --bg-card: #ffffff;
  --bg-card-hover: #f8f9fd;

  /* BORDERS */
  --border: rgba(15, 23, 42, 0.08);
  --border-hover: rgba(15, 23, 42, 0.15);

  /* BUTTON STATES */
  --btn-primary-default: #3730d6;
  --btn-primary-hover: #312e81;
  --btn-primary-active: #1e1b4b;
  --btn-primary-disabled: #c7d2fe;

  /* SECONDARY BUTTON SYSTEM */
  --btn-secondary-default: #e2e8f0; /* Light gray-blue */
  --btn-secondary-hover: #cbd5e1; /* Slightly darker, visible hover */
  --btn-secondary-active: #94a3b8; /* Darker for pressed state */
  --btn-secondary-disabled: #f1f5f9; /* Very light for disabled */
  --btn-secondary-text: #1f2937; /* Dark text for readability */

  /* LINKS & INTERACTIONS */
  --link-default: var(--text-dark);
  --link-hover: var(--primary);
  --link-active: var(--primary-dark);
  --link-disabled: var(--text-secondary);

  /* INPUTS / FORMS */
  --input-bg: #ffffff;
  --input-border: rgba(15, 23, 42, 0.2);
  --input-border-focus: var(--primary);
  --input-placeholder: #94a3b8;
  --input-text: var(--text-primary);

  /* CODE SYNTAX TOKENS */
  --code-bg: #f8fafc;
  --code-text: #545454;
  --code-keyword: #d91e18;
  --code-string: #008000;
  --code-comment: #802200;
  --code-function: #326bad;
  --code-number: #a85d00;

  /* LAYOUT */
  --radius: 14px;
  --radius-full: 999px;
  --container: 1200px;
}

/* ==========================
   RESET & BASE
========================== */
*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  font-family:
    system-ui,
    -apple-system,
    BlinkMacSystemFont,
    "Segoe UI",
    Roboto,
    Helvetica,
    Arial,
    sans-serif;
  background: var(--bg-page);
  color: var(--text-primary);
  line-height: 1.6;
  overflow-x: hidden;
}

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

a {
  color: var(--link-default);
  text-decoration: none;
  transition: 0.2s ease;
}

a:hover {
  color: var(--link-hover);
}

a:active {
  color: var(--link-active);
}

a.disabled {
  color: var(--link-disabled);
  pointer-events: none;
  opacity: 0.6;
}

/* ==========================
   CONTAINER
========================== */
.container {
  max-width: var(--container);
  margin: 0 auto;
  padding: 0 1.5rem;
}

/* ==========================
   BUTTONS
========================== */
.btn-primary {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.7rem 1.6rem;
  background: var(--btn-primary-default);
  color: #fff;
  font-weight: 700;
  border-radius: var(--radius-full);
  transition: 0.25s ease;
  box-shadow: 0 6px 18px rgba(79, 70, 229, 0.25);
}

.btn-primary:hover {
  background: var(--btn-primary-hover);
  transform: translateY(-2px);
  color: #ffffff;
}

.btn-primary:active {
  background: var(--btn-primary-active);
}

.btn-primary:disabled {
  background: var(--btn-primary-disabled);
  cursor: not-allowed;
}

.btn-secondary {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.7rem 1.6rem;
  background: var(--btn-secondary-default);
  color: var(--text-primary);
  font-weight: 700;
  border-radius: var(--radius-full);
  transition: 0.25s ease;
}

.btn-secondary:hover {
  background: var(--btn-secondary-hover);
}

.btn-secondary:active {
  background: var(--btn-secondary-active);
}

.btn-secondary:disabled {
  background: var(--btn-secondary-disabled);
  cursor: not-allowed;
}

/* ==========================
   INPUTS / FORM ELEMENTS
========================== */
input,
textarea,
select {
  width: 100%;
  padding: 0.6rem 1rem;
  border: 1px solid var(--input-border);
  border-radius: var(--radius);
  background: var(--input-bg);
  color: var(--input-text);
  transition: 0.2s ease;
}

input::placeholder,
textarea::placeholder {
  color: var(--input-placeholder);
}

input:focus,
textarea:focus,
select:focus {
  outline: none;
  border-color: var(--input-border-focus);
  box-shadow: 0 0 0 3px rgba(99, 102, 241, 0.2);
}

/* ==========================
   CARDS
========================== */
.card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1.5rem;
  transition: 0.2s ease;
}

.card:hover {
  background: var(--bg-card-hover);
  border-color: var(--border-hover);
  transform: translateY(-2px);
}

/* ==========================
   HEADER / NAV
========================== */
.glass-nav {
  position: fixed;
  top: 0;
  width: 100%;
  height: 70px;
  background: var(--bg-header);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--border);
  z-index: 1000;
}

.nav-content {
  height: 100%;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.logo {
  font-size: 1.45rem;
  font-weight: 900;
  letter-spacing: -0.02em;
}

.logo span {
  color: var(--primary);
}

.nav-links {
  display: flex;
  align-items: center;
  gap: 1.8rem;
}

.nav-links a {
  font-size: 0.95rem;
  font-weight: 600;
  color: var(--text-secondary);
  transition: 0.2s ease;
}

.nav-links a:hover,
.nav-links a.active {
  color: var(--primary);
}

/* NAV BUTTON  */
.nav-links a.btn-primary {
  color: var(--text-light);
  background: var(--btn-primary-default);
}

.nav-links a.btn-primary:hover {
  color: var(--text-light);
  background: var(--btn-primary-hover);
}

.nav-links a.btn-primary:active {
  color: var(--text-light);
  background: var(--btn-primary-active);
}

.nav-links a.btn-primary:disabled {
  color: var(--text-light);
  background: var(--btn-primary-disabled);
  cursor: not-allowed;
}

.mobile-toggle {
  display: none;
  background: none;
  border: none;
  font-size: 1.7rem;
  cursor: pointer;
}

/* ==========================
   MOBILE NAV
========================== */
@media (max-width: 768px) {
  .mobile-toggle {
    display: block;
  }

  .nav-links {
    position: absolute;
    top: 70px;
    left: 0;
    width: 100%;
    background: var(--bg-secondary-section);
    border-bottom: 1px solid var(--border);
    flex-direction: column;
    gap: 1.2rem;
    padding: 1.5rem 0;
    display: none;
  }

  .nav-links.active {
    display: flex;
  }
}

/* ==========================
   FOOTER (Updated Colors for Contrast)
========================== */
.footer {
  margin-top: 5rem;
  background: var(--bg-footer);
  /* dark background */
  color: var(--text-light);
  /* all default text light */
  border-top: 1px solid var(--border);
}

.footer-cta {
  background: linear-gradient(
    135deg,
    var(--bg-hero-gradient-start),
    var(--bg-hero-gradient-end)
  );
  padding: 4rem 1.5rem;
  text-align: center;
  border-bottom: 1px solid var(--border);
}

.footer-cta h2,
.footer-cta p {
  color: var(--text-primary);
  /* dark text for CTA on light gradient */
}

.footer-cta p {
  max-width: 600px;
  margin: 0 auto 2rem;
}

.footer-grid {
  display: grid;
  grid-template-columns: 1.5fr 1fr 1fr 1.2fr;
  gap: 3rem;
  padding: 4rem 0;
}

.footer-desc {
  color: var(--text-light);
  /* light text for readability */
  margin: 1rem 0;
}

.footer-title {
  font-weight: 700;
  margin-bottom: 1.3rem;
  position: relative;
  color: var(--text-light);
}

.footer-title::after {
  content: "";
  position: absolute;
  left: 0;
  bottom: -8px;
  width: 30px;
  height: 2px;
  background: var(--primary);
}

.footer-links,
.footer-resources {
  list-style: none;
  padding: 0;
  margin: 0;
}

.footer-links li,
.footer-resources li {
  margin-bottom: 0.7rem;
  color: var(--text-light);
}

.footer-links a,
.footer-resources a {
  color: var(--text-light);
  transition: 0.2s ease;
}

.footer-links a:hover,
.footer-resources a:hover {
  color: var(--primary);
}

.footer-socials {
  display: flex;
  gap: 1rem;
}

.footer-socials a {
  font-size: 1.3rem;
  color: var(--text-light);
  transition: 0.2s ease;
}

.footer-socials a:hover {
  color: var(--primary);
}

.footer-bottom {
  /* border-top: 0.3px solid var(--primary-light); */
  border-top: 1px solid rgba(255, 255, 255, 0.1);
  padding: 1.5rem 0;
  text-align: center;
  font-size: 0.85rem;
  color: var(--text-light);
}

.footer-legal a {
  color: var(--text-light);
  margin: 0.5rem 0;
}

/* ==========================
   RESPONSIVE FOOTER
========================== */
@media (max-width: 992px) {
  .footer-grid {
    grid-template-columns: 1fr 1fr;
  }
}

@media (max-width: 600px) {
  .footer-grid {
    grid-template-columns: 1fr;
  }
}

/* ==========================
   CODE BLOCK STYLING
========================== */
code,
pre {
  background: var(--code-bg);
  color: var(--code-text);
  padding: 0.2rem 0.4rem;
  border-radius: var(--radius);
  font-family: "Courier New", Courier, monospace;
}

.code-keyword {
  color: var(--code-keyword);
}

.code-string {
  color: var(--code-string);
}

.code-comment {
  color: var(--code-comment);
}

.code-function {
  color: var(--code-function);
}

.code-number {
  color: var(--code-number);
}

/* Title Text */
.gradient-text {
  color: var(--primary);
}

/* ==========================
   BRAND TEXT LINK
========================== */
.link-primary {
  color: var(--primary);
  /* #5b5ff0 */
  font-weight: 600;
  text-decoration: none;
  transition: color 0.25s ease;
}

.link-primary:hover {
  color: var(--primary-dark);
  /* slightly darker purple on hover */
  text-decoration: underline;
}

/* ========================== BADGES ========================== */
.location-badge {
  display: inline-block;
  padding: 0.55rem 1.15rem;
  font-size: 0.7rem;
  letter-spacing: 0.12em;
  font-weight: 700;
  border-radius: 999px;
  text-transform: uppercase;
  background:
    radial-gradient(circle, rgba(99, 102, 241, 0.28) 1px, transparent 1px),
    linear-gradient(180deg, rgba(99, 102, 241, 0.08), rgba(99, 102, 241, 0.03));
  background-size:
    6px 6px,
    100%;
  color: var(--primary);
  margin-bottom: 0.9rem;
}
