/* ==========================================================================
   FORGYEN — Case Studies archive (/case-studies/)
   Generated by tools/build_case_studies.py (templates/case-studies-archive.html).
   Builds on main.css tokens. Scoped to .ca-*. Logical properties for RTL.
   Structure: 1 Page · 2 Intro · 3 Project list · 4 Discovery invitation
              5 Responsive
   ========================================================================== */

/* 1. Page ---------------------------------------------------------------- */
.ca-page { background: #F9F5EF; }
.ca {
  display: block;
  overflow-x: clip;
  background:
    radial-gradient(52% 30% at 88% 4%, rgba(40, 74, 99, 0.07), transparent 72%),
    radial-gradient(40% 24% at 4% 10%, rgba(184, 115, 51, 0.06), transparent 72%),
    linear-gradient(180deg, #FBF8F3 0%, #F8F4EE 40%, #F5F1EB 100%);
}
.ca-accent { color: #B8692E; }

/* 2. Intro --------------------------------------------------------------- */
.ca-intro { padding-block: calc(var(--fg-header-h) + clamp(40px, 5vw, 80px)) clamp(48px, 5vw, 80px); }
.ca-eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  margin: 0 0 clamp(20px, 2.2vw, 30px);
  padding: 9px 20px 9px 18px;
  border: 1px solid rgba(11, 19, 32, 0.07);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.72);
  box-shadow: 0 10px 24px -18px rgba(11, 19, 32, 0.35);
  color: var(--fg-navy-950);
  font-size: 0.9375rem;
  font-weight: 500;
}
.ca-eyebrow__dot { width: 7px; height: 7px; border-radius: 50%; background: var(--fg-copper); }
.ca-title {
  max-width: 12em;
  margin: 0;
  color: var(--fg-navy-950);
  font-size: clamp(2.5rem, 1rem + 3.9vw, 4.75rem);        /* 40 → 76 */
  font-weight: 800;
  line-height: 1.02;
  letter-spacing: -0.045em;
}
.ca-title .ca-accent { display: block; }
.ca-lead {
  max-width: 38em;
  margin: clamp(18px, 2vw, 28px) 0 0;
  color: #4A5468;
  font-size: clamp(1.0625rem, 0.95rem + 0.4vw, 1.375rem);
  line-height: 1.55;
}
.ca-count {
  display: flex;
  align-items: center;
  gap: 14px;
  margin: clamp(26px, 3vw, 40px) 0 0;
  color: #8E5424;
  font-size: 0.8125rem;
  font-weight: 700;
  letter-spacing: 0.16em;
  text-transform: uppercase;
}
.ca-count::before { content: ""; width: 36px; height: 2px; border-radius: 2px; background: var(--fg-copper); }

/* 3. Project list: editorial rows, cover and story alternating sides ---- */
.ca-list {
  display: grid;
  gap: clamp(56px, 7vw, 112px);
  margin: 0;
  padding-block: clamp(8px, 1vw, 16px) clamp(72px, 8vw, 128px);
  list-style: none;
}
.ca-item {
  display: grid;
  grid-template-columns: minmax(0, 1.42fr) minmax(0, 1fr);
  align-items: center;
  gap: clamp(32px, 5vw, 80px);
  padding-block-start: clamp(40px, 5vw, 72px);
  border-block-start: 1px solid rgba(11, 19, 32, 0.08);
}
.ca-item:first-child { padding-block-start: 0; border-block-start: 0; }
.ca-item:nth-child(even) { grid-template-columns: minmax(0, 1fr) minmax(0, 1.42fr); }
.ca-item:nth-child(even) .ca-item__cover { order: 2; }

.ca-item__cover {
  display: block;
  overflow: hidden;
  aspect-ratio: 16 / 9;
  border-radius: 14px;
  background: #E9ECEF;
  box-shadow:
    0 0 0 1px rgba(255, 255, 255, 0.85),
    0 1px 2px rgba(40, 74, 99, 0.08),
    0 34px 60px -36px rgba(40, 74, 99, 0.55);
  transition: transform var(--fg-dur-std) var(--fg-ease), box-shadow var(--fg-dur-std) var(--fg-ease);
}
.ca-item__cover img { display: block; width: 100%; height: 100%; object-fit: cover; }
.ca-item:hover .ca-item__cover {
  box-shadow:
    0 0 0 1px rgba(184, 115, 51, 0.4),
    0 1px 2px rgba(40, 74, 99, 0.08),
    0 40px 70px -36px rgba(40, 74, 99, 0.6);
}
@media (prefers-reduced-motion: no-preference) {
  .ca-item:hover .ca-item__cover { transform: translateY(-4px); }
}

.ca-item__body { min-width: 0; max-width: 32em; }
.ca-item__num {
  margin: 0;
  color: var(--fg-copper);
  font-size: clamp(0.9375rem, 0.85rem + 0.3vw, 1.125rem);
  font-weight: 700;
  letter-spacing: 0.08em;
}
.ca-item__title {
  margin: 10px 0 0;
  color: var(--fg-navy-950);
  font-size: clamp(1.625rem, 1.1rem + 1.4vw, 2.5rem);     /* 26 → 40 */
  font-weight: 800;
  line-height: 1.1;
  letter-spacing: -0.03em;
  text-wrap: balance;
}
.ca-item__meta {
  margin: 14px 0 0;
  color: #6B7385;
  font-size: 0.8125rem;
  font-weight: 600;
  letter-spacing: 0.1em;
  line-height: 1.6;
  text-transform: uppercase;
}
.ca-item__summary {
  margin: 16px 0 0;
  color: #2E3B52;
  font-size: clamp(1rem, 0.94rem + 0.25vw, 1.125rem);
  line-height: 1.6;
}
.ca-item__result {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  gap: 4px 12px;
  margin: 22px 0 0;
  padding-block-start: 18px;
  border-block-start: 1px solid rgba(184, 115, 51, 0.25);
}
.ca-item__value {
  color: #B8692E;
  font-size: clamp(1.5rem, 1.2rem + 0.9vw, 2.125rem);
  font-weight: 800;
  letter-spacing: -0.025em;
  line-height: 1.1;
}
.ca-item__label { color: var(--fg-navy-950); font-size: 1rem; font-weight: 600; }
.ca-item__link { margin-top: 14px; color: #8E5424; }
.ca-item__link .text-link__label::before { background: rgba(184, 115, 51, 0.25); }
.ca-item:hover .ca-item__link .text-link__label::after { width: 100%; }
.ca-item:hover .ca-item__link .text-link__arrow { transform: translateX(4px); }

/* 4. Discovery invitation: a navy band that hands over to the footer --- */
.ca-cta {
  --ca-arc: clamp(32px, 4.4vw, 68px);
  position: relative;
  padding-block: calc(var(--ca-arc) + clamp(36px, 4vw, 64px)) clamp(48px, 5vw, 80px);
  border-radius: 50% 50% 0 0 / var(--ca-arc) var(--ca-arc) 0 0;
  background:
    radial-gradient(50% 60% at 85% 30%, rgba(201, 130, 69, 0.08), transparent 70%),
    linear-gradient(180deg, #0C1828 0%, #0E1B2E 55%, #16233A 100%);   /* ends on the footer's opening navy */
  color: #F4F1EC;
}
.ca-cta__inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: clamp(24px, 4vw, 64px);
}
.ca-cta__title {
  margin: 0;
  color: #F6F3EE;
  font-size: clamp(1.75rem, 1rem + 2vw, 3rem);
  font-weight: 800;
  line-height: 1.08;
  letter-spacing: -0.035em;
}
.ca-cta__accent { color: #D08A4F; }
.ca-cta__text { margin: 12px 0 0; color: #D3D9E1; font-size: clamp(1rem, 0.92rem + 0.3vw, 1.25rem); line-height: 1.5; }
.ca-cta__button {
  display: inline-flex;
  flex: none;
  align-items: center;
  justify-content: center;
  gap: 12px;
  min-height: 60px;
  padding: 0 30px;
  border-radius: 999px;
  background: linear-gradient(180deg, #D08A4F 0%, #B0642C 60%, #9E5626 100%);
  color: #FFFFFF;
  font-size: clamp(1rem, 0.92rem + 0.3vw, 1.1875rem);
  font-weight: 600;
  text-decoration: none;
  white-space: nowrap;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.28), 0 18px 34px -18px rgba(208, 138, 79, 0.75);
  transition: filter var(--fg-dur-micro) var(--fg-ease);
}
.ca-cta__button svg { width: 20px; height: 20px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; transition: transform var(--fg-dur-micro) var(--fg-ease); }
.ca-cta__button:hover { filter: brightness(1.06); }
.ca-cta__button:hover svg { transform: translateX(4px); }
.ca-cta__button:focus-visible { outline: 2px solid #F0C9A2; outline-offset: 4px; }
.ca a:focus-visible { outline-offset: 4px; }

/* 5. Responsive ---------------------------------------------------------- */
@media (max-width: 1023px) {
  .ca-item, .ca-item:nth-child(even) { grid-template-columns: minmax(0, 1fr); gap: 26px; }
  .ca-item:nth-child(even) .ca-item__cover { order: 0; }
  .ca-item__body { max-width: 40em; }
  .ca-cta__inner { flex-direction: column; align-items: flex-start; }
}

@media (max-width: 599px) {
  .ca-intro { padding-block: calc(var(--fg-header-h) + 28px) 36px; }
  .ca-eyebrow { margin-bottom: 20px; padding: 8px 18px 8px 16px; font-size: 0.875rem; }
  .ca-title { font-size: min(2.75rem, 11.4vw); }
  .ca-lead { font-size: 1.0625rem; }
  .ca-list { gap: 44px; padding-bottom: 64px; }
  .ca-item { gap: 18px; padding-top: 36px; }
  .ca-item__cover { border-radius: 10px; }
  .ca-item__title { font-size: min(1.75rem, 7.2vw); }
  .ca-item__meta { font-size: 0.75rem; }
  .ca-cta { --ca-arc: 28px; padding-bottom: 40px; }
  .ca-cta__title .ca-cta__accent { display: block; }
  .ca-cta__inner { align-items: stretch; gap: 22px; }
  .ca-cta__button { min-height: 56px; padding: 0 14px; font-size: min(1rem, 3.95vw); gap: 8px; }
  .ca-cta__button svg { width: 18px; height: 18px; }
}
