/* ============================================================
   bewerbungsguide.ch — shared UI base
   ============================================================ */

/* Design tokens */
:root {
  --paper: #f9f8f5;
  --paper-2: #f1efe9;
  --paper-3: #e6e3db;
  --white: #ffffff;
  --text: #1a1a18;
  --text-2: #46463f;
  --text-3: #7c7b73;
  --border: #dcd9d0;
  --border-2: #c8c4bb;
  --anthracite: #28333f;
  --anth-2: #1e2830;
  --lime: #C6F54A;
  --lime-muted: #e8fbbd;
  --lime-dark: #3a5800;
  --f-head: 'Archivo', system-ui, sans-serif;
  --f-body: 'Hanken Grotesk', system-ui, sans-serif;
  --radius-sm: 4px;
  --radius: 8px;
  --radius-lg: 14px;
  --shadow-xs: 0 1px 2px rgba(0,0,0,.05);
  --shadow-sm: 0 1px 4px rgba(0,0,0,.07), 0 1px 2px rgba(0,0,0,.04);
  --shadow: 0 4px 16px rgba(0,0,0,.08), 0 1px 4px rgba(0,0,0,.04);
}

/* Global reset */
*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  scroll-behavior: smooth;
}

body {
  font-family: var(--f-body);
  background: var(--paper);
  color: var(--text);
  font-size: 16px;
  line-height: 1.7;
  font-weight: 400;
  -webkit-font-smoothing: antialiased;
}

/* ============================================================
   Navbar
   ============================================================ */

.bg-nav {
  position: sticky;
  top: 0;
  z-index: 100;
  background: var(--anthracite);
  height: 52px;
  display: flex;
  align-items: stretch;
  box-shadow: 0 1px 0 rgba(255,255,255,.05), 0 2px 12px rgba(0,0,0,.18);
}

.bg-nav-inner {
  max-width: 1100px;
  margin: 0 auto;
  display: flex;
  align-items: stretch;
  width: 100%;
  padding: 0 1.5rem;
}

.bg-nav-brand {
  display: flex;
  align-items: center;
  gap: 0;
  text-decoration: none;
  color: var(--white);
  font-family: 'Archivo', system-ui, sans-serif;
  font-size: 17px;
  letter-spacing: -0.03em;
  padding-right: 1.5rem;
}

.bg-nav-brand .brand-w-main {
  font-weight: 300;
}

.bg-nav-brand .brand-w-bold {
  font-weight: 700;
}

.bg-nav-brand .brand-w-domain {
  font-weight: 300;
  opacity: 0.4;
  font-size: 11px;
  letter-spacing: -0.02em;
}

.bg-nav-links {
  display: flex;
  align-items: center;
  gap: 0;
  flex: 1;
  padding-left: 0.5rem;
}

.bg-nav-link {
  font-size: 12px;
  font-weight: 500;
  color: rgba(255,255,255,.42);
  padding: 0 1rem;
  height: 100%;
  display: flex;
  align-items: center;
  text-decoration: none;
  transition: color .12s;
}

.bg-nav-link:hover {
  color: rgba(255,255,255,.82);
}

.bg-nav-link.active {
  color: var(--white);
}

.bg-nav-auth {
  margin-left: auto;
  display: flex;
  align-items: center;
  flex-shrink: 0;
}

.bg-login-link {
  font-size: 12px;
  font-weight: 600;
  color: rgba(255,255,255,.65);
  text-decoration: none;
  padding: 6px 14px;
  border: 1px solid rgba(255,255,255,.2);
  border-radius: 6px;
  transition: color .12s, border-color .12s;
}

.bg-login-link:hover {
  color: var(--white);
  border-color: rgba(255,255,255,.5);
}

/* ============================================================
   Profile avatar / dropdown
   ============================================================ */

.bg-profile-wrap {
  position: relative;
}

.bg-profile-btn {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  background: var(--lime);
  color: var(--lime-dark);
  font-family: var(--f-head);
  font-size: 13px;
  font-weight: 700;
  border: none;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: opacity .12s;
}

.bg-profile-btn:hover {
  opacity: 0.88;
}

.bg-profile-btn:focus-visible {
  outline: 2px solid var(--lime);
  outline-offset: 2px;
}

.bg-profile-menu {
  position: absolute;
  right: 0;
  top: calc(100% + 8px);
  background: var(--white);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  min-width: 200px;
  z-index: 200;
  overflow: hidden;
}

.bg-profile-menu[hidden] {
  display: none;
}

.bg-menu-user {
  padding: 12px 16px 8px;
  font-size: 12px;
  color: var(--text-3);
  border-bottom: 1px solid var(--border);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.bg-menu-item {
  display: block;
  padding: 10px 16px;
  font-size: 13px;
  font-weight: 500;
  color: var(--text);
  text-decoration: none;
  transition: background .1s;
}

.bg-menu-item:hover {
  background: var(--paper-2);
}

button.bg-menu-item {
  width: 100%;
  text-align: left;
  background: none;
  border: none;
  cursor: pointer;
  font-family: var(--f-body);
}

.bg-menu-divider {
  height: 1px;
  background: var(--border);
  margin: 4px 0;
}

.bg-menu-logout {
  color: #b91c1c;
}

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

.bg-footer {
  background: var(--paper-2);
  border-top: 1px solid var(--border);
  padding: 1.5rem 2rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  flex-wrap: wrap;
}

.bg-footer-inner {
  max-width: 1100px;
  margin: 0 auto;
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  flex-wrap: wrap;
}

.bg-footer-brand {
  font-family: 'Archivo', system-ui, sans-serif;
  font-size: 13px;
  font-weight: 700;
  color: var(--text);
  text-decoration: none;
  letter-spacing: -0.02em;
}

.bg-footer-brand .fw-light {
  font-weight: 300;
}

.bg-footer-brand .fw-bold {
  font-weight: 700;
}

.bg-footer-links {
  display: flex;
  gap: 1.5rem;
  flex-wrap: wrap;
}

.bg-footer-link {
  font-size: 12px;
  font-weight: 400;
  color: var(--text-3);
  text-decoration: none;
  transition: color .12s;
}

.bg-footer-link:hover {
  color: var(--text);
}

.bg-footer-note {
  font-size: 11px;
  color: var(--text-3);
  margin-top: 0.25rem;
}

/* ============================================================
   Page container utilities
   ============================================================ */

.bg-page-wrap {
  max-width: 720px;
  margin: 0 auto;
  padding: 3rem 2rem;
}

.bg-page-wide {
  max-width: 1100px;
  margin: 0 auto;
  padding: 3rem 2rem;
}

.bg-section {
  padding: 3rem 0;
}

/* ============================================================
   Button utilities
   ============================================================ */

.bg-btn-primary {
  background: var(--anthracite);
  color: var(--white);
  border-radius: var(--radius-lg);
  padding: 12px 24px;
  font-size: 14px;
  font-weight: 600;
  border: 2px solid var(--anthracite);
  cursor: pointer;
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  transition: background .12s, border-color .12s;
}

.bg-btn-primary:hover {
  background: var(--anth-2);
  border-color: var(--anth-2);
}

.bg-btn-secondary {
  background: transparent;
  color: var(--anthracite);
  border-radius: var(--radius-lg);
  padding: 12px 24px;
  font-size: 14px;
  font-weight: 600;
  border: 2px solid var(--anthracite);
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  transition: background .12s;
}

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

.bg-btn-lime {
  background: var(--lime);
  color: var(--lime-dark);
  border-radius: var(--radius-sm);
  padding: 12px 24px;
  font-size: 14px;
  font-weight: 700;
  letter-spacing: 0.02em;
  border: 2px solid var(--lime);
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  transition: background .12s, border-color .12s;
}

.bg-btn-lime:hover {
  background: #b8e83a;
  border-color: #b8e83a;
}

/* ============================================================
   Card
   ============================================================ */

.bg-card {
  background: var(--white);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 24px;
}

/* ============================================================
   Auth state cards
   ============================================================ */

.bg-auth-state {
  padding: 3rem;
  text-align: center;
  background: var(--white);
  border: 1px solid var(--border);
  border-radius: 12px;
}

.bg-auth-email {
  font-size: 15px;
  font-weight: 600;
  color: var(--text);
}

.bg-auth-label {
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--text-3);
  margin-bottom: 0.5rem;
}

/* ============================================================
   Profile page
   ============================================================ */

.bg-profile-section {
  margin-bottom: 2rem;
}

.bg-profile-section-title {
  font-size: 13px;
  font-weight: 700;
  color: var(--text-3);
  text-transform: uppercase;
  letter-spacing: 0.1em;
  margin-bottom: 1rem;
}

.bg-quick-links {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 12px;
}

.bg-quick-link {
  background: var(--white);
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 16px;
  text-decoration: none;
  color: var(--text);
  font-size: 14px;
  font-weight: 500;
  transition: border-color .12s, box-shadow .12s;
}

.bg-quick-link:hover {
  border-color: var(--border-2);
  box-shadow: var(--shadow-xs);
}

/* ============================================================
   Typography utilities
   ============================================================ */

.bg-kicker {
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--text-3);
}

.bg-page-title {
  font-family: var(--f-head);
  font-size: clamp(24px, 4vw, 36px);
  font-weight: 800;
  letter-spacing: -0.02em;
  color: var(--text);
  margin-bottom: 0.5rem;
}

.bg-page-lead {
  font-size: 15px;
  color: var(--text-2);
  line-height: 1.7;
}

/* ============================================================
   Auth loading state
   ============================================================ */

.bg-auth-loading {
  opacity: 0;
  animation: fadeIn 0.2s ease 0.1s forwards;
}

@keyframes fadeIn {
  from { opacity: 0; }
  to   { opacity: 1; }
}

/* ============================================================
   Page header (legal / static pages)
   ============================================================ */

.bg-page-header {
  background: var(--white);
  border-bottom: 1px solid var(--border);
  padding: 3rem 2rem 2.5rem;
}

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

@media (max-width: 768px) {
  .bg-nav-links {
    display: none;
  }
}

@media (max-width: 640px) {
  .bg-footer-inner {
    flex-direction: column;
    align-items: flex-start;
  }

  .bg-page-wrap {
    padding: 2rem 1.25rem;
  }
}
