/*
 * The Theme Kit in Summit'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 lie on the page (the contour lines on a band, the waypoint before a heading,
 * the statistics on the main colour, the dashed route between steps) is in theme.css, which knows each block's type.
 *
 * The look: sturdy and outdoor. Headings are heavy and tight. Buttons are square-shouldered, in spaced capitals, and the
 * one action wears the accent colour, the blaze of the trail. Small labels are set like a map's. Numbers and icons sit
 * in round badges like embroidered patches: a fill with a stitched ring just inside its edge. Cards are sturdy tags of
 * the surface colour with a firm line and a soft corner.
 *
 * 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 --summit-heading-weight and --summit-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, --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 them.
 * Change both.
 */

.kit-root {
  --kit-radius: 0.75rem;
  --kit-radius-sm: 0.5rem;
  --kit-button-radius: 0.5rem;
  --kit-input-radius: 0.5rem;
  --kit-media-radius: 0.75rem;
  --kit-chip-radius: 999px;
  --kit-heading-weight: var(--summit-heading-weight, 800);
  --kit-heading-tracking: -0.025em;
  --kit-button-weight: var(--summit-body-strong, 600);
  --kit-button-tracking: 0.08em;
  --kit-button-transform: uppercase;
  --kit-eyebrow-tracking: 0.14em;
  --kit-focus: var(--accent-ink, #a5431a);
  --kit-star: var(--accent-ink, #a5431a);
  --kit-shadow: 0 1px 0 color-mix(in srgb, var(--text-primary, #1b241f) 8%, transparent);
  --kit-shadow-hover: 0 14px 30px -18px color-mix(in srgb, var(--text-primary, #1b241f) 45%, transparent);
  --kit-card-pad: clamp(1.25rem, 1rem + 1vw, 1.75rem);
  --kit-gap-medium: clamp(1.25rem, 2vw, 1.75rem);
  --kit-gap-large: clamp(2rem, 1.5rem + 2vw, 3rem);
  --kit-gutter: clamp(1.125rem, 4vw, 2.5rem);
  --kit-width-normal: 75rem;
  --kit-width-narrow: 46rem;
  --kit-pad-normal: clamp(3.75rem, 2.75rem + 4.5vw, 7rem);
  --kit-pad-compact: clamp(2.25rem, 1.75rem + 2vw, 3.75rem);
  --kit-pad-spacious: clamp(4.75rem, 3.25rem + 6vw, 8.5rem);
}

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

/* Headings: heavy and tight, in sentence case. Sizes are chosen for ordinary words at 320 px (a word of fourteen letters
   fits the first heading there); the shared script is only the net for a longer one (cms/THEME_DEVELOPMENT.md, rule 1).
   A line height under about 1.1 cuts marks in a box that clips; these headings are in no such box. */
.kit-heading {
  font-family: var(--font-heading, sans-serif);
  line-height: 1.1;
  text-wrap: balance;
}

.kit-heading--1 {
  font-size: clamp(2.1rem, 1.1rem + 4.2vw, 4.5rem);
  letter-spacing: -0.03em;
  line-height: 1.05;
}

.kit-heading--2 {
  font-size: clamp(1.75rem, 1.2rem + 2.4vw, 3.25rem);
  letter-spacing: -0.028em;
  line-height: 1.08;
}

.kit-heading--3 {
  font-size: clamp(1.2rem, 1.1rem + 0.45vw, 1.45rem);
  letter-spacing: -0.015em;
  line-height: 1.22;
}

.kit-heading--4 {
  font-size: 1.0625rem;
  letter-spacing: -0.01em;
}

/* A heading in one of two columns (a picture beside the words, two columns of text) has half the page: a step smaller. */
.kit-split .kit-heading--2 {
  font-size: clamp(1.75rem, 1.25rem + 1.8vw, 2.75rem);
}

.kit-heading.kit-heading--long {
  font-size: clamp(1.3rem, 1.1rem + 0.8vw, 1.7rem);
  letter-spacing: -0.015em;
  line-height: 1.28;
}

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

/* Small labels: a map's, in spaced capitals with a small triangle before them. Short words only stand here. */
.kit-eyebrow,
.kit-card__eyebrow {
  color: var(--kit-accent-text);
  font-size: 0.75rem;
  font-weight: var(--summit-body-strong, 600);
  font-variant-numeric: lining-nums tabular-nums;
  letter-spacing: var(--kit-eyebrow-tracking);
  line-height: 1.35;
  text-transform: uppercase;
}

.kit-eyebrow::before {
  content: "";
  display: inline-block;
  width: 0.65rem;
  height: 0.55rem;
  margin-inline-end: 0.5rem;
  background: currentColor;
  clip-path: polygon(50% 0, 100% 100%, 0 100%);
}

.kit-link {
  color: var(--kit-text);
  text-decoration-color: var(--kit-accent-text);
  text-decoration-thickness: 2px;
  text-underline-offset: 0.3em;
}

.kit-rich-text a {
  color: var(--kit-accent-text);
  text-decoration-thickness: 1.5px;
  text-underline-offset: 0.22em;
}

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

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

/* Square-shouldered, in spaced capitals. The one action wears the accent with its own readable ink, a pair the colour
   contract keeps in every palette, so it reads on any band; on a band of the accent itself it wears the main colour. The
   hover is a stitched ring inside the edge and a step up. theme-chrome.test.mjs holds this shape and the shared notice's
   together. */
.kit-button {
  min-height: 3rem;
  padding: 0.7rem 1.4rem;
  border-width: 2px;
  font-size: 0.8125rem;
  line-height: 1.3;
}

.kit-button--primary,
.kit-button--primary:hover {
  border-color: transparent;
  background: var(--accent, #e8682a);
  color: var(--on-accent, #1c1209);
}

.kit-button--primary:hover {
  box-shadow: inset 0 0 0 2px var(--accent, #e8682a), inset 0 0 0 3.5px color-mix(in srgb, var(--on-accent, #1c1209) 55%, transparent);
  transform: translateY(-1px);
}

.kit-section--accent .kit-button--primary,
.kit-section--accent .kit-button--primary:hover {
  background: var(--primary, #1d3a2b);
  color: var(--on-primary, #f6f2e6);
}

.kit-section--accent .kit-button--primary:hover {
  box-shadow: inset 0 0 0 2px var(--primary, #1d3a2b), inset 0 0 0 3.5px color-mix(in srgb, var(--on-primary, #f6f2e6) 55%, transparent);
}

.kit-button--secondary {
  border-color: var(--kit-text);
  color: var(--kit-text);
}

.kit-button--secondary:hover {
  border-color: var(--kit-text);
  background: color-mix(in srgb, var(--kit-text) 9%, transparent);
  color: var(--kit-text);
}

.kit-button--ghost {
  color: var(--kit-text);
  text-decoration: underline dashed 1.5px;
  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.45rem 1rem;
  font-size: 0.75rem;
}

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

/* A sturdy tag of the surface colour: a firm line, a soft corner, a shadow only when it is lifted. */
.kit-card--surface {
  border-color: color-mix(in srgb, var(--kit-text) 16%, transparent);
}

.kit-card--outline {
  border-width: 1.5px;
  border-color: color-mix(in srgb, var(--kit-text) 22%, transparent);
}

.kit-card__title {
  font-size: clamp(1.15rem, 1.05rem + 0.45vw, 1.4rem);
  letter-spacing: -0.02em;
  line-height: 1.2;
}

.kit-card__meta {
  font-size: 0.8125rem;
  font-variant-numeric: lining-nums tabular-nums;
}

.kit-card--linked:hover {
  border-color: color-mix(in srgb, var(--kit-text) 40%, transparent);
  transform: translateY(-3px);
}

.kit-card__body > .kit-icon:first-child {
  width: 1.75rem;
  height: 1.75rem;
  color: var(--kit-accent-text);
}

/* The quiet "Learn more" line of a linked card, as a map label with its arrow. */
.kit-card--linked .kit-card__body > .kit-text--small:last-child {
  color: var(--kit-text);
  font-size: 0.75rem;
  font-weight: var(--summit-body-strong, 600);
  letter-spacing: 0.1em;
  text-transform: uppercase;
}

/* ------------------------------------------------------------------ Patches */

/* Features: each icon in a round patch of the main colour with a stitched ring inside its edge. On a band of the main
   colour the patch takes the accent instead, so it never vanishes into the band. */
.kit-grid.kit-features .kit-icon {
  box-sizing: content-box;
  width: 1.5rem;
  height: 1.5rem;
  padding: 0.8rem;
  border-radius: 50%;
  background: var(--primary, #1d3a2b);
  color: var(--on-primary, #f6f2e6);
  outline: 1.5px dashed color-mix(in srgb, var(--on-primary, #f6f2e6) 50%, transparent);
  outline-offset: -5px;
}

.kit-section--inverse .kit-grid.kit-features .kit-icon,
.kit-section--image .kit-grid.kit-features .kit-icon {
  background: var(--accent, #e8682a);
  color: var(--on-accent, #1c1209);
  outline-color: color-mix(in srgb, var(--on-accent, #1c1209) 50%, transparent);
}

@media (max-width: 639.98px) {
  .kit-grid.kit-features .kit-icon--large {
    width: 1.25rem;
    height: 1.25rem;
    padding: 0.65rem;
  }
}

/* Steps: the number in a round patch of the accent, the stations of a route (theme.css draws the dashed route between
   them on a wide screen). With an icon the kit makes the number a small label instead: one lead mark. */
.kit-grid.kit-steps .kit-card__content:not(:has(> .kit-card__body > .kit-icon:first-child)) > .kit-card__eyebrow {
  display: grid;
  place-items: center;
  width: 2.75rem;
  height: 2.75rem;
  margin-bottom: 0.6rem;
  border-radius: 50%;
  background: var(--accent, #e8682a);
  color: var(--on-accent, #1c1209);
  outline: 1.5px dashed color-mix(in srgb, var(--on-accent, #1c1209) 55%, transparent);
  outline-offset: -5px;
  font-family: var(--font-heading, sans-serif);
  font-size: 0.9375rem;
  font-weight: var(--summit-heading-weight, 800);
  letter-spacing: 0;
  line-height: 1;
}

@media (max-width: 639.98px) {
  .kit-grid.kit-steps .kit-card__content:not(:has(> .kit-card__body > .kit-icon:first-child)) > .kit-card__eyebrow {
    width: 2.375rem;
    height: 2.375rem;
    margin: 0;
    font-size: 0.875rem;
  }
}

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

/* A statistic as a reading on a map's margin: the figure heavy and tight, its label in spaced capitals under a short
   dashed rule. The sizes hold "1500 m²" on one line in a row of four on a desktop and two on a phone. */
.kit-stat {
  gap: 0.4rem;
}

.kit-stat__value {
  font-size: clamp(2rem, 1.2rem + 2.6vw, 3.4rem);
  letter-spacing: -0.035em;
  line-height: 1.08;
}

.kit-stat__label {
  padding-top: 0.55rem;
  background: repeating-linear-gradient(90deg, var(--kit-line-strong) 0 0.35rem, transparent 0.35rem 0.6rem) 50% 0 / 2.4rem 1.5px no-repeat;
  font-size: 0.75rem;
  font-weight: var(--summit-body-strong, 600);
  letter-spacing: 0.12em;
  line-height: 1.45;
  text-transform: uppercase;
}

.kit-stack.kit-align--start .kit-stat__label,
.kit-card .kit-stat__label {
  background-position: 0 0;
}

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

.kit-accordion {
  border-top: 2px solid var(--kit-text);
}

.kit-accordion__item {
  border-bottom: 1.5px dashed var(--kit-line-strong);
}

/* The kit's small inline padding stays: the answer under a question starts on the question's own line (faq-rows.test.mjs). */
.kit-accordion__title {
  padding-block: 1.15rem;
  font-family: var(--font-heading, sans-serif);
  font-size: clamp(1.0625rem, 1rem + 0.35vw, 1.25rem);
  font-weight: var(--summit-heading-weight, 800);
  letter-spacing: -0.012em;
  line-height: 1.3;
}

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

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

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

/* A quotation is upright: the font palettes load no slanted letters, and a browser's own slant is a fake. It opens with a
   large mark of the accent's readable shade, the field note's. */
.kit-quote {
  padding-inline-start: 0;
  border-inline-start: 0;
}

.kit-quote__text {
  font-style: normal;
  font-size: clamp(1.0625rem, 1rem + 0.3vw, 1.2rem);
  font-weight: var(--summit-body-strong, 600);
  letter-spacing: -0.005em;
  line-height: 1.5;
}

.kit-quote__text::before {
  content: "\201C";
  display: block;
  height: 0.55em;
  margin-bottom: 0.2em;
  color: var(--kit-accent-text);
  font-size: 2.75em;
  line-height: 1;
}

.kit-quote__author {
  font-weight: var(--summit-body-strong, 600);
}

.kit-list--menu .kit-list-item__title {
  font-weight: var(--summit-body-strong, 600);
}

.kit-list--menu .kit-list-item__meta {
  font-family: var(--font-heading, sans-serif);
  font-weight: var(--summit-heading-weight, 800);
}

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

/* A field's label in normal case: a label is often a whole question ("What would you like to do?"). */
.kit-field__label {
  font-size: 0.875rem;
  font-weight: var(--summit-body-strong, 600);
}

.kit-input {
  min-height: 3rem;
  border-width: 1.5px;
  border-color: color-mix(in srgb, var(--kit-text) 28%, transparent);
  background: var(--kit-surface);
}

.kit-input:focus {
  border-color: var(--kit-text);
}

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

.kit-avatar {
  border-radius: 50%;
}

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