/* Optimize Inc. — Answers section
   Layout: full-bleed photographic hero, short-answer card lifted over its edge,
   a reading column with a sticky "on this page" rail, then photo cards.
   Builds on site.css tokens; fallbacks keep it intact if a token is missing. */
.ans {
  --a-ink: #0e2a4f;                 /* deep navy, pulled toward the logo blue */
  --a-blue: #3065b5;                /* Optimize logo blue */
  --a-blue-deep: #1b4585;
  --a-blue-tint: #edf3fb;           /* blue-white ground */
  --a-blue-line: #d3e0f2;
  --a-ink-2: var(--ink-2, #1d3a55);
  --a-soft: var(--ink-soft, #3a4f63);
  --a-muted: var(--muted, #5b6b7a);
  --a-paper: var(--paper, #ffffff);
  --a-line: #d3e0f2;
  --a-orange: var(--orange, #e8701a);
  --a-cta: var(--orange-cta, #bf540e);
  --a-orange-tint: var(--orange-tint, #fdf0e6);
  --a-serif: var(--font-serif, "Source Serif 4", "Source Serif Pro", Georgia, serif);
  --a-sans: var(--font-sans, "Inter", ui-sans-serif, system-ui, sans-serif);
  --a-radius: var(--radius-lg, 16px);
  --a-shadow: 0 1px 2px rgba(14, 42, 79, .06), 0 18px 48px rgba(14, 42, 79, .16);
  color: var(--a-ink);
  background: var(--a-paper);
}
.ans .wrap { box-sizing: border-box; }
.ans .eyebrow {
  font: 700 .78rem/1.2 var(--a-sans);
  letter-spacing: .12em;
  text-transform: uppercase;
  color: var(--a-cta);
  margin: 0 0 .75rem;
}

/* ---------- hero ---------- */
.ans-hero {
  position: relative;
  isolation: isolate;
  overflow: hidden;
  background: var(--a-ink);
  color: #fff;
}
.ans-hero-img {
  position: absolute; inset: 0;
  width: 100%; height: 100%;
  object-fit: cover;
  object-position: 50% 30%;
  z-index: -2;
  transform: scale(1.04);
  animation: ans-settle 1.6s cubic-bezier(.2,.7,.2,1) both;
}
.ans-hero-shade {
  position: absolute; inset: 0; z-index: -1;
  background:
    linear-gradient(90deg, rgba(9, 30, 64, .93) 0%, rgba(20, 58, 120, .74) 45%, rgba(48, 101, 181, .18) 100%),
    linear-gradient(0deg, rgba(9, 30, 64, .72) 0%, rgba(9, 30, 64, 0) 45%);
}
.ans-hero-inner {
  padding-top: clamp(28px, 3.5vw, 44px);
  padding-bottom: clamp(72px, 7vw, 92px);
  max-width: var(--wrap, 1160px);
}
.ans-hero .eyebrow { color: #f6b27a; }
.ans-hero h1 {
  font: 600 clamp(1.9rem, 3.8vw, 3rem)/1.1 var(--a-serif);
  letter-spacing: -.015em;
  max-width: 26ch;
  margin: 0 0 1rem;
  color: #fff;
  text-wrap: balance;
}
.ans-hero-lede {
  font: 400 clamp(1.05rem, 1.6vw, 1.25rem)/1.55 var(--a-sans);
  max-width: 52ch;
  color: rgba(255, 255, 255, .86);
  margin: 0 0 1.25rem;
}
.ans-crumbs {
  display: flex; flex-wrap: wrap; gap: .5rem;
  font: 500 .85rem/1.4 var(--a-sans);
  color: rgba(255, 255, 255, .7);
  margin-bottom: 1rem;
}
.ans-crumbs a { color: rgba(255, 255, 255, .85); text-decoration: none; }
.ans-crumbs a:hover { color: #fff; text-decoration: underline; }
@keyframes ans-settle { from { transform: scale(1.1); } to { transform: scale(1.04); } }

.ans-byline { display: flex; align-items: center; gap: .85rem; }
.ans-byline img {
  width: 48px; height: 48px; border-radius: 50%; object-fit: cover;
  box-shadow: 0 0 0 2px #fff, 0 0 0 4px var(--a-blue);
}
.ans-byline div { display: grid; gap: .1rem; font: 400 .9rem/1.35 var(--a-sans); }
.ans-byline a { font-weight: 650; color: inherit; text-decoration: none; }
.ans-byline a:hover { text-decoration: underline; }
.ans-byline.on-dark span { color: rgba(255, 255, 255, .75); }

/* ---------- short answer ---------- */
.ans-answer-wrap { position: relative; z-index: 2; margin-top: clamp(-88px, -8vw, -56px); }
.ans-answer {
  background: var(--a-paper);
  border-radius: var(--a-radius);
  box-shadow: var(--a-shadow);
  padding: clamp(24px, 4vw, 44px) clamp(22px, 4.5vw, 52px);
  max-width: 900px;
  border-top: 4px solid var(--a-orange);
}
.ans-answer > p:last-child {
  font: 400 clamp(1.12rem, 1.8vw, 1.35rem)/1.6 var(--a-serif);
  color: var(--a-ink);
  margin: 0;
}

/* ---------- body ---------- */
.ans-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 48px;
  padding-top: clamp(40px, 6vw, 72px);
  padding-bottom: clamp(48px, 7vw, 88px);
}
@media (min-width: 1040px) {
  .ans-layout { grid-template-columns: minmax(0, 680px) 240px; justify-content: space-between; }
}
.ans-body { min-width: 0; font: 400 1.075rem/1.75 var(--a-sans); color: var(--a-soft); }
.ans-body p { margin: 0 0 1.15rem; }
.ans-lede { font-size: 1.22rem; line-height: 1.65; color: var(--a-ink); }
.ans-sec { margin-top: 2.6rem; scroll-margin-top: 128px; }
.ans-sec h2 {
  font: 600 clamp(1.45rem, 2.4vw, 1.85rem)/1.2 var(--a-serif);
  color: var(--a-blue-deep);
  margin: 0 0 .9rem;
  text-wrap: balance;
  scroll-margin-top: 128px;
}
.ans-figure { margin: 2.75rem 0; }
.ans-figure-img {
  display: block; width: 100%; height: auto; max-width: 100%;
  aspect-ratio: 3 / 2; object-fit: cover;
  border-radius: var(--a-radius);
}
@media (min-width: 1040px) {
  .ans-figure { margin-left: -40px; margin-right: -120px; }
}

.ans-case {
  margin: 3rem 0;
  padding: clamp(26px, 4vw, 44px);
  border-radius: var(--a-radius);
  background: linear-gradient(135deg, var(--a-ink) 0%, var(--a-blue-deep) 100%);
  color: rgba(255, 255, 255, .92);
  position: relative;
  overflow: hidden;
}
.ans-case::before {
  content: "";
  position: absolute; right: -60px; top: -60px;
  width: 220px; height: 220px; border-radius: 50%;
  border: 36px solid rgba(232, 112, 26, .16);
}
.ans-case .eyebrow { color: #f6b27a; position: relative; }
.ans-case p:last-child {
  position: relative;
  font: 400 clamp(1.08rem, 1.7vw, 1.22rem)/1.65 var(--a-serif);
  margin: 0;
}

.ans-helps {
  margin: 3rem 0;
  padding: clamp(24px, 4vw, 40px);
  border-radius: var(--a-radius);
  background: var(--a-blue-tint);
  border-left: 4px solid var(--a-blue);
  color: var(--a-ink);
}
.ans-helps p:not(.eyebrow) { color: var(--a-ink); }
.ans-helps .btn-row { display: flex; flex-wrap: wrap; align-items: center; gap: 1rem 1.5rem; margin-top: 1.25rem; }

.ans-bottom { margin: 3.5rem 0; padding-top: 1.75rem; border-top: 3px solid var(--a-blue); }
.ans-bottom blockquote { margin: 0; }
.ans-bottom blockquote p {
  font: 600 clamp(1.35rem, 2.6vw, 1.85rem)/1.35 var(--a-serif);
  color: var(--a-ink);
  margin: 0;
  text-wrap: balance;
}

.ans-author {
  display: grid; grid-template-columns: 112px minmax(0, 1fr); gap: 24px; align-items: start;
  margin-top: 3.5rem; padding: 28px; border: 1px solid var(--a-line); border-radius: var(--a-radius);
}
.ans-author img { width: 112px; height: 112px; border-radius: 50%; object-fit: cover; box-shadow: 0 0 0 3px #fff, 0 0 0 5px var(--a-blue); }
.ans-author-text { font: 400 1rem/1.65 var(--a-sans); color: var(--a-soft); margin: 0 0 .9rem; }
@media (max-width: 560px) { .ans-author { grid-template-columns: minmax(0, 1fr); } .ans-author img { width: 88px; height: 88px; } }

.ans-textlink {
  display: inline-flex; align-items: center; gap: .4rem;
  font: 650 .95rem/1.3 var(--a-sans);
  color: var(--a-cta);
  text-decoration: none;
}
.ans-textlink::after { content: "→"; transition: transform .2s ease; }
.ans-textlink:hover::after, a:hover > .ans-feature-body .ans-textlink::after { transform: translateX(3px); }
.ans-pillar-link { margin-top: 2.5rem; font-size: .98rem; color: var(--a-muted); }
.ans-pillar-link a { color: var(--a-cta); font-weight: 600; }

.ans-toc { display: none; }
@media (min-width: 1040px) {
  .ans-toc {
    display: block; position: sticky; top: 128px; align-self: start;
    font: 400 .92rem/1.45 var(--a-sans);
    padding-left: 18px; border-left: 2px solid var(--a-blue-line);
  }
  .ans-toc ol { list-style: none; margin: 0 0 1.25rem; padding: 0; display: grid; gap: .65rem; }
  .ans-toc a:not(.ans-textlink) { color: var(--a-muted); text-decoration: none; }
  .ans-toc a:not(.ans-textlink):hover { color: var(--a-blue); }
}

/* ---------- cards ---------- */
.ans-related, .ans-hub-list { background: var(--a-blue-tint); padding-block: clamp(56px, 8vw, 96px); }
.ans-related h2, .ans-hub-list h2 {
  font: 600 clamp(1.6rem, 3vw, 2.2rem)/1.15 var(--a-serif);
  color: var(--a-ink); margin: 0 0 2rem;
}
.ans-grid { display: grid; gap: 28px; grid-template-columns: repeat(auto-fill, minmax(min(100%, 300px), 1fr)); }
.ans-card {
  display: flex; flex-direction: column; min-width: 0;
  background: var(--a-paper); border-radius: var(--a-radius); overflow: hidden;
  text-decoration: none; color: var(--a-ink);
  box-shadow: 0 1px 2px rgba(14, 42, 79, .06), inset 0 0 0 1px var(--a-blue-line);
  transition: box-shadow .25s ease, transform .25s ease;
}
.ans-card:hover, .ans-card:focus-visible { box-shadow: var(--a-shadow), inset 0 -3px 0 var(--a-blue); transform: translateY(-3px); }
.ans-card-media, .ans-feature-media { display: block; overflow: hidden; aspect-ratio: 3 / 2; max-width: 100%; background: var(--a-ink); }
.ans-card-media-wide { aspect-ratio: 16 / 9; } /* newsletter thumbnails carry text; do not crop them */
.ans-card-img { display: block; width: 100%; height: 100%; object-fit: cover; transition: transform .6s ease; }
.ans-card:hover .ans-card-img, .ans-feature:hover .ans-card-img { transform: scale(1.04); }
.ans-card-body { display: flex; flex-direction: column; gap: .55rem; padding: 22px 24px 26px; }
.ans-card-body .eyebrow { margin: 0; }
.ans-card-title { font: 600 1.28rem/1.25 var(--a-serif); text-wrap: balance; }
.ans-card-sum { font: 400 .95rem/1.55 var(--a-sans); color: var(--a-muted); }

/* ---------- hub ---------- */
.ans-hero-hub .ans-hero-inner { padding-bottom: clamp(84px, 8vw, 104px); }
.ans-feature-wrap { position: relative; z-index: 2; margin-top: clamp(-96px, -9vw, -60px); padding-bottom: clamp(48px, 7vw, 80px); }
.ans-feature {
  display: grid; grid-template-columns: minmax(0, 1fr);
  background: var(--a-paper); border-radius: var(--a-radius); overflow: hidden;
  box-shadow: var(--a-shadow); text-decoration: none; color: var(--a-ink);
}
@media (min-width: 900px) { .ans-feature { grid-template-columns: minmax(0, 1.05fr) minmax(0, 1fr); } .ans-feature-media { aspect-ratio: auto; min-height: 100%; } }
.ans-feature-body { display: flex; flex-direction: column; gap: .9rem; padding: clamp(26px, 4vw, 52px); }
.ans-feature-body .eyebrow { margin: 0; }
.ans-feature-title { font: 600 clamp(1.6rem, 3vw, 2.3rem)/1.15 var(--a-serif); text-wrap: balance; }
.ans-feature-sum { font: 400 1.04rem/1.65 var(--a-sans); color: var(--a-soft); }

.ans-room { padding-block: clamp(56px, 8vw, 104px); background: var(--a-paper); overflow-x: clip; }
.ans-room-photo { position: relative; }
.ans-room-photo::after { content: ""; position: absolute; inset: 18px -18px -18px 18px; border-radius: var(--a-radius); background: var(--a-blue); z-index: -1; }
.ans-room-inner { isolation: isolate; }
.ans-room-inner { display: grid; gap: clamp(28px, 5vw, 64px); grid-template-columns: minmax(0, 1fr); align-items: center; }
@media (min-width: 900px) { .ans-room-inner { grid-template-columns: minmax(0, 1.2fr) minmax(0, 1fr); } }
.ans-room-photo { margin: 0; }
.ans-room-img { display: block; width: 100%; height: auto; max-width: 100%; border-radius: var(--a-radius); box-shadow: var(--a-shadow); }
.ans-room-head { width: 96px; height: 96px; border-radius: 50%; object-fit: cover; display: block; margin-bottom: 1.25rem; }
.ans-room-copy .ans-author-text { font-size: 1.12rem; color: var(--a-ink); }

.ans a:focus-visible { outline: 3px solid var(--a-orange); outline-offset: 3px; border-radius: 6px; }
@media (prefers-reduced-motion: reduce) {
  .ans-hero-img { animation: none; }
  .ans-card, .ans-card-img, .ans-textlink::after { transition: none; }
}
