/* ============================================================================
   layout.css — Containers, section scaffolding, grid helpers, dividers
   ----------------------------------------------------------------------------
   Structural-only. Visual treatment lives in components.css and the per-section
   files under assets/css/sections/.
   ========================================================================== */

/* ---- Container ------------------------------------------------------- */
.container {
  width: 100%;
  max-width: var(--container);
  margin-inline: auto;
  padding-inline: var(--gutter);
}
.container--narrow { max-width: var(--container-narrow); }

/* ---- Section spacing ------------------------------------------------- */
.section {
  position: relative;
  padding-block: var(--section-pad);
  z-index: var(--z-content);
}
.section--tight { padding-block: clamp(2rem, 5vw, 3.5rem); }

/* Section header (eyebrow + title + optional intro) */
.section-head { max-width: 56ch; margin-bottom: var(--space-5); }
.section-head--center { margin-inline: auto; text-align: center; }
.section-head .eyebrow { margin-bottom: var(--space-3); }
.section-head h2 { margin-bottom: var(--space-4); }

/* Gold hairline that "draws in" under titles (JS adds .is-drawn). */
.title-rule {
  position: relative;
  height: 2px;
  width: 120px;
  margin-top: var(--space-4);
  background: linear-gradient(90deg, var(--gold-500), transparent);
  transform-origin: left center;
  transform: scaleX(0);
  transition: transform var(--dur-slow) var(--ease);
}
.section-head--center .title-rule { margin-inline: auto; background: linear-gradient(90deg, transparent, var(--gold-500), transparent); }
.title-rule.is-drawn { transform: scaleX(1); }

/* ---- Grid helpers ---------------------------------------------------- */
.grid { display: grid; gap: var(--space-6); }
.grid--2 { grid-template-columns: repeat(2, 1fr); }
.grid--3 { grid-template-columns: repeat(3, 1fr); }
.grid--auto { grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); }
.grid--split { grid-template-columns: 1.05fr .95fr; align-items: center; }

@media (max-width: 900px) {
  .grid--2, .grid--3, .grid--split { grid-template-columns: 1fr; }
}

/* ---- Flex helpers ---------------------------------------------------- */
.row { display: flex; gap: var(--space-4); align-items: center; flex-wrap: wrap; }
.row--between { justify-content: space-between; }
.row--center { justify-content: center; }
.stack { display: flex; flex-direction: column; gap: var(--space-4); }

/* ---- Arabesque section divider -------------------------------------- */
/* A thin gold rule with a centered 8-point star motif. Decorative only. */
.divider {
  display: flex;
  align-items: center;
  gap: var(--space-4);
  width: min(640px, 80%);
  margin: var(--space-5) auto;
  color: var(--gold-500);
  opacity: .7;
}
.divider::before, .divider::after {
  content: "";
  flex: 1;
  height: 1px;
  background: linear-gradient(90deg, transparent, var(--line), transparent);
}
.divider svg { width: 26px; height: 26px; }

/* ---- Visibility utilities ------------------------------------------- */
.hide-mobile { }
.hide-desktop { display: none; }
@media (max-width: 768px) {
  .hide-mobile { display: none !important; }
  .hide-desktop { display: revert; }
}
