/* ═══ AGENTS — MAGAZINE SPREADS ═══ */

/* ── Base resets ── */
* { box-sizing: border-box; }
a { color: inherit; text-decoration: none; }
a:focus-visible,
button:focus-visible {
  outline: 2px solid currentColor;
  outline-offset: 3px;
  border-radius: var(--control-radius);
}

/* ── Page ── */
html:has(body.agents-page) {
  overflow-x: hidden;
}
body.agents-page {
  margin: 0;
  padding: 0;
  font-family: "Outfit", sans-serif;
  line-height: 1.55;
  background: var(--page-bg);
  color: var(--ink);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  --simple-wave-stroke: var(--ink-shadow);
  --simple-wave-glow: rgba(246, 250, 247, 0.14);
  --simple-wave-opacity: 0.58;
  --ag-watermark-opacity: 0.035;
  --ag-spread-tint: rgba(28, 50, 35, 0.045);
}
body.agents-page .page {
  position: relative;
  z-index: var(--z-raised);
  display: flex;
  flex-direction: column;
  min-height: 100dvh;
}
body.agents-page .site-footer {
  margin-top: auto;
}
:root:not([data-mode="light"]) body.agents-page {
  --simple-wave-stroke: rgba(220, 230, 225, 0.16);
  --simple-wave-glow: rgba(176, 196, 188, 0.12);
  --simple-wave-opacity: 0.5;
  --ag-watermark-opacity: 0.05;
  --star-empty: rgba(232, 239, 233, 0.28);
  --ag-spread-tint: rgba(180, 205, 188, 0.06);
}

/* ── Wave SVG ── */
.ag-wave-svg {
  position: fixed;
  inset: 0;
  width: 100%;
  height: 100%;
  z-index: var(--z-base);
  opacity: var(--simple-wave-opacity);
  mix-blend-mode: multiply;
  filter: saturate(104%);
  pointer-events: none;
}
:root:not([data-mode="light"]) .ag-wave-svg {
  mix-blend-mode: screen;
  filter: saturate(108%);
}
.ag-wave {
  fill: none;
  stroke: var(--simple-wave-stroke);
  stroke-width: 0.95;
  opacity: 0.58;
  stroke-linecap: round;
  filter: drop-shadow(0 0 0.16rem var(--simple-wave-glow));
}

/* ── Shared: eyebrow ── */
.ag-eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--accent);
  margin-bottom: 20px;
}

/* ── Shared: headings ── */
body.agents-page h1 {
  font-family: "Cormorant Garamond", serif;
  font-size: clamp(48px, 7vw, 96px);
  font-weight: 400;
  line-height: 0.93;
  letter-spacing: -0.025em;
  color: var(--ink);
  margin: 0 0 28px;
  max-width: 820px;
  overflow-wrap: break-word;
}
body.agents-page h2 {
  font-family: "Cormorant Garamond", serif;
  font-size: clamp(42px, 5vw, 68px);
  font-weight: 400;
  line-height: 1.04;
  letter-spacing: -0.02em;
  color: var(--ink);
  margin: 0 0 24px;
  overflow-wrap: break-word;
}
body.agents-page h1 em,
body.agents-page h2 em {
  font-style: italic;
  color: var(--accent);
}

/* ── Shared: section container ── */
.ag-sec {
  padding: 96px 48px;
  max-width: 1240px;
  margin: 0 auto;
}

/* ── Shared: button ── */
.ag-btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: var(--accent);
  color: var(--white);
  text-decoration: none;
  padding: 13px 26px;
  border-radius: var(--control-radius, 12px);
  font-size: 14px;
  font-weight: 500;
  font-family: inherit;
  border: none;
  cursor: pointer;
  transition: background 0.28s ease, transform 0.28s ease;
}
.ag-btn:hover {
  background: var(--accent-soft);
  transform: translateY(-1px);
}
.ag-btn:active { transform: none; }

/* ═══ S1: OPENING ═══ */
.ag-opening {
  padding-top: clamp(140px, 14vw, 180px);
  padding-bottom: clamp(40px, 4vw, 60px);
}
.ag-opening__sub {
  font-size: 17px;
  font-weight: 300;
  color: var(--ink-soft);
  line-height: 1.65;
  max-width: 520px;
}

/* ═══ S2: AGENT SPREADS ═══ */
.ag-spread {
  position: relative;
  padding: clamp(80px, 9vw, 120px) 0;
  overflow: hidden;
}
/* Alternating section highlight */
.ag-spread:nth-of-type(odd) {
  background: transparent;
}
.ag-spread:nth-of-type(even) {
  background: var(--ag-spread-tint);
}

/* ── Watermark ── */
.ag-spread__watermark {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  font-family: "Cormorant Garamond", serif;
  font-size: clamp(80px, 12vw, 140px);
  font-weight: 400;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--ink);
  opacity: var(--ag-watermark-opacity);
  user-select: none;
  pointer-events: none;
  z-index: var(--z-base);
  white-space: nowrap;
  line-height: 1;
}
.ag-spread--start .ag-spread__watermark {
  right: 48px;
}
.ag-spread--end .ag-spread__watermark {
  left: 48px;
}

/* ── Grid layout ── */
.ag-spread__inner {
  position: relative;
  z-index: var(--z-content);
  display: grid;
  gap: clamp(32px, 5vw, 72px);
  align-items: center;
}
.ag-spread--start .ag-spread__inner {
  grid-template-columns: clamp(280px, 36vw, 500px) 1fr;
}
.ag-spread--end .ag-spread__inner {
  grid-template-columns: 1fr clamp(280px, 36vw, 500px);
}
.ag-spread--end .ag-spread__photo-link {
  order: 2;
}

/* ── Photo (edge-bleed) ── */
.ag-spread__photo-link {
  display: block;
  align-self: stretch;
}
.ag-spread__photo {
  overflow: hidden;
  width: 100%;
  height: clamp(380px, 50vw, 580px);
  background: linear-gradient(140deg, var(--surface-layer-2), var(--surface-layer-1));
  border: 1px solid var(--surface-border);
  box-shadow: var(--panel-shadow);
}
.ag-spread__photo img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  filter: saturate(1.05) contrast(1.02);
  transition: transform 0.5s cubic-bezier(0.25, 1, 0.5, 1);
}
.ag-spread:hover .ag-spread__photo img {
  transform: scale(1.02);
}

/* Left spread: photo bleeds to left edge, rounded on right */
.ag-spread--start .ag-spread__photo {
  border-radius: 0 24px 24px 0;
  border-left: none;
}
/* Right spread: photo bleeds to right edge, rounded on left */
.ag-spread--end .ag-spread__photo {
  border-radius: 24px 0 0 24px;
  border-right: none;
}

/* ── Info ── */
.ag-spread__info {
  display: flex;
  flex-direction: column;
  gap: 16px;
  max-width: clamp(460px, 38vw, 620px);
  min-width: 0;
}
.ag-spread--start .ag-spread__info {
  padding-inline-end: clamp(0px, 4vw, 60px);
}
.ag-spread--end .ag-spread__info {
  padding-inline-start: clamp(0px, 4vw, 60px);
}
.ag-spread__photo-link:focus-visible {
  outline: 2px solid currentColor;
  outline-offset: 4px;
  border-radius: 24px;
}
.ag-spread__info h2 {
  font-family: "Cormorant Garamond", serif;
  font-size: clamp(1.8rem, 3vw, 2.6rem);
  margin: 0;
  line-height: 1.1;
  overflow-wrap: break-word;
}
.ag-spread__name:hover {
  text-decoration: underline;
  text-underline-offset: 4px;
}

/* ── Pull-quote ── */
.ag-spread__quote {
  font-family: "Cormorant Garamond", serif;
  font-style: italic;
  font-size: clamp(18px, 2.2vw, 22px);
  line-height: 1.55;
  color: var(--ink-soft);
  margin: 0;
  padding: 0;
  border: none;
  max-width: 460px;
  overflow-wrap: break-word;
}
.ag-spread__quote::before {
  content: "\201C";
  color: var(--accent);
  font-size: 1.4em;
  line-height: 0;
  vertical-align: -0.15em;
  margin-inline-end: 2px;
}

/* ── Metrics line ── */
.ag-spread__metrics {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 6px;
  font-size: 13px;
  color: var(--ink-soft);
}
.ag-spread__stars {
  display: flex;
  gap: 3px;
}
.ag-star {
  width: 14px;
  height: 14px;
  display: inline-block;
  background: var(--star-empty);
  clip-path: polygon(50% 0%, 61% 35%, 98% 35%, 68% 57%, 79% 91%, 50% 70%, 21% 91%, 32% 57%, 2% 35%, 39% 35%);
}
.ag-star.full { background: var(--star-fill); }
.ag-star.half { background: linear-gradient(90deg, var(--star-fill) 50%, var(--star-empty) 50%); }
.ag-spread__sep {
  color: var(--surface-border);
}

/* ── Actions ── */
.ag-spread__actions {
  display: flex;
  gap: 20px;
  align-items: center;
  margin-top: 4px;
}
.ag-spread__view,
.ag-spread__contact {
  font-size: 14px;
  font-weight: 500;
  color: var(--ink);
  display: inline-flex;
  align-items: center;
  min-height: 44px;
  padding: 11px 0;
  transition: color 0.16s ease;
}
.ag-spread__view:hover,
.ag-spread__contact:hover {
  color: var(--accent);
  text-decoration: underline;
  text-underline-offset: 3px;
}
.ag-spread__contact {
  color: var(--ink-soft);
}

/* ── Empty state ── */
.ag-empty {
  text-align: center;
  padding: clamp(80px, 10vw, 140px) 20px;
  color: var(--ink-soft);
  font-size: 0.95rem;
}
.ag-empty p { margin: 0 0 20px; }

/* ═══ S3: CLOSING ═══ */
.ag-closing {
  text-align: center;
  padding-bottom: clamp(80px, 9vw, 120px);
}
.ag-closing .ag-eyebrow {
  justify-content: center;
}
.ag-closing h2 {
  max-width: 640px;
  margin-inline-start: auto;
  margin-inline-end: auto;
}
.ag-closing__sub {
  font-size: 15px;
  color: var(--ink-soft);
  font-weight: 300;
  margin-bottom: 36px;
  line-height: 1.65;
  max-width: 480px;
  margin-inline-start: auto;
  margin-inline-end: auto;
}

/* ═══ REVEAL ANIMATION ═══ */
[data-reveal] {
  opacity: 0;
  transform: translateY(14px);
  transition: opacity 320ms ease, transform 320ms cubic-bezier(0.25, 1, 0.5, 1);
}
[data-reveal].is-revealed {
  opacity: 1;
  transform: translateY(0);
}

/* ═══ RESPONSIVE ═══ */
@media (max-width: 860px) {
  .ag-spread--start .ag-spread__inner,
  .ag-spread--end .ag-spread__inner {
    grid-template-columns: 1fr;
  }
  .ag-spread--end .ag-spread__photo-link { order: 0; }
  .ag-spread__photo {
    height: clamp(220px, 55vw, 320px);
    max-width: 480px;
    border-radius: 24px;
    border: 1px solid var(--surface-border);
  }
  .ag-spread { padding-inline: 20px; }
  .ag-spread__watermark {
    font-size: 72px;
    opacity: 0.03;
    left: 20px;
    right: auto;
  }
  .ag-spread__info {
    max-width: none;
    padding-inline-start: 0;
    padding-inline-end: 0;
  }
}

@media (max-width: 768px) {
  .ag-sec { padding-inline: 20px; }
}

@media (max-width: 540px) {
  .ag-spread__actions a {
    min-height: 44px;
    display: inline-flex;
    align-items: center;
    padding: 8px 0;
  }
}

/* ═══ REDUCED MOTION ═══ */
@media (prefers-reduced-motion: reduce) {
  [data-reveal] {
    opacity: 1;
    transform: none;
    transition: none;
  }
  .ag-spread:hover .ag-spread__photo img {
    transform: none;
  }
  .ag-spread__photo img,
  .ag-spread__view,
  .ag-spread__contact,
  .ag-btn {
    transition: none;
  }
  .ag-wave-svg { display: none; }
}
