/* CBC App site styles.
   Order: 1 custom properties, 2 fonts, 3 reset and base, 4 layout (header, footer, page templates), 5 components, 6 utilities.
   Mobile first: the base rules are for phones, then min-width 768px (tablet) and 1025px (desktop). */

/* 1. Custom properties ------------------------------------------------------------------------ */
:root {
  /* Palette (from the old theme settings) */
  --purple-deep: #473459;
  --purple: #6f528a;          /* buttons */
  --plum: #7c4e7e;            /* links, category pills */
  --pink: #f27294;            /* active and hover menu links */
  --pink-soft: #ffb1c2;       /* button hover, footer links */
  --wine: #551d2d;            /* button text on hover */
  --ink: #212121;             /* headings */
  --text: #333;               /* body text */
  --slate: #4a5568;           /* meta text, captions */
  --mint: #daf2ef;
  --grey-bg: #f2f2f2;
  --white: #fff;
  --header-bg: #e8e0e8;
  --nav-text: #1f1a1f;
  --lavender: #d9a7d5;         /* link hover */
  --blush: #fff7fa;
  --lilac: #f6ebf2;            /* accordion panels and lilac sections */           /* background of the marketing pages */
  --footer-bg: #191113;
  --footer-top: #261d1f;
  --footer-text: #feedee;
  --hero-overlay: rgb(219 237 242 / 85%);

  /* Fonts */
  --font-body: "Open Sans", sans-serif;
  --font-heading: Bitter, serif;
  --font-menu: Montserrat, sans-serif;

  /* Type scale, phone sizes; the media queries below raise them */
  --fs-body: 1rem;
  --lh-body: 1.6rem;
  --fs-h1: 2.25rem;  --lh-h1: 2.5rem;
  --fs-h2: 1.75rem;  --lh-h2: 2.1rem;
  --fs-h3: 1.5rem;   --lh-h3: 1.95rem;
  --fs-h4: 1.125rem; --lh-h4: 1.688rem;
  --fs-h5: 1.25rem;  --lh-h5: 1.625rem;
  --fs-post-title: 1.75rem; --lh-post-title: 2.1rem;

  /* Spacing and widths */
  --gutter: 0.875rem;         /* side padding of every container */
  --content: 90rem;           /* 1440px */
  --narrow: 55rem;            /* posts: 880px including the gutters */
  --radius: 4px;
}

@media (min-width: 768px) {
  :root {
    --fs-body: 1.063rem; --lh-body: 1.7rem;
    --fs-h1: 3rem;     --lh-h1: 3.3rem;
    --fs-h2: 2.25rem;  --lh-h2: 2.7rem;
    --fs-h3: 1.75rem;  --lh-h3: 2.275rem;
    --fs-h4: 1.25rem;  --lh-h4: 1.875rem;
    --fs-h5: 1.375rem; --lh-h5: 1.788rem;
    --fs-post-title: 2.25rem; --lh-post-title: 2.7rem;
    --gutter: 1rem;
  }
}

@media (min-width: 1025px) {
  :root {
    --fs-body: 1.125rem; --lh-body: 1.8rem;
    --fs-h1: 4rem;     --lh-h1: 4.4rem;
    --fs-h2: 3rem;     --lh-h2: 3.6rem;
    --fs-h3: 2.25rem;  --lh-h3: 2.925rem;
    --fs-h4: 1.375rem; --lh-h4: 2.063rem;
    --fs-h5: 1.75rem;  --lh-h5: 2.275rem;
    --fs-post-title: 3rem; --lh-post-title: 3.6rem;
    --gutter: 1.5rem;
  }
}

/* 2. Fonts (latin subsets of the variable fonts, self-hosted) ---------------------------------- */
@font-face { font-family: "Open Sans"; font-style: normal; font-weight: 300 700; font-display: swap; src: url("../fonts/open-sans-latin.woff2") format("woff2"); }
@font-face { font-family: "Open Sans"; font-style: italic; font-weight: 400 700; font-display: swap; src: url("../fonts/open-sans-italic-latin.woff2") format("woff2"); }
@font-face { font-family: Bitter; font-style: normal; font-weight: 400 700; font-display: swap; src: url("../fonts/bitter-latin.woff2") format("woff2"); }
@font-face { font-family: Bitter; font-style: italic; font-weight: 300; font-display: swap; src: url("../fonts/bitter-italic-latin.woff2") format("woff2"); }
/* Inter is used only by the Senior School visual guide post */
@font-face { font-family: Inter; font-style: normal; font-weight: 400; font-display: swap; src: url("../fonts/inter-latin.woff2") format("woff2"); }
@font-face { font-family: Inter; font-style: normal; font-weight: 500 900; font-display: swap; src: url("../fonts/inter-bold-latin.woff2") format("woff2"); }
@font-face { font-family: Montserrat; font-style: normal; font-weight: 600; font-display: swap; src: url("../fonts/montserrat-latin.woff2") format("woff2"); }

/* 3. Reset and base ---------------------------------------------------------------------------- */
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  display: flex;
  flex-direction: column;
  min-height: 100vh;
  margin: 0;
  background: var(--white);
  color: var(--text);
  font: 400 var(--fs-body) / var(--lh-body) var(--font-body);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}
img, iframe { max-width: 100%; }
img { height: auto; vertical-align: middle; }
a { color: var(--plum); }
a:hover { color: var(--lavender); }
h1, h2, h3, h4, h5, h6 { margin: 0; color: var(--ink); font-family: var(--font-heading); font-weight: 700; }
h1 { font-size: var(--fs-h1); line-height: var(--lh-h1); text-transform: capitalize; }
h2 { font-size: var(--fs-h2); line-height: var(--lh-h2); }
h3 { font-size: var(--fs-h3); line-height: var(--lh-h3); }
h4 { font-size: var(--fs-h4); line-height: var(--lh-h4); font-weight: 600; }
h5 { font-size: var(--fs-h5); line-height: var(--lh-h5); font-style: italic; font-weight: 300; }
p, ul, ol, figure, blockquote { margin: 0; }
button { font: inherit; }
sub, sup { position: relative; font-size: 75%; line-height: 0; vertical-align: baseline; }
sup { top: -0.5em; }
sub { bottom: -0.25em; }

/* 4. Layout ------------------------------------------------------------------------------------ */
body > main { flex: 1 0 auto; }
.container { max-width: var(--content); margin-inline: auto; padding-inline: var(--gutter); }

/* Header: transparent and laid over the page, solid on boxed pages (attachments, 404). */
.site-header {
  position: absolute;
  inset: 0 0 auto;
  z-index: 10;
  display: flex;
  align-items: center;
  min-height: 80px;
  padding-inline: var(--gutter);
}
.boxed .site-header { position: relative; background: var(--header-bg); }
.brand { margin-right: auto; line-height: 0; }
.brand img { width: 5rem; }
.site-nav ul { margin: 0; padding: 0; list-style: none; }
.site-header .header-login { display: none; text-transform: capitalize; }

/* Without JavaScript the menu stays visible under the logo; site.js unhides the toggle and folds the menu away. */
.site-header { flex-wrap: wrap; }
.site-nav { flex-basis: 100%; }
.site-nav ul { display: flex; flex-wrap: wrap; }
.site-nav a { display: block; padding: 0.6em 0.85em; color: var(--nav-text); text-decoration: none; font-size: 1rem; line-height: 1.6rem; }
.site-nav a[aria-current="page"] { color: var(--pink); }

.js-nav .site-header { flex-wrap: nowrap; }
.js-nav .site-nav { display: none; }
.nav-toggle {
  display: flex;
  padding: 0.4em 0.6em;
  font-size: 14px;
  border: 0;
  border-radius: 1rem;
  background: none;
  color: var(--ink);
  cursor: pointer;
}
.nav-toggle[hidden] { display: none; }
.nav-toggle:hover, .nav-toggle:focus-visible { color: var(--plum); }
.nav-toggle .icon-close { display: none; }

/* Open mobile menu: a dark side panel over a dimmed page. */
.nav-open .site-nav {
  display: block;
  position: fixed;
  inset: 0;
  z-index: 20;
  background: rgb(0 0 0 / 50%);
}
.nav-open .site-nav ul {
  display: block;
  margin-left: 10%;
  height: 100%;
  padding: 52.8px 1.5rem 0;  /* room for the close button */
  background: var(--ink);
}
.nav-open .site-nav a {
  padding: 1em 0.5em;
  border-bottom: 1px solid rgb(255 255 255 / 10%);
  color: var(--grey-bg);
  font: 600 18px / 1.2 var(--font-menu);
}
.nav-open .site-nav a[aria-current="page"] { color: var(--plum); }
.nav-open .nav-toggle {
  position: fixed;
  top: 0;
  right: 1.5rem;
  z-index: 30;
  padding: 14.4px 3.6px;
  color: var(--white);
}
.nav-open .nav-toggle .icon-open { display: none; }
.nav-open .nav-toggle .icon-close { display: block; }

@media (min-width: 768px) {
  .brand img { width: 7rem; }
}

@media (min-width: 1025px) {
  .brand img { width: 8rem; }
  .site-header, .js-nav .site-header { flex-wrap: nowrap; }
  .site-nav, .js-nav .site-nav { display: block; flex-basis: auto; }
  .nav-toggle, .nav-toggle:not([hidden]) { display: none; }
  .site-nav a { position: relative; }
  /* underline that grows under the hovered or current item */
  .site-nav a::after {
    content: "";
    position: absolute;
    left: 0.85em;
    right: 0.85em;
    bottom: 0;
    height: 1px;
    background: currentColor;
    transform: scaleX(0);
    transition: transform 0.2s ease;
  }
  .site-nav a:hover { color: var(--pink); }
  .site-nav a:hover::after, .site-nav a[aria-current="page"]::after { transform: scaleX(1); }
  .site-nav { margin-right: 10px; }
  .site-header .header-login { display: inline-block; margin-left: 20px; border-radius: 30px 0 30px 30px; }
}

/* Footer: three columns on desktop (equal), tablet (2fr 1fr 1fr) and one column on phones. */
.site-footer { background: #382e30; color: #efdee0; }
.footer-top {
  display: grid;
  gap: 10px;
  padding: 10px var(--gutter);
  background: var(--footer-top);
  font-size: 10px;
  font-weight: 300;
}
.footer-about > a { display: block; width: fit-content; margin-top: 0.5em; padding-bottom: 9px; line-height: 0; }
.footer-about img { width: 169px; }
.footer-about p {
  margin: 1em 0;
  color: var(--footer-text);
  font-size: clamp(0.8rem, 0.73rem + 0.217vw, 0.9rem);
  line-height: var(--lh-body);
  font-weight: 100;
}
.footer-nav ul { display: flex; flex-wrap: wrap; margin: 0; padding: 0; list-style: none; }
.footer-nav a { display: block; padding: 0.3em 1.1em; font-weight: 400; color: var(--footer-text); text-decoration: none; font-size: 0.813rem; line-height: 1.5; }
.footer-nav a:hover, .footer-nav a[aria-current="page"] { color: var(--pink-soft); }
.social { display: flex; flex-wrap: wrap; justify-content: center; gap: 0.6em; margin: 0; padding: 0; list-style: none; font-size: 18px; }
.social a { display: flex; align-items: center; justify-content: center; width: 2em; height: 2em; border-radius: 3px; color: var(--footer-text); }
.social a:hover { color: var(--lavender); }
.social svg { width: 1em; height: 1em; fill: currentColor; }
.footer-bottom { padding: 20px var(--gutter) 35px; background: var(--footer-top); text-align: center; }
.footer-bottom p { color: var(--footer-text); font-size: 0.813rem; line-height: 1.5rem; }

@media (min-width: 768px) {
  .footer-top { grid-template-columns: 2fr 1fr 1fr; font-size: 12px; }
  .footer-nav, .social { align-self: center; }
  .footer-nav ul { justify-content: center; }
  .footer-nav a { font-size: 0.875rem; line-height: 1.6; }
  .social { font-size: 21.6px; }
  .footer-bottom { padding-block: 40px 42px; background: var(--footer-bg); }
  .footer-bottom p { font-size: 0.875rem; line-height: 1.6rem; }
}

@media (min-width: 1025px) {
  .site-footer { background: var(--footer-bg); }
  .footer-top { grid-template-columns: repeat(3, 1fr); padding-block: 30px; font-size: 14px; }
  .footer-nav a { font-size: 0.938rem; line-height: 1.7; }
  .social { font-size: 25.2px; }
  .footer-bottom { padding-block: 10px 12px; }
  .footer-bottom p { font-size: 0.938rem; line-height: 1.7rem; }
}

/* Page templates */

/* Boxed pages: attachments and 404 */
.boxed { background: var(--grey-bg); }
.boxed main { width: 100%; max-width: var(--content); margin: 0 auto; padding: 2rem var(--gutter); }
.box { margin-inline: -1rem; padding: 1.5rem; background: var(--white); border-radius: var(--radius); box-shadow: 0 15px 15px -10px rgb(0 0 0 / 5%); }
.box h1 { margin-bottom: 32px; }
.box--error h1 { margin-bottom: 0; }
.box--error p { margin: 2.5em 0 1em; }
@media (min-width: 768px) {
  .boxed main { padding-block: 3rem; }
  .box { margin-inline: 0; padding: 2rem; }
}
@media (min-width: 1025px) {
  .boxed main { padding-block: 5rem; }
}

/* Single post */
.post-hero { position: relative; overflow: hidden; background: var(--mint); }
.post-hero__bg { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.post-hero__text {
  position: relative;
  display: flex;
  flex-direction: column;
  justify-content: center;
  min-height: 380px;
  padding: 80px var(--gutter) 0;
  background: var(--hero-overlay);
  text-align: center;
}
.post-hero__text > * { max-width: calc(var(--narrow) - 2 * var(--gutter)); margin-inline: auto; width: 100%; }
.post-hero h1 { font-size: var(--fs-post-title); line-height: var(--lh-post-title); }
.post-hero .pills { margin-bottom: 0.5em; }
.post-date { margin: 1em auto 14px; color: var(--slate); font-size: 16px; }  /* the bottom margin lifts the block as the old theme did */
.post-body, .post-nav, .comments { max-width: var(--narrow); margin-inline: auto; padding-inline: var(--gutter); }
.post-body { display: flow-root; margin-top: 2rem; }  /* keeps the margins of the last paragraphs inside, as the old theme did */
.post-nav { display: grid; grid-template-columns: 1fr 1fr; margin-block: 2.5em; }
.post-nav a { color: var(--text); text-decoration: none; }
.post-nav a:hover { color: var(--plum); }
.post-nav__prev { grid-column: 1; padding-right: 1em; }
.post-nav__next { grid-column: 2; padding-left: 1em; text-align: right; border-left: 1px solid rgb(0 0 0 / 15%); }
.post-nav__label { display: block; margin-bottom: 0.5em; font-size: 0.8em; line-height: 2.15; font-weight: 700; letter-spacing: 0.05em; text-transform: uppercase; }
.post-nav__prev .post-nav__label::before { content: "\2190  "; }
.post-nav__next .post-nav__label::after { content: "  \2192"; }

.related { margin-block: 2.5rem 0; padding: 3.5em 1.5rem calc(3.5em + 30px); background: var(--grey-bg); }
.related > * { max-width: 62rem; margin-inline: auto; }
.related h2 { margin-bottom: 24px; }
.related .card article { box-shadow: 0 15px 15px -10px rgb(140 202 245 / 18%); }
.related .card__image { margin-bottom: 0; }
.related .card__body { padding: 1.5rem; }
.related .card__title { font-size: 20px; }

/* Comments were switched off; this note keeps the space the old comment form took. */
.comments { margin-top: 3.5em; padding-bottom: 2rem; }
.comments h3 { margin-bottom: 1em; }
.comments p { min-height: 320px; }

@media (min-width: 768px) {
  .post-body { margin-top: 3rem; }
  .related { margin-top: 2.5em; }
  .comments { padding-bottom: 3rem; }
}
@media (min-width: 1025px) {
  .post-hero__text { min-height: 440px; }
  .post-body { margin-top: 5rem; }
  .post-nav { margin-block: 2.5em; }
  .related .card__body { padding: 2rem; }
  .comments { padding-bottom: 5rem; }
}

/* The Senior School visual guide post: plain, unboxed infographic text in Inter */
.guide { color: #212529; font-family: Inter, sans-serif; }
.guide .site-nav a, .guide .footer-nav a, .guide .footer-bottom p, .guide .button { font-family: var(--font-body); }
.guide-body { padding-top: 85px; }  /* the old post started with an 85px spacer */
.guide-body h1 { margin-bottom: 0.5em; }
.guide .guide-body h2, .guide .guide-body h3 { margin: 0; }
.guide .guide-body h2 { margin-bottom: 0.5em; }
.guide .guide-body h3 { margin-bottom: 0.5em; }
.guide .guide-body p { margin: 0 0 32px; }
.guide .guide-body p:last-child, .guide .guide-body div:last-child > p:last-child { margin-bottom: 0; }
.chart { display: flex; flex-direction: column; justify-content: center; gap: 8px; max-width: 500px; height: 300px; margin: 0 auto; font-size: 14px; line-height: 1.4; }
.chart--tall { max-width: 600px; height: 400px; }
.chart figcaption { color: var(--slate); }
.chart ul { display: grid; gap: 6px; margin: 0; padding: 0; list-style: none; }
.chart li { display: grid; grid-template-columns: 11em 1fr 3.5em; align-items: center; gap: 8px; }
.chart meter { width: 100%; height: 10px; }
.chart li span:last-child { text-align: right; }
.kpi { padding-left: 5px; background: #caf0f8; }
.kpi__number { color: #0077b6; font-size: 4rem; font-weight: 900; line-height: var(--lh-body); }
.guide-body table { width: 100%; }
.guide-body th, .guide-body td { padding: 1px; }
.guide .guide-body .steps { display: grid; gap: 40px; margin: 0; padding: 0; list-style: none; }
.steps li { position: relative; border: 2px solid #90e0ef; background: var(--white); }
/* downward arrow between steps */
.steps li + li::before { content: "\2193"; position: absolute; top: -42px; left: 0; color: #00b4d8; font-size: 2.5rem; line-height: 1; }
.guide .guide-body footer p { margin: 0; }
@media (min-width: 768px) {
  .chart { height: 350px; }
  .chart--tall { height: 400px; }
}

/* Archives: category pages and blog */
.archive-hero { display: flex; align-items: center; justify-content: center; min-height: 220px; padding-top: 80px; background: var(--hero-overlay); text-align: center; }
.archive-list { max-width: var(--content); margin: 2rem auto; padding-inline: var(--gutter); }
.pagination { display: flex; gap: 9px; margin-block: 2.5rem; }
.pagination a, .pagination span { display: inline-flex; align-items: center; justify-content: center; width: 45px; height: 45px; border: 2px solid transparent; border-radius: var(--radius); color: var(--text); text-decoration: none; }
.pagination [aria-current] { background: var(--purple); border-color: var(--purple); color: var(--white); }
@media (min-width: 768px) {
  .archive-list { margin-block: 3rem; }
}
@media (min-width: 1025px) {
  .archive-hero { min-height: 280px; }
  .archive-list { margin-block: 5rem; }
}

/* Marketing pages (home, about, for teachers, for school leaders, pricing, blog) */
.tinted { background: var(--blush); }
.page-intro { width: 95%; margin: 0 auto; padding: 136px 0 72px; text-align: center; }  /* 80px header + section spacing */
.page-intro h1 { margin-bottom: 0.5em; }
.page-intro h5 { max-width: 820px; margin-inline: auto; }

.blog-list { width: 75%; margin: 96px auto 0; padding-block: 24px; }
.card-grid--boxed .card article { box-shadow: 0 15px 15px -10px rgb(140 202 245 / 18%); }
.card-grid--boxed .card__image { margin-bottom: 0; }
.card-grid--boxed .card__body { padding: 1.5rem; }
.card-grid--boxed .card__title { font-size: var(--fs-h4); line-height: 1.5; font-weight: 600; }
.card-grid--boxed .card__excerpt { margin-block: 1em; }
.card-grid--boxed .card__more { margin-top: 0; }

.divider { width: 50%; margin: 29px auto 30px; border: 0; border-top: 1px solid #eee; }

/* Home and feature pages: full-width tinted sections with a centred column */
.hero { width: 95%; margin: 0 auto; padding: 136px 0 24px; text-align: center; }
.hero h1 { margin-bottom: 0.5em; }
.hero h5 { max-width: 820px; margin-inline: auto; }
.hero__actions { display: flex; flex-direction: column; align-items: center; gap: 16px; margin-top: 24px; padding-block: 24px; }
.hero__image { display: block; width: 100%; margin-top: 24px; }

.section { padding: 32px 5% 16px; }
.section--lilac { background: var(--lilac); }
.section > * { max-width: 1080px; margin-inline: auto; }
.section-head { padding-block: 24px; text-align: center; }
.section-head h2 { margin-bottom: 0.5em; }
.section-head--spaced { padding-bottom: 48px; }
.section-head--start { text-align: left; }
.section-head h5 { margin-top: -15px; }

.feature { display: grid; gap: 32px; padding: 24px 0 16px; }
.feature--tight { padding-top: 16px; }
.feature__action { margin-top: 32px; text-align: center; }
.feature__image { display: block; width: 100%; max-width: 100%; }

.pull { margin: 0 auto; padding-block: 24px; text-align: center; }
.pull h5 { margin-bottom: 0.5em; }

@media (min-width: 768px) {
  .hero { width: 90%; padding-top: 168px; }
  .hero__actions { display: grid; grid-template-columns: 1fr 1fr; gap: 32px; }
  .hero__actions .button:first-child { justify-self: end; }
  .hero__actions .button:last-child { justify-self: start; }
  .section { padding: 64px 5% 32px; }
  .section-head { text-align: left; }
  .feature { grid-template-columns: 1fr 1fr; padding-block: 32px; }
  .feature__action { margin-top: 40px; text-align: left; }
}
@media (min-width: 1025px) {
  .hero { width: 75%; padding-top: 216px; }
  .hero__image { margin-top: 25px; }
  .section { padding: 96px 12.5% 48px; }
  .feature { padding-block: 48px; }
  .feature__image { margin-top: -96px; }  /* the photo rises next to the heading, as before */
  .section > .pull { max-width: 720px; }
  .feature__action { margin-top: 48px; }
}

/* For Teachers and For School Leaders: intro with one button, then screenshot and text pairs */
.page-intro--action { padding-bottom: 10px; }
.page-intro--pricing { padding-bottom: 10px; }
.intro-action { margin-top: 48px; }
.intro-note { margin-top: 2px; font-size: clamp(0.8rem, 0.73rem + 0.217vw, 0.9rem); }
.showcase { display: grid; gap: 32px; width: 80%; margin: 96px auto 0; padding-block: 24px; }
.showcase img { justify-self: center; }
/* keeps the frame the old page gave this screenshot (it is narrower than its neighbours) */
.showcase .letterbox { width: 100%; aspect-ratio: 1024 / 520; object-fit: contain; }
.showcase h3 { margin-bottom: 0.5em; }
.showcase ul { margin-bottom: 32px; padding-left: 2em; }
.showcase li { padding-block: 0.44rem; }
.showcase li.tight { padding-block: 0; }  /* a few items had no extra spacing in the old pages */
@media (min-width: 768px) {
  .page-intro--action { padding-bottom: 26px; }
  .showcase { grid-template-columns: 1fr 1fr; align-items: center; column-gap: 64px; }
  .showcase--wide { grid-template-columns: 337fr 214fr; align-items: start; column-gap: 63px; }
}
@media (min-width: 1025px) {
  .page-intro--action { padding-bottom: 9px; }
  .showcase { width: 75%; column-gap: 32px; }
  .showcase--wide { grid-template-columns: 632fr 416fr; }
}

/* Pricing */
.pricing { padding: 96px 0 0; }
.pricing__intro, .pricing__faq { display: grid; gap: 32px; width: 75%; margin-inline: auto; }
.pricing__text h3 { width: fit-content; margin-bottom: 0.5em; text-align: center; }
.pricing__text p, .pricing__text ul { margin-bottom: 32px; }
.pricing__text ul { padding-left: 2em; }
.pricing__text .small { margin-bottom: 0; font-size: clamp(0.8rem, 0.73rem + 0.217vw, 0.9rem); }
.pricing__intro { gap: 0; }
.pricing__intro img { justify-self: center; }
.pricing__faq { margin-top: 32px; padding-bottom: 24px; }
/* the old page fixed this image to 360px high, whatever the column width (it stretches on phones, as before) */
.pricing__example { justify-self: center; width: auto; height: 360px; }
@media (min-width: 768px) {
  .pricing__intro { grid-template-columns: 2fr 3fr; align-items: center; gap: 0; }
  .pricing__faq { grid-template-columns: 416fr 632fr; align-items: center; }
}

/* About us */
.page-intro--plain { padding-bottom: 24px; }
.about-why, .about-who { width: 85%; margin: 96px auto 48px; padding-block: 24px; }
.about-why { display: grid; gap: 64px; }
.about-why h3, .about-who h3 { margin-bottom: 0.5em; }
.about-why p + p, .about-who p + p { margin-top: 32px; }
.video iframe { display: block; width: 100%; height: auto; aspect-ratio: 16 / 9; border: 0; }
.about-who { width: 80%; margin-top: 144px; margin-bottom: 0; padding-bottom: 0; }
.about-who__intro { display: grid; gap: 32px; padding-bottom: 24px; }
.about-who__logo { justify-self: center; align-self: center; line-height: 0; padding-bottom: 8px; }
.about-who__quote { display: block; margin: 24px auto; }

@media (min-width: 768px) {
  .about-why { width: 80%; grid-template-columns: 1fr 1fr; }
  .about-who__intro { grid-template-columns: 1fr 2fr; gap: 64px; }
  .about-who__logo img { width: 100%; }
  .about-who__quote { margin-bottom: 72px; }
}
@media (min-width: 1025px) {
  .about-why, .about-who { width: 75%; }
  .about-who__intro { grid-template-columns: 349fr 699fr; gap: 32px; }
  .about-who__logo img { width: 300px; }
}

/* 5. Components -------------------------------------------------------------------------------- */
.button {
  display: inline-block;
  border: 0;
  padding: 0.8rem 1.5rem;
  border-radius: 1rem;
  background: var(--purple);
  color: var(--white);
  font: 600 1rem / 1.6 var(--font-body);
  text-decoration: none;
}
.button:hover, .button:focus-visible { background: var(--pink-soft); color: var(--wine); }
@media (min-width: 768px) {
  .button { padding: 14.4px 32px; border-radius: 1.0625rem; font-size: 1.063rem; line-height: 1.7; }
}
@media (min-width: 1025px) {
  .button { padding: 1rem 2.5rem; border-radius: 1.125rem; font-size: 1.125rem; line-height: 1.8; }
}

/* Category pills */
.pills { font-size: 0.7em; line-height: 1; letter-spacing: 0.05em; text-transform: uppercase; }
.pills a {
  display: inline-block;
  margin: 0 0.25em 4px 0;
  padding: 4px;
  border-radius: var(--radius);
  background: var(--plum);
  color: var(--white);
  font-weight: 700;
  line-height: 1.2;
  text-decoration: none;
}
.pills a:last-child { margin-right: 0; }
.pills a:hover { color: var(--white); }

/* Post cards (archives, related posts, blog page) */
.card-grid { display: grid; gap: 2.5rem; margin: 0; padding: 0; list-style: none; }
.card article { position: relative; height: 100%; background: var(--white); border-radius: var(--radius); }
.card__image { display: block; margin-bottom: 1em; overflow: hidden; }
.card__image img { display: block; width: 100%; aspect-ratio: 3 / 2; object-fit: cover; }
.card__title { font-size: 24px; line-height: 1.3; }
.card__title a { color: inherit; text-decoration: none; }
.card__title a:hover { color: var(--lavender); }
.card .pills { margin-bottom: 1em; line-height: var(--lh-body); }
.card__date { margin-top: 1em; font-size: 0.8em; line-height: var(--lh-body); }
.card__excerpt { margin-top: 1em; }
.card__excerpt p + p { margin-top: 1em; }
.card__more { margin-top: 1em; }
.card__more a { color: var(--text); font-size: 0.8em; font-weight: 700; letter-spacing: 0.05em; text-decoration: none; text-transform: uppercase; }
.card__more a::after { content: " \2192"; }
.card__more a:hover { color: var(--plum); }
@media (min-width: 768px) {
  .card-grid { grid-template-columns: repeat(2, 1fr); }
  .card .pills { margin-bottom: 0.5em; }
}
@media (min-width: 1025px) { .card-grid { grid-template-columns: repeat(3, 1fr); } }

/* Text written in the editor (posts) */
.prose > * + * { margin-top: 0; }
.prose > * { margin-bottom: 32px; }
.prose > :last-child { margin-bottom: 0; }
.prose > :first-child { margin-top: 0; }
.prose { overflow-wrap: break-word; }
.prose .external-image { display: block; }  /* link to an image hosted elsewhere, in the box the image had */
.h-640 { height: 640px; }
.h-560 { height: 560px; }
.prose h2, .prose h3, .prose h4 { margin-top: 1.5em; margin-bottom: 0.5em; }
.prose :is(h2, h3, h4) + :is(h2, h3, h4) { margin-top: 0; }
.prose .subheading { margin: 0; }  /* small headings set straight on the next paragraph */
.prose ul, .prose ol { padding-left: 2em; }
.prose figure img { display: inline-block; }
.prose figcaption { margin: 0.5em 0 1em; color: var(--slate); font-size: 80%; text-align: center; }
.prose .video iframe { display: block; width: 100%; height: auto; aspect-ratio: 16 / 9; border: 0; }
.prose blockquote, .prose .quote-card { padding-left: 1em; border-left: 4px solid currentColor; }
.prose .quote-card blockquote { padding: 0; border: 0; }
.prose blockquote > p:not(:last-child) { margin-bottom: 24px; }
.prose cite { display: block; margin-top: 13px; color: var(--slate); font-size: 13px; font-style: normal; text-align: left; }
.prose .quote-card figcaption { text-align: left; }
/* Pull quote: large centred text with a big pale quotation mark behind it */
.prose .share { display: inline-flex; align-items: center; line-height: 24px; }
.prose .share svg { width: 20px; height: 20px; fill: var(--ink); }
.prose .pullquote { padding: 4em 0; font-size: 1.5em; line-height: 1.6; text-align: center; }
.prose .pullquote blockquote { position: relative; padding: 2em; border: 0; }
.prose .pullquote blockquote::before {
  content: "\201C";
  position: absolute;
  top: 80px;
  left: 35px;
  color: var(--mint);
  font: 200px / 40px sans-serif;
}
.prose .pullquote p { position: relative; font-size: 1.15em; }
@media (min-width: 768px) { .prose .pullquote p { font-size: 1.3em; } }
/* Centred images shrink to the image width so the caption wraps under it */
.prose .align-center { display: table; margin-inline: auto; }
.prose .align-center figcaption { display: table-caption; caption-side: bottom; }
.prose figure img { vertical-align: bottom; }
.align-left { float: left; margin-right: 1em; }
.align-right { float: right; margin-left: 1em; }

/* Buttons inside the page content use the plum of the old theme */
main .button { background: var(--plum); }
main .button:hover { background: #ffd6fc; color: #623765; }

/* Accordion built on <details>; the first item starts open */
.accordion { display: grid; gap: 24px; }
.accordion summary {
  position: relative;
  display: flex;
  align-items: flex-start;
  padding: 14px 50px 14px 16px;
  border-radius: 8px 8px 0 0;
  background: #ebdfe6;
  color: var(--nav-text);
  font-weight: 600;
  font-size: 18px;
  line-height: 24px;
  list-style: none;
  cursor: pointer;
}
.accordion summary::-webkit-details-marker { display: none; }
/* chevron: two short bars, pointing down when closed and up when open */
.accordion summary::before, .accordion summary::after {
  content: "";
  position: absolute;
  top: 50%;
  right: 26px;
  width: 12px;
  height: 2px;
  margin-top: -1px;
  background: #4d444c;
  transform: rotate(45deg);
}
.accordion summary::after { right: 18px; transform: rotate(-45deg); }
.accordion summary:hover { background: #6c586a; color: var(--white); }
.accordion details[open] summary { background: #8c5c8d; color: var(--white); }
.accordion details[open] summary::before { background: var(--white); transform: rotate(-45deg); }
.accordion details[open] summary::after { background: var(--white); transform: rotate(45deg); }
.accordion .icon { flex: none; width: 18px; height: 18px; margin: 3px 4.5px 0 0; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.accordion details > p { padding: 20px; border-radius: 0 0 8px 8px; background: var(--lilac); color: #4d444c; }
.accordion--plus summary { padding-right: 50px; }
.accordion--plus details[open] summary { border: 1px solid #444; }
.accordion--plus summary::before, .accordion--plus summary::after { right: 18px; width: 20px; height: 4px; margin-top: -2px; background: var(--nav-text); transform: none; }
.accordion--plus summary::before { transform: rotate(90deg); }
.accordion--plus details[open] summary::before { transform: none; }
.accordion--plus details[open] summary::after { transform: none; }

/* Call to action block (partials/cta.html) and its spacing on each page */
.cta-wrap { padding: 144px 0; }
.cta { width: 90%; max-width: 1080px; margin-inline: auto; padding-block: 24px; }
.cta__card {
  position: relative;
  display: grid;
  gap: 64px;
  align-items: center;
  padding: 24px;
  border: 1px solid var(--grey-bg);
  border-radius: 16px;
  box-shadow: 20px 20px 30px rgb(0 0 0 / 20%);
  isolation: isolate;
}
.cta__card::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: -1;
  border-radius: inherit;
  background: url("../uploads/2025/10/3d-wave2.jpg") 100% 100% / cover no-repeat;
  opacity: 0.58;
}
.cta__text { text-align: center; }
.cta h3 { margin-bottom: 0.5em; text-transform: uppercase; }
.cta h5 { margin-bottom: 0.5em; font-size: clamp(1.1rem, 0.995rem + 0.326vw, 1.25rem); }
.cta__contacts { display: flex; flex-wrap: wrap; justify-content: center; gap: 8px; margin: calc(48px + 0.5 * clamp(1.1rem, 0.995rem + 0.326vw, 1.25rem)) 0 0; padding: 0; list-style: none; }
.cta__contacts li { min-width: 0; max-width: 100%; }
.chip {
  display: inline-flex;
  max-width: 100%;
  overflow-wrap: anywhere;
  align-items: center;
  gap: 9px;
  padding: 5.2px 16px;
  border: 1px solid #ccc4ce;
  border-radius: 8px;
  background: #f5dbf1;
  color: #534152;
  font-weight: 600;
  font-size: 18px;
  line-height: 1.6;
  text-decoration: none;
}
.chip:hover { border-color: #847375; background: #ffd9dc; color: #653a40; }
.chip svg { width: 18px; height: 18px; fill: currentColor; }
.chip svg.stroke { fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }

/* The home page CTA sits in a lilac band and is wider */
.cta-wrap--home { padding: 32px 0 16px; background: var(--lilac); }
.cta-wrap--home .cta { width: 80%; max-width: none; }

/* Video thumbnail that links to YouTube */
.video-link { position: relative; display: block; overflow: hidden; border-radius: 10px; }
.video-link img { display: block; width: 100%; aspect-ratio: 16 / 9; object-fit: cover; }
.video-link::after { content: ""; position: absolute; inset: 0; background: rgb(0 0 0 / 30%); }
.video-link .play { position: absolute; z-index: 1; top: 50%; left: 50%; width: 29px; height: 16px; translate: -50% -50%; fill: var(--white); }

@media (min-width: 768px) {
  .cta-wrap--home { padding-block: 64px 32px; }
  .page-intro { width: 90%; padding-top: 168px; }
  .card-grid--boxed .card__body { padding: 2rem; }
  .cta__card { grid-template-columns: minmax(0, 0.607fr) minmax(0, 0.393fr); padding: 32px; border-radius: 32px; }
  .chip { line-height: 1.7; }
  .video-link .play { width: 22px; height: 12px; }
}
@media (min-width: 1025px) {
  .page-intro { width: 75%; padding-top: 184px; }
  .cta-wrap { padding-bottom: 192px; }
  .cta__contacts { justify-content: flex-start; }
  .cta-wrap--home { padding-block: 96px; }
  .cta__card { padding: 48px; border-radius: 64px; }
  .chip { line-height: 1.8; }
  .video-link .play { width: 36px; height: 20px; }
}
/* Spacing around the call to action on each page */
.cta-wrap--after-showcase { padding: 240px 0 96px; }
.cta-wrap--pricing { padding: 144px 0; }
.cta-wrap--pricing .cta { width: 75%; }
.cta-wrap--about { padding: 144px 0 96px; }
@media (min-width: 1025px) {
  .cta-wrap--after-showcase { padding: 145px 0 144px; }
  .cta-wrap--pricing { padding-bottom: 192px; }
  .cta-wrap--about { padding-bottom: 144px; }
}
/* on tablets the pricing CTA was 30px narrower than its column */
@media (min-width: 768px) and (max-width: 1024px) {
  .cta-wrap--pricing .cta { padding-inline: 15px; }
}

/* Stories, testimonials and ratings (home page) */
.story { position: relative; display: grid; align-items: start; gap: 32px; padding: 24px; border-radius: 16px; background: url("../uploads/2025/10/bg_img.png") center / cover; isolation: isolate; }
/* white rounded card under the patterned background */
.story::before { content: ""; position: absolute; inset: 0; z-index: -1; border-radius: 24px; background: var(--white); box-shadow: 0 0 14px rgb(0 0 0 / 20%); }
.story__text { text-align: center; }
.story h3 { margin-bottom: 0.5em; }
.story p { margin-bottom: 32px; }
.story p:last-child { margin-bottom: 0; }

.testimonials { display: grid; gap: 32px; margin-block: 24px 0; padding: 24px; list-style: none; text-align: center; }
.testimonials blockquote { margin: 0; }
.testimonials cite { font-style: normal; }
/* On phones the story card and the testimonials are a little wider than the section column */
@media (max-width: 767px) {
  .section > .story, .section > .testimonials { margin-inline: -2.5vw; }
}

.ratings { display: grid; gap: 32px; padding: 0; list-style: none; text-align: center; }
.ratings strong { display: block; margin-bottom: 32px; }
.stars { letter-spacing: 0; }

.button.button--soft { border-radius: 12px; background: #ebdfe6; color: var(--nav-text); font-size: 18px; }
.button.button--soft:hover { background: var(--lilac); color: var(--nav-text); }
.button.button--small { padding: 4.76px 13.4px; border: 1px solid var(--purple); border-radius: 8px; background: #f1e5ec; color: #3c343b; font-size: 14.4px; line-height: 1.6; }
.button.button--small:hover { border-color: #ccc4ce; background: #dacfd5; color: #3c343b; }
@media (min-width: 768px) {
  .story { grid-template-columns: minmax(0, 0.605fr) minmax(0, 0.395fr); padding: 32px; }
  .story__text { text-align: left; }
  .testimonials { grid-template-columns: repeat(3, 1fr); }
  .ratings { grid-template-columns: repeat(4, 1fr); }
  .button.button--small { line-height: 1.7; }
}
@media (min-width: 1025px) {
  .story { padding: 48px; }
  .section > .ratings { width: 70vw; max-width: none; }
  .button.button--small { line-height: 1.8; }
}

/* Photo strip */
.gallery { position: relative; margin-top: 144px; padding-bottom: 30px; margin-bottom: 48px; }  /* the 48px gap above the strip collapses into this margin */
.gallery__track { display: flex; gap: 10px; margin: 0; padding: 0; list-style: none; overflow-x: auto; scroll-snap-type: x mandatory; scrollbar-width: none; }
.gallery__track::-webkit-scrollbar { display: none; }
.gallery__track li { flex: none; scroll-snap-align: center; }
.gallery__track img { display: block; width: 300px; height: 300px; object-fit: cover; }
.gallery__arrow { position: absolute; top: 126px; display: flex; align-items: center; justify-content: center; width: 32px; height: 48px; padding: 0; border: 0; border-radius: 3px; background: rgb(0 0 0 / 80%); opacity: 0.75; cursor: pointer; }
.gallery__arrow[hidden] { display: none; }
.gallery__arrow svg { width: 24px; height: 24px; fill: var(--white); }
.gallery__arrow--prev { left: 0; }
.gallery__arrow--next { right: 0; }
.gallery__dots { position: absolute; bottom: 4px; left: 0; right: 0; display: flex; justify-content: center; }
.gallery__dots[hidden] { display: none; }
.gallery__dots button { width: 10px; height: 10px; margin: 3px; padding: 0; border: 0; border-radius: 50%; background: #000; opacity: 0.5; cursor: pointer; }
.gallery__dots button[aria-current="true"] { opacity: 0.75; }
@media (min-width: 768px) {
  .gallery__track img { width: auto; }
}

/* 6. Utilities --------------------------------------------------------------------------------- */
.visually-hidden, .skip-link:not(:focus) {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip-path: inset(50%);
  white-space: nowrap;
}
.skip-link:focus { position: absolute; z-index: 100; top: 0.5rem; left: 0.5rem; padding: 0.5rem 1rem; background: var(--white); }
.text-center { text-align: center; }
.text-right { text-align: right; }
.text-left { text-align: left; }

/* ---------------------------------------------------------------------------
   Videos. A .video-play link shows the video's thumbnail and a play button.
   site.js opens the video in a .video-modal dialog on this page; without
   JavaScript the link opens YouTube in a new tab.
   --------------------------------------------------------------------------- */
.video-play { position: relative; display: block; aspect-ratio: 16 / 9; overflow: hidden; background: #000; }
.video-play img { width: 100%; height: 100%; object-fit: cover; }
/* YouTube-style play button: a dark pill that turns red on hover, with a white triangle. */
.video-play::before { content: ""; position: absolute; top: 50%; left: 50%; width: 68px; height: 48px; margin: -24px 0 0 -34px; border-radius: 12px; background: rgb(33 33 33 / 80%); transition: background-color 0.2s; }
.video-play::after { content: ""; position: absolute; top: 50%; left: 50%; margin: -9px 0 0 -6px; border-style: solid; border-width: 9px 0 9px 16px; border-color: transparent transparent transparent #fff; }
.video-play:hover::before, .video-play:focus-visible::before { background: #f00; }
.video-play__label { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }

.video-modal { width: min(960px, calc(100vw - 32px)); max-width: none; padding: 0; border: 0; overflow: visible; background: transparent; }
.video-modal::backdrop { background: rgb(0 0 0 / 85%); }
.video-modal__frame { aspect-ratio: 16 / 9; background: #000; }
.video-modal__frame iframe { display: block; width: 100%; height: 100%; max-width: none; border: 0; }
.video-modal__close { position: absolute; top: -48px; right: 0; width: 40px; height: 40px; padding: 0; border: 0; border-radius: 50%; background: #fff; color: #111; font: 400 28px/40px sans-serif; text-align: center; cursor: pointer; }
.video-modal__close:hover, .video-modal__close:focus-visible { background: #e6e6e6; }
html:has(.video-modal[open]) { overflow: hidden; }
/* Shown in the video dialog instead of the player when a page is opened from disk (see site.js). */
.video-modal__note { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 20px; height: 100%; padding: 24px; color: #fff; font-size: 16px; text-align: center; }
.video-modal__note[hidden] { display: none; }
.video-modal__note p { margin: 0; max-width: 32em; }
.video-modal__youtube { padding: 12px 24px; border-radius: 6px; background: #f00; color: #fff; font-weight: 600; text-decoration: none; }
.video-modal__youtube:hover, .video-modal__youtube:focus-visible { background: #c00; color: #fff; }
.video-modal__frame iframe[hidden] { display: none; }
