/* Platform pages — Security and control, Microsoft Intune, BlackBerry UEM.
   Shared page layer for the three frames (1440 wide). Values from Figma
   "Notate — Security and control" / "— Microsoft Intune" / "— BlackBerry UEM". */

/* ---------- Hero: shared .fig-hero + .p-hero rules in styles.css ---------- */
.p-hero__copy .lead { width: min(478px, 100%); }

/* breadcrumb */
.crumbs ol { display: flex; flex-wrap: wrap; align-items: center; gap: 0 1.28em; }
.crumbs li { display: inline-flex; align-items: center; gap: 1.28em; }
.crumbs li + li::before { content: "/"; }
.crumbs a { background: linear-gradient(currentColor, currentColor) 0 100% / 0 1px no-repeat; transition: color .25s, background-size .45s var(--ease-out); }
.crumbs a:hover { color: var(--accent); background-size: 100% 1px; }
.crumbs [aria-current] { color: var(--muted); }

/* ---------- Sections ---------- */
.p-sec { padding: 96px 0; }
.p-sec--flush-bottom { padding-bottom: 0; }
.p-sec .section-heading + * { margin-top: 64px; }
.p-sec--bg { position: relative; isolation: isolate; overflow: hidden; }
.p-sec__bg { position: absolute; inset: 0; z-index: -1; background: center / cover no-repeat; }
.p-more { display: flex; justify-content: center; margin-top: 64px; }

/* ---------- Card grids ---------- */
.p-grid { display: grid; grid-template-columns: repeat(var(--cols, 3), minmax(0, 1fr)); gap: 20px; }
.p-grid--4 { --cols: 4; }

/* Feature card (88px illustrated icon) */
.p-card { padding: 32px; display: flex; flex-direction: column; gap: 20px; min-height: var(--min, 0); }
.p-card__text { display: flex; flex-direction: column; gap: 8px; }
.p-card__text .eyebrow { color: var(--accent); }
.p-card .title-sm { transition: color .25s; }
a.p-card:hover .title-sm { color: var(--accent); }

/* icon cropped from a Figma sprite sheet (--l/--t/--s from the design) */
.sprite { position: relative; flex: none; width: 88px; height: 88px; border-radius: var(--r-xl); overflow: hidden; transition: transform .6s var(--spring-bouncy); }
.sprite img { position: absolute; left: var(--l); top: var(--t); width: var(--s); height: var(--s); max-width: none; }
.card--hover:hover .sprite { transform: translateY(-4px) scale(1.06); }

/* Feature card / Image */
.p-imgcard { display: flex; flex-direction: column; overflow: hidden; }
.p-imgcard__media { aspect-ratio: 273 / 206; overflow: hidden; }
.p-imgcard__media img { width: 100%; height: 100%; object-fit: cover; transition: transform 1.1s var(--ease-out); }
.p-imgcard:hover .p-imgcard__media img { transform: scale(1.06); }
.p-imgcard .p-card__text { padding: 32px; }
.p-imgcard .title-sm { display: flex; align-items: center; gap: 8px; transition: color .25s; }
.p-imgcard .title-sm .arrow { color: var(--accent); opacity: 0; transform: translateX(-6px); transition: opacity .25s, transform .5s var(--spring-bouncy); }
.p-imgcard:hover .title-sm { color: var(--accent); }
.p-imgcard:hover .title-sm .arrow { opacity: 1; transform: none; }
.p-imgcard:active { transform: translateY(-2px) scale(0.99); transition-duration: .18s; }

/* ---------- Glass scene (Art card image + live screens) ----------
   .scene emulates object-fit: cover for a whole composition: the stage keeps the
   art's own aspect ratio (--ar) and the screen overlays are positioned in % of it,
   so screens stay locked inside the glass frames at any card size. */
.scene { position: relative; overflow: hidden; border-radius: var(--r-lg); container-type: size; isolation: isolate; }
.scene__stage {
  position: absolute;
  left: 50%;
  top: 50%;
  width: max(100cqw, 100cqh * var(--ar, 1));
  aspect-ratio: var(--ar, 1);
  translate: -50% -50%;
  container-type: inline-size;
  transition: scale .9s var(--ease-out);
}
.scene__bg { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.screen {
  position: absolute;
  left: var(--x); top: var(--y); width: var(--w); height: var(--h);
  border-radius: calc(var(--r) * 1cqw);
  overflow: hidden;
  background: #fff;
  transition: transform .9s var(--spring);
}
.screen img { width: 100%; height: 100%; object-fit: cover; object-position: 50% 0; }
/* .screen--mask: the Figma screen-image box clipped by the device's own screen shape.
   mask-image (the Figma mask SVG) is set inline so its URL resolves from the page;
   --ms / --mp = Figma's mask-size / mask-position in % of the box. */
.screen--mask {
  border-radius: 0;
  background: none;
  -webkit-mask-size: var(--ms, 100% 100%); mask-size: var(--ms, 100% 100%);
  -webkit-mask-position: var(--mp, 50% 50%); mask-position: var(--mp, 50% 50%);
  -webkit-mask-repeat: no-repeat; mask-repeat: no-repeat;
}
.screen--mask img { object-position: 50% 50%; }

/* Floating UI over a scene (comment card, chips, toolbar, toast). Box in % of the stage
   like .screen; everything inside is in Figma px of the art via --u (1px of a --sw-wide
   stage), so it scales with the scene as one unit. Children: --l/--t offset, --s size. */
.scene-ui {
  --u: calc(100cqw / var(--sw));
  position: absolute;
  left: var(--x); top: var(--y); width: var(--w); height: var(--h);
  border-radius: calc(var(--br) * var(--u));
  background: #fff;
  box-shadow: 0 calc(1 * var(--u)) calc(3 * var(--u)) rgba(0, 0, 0, 0.08), 0 calc(10 * var(--u)) calc(24 * var(--u)) rgba(89, 46, 20, 0.16);
  font-family: Inter, -apple-system, system-ui, sans-serif;
  line-height: normal;
  letter-spacing: -0.01em;
  white-space: nowrap;
  color: #1f2328;
}
.scene-ui > * { position: absolute; left: calc(var(--l) * var(--u)); top: calc(var(--t) * var(--u)); }
.scene-ui > img { width: calc(var(--s) * var(--u)); height: calc(var(--s) * var(--u)); max-width: none; }
.scene-ui p { font-size: calc(9.5 * var(--u)); font-weight: 600; }
.scene-ui .scene-ui__sub { font-size: calc(8 * var(--u)); font-weight: 400; color: #6b7280; }
.scene-ui .scene-ui__msg { font-size: calc(9 * var(--u)); font-weight: 500; }
.scene-ui__av { display: grid; place-items: center; width: calc(24 * var(--u)); height: calc(24 * var(--u)); border-radius: 50%; background: #7c5cfc; color: #fff; font-size: calc(8.5 * var(--u)); font-weight: 700; }
.scene-ui__ok { width: calc(20 * var(--u)); height: calc(20 * var(--u)); border-radius: 50%; background: #22a06b; }
.scene-ui__tool { display: grid; place-items: center; width: calc(30 * var(--u)); height: calc(30 * var(--u)); border-radius: 50%; }
.scene-ui__tool.is-active { background: #fff1c2; }
.scene-ui__tool img { width: calc(16 * var(--u)); height: calc(16 * var(--u)); }
.scene-ui__div { width: 1px; height: calc(20 * var(--u)); background: #e5e7eb; }
a.scene-host:hover .scene__stage, a:hover .scene-host .scene__stage { scale: 1.035; }

.p-artcard { display: flex; flex-direction: column; padding: 16px; background: var(--panel); border-radius: var(--r-xl); box-shadow: 0 8px 12px rgba(12, 26, 43, 0.06); }
.p-artcard .scene { flex: 1 1 auto; }

/* ---------- Two up: checklist + art ---------- */
.p-two { display: grid; grid-template-columns: 1fr 1fr; gap: 20px; }
.p-check { display: flex; flex-direction: column; gap: 28px; padding: 32px 32px 40px; background: var(--panel); border-radius: var(--r-xl); box-shadow: 0 8px 12px rgba(12, 26, 43, 0.06); }
.p-check__head { display: flex; flex-direction: column; gap: 16px; }
.p-checklist li { display: flex; align-items: center; gap: 16px; padding: 18px 0; border-bottom: 1px solid var(--line); font-size: 17px; line-height: 1.55; color: var(--ink); }
.p-checklist li img { flex: none; width: 28px; height: 28px; transition: transform .55s var(--spring-bouncy); }
.p-checklist li span { transition: transform .55s var(--spring); }

/* ---------- Spotlight (copy + art card) ---------- */
.p-spot { display: grid; grid-template-columns: minmax(0, 520px) minmax(0, 1fr); gap: 64px; align-items: center; }
.p-spot__copy { display: flex; flex-direction: column; gap: 24px; align-items: flex-start; }
.p-spot .scene { flex: none; aspect-ratio: 536 / 428; }

/* ---------- Story cards ---------- */
.p-story { display: flex; flex-direction: column; gap: 28px; padding: 32px 32px 40px; border-radius: var(--r-xl); overflow: hidden; }
.p-story .scene { aspect-ratio: 502 / 300; }
.p-story__text { display: flex; flex-direction: column; gap: 16px; }

/* ---------- Dark split band (AI) ---------- */
.p-split { position: relative; isolation: isolate; overflow: hidden; border-radius: var(--r-lg); padding: 64px; display: grid; grid-template-columns: 1fr 1fr; gap: 64px; background: var(--navy); }
.p-split__bg { position: absolute; inset: 0; z-index: -2; width: 100%; height: 100%; object-fit: cover; transition: transform 2s var(--ease-out); }

.p-split::before { content: ""; position: absolute; inset: 0; z-index: -1; border-radius: inherit; background: linear-gradient(90deg, rgba(12, 26, 43, 0.35), rgba(12, 26, 43, 0.55) 50%, rgba(12, 26, 43, 0.7)); }
.p-split__col { display: flex; flex-direction: column; gap: 20px; align-items: flex-start; }
.p-split .h4, .p-split .body-lg { color: #fff; }
.p-bullets { display: flex; flex-direction: column; gap: 12px; }
.p-bullets li { display: flex; gap: 12px; font-size: 17px; line-height: 1.55; color: #fff; transition: transform .5s var(--spring-bouncy); }

.p-bullets li img { flex: none; width: 8px; height: 17px; transition: transform .5s var(--spring-bouncy); }

.p-bullets strong { display: block; font-weight: 700; }

/* light link on dark surfaces (Figma: sky, bold, no underline at rest) */
.link--light { color: var(--sky); }
.link--light:hover { color: #fff; }

/* ---------- Security review table ---------- */
.p-review { position: relative; background: var(--navy); border-radius: var(--r-xl); padding: 64px; display: flex; flex-direction: column; gap: 48px; align-items: flex-start; overflow: hidden; }
.p-review .h3 { color: #fff; width: min(760px, 100%); }
.p-table { width: 100%; border-collapse: collapse; table-layout: fixed; }
.p-table col:first-child { width: 31.25%; }
.p-table tr { border-bottom: 1px solid rgba(255, 255, 255, 0.12); transition: background-color .35s var(--ease-out); }
.p-table tbody tr:last-child { border-bottom: 0; }
.p-table th { padding: 16px 24px; text-align: left; font-family: var(--font-mono); font-weight: 500; font-size: 13px; line-height: 1.55; letter-spacing: 0.52px; text-transform: uppercase; color: var(--sky); }
.p-table td, .p-table tbody th { padding: 24px; vertical-align: top; }
.p-table tbody th { font-family: var(--font-display); font-weight: 500; font-size: 17px; line-height: 1.4; letter-spacing: 0; text-transform: none; color: #fff; transition: color .25s; }
.p-table td { font-size: 15px; line-height: 1.55; color: rgba(255, 255, 255, 0.85); }

/* ---------- FAQ ---------- */
.p-faq { width: min(760px, 100%); margin-inline: auto; }

/* ---------- Responsive ---------- */
/* tablet: four-up cards pair up, design min-heights released */
@media (max-width: 1023px) {
  .p-grid--4 { --cols: 2; }
  .p-card { min-height: 0; }
}
@media (max-width: 1180px) {
  .p-split { padding: 48px; gap: 40px; }
  .p-review { padding: 48px; }
  .p-spot { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 48px; }
}
@media (max-width: 1024px) {
  .p-card, .p-imgcard .p-card__text { padding: 24px; }
  .p-check, .p-story { padding: 24px 24px 32px; }
  .p-table td, .p-table tbody th { padding: 20px; }
  .p-table th { padding: 14px 20px; }
}
/* stacked tablet (hero stacking itself comes from the shared .fig-hero rules) */
@media (max-width: 900px) {
  .p-two, .p-spot, .p-split { grid-template-columns: 1fr; }
  /* spotlight art shown whole at its own 3:2, so the floating chips at its edges stay in frame */
  .p-artcard .scene { flex: none; aspect-ratio: 3 / 2; }
  .p-grid { --cols: 2; }
  .p-table col:first-child { width: 34%; }
  /* AI band stacked: the scrim darkens downward, where the bullets now sit over the bright wave */
  .p-split::before { background: linear-gradient(180deg, rgba(12, 26, 43, 0.35), rgba(12, 26, 43, 0.6) 45%, rgba(12, 26, 43, 0.78)); }
}

/* story card hover */
.p-story .title-lg { transition: color .25s; }
.p-story:hover .title-lg { color: var(--accent); }
.p-story:active { transform: translateY(-2px) scale(0.99); transition-duration: .18s; }

/* .scene--fit: when the card is stretched taller than the art (two-up next to a long
   checklist at tablet widths), keep the whole device in view — the stage is contained
   and its edges fade into a backdrop/floor gradient sampled from the art's own top and
   bottom edges (--fill-top / --fill-bot, set inline per scene). */
@media (max-width: 1180px) {
  .scene--fit::before { content: ""; position: absolute; inset: 0; z-index: -1; background: linear-gradient(180deg, var(--fill-top, #efd3c0) 0%, var(--fill-top, #efd3c0) 58%, var(--fill-bot, #e4d1c3) 78%); }
  .scene--fit .scene__stage {
    width: min(100cqw, 100cqh * var(--ar, 1));
    -webkit-mask-image: linear-gradient(180deg, transparent 0, #000 12%, #000 88%, transparent 100%);
    mask-image: linear-gradient(180deg, transparent 0, #000 12%, #000 88%, transparent 100%);
  }
}
@media (max-width: 900px) {
  /* stacked: wider than the art, so contain it and fade left/right instead */
  .p-artcard .scene--fit { aspect-ratio: 4 / 3; }
  .scene--fit .scene__stage {
    -webkit-mask-image: linear-gradient(90deg, transparent 0, #000 14%, #000 86%, transparent 100%);
    mask-image: linear-gradient(90deg, transparent 0, #000 14%, #000 86%, transparent 100%);
  }
}

/* review table: the hovered row lightens */
.p-table tbody tr:hover { background: rgba(255, 255, 255, 0.06); }
.p-table tbody tr:hover th { color: var(--sky); }

/* inline link in the security review table (light text on the dark card) */
.p-table__link { color: var(--sky); text-decoration: underline; text-underline-offset: 3px; text-decoration-thickness: 1px; transition: color .25s, text-underline-offset .4s var(--spring-bouncy); }
.p-table__link:hover { color: #fff; text-underline-offset: 5px; }

/* ---------- Tablet (≤ 1023px): tighter section rhythm ---------- */
@media (max-width: 1023px) {
  .p-sec { padding-block: 80px; }
  .p-sec--flush-bottom { padding-bottom: 0; }
  .p-sec .section-heading + * { margin-top: 48px; }
  .p-more { margin-top: 48px; }
  /* breadcrumb items are tappable (≥ 24px) */
  .crumbs ol { row-gap: 4px; }
  .crumbs a, .crumbs .crumb-menu { display: inline-flex; align-items: center; min-height: 24px; }
  /* touch targets: standalone text links get full height; the inline table link a taller hit box (no layout change) */
  .p-more .link, .p-spot__copy .link, .p-split .link, .p-review > .link { min-height: 44px; }
  .p-table__link { padding-block: 3px; }
}

/* Tablet only (768–1023): hero artwork under the copy, zoomed onto the glass composition (around
   69% / 47.5% of every platform hero image); its top edge eases into the hero colour above it.
   Phones use the shared phone hero (styles.css). */
@media (min-width: 768px) and (max-width: 1023px) {
  .p-hero.fig-hero.fig-hero > .p-hero__bg {
    aspect-ratio: 3 / 2;
    -webkit-mask-image: linear-gradient(180deg, transparent 0, #000 12%);
    mask-image: linear-gradient(180deg, transparent 0, #000 12%);
  }
  .p-hero.fig-hero.fig-hero > .p-hero__bg img {
    position: absolute; left: 50%; top: 50%;
    width: 160%; max-width: none; height: auto;
    translate: -68.5% -47.5%;
  }
}

/* ---------- Phone (≤ 767px) ---------- */
@media (max-width: 767px) {
  .p-sec { padding-block: 64px; }
  .p-sec--flush-bottom { padding-bottom: 0; }
  .p-sec .section-heading + * { margin-top: 32px; }
  .p-more { margin-top: 32px; }

  .crumbs ol, .crumbs li { column-gap: 0.8em; }

  /* single-column cards */
  .p-grid { --cols: 1; gap: 16px; }
  .p-card { padding: 24px 20px 28px; gap: 16px; }
  .p-imgcard .p-card__text { padding: 20px 20px 24px; }
  .sprite { width: 64px; height: 64px; border-radius: var(--r-lg); }

  /* checklist + art */
  .p-two { gap: 16px; }
  .p-check { gap: 20px; padding: 24px 20px 28px; }
  .p-check__head { gap: 12px; }
  .p-checklist li { gap: 14px; padding: 14px 0; font-size: 16px; }
  .p-checklist li img { width: 24px; height: 24px; }
  .p-artcard { padding: 12px; }
  /* square device art (--ar 1) fills a square card: shown whole, no edge fade needed */
  .p-artcard .scene--fit { aspect-ratio: 1; }
  .scene--fit .scene__stage { -webkit-mask-image: none; mask-image: none; }

  /* spotlight + story cards */
  .p-spot { gap: 32px; }
  .p-spot__copy { gap: 20px; }
  .p-story { gap: 20px; padding: 12px 12px 28px; }
  .p-story__text { gap: 12px; padding-inline: 8px; }
  .p-check .title-lg, .p-story .title-lg { font-size: 24px; }
  .p-story .body-lg { font-size: 16px; }

  /* AI band */
  .p-split { padding: 32px 24px; gap: 28px; }
  .p-split__col { gap: 16px; }
  .p-bullets li { font-size: 16px; }

  /* security review: each row becomes a stacked label + answer block */
  .p-review { padding: 32px 24px 36px; gap: 24px; }
  .p-table, .p-table tbody, .p-table tr, .p-table th, .p-table td { display: block; width: auto; }
  .p-table thead { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); }
  .p-table tr { padding: 20px 0; }
  .p-table tbody tr:first-child { border-top: 1px solid rgba(255, 255, 255, 0.12); }
  .p-table tbody th { padding: 0 0 6px; }
  .p-table td { padding: 0; }
}
