/* ============================================================
   Combinatorial Cabinet — Stylesheet
   ============================================================ */

/* --- Variables & Reset ------------------------------------ */
:root {
  --navy:    #1a2a4a;
  --blue:    #2c5282;
  --accent:  #c05621;
  --light:   #f7f8fc;
  --border:  #dde2ed;
  --text:    #1a202c;
  --muted:   #4a5568;
  --white:   #ffffff;
  --radius:  6px;
  --shadow:  0 2px 8px rgba(0,0,0,0.08);
}

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

html { font-size: 16px; }

body {
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  line-height: 1.65;
  color: var(--text);
  background: var(--light);
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

/* --- Layout helpers --------------------------------------- */
.container {
  max-width: 960px;
  margin: 0 auto;
  padding: 0 1.5rem;
}

/* --- Header ----------------------------------------------- */
.site-header {
  background: var(--navy);
  color: var(--white);
  padding: 0.9rem 0;
  position: sticky;
  top: 0;
  z-index: 100;
  box-shadow: 0 2px 6px rgba(0,0,0,0.25);
}

.site-header .container {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
}

.site-title {
  font-size: 1.15rem;
  font-weight: 700;
  letter-spacing: 0.02em;
  color: var(--white);
  text-decoration: none;
}

.site-title:hover { color: #a0bcde; }

.site-nav {
  display: flex;
  align-items: center;
  gap: 1.5rem;
}

.site-nav a {
  color: #a0bcde;
  text-decoration: none;
  font-size: 0.9rem;
}

.site-nav a:hover { color: var(--white); }

/* --- Language toggle button ------------------------------- */
.lang-toggle {
  background: var(--blue);
  color: var(--white);
  border: 1.5px solid #4a7ab5;
  border-radius: var(--radius);
  padding: 0.25rem 0.75rem;
  font-size: 0.8rem;
  font-weight: 600;
  letter-spacing: 0.05em;
  cursor: pointer;
  transition: background 0.15s, border-color 0.15s;
}

.lang-toggle:hover {
  background: #3a6898;
  border-color: #6a9ac8;
}

/* --- Main content ----------------------------------------- */
.main-content {
  flex: 1;
  padding: 2.5rem 0 3rem;
}

/* --- Homepage intro --------------------------------------- */
.collection-intro {
  margin-bottom: 2.5rem;
  max-width: 680px;
}

.collection-intro h1 {
  font-size: 2rem;
  font-weight: 700;
  color: var(--navy);
  margin-bottom: 0.6rem;
}

.collection-intro p {
  color: var(--muted);
  font-size: 1.05rem;
}

/* --- Object grid ------------------------------------------ */
.object-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
  gap: 1.5rem;
}

.object-card {
  display: flex;
  flex-direction: column;
  background: var(--white);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  text-decoration: none;
  color: var(--text);
  transition: transform 0.15s, box-shadow 0.15s;
  overflow: hidden;
}

.object-card:hover {
  transform: translateY(-3px);
  box-shadow: 0 6px 18px rgba(0,0,0,0.12);
}

.card-image {
  width: 100%;
  aspect-ratio: 4/3;
  overflow: hidden;
  background: #e8ecf4;
}

.card-image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.card-image--placeholder {
  display: flex;
  align-items: center;
  justify-content: center;
}

.placeholder-icon {
  font-size: 3rem;
  color: #aab4cc;
}

.card-body {
  padding: 1rem 1.1rem 1.2rem;
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
}

.card-body h2 {
  font-size: 1.05rem;
  font-weight: 700;
  color: var(--navy);
  line-height: 1.3;
}

.card-subtitle {
  font-size: 0.8rem;
  color: var(--accent);
  font-style: italic;
}

.card-teaser {
  font-size: 0.875rem;
  color: var(--muted);
  margin-top: 0.25rem;
  line-height: 1.5;
}

/* --- Object detail page ----------------------------------- */
.object-page {
  max-width: 700px;
}

.object-header {
  margin-bottom: 1.75rem;
  border-bottom: 2px solid var(--border);
  padding-bottom: 1.25rem;
}

.object-header h1 {
  font-size: 2rem;
  font-weight: 700;
  color: var(--navy);
  line-height: 1.2;
  margin-bottom: 0.4rem;
}

.object-subtitle {
  font-size: 1rem;
  color: var(--accent);
  font-style: italic;
}

.object-image {
  margin: 0 0 1.75rem;
  border-radius: var(--radius);
  overflow: hidden;
  border: 1px solid var(--border);
}

.object-image img {
  width: 100%;
  display: block;
}

/* --- Description text ------------------------------------- */
.object-description {
  margin-bottom: 2rem;
  font-size: 1rem;
  line-height: 1.75;
  color: var(--text);
}

.object-description p { margin-bottom: 0.9rem; }
.object-description strong { color: var(--navy); }

/* --- Properties table ------------------------------------- */
.object-properties {
  margin-bottom: 2rem;
}

.object-properties h2,
.object-references h2 {
  font-size: 1.15rem;
  font-weight: 700;
  color: var(--navy);
  margin-bottom: 0.75rem;
  padding-bottom: 0.35rem;
  border-bottom: 1px solid var(--border);
}

.properties-list {
  display: grid;
  grid-template-columns: 1fr;
  gap: 0;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
  background: var(--white);
}

.property-row {
  display: flex;
  border-bottom: 1px solid var(--border);
}

.property-row:last-child { border-bottom: none; }

.property-row dt {
  flex: 0 0 45%;
  padding: 0.5rem 0.85rem;
  font-weight: 600;
  font-size: 0.875rem;
  color: var(--muted);
  background: var(--light);
  border-right: 1px solid var(--border);
}

.property-row dd {
  flex: 1;
  padding: 0.5rem 0.85rem;
  font-size: 0.9rem;
  font-family: "SFMono-Regular", Consolas, "Liberation Mono", Menlo, monospace;
  color: var(--text);
}

/* --- References ------------------------------------------- */
.object-references {
  margin-bottom: 2rem;
}

.object-references ul {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.object-references li {
  font-size: 0.9rem;
  color: var(--muted);
  padding-left: 1rem;
  position: relative;
}

.object-references li::before {
  content: "—";
  position: absolute;
  left: 0;
  color: var(--border);
}

.object-references a {
  color: var(--blue);
  text-decoration: none;
}

.object-references a:hover {
  text-decoration: underline;
}

/* --- Back link -------------------------------------------- */
.back-link {
  margin-top: 2rem;
  padding-top: 1rem;
  border-top: 1px solid var(--border);
}

.back-link a {
  font-size: 0.9rem;
  color: var(--blue);
  text-decoration: none;
}

.back-link a:hover { text-decoration: underline; }

/* --- Footer ----------------------------------------------- */
.site-footer {
  background: var(--navy);
  color: #8aa4c8;
  text-align: center;
  padding: 1rem 0;
  font-size: 0.825rem;
}

/* --- Responsive ------------------------------------------- */
@media (max-width: 600px) {
  .collection-intro h1 { font-size: 1.5rem; }
  .object-header h1 { font-size: 1.5rem; }
  .object-grid { grid-template-columns: 1fr; }
  .property-row dt { flex: 0 0 50%; }
}
