/* -------------------------------------------------------
   HARBOR-DELTA DESIGN SYSTEM
   delta-layout.css  (v1.1)
   Purpose: Page geometry, spacing rhythm, breakpoints,
            container flow, article structure
-------------------------------------------------------- */

/* Root spacing scale (modular rhythm) */
:root {
  --delta-space-0: 0;
  --delta-space-1: 0.25rem;
  --delta-space-2: 0.5rem;
  --delta-space-3: 0.75rem;
  --delta-space-4: 1rem;
  --delta-space-5: 1.5rem;
  --delta-space-6: 2rem;
  --delta-space-7: 3rem;
  --delta-space-8: 4rem;

  --delta-max-width: 860px;
}

/* -------------------------------------------------------
   BODY (Delta identity activated via .delta-body)
-------------------------------------------------------- */

.delta-body {
  background: var(--color-background, #ffffff);
  color: var(--color-text, #222);
  font-family: var(--font-body, "Segoe UI", sans-serif);
  line-height: 1.6;
  padding: var(--delta-space-4);
}

/* -------------------------------------------------------
   MAIN CONTAINER
-------------------------------------------------------- */

.delta-container {
  max-width: var(--delta-max-width);
  margin: 0 auto;
  padding: var(--delta-space-5) var(--delta-space-4);
}

/* -------------------------------------------------------
   ARTICLE STRUCTURE
-------------------------------------------------------- */

.delta-article {
  display: block;
  margin-bottom: var(--delta-space-7);
  padding-bottom: var(--delta-space-6);
  border-bottom: 1px solid var(--color-divider, #e0e0e0);
}

.delta-article h1,
.delta-article h2,
.delta-article h3 {
  margin-bottom: var(--delta-space-3);
  font-family: var(--font-heading, Georgia, serif);
}

.delta-article p {
  margin-bottom: var(--delta-space-4);
}

.article-paragraph {
  color: var(--color-black);
}

.article-body {
  font-size: 1.08rem;
  line-height: 1.6;
  font-weight: 350;
}

/* -------------------------------------------------------
   SECTION FLOW
-------------------------------------------------------- */

section {
  margin-bottom: var(--delta-space-7);
}

/* -------------------------------------------------------
   FLEX & GRID UTILITIES
-------------------------------------------------------- */

.delta-flex {
  display: flex;
  gap: var(--delta-space-4);
}

.delta-flex-center {
  display: flex;
  justify-content: center;
  align-items: center;
}

.delta-grid {
  display: grid;
  gap: var(--delta-space-4);
}

.delta-grid-2 {
  grid-template-columns: repeat(2, 1fr);
}

.delta-grid-3 {
  grid-template-columns: repeat(3, 1fr);
}

/* -------------------------------------------------------
   RESPONSIVE BREAKPOINTS
-------------------------------------------------------- */

@media (max-width: 900px) {
  .delta-container {
    padding: var(--delta-space-4) var(--delta-space-3);
  }

  .delta-grid-2,
  .delta-grid-3 {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 600px) {
  .delta-body {
    padding: var(--delta-space-3);
  }

  .delta-container {
    padding: var(--delta-space-3) var(--delta-space-2);
  }
}

/* ============================================================
   Delta Layout — Spacing Utilities
   Geometry-only utilities: margins, negative margins, centering
   ============================================================ */

/* ------------------------------
   Positive Top Margin
   ------------------------------ */
.u-mt--xs  { margin-top: var(--space-xs); }
.u-mt--sm  { margin-top: var(--space-sm); }
.u-mt--md  { margin-top: var(--space-md); }
.u-mt--md2 { margin-top: var(--space-md2); }
.u-mt--lg  { margin-top: var(--space-lg); }
.u-mt--xl  { margin-top: var(--space-xl); }

/* ------------------------------
   Positive Bottom Margin
   ------------------------------ */
/* ============================================================
   Image-Specific Spacing Utilities (Vertical Rhythm)
   Strengthened specificity: img.u-mb--*
   Synchronized with Delta AHK hotkey naming
   ============================================================ */

/* ---------- Canonical Scale (Double-Dash) ---------- */
img.u-mb--0   { margin-bottom: 0; }
img.u-mb--xs  { margin-bottom: var(--space-xs); }
img.u-mb--sm  { margin-bottom: var(--space-sm); }
img.u-mb--md  { margin-bottom: var(--space-md); }
img.u-mb--md2 { margin-bottom: var(--space-md2); }
img.u-mb--lg  { margin-bottom: var(--space-lg); }
img.u-mb--xl  { margin-bottom: var(--space-xl); }

/* ---------- Micro-Step Interstitial Rhythm ---------- */
img.u-mb--smmd  { margin-bottom: var(--space-smmd); }   /* sm → md */
img.u-mb--mdlg  { margin-bottom: var(--space-mdlg); }   /* md → lg */
img.u-mb--mdlg2 { margin-bottom: var(--space-mdlg2); }  /* md → lg (stronger) */

/* ---------- Negative Bottom Margins (Legacy-Safe) ---------- */
img.u-mb--1 { margin-bottom: -0.5rem; }
img.u-mb--2 { margin-bottom: -1rem; }
img.u-mb--3 { margin-bottom: -1.5rem; }
img.u-mb--4 { margin-bottom: -2rem; }
img.u-mb--5 { margin-bottom: -3rem; }
img.u-mb--6 { margin-bottom: -4rem; }

/* ---------- Tight Spacing Helpers ---------- */
img.u-mb--tight { margin-bottom: 0.25rem; }

/* ---------- Legacy Direct Value Helper ---------- */
img.u-mb--4rem { margin-bottom: 2rem; } /* backward compatibility */

/* ------------------------------
   Negative Top Margin
   ------------------------------ */
.u-mt-neg--sm { margin-top: calc(var(--space-sm) * -1); }
.u-mt-neg--md { margin-top: calc(var(--space-md) * -1); }
.u-mt-neg--md2 { margin-top: calc(var(--space-md2) * -1); }
.u-mt-neg--lg { margin-top: calc(var(--space-lg) * -1); }
.u-mt-neg--xl { margin-top: calc(var(--space-xl) * -1); }

/* ============================================================
   Image-Specific Top Margin Utilities (Vertical Rhythm)
   Strengthened specificity: img.u-mt--*
   ============================================================ */

/* ---------- Canonical Scale ---------- */
img.u-mt-0   { margin-top: 0; }
img.u-mt-xs  { margin-top: var(--space-xs); }
img.u-mt-sm  { margin-top: var(--space-sm); }
img.u-mt-md  { margin-top: var(--space-md); }
img.u-mt-lg  { margin-top: var(--space-lg); }
img.u-mt-xl  { margin-top: var(--space-xl); }

/* ---------- Micro-Step Interstitial Rhythm ---------- */
img.u-mt-smmd  { margin-top: var(--space-smmd); }   /* sm → md */
img.u-mt-mdlg  { margin-top: var(--space-mdlg); }   /* md → lg */
img.u-mt-mdlg2 { margin-top: var(--space-mdlg2); }  /* md → lg (stronger) */

/* ---------- Negative Top Margins (Delta-Safe) ---------- */
img.u-mt-neg--xs { margin-top: -0.25rem; }
img.u-mt-neg--sm { margin-top: -0.5rem; }
img.u-mt-neg--md { margin-top: -1rem; }
img.u-mt-neg--lg { margin-top: -1.5rem; }
img.u-mt-neg--xl { margin-top: -2rem; }

/* ---------- Tight Spacing Helpers ---------- */
img.u-mt-tight { margin-top: 0.25rem; }

/* ---------- Legacy Direct Value Helper ---------- */
img.u-mt-4 { margin-top: 2rem; } /* retained for backward compatibility */

/* ------------------------------
   Auto-Centering
   ------------------------------ */
.u-mx-auto { margin-left: auto; margin-right: auto; }

/* ------------------------------
   Padding (layout-level)
   ------------------------------ */
.u-pad-xs { padding: var(--space-xs); }
.u-pad-sm { padding: var(--space-sm); }
.u-pad-md { padding: var(--space-md); }
.u-pad-lg { padding: var(--space-lg); }
