/*
 * Encore: the Theme Kit in Encore's own look. Linked after themes/_shared/assets/css/kit.css, so the variables set here
 * replace its defaults for every block and module section.
 *
 * Elegant and dramatic, like a printed theatre programme: square corners and no soft shadows; cards, fields and
 * questions drawn with thin hairlines (a card without a picture gets a second hairline inside its edge); small labels in
 * spaced capitals after a short rule; large headings in the display face set tight (--encore-heading-weight, the
 * lightest weight of the font palette) and small titles in its heaviest (--encore-title-weight); cards and features in
 * a row numbered like acts (01, 02); colour bands framed by a hairline set in from their edges; thin square buttons
 * that fill on hover with a sweep from the left. This file may load nothing, so every shape here is drawn with CSS.
 */

.kit-root {
  /* The text and page colour where the component sits: the page, or a colour band (below). */
  --encore-ink: var(--text-primary, #f4eadf);
  --encore-ground: var(--background, #140b12);
  /* The main button and the colour that sweeps across it on hover. */
  --encore-button: var(--accent, #d4af6b);
  --encore-on-button: var(--on-accent, #170c12);
  --encore-sweep: var(--text-primary, #f4eadf);
  --encore-on-sweep: var(--background, #140b12);
  --kit-radius: 0;
  --kit-radius-sm: 0;
  --kit-media-radius: 0;
  --kit-button-radius: 0;
  --kit-input-radius: 0;
  --kit-chip-radius: 0;
  --kit-shadow: none;
  --kit-shadow-hover: none;
  --kit-heading-weight: var(--encore-heading-weight, 500);
  --kit-heading-tracking: var(--encore-heading-tracking, -0.025em);
  --kit-button-weight: var(--encore-body-strong, 600);
  --kit-button-tracking: 0.2em;
  --kit-button-transform: uppercase;
  --kit-eyebrow-tracking: 0.26em;
  --kit-star: var(--accent-ink, #ddbb7c);
  --kit-card-pad: clamp(1.5rem, 2.4vw, 2.25rem);
  --kit-gap-medium: 1.5rem;
  --kit-gap-large: clamp(2rem, 4vw, 3.25rem);
  --kit-gutter: var(--encore-gutter, clamp(1.25rem, 4vw, 3rem));
  --kit-width-normal: 74rem;
  --kit-width-narrow: 44rem;
  --kit-width-wide: 90rem;
  --kit-pad-normal: clamp(4rem, 8vw, 7rem);
  --kit-pad-compact: clamp(2.5rem, 5vw, 3.75rem);
  --kit-pad-spacious: clamp(5rem, 11vw, 9rem);
  --kit-speed: 260ms;
  --kit-ease: cubic-bezier(0.22, 1, 0.36, 1);
  /* A step's number, set large. */
  --encore-step-size: calc(var(--encore-heading-scale, 1) * clamp(2.75rem, 2rem + 2.2vw, 3.75rem));
}

/* On a colour band everything follows the band: the main button is the band's text colour, and on hover the band's
   own colour sweeps in so it opens up. */
.kit-section--inverse,
.kit-section--accent,
.kit-section--image,
.kit-slide {
  --encore-ink: var(--kit-section-fg);
  --encore-ground: var(--kit-section-bg);
  --encore-button: var(--kit-section-fg);
  --encore-on-button: var(--kit-section-bg);
  --encore-sweep: var(--kit-section-bg);
  --encore-on-sweep: var(--kit-section-fg);
  --kit-star: var(--kit-section-fg);
}

/* Over a photograph the main button keeps the accent, as in the split hero; the light sweeps in on hover. */
.kit-section--image,
.kit-slide {
  --encore-button: var(--accent, #d4af6b);
  --encore-on-button: var(--on-accent, #170c12);
  --encore-sweep: var(--kit-section-fg);
  --encore-on-sweep: var(--kit-section-bg);
}

/* Colour bands are framed like a programme page: a hairline set in from their edges. */
.kit-section--inverse::after,
.kit-section--accent::after,
.kit-section--image::after {
  content: "";
  position: absolute;
  inset: clamp(0.5rem, 1.2vw, 0.9rem);
  border: 1px solid color-mix(in srgb, var(--kit-section-fg) 28%, transparent);
  pointer-events: none;
}

/* Plain and muted sections meet on a hairline. */
.kit-section--muted {
  border-block: 1px solid var(--kit-line);
}

/* Poster headings: large, set tight in the display face. */
.kit-heading {
  line-height: 1.04;
  text-wrap: balance;
}

.kit-heading--1 {
  font-size: calc(var(--encore-heading-scale, 1) * clamp(2.75rem, 1.3rem + 5.2vw, 6.25rem));
  line-height: 0.98;
}

.kit-heading--2 {
  font-size: calc(var(--encore-heading-scale, 1) * clamp(2.3rem, 1.4rem + 3vw, 4.25rem));
  line-height: 1;
}

/* Beside a picture or in a column a section heading is set a size down, so it never crowds its half. */
:is(.kit-split, .kit-grid) .kit-heading--2 {
  font-size: calc(var(--encore-heading-scale, 1) * clamp(2rem, 1.4rem + 1.9vw, 3.1rem));
}

.kit-heading--3 {
  font-size: calc(var(--encore-heading-scale, 1) * clamp(1.4rem, 1.2rem + 0.8vw, 1.85rem));
  font-weight: var(--encore-title-weight, 600);
  line-height: 1.15;
}

.kit-heading--4 {
  font-weight: var(--encore-title-weight, 600);
}

.kit-text--lead {
  line-height: 1.65;
}

/* Small labels: spaced capitals after a short rule (between two when centred). */
.kit-eyebrow {
  display: flex;
  align-items: center;
  gap: 0.9rem;
  width: fit-content;
  max-width: 100%;
  margin: 0 0 1.15rem;
  font-size: 0.72rem;
  font-weight: var(--encore-body-strong, 600);
}

.kit-eyebrow::before,
.kit-text--center > .kit-eyebrow::after {
  content: "";
  flex: none;
  width: 2.25rem;
  height: 1px;
  background: currentColor;
}

.kit-text--center > .kit-eyebrow {
  margin-inline: auto;
}

/* Buttons: thin square outlines with spaced capitals. On hover a fill sweeps across from the left. */
.kit-button {
  min-height: 3.25rem;
  padding: 0.85rem 1.9rem;
  font-size: 0.78rem;
  font-weight: var(--encore-body-strong, 600);
  letter-spacing: 0.2em;
  line-height: 1.35;
  text-transform: uppercase;
  transition: background-size 560ms var(--kit-ease), color var(--kit-speed) ease, border-color var(--kit-speed) ease;
}

.kit-button--small {
  min-height: 2.75rem;
  padding: 0.55rem 1.25rem;
  font-size: 0.72rem;
}

.kit-button--primary,
.kit-button--primary:hover {
  border-color: var(--encore-button);
  background: linear-gradient(var(--encore-sweep), var(--encore-sweep)) no-repeat 0 0 / 0 100%, var(--encore-button);
  color: var(--encore-on-button);
}

.kit-button--secondary,
.kit-button--light,
.kit-button--secondary:hover,
.kit-button--light:hover {
  border-color: color-mix(in srgb, var(--encore-ink) 45%, transparent);
  background: linear-gradient(var(--encore-ink), var(--encore-ink)) no-repeat 0 0 / 0 100%, transparent;
  color: var(--encore-ink);
}

.kit-button--primary:hover {
  border-color: var(--encore-button);
  background-size: 100% 100%, auto;
  color: var(--encore-on-sweep);
}

.kit-button--secondary:hover,
.kit-button--light:hover {
  border-color: var(--encore-ink);
  background-size: 100% 100%, auto;
  color: var(--encore-ground);
}

.kit-button:active {
  transform: none;
}

/* A quiet button and a text link draw their underline in. */
.kit-button--ghost,
.kit-link {
  background: linear-gradient(currentColor, currentColor) no-repeat 0 100% / 0 1px,
    linear-gradient(color-mix(in srgb, currentColor 35%, transparent), color-mix(in srgb, currentColor 35%, transparent)) no-repeat 0 100% / 100% 1px;
  text-decoration: none;
  transition: background-size 560ms var(--kit-ease), color var(--kit-speed) ease;
}

.kit-button--ghost {
  min-height: 2.75rem;
  padding: 0.35rem 0;
  background-position: 0 85%, 0 85%;
}

.kit-button--ghost:hover,
.kit-link:hover {
  background-size: 100% 1px, 100% 1px;
}

/* Cards: square, drawn with a hairline; a card without a picture has a second hairline inside its edge, like a
   programme page. A linked card's lines turn the accent colour on hover and its picture moves in slowly. */
.kit-card--surface {
  border-color: var(--kit-line);
}

.kit-card--outline {
  border-color: var(--kit-line-strong);
}

.kit-card--surface:not(:has(> .kit-card__media)),
.kit-card--outline:not(:has(> .kit-card__media)) {
  outline: 1px solid color-mix(in srgb, var(--kit-text) 9%, transparent);
  outline-offset: -7px;
}

.kit-card {
  transition: border-color var(--kit-speed) ease, outline-color var(--kit-speed) ease;
}

.kit-card--linked:hover {
  border-color: var(--kit-accent);
  outline-color: color-mix(in srgb, var(--kit-accent) 45%, transparent);
}

.kit-card__media img {
  transition: transform 900ms var(--kit-ease);
}

.kit-card--linked:hover .kit-card__media img {
  transform: scale(1.04);
}

.kit-card__title {
  font-size: calc(var(--encore-heading-scale, 1) * 1.45rem);
  font-weight: var(--encore-title-weight, 600);
  line-height: 1.2;
}

.kit-card__eyebrow {
  font-size: 0.7rem;
  font-weight: var(--encore-body-strong, 600);
}

/* Numbered acts: cards with a title and no picture, and features in a row, count 01, 02, 03 over a hairline. */
.kit-grid {
  counter-reset: encore-act;
}

.kit-grid > .kit-card:not(:has(> .kit-card__media, .kit-stat, .kit-card__eyebrow)):has(> .kit-card__content > .kit-card__title),
.kit-grid > .kit-stack:has(> .kit-heading-group > .kit-heading--3) {
  counter-increment: encore-act;
}

.kit-grid > .kit-card:not(:has(> .kit-card__media, .kit-stat, .kit-card__eyebrow)):has(> .kit-card__content > .kit-card__title) > .kit-card__content::before,
.kit-grid > .kit-stack:has(> .kit-heading-group > .kit-heading--3)::before {
  content: counter(encore-act, decimal-leading-zero);
  display: block;
  align-self: stretch;
  margin-bottom: 0.65rem;
  padding-block: 0.1rem;
  background: linear-gradient(var(--kit-line-strong), var(--kit-line-strong)) no-repeat 2.6rem 50% / calc(100% - 2.6rem) 1px;
  color: var(--kit-accent-text);
  font-size: 0.72rem;
  font-weight: var(--encore-body-strong, 600);
  letter-spacing: 0.18em;
  line-height: 1.4;
}

/* A big icon at the head of a card or a feature (not under a picture) sits at the right, on the line of its number or
   title, and the number's rule stops short of it. */
.kit-grid > .kit-stack:has(> .kit-heading-group > .kit-heading--3) {
  position: relative;
}

.kit-card:not(:has(> .kit-card__media)) .kit-card__body > .kit-icon--large:first-child,
.kit-grid > .kit-stack:has(> .kit-heading-group > .kit-heading--3) > .kit-icon--large:first-child {
  position: absolute;
  top: calc(var(--kit-card-pad) - 0.3rem);
  right: var(--kit-card-pad);
  width: 1.75rem;
  height: 1.75rem;
  margin: 0;
}

.kit-grid > .kit-stack:has(> .kit-heading-group > .kit-heading--3) > .kit-icon--large:first-child {
  top: -0.3rem;
  right: 0;
}

.kit-card:not(:has(> .kit-card__media)):not(.kit-card--plain):has(.kit-card__body > .kit-icon--large:first-child) .kit-card__title {
  padding-inline-end: 2.5rem;
}

.kit-grid > .kit-card:not(:has(> .kit-card__media, .kit-stat, .kit-card__eyebrow)):has(> .kit-card__content > .kit-card__title):has(.kit-card__body > .kit-icon--large:first-child) > .kit-card__content::before,
.kit-grid > .kit-stack:has(> .kit-heading-group > .kit-heading--3):has(> .kit-icon--large:first-child)::before {
  margin-inline-end: 2.75rem;
}

.kit-grid > .kit-card:not(:has(> .kit-card__media, .kit-stat, .kit-card__eyebrow)):has(> .kit-card__content > .kit-card__title):has(.kit-card__body > .kit-icon--large:first-child) .kit-card__title {
  padding-inline-end: 0;
}

/* A plain card's label (a step's number) is set large in the display face, with a rule running on from it. */
.kit-card--plain > .kit-card__content > .kit-card__eyebrow:first-child {
  display: flex;
  align-items: center;
  gap: 1rem;
  margin-bottom: 0.35rem;
  font-family: var(--font-heading, serif);
  font-size: var(--encore-step-size);
  font-weight: var(--kit-heading-weight);
  letter-spacing: var(--kit-heading-tracking);
  line-height: 1;
  text-transform: none;
}

/* A step's icon sits at the end of its number's rule. */
.kit-card--plain:has(> .kit-card__content > .kit-card__eyebrow:first-child) .kit-card__body > .kit-icon--large:first-child {
  top: calc(var(--kit-card-pad) + (var(--encore-step-size) - 1.75rem) / 2);
  right: 0;
}

.kit-card--plain:has(.kit-card__body > .kit-icon--large:first-child) > .kit-card__content > .kit-card__eyebrow:first-child::after {
  margin-inline-end: 2.75rem;
}


.kit-card--plain > .kit-card__content > .kit-card__eyebrow:first-child::after {
  content: "";
  flex: 1 1 auto;
  height: 1px;
  background: var(--kit-line-strong);
}

/* A list's lines (a plan's features) are set plainly. */
.kit-list-item__title {
  font-weight: 500;
}

/* Big icons are drawn fine, in the accent. */
.kit-icon--large {
  width: 2rem;
  height: 2rem;
  stroke-width: 1.25;
}

/* Pictures in a row hang in a hairline frame a few pixels out, which turns the accent colour under the pointer. */
.kit-section .kit-grid > .kit-picture {
  outline: 1px solid var(--kit-line);
  outline-offset: 5px;
  transition: outline-color var(--kit-speed) ease;
}

.kit-section .kit-grid > .kit-picture:hover {
  outline-color: var(--kit-accent);
}

/* Portraits are round, like cameos, with a fine ring a little apart. */
.kit-avatar {
  outline: 1px solid color-mix(in srgb, var(--kit-accent) 70%, transparent);
  outline-offset: 3px;
}

/* Fields: square, a hairline box on the surface; the one you are typing in gains a second line in the accent. */
.kit-input {
  min-height: 3.25rem;
  padding-inline: 1rem;
  border-color: color-mix(in srgb, var(--kit-text) 40%, transparent);
  transition: border-color var(--kit-speed) ease, box-shadow var(--kit-speed) ease;
}

.kit-textarea {
  padding-block: 0.9rem;
}

.kit-select {
  padding-inline: 1rem 2.75rem;
}

.kit-input:focus {
  border-color: var(--kit-accent);
  box-shadow: inset 0 0 0 1px var(--kit-accent);
}

.kit-input:focus-visible {
  outline: 0;
}

/* Ticks and choices are drawn to match: a square box (a round one for a choice) that fills with the accent. */
.kit-check__input {
  display: inline-grid;
  place-content: center;
  border: 1px solid color-mix(in srgb, var(--kit-text) 45%, transparent);
  background: var(--kit-surface);
  -webkit-appearance: none;
  appearance: none;
  transition: background-color var(--kit-speed) ease, border-color var(--kit-speed) ease;
}

.kit-check__input[type="radio"] {
  border-radius: 50%;
}

.kit-check__input:checked {
  border-color: var(--kit-accent);
  background: var(--kit-accent);
}

.kit-check__input[type="checkbox"]:checked::before {
  content: "";
  width: 0.62rem;
  height: 0.34rem;
  margin-top: -0.12rem;
  border-bottom: 2px solid var(--kit-on-accent);
  border-left: 2px solid var(--kit-on-accent);
  transform: rotate(-45deg);
}

.kit-check__input[type="radio"]:checked::before {
  content: "";
  width: 0.4rem;
  height: 0.4rem;
  border-radius: 50%;
  background: var(--kit-on-accent);
}

.kit-check__input:focus-visible {
  outline: 2px solid var(--kit-focus);
  outline-offset: 2px;
}

.kit-compare__label,
.kit-gallery__count {
  border-radius: 0;
  font-size: 0.68rem;
  letter-spacing: 0.16em;
  text-transform: uppercase;
}

.kit-field__label {
  font-size: 0.72rem;
  font-weight: var(--encore-body-strong, 600);
  letter-spacing: 0.16em;
  text-transform: uppercase;
}

/* Quotes: in the display face, upright, under a large open quote mark in the accent. */
.kit-quote {
  padding-inline-start: 0;
  border-inline-start: 0;
}

.kit-quote__text {
  font-size: calc(var(--encore-heading-scale, 1) * clamp(1.25rem, 1.1rem + 0.6vw, 1.6rem));
  font-style: normal;
  font-weight: var(--kit-heading-weight);
  line-height: 1.38;
}

.kit-quote__text::before {
  content: "\201C";
  display: block;
  height: 0.55em;
  color: var(--kit-accent-text);
  font-family: var(--font-heading, serif);
  font-size: 3.2em;
  line-height: 1;
}

.kit-quote__author {
  margin-top: 1.1rem;
  font-size: 0.72rem;
  font-weight: var(--encore-body-strong, 600);
  letter-spacing: 0.18em;
  text-transform: uppercase;
}

.kit-quote__role {
  margin-top: 0.25rem;
  font-size: 0.85rem;
  letter-spacing: 0.02em;
  text-transform: none;
}

/* Questions: rows between hairlines under a double rule, in the display face; an open one shows a short accent rule. */
.kit-accordion {
  border-top: 3px double var(--kit-line-strong);
}

.kit-accordion__item {
  position: relative;
}

.kit-accordion__item::before {
  content: "";
  position: absolute;
  top: -1px;
  left: 0;
  width: 0;
  height: 1px;
  background: var(--kit-accent);
  transition: width 560ms var(--kit-ease);
}

.kit-accordion__item[open]::before {
  width: 4rem;
}

.kit-accordion__title {
  padding-block: 1.25rem;
  font-family: var(--font-heading, serif);
  font-size: calc(var(--encore-heading-scale, 1) * clamp(1.15rem, 1rem + 0.5vw, 1.4rem));
  font-weight: var(--encore-title-weight, 600);
  letter-spacing: var(--kit-heading-tracking);
}

.kit-accordion__chevron {
  stroke-width: 1.25;
}

/* Numbers and prices in the display face. */
.kit-output--large,
.kit-price__amount,
.kit-summary__amount,
.kit-stat__value {
  font-family: var(--font-heading, serif);
  font-weight: var(--kit-heading-weight);
  letter-spacing: var(--kit-heading-tracking);
}

.kit-stat__value {
  font-size: calc(var(--encore-heading-scale, 1) * clamp(2.75rem, 1.8rem + 3.4vw, 4.75rem));
  line-height: 1;
}

/* A price in a card stays on one line where it can. */
.kit-card .kit-stat__value {
  font-size: calc(var(--encore-heading-scale, 1) * clamp(2rem, 1.6rem + 1vw, 2.6rem));
  overflow-wrap: normal;
}

.kit-stat__label {
  font-size: 0.72rem;
  font-weight: var(--encore-body-strong, 600);
  letter-spacing: 0.18em;
  text-transform: uppercase;
}

.kit-rich-text blockquote {
  margin-inline: 0;
  padding: 1.25rem 0;
  border-block: 1px solid var(--kit-line);
  font-family: var(--font-heading, serif);
  font-size: 1.3em;
  font-weight: var(--kit-heading-weight);
  line-height: 1.35;
}

/* A rule in a text is a short double hairline. */
.kit-rich-text hr {
  width: 4.5rem;
  height: 5px;
  margin-inline: auto;
  border: 0;
  border-block: 1px solid var(--kit-accent);
}

.kit-badge,
.kit-chip {
  font-size: 0.68rem;
  font-weight: var(--encore-body-strong, 600);
  letter-spacing: 0.14em;
  text-transform: uppercase;
}

.kit-tabs__tab {
  font-size: 0.75rem;
  font-weight: var(--encore-body-strong, 600);
  letter-spacing: 0.16em;
  text-transform: uppercase;
}

.kit-carousel__button,
.kit-gallery__button {
  border-radius: 0;
}

.kit-carousel__button {
  border: 1px solid var(--kit-line-strong);
  background: transparent;
  color: var(--kit-text);
}

.kit-carousel__button:hover {
  border-color: var(--kit-accent);
  color: var(--kit-accent-text);
}

.kit-slideshow__button {
  border-radius: 0;
}

.kit-slideshow__dot::before {
  width: 1.1rem;
  height: 1px;
  margin: 0 0 0 -0.55rem;
  border-radius: 0;
}

.kit-slideshow__dot[aria-current="true"]::before {
  transform: scaleX(1.6);
}

.kit-dialog,
.kit-drawer--right.is-ready,
.kit-drawer--bottom.is-ready {
  border: 1px solid var(--kit-line-strong);
  outline: 1px solid var(--kit-line);
  outline-offset: -8px;
}

@media (prefers-reduced-motion: reduce) {
  .kit-card--linked:hover .kit-card__media img {
    transform: none;
  }

  .kit-button,
  .kit-link,
  .kit-accordion__item::before {
    transition: none;
  }
}
