/*!
Theme Name: Fernroam Child
Theme URI: https://fernroam.com/
Description: A restrained outdoor storefront presentation for Blocksy and Gutenberg.
Author: Fernroam
Template: blocksy
Version: 0.1.1
Requires at least: 6.7
Requires PHP: 7.4
License: GNU General Public License v2 or later
License URI: https://www.gnu.org/licenses/gpl-2.0.html
Text Domain: fernroam-child
*/

/* Presentation only. Product data, checkout and fulfilment remain with WooCommerce. */
body.fernroam-site {
  --fernroam-base: #f8f7f2;
  --fernroam-ink: #202722;
  --fernroam-muted: #555e57;
  --fernroam-forest: #355846;
  --fernroam-forest-deep: #243d31;
  --fernroam-stone: #e9ece4;
  --fernroam-line: #818c81;
  --theme-palette-color-1: var(--fernroam-forest);
  --theme-palette-color-2: var(--fernroam-forest-deep);
  --theme-palette-color-3: var(--fernroam-muted);
  --theme-palette-color-4: var(--fernroam-ink);
  --theme-palette-color-5: #dde1d9;
  --theme-palette-color-6: #f0f0e8;
  --theme-palette-color-7: var(--fernroam-base);
  --theme-palette-color-8: #fff;
  --theme-text-color: var(--fernroam-ink);
  --theme-headings-color: var(--fernroam-ink);
  --theme-link-initial-color: var(--fernroam-forest);
  --theme-link-hover-color: var(--fernroam-forest-deep);
  --theme-button-background-initial-color: var(--fernroam-forest);
  --theme-button-background-hover-color: var(--fernroam-forest-deep);
  --theme-button-text-initial-color: #fff;
  --theme-button-text-hover-color: #fff;
  --theme-button-border-radius: 3px;
  --theme-button-min-height: 48px;
  --theme-form-field-border-radius: 3px;
  --theme-form-field-height: 48px;
  --theme-form-field-border-initial-color: var(--fernroam-line);
  --theme-form-field-border-focus-color: var(--fernroam-forest);
  background-color: var(--fernroam-base);
  color: var(--fernroam-ink);
}

/* Readable prose and stable touch targets; no JavaScript is required. */
.fernroam-site .entry-content {
  overflow-wrap: anywhere;
}
.fernroam-site .entry-content :where(h1, h2, h3) {
  text-wrap: balance;
}
.fernroam-site .entry-content p {
  text-wrap: pretty;
}
.fernroam-site .entry-content :where(h1, h2) {
  letter-spacing: -0.035em;
}
.fernroam-site .entry-content :where(h3, h4) {
  letter-spacing: -0.02em;
}
.fernroam-site .entry-content :where(p, li) > a:not(.wp-element-button) {
  text-decoration: underline;
  text-decoration-thickness: 1px;
  text-underline-offset: 0.2em;
}
.fernroam-site .wp-block-button__link {
  min-height: 48px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0.85em 1.4em;
  border-radius: 3px;
  line-height: 1.35;
  font-weight: 600;
  text-decoration: none;
}
.fernroam-site :where(a, button, input, select, textarea, summary, [tabindex]):focus-visible {
  outline: 2px solid currentColor;
  outline-offset: 4px;
  box-shadow: 0 0 0 2px var(--fernroam-base);
}
.fernroam-site.home .entry-content > .wp-block-heading:first-of-type {
  font-size: clamp(2.6rem, 6vw, 5.5rem);
  max-width: 14ch;
  line-height: 1.05;
}
.fernroam-site.home .entry-content > p {
  max-width: 60ch;
}
.fernroam-site .wp-block-button__link:hover {
  box-shadow: inset 0 0 0 9999px rgb(0 0 0 / 8%);
}
.fernroam-site .site-title {
  letter-spacing: 0.12em;
}
.fernroam-site .entry-content :where([id]) {
  scroll-margin-block-start: 7rem;
}
.fernroam-site :where(.woocommerce, .wc-block-components-form) :where(input, select, textarea) {
  font-size: max(1rem, 16px);
}
.fernroam-site .woocommerce-product-details__short-description {
  line-height: 1.7;
}
.fernroam-site .woocommerce-product-attributes th {
  text-align: start;
}
.fernroam-site .woocommerce-product-attributes :where(th, td) {
  vertical-align: top;
}
.fernroam-site .woocommerce-product-gallery img {
  /* Do not crop product details, colours or included accessories. */
  object-fit: contain;
}
.fernroam-site .woocommerce :where(.price, .woocommerce-Price-amount) {
  font-variant-numeric: tabular-nums;
}
.fernroam-site .woocommerce-product-attributes p:last-child {
  margin-bottom: 0;
}
@media (max-width: 600px) {
  .fernroam-site .entry-content .wp-block-buttons > .wp-block-button {
    max-width: 100%;
  }
  .fernroam-site .entry-content .wp-block-button__link {
    width: 100%;
    overflow-wrap: anywhere;
  }
}
/* Small movement is limited to the home page and pointer feedback. */
@media (prefers-reduced-motion: no-preference) {
  .fernroam-site.home .entry-content > .wp-block-group:first-child {
    animation: fernroam-arrive 360ms ease-out both;
  }
  .fernroam-site :where(.wp-block-button__link, .button) {
    transition: background-color 180ms ease, color 180ms ease, box-shadow 180ms ease;
  }
  @keyframes fernroam-arrive {
    from { opacity: 0.9; transform: translateY(6px); }
    to { opacity: 1; transform: translateY(0); }
  }
}
@media (prefers-reduced-motion: reduce) {
  .fernroam-site .entry-content > .wp-block-group,
  .fernroam-site :where(.wp-block-button__link, .button) {
    animation: none;
    transition: none;
    scroll-behavior: auto;
  }
}
