/*
Theme Name: Kyoto
Theme URI: https://kyoto.finance
Author: Kyoto Finance
Author URI: https://kyoto.finance
Description: Peace for your financial world. A calm paper-and-ink theme built for the Fire plugin suite: Fire Shop, Fire Pay, Fire Fund, and Fire Gates. Follows the Japanese principle of ma, where emptiness is a material rather than leftover room.
Version: 1.0.0
Requires at least: 6.0
Tested up to: 6.7
Requires PHP: 7.4
License: GPL-2.0-or-later
License URI: https://www.gnu.org/licenses/gpl-2.0.html
Text Domain: kyoto
Tags: e-commerce, one-column, custom-menu, featured-images, block-styles, wide-blocks, translation-ready
*/

/*
 * Paper, ink, one pigment, and the space between.
 *
 * Sections are wide apart, rules are hairlines, corners are nearly square
 * because paper has no radius, and exactly one color is allowed to raise its
 * voice. Fire plugin surfaces are restyled in assets/css/fire-plugins.css,
 * which loads after this file and after the Fire stylesheets.
 */

/* ---------------------------------------------------------------- tokens */

:root {
  /*
   * The three pigments are also kept as raw channels, because every fade,
   * hairline, and wash in this theme is one of them at a low alpha.
   */
  --paper-rgb: 251, 248, 242;
  --sumi-rgb: 29, 25, 22;
  --shu-rgb: 196, 63, 43;

  /* Paper and ink */
  --paper: rgb(var(--paper-rgb));
  --paper-2: #f4ede1;
  --paper-3: #eae0ce;
  --sumi: rgb(var(--sumi-rgb));
  --sumi-2: #574f45;
  --sumi-3: #8b8175;

  /* Pigment. Vermillion is the sun and the only action color. */
  --shu: rgb(var(--shu-rgb));
  --shu-deep: #9e3020;
  --shu-wash: rgba(var(--shu-rgb), 0.07);
  --shu-glow: rgba(var(--shu-rgb), 0.055);
  --matcha: #5f6f51;

  /* Line */
  --line-soft: rgba(var(--sumi-rgb), 0.07);
  --line: rgba(var(--sumi-rgb), 0.13);
  --line-strong: rgba(var(--sumi-rgb), 0.28);

  /* Type */
  --font-display: "Cormorant Garamond", "Iowan Old Style", Georgia, serif;
  --font-body: "Jost", -apple-system, BlinkMacSystemFont, "Helvetica Neue", Arial, sans-serif;
  --font-mono: "JetBrains Mono", ui-monospace, "SF Mono", Menlo, monospace;

  /* Measure and rhythm */
  --container: 1180px;
  --container-narrow: 720px;
  --measure: 64ch;
  --gutter: clamp(20px, 5vw, 48px);
  --section: clamp(72px, 11vw, 160px);
  --section-tight: clamp(48px, 7vw, 96px);

  /* Paper has no rounded corners. Two values are all this theme needs. */
  --radius-sm: 2px;
  --radius-full: 9999px;

  /* Motion. Nothing snaps. */
  --ease: cubic-bezier(0.22, 0.61, 0.36, 1);
  --duration-fast: 140ms;
  --duration-normal: 260ms;
  --duration-slow: 420ms;
  --duration-reveal: 900ms;

  --nav-height: 72px;
}

/* ---------------------------------------------------------------- reset */

*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  -webkit-text-size-adjust: 100%;
  scroll-behavior: smooth;
}

body {
  margin: 0;
  background-color: var(--paper);
  color: var(--sumi);
  font-family: var(--font-body);
  font-size: 16px;
  font-weight: 400;
  line-height: 1.8;
  letter-spacing: 0.005em;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

/*
 * A whisper of grain over everything, so flat color reads as paper rather
 * than screen. Fixed so it does not swim while the page scrolls.
 */
body::before {
  content: "";
  position: fixed;
  inset: 0;
  z-index: 9999;
  pointer-events: none;
  opacity: 0.4;
  mix-blend-mode: multiply;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='200' height='200'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.85' numOctaves='3' stitchTiles='stitch'/%3E%3CfeColorMatrix type='saturate' values='0'/%3E%3C/filter%3E%3Crect width='200' height='200' filter='url(%23n)' opacity='0.09'/%3E%3C/svg%3E");
}

img {
  max-width: 100%;
  height: auto;
  display: block;
}

button,
input,
select,
textarea {
  font: inherit;
  color: inherit;
}

a {
  color: inherit;
  text-decoration: none;
}

:focus-visible {
  outline: 2px solid var(--shu);
  outline-offset: 3px;
}

.k-visually-hidden {
  position: absolute;
  width: 1px;
  height: 1px;
  margin: -1px;
  padding: 0;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
  border: 0;
}

/* ---------------------------------------------------------------- type */

h1,
h2,
h3,
h4 {
  font-family: var(--font-display);
  font-weight: 300;
  line-height: 1.14;
  letter-spacing: -0.015em;
  margin: 0;
}

p {
  margin: 0 0 1.4em;
}

p:last-child {
  margin-bottom: 0;
}

.k-display {
  font-size: clamp(42px, 7vw, 92px);
  line-height: 1.02;
  letter-spacing: -0.025em;
}

.k-title {
  font-size: clamp(30px, 4.2vw, 54px);
  line-height: 1.1;
  letter-spacing: -0.02em;
}

.k-title-sm {
  font-size: clamp(22px, 2.6vw, 30px);
  line-height: 1.2;
}

.k-label {
  font-family: var(--font-body);
  font-size: 11px;
  font-weight: 500;
  letter-spacing: 0.26em;
  text-transform: uppercase;
  color: var(--shu);
  margin: 0 0 clamp(20px, 3vw, 36px);
  display: block;
}

.k-label--quiet {
  color: var(--sumi-3);
}

.k-lede {
  font-size: clamp(17px, 1.45vw, 21px);
  font-weight: 300;
  line-height: 1.75;
  color: var(--sumi-2);
  max-width: var(--measure);
}

.k-body {
  max-width: var(--measure);
  color: var(--sumi-2);
}

.k-small {
  font-size: 13.5px;
  line-height: 1.7;
  color: var(--sumi-3);
}

.k-mono {
  font-family: var(--font-mono);
  font-size: 0.9em;
  letter-spacing: -0.01em;
  font-variant-numeric: tabular-nums;
}

/* ---------------------------------------------------------------- layout */

.k-container {
  width: 100%;
  max-width: var(--container);
  margin-inline: auto;
  padding-inline: var(--gutter);
}

.k-container--narrow {
  max-width: var(--container-narrow);
}

.k-section {
  padding-block: var(--section);
}

.k-section--tight {
  padding-block: var(--section-tight);
}

.k-section--paper {
  background-color: var(--paper-2);
}

/*
 * Off-center by design. Japanese composition rarely centers its subject, so
 * the text column sits left and the empty right side carries the balance.
 */
.k-split {
  display: grid;
  grid-template-columns: minmax(0, 5fr) minmax(0, 6fr);
  gap: clamp(32px, 6vw, 96px);
  align-items: start;
}

.k-split--center {
  align-items: center;
}

/* Rhythm between siblings inside a text block. */
.k-stack > * + * {
  margin-top: clamp(16px, 2vw, 28px);
}

/* The same rhythm applied to a single element that has no stack parent. */
.k-mt {
  margin-top: clamp(16px, 2vw, 28px);
}

.k-mt-lg {
  margin-top: clamp(32px, 5vw, 56px);
}

/* ---------------------------------------------------------------- sun */

/*
 * The rising disc from the header art, redrawn in CSS. A flat circle with a
 * defined edge, not a soft glow: a blurred blob reads as a rendering fault,
 * while a faint but deliberate disc reads as the sun it is quoting.
 */
.k-sun {
  position: absolute;
  border-radius: var(--radius-full);
  background-color: var(--shu-glow);
  pointer-events: none;
  z-index: 0;
}

.k-sun--right {
  width: min(760px, 96vw);
  aspect-ratio: 1 / 1;
  right: -18%;
  top: -26%;
}

.k-sun--left {
  width: min(620px, 90vw);
  aspect-ratio: 1 / 1;
  left: -18%;
  bottom: -34%;
}

.k-has-sun {
  position: relative;
  overflow: hidden;
}

.k-has-sun > .k-container {
  position: relative;
  z-index: 1;
}

/* ---------------------------------------------------------------- nav */

.k-nav {
  position: sticky;
  top: 0;
  z-index: 100;
  background-color: rgba(var(--paper-rgb), 0.86);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border-bottom: 1px solid var(--line-soft);
}

.k-nav__inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  height: var(--nav-height);
}

.k-wordmark {
  display: inline-flex;
  align-items: baseline;
  gap: 9px;
  font-family: var(--font-display);
  font-size: 23px;
  font-weight: 400;
  letter-spacing: 0.01em;
  line-height: 1;
  color: var(--sumi);
}

.k-wordmark__mark {
  width: 9px;
  height: 9px;
  border-radius: var(--radius-full);
  background-color: var(--shu);
  flex: none;
  transform: translateY(-1px);
}

.k-wordmark__thin {
  color: var(--sumi-3);
  font-style: italic;
}

.k-nav__links {
  display: flex;
  align-items: center;
  gap: clamp(18px, 2.4vw, 34px);
  list-style: none;
  margin: 0;
  padding: 0;
}

/*
 * Both selectors are needed: assigned menus get .k-nav__link from the
 * nav_menu_link_attributes filter, while the first-activation fallback is
 * wp_list_pages output, which the theme does not control.
 */
.k-nav__link,
.k-nav__links a {
  position: relative;
  font-size: 13.5px;
  font-weight: 400;
  letter-spacing: 0.04em;
  color: var(--sumi-2);
  padding-block: 6px;
  transition: color var(--duration-normal) var(--ease);
}

.k-nav__link::after,
.k-nav__links a::after {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  height: 1px;
  background-color: var(--shu);
  transform: scaleX(0);
  transform-origin: left;
  transition: transform var(--duration-normal) var(--ease);
}

.k-nav__link:hover,
.k-nav__link.is-current,
.k-nav__links a:hover,
.k-nav__links .current_page_item > a,
.k-nav__links .current-menu-item > a {
  color: var(--sumi);
}

.k-nav__link:hover::after,
.k-nav__link.is-current::after,
.k-nav__links a:hover::after,
.k-nav__links .current_page_item > a::after,
.k-nav__links .current-menu-item > a::after {
  transform: scaleX(1);
}

.k-nav__actions {
  display: flex;
  align-items: center;
  gap: 16px;
}

/*
 * Fire Shop's count badge is position:absolute at top:-6px right:-6px, so it
 * needs a positioned ancestor or it anchors to the viewport and lands in the
 * corner of the page. This is that ancestor.
 */
.k-cart {
  position: relative;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: 13.5px;
  color: var(--sumi-2);
  border: 1px solid var(--line);
  padding: 7px 14px;
  border-radius: var(--radius-sm);
  background: none;
  cursor: pointer;
  transition: border-color var(--duration-normal) var(--ease),
    color var(--duration-normal) var(--ease);
}

.k-cart:hover {
  border-color: var(--line-strong);
  color: var(--sumi);
}

/* Colour and placement live with the plugin overrides, since the element also
   carries Fire Shop's .fire-cart-count and the two must not disagree. */
.k-cart__count {
  font-family: var(--font-mono);
  font-size: 11px;
}

.k-nav__toggle {
  display: none;
  width: 44px;
  height: 44px;
  align-items: center;
  justify-content: center;
  background: none;
  border: 0;
  cursor: pointer;
  padding: 0;
  margin-right: -10px;
}

.k-nav__toggle span,
.k-nav__toggle span::before,
.k-nav__toggle span::after {
  display: block;
  width: 20px;
  height: 1px;
  background-color: var(--sumi);
  transition: transform var(--duration-normal) var(--ease),
    opacity var(--duration-fast) var(--ease);
}

.k-nav__toggle span::before,
.k-nav__toggle span::after {
  content: "";
  position: relative;
}

.k-nav__toggle span::before {
  top: -6px;
}

.k-nav__toggle span::after {
  top: 5px;
}

.k-nav__toggle[aria-expanded="true"] span {
  background-color: transparent;
}

.k-nav__toggle[aria-expanded="true"] span::before {
  transform: translateY(6px) rotate(45deg);
}

.k-nav__toggle[aria-expanded="true"] span::after {
  transform: translateY(-5px) rotate(-45deg);
}

@media (max-width: 880px) {
  .k-nav__toggle {
    display: inline-flex;
  }

  .k-nav__menu {
    position: fixed;
    inset: var(--nav-height) 0 auto 0;
    background-color: var(--paper);
    border-bottom: 1px solid var(--line);
    padding: 8px var(--gutter) 28px;
    display: none;
  }

  .k-nav__menu.is-open {
    display: block;
  }

  .k-nav__links {
    flex-direction: column;
    align-items: stretch;
    gap: 0;
  }

  .k-nav__link,
  .k-nav__links a {
    display: block;
    font-size: 17px;
    padding-block: 15px;
    border-bottom: 1px solid var(--line-soft);
  }

  .k-nav__link::after,
  .k-nav__links a::after {
    display: none;
  }

  /* The cart stays reachable at every width. It is a shop. */
  .k-cart {
    padding: 7px 11px;
  }
}

/* ---------------------------------------------------------------- buttons */

.k-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  font-family: var(--font-body);
  font-size: 13px;
  font-weight: 500;
  letter-spacing: 0.09em;
  text-transform: uppercase;
  padding: 15px 34px;
  min-height: 48px;
  border: 1px solid transparent;
  border-radius: var(--radius-sm);
  background: none;
  cursor: pointer;
  transition: background-color var(--duration-normal) var(--ease),
    border-color var(--duration-normal) var(--ease),
    color var(--duration-normal) var(--ease),
    transform var(--duration-normal) var(--ease);
}

.k-btn--primary {
  background-color: var(--shu);
  color: var(--paper);
}

.k-btn--primary:hover {
  background-color: var(--shu-deep);
}

.k-btn--quiet {
  border-color: var(--line-strong);
  color: var(--sumi);
}

.k-btn--quiet:hover {
  border-color: var(--sumi);
  background-color: rgba(var(--sumi-rgb), 0.03);
}

.k-btn--block {
  width: 100%;
}

.k-btn--sm {
  padding: 10px 20px;
  min-height: 40px;
  font-size: 11.5px;
}

/* A text link with an underline that grows rather than blinks on. */
.k-link {
  position: relative;
  display: inline-block;
  font-size: 14px;
  letter-spacing: 0.05em;
  color: var(--sumi);
  padding-bottom: 3px;
}

.k-link::after {
  content: "";
  position: absolute;
  left: 0;
  bottom: 0;
  width: 100%;
  height: 1px;
  background-color: var(--shu);
  transform: scaleX(0);
  transform-origin: left;
  transition: transform var(--duration-slow) var(--ease);
}

.k-link:hover::after {
  transform: scaleX(1);
}

.k-link--arrow::before {
  content: "";
  display: inline-block;
  width: 22px;
  height: 1px;
  background-color: var(--shu);
  vertical-align: middle;
  margin-right: 12px;
  transition: width var(--duration-slow) var(--ease);
}

.k-link--arrow:hover::before {
  width: 32px;
}

.k-actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: clamp(16px, 3vw, 32px);
}

/* ---------------------------------------------------------------- hero */

.k-hero {
  position: relative;
  background-color: var(--paper-3);
}

.k-hero__frame {
  position: relative;
  overflow: hidden;
  height: clamp(300px, 46vw, 560px);
}

.k-hero__img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: 62% center;
}

/* The art dissolves into the page instead of stopping at an edge. */
.k-hero__fade {
  position: absolute;
  inset: auto 0 -1px 0;
  height: 34%;
  background: linear-gradient(
    to bottom,
    rgba(var(--paper-rgb), 0) 0%,
    rgba(var(--paper-rgb), 0.72) 62%,
    var(--paper) 100%
  );
  pointer-events: none;
}

.k-hero__body {
  padding-top: clamp(40px, 6vw, 88px);
  padding-bottom: var(--section-tight);
  background-color: var(--paper);
}

.k-hero__display {
  max-width: 15ch;
}

.k-hero__meta {
  display: flex;
  flex-wrap: wrap;
  gap: 10px 28px;
  margin-top: clamp(40px, 6vw, 72px);
  padding-top: 26px;
  border-top: 1px solid var(--line);
  font-size: 12px;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--sumi-3);
}

/* ---------------------------------------------------------------- cards */

.k-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
  gap: clamp(28px, 4vw, 56px) clamp(20px, 3vw, 40px);
}

/* A grid that follows a section header needs air, not a hairline's worth. */
.k-split + .k-grid {
  margin-top: clamp(40px, 6vw, 80px);
}

.k-card {
  display: block;
  position: relative;
}

.k-card__link {
  display: block;
}

.k-card__frame {
  position: relative;
  overflow: hidden;
  background-color: var(--paper-2);
  border: 1px solid var(--line-soft);
  aspect-ratio: 1 / 1;
}

.k-card__img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform var(--duration-reveal) var(--ease);
}

.k-card:hover .k-card__img {
  transform: scale(1.035);
}

.k-card__veil {
  position: absolute;
  inset: 0;
  background-color: var(--sumi);
  opacity: 0;
  transition: opacity var(--duration-slow) var(--ease);
}

.k-card:hover .k-card__veil {
  opacity: 0.05;
}

.k-card__body {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 16px;
  margin-top: 20px;
  padding-bottom: 14px;
  border-bottom: 1px solid var(--line-soft);
  transition: border-color var(--duration-slow) var(--ease);
}

.k-card:hover .k-card__body {
  border-color: var(--line-strong);
}

.k-card__name {
  font-family: var(--font-display);
  font-size: 23px;
  font-weight: 400;
  letter-spacing: 0;
  line-height: 1.2;
}

.k-card__price {
  font-family: var(--font-mono);
  font-size: 13px;
  color: var(--sumi-2);
  white-space: nowrap;
  font-variant-numeric: tabular-nums;
}

.k-card__note {
  margin-top: 12px;
  font-size: 12.5px;
  letter-spacing: 0.04em;
  color: var(--sumi-3);
}

/* ---------------------------------------------------------------- product */

.k-product {
  display: grid;
  grid-template-columns: minmax(0, 7fr) minmax(0, 5fr);
  gap: clamp(32px, 6vw, 88px);
  align-items: start;
}

.k-product__media {
  position: sticky;
  top: calc(var(--nav-height) + 32px);
}

.k-product__main {
  border: 1px solid var(--line-soft);
  background-color: var(--paper-2);
}

.k-product__thumbs {
  display: flex;
  gap: 12px;
  margin-top: 12px;
}

.k-thumb {
  width: 72px;
  aspect-ratio: 1 / 1;
  border: 1px solid var(--line);
  background: none;
  padding: 0;
  cursor: pointer;
  overflow: hidden;
  transition: border-color var(--duration-normal) var(--ease);
}

.k-thumb:hover,
.k-thumb.is-active {
  border-color: var(--shu);
}

.k-thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.k-product__price {
  font-family: var(--font-mono);
  font-size: 19px;
  color: var(--sumi);
  font-variant-numeric: tabular-nums;
}

.k-product__form {
  margin-top: clamp(28px, 4vw, 40px);
  padding-top: clamp(28px, 4vw, 40px);
  border-top: 1px solid var(--line);
}

.k-spec {
  list-style: none;
  margin: clamp(28px, 4vw, 40px) 0 0;
  padding: 0;
  border-top: 1px solid var(--line-soft);
}

.k-spec li {
  display: flex;
  justify-content: space-between;
  gap: 24px;
  padding: 13px 0;
  border-bottom: 1px solid var(--line-soft);
  font-size: 13.5px;
}

.k-spec__key {
  color: var(--sumi-3);
  letter-spacing: 0.05em;
}

.k-spec__val {
  color: var(--sumi-2);
  text-align: right;
}

/* ---------------------------------------------------------------- forms */

.k-field {
  display: block;
  margin-bottom: 22px;
}

.k-field__label {
  display: block;
  font-size: 11px;
  font-weight: 500;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--sumi-3);
  margin-bottom: 9px;
}

.k-input,
.k-select,
.k-textarea {
  width: 100%;
  background-color: transparent;
  border: 0;
  border-bottom: 1px solid var(--line);
  border-radius: 0;
  padding: 11px 2px;
  font-size: 15px;
  color: var(--sumi);
  transition: border-color var(--duration-normal) var(--ease);
}

.k-input::placeholder,
.k-textarea::placeholder {
  color: var(--sumi-3);
}

.k-input:focus,
.k-select:focus,
.k-textarea:focus {
  outline: none;
  border-bottom-color: var(--shu);
}

.k-select {
  appearance: none;
  -webkit-appearance: none;
  background-image: linear-gradient(45deg, transparent 50%, var(--sumi-3) 50%),
    linear-gradient(135deg, var(--sumi-3) 50%, transparent 50%);
  background-position: right 8px center, right 3px center;
  background-size: 5px 5px, 5px 5px;
  background-repeat: no-repeat;
  padding-right: 24px;
  cursor: pointer;
}

.k-field-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 22px;
}

.k-qty {
  display: inline-flex;
  align-items: center;
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
}

.k-qty button {
  width: 44px;
  height: 46px;
  background: none;
  border: 0;
  cursor: pointer;
  color: var(--sumi-2);
  font-size: 16px;
  line-height: 1;
  transition: color var(--duration-fast) var(--ease);
}

.k-qty button:hover {
  color: var(--shu);
}

.k-qty__value {
  width: 40px;
  text-align: center;
  font-family: var(--font-mono);
  font-size: 14px;
}

.k-buy {
  display: flex;
  gap: 14px;
  margin-top: 26px;
}

.k-buy .k-btn {
  flex: 1;
}

/* ---------------------------------------------------------------- payment */

/*
 * Shared shell for the plugin payment surfaces: the Fire Pay button, the
 * Fire Fund donation form, the Fire Gates unlock. One visual family so the
 * moment of paying feels identical everywhere on the site.
 */
.k-pay {
  border: 1px solid var(--line);
  background-color: var(--paper);
  padding: clamp(26px, 4vw, 44px);
}

.k-pay--sunk {
  background-color: var(--paper-2);
  border-color: transparent;
}

.k-pay__head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 16px;
  padding-bottom: 18px;
  margin-bottom: 24px;
  border-bottom: 1px solid var(--line-soft);
}

.k-pay__amount {
  font-family: var(--font-mono);
  font-size: 26px;
  font-variant-numeric: tabular-nums;
}

.k-pay__note {
  display: flex;
  align-items: center;
  gap: 9px;
  margin-top: 18px;
  font-size: 12px;
  letter-spacing: 0.03em;
  color: var(--sumi-3);
}

.k-dot {
  width: 5px;
  height: 5px;
  border-radius: var(--radius-full);
  background-color: var(--matcha);
  flex: none;
}

.k-amounts {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(84px, 1fr));
  gap: 10px;
  margin-bottom: 24px;
}

.k-amount {
  padding: 15px 8px;
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  background: none;
  cursor: pointer;
  font-family: var(--font-mono);
  font-size: 14px;
  color: var(--sumi-2);
  transition: border-color var(--duration-normal) var(--ease),
    color var(--duration-normal) var(--ease),
    background-color var(--duration-normal) var(--ease);
}

.k-amount:hover {
  border-color: var(--line-strong);
  color: var(--sumi);
}

.k-amount.is-active {
  border-color: var(--shu);
  background-color: var(--shu-wash);
  color: var(--shu);
}

/* Fire Fund progress. A filling line, not a candy bar. */
.k-meter {
  margin-bottom: 28px;
}

.k-meter__track {
  height: 2px;
  background-color: var(--line);
  overflow: hidden;
}

.k-meter__fill {
  height: 100%;
  background-color: var(--shu);
  transform-origin: left;
  animation: k-fill var(--duration-reveal) var(--ease) both;
}

@keyframes k-fill {
  from {
    transform: scaleX(0);
  }
}

.k-meter__legend {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  margin-top: 14px;
  font-size: 12.5px;
  color: var(--sumi-3);
}

.k-meter__raised {
  font-family: var(--font-mono);
  color: var(--sumi);
}

/* Width utilities for the meter, so no style attribute is needed. */
.k-meter__fill--62 {
  width: 62%;
}

/* Fire Gates. The text fades into paper rather than being chopped off. */
.k-gate {
  position: relative;
}

.k-gate__excerpt {
  position: relative;
  max-height: 260px;
  overflow: hidden;
}

.k-gate__excerpt::after {
  content: "";
  position: absolute;
  inset: auto 0 0 0;
  height: 160px;
  background: linear-gradient(
    to bottom,
    rgba(var(--paper-rgb), 0) 0%,
    var(--paper) 88%
  );
}

.k-gate__panel {
  margin-top: -1px;
  text-align: center;
  border: 1px solid var(--line);
  padding: clamp(32px, 5vw, 52px);
}

.k-gate__panel .k-lede {
  margin-inline: auto;
}

.k-gate__panel .k-actions {
  justify-content: center;
  margin-top: 28px;
}

/* ---------------------------------------------------------------- checkout */

.k-checkout {
  display: grid;
  grid-template-columns: minmax(0, 7fr) minmax(0, 5fr);
  gap: clamp(32px, 6vw, 80px);
  align-items: start;
}

.k-summary {
  position: sticky;
  top: calc(var(--nav-height) + 32px);
  background-color: var(--paper-2);
  padding: clamp(24px, 3.5vw, 36px);
}

.k-summary__line {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding-block: 16px;
  border-bottom: 1px solid var(--line-soft);
}

.k-summary__line .k-method__text {
  flex: 1;
}

.k-summary__thumb {
  width: 56px;
  height: 56px;
  object-fit: cover;
  flex: none;
  border: 1px solid var(--line-soft);
}

.k-summary__name {
  font-family: var(--font-display);
  font-size: 19px;
}

.k-summary__total {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: 16px;
  padding-top: 20px;
  margin-top: 8px;
  border-top: 1px solid var(--line);
}

.k-summary__total .k-pay__amount {
  font-size: 22px;
}

.k-methods {
  display: grid;
  gap: 12px;
  margin-bottom: 8px;
}

.k-method {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 18px 20px;
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  background: none;
  text-align: left;
  cursor: pointer;
  transition: border-color var(--duration-normal) var(--ease),
    background-color var(--duration-normal) var(--ease);
}

.k-method:hover {
  border-color: var(--line-strong);
}

.k-method.is-active {
  border-color: var(--shu);
  background-color: var(--shu-wash);
}

.k-method__radio {
  width: 14px;
  height: 14px;
  border: 1px solid var(--line-strong);
  border-radius: var(--radius-full);
  flex: none;
  position: relative;
  transition: border-color var(--duration-normal) var(--ease);
}

.k-method.is-active .k-method__radio {
  border-color: var(--shu);
}

.k-method.is-active .k-method__radio::after {
  content: "";
  position: absolute;
  inset: 3px;
  border-radius: var(--radius-full);
  background-color: var(--shu);
}

.k-method__text {
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.k-method__name {
  font-size: 15px;
  color: var(--sumi);
}

.k-method__desc {
  font-size: 12.5px;
  color: var(--sumi-3);
  line-height: 1.5;
}

/* ---------------------------------------------------------------- quote */

.k-quote {
  text-align: center;
  max-width: 26ch;
  margin-inline: auto;
  font-family: var(--font-display);
  font-size: clamp(28px, 4vw, 46px);
  font-weight: 300;
  font-style: italic;
  line-height: 1.3;
  letter-spacing: -0.015em;
}

.k-quote__by {
  display: block;
  margin-top: 28px;
  font-family: var(--font-body);
  font-style: normal;
  font-size: 11px;
  font-weight: 500;
  letter-spacing: 0.26em;
  text-transform: uppercase;
  color: var(--sumi-3);
}

/* ---------------------------------------------------------------- footer */

.k-footer {
  border-top: 1px solid var(--line);
  padding-block: clamp(56px, 7vw, 96px) 40px;
  background-color: var(--paper-2);
}

.k-footer__top {
  display: grid;
  grid-template-columns: minmax(0, 2fr) repeat(auto-fit, minmax(150px, 1fr));
  gap: clamp(32px, 5vw, 72px);
}

.k-footer__col h4 {
  font-family: var(--font-body);
  font-size: 11px;
  font-weight: 500;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--sumi-3);
  margin-bottom: 20px;
}

.k-footer__list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  gap: 12px;
}

.k-footer__list a {
  font-size: 14px;
  color: var(--sumi-2);
  transition: color var(--duration-normal) var(--ease);
}

.k-footer__list a:hover {
  color: var(--shu);
}

.k-footer__bottom {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 12px 24px;
  margin-top: clamp(48px, 6vw, 80px);
  padding-top: 26px;
  border-top: 1px solid var(--line);
  font-size: 12px;
  color: var(--sumi-3);
  letter-spacing: 0.04em;
}

/* ---------------------------------------------------------------- reveal */

/*
 * Reveals are an enhancement, never a gate. The hidden state only applies once
 * the script has marked the document, so with JS off or broken the page is
 * simply a page.
 */
.js .k-reveal {
  opacity: 0;
  transform: translateY(18px);
  transition: opacity var(--duration-reveal) var(--ease),
    transform var(--duration-reveal) var(--ease);
}

.js .k-reveal.is-visible {
  opacity: 1;
  transform: none;
}

/* ------------------------------------------------------------- search */

.k-searchform {
  display: flex;
  align-items: flex-end;
  gap: 16px;
  max-width: var(--measure);
}

.k-searchform .k-field {
  flex: 1;
  margin-bottom: 0;
}

/* -------------------------------------------------------- empty state */

.k-empty {
  padding-block: clamp(32px, 5vw, 64px);
  max-width: var(--measure);
}

/* ------------------------------------------------------------ widgets */

.k-widget + .k-widget {
  margin-top: clamp(32px, 4vw, 48px);
}

.k-widget__title {
  font-family: var(--font-body);
  font-size: 11px;
  font-weight: 500;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--sumi-3);
  margin: 0 0 18px;
}

.k-widget ul {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  gap: 12px;
  font-size: 14px;
}

/* -------------------------------------------------------- shop embeds */

/*
 * Fire Shop's product grid is rendered by the plugin. It only needs air
 * above it; the card styling itself lives in assets/css/fire-plugins.css.
 */
.k-shop-embed {
  margin-top: clamp(40px, 6vw, 80px);
}

/* ------------------------------------------------------- entry content */

/*
 * Anything an editor writes in the block editor lands here. It inherits the
 * measure and the rhythm without needing a single class in the post body.
 */
.k-entry {
  max-width: var(--measure);
  color: var(--sumi-2);
}

/* Shop pages lay out their own grid, so the reading measure is dropped. */
.k-entry--wide {
  max-width: none;
}

.k-entry > * + * {
  margin-top: clamp(16px, 2vw, 28px);
}

.k-entry h2 {
  font-size: clamp(26px, 3vw, 38px);
  color: var(--sumi);
  margin-top: clamp(40px, 5vw, 64px);
}

.k-entry h3 {
  font-size: clamp(21px, 2.2vw, 27px);
  color: var(--sumi);
  margin-top: clamp(32px, 4vw, 48px);
}

.k-entry h4 {
  font-size: 19px;
  color: var(--sumi);
}

.k-entry a:not(.k-btn) {
  color: var(--sumi);
  border-bottom: 1px solid var(--shu);
  transition: color var(--duration-normal) var(--ease);
}

.k-entry a:not(.k-btn):hover {
  color: var(--shu);
}

.k-entry ul,
.k-entry ol {
  padding-left: 1.3em;
}

.k-entry li + li {
  margin-top: 8px;
}

.k-entry blockquote {
  margin: clamp(32px, 4vw, 48px) 0;
  padding-left: clamp(20px, 3vw, 32px);
  border-left: 1px solid var(--shu);
  font-family: var(--font-display);
  font-size: clamp(21px, 2.4vw, 28px);
  font-style: italic;
  line-height: 1.4;
  color: var(--sumi);
}

.k-entry blockquote cite {
  display: block;
  margin-top: 16px;
  font-family: var(--font-body);
  font-size: 12px;
  font-style: normal;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--sumi-3);
}

.k-entry code,
.k-entry kbd {
  font-family: var(--font-mono);
  font-size: 0.88em;
  background-color: var(--paper-2);
  padding: 2px 6px;
  border-radius: var(--radius-sm);
}

.k-entry pre {
  font-family: var(--font-mono);
  font-size: 13px;
  line-height: 1.7;
  background-color: var(--paper-2);
  padding: clamp(16px, 2.5vw, 24px);
  border-radius: var(--radius-sm);
  overflow-x: auto;
}

.k-entry pre code {
  background: none;
  padding: 0;
}

.k-entry hr {
  height: 1px;
  border: 0;
  background-color: var(--line);
  margin-block: clamp(40px, 6vw, 72px);
}

.k-entry table {
  width: 100%;
  border-collapse: collapse;
  font-size: 14px;
}

.k-entry th,
.k-entry td {
  text-align: left;
  padding: 12px 0;
  border-bottom: 1px solid var(--line-soft);
}

.k-entry th {
  font-weight: 500;
  color: var(--sumi);
  letter-spacing: 0.04em;
}

.k-entry figure {
  margin: clamp(32px, 4vw, 56px) 0;
}

.k-entry figcaption,
.wp-caption-text,
.gallery-caption {
  margin-top: 12px;
  font-size: 12.5px;
  letter-spacing: 0.03em;
  color: var(--sumi-3);
}

/* ------------------------------------------------------ WordPress core */

/*
 * The class names below are required by WordPress or emitted by the block
 * editor. They are not ours to rename.
 */
.screen-reader-text {
  position: absolute;
  width: 1px;
  height: 1px;
  margin: -1px;
  padding: 0;
  overflow: hidden;
  clip: rect(0 0 0 0);
  clip-path: inset(50%);
  white-space: nowrap;
  border: 0;
}

.screen-reader-text:focus {
  position: fixed;
  top: 16px;
  left: 16px;
  z-index: 100000;
  width: auto;
  height: auto;
  margin: 0;
  padding: 14px 24px;
  clip: auto;
  clip-path: none;
  background-color: var(--paper);
  border: 1px solid var(--sumi);
  font-size: 14px;
  color: var(--sumi);
}

.alignleft {
  float: left;
  margin: 6px clamp(20px, 3vw, 32px) 20px 0;
}

.alignright {
  float: right;
  margin: 6px 0 20px clamp(20px, 3vw, 32px);
}

.aligncenter {
  margin-inline: auto;
}

/* Wide and full escape the measure without escaping the gutter. */
.k-entry .alignwide {
  max-width: var(--container);
  width: calc(100vw - var(--gutter) * 2);
  margin-inline: calc(50% - 50cqw);
}

.k-entry .alignfull {
  max-width: 100vw;
  width: 100vw;
  margin-left: calc(50% - 50vw);
  margin-right: calc(50% - 50vw);
}

.wp-caption {
  max-width: 100%;
}

.sticky .k-card__note::before {
  content: "Pinned";
  color: var(--shu);
  margin-right: 8px;
}

/* WordPress requires this selector to exist even when it styles nothing. */
.bypostauthor {
  display: block;
}

/* The admin bar is 32px tall, 46px on small screens, and is position:fixed. */
.admin-bar .k-nav {
  top: 32px;
}

.admin-bar .k-nav__menu {
  top: calc(var(--nav-height) + 32px);
}

@media screen and (max-width: 782px) {
  .admin-bar .k-nav {
    top: 46px;
  }

  .admin-bar .k-nav__menu {
    top: calc(var(--nav-height) + 46px);
  }
}

/* ---------------------------------------------------------- pagination */

.k-pager {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
  margin-top: clamp(48px, 6vw, 80px);
  padding-top: 28px;
  border-top: 1px solid var(--line);
}

.k-pager .page-numbers {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 40px;
  height: 40px;
  padding-inline: 10px;
  font-size: 13.5px;
  color: var(--sumi-2);
  border: 1px solid transparent;
  border-radius: var(--radius-sm);
  transition: border-color var(--duration-normal) var(--ease),
    color var(--duration-normal) var(--ease);
}

.k-pager .page-numbers:hover {
  border-color: var(--line);
  color: var(--sumi);
}

.k-pager .page-numbers.current {
  border-color: var(--shu);
  color: var(--shu);
}

/* ------------------------------------------------------------- comments */

.k-comments {
  margin-top: clamp(56px, 7vw, 96px);
  padding-top: clamp(40px, 5vw, 64px);
  border-top: 1px solid var(--line);
}

.k-comment-list {
  list-style: none;
  margin: clamp(28px, 4vw, 44px) 0 0;
  padding: 0;
}

.k-comment-list ol {
  list-style: none;
  padding-left: clamp(20px, 4vw, 48px);
}

.k-comment-list li {
  padding-block: 24px;
  border-top: 1px solid var(--line-soft);
}

.k-comment__meta {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  gap: 8px 14px;
  margin-bottom: 12px;
}

.k-comment__author {
  font-family: var(--font-display);
  font-size: 19px;
  color: var(--sumi);
}

.k-comment__date {
  font-size: 12px;
  letter-spacing: 0.04em;
  color: var(--sumi-3);
}

.k-comment__body {
  color: var(--sumi-2);
  font-size: 15px;
}

.comment-respond {
  margin-top: clamp(40px, 5vw, 64px);
}

.comment-reply-title {
  font-family: var(--font-display);
  font-size: clamp(22px, 2.6vw, 30px);
  font-weight: 300;
  margin-bottom: 24px;
}

/* ---------------------------------------------------------------- narrow */

@media (max-width: 900px) {
  .k-split,
  .k-product,
  .k-checkout {
    grid-template-columns: minmax(0, 1fr);
  }

  .k-product__media,
  .k-summary {
    position: static;
  }

  .k-checkout__summary {
    order: -1;
  }
}

@media (max-width: 560px) {
  body {
    font-size: 15.5px;
  }

  .k-grid {
    grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
    gap: 28px 16px;
  }

  .k-card__name {
    font-size: 19px;
  }

  .k-field-row {
    grid-template-columns: 1fr;
    gap: 0;
  }

  .k-buy {
    flex-direction: column;
  }

  .k-hero__img {
    object-position: 68% center;
  }
}

/* ---------------------------------------------------------------- motion */

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }

  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }

  .js .k-reveal {
    opacity: 1;
    transform: none;
  }
}
