/* Shared chrome: fonts, colours, the header bar, the footer and the buttons.
   Loaded on every page of the site. Class names are kept clear of the theme's own (c-, o-, acf-). */

@font-face { font-family: 'Open Sans'; font-weight: 400; font-display: swap; src: url(../../fonts/open-sans/OpenSans-Regular.woff2) format('woff2'); }
@font-face { font-family: 'Open Sans'; font-weight: 600; font-display: swap; src: url(../../fonts/open-sans/OpenSans-SemiBold.woff2) format('woff2'); }
@font-face { font-family: 'Open Sans'; font-weight: 700; font-display: swap; src: url(../../fonts/open-sans/OpenSans-Bold.woff2) format('woff2'); }

:root {
  --ink: #1e134b; --ink-2: #2a1d63; --night: #120c33; --cream: #fdf9f0; --paper: #ffffff;
  --lilac: #b0aece; --lilac-2: #756793; --amber: #ef9e70; --hot: #ec614b; --line: rgba(30, 19, 75, .12);
  --wrap: 1180px; --pad: clamp(20px, 4vw, 56px);
}

.ai-chrome .bar, .ai-chrome .foot { font-family: 'Open Sans', system-ui, sans-serif; -webkit-font-smoothing: antialiased; line-height: 1.6; box-sizing: border-box; }
.ai-chrome .bar *, .ai-chrome .foot * { box-sizing: border-box; }
.ai-chrome .foot p, .ai-chrome .foot h3 { margin: 0; font-family: inherit; }
.ai-chrome :where(.bar, .foot, .ai-ask) .wrap , .ai-first .wrap { max-width: var(--wrap); margin: 0 auto; padding: 0 var(--pad); }
.ai-chrome .foot.dark, .ai-chrome :where(.bar, .foot, .ai-ask) .dark , .ai-first .dark { background: var(--ink); color: var(--cream); }
.ai-chrome :where(.bar, .foot, .ai-ask) .link , .ai-first .link { margin-left: 18px; font-weight: 600; text-underline-offset: 5px; }

.ai-chrome .skip { position: absolute; left: -999px; } .ai-chrome .skip:focus { left: 12px; top: 12px; z-index: 99; background: #fff; color: var(--ink); padding: 8px 12px; }

/* Buttons. These generic names are only styled inside the bar, the footer and the AI block, and on the new templates. */
.ai-chrome :where(.bar, .foot, .ai-ask) .btn , .ai-first .btn { display: inline-flex; align-items: center; gap: 8px; background: var(--amber); color: var(--ink) !important; font: 600 16px/1.2 'Open Sans', system-ui, sans-serif; text-decoration: none; padding: 15px 26px; border-radius: 10px; transition: transform .15s, background .15s; }
.ai-chrome :where(.bar, .foot, .ai-ask) .btn:hover , .ai-first .btn:hover { background: #f6b089; transform: translateY(-1px); }
.ai-chrome :where(.bar, .foot, .ai-ask) .btn--small , .ai-first .btn--small { padding: 11px 18px; font-size: 15px; }
.ai-chrome :where(.bar, .foot, .ai-ask) .btn--violet , .ai-first .btn--violet { background: #3a2a8f; color: var(--cream) !important; box-shadow: inset 0 0 0 1px rgba(255, 255, 255, .14); }
.ai-chrome :where(.bar, .foot, .ai-ask) .btn--violet:hover , .ai-first .btn--violet:hover { background: #4a38ad; }

/* Bar */
.ai-chrome .bar { position: fixed; inset: 0 0 auto 0; z-index: 30; display: flex; align-items: center; justify-content: space-between; padding: 14px var(--pad); color: var(--cream); transition: background .25s, box-shadow .25s; }
/* Solid from the first paint on every page but the front page, which lets the scene show through until the script says otherwise. */
.ai-chrome:not(.ai-first) .bar,
.ai-chrome .bar.is-solid { background: var(--ink); box-shadow: 0 1px 0 rgba(255, 255, 255, .08); }
.ai-chrome .bar__logo { position: relative; display: block; height: 62px; }
.ai-chrome .bar__logo img { display: block; height: 62px; width: auto; }
/* The animated logo sits on top of the still one and takes over once it has loaded. */
.ai-chrome .bar__anim { position: absolute; inset: 0; display: none; }
.ai-chrome .bar__anim svg { display: block; height: 100% !important; width: auto !important; }
.ai-chrome .bar__logo.is-animated img { visibility: hidden; }
.ai-chrome .bar__logo.is-animated .bar__anim { display: block; }
/* The gap closes up on narrower screens: the menu is a third longer in German or Finnish than in English. */
.ai-chrome .bar__nav { display: flex; align-items: center; gap: clamp(9px, calc(4.6vw - 44px), 30px); font-size: 15px; font-weight: 600; white-space: nowrap; }
@media (max-width: 1340px) { .ai-chrome .bar__nav .btn--small { padding: 10px 12px; font-size: 14px; } .ai-chrome .bar__group > a::after { margin-left: 6px; } }
.ai-chrome .bar__nav a { text-decoration: none; } .ai-chrome .bar__nav a:not(.btn):hover { color: var(--amber); }
.ai-chrome .bar__demo { display: none; }
.ai-chrome .bar__toggle { display: none; background: none; border: 1px solid rgba(255, 255, 255, .4); color: inherit; font: inherit; padding: 8px 16px; border-radius: 999px; }


/* Translated pages: German, Finnish and Polish have words longer than a narrow column. They may be hyphenated
   and, failing that, broken, so no word pushes the page wider than the screen. English is left as it was. */
html:not(:lang(en)) .ai-chrome :is(h1, h2, h3, h4, p, li, dt, dd, td, th, a, blockquote, figcaption, label) { overflow-wrap: break-word; hyphens: auto; -webkit-hyphens: auto; }

/* Dropdowns */
.ai-chrome .bar { color: var(--cream); }
.ai-chrome .bar a { color: inherit; }
.ai-chrome .bar__group { position: relative; }
.ai-chrome .bar__group > a::after { content: ''; display: inline-block; width: 6px; height: 6px; margin: 0 0 3px 8px; border-right: 1.5px solid currentColor; border-bottom: 1.5px solid currentColor; transform: rotate(45deg); opacity: .7; }
.ai-chrome .bar__sub { position: absolute; left: -18px; top: 100%; min-width: 240px; padding: 10px; background: #251865; border: 1px solid rgba(255, 255, 255, .12); border-radius: 12px; box-shadow: 0 24px 50px -20px rgba(0, 0, 0, .6); display: grid; opacity: 0; visibility: hidden; transform: translateY(6px); transition: opacity .18s, transform .18s, visibility 0s .18s; }
.ai-chrome .bar__group:hover .bar__sub, .ai-chrome .bar__group:focus-within .bar__sub { opacity: 1; visibility: visible; transform: translateY(0); transition: opacity .18s, transform .18s; }
.ai-chrome .bar__sub a { padding: 9px 12px; border-radius: 8px; white-space: nowrap; } .ai-chrome .bar__sub a:hover { background: rgba(255, 255, 255, .08); }
/* Language selector: a short code that opens the list of languages, on the right-hand edge so the list stays on screen */
.ai-chrome .bar__lang > button { font: inherit; font-weight: 600; letter-spacing: .04em; color: inherit; background: none; border: 0; padding: 0; cursor: pointer; }
.ai-chrome .bar__lang > button::after { content: ''; display: inline-block; width: 6px; height: 6px; margin: 0 0 3px 8px; border-right: 1.5px solid currentColor; border-bottom: 1.5px solid currentColor; transform: rotate(45deg); opacity: .7; }
.ai-chrome .bar__group.is-open .bar__sub { opacity: 1; visibility: visible; transform: translateY(0); transition: opacity .18s, transform .18s; }
.ai-chrome .bar__lang .bar__sub { left: auto; right: -18px; min-width: 170px; }
.ai-chrome .bar__lang .bar__sub a[aria-current] { color: var(--amber); }

/* Footer */
.ai-chrome .foot { padding: 76px 0 34px; font-size: 15px; }
.ai-chrome .foot__grid { display: grid; grid-template-columns: 1.6fr repeat(3, minmax(0, 1fr)); gap: 30px; }
.ai-chrome .foot__logo { display: block; height: 104px; width: auto; margin: -8px 0 22px 0; }
.ai-chrome .foot__brand p { color: var(--lilac); margin-bottom: 8px !important; }
.ai-chrome .foot h3 { font-size: 13px; letter-spacing: .14em; text-transform: uppercase; color: var(--lilac); margin-bottom: 14px; }
.ai-chrome .foot__grid div:not(.foot__brand) a { display: block; text-decoration: none; padding: 5px 0; } .ai-chrome .foot a:hover { color: var(--amber); }
.ai-chrome .foot__legal { display: flex; align-items: center; gap: 18px; flex-wrap: wrap; margin-top: 48px; padding-top: 24px; border-top: 1px solid rgba(255, 255, 255, .12); font-size: 14px; }
.ai-chrome .foot__legal img { width: 60px; height: 60px; border-radius: 50%; }
.ai-chrome .foot__credit { margin-left: auto !important; font-size: 12px; color: var(--lilac); max-width: 60ch; text-align: right; }


.ai-chrome .foot a { color: inherit; }

/* Pages still built from the theme's blocks: the bar is solid and the page starts below it. */
body.ai-chrome:not(.ai-first) #page { padding-top: 86px; }
/* logged in to WordPress: the page is moved down by the admin bar, and the fixed header has to follow */
body.admin-bar.ai-chrome .bar { top: 32px; }
@media screen and (max-width: 782px) { body.admin-bar.ai-chrome .bar { top: 46px; } }
/* the photo at the top of the older pages gets the same purple tint as the photo on the product pages */
.ai-chrome .acf-hero-simple__bg::after { content: ''; position: absolute; inset: 0; background: linear-gradient(90deg, rgba(30, 19, 75, .86) 0%, rgba(30, 19, 75, .6) 50%, rgba(30, 19, 75, .34) 100%); }
body.ai-chrome:not(.ai-first) { font-family: 'Open Sans', system-ui, sans-serif; }
body.ai-chrome:not(.ai-first) h1, body.ai-chrome:not(.ai-first) h2, body.ai-chrome:not(.ai-first) h3, body.ai-chrome:not(.ai-first) h4 { font-family: 'Open Sans', system-ui, sans-serif; font-weight: 700; letter-spacing: -.01em; }
body.ai-chrome:not(.ai-first) .c-button { border-radius: 10px; font-family: 'Open Sans', system-ui, sans-serif; font-weight: 600; }

@media (max-width: 1180px) {
  .ai-chrome .bar__demo { display: inline-flex; margin-left: auto; margin-right: 10px; padding: 8px 14px; font-size: 14px; white-space: nowrap; }
  .ai-chrome .bar__toggle { display: block; }
  /* The open menu starts under the bar and scrolls if it is taller than the screen: centring it cut off both ends. */
  .ai-chrome .bar__nav { position: fixed; inset: 0; height: 100dvh; background: var(--ink); flex-direction: column; justify-content: flex-start; align-items: center; font-size: 19px; gap: 14px; transform: translateY(-100%); visibility: hidden; transition: transform .3s, visibility 0s .3s; z-index: -1; overflow-y: auto; overscroll-behavior: contain; padding: 84px 20px calc(48px + env(safe-area-inset-bottom)); }
  .ai-chrome .bar__nav.is-open { transform: none; visibility: visible; transition: transform .3s; }
  .ai-chrome .bar__group { text-align: center; } .ai-chrome .bar__group > a::after, .ai-chrome .bar__lang > button::after { display: none; } .ai-chrome .bar__lang > button { font-size: 19px; cursor: default; }
  .ai-chrome .bar__sub { position: static; opacity: 1; visibility: inherit; transform: none; background: none; border: 0; box-shadow: none; padding: 4px 0 0; min-width: 0; font-size: 15px; color: var(--lilac); }
  .ai-chrome .bar__sub a { padding: 4px 0; }
  .ai-chrome .foot__grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .ai-chrome .foot__credit { margin-left: 0 !important; text-align: left; }
}
@media (max-width: 600px) {
  .ai-chrome .foot__grid { grid-template-columns: 1fr; }
  .ai-chrome :where(.bar, .foot, .ai-ask) .link, .ai-first .link { display: block; margin: 16px 0 0; }
}

/* A smaller bar on phones */
@media (max-width: 760px) {
  .ai-chrome .bar { padding: 8px var(--pad); }
  .ai-chrome .bar__logo, .ai-chrome .bar__logo img { height: 44px; }
  .ai-chrome .bar__toggle { border-radius: 10px; padding: 7px 14px; font-size: 15px; }
  .ai-chrome .foot { padding: 48px 0 26px; } .ai-chrome .foot__logo { height: 78px; }
  body.ai-chrome:not(.ai-first) #page { padding-top: 60px; }
}

/* The AI block on the older product pages */
.ai-ask { background: var(--cream); color: var(--ink); padding: clamp(48px, 6vw, 84px) 0; font-family: 'Open Sans', system-ui, sans-serif; text-align: center; }
.ai-ask__wrap { max-width: 1040px; margin: 0 auto; padding: 0 var(--pad); }
.ai-ask p, .ai-ask h2 { margin: 0; padding: 0; }
.ai-ask__eyebrow { font-size: 13px; font-weight: 600; letter-spacing: .14em; text-transform: uppercase; color: var(--lilac-2); margin-bottom: 14px !important; }
.ai-ask .ai-ask__title { font-size: clamp(26px, 3vw, 40px); line-height: 1.15; font-weight: 700; color: var(--ink); }
.ai-ask__text { max-width: 62ch; margin: 16px auto 0 !important; font-size: 17px; line-height: 1.6; color: #4a4468; }
.ai-ask .chat { margin: clamp(26px, 3vw, 40px) 0; }

@media (max-width: 359px) { .ai-chrome .bar__demo { display: none; } }
/* the title in the photo at the top of the older pages is the page's H1 now, and keeps the size it had as an H2 */
body.ai-chrome #page h1.acf-hero-simple__title { font-weight: 600; font-size: 30px; line-height: 1.1; }
@media (min-width: 768px) { .ai-chrome h1.acf-hero-simple__title { font-size: 34px; } }
@media (min-width: 1280px) { .ai-chrome h1.acf-hero-simple__title { font-size: 48px; } }
/* the same for the title of a news post, an event or a job, which was an H3 */
body.ai-chrome #page h1.c-title { font-weight: 600; font-size: 24px; line-height: 1.3; }
@media (min-width: 768px) { .ai-chrome h1.c-title { font-size: 32px; line-height: 1.1; } }
