/*
 * Kite: the Theme Kit in Kite'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.
 *
 * Cheerful and sticker-like: cards, buttons, fields and questions have a dark outline (the text colour, --kite-ink) and
 * a solid offset shadow instead of a soft one. Cards in a row take turns with the theme's three bright colours for that
 * shadow (accent, --kite-pop, --kite-fizz), small labels are tilted sticker chips, big icons sit in round stickers, and
 * linked cards hop up a little on hover. Shapes are round and headings are chunky (--kite-heading-weight, the heaviest
 * weight of the font palette, set by the layout). This file may load nothing, so every shape here is drawn with CSS.
 */

.kit-root {
  --kite-ink: var(--text-primary, #231942);
  --kite-tint: var(--accent, #ff6b4a);
  --kit-radius: 1.5rem;
  --kit-radius-sm: 1rem;
  --kit-media-radius: 1.1rem;
  --kit-button-radius: 999px;
  --kit-input-radius: 999px;
  --kit-chip-radius: 999px;
  --kit-shadow: 5px 5px 0 var(--kite-ink);
  --kit-shadow-hover: 8px 8px 0 var(--kite-ink);
  --kit-heading-weight: var(--kite-heading-weight, 800);
  --kit-heading-tracking: -0.015em;
  --kit-button-weight: 700;
  --kit-button-tracking: 0;
  --kit-button-transform: none;
  --kit-eyebrow-tracking: 0;
  --kit-star: var(--accent, #ff6b4a);
  --kit-card-pad: clamp(1.4rem, 2.2vw, 2rem);
  --kit-gap-medium: 1.5rem;
  --kit-gap-large: clamp(2rem, 4vw, 3rem);
  --kit-gutter: var(--kite-gutter, clamp(1.25rem, 4vw, 3rem));
  --kit-width-normal: 74rem;
  --kit-width-narrow: 44rem;
  --kit-width-wide: 90rem;
  --kit-pad-normal: clamp(3.75rem, 7.5vw, 6.5rem);
  --kit-pad-compact: clamp(2.25rem, 4.5vw, 3.5rem);
  --kit-pad-spacious: clamp(5rem, 10vw, 8.5rem);
  --kit-speed: 220ms;
  --kit-ease: cubic-bezier(0.34, 1.56, 0.64, 1);
}

/* Things in a row take turns with the three bright colours: the accent, then pop, then fizz. */
.kit-grid > :nth-child(3n + 2),
.kit-carousel__track > :nth-child(3n + 2) {
  --kite-tint: var(--kite-pop, #6ccff6);
}

.kit-grid > :nth-child(3n),
.kit-carousel__track > :nth-child(3n) {
  --kite-tint: var(--kite-fizz, #ffd447);
}

/* Coloured sections are rounded bands inset from the window, like the header and the footer. */
.kit-section--muted,
.kit-section--inverse,
.kit-section--accent,
.kit-section--image {
  margin: clamp(0.25rem, 0.8vw, 0.6rem) var(--kite-inset, clamp(0.5rem, 1.4vw, 1.25rem));
  border-radius: var(--kite-radius-large, clamp(1.5rem, 3.5vw, 2.5rem));
}

/* On a band the outline follows the band's text colour, and the main button stays a bright sticker: the accent on a dark
   band or a photograph, white on the accent band. */
.kit-section--inverse,
.kit-section--image,
.kit-slide {
  --kite-ink: var(--kit-section-fg);
}

.kit-section--accent {
  --kite-ink: var(--on-accent, #231942);
  border: 2px solid var(--kite-ink);
}

:is(.kit-section--inverse, .kit-section--image, .kit-slide) .kit-button--primary,
:is(.kit-section--inverse, .kit-section--image, .kit-slide) .kit-button--primary:hover {
  background: var(--accent, #ff6b4a);
  color: var(--on-accent, #231942);
}

.kit-section--accent .kit-button--primary,
.kit-section--accent .kit-button--primary:hover {
  background: var(--surface, #fff);
  color: var(--text-primary, #231942);
}

/* Chunky headings, set close. */
.kit-heading {
  line-height: 1.08;
  text-wrap: balance;
}

.kit-heading--1 {
  font-size: clamp(2.6rem, 1.5rem + 4.2vw, 5rem);
  line-height: 1.02;
}

.kit-heading--2 {
  font-size: clamp(2rem, 1.4rem + 2.4vw, 3.4rem);
  line-height: 1.06;
}

.kit-heading--3 {
  font-size: clamp(1.3rem, 1.1rem + 0.8vw, 1.7rem);
  line-height: 1.18;
}

/* Small labels are stickers: a bright chip with an outline, a little tilted. */
.kit-eyebrow {
  display: inline-block;
  width: fit-content;
  padding: 0.3rem 0.9rem;
  border: 2px solid var(--kite-ink);
  border-radius: 999px;
  background: var(--kite-fizz, #ffd447);
  color: var(--on-accent, #231942);
  font-size: 0.85rem;
  font-weight: 800;
  line-height: 1.3;
  text-transform: none;
  transform: rotate(-2deg);
}

.kit-section--inverse .kit-eyebrow,
.kit-section--accent .kit-eyebrow {
  border-color: var(--on-accent, #231942);
}

/* Buttons are chunky pills with an outline and a solid shadow; they hop up on hover and press down on a click. */
.kit-button {
  min-height: 3.1rem;
  padding: 0.75rem 1.6rem;
  border-width: 2px;
  font-size: 1rem;
  line-height: 1.25;
}

.kit-button--small {
  min-height: 2.6rem;
  padding: 0.45rem 1.15rem;
  font-size: 0.9rem;
}

.kit-button--primary,
.kit-button--secondary {
  border-color: var(--kite-ink);
  box-shadow: 3px 3px 0 var(--kite-ink);
}

.kit-button--primary {
  background: var(--kit-accent);
  color: var(--kit-on-accent);
}

.kit-button--secondary {
  background: var(--kit-surface);
  color: var(--kite-ink);
}

.kit-button--primary:hover,
.kit-button--secondary:hover {
  border-color: var(--kite-ink);
  box-shadow: 5px 5px 0 var(--kite-ink);
  transform: translate(-2px, -2px);
}

.kit-button--primary:hover {
  background: var(--kit-accent);
  color: var(--kit-on-accent);
}

.kit-button--secondary:hover {
  background: var(--kite-fizz, #ffd447);
  color: var(--on-accent, #231942);
}

.kit-button--primary:active,
.kit-button--secondary:active {
  box-shadow: 0 0 0 var(--kite-ink);
  transform: translate(3px, 3px);
}

.kit-button--ghost {
  padding-inline: 0.25rem;
  text-decoration: underline wavy;
  text-decoration-color: var(--kit-accent);
  text-decoration-thickness: 2px;
  text-underline-offset: 0.35em;
}

.kit-link {
  text-decoration-thickness: 2px;
  text-underline-offset: 0.3em;
}

.kit-link:hover {
  text-decoration-style: wavy;
  text-decoration-color: var(--kit-accent);
}

/* Cards are stickers: an outline and a solid shadow in the row's bright colour; a linked card hops and tilts a touch. */
.kit-card--surface,
.kit-card--outline {
  border: 2px solid var(--kite-ink);
  background: var(--kit-surface);
  box-shadow: 5px 5px 0 var(--kite-tint);
}

.kit-card--linked:hover {
  box-shadow: 8px 8px 0 var(--kite-tint);
  transform: translate(-3px, -3px) rotate(-0.6deg);
}

.kit-card__media {
  border-bottom: 2px solid var(--kite-ink);
}

.kit-card--plain .kit-card__media {
  border: 2px solid var(--kite-ink);
}

.kit-card__media img {
  transition: transform 600ms cubic-bezier(0.22, 1, 0.36, 1);
}

.kit-card--linked:hover .kit-card__media img {
  transform: scale(1.05);
}

.kit-card__title {
  font-family: var(--font-heading, sans-serif);
  font-weight: var(--kit-heading-weight);
  letter-spacing: -0.01em;
}

.kit-card__eyebrow {
  color: var(--kit-accent-text);
  font-size: 0.85rem;
  font-weight: 800;
  letter-spacing: 0;
  text-transform: none;
}

/* Big icons in a row sit in round stickers in the row's bright colour. */
.kit-grid .kit-icon--large {
  box-sizing: content-box;
  padding: 0.6rem;
  border: 2px solid var(--kite-ink);
  border-radius: 50%;
  background: var(--kite-tint);
  color: var(--on-accent, #231942);
  stroke-width: 2;
}

/* Pictures get the outline too, and a gallery's pictures lean left and right like snapshots on a board. */
.kit-picture.kit-rounded {
  border: 2px solid var(--kite-ink);
}

.kit-section .kit-grid > .kit-picture.kit-rounded:nth-child(odd) {
  transform: rotate(-1.2deg);
}

.kit-section .kit-grid > .kit-picture.kit-rounded:nth-child(even) {
  transform: rotate(1.2deg);
}

/* Round photos of people get an outline and a bright ring. */
.kit-avatar {
  border: 2px solid var(--kite-ink);
  box-shadow: 3px 3px 0 var(--kite-tint);
}

/* Fields are pills with an outline; the one you are typing in lifts on a bright shadow. */
.kit-input {
  min-height: 3.1rem;
  padding-inline: 1.25rem;
  border: 2px solid var(--kite-ink);
  background-color: var(--kit-surface);
  transition: box-shadow var(--kit-speed) ease, transform var(--kit-speed) var(--kit-ease);
}

.kit-textarea {
  padding-block: 0.9rem;
  border-radius: 1.25rem;
}

.kit-select {
  padding-inline: 1.25rem 2.75rem;
}

.kit-input:focus {
  border-color: var(--kite-ink);
  box-shadow: 4px 4px 0 var(--kit-accent);
}

.kit-input:focus-visible {
  outline: 0;
}

.kit-field__label {
  font-size: 0.95rem;
  font-weight: 700;
}

/* Quotes open with a big round quote mark in the accent colour. */
.kit-quote {
  padding-inline-start: 0;
  border-inline-start: 0;
}

.kit-quote__text {
  font-size: clamp(1.1rem, 1rem + 0.4vw, 1.3rem);
  font-style: normal;
  font-weight: 600;
  line-height: 1.55;
}

.kit-quote__text::before {
  content: "\201C";
  display: block;
  height: 0.6em;
  color: var(--kit-accent-text);
  font-family: var(--font-heading, sans-serif);
  font-size: 3em;
  font-weight: var(--kit-heading-weight);
  line-height: 1;
}

.kit-quote__author {
  margin-top: 1rem;
  font-size: 1rem;
  font-weight: 800;
}

.kit-quote__role {
  margin-top: 0.15rem;
  font-size: 0.9rem;
}

/* Questions are outlined rows, a little apart; an open one turns the soft band colour. */
.kit-accordion {
  border-top: 0;
}

.kit-accordion__item {
  padding-inline: clamp(1rem, 2.5vw, 1.4rem);
  border: 2px solid var(--kite-ink);
  border-radius: 1.25rem;
  background: var(--kit-surface);
  box-shadow: 3px 3px 0 var(--kite-ink);
}

.kit-accordion__item + .kit-accordion__item {
  margin-top: 0.85rem;
}

.kit-accordion__item[open] {
  background: var(--kit-surface-alt);
}

.kit-accordion__title {
  font-family: var(--font-heading, sans-serif);
  font-size: clamp(1.1rem, 1rem + 0.4vw, 1.3rem);
  font-weight: var(--kit-heading-weight);
}

/* Numbers and prices are chunky, in the heading face. */
.kit-output--large,
.kit-price__amount,
.kit-summary__amount,
.kit-stat__value {
  font-family: var(--font-heading, sans-serif);
  font-weight: var(--kit-heading-weight);
  letter-spacing: -0.02em;
}

.kit-rich-text blockquote {
  margin-inline: 0;
  padding: 1.25rem 1.5rem;
  border: 2px solid var(--kite-ink);
  border-radius: 1.25rem;
  background: var(--kit-surface-alt);
  font-size: 1.15em;
  font-weight: 600;
  line-height: 1.5;
}

/* A rule in a text is three dots in the bright colours. */
.kit-rich-text hr {
  width: 4.5rem;
  height: 0.75rem;
  margin-inline: auto;
  border: 0;
  background:
    radial-gradient(circle closest-side, var(--kit-accent) 92%, transparent) 0 50% / 0.75rem 0.75rem no-repeat,
    radial-gradient(circle closest-side, var(--kite-pop, #6ccff6) 92%, transparent) 50% 50% / 0.75rem 0.75rem no-repeat,
    radial-gradient(circle closest-side, var(--kite-fizz, #ffd447) 92%, transparent) 100% 50% / 0.75rem 0.75rem no-repeat;
}

.kit-badge,
.kit-chip {
  border: 2px solid var(--kite-ink);
  font-size: 0.82rem;
  font-weight: 700;
  letter-spacing: 0;
}

.kit-carousel__button {
  border: 2px solid var(--kite-ink);
  border-radius: 50%;
  background: var(--kit-surface);
  box-shadow: 2px 2px 0 var(--kite-ink);
}

.kit-dialog,
.kit-drawer--right.is-ready,
.kit-drawer--bottom.is-ready {
  border: 2px solid var(--kite-ink);
  box-shadow: 8px 8px 0 var(--kite-ink);
}

@media (prefers-reduced-motion: reduce) {
  .kit-card--linked:hover,
  .kit-button--primary:hover,
  .kit-button--secondary:hover {
    transform: none;
  }
}
