/* ═══════════════════════════════════════════════════════════════
   LAYOUT.CSS — Container, grid, section structure, typography
   ═══════════════════════════════════════════════════════════════ */

/* ── CONTAINERS ───────────────────────────────────────────────── */
.container {
  max-width: 1140px;
  margin: 0 auto;
  padding: 0 clamp(1.25rem, 5vw, 4rem);
}

.container--wide {
  max-width: 1320px;
  margin: 0 auto;
  padding: 0 clamp(1.25rem, 5vw, 4rem);
}

.container--narrow {
  max-width: 760px;
  margin: 0 auto;
  padding: 0 clamp(1.25rem, 5vw, 4rem);
}

/* ── SECTION STRUCTURE ────────────────────────────────────────── */
.section {
  padding: clamp(4rem, 8vw, 6rem) 0;
  position: relative;
}

.section__eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: 0.72rem;
  font-weight: 500;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--accent);
  margin-bottom: 0.875rem;
}

.section__eyebrow::before {
  content: '';
  display: inline-block;
  width: 20px;
  height: 1px;
  background: var(--accent);
}

.section__title {
  font-family: var(--font-display);
  font-size: clamp(2rem, 4.5vw, 3rem);
  font-weight: 500;
  line-height: 1.1;
  letter-spacing: -0.025em;
  color: var(--text-primary);
  margin-bottom: clamp(2rem, 4vw, 3.5rem);
}

.section__title em {
  font-style: italic;
  color: var(--accent);
}

.section__subtitle {
  font-size: 1.05rem;
  color: var(--text-secondary);
  font-weight: 300;
  line-height: 1.8;
  max-width: 600px;
  margin-bottom: 2.5rem;
}

/* ── DIVIDER ──────────────────────────────────────────────────── */
.divider {
  height: 1px;
  background: var(--border);
}

/* ── GRIDS ────────────────────────────────────────────────────── */
.grid-2 {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: var(--gap-lg);
}

.grid-3 {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: var(--gap-lg);
}

.grid-4 {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: var(--gap-md);
}

/* ── CARDS ────────────────────────────────────────────────────── */
.card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--r-lg);
  padding: var(--gap-lg);
  transition:
    background var(--t-normal),
    border-color var(--t-normal),
    transform var(--t-normal),
    box-shadow var(--t-normal);
}

.card--interactive {
  cursor: pointer;
}

.card--interactive:hover {
  background: var(--bg-card-raised);
  border-color: var(--border-strong);
  transform: translateY(-3px);
  box-shadow: var(--shadow-md);
}

/* ── TYPOGRAPHY ───────────────────────────────────────────────── */
.display-xl {
  font-family: var(--font-display);
  font-size: clamp(3.2rem, 8vw, 6.5rem);
  font-weight: 400;
  line-height: 1.0;
  letter-spacing: -0.04em;
}

.display-lg {
  font-family: var(--font-display);
  font-size: clamp(2.2rem, 5vw, 4rem);
  font-weight: 400;
  line-height: 1.1;
  letter-spacing: -0.03em;
}

.label-sm {
  font-size: 0.72rem;
  font-weight: 500;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--text-muted);
}

.mono {
  font-family: var(--font-mono);
  font-size: 0.82em;
}

/* ── BADGES / PILLS ───────────────────────────────────────────── */
.badge {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 4px 12px;
  border-radius: var(--r-full);
  font-size: 0.75rem;
  font-weight: 500;
  border: 1px solid var(--border);
  background: var(--accent-light);
  color: var(--accent);
  font-family: var(--font-body);
}

.badge--success {
  background: rgba(34, 197, 94, 0.1);
  color: #16a34a;
  border-color: rgba(34, 197, 94, 0.2);
}

.badge--warning {
  background: rgba(245, 158, 11, 0.1);
  color: #d97706;
  border-color: rgba(245, 158, 11, 0.2);
}

.tech-tag {
  display: inline-block;
  padding: 4px 10px;
  background: var(--accent-light);
  color: var(--accent);
  border: 1px solid var(--border);
  border-radius: var(--r-sm);
  font-size: 0.73rem;
  font-weight: 500;
  font-family: var(--font-mono);
  transition:
    background var(--t-fast),
    transform 0.15s ease,
    box-shadow 0.15s ease;
  cursor: default;
}

.tech-tag:hover {
  background: var(--accent-medium);
  transform: scale(1.06) translateY(-1px);
  box-shadow: 0 0 0 1.5px var(--accent), var(--shadow-sm);
}

/* ── BUTTONS ──────────────────────────────────────────────────── */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 12px 28px;
  border-radius: var(--r-md);
  font-family: var(--font-body);
  font-size: 0.9rem;
  font-weight: 500;
  letter-spacing: 0.01em;
  cursor: pointer;
  text-decoration: none;
  border: 1px solid transparent;
  transition:
    background var(--t-fast),
    border-color var(--t-fast),
    color var(--t-fast),
    transform var(--t-fast),
    box-shadow var(--t-fast);
}

.btn:active { transform: scale(0.98); }

.btn--primary {
  background: var(--accent);
  color: var(--bg-root);
  border-color: var(--accent);
}
.btn--primary:hover {
  background: var(--accent-hover);
  border-color: var(--accent-hover);
  transform: translateY(-2px);
  box-shadow: var(--shadow-md);
  opacity: 1;
}

.btn--outline {
  background: transparent;
  color: var(--text-primary);
  border-color: var(--border-strong);
}
.btn--outline:hover {
  border-color: var(--accent);
  color: var(--accent);
  background: var(--accent-light);
  opacity: 1;
}

.btn--ghost {
  background: transparent;
  color: var(--text-secondary);
  border-color: transparent;
  padding: 8px 14px;
  font-size: 0.82rem;
}
.btn--ghost:hover {
  background: var(--accent-light);
  color: var(--accent);
  opacity: 1;
}

.btn--sm {
  padding: 7px 16px;
  font-size: 0.8rem;
}

/* ── ICON BUTTON ──────────────────────────────────────────────── */
.icon-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 40px;
  height: 40px;
  border-radius: var(--r-md);
  background: var(--accent-light);
  border: 1px solid var(--border);
  color: var(--accent);
  cursor: pointer;
  transition: background var(--t-fast), transform var(--t-fast);
}

.icon-btn:hover {
  background: var(--accent-medium);
  transform: scale(1.05);
}

/* ── ANIMATIONS ───────────────────────────────────────────────── */
.fade-up {
  opacity: 0;
  transform: translateY(28px);
  transition: opacity 0.55s ease, transform 0.55s ease;
}

.fade-up.visible {
  opacity: 1;
  transform: translateY(0);
}

.fade-in {
  opacity: 0;
  transition: opacity 0.5s ease;
}

.fade-in.visible { opacity: 1; }

/* ── RESPONSIVE UTILITIES ─────────────────────────────────────── */
.hide-mobile { display: block; }
.hide-desktop { display: none; }

@media (max-width: 768px) {
  .hide-mobile { display: none; }
  .hide-desktop { display: block; }
  .grid-3 { grid-template-columns: 1fr; }
  .grid-4 { grid-template-columns: repeat(2, 1fr); }
}
