/* =========================================================
   SmartersWEB – Global Styles
   ========================================================= */

/* Reset / base */
*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  padding: 0;
  font-family: system-ui, -apple-system, BlinkMacSystemFont, "Inter", sans-serif;
  font-size: 16px;
  line-height: 1.6;
  color: #0f172a;
  background-color: #f9fafb;
}

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

a {
  color: #0f172a;
  text-decoration: none;
}

a:hover {
  color: #f97316;
}

ul {
  margin: 0;
  padding: 0;
  list-style: none;
}

button {
  font-family: inherit;
}

/* Layout helpers */
.container {
  width: 100%;
  max-width: 1120px;
  margin: 0 auto;
  padding: 0 16px;
}

main {
  min-height: 60vh;
}

/* =========================================================
   Header / Navigation
   ========================================================= */

.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: rgba(15, 23, 42, 0.98);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid rgba(15, 23, 42, 0.75);
  color: #e5e7eb;
}

.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 12px 0;
  gap: 16px;
}

.logo img {
  height: 32px;
  width: auto;
}

.main-nav {
  flex: 1 1 auto;
}

.main-nav ul {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 18px;
}

.nav-link {
  font-size: 0.95rem;
  font-weight: 500;
  color: #e5e7eb;
  padding: 6px 0;
  border-bottom: 2px solid transparent;
}

.nav-link:hover {
  color: #facc15;
}

.nav-link.active {
  border-color: #f97316;
  color: #f97316;
}

.header-actions {
  display: flex;
  align-items: center;
  gap: 10px;
}

/* Mobile nav toggle */
.nav-toggle {
  display: none;
  flex-direction: column;
  gap: 4px;
  border: none;
  background: none;
  cursor: pointer;
}

.nav-toggle span {
  width: 20px;
  height: 2px;
  background: #e5e7eb;
  border-radius: 999px;
}

/* =========================================================
   Buttons
   ========================================================= */

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 999px;
  border: 1px solid transparent;
  padding: 9px 16px;
  font-size: 0.95rem;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.16s ease;
  text-decoration: none;
}

.btn-primary,
.btn-primary-sm {
  background: linear-gradient(135deg, #4f46e5, #0ea5e9);
  color: #f9fafb;
  border-color: transparent;
}

.btn-primary:hover,
.btn-primary-sm:hover {
  background: linear-gradient(135deg, #4338ca, #0284c7);
  color: #ffffff;
}

.btn-outline,
.btn-outline-sm {
  border-color: #4f46e5;
  background: transparent;
  color: #111827;
}

.btn-outline:hover,
.btn-outline-sm:hover {
  background: rgba(79, 70, 229, 0.08);
}

.btn-ghost-sm {
  background: transparent;
  border-color: transparent;
  color: #e5e7eb;
}

.btn-ghost-sm:hover {
  background: rgba(148, 163, 184, 0.16);
}

.btn-primary-sm {
  padding: 7px 14px;
  font-size: 0.9rem;
}

.btn-outline-sm,
.btn-ghost-sm {
  padding: 7px 12px;
  font-size: 0.9rem;
}

/* OAuth buttons */
.btn-oauth {
  width: 100%;
  justify-content: flex-start;
  border-radius: 999px;
  padding: 8px 14px;
  background: #ffffff;
  border-color: #e5e7eb;
  color: #111827;
  font-size: 0.9rem;
  gap: 8px;
}

.btn-oauth img {
  width: 18px;
  height: 18px;
}

.btn-oauth:hover {
  border-color: #4f46e5;
}

/* =========================================================
   Hero / Sections (generic)
   ========================================================= */

.section-pad {
  padding: 56px 0;
}

.page-hero,
.inner-hero {
  padding: 72px 0 36px;
  background: radial-gradient(circle at top left, #1d4ed8 0, #020617 40%, #020617 100%);
  color: #e5e7eb;
}

.page-hero h1,
.inner-hero h1 {
  font-size: 2.4rem;
  line-height: 1.15;
  margin-bottom: 10px;
}

.page-hero p,
.inner-hero p {
  max-width: 640px;
  color: #cbd5f5;
}

/* Cards / grids */
.services-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(230px, 1fr));
  gap: 20px;
}

.service-card {
  background: #ffffff;
  border-radius: 14px;
  padding: 18px 18px 16px;
  border: 1px solid #e5e7eb;
  box-shadow: 0 10px 25px rgba(15, 23, 42, 0.06);
}

.service-card h3 {
  font-size: 1.05rem;
  margin: 0 0 6px;
}

.service-card p {
  margin: 0 0 10px;
  font-size: 0.95rem;
  color: #6b7280;
}

.service-card a {
  font-size: 0.9rem;
  color: #4f46e5;
}

.section-title {
  font-size: 1.6rem;
  margin-bottom: 14px;
}

/* CTA band */
.cta-band {
  border-radius: 16px;
  padding: 28px 24px;
  display: flex;
  flex-direction: column;
  gap: 10px;
  align-items: flex-start;
}

.bg-primary {
  background: linear-gradient(135deg, #4f46e5, #0ea5e9);
  color: #f9fafb;
}

.cta-band .btn {
  margin-top: 4px;
}

/* =========================================================
   Auth Pages
   ========================================================= */

.auth-page {
  min-height: calc(100vh - 140px);
  display: flex;
  align-items: center;
  justify-content: center;
  background: radial-gradient(circle at top, #e5e7eb 0, #f9fafb 40%);
  padding: 40px 16px;
}

.auth-card {
  width: 100%;
  max-width: 420px;
  background: #ffffff;
  border-radius: 20px;
  padding: 28px 24px 24px;
  box-shadow: 0 20px 50px rgba(15, 23, 42, 0.12);
  border: 1px solid #e5e7eb;
}

.auth-logo {
  display: flex;
  justify-content: center;
  margin-bottom: 10px;
}

.auth-logo img {
  height: 32px;
}

.auth-card h1 {
  font-size: 1.5rem;
  margin: 0 0 4px;
  text-align: center;
}

.auth-sub {
  font-size: 0.95rem;
  color: #6b7280;
  text-align: center;
  margin: 0 0 14px;
}

.oauth-buttons {
  display: flex;
  flex-direction: column;
  gap: 8px;
  margin-bottom: 12px;
}

.auth-divider {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 0.8rem;
  color: #9ca3af;
  margin: 10px 0;
}

.auth-divider span {
  flex: 1;
  height: 1px;
  background: #e5e7eb;
}

.auth-form {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.auth-form label {
  font-size: 0.85rem;
  font-weight: 500;
  color: #111827;
}

.auth-form input {
  width: 100%;
  border-radius: 999px;
  border: 1px solid #d1d5db;
  padding: 8px 12px;
  font-size: 0.9rem;
  outline: none;
}

.auth-form input:focus {
  border-color: #4f46e5;
  box-shadow: 0 0 0 1px rgba(79, 70, 229, 0.35);
}

.auth-meta {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 0.8rem;
  margin-top: 4px;
}

.auth-meta a {
  font-size: 0.8rem;
  color: #4f46e5;
}

.auth-footer {
  margin-top: 12px;
  font-size: 0.85rem;
  text-align: center;
  color: #6b7280;
}

/* =========================================================
   Language Switcher
   ========================================================= */

.lang-switcher {
  position: relative;
}

.lang-switcher-btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  border-radius: 999px;
  border: 1px solid rgba(148, 163, 184, 0.4);
  background: rgba(15, 23, 42, 0.5);
  color: #e5e7eb;
  padding: 4px 10px;
  font-size: 0.85rem;
  cursor: pointer;
}

.lang-flag {
  font-size: 1.05rem;
}

.lang-caret {
  font-size: 0.7rem;
}

.lang-dropdown {
  position: absolute;
  right: 0;
  top: 110%;
  min-width: 170px;
  background: #020617;
  border-radius: 12px;
  padding: 6px 0;
  box-shadow: 0 18px 45px rgba(15, 23, 42, 0.65);
  border: 1px solid #1f2937;
  display: none;
  z-index: 40;
}

.lang-dropdown.open {
  display: block;
}

.lang-option {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 7px 10px;
  color: #e5e7eb;
  font-size: 0.9rem;
}

.lang-option:hover {
  background: #111827;
}

.lang-option.active {
  background: #111827;
}

.lang-option-flag {
  font-size: 1.1rem;
}

.lang-option-name {
  flex: 1;
}

.lang-check {
  font-size: 0.75rem;
  color: #22c55e;
}

/* =========================================================
   Footer
   ========================================================= */

.site-footer {
  background: #020617;
  color: #e5e7eb;
  margin-top: 64px;
  border-top: 1px solid #111827;
}

.footer-inner {
  display: flex;
  flex-wrap: wrap;
  gap: 32px;
  padding: 40px 0 32px;
}

.footer-brand {
  flex: 1 1 260px;
}

.footer-logo img {
  height: 32px;
  width: auto;
  display: block;
  margin-bottom: 12px;
}

.footer-tagline {
  max-width: 360px;
  font-size: 0.95rem;
  color: #9ca3af;
}

.footer-columns {
  display: flex;
  flex: 2 1 340px;
  gap: 32px;
  flex-wrap: wrap;
}

.footer-column h3 {
  font-size: 0.95rem;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: #9ca3af;
  margin-bottom: 10px;
}

.footer-column ul {
  list-style: none;
  margin: 0;
  padding: 0;
}

.footer-column li + li {
  margin-top: 6px;
}

.footer-column a {
  color: #e5e7eb;
  font-size: 0.95rem;
}

.footer-column a:hover {
  color: #f97316;
}

.footer-bottom {
  border-top: 1px solid #111827;
  padding: 12px 0 14px;
  background: #020617;
}

.footer-bottom-inner {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 0.85rem;
  color: #6b7280;
}

/* =========================================================
   Responsive
   ========================================================= */

@media (max-width: 960px) {
  .main-nav {
    position: absolute;
    left: 0;
    right: 0;
    top: 56px;
    background: #020617;
    padding: 10px 16px 12px;
    display: none;
  }
  .main-nav ul {
    flex-direction: column;
    align-items: flex-start;
  }
  .main-nav.open {
    display: block;
  }

  .header-inner {
    padding: 10px 0;
  }

  .header-actions {
    display: none;
  }

  .nav-toggle {
    display: flex;
  }
}

@media (max-width: 768px) {
  .page-hero h1,
  .inner-hero h1 {
    font-size: 2rem;
  }

  .footer-inner {
    flex-direction: column;
  }

  .footer-columns {
    flex-direction: column;
  }

  .footer-bottom-inner {
    flex-direction: column;
    gap: 6px;
    text-align: center;
  }
}
