/* ── Shared chrome for the United Automation web estate ────────────────────
   ONE file, linked by every public page on BOTH zones (hairdocs.no and
   unitedautomation.no). It carries the header, the nav, the cross-domain
   link and the footer — the parts that must be identical for the two sites
   to read as one company.

   ⚠️ It deliberately declares NO colour, type or spacing values of its own.
   Every rule here resolves `var(--…)` against tokens the *page* defines, so
   the tokens stay single-sourced per page (delivery/DESIGN_SYSTEM.md §2–§4)
   and this file cannot become a second, competing palette. A page that links
   this file without those tokens renders unstyled chrome — loud, not subtly
   wrong.

   ⚠️ Loading it at all needs `style-src 'self'` in `_headers`. Both zones'
   `_headers` say so. Drop that and the chrome silently disappears while the
   page content still renders — so the estate gate in
   `test_sales_calculator_static.py` pins the directive.

   ⚠️ This file is served publicly and whole, like everything else in a Pages
   directory (delivery/site-notes.md). Nothing internal goes in it.          */

/* ── Header ─────────────────────────────────────────────────────────────── */

.estate-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  flex-wrap: wrap;
  padding: 24px 0 16px;
  border-bottom: 1px solid var(--border);
}

.estate-brand {
  display: flex;
  align-items: baseline;
  gap: 12px;
  flex-wrap: wrap;
  text-decoration: none;
  color: inherit;
}
.estate-brand:hover .estate-wordmark { color: var(--secondary); }

.estate-wordmark {
  font-size: 18px;
  line-height: 28px;
  font-weight: 600;
  letter-spacing: -.01em;
  color: var(--ink);
}
.estate-subtitle {
  font-size: 13px;
  line-height: 20px;
  color: var(--ink-muted);
}

.estate-nav {
  display: flex;
  align-items: center;
  gap: 24px;
  flex-wrap: wrap;
  font-size: 13px;
  line-height: 20px;
}
.estate-nav a {
  color: var(--ink-muted);
  text-decoration: none;
  font-weight: 500;
}
.estate-nav a:hover,
.estate-nav a[aria-current="page"] { color: var(--ink); }
.estate-nav a[aria-current="page"] { font-weight: 600; }

/* The one link that leaves this zone. It is marked, not hidden: a reader who
   lands on the product site should be able to see who makes it in one click,
   and a reader on the company site should reach the product the same way. */
.estate-cross {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 6px 12px;
  border: 1px solid var(--border);
  border-radius: var(--r-sm, 4px);
  color: var(--ink) !important;
  white-space: nowrap;
}
.estate-cross:hover { background: var(--surface-2); border-color: var(--ink-muted); }
.estate-cross .estate-arrow { color: var(--ink-muted); font-size: 11px; }

/* ── Language switcher ─────────────────────────────────────────
   ⚠️ Plain links to plain files, deliberately. The company zone's CSP blocks
   script execution outright, so a JS switcher could not run there at all —
   and a language that only exists after JS runs is a language a crawler and
   a reader with a blocked script never see. Each language is its own URL,
   each URL declares its own `lang`, and they point at each other with
   `hreflang`.                                                              */

.estate-langs {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding-left: 16px;
  border-left: 1px solid var(--border);
  font-size: 13px;
  line-height: 20px;
}
.estate-langs a {
  color: var(--ink-muted);
  text-decoration: none;
  font-weight: 500;
  text-transform: uppercase;
  letter-spacing: .04em;
}
.estate-langs a:hover { color: var(--ink); }
.estate-langs a[aria-current="true"] {
  color: var(--ink);
  font-weight: 600;
  text-decoration: underline;
  text-underline-offset: 3px;
}

/* ── Footer ─────────────────────────────────────────────────────────────── */

.estate-foot {
  margin-top: 64px;
  padding: 32px 0 64px;
  border-top: 1px solid var(--border);
  font-size: 13px;
  line-height: 20px;
  color: var(--ink-muted);
}
.estate-foot-cols {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 24px 48px;
  margin-bottom: 32px;
}
.estate-foot h2 {
  font-size: 13px;
  line-height: 20px;
  font-weight: 600;
  color: var(--ink);
  margin: 0 0 8px;
  letter-spacing: .08em;
  text-transform: uppercase;
}
.estate-foot ul { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 8px; }
.estate-foot a { color: var(--ink-muted); text-decoration: none; }
.estate-foot a:hover { color: var(--ink); text-decoration: underline; }
.estate-foot-legal {
  padding-top: 24px;
  border-top: 1px solid var(--border);
  display: flex;
  flex-wrap: wrap;
  gap: 8px 24px;
  justify-content: space-between;
}
.estate-foot-legal p { margin: 0; max-width: none; }

/* The promise sentence is quoted verbatim from DESIGN_SYSTEM.md §1 (D-090).
   It is the single source; nothing on either zone paraphrases it. */
.estate-promise {
  margin: 0 0 24px;
  max-width: 72ch;
  color: var(--ink-muted);
}

/* ── Unlisted surfaces ──────────────────────────────────────────────────────
   usage.html, admin.html, sales*.html are reachable by URL and must stay out
   of the public navigation entirely — a nav link is how an unlisted page
   stops being unlisted. They get this one quiet way back instead.           */
.estate-backlink {
  display: block;
  padding: 16px 0 0;
  font-size: 13px;
  line-height: 20px;
}
.estate-backlink a { color: var(--ink-muted); text-decoration: none; }
.estate-backlink a:hover { color: var(--ink); text-decoration: underline; }

@media (max-width: 820px) {
  .estate-bar { padding-bottom: 12px; }
  .estate-foot-cols { grid-template-columns: 1fr; }
  .estate-langs { padding-left: 0; border-left: 0; }
}
