/* nodus public site pages. Ported from docs/public-site/design/site-homepage.dc.html:
   only the Mantine tokens that page uses, light and dark. --site-brand, --site-accent
   and --site-font are set per site on <html>. */

:root {
  --radius-xs: 0.125rem;
  --radius-sm: 0.25rem;
  --radius-md: 0.5rem;
  --radius-lg: 1rem;
  --fs-xs: 0.75rem;
  --fs-sm: 0.875rem;
  --fs-lg: 1.125rem;
  --font-default: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif,
    "Apple Color Emoji", "Segoe UI Emoji";
  --site-on-brand: #fff;
  color-scheme: light dark;
}

:root,
:root[data-scheme="light"] {
  --body: #fff;
  --text: #000;
  --dimmed: #6b7280;
  --border: #ced4da;
  --hover: #f1f3f5;
  --ok-bg: #d3f9d8;
  --ok-text: #1b6d2c;
}

@media (prefers-color-scheme: dark) {
  :root:not([data-scheme="light"]) {
    --body: #242424;
    --text: #e3e3e3;
    --dimmed: #9a9a9a;
    --border: #424242;
    --hover: #3b3b3b;
    --ok-bg: #16451f;
    --ok-text: #8ce99a;
  }
}

:root[data-scheme="dark"] {
  --body: #242424;
  --text: #e3e3e3;
  --dimmed: #9a9a9a;
  --border: #424242;
  --hover: #3b3b3b;
  --ok-bg: #16451f;
  --ok-text: #8ce99a;
}

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

html,
body {
  margin: 0;
  background: var(--body);
  color: var(--text);
}

body {
  font-family: var(--site-font, var(--font-default));
  line-height: 1.4;
  -webkit-font-smoothing: antialiased;
}

a {
  color: var(--site-link, var(--site-brand));
  text-decoration: none;
}

a:hover {
  text-decoration: underline;
}

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

h1,
h2 {
  margin: 0;
  letter-spacing: -0.01em;
}

h2 {
  font-size: clamp(26px, 4vw, 34px);
}

p {
  margin: 0;
}

.wrap {
  max-width: 1180px;
  margin: 0 auto;
  padding-left: 24px;
  padding-right: 24px;
}

.dimmed {
  color: var(--dimmed);
}

.lead {
  line-height: 1.55;
  color: var(--dimmed);
}

.skip {
  position: absolute;
  left: -999px;
}

.skip:focus {
  left: 16px;
  top: 16px;
  z-index: 20;
  background: var(--body);
  padding: 8px 12px;
}

/* Header */
.header {
  position: sticky;
  top: 0;
  z-index: 10;
  background: var(--body);
  border-bottom: 1px solid var(--border);
}

.header .wrap {
  padding-top: 14px;
  padding-bottom: 14px;
  display: flex;
  align-items: center;
  gap: 16px 24px;
  flex-wrap: wrap;
}

.brand {
  display: flex;
  align-items: center;
  gap: 12px;
  color: var(--text);
}

.brand:hover {
  text-decoration: none;
}

.mark {
  width: 36px;
  height: 36px;
  border-radius: var(--radius-sm);
  background: var(--site-brand);
  color: var(--site-on-brand);
  display: grid;
  place-items: center;
  font-weight: 700;
}

.brand strong {
  font-size: 17px;
}

.nav {
  display: flex;
  gap: 8px 20px;
  flex-wrap: wrap;
  font-size: var(--fs-sm);
  margin-left: auto;
}

.nav a {
  color: var(--text);
}

.header-end {
  display: flex;
  align-items: center;
  gap: 12px;
}

.langs {
  font-size: var(--fs-xs);
  color: var(--dimmed);
  display: flex;
  gap: 6px;
}

.langs a {
  color: var(--dimmed);
}

.langs [aria-current] {
  color: var(--text);
  font-weight: 700;
}

.btn {
  white-space: nowrap;
  display: inline-flex;
  align-items: center;
  padding: 12px 20px;
  border-radius: var(--radius-sm);
  font-weight: 600;
  font: inherit;
  font-weight: 600;
  cursor: pointer;
  border: 1px solid transparent;
}

.btn:hover {
  text-decoration: none;
}

.btn-primary {
  background: var(--site-brand);
  color: var(--site-on-brand);
}

.btn-outline {
  border-color: var(--border);
  color: var(--text);
  background: transparent;
  font-weight: 500;
}

.btn-sm {
  padding: 8px 14px;
  font-size: var(--fs-sm);
  font-weight: 500;
}

/* Hero */
.hero {
  padding-top: 56px;
  padding-bottom: 40px;
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(340px, 100%), 1fr));
  gap: 48px;
  align-items: center;
}

.hero-text {
  display: flex;
  flex-direction: column;
  gap: 20px;
}

.eyebrow {
  font-size: var(--fs-sm);
  font-weight: 500;
  color: var(--site-link, var(--site-brand));
}

.hero h1 {
  font-size: clamp(40px, 5.5vw, 64px);
  line-height: 1.02;
  letter-spacing: -0.02em;
  font-weight: 700;
  text-wrap: balance;
}

.hero .lead {
  font-size: var(--fs-lg);
  max-width: 520px;
  text-wrap: pretty;
}

.hero-meta {
  display: flex;
  flex-direction: column;
  gap: 6px;
  font-size: var(--fs-sm);
}

.actions {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
  padding-top: 4px;
}

.hero-photo {
  height: 420px;
  border-radius: 12px;
  overflow: hidden;
  background: var(--hover);
}

.hero-photo img,
.tile img,
.room-photo img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

/* Facts */
.facts {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
  border-top: 1px solid var(--border);
  border-bottom: 1px solid var(--border);
}

.fact {
  padding: 24px 20px 24px 0;
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.fact b {
  font-size: 36px;
  line-height: 1;
}

.fact span {
  font-size: var(--fs-sm);
  color: var(--dimmed);
}

/* Sections */
.section {
  padding-top: 72px;
  padding-bottom: 24px;
  display: flex;
  flex-direction: column;
  gap: 24px;
}

.section-head {
  display: flex;
  justify-content: space-between;
  align-items: end;
  gap: 24px;
  flex-wrap: wrap;
}

.section-head > div:first-child {
  display: flex;
  flex-direction: column;
  gap: 8px;
  max-width: 560px;
}

.split {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(320px, 100%), 1fr));
  gap: 40px;
}

.split > div:first-child {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

/* Gallery */
.gallery {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(min(260px, 100%), 1fr));
  grid-auto-rows: 200px;
  grid-auto-flow: dense;
  gap: 12px;
}

.tile {
  margin: 0;
  border-radius: var(--radius-md);
  overflow: hidden;
  background: var(--hover);
}

.tile.tall {
  grid-row: span 2;
}

/* Rooms */
.sizes {
  display: flex;
  flex-direction: column;
  gap: 8px;
  min-width: min(280px, 100%);
  flex: 0 1 360px;
}

.label-caps {
  font-size: var(--fs-xs);
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--dimmed);
}

.size {
  display: grid;
  grid-template-columns: 90px minmax(0, 1fr) 24px;
  gap: 10px;
  align-items: center;
  font-size: var(--fs-sm);
}

.bar {
  height: 10px;
  border-radius: 5px;
  background: var(--hover);
}

.bar span {
  display: block;
  height: 10px;
  border-radius: 5px;
  background: var(--site-brand);
}

.size b {
  text-align: right;
}

.cards {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(min(260px, 100%), 1fr));
  gap: 16px;
}

.card {
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  overflow: hidden;
  display: flex;
  flex-direction: column;
}

.room-photo {
  height: 150px;
  background: var(--hover);
}

.card-body {
  padding: 16px;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.card-title {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: 8px;
}

.card-title strong {
  font-size: var(--fs-lg);
}

.small {
  font-size: var(--fs-sm);
}

.xs {
  font-size: var(--fs-xs);
}

.chips {
  display: flex;
  gap: 6px;
  flex-wrap: wrap;
  padding: 0;
  margin: 0;
  list-style: none;
}

.chips li {
  font-size: var(--fs-xs);
  padding: 2px 8px;
  border-radius: 999px;
  background: var(--hover);
}

/* Offices */
.rows {
  display: flex;
  flex-direction: column;
}

.row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 16px;
  align-items: center;
  padding: 18px 0;
  border-top: 1px solid var(--border);
}

.row > div {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.pill {
  font-size: var(--fs-sm);
  font-weight: 600;
  padding: 4px 12px;
  border-radius: 999px;
  background: var(--hover);
  white-space: nowrap;
}

.pill.ok {
  background: var(--ok-bg);
  color: var(--ok-text);
}

/* Floor plan */
.floor-tabs {
  display: flex;
  gap: 6px;
  padding: 4px;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  flex-wrap: wrap;
}

.floor-tabs a {
  font-size: var(--fs-sm);
  padding: 6px 14px;
  border-radius: var(--radius-xs);
  color: var(--text);
}

.floor-tabs a:hover {
  background: var(--hover);
  text-decoration: none;
}

.floor {
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  background: #fff;
  padding: 12px;
  scroll-margin-top: 90px;
}

.floor figcaption {
  font-weight: 600;
  color: #111;
  padding-bottom: 8px;
}

.floor img {
  width: 100%;
  max-height: 560px;
  object-fit: contain;
}

.floors {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

/* Companies */
.companies {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(min(200px, 100%), 1fr));
  gap: 12px;
}

.company {
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  padding: 16px;
  display: flex;
  flex-direction: column;
  gap: 4px;
}

/* House rules */
.rules details {
  border-top: 1px solid var(--border);
}

.rules summary {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  padding: 16px 0;
  font-weight: 600;
  cursor: pointer;
  list-style: none;
}

.rules summary::-webkit-details-marker {
  display: none;
}

.rules summary::after {
  content: "+";
  color: var(--dimmed);
}

.rules details[open] summary::after {
  content: "−";
}

.rule-body {
  padding: 0 0 16px;
  line-height: 1.55;
  color: var(--dimmed);
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.rule-body ul,
.rule-body ol {
  margin: 0;
  padding-left: 20px;
}

/* Visit */
.visit {
  padding-top: 72px;
  padding-bottom: 72px;
}

.visit-box {
  border-radius: var(--radius-lg);
  background: var(--site-brand);
  color: var(--site-on-brand);
  padding: clamp(24px, 5vw, 40px);
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(240px, 100%), 1fr));
  gap: 32px;
}

.visit-box > div {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.visit-box a {
  color: inherit;
  text-decoration: underline;
}

.visit-box a.btn {
  text-decoration: none;
}

.entrance {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  border-bottom: 1px solid currentColor;
  padding-bottom: 6px;
}

.entrance-hint {
  font-size: 0.9em;
  opacity: 0.8;
  margin-top: -2px;
}

/* Contact form */
.contact {
  display: flex;
  flex-direction: column;
  gap: 12px;
  grid-column: 1 / -1;
}

.contact .fields {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(200px, 100%), 1fr));
  gap: 12px;
}

.contact label {
  display: flex;
  flex-direction: column;
  gap: 4px;
  font-size: var(--fs-sm);
}

.contact input,
.contact select,
.contact textarea {
  font: inherit;
  padding: 10px 12px;
  border-radius: var(--radius-sm);
  border: 1px solid rgba(255, 255, 255, 0.5);
  background: rgba(255, 255, 255, 0.95);
  color: #000;
}

.contact .hp {
  position: absolute;
  left: -9999px;
}

.contact .btn {
  align-self: flex-start;
  background: var(--site-on-brand);
  color: var(--site-brand);
}

.contact-status {
  font-weight: 600;
}

/* Footer */
.footer {
  border-top: 1px solid var(--border);
}

.footer .wrap {
  padding-top: 24px;
  padding-bottom: 24px;
  display: flex;
  justify-content: space-between;
  gap: 16px;
  flex-wrap: wrap;
  font-size: var(--fs-xs);
  color: var(--dimmed);
}

.footer a {
  color: var(--dimmed);
}

.simple {
  padding-top: 96px;
  padding-bottom: 96px;
  display: flex;
  flex-direction: column;
  gap: 16px;
  align-items: flex-start;
}

@media (max-width: 640px) {
  .nav {
    order: 3;
    width: 100%;
    margin-left: 0;
  }

  .header-end {
    margin-left: auto;
  }

  .hero-photo {
    height: 260px;
  }
}
