/*
 * The Theme Kit in Deco's look. The kit (themes/_shared/assets/css/kit.css) draws every block the theme has no template
 * for, and every module section; this file sets its tokens and the look of its parts, linked after kit.css, so the
 * values here win. How whole sections sit on the page (the rising sun over a heading, ruled bands, the gilt frame of a
 * picture beside words) is in theme.css, which knows each block's type.
 *
 * The look: square corners, spaced capitals, fine gold lines. Headings of a page and a section are capitals in the
 * heading face; titles of cards are the heading face in their own case. Buttons are plaques: the main colour with a gold
 * line inside its edge, or a double outline in gold. Cards are sheets of the surface with a second, gold line drawn a
 * little inside their edge, like a framed mirror. Numbers of steps stand in gold diamonds.
 *
 * Rules for this file: it loads nothing, no picture, font or address of any kind (the kit inlines it into module
 * previews; kit_components.test.php fails for one, and also for these words written in a comment);
 * colours only through the palette tokens the kit already reads (--text-primary, --surface, --primary, ...) or
 * color-mix() of them; weights only through the layout's --deco-heading-weight and --deco-body-strong.
 *
 * --kit-radius, --kit-button-radius and --kit-button-transform are repeated in this theme's line of the shared button
 * table (themes/_shared/assets/css/resilience.css, --chrome-radius, --chrome-button-radius and --chrome-button-case) so
 * the cookie notice and the phone action bar match the theme's own cards and buttons: theme-chrome.test.mjs compares the
 * two. Change both.
 */

.kit-root {
  --kit-radius: 0px;
  --kit-radius-sm: 0px;
  --kit-button-radius: 0px;
  --kit-input-radius: 0px;
  --kit-media-radius: 0px;
  --kit-chip-radius: 0px;
  --kit-heading-weight: var(--deco-heading-weight, 400);
  --kit-heading-tracking: 0.02em;
  --kit-button-weight: var(--deco-body-strong, 600);
  --kit-button-tracking: 0.18em;
  --kit-button-transform: uppercase;
  --kit-eyebrow-tracking: 0.24em;
  --kit-focus: var(--accent-ink, #76541a);
  --kit-star: var(--accent, #c6a15b);
  --kit-shadow: none;
  --kit-shadow-hover: 0 22px 44px -28px color-mix(in srgb, var(--text-primary, #15211d) 45%, transparent);
  --kit-card-pad: clamp(1.4rem, 1.1rem + 1vw, 2rem);
  --kit-gap-medium: clamp(1.25rem, 2vw, 1.75rem);
  --kit-gap-large: clamp(2rem, 1.5rem + 2vw, 3rem);
  --kit-gutter: clamp(1rem, 4vw, 2rem);
  --kit-width-normal: 72rem;
  --kit-width-narrow: 46rem;
  --kit-pad-normal: clamp(4rem, 3rem + 4.5vw, 7rem);
  --kit-pad-compact: clamp(2.25rem, 1.75rem + 2vw, 3.5rem);
  --kit-pad-spacious: clamp(5rem, 3.5rem + 6vw, 9rem);
  /* The gold of the lines, here as on the frame: the accent, for decoration only. */
  --deco-kit-gold: var(--accent, #c6a15b);
}

/* ------------------------------------------------------------------ Type */

/* Headings: the heading face. A page's heading and a section's are spaced capitals, sized for ordinary words at 320 px
   (the shared script is only the net for a long word, cms/THEME_DEVELOPMENT.md, rule 1); --deco-scale sets each face at
   about one width of capital. A line height under about 1.1 cuts marks in a box that clips. */
.kit-heading {
  font-family: var(--font-heading, serif);
  line-height: 1.15;
  text-wrap: balance;
}

.kit-heading--1 {
  font-size: calc(clamp(2rem, 1.2rem + 3vw, 3.75rem) * var(--deco-scale, 1));
  letter-spacing: 0.08em;
  line-height: 1.12;
  text-transform: uppercase;
}

.kit-heading--2 {
  font-size: calc(clamp(1.65rem, 1.2rem + 1.8vw, 2.75rem) * var(--deco-scale, 1));
  letter-spacing: 0.08em;
  line-height: 1.14;
  text-transform: uppercase;
}

.kit-heading--3 {
  font-size: calc(clamp(1.25rem, 1.12rem + 0.5vw, 1.5rem) * var(--deco-scale, 1));
  letter-spacing: 0.02em;
  line-height: 1.25;
}

.kit-heading--4 {
  font-size: calc(1.125rem * var(--deco-scale, 1));
  line-height: 1.3;
}

/* A heading of more than 90 characters reads as a lead line, in its own case. */
.kit-heading.kit-heading--long {
  font-size: calc(clamp(1.25rem, 1.1rem + 0.7vw, 1.6rem) * var(--deco-scale, 1));
  letter-spacing: 0.01em;
  line-height: 1.35;
  text-transform: none;
}

.kit-text--lead {
  font-size: clamp(1.0625rem, 1rem + 0.35vw, 1.25rem);
  line-height: 1.6;
}

/* Small labels: the body face in small spaced capitals, in the accent's readable shade. Short words only stand here. */
.kit-eyebrow,
.kit-card__eyebrow {
  font-size: 0.6875rem;
  font-weight: var(--deco-body-strong, 600);
  letter-spacing: var(--kit-eyebrow-tracking);
  line-height: 1.5;
}

.kit-link,
.kit-rich-text a {
  color: var(--kit-text);
  text-decoration-color: var(--deco-kit-gold);
  text-decoration-thickness: 1px;
  text-underline-offset: 0.28em;
}

.kit-rich-text a:hover,
.kit-link:hover {
  color: var(--kit-accent-text);
}

/* ------------------------------------------------------------------ Buttons */

/* A plaque in small spaced capitals. The main button is the main colour with a fine gold line drawn just inside its
   edge (two inset shadows: a ring of the button's own colour, then the line); the second button is a double outline in
   the accent. theme-chrome.test.mjs holds the corner and the capitals together with the shared notice's. */
.kit-button {
  min-height: 3rem;
  padding: 0.8rem 1.65rem;
  font-size: 0.75rem;
  line-height: 1.35;
}

.kit-button--primary {
  box-shadow: inset 0 0 0 3px var(--kit-primary), inset 0 0 0 4px var(--deco-kit-gold);
}

.kit-button--primary:hover {
  box-shadow: inset 0 0 0 3px var(--kit-primary-hover), inset 0 0 0 4px color-mix(in srgb, var(--deco-kit-gold) 55%, #fff);
}

.kit-button--secondary {
  border: 3px double var(--kit-accent);
}

.kit-button--ghost {
  text-decoration: underline;
  text-decoration-color: var(--deco-kit-gold);
  text-underline-offset: 0.35em;
}

/* A small button (a row of review links, Next under a list of posts) is still 40 px tall: the kit's own 36 px is under
   what a thumb needs on a phone (verify-theme-stress.mjs, button-small). */
.kit-button--small {
  min-height: 2.5rem;
  padding: 0.5rem 1.1rem;
  font-size: 0.6875rem;
}

.kit-button--small.kit-button--primary {
  box-shadow: inset 0 0 0 2px var(--kit-primary), inset 0 0 0 3px var(--deco-kit-gold);
}

.kit-button-group {
  gap: 0.75rem 1rem;
}

/* ------------------------------------------------------------------ Cards */

/* A card is a sheet of the surface with a fine border and a second, gold line drawn a little inside its edge, over a
   picture too, like a mirror in its frame. */
.kit-card {
  border-radius: 0;
}

.kit-card--surface {
  position: relative;
  border-color: var(--kit-line);
  background: var(--kit-surface);
}

.kit-card--surface::after {
  content: "";
  position: absolute;
  inset: 0.45rem;
  z-index: 2;
  border: 1px solid color-mix(in srgb, var(--deco-kit-gold) 55%, transparent);
  pointer-events: none;
  transition: border-color var(--kit-speed) ease, inset var(--kit-speed) ease;
}

.kit-card--outline {
  border-color: var(--deco-kit-gold);
}

.kit-card__title {
  font-size: calc(clamp(1.2rem, 1.1rem + 0.45vw, 1.45rem) * var(--deco-scale, 1));
  letter-spacing: 0.02em;
  line-height: 1.25;
}

.kit-card__meta {
  font-size: 0.75rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.kit-card--linked.kit-card--surface:hover {
  border-color: var(--deco-kit-gold);
}

.kit-card--linked.kit-card--surface:hover::after {
  border-color: var(--deco-kit-gold);
}

.kit-card--linked:hover .kit-card__link {
  color: var(--kit-text);
}

/* Steps: each number stands in a gold diamond over its title. A step with an icon keeps the kit's small label for its
   number (kit.css: one lead mark per step), so only a step without one gets the diamond. */
.kit-grid.kit-steps .kit-card__content:not(:has(> .kit-card__body > .kit-icon:first-child)) > .kit-card__eyebrow {
  position: relative;
  display: grid;
  place-items: center;
  width: 2.75rem;
  height: 2.75rem;
  margin-bottom: 0.9rem;
  color: var(--kit-text);
  font-family: var(--font-heading, serif);
  font-size: calc(0.9375rem * var(--deco-scale, 1));
  font-variant-numeric: lining-nums tabular-nums;
  font-weight: var(--deco-heading-weight, 400);
  letter-spacing: 0.04em;
}

.kit-grid.kit-steps .kit-card__content:not(:has(> .kit-card__body > .kit-icon:first-child)) > .kit-card__eyebrow::before {
  content: "";
  position: absolute;
  inset: 0.45rem;
  z-index: -1;
  border: 1px solid var(--deco-kit-gold);
  outline: 1px solid color-mix(in srgb, var(--deco-kit-gold) 45%, transparent);
  outline-offset: 3px;
  transform: rotate(45deg);
}

/* A step with an icon: the icon stands in a round gold medallion, two fine rings, and its number is the kit's small
   label beside it. */
.kit-grid.kit-steps .kit-card__content > .kit-card__body > .kit-icon:first-child {
  box-sizing: content-box;
  width: 1.5rem;
  height: 1.5rem;
  padding: 0.7rem;
  border: 1px solid var(--deco-kit-gold);
  border-radius: 50%;
  outline: 1px solid color-mix(in srgb, var(--deco-kit-gold) 45%, transparent);
  outline-offset: 3px;
  margin: 4px 0 1rem 4px;
}

/* A timeline's year in small spaced capitals. */
.kit-grid:not(.kit-steps) > .kit-card .kit-card__eyebrow {
  color: var(--kit-accent-text);
}

/* ------------------------------------------------------------------ Figures */

/* Statistics: the figure in the heading face, under a short gold rule. From 1200 px five statistics stand in a row of
   about 200 px each, so the figures stop at about 44 px there: "1500 m²" stays on one line. */
.kit-stat {
  gap: 0.5rem;
}

.kit-stat::before {
  content: "";
  display: block;
  width: 2.5rem;
  height: 5px;
  margin: 0 auto 0.6rem;
  background:
    linear-gradient(var(--deco-kit-gold), var(--deco-kit-gold)) 0 0 / 100% 1px no-repeat,
    linear-gradient(var(--deco-kit-gold), var(--deco-kit-gold)) 0 100% / 100% 1px no-repeat;
}

.kit-stat__value {
  font-family: var(--font-heading, serif);
  font-size: calc(clamp(2rem, 1.4rem + 1.7vw, 2.75rem) * var(--deco-scale, 1));
  font-weight: var(--deco-heading-weight, 400);
  letter-spacing: 0.04em;
  line-height: 1.1;
}

.kit-stat__suffix {
  color: var(--kit-accent-text);
}

.kit-stat__label {
  font-size: 0.6875rem;
  font-weight: var(--deco-body-strong, 600);
  letter-spacing: 0.18em;
  line-height: 1.5;
  text-transform: uppercase;
}

/* ------------------------------------------------------------------ Lists, questions, quotes */

.kit-accordion {
  border-top-color: var(--deco-kit-gold);
}

.kit-accordion__item {
  border-bottom-color: var(--kit-line);
}

.kit-accordion__title {
  padding: 1.2rem 0;
  font-family: var(--font-heading, serif);
  font-size: calc(clamp(1.0625rem, 1rem + 0.3vw, 1.2rem) * var(--deco-scale, 1));
  font-weight: var(--deco-heading-weight, 400);
  letter-spacing: 0.02em;
  line-height: 1.35;
}

.kit-accordion__title:hover {
  color: var(--kit-text);
}

.kit-accordion__chevron {
  color: var(--kit-accent-text);
}

.kit-accordion__body {
  padding-bottom: 1.4rem;
}

/* A quotation is upright (the font palettes load no slanted letters, and a browser's own slant is a fake), with a large
   opening mark in gold above it instead of a bar at its side. */
.kit-quote {
  padding-inline-start: 0;
  border-inline-start: 0;
}

.kit-quote__text {
  font-family: var(--font-body, sans-serif);
  font-style: normal;
  font-size: clamp(1.0625rem, 1rem + 0.35vw, 1.2rem);
  line-height: 1.6;
}

.kit-quote__text::before {
  content: "\201C";
  display: block;
  height: 0.5em;
  margin-bottom: 0.4rem;
  color: var(--deco-kit-gold);
  font-family: var(--font-heading, serif);
  font-size: 4.5rem;
  line-height: 1;
}

.kit-quote__author {
  font-size: 0.75rem;
  font-weight: var(--deco-body-strong, 600);
  letter-spacing: 0.16em;
  text-transform: uppercase;
}

.kit-list--menu .kit-list-item__title {
  font-family: var(--font-heading, serif);
  font-size: calc(1.125rem * var(--deco-scale, 1));
  font-weight: var(--deco-heading-weight, 400);
  letter-spacing: 0.04em;
}

.kit-list--menu .kit-list-item__meta {
  color: var(--kit-accent-text);
  font-weight: var(--deco-body-strong, 600);
}

/* ------------------------------------------------------------------ Forms */

.kit-field__label {
  font-size: 0.6875rem;
  font-weight: var(--deco-body-strong, 600);
  letter-spacing: 0.16em;
  text-transform: uppercase;
}

.kit-input {
  min-height: 3rem;
  border-color: var(--kit-line-strong);
  background: var(--kit-surface);
}

.kit-input:focus {
  border-color: var(--deco-kit-gold);
  box-shadow: inset 0 0 0 1px var(--deco-kit-gold);
}

/* ------------------------------------------------------------------ Pictures and frames */

.kit-picture,
.kit-picture.kit-rounded,
.kit-card__media,
.kit-frame,
.kit-video,
.kit-compare__frame {
  border-radius: 0;
}

/* A video and a frame from another website stand in a fine gold frame. */
.kit-video,
.kit-frame {
  outline: 1px solid color-mix(in srgb, var(--deco-kit-gold) 60%, transparent);
  outline-offset: 0.45rem;
}

.kit-video .kit-frame {
  outline: 0;
}

.kit-carousel__button,
.kit-slideshow__button {
  border-radius: 0;
}

/* A person's portrait is round, in a fine gold ring. */
.kit-avatar {
  border-radius: 50%;
  box-shadow: 0 0 0 3px var(--kit-surface), 0 0 0 4px var(--deco-kit-gold);
}

.kit-slideshow__dot {
  border-radius: 0;
  transform: rotate(45deg);
}
