/*
 * Overrides for Framer's output. Framer writes its colours as inline styles, so
 * these need !important to land — the selectors are deliberately narrow, keyed
 * to attributes that af/polish.js sets rather than to Framer's hashed classes,
 * which change whenever the site is republished.
 */

:root {
  --af-cream: #fff9f3;
  --af-navy: #0d2a47;
  --af-blue: #005dc5;
  --af-indigo: #3a30ba;
  --af-muted: #6d7d93;
  --af-yellow: #faea73;
  --af-line: rgba(13, 42, 71, 0.1);
}

/* ---------------------------------------------- the pale blue blocks ------ */

/* Big blocks were a flat wash of #bfd7ed. A soft cream lets white cards sit on
   top of it and read as cards, which is what the accordions needed. */
[data-af-blue="section"] {
  background: linear-gradient(180deg, #fffdfa 0%, var(--af-cream) 60%, #fdf3e8 100%) !important;
}

[data-af-blue="card"] {
  background: #ffffff !important;
  border: 1px solid var(--af-line) !important;
  border-radius: 18px !important;
  box-shadow: 0 2px 4px rgba(13, 42, 71, 0.04), 0 12px 28px rgba(13, 42, 71, 0.07) !important;
  transition: transform 0.18s ease, box-shadow 0.18s ease !important;
}

[data-af-blue="card"]:hover {
  transform: translateY(-3px) !important;
  box-shadow: 0 4px 8px rgba(13, 42, 71, 0.05), 0 18px 40px rgba(13, 42, 71, 0.11) !important;
}

/* ------------------------------------------------------- accordions ------- */

/* Each row becomes its own card with breathing room, instead of rows of text
   separated by hairlines on a coloured wash. */
[data-af-acc] {
  background: #ffffff !important;
  border: 1px solid var(--af-line) !important;
  border-bottom: 1px solid var(--af-line) !important;
  border-radius: 16px !important;
  margin-bottom: 14px !important;
  padding: 6px 24px !important;
  box-shadow: 0 1px 2px rgba(13, 42, 71, 0.04), 0 8px 22px rgba(13, 42, 71, 0.06) !important;
  transition: box-shadow 0.18s ease, border-color 0.18s ease, transform 0.18s ease !important;
  overflow: hidden !important;
}

[data-af-acc]:hover {
  border-color: rgba(0, 93, 197, 0.35) !important;
  box-shadow: 0 2px 4px rgba(13, 42, 71, 0.05), 0 14px 34px rgba(13, 42, 71, 0.1) !important;
  transform: translateY(-2px) !important;
}

/* A left accent that appears on hover, so the row you are on is obvious. */
[data-af-acc]::before {
  content: "";
  position: absolute;
  left: 0;
  top: 12px;
  bottom: 12px;
  width: 3px;
  border-radius: 0 3px 3px 0;
  background: var(--af-blue);
  opacity: 0;
  transition: opacity 0.18s ease;
}

[data-af-acc] { position: relative !important; }
[data-af-acc]:hover::before { opacity: 1; }

[data-af-acc-q] {
  cursor: pointer !important;
  padding: 8px 0 !important;
}

/* The question text sat at 24px, which crowded the row once it became a card. */
[data-af-acc-q] p,
[data-af-acc-q] h3,
[data-af-acc-q] h4 {
  --framer-font-size: 19px !important;
  --framer-line-height: 1.5em !important;
  --framer-font-weight: 600 !important;
  letter-spacing: -0.01em !important;
}

/* ------------------------------------------------ swapped-in artwork ------ */

img[data-af-swapped] {
  object-fit: cover !important;
  object-position: left top !important;
  border-radius: 16px !important;
  box-shadow: 0 4px 10px rgba(13, 42, 71, 0.07), 0 20px 46px rgba(13, 42, 71, 0.12) !important;
  background: #fff !important;
  border: 1px solid var(--af-line) !important;
}

.af-shot {
  margin: 28px auto 8px !important;
  max-width: 1080px !important;
  padding: 0 20px !important;
  box-sizing: border-box !important;
}

.af-shot img {
  display: block !important;
  width: 100% !important;
  height: auto !important;
  border-radius: 18px !important;
  border: 1px solid var(--af-line) !important;
  box-shadow: 0 4px 10px rgba(13, 42, 71, 0.07), 0 22px 50px rgba(13, 42, 71, 0.13) !important;
  background: #fff !important;
}

.af-shot-cap {
  margin: 14px 0 0 !important;
  text-align: center !important;
  font-family: "Inter", system-ui, sans-serif !important;
  font-size: 15px !important;
  color: var(--af-muted) !important;
}

.af-shot-cap a { color: var(--af-blue) !important; font-weight: 600 !important; }

/* The tutorial clip is a screen recording, so letterbox it on white rather
   than cropping the app's chrome off with object-fit: cover. */
video[data-af-video] {
  background: #fff !important;
  object-fit: contain !important;
}

@media (prefers-reduced-motion: reduce) {
  [data-af-acc], [data-af-blue="card"] { transition: none !important; }
  [data-af-acc]:hover, [data-af-blue="card"]:hover { transform: none !important; }
}

/* ------------------------------------------------------- the hero reel ---- */

/* Framer sized this box for a wide motion graphic. The reel is worth more
   room, and on a phone the original height left it a thin strip. */
video[data-af-hero] {
  width: 100% !important;
  height: auto !important;
  min-height: 460px !important;
  max-height: 78vh !important;
  object-fit: contain !important;
  background: #14161c !important;
  border-radius: 20px !important;
  display: block !important;
}

/* The container Framer wraps it in has its own fixed height, which would clip
   whatever the video does. */
video[data-af-hero] { position: relative; z-index: 1; }

[data-af-hero-host] {
  height: auto !important;
  max-height: none !important;
  min-height: 0 !important;
  aspect-ratio: auto !important;
}

button[data-af-sound] {
  /* Top-left, not bottom-right: the bottom of a 500px video is below the fold
     on load, and that corner is also where the cookie banner sits — between
     them the control was effectively undiscoverable. */
  position: absolute;
  top: 16px;
  right: 16px;
  z-index: 20;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  border: 1px solid rgba(255, 255, 255, 0.25);
  border-radius: 999px;
  padding: 10px 18px 10px 14px;
  font-family: "Inter", system-ui, sans-serif;
  font-size: 13px;
  font-weight: 600;
  color: #fff;
  background: rgba(13, 22, 33, 0.78);
  -webkit-backdrop-filter: blur(8px);
  backdrop-filter: blur(8px);
  cursor: pointer;
  box-shadow: 0 4px 14px rgba(0, 0, 0, 0.28);
  transition: background 0.15s ease, transform 0.15s ease;
}

button[data-af-sound] svg { display: block; flex: 0 0 auto; }

button[data-af-sound]:hover {
  background: rgba(13, 22, 33, 0.95);
  transform: translateY(-1px);
}

button[data-af-sound]:focus-visible {
  outline: 2px solid #faea73;
  outline-offset: 2px;
}

@media (max-width: 780px) {
  video[data-af-hero] {
    /* An explicit height rather than min-height: the wrapper constrains the
       box, so height:auto never reached the video's own aspect ratio. The
       portrait cut is close to this shape, so contain barely letterboxes. */
    height: 64vh !important;
    min-height: 0 !important;
    max-height: none !important;
    border-radius: 16px !important;
  }
  button[data-af-sound] { top: 10px; right: 10px; padding: 9px 15px 9px 12px; font-size: 12px; }
}

@media (max-width: 420px) {
  video[data-af-hero] { height: 60vh !important; }
}
