/* Reset, typography and the small components shared by every page. */

*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  -webkit-text-size-adjust: 100%;
  scroll-behavior: smooth;
  /* Anchor jumps (#faq, #brands) would otherwise land under the sticky header. */
  scroll-padding-top: calc(var(--header-h) + 16px);
}

body {
  margin: 0;
  font-family: var(--font);
  font-size: var(--fs-md);
  line-height: 1.55;
  color: var(--c-ink);
  background: var(--c-bg);
  text-rendering: optimizeLegibility;
  -webkit-font-smoothing: antialiased;
}

img,
svg {
  display: block;
  max-width: 100%;
}

/* Without this the width/height attributes (kept against layout shift) win over
   aspect-ratio and stretch every photo to its attribute height. */
img {
  height: auto;
}

/* Component rules like display: grid would otherwise override the attribute and show
   an empty search panel. */
[hidden] {
  display: none !important;
}

h1,
h2,
h3,
h4,
p,
ul,
ol,
dl,
dd,
figure {
  margin: 0;
}

ul[role="list"],
ol[role="list"] {
  padding: 0;
  list-style: none;
}

h1,
h2,
h3 {
  font-weight: 700;
  line-height: 1.12;
  letter-spacing: -0.02em;
  text-wrap: balance;
}

a {
  color: inherit;
  text-decoration-thickness: 1px;
  text-underline-offset: 3px;
}

button,
input,
select {
  font: inherit;
  color: inherit;
}

button {
  cursor: pointer;
}

:focus-visible {
  outline: 2px solid var(--c-action);
  outline-offset: 3px;
}

::selection {
  background: var(--c-brand-tint);
}

.visually-hidden {
  position: absolute !important;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
}

.nowrap {
  white-space: nowrap;
}

.skip-link {
  position: absolute;
  left: var(--gutter);
  top: -100px;
  z-index: 100;
  padding: var(--space-xs) var(--space-md);
  background: var(--c-ink);
  color: var(--c-bg);
  border-radius: var(--radius-sm);
}

.skip-link:focus {
  top: var(--space-xs);
}

.container {
  width: 100%;
  max-width: calc(var(--container) + 2 * var(--gutter));
  margin-inline: auto;
  padding-inline: var(--gutter);
}

.section {
  padding-block: var(--space-2xl);
}

.eyebrow {
  font-size: var(--fs-xs);
  font-weight: 700;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--c-muted);
}

.section-head {
  display: flex;
  flex-wrap: wrap;
  align-items: end;
  justify-content: space-between;
  gap: var(--space-md) var(--space-xl);
  margin-bottom: var(--space-xl);
}

.section-head h2 {
  font-size: var(--fs-2xl);
  margin-top: var(--space-xs);
}

.link-arrow {
  font-weight: 600;
  text-decoration: none;
  white-space: nowrap;
}

.link-arrow::after {
  content: " \2192";
  display: inline-block;
  transition: transform 0.2s var(--ease);
}

.link-arrow:hover::after {
  transform: translateX(4px);
}

/* Buttons */

.btn,
.wp-block-button .wp-block-button__link {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: var(--space-xs);
  min-height: 48px;
  padding: 0 var(--space-lg);
  border: 1px solid transparent;
  border-radius: var(--radius-sm);
  font-size: var(--fs-sm);
  font-weight: 600;
  line-height: 1;
  text-decoration: none;
  white-space: nowrap;
  transition: background-color 0.2s var(--ease), border-color 0.2s var(--ease),
    color 0.2s var(--ease), transform 0.1s var(--ease);
}

.btn:active,
.wp-block-button .wp-block-button__link:active {
  transform: translateY(1px);
}

.btn svg {
  width: 18px;
  height: 18px;
  flex: none;
}

/* The core Button block takes the same look, so hero and CTA buttons edited in the Site
   Editor stay in the design. */
.btn--primary,
.wp-block-button .wp-block-button__link {
  background: var(--c-action);
  color: #fff;
}

.btn--primary:hover,
.wp-block-button .wp-block-button__link:hover {
  background: var(--c-action-hover);
  color: #fff;
}

.btn--ghost,
.wp-block-button.is-style-ghost .wp-block-button__link {
  border-color: var(--c-line);
  background: var(--c-bg);
  color: var(--c-ink);
}

.btn--ghost:hover,
.wp-block-button.is-style-ghost .wp-block-button__link:hover {
  border-color: var(--c-ink);
  background: var(--c-bg);
  color: var(--c-ink);
}

.btn--dark {
  background: var(--c-ink);
  color: #fff;
}

.btn--dark:hover {
  background: var(--c-ink-soft);
}

.btn--sm {
  min-height: 40px;
  padding: 0 var(--space-md);
}

/* The cart control is a link, not a toggle: its state is a class, since aria-pressed means
   nothing on a link. */
.btn.is-added {
  background: var(--c-ink);
  color: #fff;
}

/* Chips: product attributes and search refinements share one look. */

.chip {
  display: inline-flex;
  align-items: center;
  min-height: 26px;
  padding: 0 10px;
  border-radius: 999px;
  background: var(--c-surface);
  font-size: var(--fs-xs);
  font-weight: 600;
  color: var(--c-ink-soft);
  white-space: nowrap;
}

.chip--brand {
  background: var(--c-brand-tint);
  color: var(--c-brand-strong);
}

button.chip {
  min-height: 36px;
  padding: 0 14px;
  border: 1px solid var(--c-line);
  background: var(--c-bg);
  font-size: var(--fs-sm);
  transition: border-color 0.2s var(--ease), background-color 0.2s var(--ease);
}

button.chip:hover {
  border-color: var(--c-action);
  background: var(--c-action-tint);
}

.chips {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-xs);
}

/* Product card: printed by Adaro\Catalog\CardRenderer wherever products are listed. */

.product-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(min(100%, 250px), 1fr));
  gap: var(--space-lg) var(--space-md);
}

.card {
  position: relative;
  display: flex;
  flex-direction: column;
  gap: var(--space-sm);
}

.card__media {
  position: relative;
  overflow: hidden;
  border-radius: var(--radius-md);
  background: var(--c-surface);
}

/* The frame is drawn over the photo: an outline on the container would sit under the
   image. At rest it is a hairline that separates the white-studio photo from the white
   page; on hover it darkens — the one outline language the whole site uses for "live". */
.card__media::after {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: inherit;
  box-shadow: inset 0 0 0 1px var(--c-line);
  pointer-events: none;
  transition: box-shadow 0.25s var(--ease);
}

.card:hover .card__media::after {
  box-shadow: inset 0 0 0 1.5px var(--c-ink);
}

/* The generated frames are 4:3 grid quarters; any other ratio would crop the mirror. */
.card__media img {
  width: 100%;
  aspect-ratio: 4 / 3;
  object-fit: cover;
  transition: transform 0.5s var(--ease);
}

.card:hover .card__media img {
  transform: scale(1.03);
}

.card__meta {
  font-size: var(--fs-xs);
  font-weight: 600;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--c-ink-soft);
}

.card__title {
  font-size: var(--fs-md);
  font-weight: 600;
  line-height: 1.35;
  letter-spacing: 0;
}

.card__title a {
  text-decoration: none;
  background: linear-gradient(currentColor, currentColor) 0 100% / 0 1px no-repeat;
  transition: background-size 0.3s var(--ease);
}

.card:hover .card__title a {
  background-size: 100% 1px;
}

/* Glass type and heating as one line of text: two chips per card made a grid of pills. */
.card__spec {
  font-size: var(--fs-sm);
  color: var(--c-muted);
}

/* The whole card is one link target without nesting the cart button inside an anchor. */
.card__title a::after {
  content: "";
  position: absolute;
  inset: 0;
}

.card__foot {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--space-sm);
  margin-top: auto;
}

.card__price {
  font-size: var(--fs-lg);
  font-weight: 700;
}

.card__cart {
  position: relative;
  z-index: 1;
}

/* With a mouse the cart button stays quiet until its card is hovered; a touch screen has
   no hover, so there it keeps its border and never looks like plain text. */
@media (hover: hover) {
  .card__cart:not(.is-added) {
    border-color: transparent;
  }

  .card:hover .card__cart:not(.is-added) {
    border-color: var(--c-line);
  }

  .card .card__cart:not(.is-added):hover {
    border-color: var(--c-ink);
  }
}

/* Glare: a highlight that follows the pointer over a product photo (glare.js), the way
   light slides across real mirror glass. Screen blending leaves the white studio white and
   lights only the dark glass. Nothing is drawn until the first pointer move. */
/* Core blocks cannot carry data attributes, so the hero photos are marked with a class. */
[data-glare],
.has-glare {
  position: relative;
}

[data-glare]::after,
.has-glare::after {
  content: "";
  position: absolute;
  inset: 0;
  z-index: 1;
  pointer-events: none;
  background: radial-gradient(
    circle at var(--glare-x, 50%) var(--glare-y, 50%),
    rgb(255 255 255 / 0.55),
    rgb(255 255 255 / 0) 32%
  );
  mix-blend-mode: screen;
  opacity: 0;
  transition: opacity 0.35s var(--ease);
}

[data-glare].is-glaring::after,
.has-glare.is-glaring::after {
  opacity: 1;
}

/* Lamp: a blue light behind a logo, lit while the pointer is on it or the keyboard focuses
   it. The element isolates itself, so the light sits under the logo and over whatever is
   behind the element; --lamp-inset sizes it to the logo's shape. */
.has-lamp {
  position: relative;
  isolation: isolate;
}

.has-lamp::before {
  content: "";
  position: absolute;
  inset: var(--lamp-inset, 12%);
  z-index: -1;
  pointer-events: none;
  border-radius: 50%;
  background: radial-gradient(
    closest-side,
    color-mix(in srgb, var(--c-brand) 60%, transparent),
    color-mix(in srgb, var(--c-brand) 22%, transparent) 55%,
    transparent
  );
  filter: blur(8px);
  opacity: 0;
  transform: scale(0.6);
  transition: opacity 0.3s var(--ease), transform 0.3s var(--ease);
}

.has-lamp:hover::before,
.has-lamp:focus-visible::before {
  opacity: 1;
  transform: scale(1);
}

/* Two columns on a phone: one card per screen made the home page 7.7k px tall. */
@media (max-width: 560px) {
  .product-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: var(--space-lg) var(--space-sm);
  }

  .card {
    gap: var(--space-xs);
  }

  .card__title {
    font-size: var(--fs-sm);
  }

  .card__foot {
    flex-direction: column;
    align-items: stretch;
    gap: var(--space-xs);
  }

  .card__price {
    font-size: var(--fs-md);
  }
}

.section--flush-top {
  padding-top: 0;
}

.section--flush-bottom {
  padding-bottom: 0;
}

/* The pointer for a mouse (cursor.js): a dot and a ring that catches up with it. The system
   pointer goes only once the script has put .has-cursor on <html>; a text field keeps its
   caret pointer, and the dot steps aside there. Under forced colours the system pointer
   stays: a blue dot is not what a high-contrast scheme asked for. */
html.has-cursor,
html.has-cursor * {
  cursor: none !important;
}

html.has-cursor :is(input:not([type="submit"], [type="button"], [type="checkbox"], [type="radio"]), textarea, [contenteditable="true"]) {
  cursor: text !important;
}

.cursor-dot,
.cursor-ring {
  position: fixed;
  top: 0;
  left: 0;
  /* Above the header, the filter panel and the cart's popover. */
  z-index: 10000;
  border-radius: 50%;
  pointer-events: none;
  opacity: 0;
  transition: opacity 0.2s;
}

.cursor-dot {
  width: 8px;
  height: 8px;
  margin: -4px 0 0 -4px;
  background: var(--c-action);
}

.cursor-dot.is-over {
  width: 4px;
  height: 4px;
  margin: -2px 0 0 -2px;
}

.cursor-ring {
  width: 36px;
  height: 36px;
  margin: -18px 0 0 -18px;
  border: 1.5px solid var(--c-brand);
  transition: opacity 0.2s, width 0.2s, height 0.2s, margin 0.2s, background-color 0.2s, border-color 0.2s;
}

.cursor-ring.is-over {
  width: 58px;
  height: 58px;
  margin: -29px 0 0 -29px;
  border-color: color-mix(in srgb, var(--c-brand) 55%, transparent);
  background: color-mix(in srgb, var(--c-brand) 12%, transparent);
}

.cursor-ring.is-down {
  width: 26px;
  height: 26px;
  margin: -13px 0 0 -13px;
}

.cursor-dot.is-shown,
.cursor-ring.is-shown {
  opacity: 1;
}

@media (forced-colors: active) {
  html.has-cursor,
  html.has-cursor * {
    cursor: auto !important;
  }

  .cursor-dot,
  .cursor-ring {
    display: none;
  }
}
