@import url('https://fonts.googleapis.com/css2?family=Playfair+Display:wght@600;700&family=Inter:wght@400;500;600&family=Cormorant+Garamond:wght@600;700&family=DM+Serif+Display&family=Lora:wght@600;700&family=Montserrat:wght@600;700&family=Poppins:wght@600;700&family=Work+Sans:wght@600;700&display=swap');
/* One @import for every selectable display font (assets/js/font-options.js)
   so the editor's font pickers and every guest-facing page share a single
   fetch instead of each page declaring its own subset. */

:root {
  /* Premium dark-blue + gold palette (v2): deep navy canvas, restrained gold
     accent reserved for actions/emphasis, neutral cool grays for structure
     and body text. Replaces the earlier warm brown/bordeaux identity. */
  --bg: #0a0e17;              /* deep navy canvas */
  --bg-soft: #10182a;         /* card/panel surface */
  --bg-softer: #182338;       /* higher elevation: nested cards, hover fills */
  --gold: #c9a94e;
  --gold-soft: #e0c274;
  --gold-deep: #96792f;
  --bordeaux: #7a1f2b;        /* legacy alias, kept for rare decorative use */
  --amber: #d9853b;
  --amber-soft: #e8a769;
  --cream: #e9edf6;           /* cool off-white primary text */
  --muted: #8b93a9;           /* cool slate secondary text */
  --muted-soft: #5d6478;      /* dimmer tertiary text (timestamps, meta) */
  --success: #6fcf9a;
  --danger: #e8798a;

  /* Semantic hairlines — neutral cool-gray structure, gold reserved for
     emphasis/active states only (kept as a separate accent-border token). */
  --border: rgba(148, 163, 191, 0.14);
  --border-strong: rgba(148, 163, 191, 0.26);
  --border-accent: rgba(201, 169, 78, 0.32);
  --edge-highlight: rgba(255, 255, 255, 0.03);  /* top glass edge on surfaces */

  /* Radii scale */
  --radius-sm: 9px;
  --radius: 14px;
  --radius-lg: 20px;

  /* Layered elevation — soft, modern (Linear/Vercel-style depth) */
  --shadow-sm: 0 1px 2px rgba(0, 0, 0, 0.30);
  --shadow-md: 0 6px 20px -6px rgba(0, 0, 0, 0.45);
  --shadow-lg: 0 24px 60px -12px rgba(0, 0, 0, 0.60);
  --shadow: var(--shadow-lg); /* back-compat alias */

  /* Motion */
  --ease: cubic-bezier(0.32, 0.72, 0, 1);
  --dur: 0.18s;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  font-family: 'Inter', system-ui, sans-serif;
  background: var(--bg);
  color: var(--cream);
  -webkit-font-smoothing: antialiased;   /* crisp text on dark surfaces */
  -moz-osx-font-smoothing: grayscale;
  text-rendering: optimizeLegibility;
  letter-spacing: -0.006em;              /* subtle optical tightening */
}
h1, h2, h3, .display { font-family: 'Playfair Display', Georgia, serif; letter-spacing: -0.01em; }
a { color: inherit; text-decoration: none; }
::selection { background: rgba(201, 169, 78, 0.28); color: var(--cream); }

/* Subtle themed scrollbars app-wide (WebKit + Firefox) */
* { scrollbar-width: thin; scrollbar-color: rgba(148, 163, 191, 0.28) transparent; }
::-webkit-scrollbar { width: 11px; height: 11px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb {
  background-color: rgba(148, 163, 191, 0.22);
  border-radius: 999px;
  border: 3px solid transparent;
  background-clip: padding-box;
}
::-webkit-scrollbar-thumb:hover { background-color: rgba(201, 169, 78, 0.38); }

@media (prefers-reduced-motion: reduce) {
  * { animation-duration: 0.001ms !important; transition-duration: 0.001ms !important; scroll-behavior: auto !important; }
}

/* Shared ornamental page background (management/dashboard-style pages).
   Apply via <body class="ornate-bg"> instead of redefining per page. */
body.ornate-bg {
  min-height: 100vh;
  background:
    radial-gradient(ellipse 900px 500px at 50% -10%, rgba(201, 169, 78, 0.10), transparent 60%),
    radial-gradient(ellipse 800px 420px at 50% 108%, rgba(74, 108, 168, 0.10), transparent 62%),
    repeating-linear-gradient(135deg, rgba(148, 163, 191, 0.025) 0px, rgba(148, 163, 191, 0.025) 1px, transparent 1px, transparent 26px),
    var(--bg);
  background-repeat: no-repeat, no-repeat, repeat, no-repeat;
  background-attachment: fixed;
}

:focus-visible {
  outline: 2px solid var(--gold-soft);
  outline-offset: 2px;
}

.visually-hidden {
  position: absolute;
  width: 1px; height: 1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
}

/* Skip-to-content link: visually hidden until focused (keyboard users).
   Every page places it as the first <body> child, pointing at its main
   content landmark (which carries id + tabindex="-1"). */
.skip-link {
  position: fixed;
  top: 10px;
  left: 10px;
  z-index: 2000;
  padding: 10px 16px;
  background: var(--gold);
  color: var(--bg);
  border-radius: 8px;
  font-size: 0.85rem;
  font-weight: 600;
  transform: translateY(-160%);
  transition: transform 0.15s ease;
}
.skip-link:focus {
  transform: translateY(0);
  outline: 2px solid var(--gold-soft);
  outline-offset: 2px;
}
/* Main-content targets receive focus programmatically via the skip link but
   should not show a focus ring on plain click/scroll. */
[id][tabindex="-1"]:focus:not(:focus-visible) { outline: none; }
[id][tabindex="-1"] { scroll-margin-top: 16px; }

/*
 * Canonical responsive breakpoints (max-width unless noted). Vanilla CSS
 * cannot use custom properties inside @media, so these literal values are the
 * single documented scale — use one of them, don't invent new ones:
 *   xs = 360px   very small phones (opt-in, only where a layout needs it)
 *   sm = 480px   phones
 *   md = 768px   tablet portrait / large phones landscape
 *   lg = 1024px  tablet landscape / small laptops
 */

/* Page shell used by index/editor */
.page { max-width: 1000px; margin: 0 auto; padding: 40px 24px 80px; }
.eyebrow {
  letter-spacing: 0.18em;
  text-transform: uppercase;
  font-size: 0.72rem;
  color: var(--gold);
}

/* Pill buttons */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 7px;
  padding: 10px 18px;
  border-radius: 999px;
  border: 1px solid var(--border-strong);
  color: var(--gold-soft);
  font-size: 0.85rem;
  font-weight: 500;
  letter-spacing: 0.01em;
  white-space: nowrap;
  cursor: pointer;
  background: transparent;
  font-family: inherit;
  transition: background var(--dur) var(--ease), border-color var(--dur) var(--ease),
              color var(--dur) var(--ease), transform var(--dur) var(--ease), box-shadow var(--dur) var(--ease);
}
.btn:hover { background: rgba(205, 163, 73, 0.10); border-color: var(--gold); color: var(--gold-soft); }
.btn:active { transform: translateY(0.5px); }
.btn.solid {
  background: linear-gradient(180deg, var(--gold-soft), var(--gold));
  border-color: var(--gold);
  color: #1a1409;
  font-weight: 600;
  box-shadow: var(--shadow-sm), inset 0 1px 0 rgba(255, 255, 255, 0.18);
}
.btn.solid:hover { transform: translateY(-1px); box-shadow: var(--shadow-md), inset 0 1px 0 rgba(255, 255, 255, 0.22); filter: brightness(1.04); }
.btn.solid:active { transform: translateY(0); box-shadow: var(--shadow-sm); }
.btn:disabled, .btn[disabled] { opacity: 0.5; cursor: not-allowed; transform: none !important; box-shadow: none; }
.btn-row { display: flex; gap: 10px; flex-wrap: wrap; }

/* Back link + lang toggle, shared header pattern */
.back {
  position: absolute;
  left: 16px;
  top: 16px;
  font-size: 0.8rem;
  color: var(--muted);
  text-decoration: none;
}
.lang-toggle {
  position: absolute;
  right: 16px;
  top: 16px;
  display: flex;
  gap: 2px;
  border: 1px solid var(--border);
  background: rgba(0, 0, 0, 0.20);
  border-radius: 999px;
  padding: 2px;
  font-size: 0.75rem;
}
.lang-toggle button {
  background: transparent;
  color: var(--muted);
  border: none;
  padding: 5px 11px;
  border-radius: 999px;
  cursor: pointer;
  font-weight: 600;
  font-family: inherit;
  transition: background var(--dur) var(--ease), color var(--dur) var(--ease);
}
.lang-toggle button:hover:not(.active) { color: var(--cream); background: rgba(205, 163, 73, 0.08); }
.lang-toggle button.active { background: var(--gold); color: var(--bg); box-shadow: var(--shadow-sm); }

/* Extra-languages dropdown, injected by I18N.init() into every .lang-toggle */
.lang-more-btn {
  border-left: 1px solid rgba(205, 163, 73, 0.35) !important;
  min-width: 34px;
  letter-spacing: 0.04em;
  white-space: nowrap; /* keep the globe and caret on one line at narrow widths */
}
.lang-more-btn.active { background: var(--gold); color: var(--bg); }
.lang-menu {
  display: none;
  /* fixed + JS-placed so ancestor overflow:hidden (header cards) can't clip it */
  position: fixed;
  min-width: 170px;
  max-height: min(60vh, 430px);
  overflow-y: auto;
  background: var(--bg-soft);
  border: 1px solid rgba(205, 163, 73, 0.4);
  border-radius: 10px;
  padding: 6px;
  box-shadow: 0 16px 40px rgba(0, 0, 0, 0.5);
  z-index: 999;
}
.lang-menu.open { display: block; }
.lang-menu button {
  display: block;
  width: 100%;
  text-align: left;
  background: transparent;
  border: none;
  color: var(--cream);
  padding: 8px 12px;
  border-radius: 7px;
  font-size: 0.8rem;
  cursor: pointer;
  font-family: inherit;
}
.lang-menu button:hover { background: rgba(205, 163, 73, 0.12); color: var(--gold); }
.lang-menu button.active { background: var(--gold); color: var(--bg); font-weight: 600; }

/* Forms (editor, bezahlen) */
form.panel-form, .panel {
  background:
    linear-gradient(180deg, var(--edge-highlight), transparent 80px),
    var(--bg-soft);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 24px;
  margin-top: 20px;
  box-shadow: var(--shadow-md);
}
label { display: block; font-size: 0.78rem; font-weight: 500; color: var(--muted); margin-bottom: 5px; margin-top: 14px; letter-spacing: 0.005em; }
label:first-child { margin-top: 0; }
input, textarea, select {
  width: 100%;
  background: var(--bg);
  border: 1px solid var(--border-strong);
  border-radius: var(--radius-sm);
  padding: 10px 13px;
  color: var(--cream);
  font-family: inherit;
  font-size: 0.9rem;
  transition: border-color var(--dur) var(--ease), box-shadow var(--dur) var(--ease), background var(--dur) var(--ease);
}
input::placeholder, textarea::placeholder { color: var(--muted-soft); }
input:hover, textarea:hover, select:hover { border-color: rgba(205, 163, 73, 0.45); }
input:focus, textarea:focus, select:focus {
  outline: none;
  border-color: var(--gold);
  box-shadow: 0 0 0 3px rgba(205, 163, 73, 0.16);
}
/* Native selects don't inherit the dark theme on their own */
select {
  appearance: none;
  -webkit-appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='10' height='6'%3E%3Cpath d='M1 1l4 4 4-4' stroke='%238b93a9' stroke-width='1.5' fill='none' stroke-linecap='round'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 12px center;
  padding-right: 30px;
  cursor: pointer;
}
select option { background: var(--bg); color: var(--cream); }
input[type="color"] { padding: 4px; height: 40px; cursor: pointer; }

/* Custom checkbox: replaces the OS default everywhere in the app (settings
   toggles, allergen/tag chips, remember-me, admin/staff panels) with one
   consistent dark/gold control. !important guards against the per-page
   `width:auto` / `accent-color` overrides scattered across older markup —
   this rule is the single source of truth for checkbox appearance now. */
input[type="checkbox"] {
  appearance: none;
  -webkit-appearance: none;
  width: 20px !important;
  height: 20px !important;
  min-width: 20px;
  flex: none;
  margin: 0 !important;
  padding: 0;
  border: 1.5px solid var(--border-strong);
  border-radius: 6px;
  background: var(--bg);
  display: inline-block;
  position: relative;
  vertical-align: middle;
  cursor: pointer;
  transition: background 0.15s ease, border-color 0.15s ease, box-shadow 0.15s ease;
}
input[type="checkbox"]:hover {
  border-color: var(--gold-soft);
  box-shadow: 0 0 0 3px rgba(201, 169, 78, 0.12);
}
input[type="checkbox"]:focus-visible {
  outline: 2px solid var(--gold-soft);
  outline-offset: 2px;
}
input[type="checkbox"]:checked {
  background: var(--gold);
  border-color: var(--gold);
}
input[type="checkbox"]:checked:hover { background: var(--gold-soft); border-color: var(--gold-soft); }
input[type="checkbox"]:checked::after {
  content: '';
  position: absolute;
  left: 6px; top: 2px;
  width: 5px; height: 10px;
  border: solid var(--bg);
  border-width: 0 2px 2px 0;
  transform: rotate(45deg);
}
input[type="checkbox"]:disabled { opacity: 0.45; cursor: not-allowed; }
.row { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; margin-top: 12px; }
.row:first-child { margin-top: 0; }
.row > div > label:first-child { margin-top: 0; }
.hint {
  background: rgba(205, 163, 73, 0.1);
  border: 1px solid rgba(205, 163, 73, 0.3);
  border-radius: 8px;
  padding: 10px 14px;
  font-size: 0.78rem;
  color: var(--muted);
}

/* Modal (info dialog) */
.modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(5, 7, 13, 0.68);
  backdrop-filter: blur(6px) saturate(1.1);
  -webkit-backdrop-filter: blur(6px) saturate(1.1);
  display: none;
  align-items: center;
  justify-content: center;
  padding: 20px;
  z-index: 50;
}
.modal-overlay.open { display: flex; animation: overlayIn var(--dur) var(--ease); }
@keyframes overlayIn { from { opacity: 0; } to { opacity: 1; } }
.modal-overlay.open .modal-box { animation: modalIn 0.24s var(--ease); }
@keyframes modalIn { from { opacity: 0; transform: translateY(8px) scale(0.98); } to { opacity: 1; transform: translateY(0) scale(1); } }
.modal-box {
  background:
    linear-gradient(180deg, var(--edge-highlight), transparent 100px),
    var(--bg-soft);
  border: 1px solid var(--border-strong);
  border-radius: var(--radius-lg);
  padding: 24px;
  max-width: 360px;
  width: 100%;
  position: relative;
  box-shadow: var(--shadow-lg);
  /* Subtle themed scrollbar for any modal content that ends up scrollable
     (e.g. .modal-box.wide drawers), instead of the browser default. */
  scrollbar-width: thin;
  scrollbar-color: rgba(148, 163, 191, 0.4) transparent;
}
.modal-box::-webkit-scrollbar { width: 9px; }
.modal-box::-webkit-scrollbar-track { background: transparent; }
.modal-box::-webkit-scrollbar-thumb {
  background-color: rgba(148, 163, 191, 0.32);
  border-radius: 999px;
  border: 2px solid var(--bg-soft);
}
.modal-box::-webkit-scrollbar-thumb:hover { background-color: rgba(201, 169, 78, 0.5); }
.modal-box h3 {
  font-family: 'Playfair Display', Georgia, serif;
  color: var(--gold);
  margin: 0 0 10px;
  font-size: 1.1rem;
}
.modal-box p { font-size: 0.85rem; color: var(--cream); line-height: 1.5; margin: 0; }
.modal-box .note { color: var(--muted); font-size: 0.72rem; margin-top: 10px; font-style: italic; }

/* ── Industry picker grid — shared by the post-signup picker (login) and
   the "change industry" flow (editor), so both stay visually/behaviorally
   identical instead of drifting into two implementations. ── */
.modal-box.wide { max-width: 640px; text-align: left; }
.industry-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(130px, 1fr));
  gap: 10px;
  margin-top: 18px;
}
.industry-group-label {
  grid-column: 1 / -1;
  font-size: 0.68rem;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  color: var(--muted-soft, var(--muted));
  margin-top: 10px;
}
.industry-group-label:first-child { margin-top: 0; }
.industry-card {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
  padding: 16px 10px;
  border: 1px solid var(--border-strong);
  border-radius: var(--radius);
  background: var(--bg);
  color: inherit;
  cursor: pointer;
  text-align: center;
  font-family: inherit;
  transition: border-color var(--dur) var(--ease), background var(--dur) var(--ease);
}
.industry-card:hover, .industry-card:focus-visible { border-color: var(--gold); background: rgba(205, 163, 73, 0.08); }
.industry-card.current { border-color: var(--gold); background: rgba(205, 163, 73, 0.12); }
.industry-card .industry-icon { font-size: 1.6rem; line-height: 1; }
.industry-card .industry-label { font-size: 0.76rem; color: var(--cream); font-weight: 600; }
.modal-close {
  position: absolute;
  top: 14px;
  right: 14px;
  width: 32px;
  height: 32px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  background: none;
  border: none;
  color: var(--muted);
  font-size: 1.2rem;
  cursor: pointer;
  line-height: 1;
  transition: background var(--dur) var(--ease), color var(--dur) var(--ease);
}
.modal-close:hover { background: rgba(205, 163, 73, 0.12); color: var(--gold-soft); }
.modal-close:active { transform: scale(0.94); }

/* Decorative ornament divider — line – ✦✦✦ – line, shared brand motif */
.ornament-divider {
  display: flex;
  align-items: center;
  gap: 10px;
  margin: 22px 0;
  color: var(--gold);
  font-size: 0.7rem;
  letter-spacing: 3px;
}
.ornament-divider::before,
.ornament-divider::after {
  content: '';
  flex: 1;
  height: 1px;
  background: linear-gradient(90deg, transparent, rgba(205, 163, 73, 0.45), transparent);
}

/* Small circular brand monogram mark */
.brand-mark {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--gold-soft), var(--gold-deep));
  color: var(--bg);
  font-family: 'Playfair Display', Georgia, serif;
  font-weight: 700;
  font-size: 1rem;
  box-shadow: 0 6px 18px rgba(201, 169, 78, 0.30);
  flex: none;
}

/* Panels with a subtle, calm accent bar along the top edge (single-hue gold
   fade — replaces the earlier multi-color warm gradient for a quieter,
   more premium surface). */
.panel-accent {
  position: relative;
  overflow: hidden;
}
.panel-accent::before {
  content: '';
  position: absolute;
  top: 0; left: 0; right: 0;
  height: 2px;
  background: linear-gradient(90deg, transparent, var(--gold) 25%, var(--gold-soft) 50%, var(--gold) 75%, transparent);
  opacity: 0.85;
}

@media (max-width: 480px) {
  .row { grid-template-columns: 1fr; }
  .page { padding: 24px 16px 60px; }
}
