/* ============================================================
   NorthcoreX — style.css
   Design tokens, base styles, components, layout, responsive
   ============================================================ */

/* ── Design Tokens ───────────────────────────────────────── */
:root {
  --bg:          #0d1426;
  --bg-card:     #121b30;
  --bg-hover:    #172040;
  --accent:      #4392f1;
  --accent-2:    #6dd3ce;
  --warn:        #d1603d;
  --gold:        #ddb967;
  --text:        #e8edf8;
  --text-muted:  #7a8aaa;
  --border:      rgba(67, 146, 241, 0.15);
  --radius:      12px;
  --transition:  200ms ease;

  --nav-height:  68px;
  --max-width:   1160px;
  --section-gap: 5rem;
}

/* ── Reset & Base ────────────────────────────────────────── */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

html {
  scroll-behavior: smooth;
  font-size: 16px;
}

body {
  font-family: 'Inter', system-ui, sans-serif;
  background: var(--bg);
  color: var(--text);
  line-height: 1.6;
  min-height: 100vh;
  -webkit-font-smoothing: antialiased;
}

img { max-width: 100%; display: block; }
a { color: var(--accent-2); text-decoration: none; transition: color var(--transition); }
a:hover { color: var(--accent); }

ul { list-style: none; }

/* ── Typography ──────────────────────────────────────────── */
h1, h2, h3, h4 {
  line-height: 1.2;
  font-weight: 700;
  color: var(--text);
}
h1 { font-size: clamp(2rem, 5vw, 3.2rem); }
h2 { font-size: clamp(1.5rem, 3vw, 2rem); }
h3 { font-size: 1.15rem; }
p  { color: var(--text-muted); }

/* ── Layout Helpers ──────────────────────────────────────── */
.container {
  width: 100%;
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 0 1.5rem;
}

section { padding: var(--section-gap) 0; }

.section-title {
  text-align: center;
  margin-bottom: 2.5rem;
}
.section-title h2 { margin-bottom: .5rem; }
.section-title p  { font-size: .95rem; }

/* ── Buttons ─────────────────────────────────────────────── */
.btn {
  display: inline-flex;
  align-items: center;
  gap: .5rem;
  padding: .75rem 1.75rem;
  border-radius: var(--radius);
  font-weight: 600;
  font-size: .95rem;
  cursor: pointer;
  border: none;
  transition: opacity var(--transition), transform var(--transition), background var(--transition);
}
.btn:hover { opacity: .88; transform: translateY(-1px); }
.btn:active { transform: translateY(0); }

.btn-primary {
  background: var(--accent);
  color: #fff;
}
.btn-secondary {
  background: transparent;
  color: var(--accent);
  border: 1.5px solid var(--accent);
}
.btn-secondary:hover { background: rgba(67,146,241,.08); color: var(--accent); }

.btn-sm {
  padding: .45rem 1rem;
  font-size: .82rem;
  border-radius: 8px;
}

/* ── Navbar ──────────────────────────────────────────────── */
#navbar {
  position: fixed;
  top: 0; left: 0; right: 0;
  height: var(--nav-height);
  background: rgba(13, 20, 38, 0.92);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--border);
  z-index: 1000;
  transition: box-shadow var(--transition);
}
#navbar.scrolled { box-shadow: 0 4px 24px rgba(0,0,0,.4); }

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

.nav-logo {
  display: flex;
  align-items: center;
  gap: .75rem;
  color: var(--text);
  font-weight: 700;
  font-size: 1.1rem;
  text-decoration: none;
}
.nav-logo img {
  height: 38px;
  width: auto;
}
.nav-logo:hover { color: var(--accent); }

.nav-links {
  display: flex;
  align-items: center;
  gap: 2rem;
}
.nav-links a {
  color: var(--text-muted);
  font-size: .92rem;
  font-weight: 500;
  transition: color var(--transition);
  position: relative;
}
.nav-links a::after {
  content: '';
  position: absolute;
  bottom: -3px; left: 0; right: 0;
  height: 2px;
  background: var(--accent);
  border-radius: 2px;
  transform: scaleX(0);
  transition: transform var(--transition);
}
.nav-links a:hover,
.nav-links a.active { color: var(--text); }
.nav-links a:hover::after,
.nav-links a.active::after { transform: scaleX(1); }

/* Hamburger */
.nav-toggle {
  display: none;
  flex-direction: column;
  gap: 5px;
  cursor: pointer;
  padding: .5rem;
  background: none;
  border: none;
}
.nav-toggle span {
  display: block;
  width: 24px; height: 2px;
  background: var(--text);
  border-radius: 2px;
  transition: transform var(--transition), opacity var(--transition);
}
.nav-toggle.open span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.nav-toggle.open span:nth-child(2) { opacity: 0; }
.nav-toggle.open span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

/* Mobile nav dropdown */
.nav-mobile {
  display: none;
  flex-direction: column;
  background: rgba(13, 20, 38, 0.98);
  border-top: 1px solid var(--border);
  padding: 1rem 1.5rem 1.5rem;
  gap: 0;
}
.nav-mobile.open { display: flex; }
.nav-mobile a {
  color: var(--text-muted);
  font-size: 1rem;
  font-weight: 500;
  padding: .75rem 0;
  border-bottom: 1px solid var(--border);
  transition: color var(--transition);
}
.nav-mobile a:last-child { border-bottom: none; }
.nav-mobile a:hover,
.nav-mobile a.active { color: var(--accent); }

/* ── Hero ────────────────────────────────────────────────── */
.hero {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  position: relative;
  overflow: hidden;
  padding-top: var(--nav-height);
}

/* Animated gradient background */
.hero::before {
  content: '';
  position: absolute;
  inset: 0;
  background:
    radial-gradient(ellipse 80% 60% at 20% 40%, rgba(67, 146, 241, 0.12) 0%, transparent 60%),
    radial-gradient(ellipse 60% 80% at 80% 70%, rgba(109, 211, 206, 0.08) 0%, transparent 60%),
    radial-gradient(ellipse 40% 40% at 60% 20%, rgba(221, 185, 103, 0.05) 0%, transparent 60%);
  animation: heroGlow 8s ease-in-out infinite alternate;
  pointer-events: none;
}

@keyframes heroGlow {
  0%   { opacity: .7; transform: scale(1); }
  100% { opacity: 1;  transform: scale(1.05); }
}

/* Subtle dot grid — replaces harsh lines */
.hero::after {
  content: '';
  position: absolute;
  inset: 0;
  background-image: radial-gradient(circle, rgba(67,146,241,.12) 1px, transparent 1px);
  background-size: 28px 28px;
  mask-image: radial-gradient(ellipse 80% 80% at 50% 50%, black 40%, transparent 100%);
  -webkit-mask-image: radial-gradient(ellipse 80% 80% at 50% 50%, black 40%, transparent 100%);
  pointer-events: none;
}

.hero-content {
  position: relative;
  z-index: 1;
  max-width: 760px;
}

.hero-badge {
  display: inline-block;
  padding: .35rem 1rem;
  background: rgba(67, 146, 241, 0.12);
  border: 1px solid rgba(67, 146, 241, 0.3);
  border-radius: 100px;
  font-size: .8rem;
  font-weight: 600;
  color: var(--accent);
  letter-spacing: .08em;
  text-transform: uppercase;
  margin-bottom: 1.5rem;
}

.hero h1 {
  margin-bottom: 1.25rem;
  letter-spacing: -.02em;
}

.hero h1 span {
  background: linear-gradient(135deg, var(--accent) 0%, var(--accent-2) 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.hero-desc {
  font-size: 1.1rem;
  color: var(--text-muted);
  max-width: 540px;
  margin: 0 auto 2.5rem;
}

.hero-cta {
  display: flex;
  gap: 1rem;
  justify-content: center;
  flex-wrap: wrap;
}

/* Scroll indicator */
.scroll-indicator {
  position: absolute;
  bottom: 2.5rem;
  left: 50%;
  transform: translateX(-50%);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: .4rem;
  color: var(--text-muted);
  font-size: .75rem;
  letter-spacing: .08em;
  text-transform: uppercase;
  animation: bounce 2s ease-in-out infinite;
  z-index: 1;
}
.scroll-indicator i { font-size: 1.1rem; }

@keyframes bounce {
  0%, 100% { transform: translateX(-50%) translateY(0); }
  50%       { transform: translateX(-50%) translateY(6px); }
}

/* ── Cards ───────────────────────────────────────────────── */
.card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
  transition: transform var(--transition), border-color var(--transition), box-shadow var(--transition);
}
.card:hover {
  transform: translateY(-4px);
  border-color: rgba(67, 146, 241, 0.4);
  box-shadow: 0 12px 40px rgba(0, 0, 0, 0.4);
}

.card-thumb {
  width: 100%;
  height: 180px;
  object-fit: cover;
  background: var(--bg-hover);
}

.card-body {
  padding: 1.25rem;
}

.card-meta {
  display: flex;
  align-items: center;
  gap: .6rem;
  margin-bottom: .75rem;
}

.badge {
  display: inline-flex;
  align-items: center;
  gap: .3rem;
  padding: .25rem .65rem;
  border-radius: 100px;
  font-size: .72rem;
  font-weight: 600;
  letter-spacing: .05em;
  text-transform: uppercase;
}
.badge-published {
  background: rgba(67, 146, 241, 0.15);
  color: var(--accent);
  border: 1px solid rgba(67, 146, 241, 0.3);
}
.badge-wip {
  background: rgba(209, 96, 61, 0.15);
  color: var(--warn);
  border: 1px solid rgba(209, 96, 61, 0.3);
}

.card h3 { margin-bottom: .5rem; }
.card p  { font-size: .88rem; line-height: 1.55; }

.card-actions {
  display: flex;
  gap: .5rem;
  flex-wrap: wrap;
  margin-top: 1rem;
  padding-top: 1rem;
  border-top: 1px solid var(--border);
}

/* ── Projects Grid ───────────────────────────────────────── */
.projects-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
  gap: 1.5rem;
}

/* ── Featured Projects (homepage) ───────────────────────── */
#featured { background: transparent; }

/* ── Support Us ──────────────────────────────────────────── */
#support {
  background: var(--bg-card);
  border-top: 1px solid var(--border);
  border-bottom: 1px solid var(--border);
}
.support-inner {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  gap: 1.25rem;
}
.support-inner h2 { color: var(--gold); }
.support-inner p  { max-width: 480px; }

/* ── Filter Bar (projects page) ─────────────────────────── */
.filter-bar {
  display: flex;
  justify-content: center;
  gap: .75rem;
  flex-wrap: wrap;
  margin-bottom: 2.5rem;
}
.filter-btn {
  padding: .45rem 1.2rem;
  border-radius: 100px;
  border: 1.5px solid var(--border);
  background: transparent;
  color: var(--text-muted);
  font-size: .85rem;
  font-weight: 500;
  cursor: pointer;
  transition: all var(--transition);
  font-family: inherit;
}
.filter-btn:hover,
.filter-btn.active {
  border-color: var(--accent);
  color: var(--accent);
  background: rgba(67, 146, 241, 0.08);
}

/* ── Page Header ─────────────────────────────────────────── */
.page-header {
  padding-top: calc(var(--nav-height) + 3rem);
  padding-bottom: 3rem;
  text-align: center;
}
.page-header h1 { margin-bottom: .75rem; }
.page-header p  { max-width: 500px; margin: 0 auto; }

/* ── Contact Form ────────────────────────────────────────── */
.contact-wrapper {
  display: grid;
  grid-template-columns: 1fr 1.6fr;
  gap: 3rem;
  align-items: start;
}

.contact-info h2 { margin-bottom: 1rem; }
.contact-info p  { margin-bottom: 1.5rem; }

.contact-detail {
  display: flex;
  align-items: center;
  gap: .75rem;
  color: var(--text-muted);
  font-size: .9rem;
  margin-bottom: .75rem;
}
.contact-detail i { color: var(--accent); width: 18px; text-align: center; }

.form-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 2rem;
}

.form-group {
  margin-bottom: 1.25rem;
}
.form-group label {
  display: block;
  font-size: .85rem;
  font-weight: 500;
  color: var(--text-muted);
  margin-bottom: .4rem;
}
.form-group input,
.form-group select,
.form-group textarea {
  width: 100%;
  background: var(--bg);
  border: 1.5px solid var(--border);
  border-radius: 8px;
  color: var(--text);
  font-family: inherit;
  font-size: .92rem;
  padding: .7rem 1rem;
  transition: border-color var(--transition);
  outline: none;
}
.form-group input:focus,
.form-group select:focus,
.form-group textarea:focus {
  border-color: var(--accent);
  box-shadow: 0 0 0 3px rgba(67, 146, 241, 0.1);
}
.form-group select {
  cursor: pointer;
  appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8' viewBox='0 0 12 8'%3E%3Cpath fill='%237a8aaa' d='M6 8L0 0h12z'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 1rem center;
  padding-right: 2.5rem;
}
.form-group select option { background: var(--bg-card); }
.form-group textarea { resize: vertical; min-height: 130px; }

.form-submit { width: 100%; justify-content: center; }

.form-note {
  text-align: center;
  font-size: .8rem;
  color: var(--text-muted);
  margin-top: .75rem;
}

/* Form feedback */
#form-success {
  display: none;
  background: rgba(109, 211, 206, 0.1);
  border: 1px solid rgba(109, 211, 206, 0.3);
  border-radius: var(--radius);
  padding: 1.25rem;
  text-align: center;
  color: var(--accent-2);
  margin-top: 1rem;
}

/* ── Impressum ───────────────────────────────────────────── */
.legal-wrapper {
  max-width: 760px;
  margin: 0 auto;
}
.legal-section {
  margin-bottom: 3rem;
}
.legal-section h2 {
  font-size: 1.3rem;
  margin-bottom: 1rem;
  color: var(--accent);
  border-bottom: 1px solid var(--border);
  padding-bottom: .5rem;
}
.legal-section h3 {
  font-size: 1rem;
  color: var(--text);
  margin: 1.25rem 0 .5rem;
}
.legal-section p,
.legal-section li {
  font-size: .9rem;
  color: var(--text-muted);
  line-height: 1.7;
}
.legal-section ul { padding-left: 1.25rem; list-style: disc; }
.legal-section ul li { margin-bottom: .35rem; }
.legal-section a { color: var(--accent-2); }

/* ── Footer ──────────────────────────────────────────────── */
footer {
  background: var(--bg-card);
  border-top: 1px solid var(--border);
  padding: 3.5rem 0 1.5rem;
}

.footer-top {
  display: grid;
  grid-template-columns: 1.5fr 1fr 1fr 1fr;
  gap: 2.5rem;
  margin-bottom: 2.5rem;
}

.footer-brand .nav-logo { margin-bottom: 1rem; }
.footer-brand p { font-size: .88rem; max-width: 240px; }

.footer-col h4 {
  font-size: .8rem;
  text-transform: uppercase;
  letter-spacing: .1em;
  color: var(--text-muted);
  margin-bottom: 1rem;
}
/* Plain nav/text links only — excludes icon buttons */
.footer-col a:not(.social-icon):not(.footer-store-link) {
  display: block;
  color: var(--text-muted);
  font-size: .88rem;
  margin-bottom: .5rem;
  transition: color var(--transition);
}
.footer-col a:not(.social-icon):not(.footer-store-link):hover { color: var(--accent); }
.footer-col a:not(.social-icon):not(.footer-store-link) i { width: 18px; margin-right: .4rem; }

.footer-social {
  display: flex;
  gap: .75rem;
  margin-top: .5rem;
}
.social-icon {
  width: 36px; height: 36px;
  border-radius: 8px;
  background: rgba(255,255,255,.05);
  border: 1px solid var(--border);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--text-muted);
  font-size: .9rem;
  line-height: 1;
  transition: all var(--transition);
  flex-shrink: 0;
}
.social-icon i {
  display: block;
  line-height: 1;
  width: 1em;
  text-align: center;
}
.social-icon:hover {
  background: rgba(67, 146, 241, 0.12);
  border-color: var(--accent);
  color: var(--accent);
}

.footer-bottom {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 1rem;
  padding-top: 1.5rem;
  border-top: 1px solid var(--border);
  font-size: .82rem;
  color: var(--text-muted);
}
.footer-bottom a { color: var(--text-muted); }
.footer-bottom a:hover { color: var(--accent); }

/* ── Divider ─────────────────────────────────────────────── */
.divider {
  width: 60px; height: 3px;
  background: linear-gradient(90deg, var(--accent), var(--accent-2));
  border-radius: 3px;
  margin: .75rem auto 0;
}

/* ── Responsive ──────────────────────────────────────────── */
@media (max-width: 1024px) {
  .footer-top { grid-template-columns: 1fr 1fr; }
}

@media (max-width: 768px) {
  :root { --section-gap: 3.5rem; }

  .nav-links { display: none; }
  .nav-toggle { display: flex; }

  .hero { min-height: 95vh; }

  .contact-wrapper { grid-template-columns: 1fr; }
  .contact-info { order: 2; }
  .form-card { order: 1; }

  .footer-top {
    grid-template-columns: 1fr 1fr;
    gap: 2rem;
  }
  .footer-brand { grid-column: 1 / -1; }

  .footer-bottom {
    flex-direction: column;
    text-align: center;
  }
}

@media (max-width: 480px) {
  .footer-top { grid-template-columns: 1fr; }
  .hero-cta { flex-direction: column; align-items: center; }
  .projects-grid { grid-template-columns: 1fr; }
}

/* ── Utility ─────────────────────────────────────────────── */
.text-accent   { color: var(--accent); }
.text-accent-2 { color: var(--accent-2); }
.text-gold     { color: var(--gold); }
.text-warn     { color: var(--warn); }
.text-muted    { color: var(--text-muted); }

.mt-1 { margin-top: .5rem; }
.mt-2 { margin-top: 1rem; }
.mt-3 { margin-top: 1.5rem; }

/* ── Fade-in animation ───────────────────────────────────── */
.fade-in {
  opacity: 0;
  transform: translateY(20px);
  transition: opacity .5s ease, transform .5s ease;
}
.fade-in.visible {
  opacity: 1;
  transform: translateY(0);
}

/* ── Language Switcher ───────────────────────────────────── */
.lang-switcher {
  position: relative;
  margin-left: .5rem;
}

.lang-btn {
  display: flex;
  align-items: center;
  gap: .35rem;
  background: transparent;
  border: 1.5px solid var(--border);
  border-radius: 8px;
  color: var(--text-muted);
  font-family: inherit;
  font-size: .8rem;
  font-weight: 600;
  letter-spacing: .04em;
  padding: .32rem .65rem;
  cursor: pointer;
  transition: all var(--transition);
  white-space: nowrap;
}
.lang-btn:hover,
.lang-btn.open {
  border-color: var(--accent);
  color: var(--accent);
  background: rgba(67,146,241,.06);
}
.lang-btn i.fa-globe { font-size: .85rem; }

.lang-chevron {
  font-size: .6rem;
  transition: transform var(--transition);
  opacity: .6;
}
.lang-btn.open .lang-chevron { transform: rotate(180deg); }

.lang-dropdown {
  display: none;
  position: absolute;
  top: calc(100% + 8px);
  right: 0;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: .35rem;
  min-width: 148px;
  box-shadow: 0 8px 32px rgba(0,0,0,.45);
  z-index: 500;
}
.lang-dropdown.open { display: block; }

.lang-option {
  display: flex;
  align-items: center;
  gap: .55rem;
  width: 100%;
  background: transparent;
  border: none;
  color: var(--text-muted);
  font-family: inherit;
  font-size: .86rem;
  font-weight: 500;
  padding: .5rem .75rem;
  border-radius: 8px;
  cursor: pointer;
  transition: all var(--transition);
  text-align: left;
}
.lang-option:hover { background: rgba(67,146,241,.08); color: var(--text); }
.lang-option.active { color: var(--accent); background: rgba(67,146,241,.1); font-weight: 600; }

/* Mobile language strip */
.nav-mobile-lang {
  padding: .75rem 0 .25rem;
  border-top: 1px solid var(--border);
  margin-top: .25rem;
}
.nav-mobile-lang .lang-label {
  font-size: .75rem;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: .09em;
  display: block;
  margin-bottom: .6rem;
}
.lang-mobile-strip {
  display: flex;
  gap: .4rem;
}
.lang-mobile-strip .lang-option {
  flex: 1;
  justify-content: center;
  border: 1.5px solid var(--border);
  border-radius: 8px;
  padding: .4rem .3rem;
  font-size: .78rem;
  gap: .3rem;
}
.lang-mobile-strip .lang-option.active { border-color: var(--accent); }

/* ── Footer Store Links (with pop) ──────────────────────── */
.footer-store-link {
  display: inline-flex;
  align-items: center;
  gap: .55rem;
  padding: .55rem 1rem;
  margin-bottom: .5rem;
  border: 1.5px solid rgba(67,146,241,.28);
  border-radius: 9px;
  background: rgba(67,146,241,.06);
  color: var(--text) !important;
  font-size: .86rem;
  font-weight: 600;
  transition: all var(--transition);
  width: fit-content;
  text-decoration: none;
}
.footer-store-link i { font-size: 1.05rem; }
.footer-store-link:hover {
  border-color: var(--accent);
  background: rgba(67,146,241,.14);
  color: var(--accent) !important;
  transform: translateY(-1px);
  box-shadow: 0 4px 16px rgba(67,146,241,.15);
}
