/*
Theme Name: Bean Coffee Objectiv
Description: An editorial storefront for whole-bean coffee, built for WooCommerce.
Version: 2.0.0
Requires at least: 6.6
Requires PHP: 7.4
Text Domain: bean-coffee-objectiv
License: GNU General Public License v2 or later
*/

@font-face {
  font-family: "Barlow Condensed";
  src: url("assets/fonts/barlow-condensed-latin-800-normal.woff2") format("woff2");
  font-weight: 800;
  font-display: swap;
}

@font-face {
  font-family: "DM Sans";
  src: url("assets/fonts/dm-sans-latin-wght-normal.woff2") format("woff2");
  font-weight: 100 1000;
  font-display: swap;
}

:root {
  color-scheme: light;
  --paper: #f9f7ef;
  --ink: #191916;
  --muted: #5e5b52;
  --line: #d8d4c8;
  --field: #fffdf7;
  --yellow: #fae18c;
  --lavender: #e4e1fc;
  --violet: #5140a3;
  --focus: #5540ba;
  --edge: clamp(20px, 5vw, 88px);
  --font-body: "DM Sans", system-ui, sans-serif;
  --font-display: "Barlow Condensed", "Arial Narrow", sans-serif;
  --wp--preset--font-family--system-font: var(--font-body);
}

@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    color-scheme: dark;
    --paper: #201e1a;
    --ink: #f6f1e6;
    --muted: #c4bfb3;
    --line: #504c43;
    --field: #2b2823;
    --focus: #c0b4ff;
  }
}

:root[data-theme="dark"] {
  color-scheme: dark;
  --paper: #201e1a;
  --ink: #f6f1e6;
  --muted: #c4bfb3;
  --line: #504c43;
  --field: #2b2823;
  --focus: #c0b4ff;
}

*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body { margin: 0; color: var(--ink); background: var(--paper); font: 1rem/1.55 var(--font-body); }
img { max-width: 100%; height: auto; }
.bco-responsive-picture { display: contents; }
a { color: inherit; text-underline-offset: .22em; }
button, input, select, textarea { font: inherit; }
button { cursor: pointer; }
button[disabled] { cursor: default; }
[hidden] { display: none !important; }
:focus-visible { outline: 2px solid var(--focus); outline-offset: 4px; }
:where(h1, h2, h3, p, ul) { margin-block: 0; }
:where(h1, h2, h3) { line-height: 1; }

.bco-wrap { width: min(100%, 1640px); padding-inline: var(--edge); margin-inline: auto; }
.screen-reader-text, .bco-skip:not(:focus) { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }
.bco-skip:focus { position: absolute; top: 8px; left: 8px; z-index: 5; padding: 10px 16px; background: var(--paper); }
.bco-banner { display: flex; justify-content: center; align-items: center; gap: 8px; min-height: 32px; padding: 5px 12px; background: #191916; color: #f9f7ef; font-size: .68rem; font-weight: 750; letter-spacing: .155em; text-transform: uppercase; }
.bco-maple { width: 13px; height: 14px; background: #fae18c; clip-path: polygon(50% 0, 61% 29%, 70% 21%, 66% 47%, 88% 35%, 89% 45%, 100% 43%, 91% 64%, 98% 69%, 56% 82%, 55% 100%, 46% 100%, 46% 82%, 3% 69%, 10% 64%, 0 43%, 12% 45%, 13% 35%, 34% 47%, 30% 21%, 40% 29%); }
.bco-header { position: relative; z-index: 2; background: var(--paper); }
.bco-header-inner { display: grid; grid-template-columns: minmax(0, 1fr) auto; align-items: center; min-height: 70px; }
.bco-logo { display: inline-flex; justify-self: start; align-items: center; gap: 9px; min-height: 44px; text-decoration: none; text-transform: uppercase; font-size: .66rem; line-height: .96; font-weight: 900; letter-spacing: .035em; }
.bco-logo strong { display: inline-block; margin-top: 2px; font-size: 1.28rem; font-weight: 1000; letter-spacing: -.055em; }
.bco-bean { display: block; position: relative; overflow: hidden; width: 24px; height: 31px; flex: none; border-radius: 54%; transform: rotate(34deg); background: currentColor; }
.bco-bean::after { content: ""; position: absolute; width: 9px; height: 37px; top: -3px; left: 8px; border-left: 2px solid var(--paper); border-radius: 50%; transform: rotate(15deg); }
.custom-logo-link { display: inline-flex; align-items: center; min-height: 44px; }
.custom-logo { display: block; max-width: 130px; max-height: 46px; width: auto; object-fit: contain; }
.bco-nav { grid-column: 1 / -1; grid-row: 2; }
.bco-nav ul, .bco-footer ul { display: flex; flex-wrap: wrap; gap: 6px 22px; list-style: none; padding: 0; }
.bco-nav a, .bco-footer nav a { display: inline-flex; align-items: center; min-height: 44px; font-size: .88rem; font-weight: 750; text-decoration: none; }
.bco-nav a:hover, .bco-nav .current-menu-item a, .bco-footer nav a:hover { text-decoration: underline; }
.bco-header-actions { grid-column: 2; grid-row: 1; display: flex; align-items: center; gap: 6px; }
.bco-bag { min-height: 44px; display: inline-flex; gap: 8px; align-items: center; text-decoration: none; font-size: .85rem; font-weight: 750; }
.bco-bag:hover { text-decoration: underline; }
.bco-bag-icon { position: relative; width: 15px; height: 14px; border: 1.5px solid currentColor; border-radius: 2px; }
.bco-bag-icon::before { content: ""; position: absolute; width: 7px; height: 6px; top: -6px; left: 2.5px; border: 1.5px solid currentColor; border-bottom: 0; border-radius: 6px 6px 0 0; }
.bco-bag-count { min-width: 22px; height: 22px; padding: 0 4px; display: inline-grid; place-items: center; color: #191916; background: #efebdd; border-radius: 100px; font-size: .7rem; }
.bco-menu-toggle { display: grid; width: 44px; min-height: 44px; place-items: center; padding: 0; border: 0; background: transparent; color: inherit; }
.bco-menu-toggle span[aria-hidden] { width: 17px; height: 8px; border-block: 1.5px solid currentColor; }

.bco-hero { --focus: #422b91; display: grid; color: #191916; background: var(--yellow); }
.bco-hero-content { padding: 44px var(--edge) 38px; align-self: center; }
.bco-kicker { display: flex; align-items: center; gap: 9px; font-size: .72rem; line-height: 1.2; font-weight: 850; letter-spacing: .155em; text-transform: uppercase; }
.bco-kicker span { width: 9px; height: 9px; background: var(--violet); border-radius: 50%; }
.bco-hero .bco-hero-title { margin: 12px 0 20px; font: 800 clamp(3.9rem, 15.5vw, 6.5rem)/.84 var(--font-display); letter-spacing: -.01em; text-transform: uppercase; overflow-wrap: anywhere; }
.bco-period { color: var(--violet); }
.bco-hero-intro { max-width: 32ch; font-size: clamp(1rem, 1.4vw, 1.2rem); line-height: 1.5; }
.bco-button, .bco-content .wp-element-button { display: inline-flex; min-height: 50px; justify-content: space-between; align-items: center; gap: 25px; padding: 11px 16px; border: 1px solid #191916; border-radius: 0; background: #191916; color: #fffdf7; font-size: .92rem; font-weight: 800; text-decoration: none; transition: background .18s ease, color .18s ease; }
.bco-button:hover, .bco-content .wp-element-button:hover { background: var(--violet); border-color: var(--violet); color: #fffdf7; }
.bco-button span { font-size: 1.25rem; line-height: 1; }
.bco-hero .bco-button { margin-top: 23px; }
.bco-hero-art, .bco-story-art { overflow: hidden; min-width: 0; }
.bco-hero-art img, .bco-story-art img { display: block; width: 100%; height: 100%; object-fit: cover; }
.bco-hero-art img { aspect-ratio: 3 / 2; }

.bco-collection { padding-block: clamp(44px, 6vw, 94px); }
.bco-collection-heading { display: flex; flex-wrap: wrap; align-items: end; justify-content: space-between; gap: 16px 25px; margin-bottom: 22px; }
.bco-collection h2, .bco-story h2, .bco-content h1 { font-size: clamp(2.6rem, 5vw, 5rem); font-weight: 900; letter-spacing: -.075em; line-height: .98; }
.bco-collection-heading p { color: var(--muted); margin-top: 10px; }
.bco-filters { display: flex; align-items: center; flex-wrap: wrap; gap: 5px; }
.bco-filters button, .bco-filters a { display: inline-flex; min-height: 44px; align-items: center; justify-content: center; padding: 6px 13px; border: 1px solid var(--line); border-radius: 100px; background: transparent; color: var(--ink); font-size: .8rem; font-weight: 750; white-space: nowrap; text-decoration: none; }
.bco-filters :is(button, a):hover { border-color: var(--ink); }
.bco-filters [aria-pressed="true"], .bco-filters [aria-current="page"] { border-color: var(--ink); background: var(--ink); color: var(--paper); }
.bco-products { display: grid; grid-template-columns: minmax(0, 1fr); gap: 26px 16px; padding: 0; list-style: none; }
.bco-product { border-bottom: 1px solid var(--line); }
.bco-product-link { display: block; height: 100%; text-decoration: none; }
.bco-product-art { position: relative; overflow: hidden; background: var(--lavender); aspect-ratio: 1.25; }
.bco-product-art img { display: block; width: 100%; height: 100%; object-fit: cover; transition: transform .32s ease; }
.bco-product-link:hover .bco-product-art img { transform: scale(1.035); }
.bco-format { position: absolute; left: 13px; top: 13px; padding: 5px 8px; background: #fffaf0; color: #24221d; font-size: .65rem; font-weight: 850; letter-spacing: .115em; text-transform: uppercase; }
.bco-product-info { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 10px; padding: 15px 0 18px; }
.bco-product-meta { margin-bottom: 7px; color: var(--muted); font-size: .69rem; font-weight: 750; letter-spacing: .1em; text-transform: uppercase; }
.bco-product-info h3 { font-size: clamp(1.7rem, 2.5vw, 2.45rem); font-weight: 900; letter-spacing: -.07em; }
.bco-notes { margin-top: 6px; color: var(--muted); font-size: .88rem; }
.bco-product-side { display: flex; flex-direction: column; align-items: end; justify-content: space-between; gap: 8px; }
.bco-price { font-size: .93rem; font-weight: 800; text-align: right; }
.bco-price del { font-weight: 500; }
.bco-price ins { text-decoration: none; }
.bco-product-arrow { display: grid; place-items: center; width: 34px; height: 34px; border: 1px solid var(--line); border-radius: 50%; font-size: 1.15rem; transition: background .18s ease, color .18s ease; }
.bco-product-link:hover .bco-product-arrow { background: var(--ink); color: var(--paper); border-color: var(--ink); }
.bco-all { display: flex; justify-content: center; margin-top: 24px; }
.bco-text-link { display: inline-flex; align-items: center; gap: 13px; min-height: 44px; font-weight: 850; text-decoration-thickness: 1px; }
.bco-text-link:hover { text-decoration-thickness: 2px; }
.bco-empty { border-block: 1px solid var(--line); padding: 25px 0; color: var(--muted); }

.bco-story { --focus: #422b91; display: grid; background: var(--lavender); color: #191916; }
.bco-story-art img { aspect-ratio: 3 / 2; }
.bco-story-content { align-self: center; padding: clamp(36px, 5vw, 88px) var(--edge); }
.bco-story h2 { margin: 13px 0 16px; max-width: 10ch; }
.bco-story-content > p:not(.bco-kicker) { max-width: 36ch; }
.bco-story .bco-text-link { margin-top: 13px; }

.bco-footer { --paper: #191916; --focus: #c0b4ff; padding-top: 38px; background: #191916; color: #f9f7ef; }
.bco-footer-top { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: start; gap: 20px; padding-bottom: 25px; }
.bco-footer-top p { margin-top: 6px; color: #d1cbbd; font-size: .9rem; }
.bco-footer-bottom { min-height: 58px; display: flex; flex-wrap: wrap; justify-content: space-between; align-items: center; gap: 8px 20px; padding-block: 10px; border-top: 1px solid #4c493f; color: #d1cbbd; font-size: .76rem; }
.bco-footer .bco-footer-bottom ul { gap: 0 19px; }
.bco-footer .bco-footer-bottom a { font-size: .76rem; }
.bco-footer [aria-current="page"] { text-decoration: underline; }

.bco-content { min-height: 52vh; padding-block: clamp(35px, 6vw, 86px); }
.bco-content h1 { margin-bottom: 24px; }
.bco-content article + article { margin-top: 32px; }
.bco-content h2:not(.wc-block-components-title) { margin-bottom: .45em; letter-spacing: -.045em; }
.bco-content article > p { margin-block: .9em; }
.bco-content article > :where(h2, h3) { margin-top: 1.2em; }
.bco-content :where(input:not([type="checkbox"]):not([type="radio"]):not([type="hidden"]), select, textarea) { max-width: 100%; border: 1px solid var(--line); border-radius: 0; background: var(--field); color: var(--ink); }
.bco-content :where(.input-text, select, .quantity .qty) { min-height: 42px; padding: 6px 9px; }
.bco-content :where(.woocommerce-breadcrumb, .woocommerce-result-count) { color: var(--muted); }
.bco-shop-filters { margin-block: 16px; }
.woocommerce .bco-content ul.products li.product a img { display: block; aspect-ratio: 1.25; object-fit: cover; background: var(--lavender); }
.woocommerce .bco-content ul.products li.product h2 { font-size: clamp(1.25rem, 2.3vw, 2rem); }
.woocommerce .bco-content ul.products li.product .price, .woocommerce .bco-content div.product p.price, .woocommerce .bco-content div.product span.price { color: var(--ink); font-weight: 800; }
.woocommerce .bco-content div.product .woocommerce-product-details__short-description { margin-block: 12px 20px; color: var(--muted); }
.woocommerce .bco-content div.product div.images img { background: var(--lavender); }
.woocommerce .bco-content button.button, .woocommerce .bco-content a.button, .woocommerce .bco-content input.button, .bco-content .woocommerce button.button, .bco-content .woocommerce a.button { min-height: 44px; display: inline-flex; align-items: center; padding: 10px 15px; border-radius: 0; background: #191916; color: #fffdf7; font: 750 .9rem/1.25 var(--font-body); }
.woocommerce .bco-content button.button:hover, .woocommerce .bco-content a.button:hover, .woocommerce .bco-content input.button:hover, .bco-content .woocommerce button.button:hover, .bco-content .woocommerce a.button:hover { background: var(--violet); color: #fffdf7; }
.bco-content .wc-block-components-button:not(.is-link):not(.wc-block-components-quantity-selector__button) { min-height: 44px; border-radius: 0; background: #191916; color: #fffdf7; font-weight: 800; }
.bco-content .wc-block-components-button:not(.is-link):hover { background: var(--violet); color: #fffdf7; }
.bco-content .wc-block-components-text-input input[type] { background: var(--field); color: var(--ink); }
.bco-content :where(.woocommerce-message, .woocommerce-info, .woocommerce-error) { background: var(--field); color: var(--ink); }
.bco-content .woocommerce-message { border-color: var(--violet); }
.bco-content .woocommerce-message::before { color: var(--focus); }
.bco-content table.shop_table { border-collapse: collapse; }
.bco-content table.shop_table td, .bco-content table.shop_table th { border-color: var(--line); }

@media (max-width: 859px) {
  .bco-nav[data-enhanced]:not(.is-open) { display: none; }
  .bco-nav.is-open { padding: 5px 0 12px; border-top: 1px solid var(--line); }
  .bco-nav.is-open ul { display: grid; gap: 0; }
}

@media (max-width: 679px) {
  .woocommerce .bco-content ul.products[class] { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 20px 12px; }
  .woocommerce .bco-content ul.products[class]::before, .woocommerce .bco-content ul.products[class]::after { display: none; }
  .woocommerce .bco-content ul.products[class] li.product { width: 100%; margin: 0; }
}

@media (min-width: 560px) {
  .bco-products { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

@media (min-width: 680px) {
  .bco-story { grid-template-columns: 1.08fr .92fr; }
}

@media (min-width: 860px) {
  .bco-header-inner { min-height: 76px; grid-template-columns: 1fr auto 1fr; }
  .bco-nav { grid-column: 2; grid-row: 1; }
  .bco-nav ul { justify-content: center; gap: clamp(19px, 3vw, 44px); }
  .bco-header-actions { grid-column: 3; justify-self: end; }
  .bco-menu-toggle { display: none; }
}

@media (min-width: 820px) {
  .bco-hero { grid-template-columns: minmax(0, .9fr) minmax(0, 1.1fr); min-height: clamp(435px, 37.6vw, 650px); }
  .bco-hero-content { padding: 50px 15px 52px max(var(--edge), calc((100vw - 1640px) / 2 + var(--edge))); }
  .bco-hero .bco-hero-title { font-size: clamp(4.75rem, 8.5vw, 10rem); margin-block: 14px 22px; }
  .bco-hero-art img { aspect-ratio: auto; }
  .bco-hero .bco-button { margin-top: 26px; }
  .bco-products { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .bco-collection-heading { margin-bottom: 29px; }
}

@media (min-width: 1180px) {
  .bco-products-expanded { grid-template-columns: repeat(4, minmax(0, 1fr)); }
  .bco-products-expanded .bco-product-info h3 { font-size: clamp(1.55rem, 2.15vw, 2.15rem); }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .bco-button, .bco-product-art img, .bco-product-arrow { transition: none; }
}
