/* Home page animated hero (drawn by js/office.js). This file is linked by index.html, never put in
   through WebDNA, so square brackets are safe here. After changing it, raise the ?v= number on its link.
   Fonts, colours and buttons come from style.css. */

/* the room fills the hero; the text box sits top left */
.office { position: relative; width: 100%; height: min(45.52vw, calc(100vh - var(--hdr))); min-height: 600px; overflow: hidden; background: #eef0f7; }
.office-scene { position: absolute; inset: 0; }
.office-scene svg { display: block; width: 100%; height: 100%; }
.office-scene img { width: 100%; height: 100%; max-width: none; object-fit: cover; object-position: right center; }

.office-panel { position: absolute; top: 24px; left: 24px; width: clamp(20rem, 30vw, 27rem); padding: 20px 24px 22px; border-radius: 12px; background: rgba(255,255,255,0.86); -webkit-backdrop-filter: blur(7px); backdrop-filter: blur(7px); box-shadow: 0 10px 30px rgba(36,36,36,0.10); }
.office-panel p.office-kicker { font-family: var(--head); font-size: 15px; line-height: 1.3; letter-spacing: 1px; text-transform: uppercase; color: var(--gray); margin: 0 0 8px; }
.office-kicker span { padding: 0 4px; color: var(--purple); }
.office-panel h1 { font-size: clamp(2.2rem, 3.2vw, 3rem); line-height: 1.04; margin-bottom: 10px; }
.office-panel h1 em { white-space: nowrap; }
.office-panel p.office-intro { font-size: 1rem; line-height: 1.45; margin-bottom: 16px; }
.office-panel .btns { gap: 10px; }
.office-panel .btn { font-size: 17px; padding: 10px 17px; }

/* the room stays bright in dark mode, so this button keeps its light colours */
.office-play { position: absolute; right: 14px; bottom: 14px; display: inline-flex; align-items: center; gap: 8px; font-family: var(--head); font-size: 16px; letter-spacing: 0.8px; text-transform: uppercase; line-height: 1; padding: 9px 14px; border-radius: 999px; border: 1px solid #CBD5E1; background: rgba(255,255,255,0.92); color: #242424; cursor: pointer; }
.office-play[hidden] { display: none; }
.office-play:hover { border-color: #5E17EB; color: #5E17EB; }
.office-play:focus-visible { outline: 3px solid #5E17EB; outline-offset: 3px; }
.office-play i { display: block; width: 10px; height: 12px; border-left: 3px solid currentColor; border-right: 3px solid currentColor; }
.office-play[data-state="paused"] i { width: 0; height: 0; border-style: solid; border-width: 6px 0 6px 10px; border-color: transparent transparent transparent currentColor; }

.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }

/* dark mode: the same purple text box the site's hero has used */
html.dark .office-panel { background: rgba(94,23,235,0.92); color: var(--white); }
html.dark .office-panel h1 { color: var(--white); }
html.dark .office-panel h1 em { color: #E4DAFF; }
html.dark .office-panel p.office-kicker { color: #E4DAFF; }
html.dark .office-kicker span { color: var(--white); }
html.dark .office-panel .btn.outline { color: var(--white); border-color: var(--white); }
html.dark .office-panel .btn.outline:hover { background: var(--white); border-color: var(--white); color: var(--purple); }
html.dark .office-panel .btn:focus-visible { outline-color: var(--white); }

/* narrow laptops: a tighter box, so no desk hides behind it */
@media (min-width: 1000px) and (max-width: 1279px) {
  .office { min-height: 550px; }
  .office-panel { padding: 16px 20px 18px; }
  .office-panel p.office-intro { font-size: 0.95rem; margin-bottom: 14px; }
  .office-panel .btn { font-size: 16px; padding: 9px 15px; }
}
/* phones and tablets: the room on top, the text underneath, the button on the room's lower corner */
@media (max-width: 999px) {
  .office { display: grid; grid-template-columns: minmax(0, 1fr); height: auto; min-height: 0; background: var(--page); }
  .office-scene { position: relative; inset: auto; grid-area: 1 / 1; width: 100%; aspect-ratio: 16 / 10; background: #eef0f7; }
  .office-play { position: relative; right: auto; bottom: auto; grid-area: 1 / 1; align-self: end; justify-self: end; margin: 0 10px 10px 0; }
  .office-panel { position: static; grid-area: 2 / 1; width: auto; max-width: 40rem; padding: 22px 18px 18px; background: none; box-shadow: none; -webkit-backdrop-filter: none; backdrop-filter: none; }
  html.dark .office-panel { background: var(--purple); margin: 20px 18px; padding: 24px 20px; }
}
@media (max-width: 600px) {
  .office-scene { aspect-ratio: 4 / 3; }
}
