/* ==========================================================
   Aminos design tokens and base overrides
   Loaded after the Woodmart stylesheet by the child theme.
   Colour and typography live in Woodmart theme options;
   this file holds what theme options cannot express.
   ========================================================== */

:root {
  /* Palette */
  --aminos-black: #000000;
  --aminos-white: #ffffff;
  --aminos-lab: #f2f2f2;          /* surfaces: tiles, stages, bands */
  --aminos-rule: #d9d9d9;         /* hairlines on white */
  --aminos-mute: #666666;         /* secondary text on white */
  --aminos-dark-rule: #333333;    /* hairlines on black */
  --aminos-dark-mute: #a6a6a6;    /* secondary text on black */

  /* Type */
  --aminos-sans: "Instrument Sans", -apple-system, "Helvetica Neue", Arial, sans-serif;
  --aminos-mono: "IBM Plex Mono", ui-monospace, "SFMono-Regular", Menlo, monospace;

  /* Shape */
  --aminos-r-stage: 20px;         /* stages and feature panels */
  --aminos-r-tile: 12px;          /* cards, tiles, reports */
  --aminos-r-pill: 999px;         /* buttons, chips, fields, tags */
  --aminos-border: 1.5px;

  /* Space */
  --aminos-wrap: 1320px;
  --aminos-gutter: clamp(20px, 4vw, 48px);
  --aminos-section: clamp(88px, 10vw, 152px);

  --aminos-ease: cubic-bezier(.2, .7, .2, 1);
}

/* ----------------------------------------------------------
   Buttons
   Theme options give us the pill shape, black fill and the
   inverted hover. The border is what keeps the hover state
   visible once the background turns white.
   ---------------------------------------------------------- */
.btn,
.button,
button,
input[type="submit"],
.wd-buttons .wd-action-btn > a,
.woocommerce-button {
  border: var(--aminos-border) solid var(--aminos-black);
  transition: background-color .2s, color .2s, border-color .2s;
}

/* Buttons sitting on a black band invert their border too */
.wd-dark .btn,
.wd-dark .button,
.aminos-on-dark .btn,
.aminos-on-dark .button {
  border-color: var(--aminos-white);
}

/* ----------------------------------------------------------
   Data typography
   Batch codes, sequences, masses and axis labels are set in
   the mono face. Woodmart's "secondary font" carries it, and
   this class exposes it to any widget or block.
   ---------------------------------------------------------- */
.aminos-mono,
.aminos-data {
  font-family: var(--aminos-mono);
  font-variant-numeric: tabular-nums;
}

/* Prices and figures align in columns */
.price,
.amount,
.woocommerce-Price-amount {
  font-variant-numeric: tabular-nums;
}

/* ----------------------------------------------------------
   Surfaces
   ---------------------------------------------------------- */
.aminos-stage { background: var(--aminos-lab); border-radius: var(--aminos-r-stage); }
.aminos-tile  { background: var(--aminos-lab); border-radius: var(--aminos-r-tile); }
.aminos-hairline { border-top: 1px solid var(--aminos-rule); }

/* Product image tiles use the lab grey the photography is shot on */
.wd-product .product-image-link,
.wd-product .product-element-top {
  background: var(--aminos-lab);
  border-radius: var(--aminos-r-tile);
  overflow: hidden;
}

/* Product metadata must remain readable at small catalogue sizes. */
.wd-product-cats a {
  color: var(--aminos-mute) !important;
}

.wd-product-cats a:hover,
.wd-product-cats a:focus-visible {
  color: var(--aminos-black) !important;
}

/* ----------------------------------------------------------
   Headings
   Woodmart sets the family and colour; the design also wants
   tight tracking and a short line height on large sizes.
   ---------------------------------------------------------- */
h1, h2, h3,
.title,
.wd-entities-title {
  letter-spacing: -.03em;
}

h1, h2 { line-height: 1.05; }
h3 { line-height: 1.2; letter-spacing: -.015em; }

/* ----------------------------------------------------------
   Forms
   ---------------------------------------------------------- */
input[type="text"],
input[type="email"],
input[type="search"],
input[type="number"],
input[type="tel"],
select,
textarea {
  border-radius: var(--aminos-r-pill);
  border: var(--aminos-border) solid var(--aminos-rule);
}

textarea { border-radius: var(--aminos-r-tile); }

input:focus,
select:focus,
textarea:focus {
  border-color: var(--aminos-black);
  outline: none;
}

/* Keyboard focus remains obvious without adding noise for pointer users. */
:where(a, button, input, select, textarea, [tabindex]):focus-visible {
  outline: 2px solid currentColor;
  outline-offset: 3px;
}

/* WooCommerce's theme grid wins over Elementor's responsive column control. */
@media (max-width: 1024px) {
  .elementor-element-catalogue-products .products,
  .elementor-element-shop-products-grid .products {
    grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
  }
}

@media (max-width: 767px) {
  .elementor-element-catalogue-products .products,
  .elementor-element-shop-products-grid .products {
    grid-template-columns: minmax(0, 1fr) !important;
  }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    scroll-behavior: auto !important;
    animation-duration: .01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: .01ms !important;
  }
}

/* ----------------------------------------------------------
   Research-use notice
   Used by the header notice bar and the product page box.
   ---------------------------------------------------------- */
.aminos-notice {
  background: var(--aminos-lab);
  font-size: 12.5px;
  line-height: 1.4;
}

.aminos-caution {
  border: var(--aminos-border) solid var(--aminos-black);
  border-radius: var(--aminos-r-tile);
  padding: 16px 18px;
  font-size: 13px;
  line-height: 1.55;
}

/* Global typography integration for the shared reference renderer.
   Theme/Elementor heading and body tokens already use these families.
   No layout, content or product-specific styles are changed here. */
body .aminos-reference { font-family: var(--aminos-sans); }
/* WoodMart's quantity controls reset the shared button-family variable. */
body .btn { --btn-font-family: var(--aminos-sans) !important; }
body .aminos-reference :is(.aminos-mono, .aminos-residue-link, .aminos-residue, .aminos-codons li, .aminos-trust-signals span) { font-family: var(--aminos-mono); }
/* WoodMart gives headings an explicit black colour, overriding inherited
   white from dark sections. Limit the correction to known dark surfaces. */
body :is(.aminos-on-dark, .aminos-dark-band, .aminos-single-hero, .aminos-archive-hero, .aminos-hub-hero, .aminos-reference-cta) :is(h1,h2,h3,h4,h5,h6,dt) { color: var(--aminos-white); }

/* Native modal dialog sits in the top layer, above sticky theme headers.
   It reuses the one real navigation rather than cloning links/IDs. */
.aminos-menu-dialog { position: fixed; inset: 0; width: min(440px, calc(100% - 32px)); max-width: none; max-height: calc(100dvh - 32px); margin: auto; padding: 24px; border: 1px solid var(--aminos-rule); border-radius: var(--aminos-stage-radius); background: var(--aminos-white); color: var(--aminos-black); overflow: auto; overscroll-behavior: contain; }
.aminos-shell .aminos-icon-button { padding: 0; min-width: 44px; min-height: 44px; }
.aminos-shell .aminos-icon-button svg { flex-shrink: 0; }
.aminos-menu-dialog:not([open]) { display: none; }
.aminos-menu-dialog::backdrop { background: rgb(0 0 0 / .55); }
.aminos-menu-dialog .aminos-menu-heading { display: flex; align-items: center; justify-content: space-between; gap: 16px; margin-bottom: 12px; }
.aminos-menu-dialog .aminos-menu-heading h2 { font-family: var(--aminos-sans); color: var(--aminos-black); font-size: 24px; line-height: 1.2; }
.aminos-menu-dialog .aminos-menu-close { width: auto; min-width: 72px; min-height: 44px; padding: 8px 12px; border: 1px solid var(--aminos-rule); border-radius: var(--aminos-pill); }
.aminos-menu-dialog .aminos-main-nav { position: static; display: flex; flex-direction: column; align-items: stretch; gap: 0; padding: 0; border: 0; background: transparent; }
.aminos-menu-dialog .aminos-main-nav a { white-space: normal; min-height: 48px; padding: 12px 4px; border-bottom: 1px solid var(--aminos-rule); font-size: 18px; }
.aminos-menu-dialog .aminos-main-nav a::after { display: none; }
html.aminos-menu-open, body.aminos-menu-open { overflow: hidden; }
