/* CulTEAvate jewel palette. Loaded after the layout stylesheet. */
:root {
  --ivory: #fffdf9;
  --paper: #ffffff;
  --chalk: #f8f0f2;
  --sage: #7a3855;
  --forest: #3c2536;
  --muted: #75646e;
  --line: #e3d5dd;
  --blush: #f5e1e7;
  --light-sage: #eee5f1;
  --wine: #63243f;
  --plum: #35213e;
  --rose: #f5e1e7;
  --peach: #f6d5bf;
  --lavender: #eee5f1;
  --coral: #d85e64;
  --gold: #d5af56;
  --emerald: #165746;
  --cobalt: #244c8e;
  --cream-on-dark: #fff7f0;
}

body { background: var(--ivory); color: var(--forest); }
button:focus-visible, a:focus-visible, input:focus-visible, select:focus-visible,
textarea:focus-visible, summary:focus-visible { outline-color: var(--wine); }
.button { border-color: var(--wine); }
.button.primary, .button-primary { background: var(--wine); color: var(--cream-on-dark); }
.button.primary:hover, .button-primary:hover { background: var(--plum); border-color: var(--plum); }
.button.secondary, .button-secondary { color: var(--wine); border-color: var(--wine); }
.button.secondary:hover, .button-secondary:hover { background: var(--rose); }
.text-link, .link-arrow { color: var(--wine); }
.hero-actions .tea-test-button { min-height: 48px; padding: 13px 20px; font-size: 12px; }
.filter-footnote .tea-test-button { width: 100%; min-height: 48px; margin-top: 10px; padding: 12px 9px; gap: 8px; font-size: 12px; letter-spacing: 0; }
@media (max-width: 650px) {
  .filter-panel .filter-footnote { display: block; width: 100%; margin: 0 0 18px; font-size: 11px; }
  .filter-footnote .tea-test-button { width: auto; min-width: 168px; padding-inline: 16px; }
}
.icon-button:hover { background: rgba(99,36,63,.07); }

/* The cream masthead and wine navigation form a deliberate light/dark pair. */
.preview-bar { background: var(--plum); color: var(--cream-on-dark); }
.preview-bar button { color: var(--cream-on-dark); }
.preview-bar button:focus-visible { outline-color: var(--gold); }
.site-header { background: var(--ivory); border-bottom-color: #572239; }
.header-main { background: var(--ivory); }
.header-main .wordmark { color: var(--plum); }
.header-main .wordmark > span:not(.wordmark-dot) { color: var(--wine); }
.header-main .wordmark-dot { color: var(--coral); }
.header-note { color: #75616e; border-left-color: #dfcfd8; }
.bag-count { background: var(--wine); color: var(--cream-on-dark); }
.nav-band { background: var(--wine); color: var(--cream-on-dark); }
.nav-band .primary-nav, .nav-band .primary-nav a { color: var(--cream-on-dark); }
.nav-band .primary-nav a::after { background: var(--gold); }
.nav-band a:focus-visible { outline-color: var(--gold); }

/* The hero remains light and airy; the product imagery supplies the deep hues. */
.hero { background: #f8e9ed; }
.hero::before { background: linear-gradient(90deg, rgba(248,233,237,.68) 0%, rgba(248,233,237,.43) 30%, rgba(248,233,237,.04) 58%, transparent 72%); }
.hero-copy h1 { color: var(--plum); }
.hero-copy h1 em { color: var(--wine); }
.hero-copy .eyebrow { color: var(--wine); }
.hero-copy > p:not(.eyebrow) { color: #6a3d53; }
.hero-copy > p.hero-footnote { color: #75495f; }
.section-heading .eyebrow, .title-row .eyebrow { color: var(--wine); }
.section.featured-section { background: #faedf1; }
.section.featured-section h2 { color: var(--wine); }
.category-copy .link-arrow { color: var(--wine); }

/* Product-specific jewel colors are set by the catalogue, with darkened text. */
.product-card { --readable-product-accent: var(--wine); }
@supports (color: color-mix(in srgb, red, black)) {
  .product-card { --readable-product-accent: color-mix(in srgb, var(--product-accent, var(--wine)) 45%, var(--plum) 55%); }
}
.product-image { background: var(--paper); }
.product-image-button:focus-visible { outline: 2px solid var(--wine); outline-offset: -4px; }
.product-photo-price {
  position: absolute;
  right: 12px;
  bottom: 12px;
  z-index: 2;
  padding: 8px 12px;
  background: transparent;
  color: var(--wine);
  border: 0;
  box-shadow: none;
  font-size: 13px;
  line-height: 1.2;
  font-weight: 500;
  pointer-events: none;
}
@media (max-width: 650px) {
  .product-photo-price { right: 9px; bottom: 9px; padding: 7px 10px; font-size: 12px; }
}
.product-badge { color: var(--readable-product-accent); background: rgba(255,253,249,.96); }
.product-meta { border-top: 2px solid var(--product-accent, var(--wine)); }
.product-name:hover { color: var(--readable-product-accent); }
.product-bottom > span:first-child { color: var(--readable-product-accent); font-weight: 500; }
.product-topline, .product-notes, .sample-price-label { color: #78636f; }
.product-image .quick-add { color: var(--readable-product-accent); border-color: var(--readable-product-accent); background: var(--ivory); }
.product-image .quick-add:hover { color: var(--cream-on-dark); border-color: var(--readable-product-accent); background: var(--readable-product-accent); }

/* One deep feature anchors a sequence of bright shopping sections. */
.story-feature { background: var(--wine); color: var(--cream-on-dark); }
.story-copy h2, .article-story .article-copy h2 { color: var(--cream-on-dark); }
.story-copy .eyebrow { color: #efd99f; }
.story-copy > p:not(.eyebrow), .article-story .article-copy p { color: #f1dce5; }
.story-copy .text-link, .article-story .text-link { color: var(--cream-on-dark); border-color: #c89eb0; }
.story-copy a:focus-visible, .article-story a:focus-visible { outline-color: var(--gold); }
.story-points, .story-points li { border-color: #956076; }
.story-points li span:last-child { color: #f1dce5; }
.tea-finder { background: var(--lavender); }
.finder-copy h2 { color: var(--plum); }
.finder-copy p:last-child, .finder-actions > span { color: #6b536e; }
.gift-banner, .gift-copy { background: var(--peach); }
.gift-banner-image { background: #fcf3ed; }
.gift-copy h2, .gift-copy .eyebrow { color: var(--wine); }
.gift-copy > p:not(.eyebrow) { color: #6d4051; }
.editorial-card { border-top-color: #dac6d2; }
.step-number { color: var(--wine); }
.editorial-card h3 { color: var(--plum); }

/* Collection, articles, and overlays stay bright for practical reading. */
.collection-hero { border-bottom-color: var(--line); }
.collection-hero h1, .article-hero h1 { color: var(--wine); }
.collection-hero p.concept-note, .concept-note { background: #f5edf3; color: #6b5565; }
.collection-toolbar, .collection-result-line, .filter-footnote { color: #75646e; }
a.filter-option { color: #7a6672; }
a.filter-option.active, a.filter-option:hover { color: var(--wine); }
a.filter-option > span { color: #6c5764; }
.filter-option input { accent-color: var(--wine); }
.catalog-search-label input, .sort-select { border-bottom-color: #cdb8c7; }
.chip-button:hover, .chip-button.active, .chip-button[aria-pressed="true"] { background: var(--wine); border-color: var(--wine); color: var(--cream-on-dark); }
.article-panel { background: var(--lavender); }
.article-panel:nth-child(2) { background: #fbeae0; }
.article-panel:nth-child(3) { background: var(--rose); }
.article-panel h2, .article-panel h3 { color: var(--wine); }
.article-panel p, .article-copy > p { color: #6c5764; }
.article-story .article-copy > p { color: #f1dce5; }
.brew-table thead { background: var(--lavender); }
.brew-table th, .brew-table td { border-bottom-color: var(--line); }
.brew-table .text-link { color: var(--wine); }
dialog { background: var(--ivory); color: var(--forest); box-shadow: 0 20px 100px rgba(53,33,62,.2); }
dialog::backdrop { background: rgba(53,33,62,.42); }
.dialog-close { background: rgba(255,253,249,.93); }
.product-detail-image { background: #faf1f4; }
.product-detail-copy > p, .product-detail-weight, .product-detail-description { color: #6c5764; }
.product-detail-copy h2, .dialog-heading h2, .info-dialog h2, .quiz-dialog h2 { color: var(--wine); }
.product-detail-copy .price { color: var(--wine); }
.flavor-tags span { background: var(--rose); color: var(--wine); }
.detail-facts p > strong { color: var(--forest); }
.quantity-control { border-color: #cdb8c7; }
.quantity-control button:hover { background: var(--lavender); }
.remove-button { border-bottom-color: #b99caf; }
.gift-note textarea { border-color: var(--line); background: var(--paper); }
.search-field { border-bottom-color: var(--wine); }
.search-result > span:nth-child(2) > strong { color: var(--wine); }
.quiz-choice { border-color: #d7c6d3; background: #fffcf9; }
.quiz-choice:hover { border-color: var(--wine); background: var(--rose); }
.quiz-choice .quiz-symbol, .quiz-choice strong { color: var(--wine); }
.quiz-choice span, .quiz-choice p { color: #6c5764; }
.gift-note > span { color: #6c5764; font-size: 10px; }
.quiz-result > div > strong { color: var(--wine); }
.toast { background: var(--wine); color: var(--cream-on-dark); box-shadow: 0 6px 25px rgba(53,33,62,.17); }

/* A deep plum footer closes the page without darkening the shopping canvas. */
.site-footer { --muted: #ddcddd; --line: #68516d; background: var(--plum); color: var(--cream-on-dark); border-top-color: var(--plum); }
.site-footer .wordmark, .site-footer .wordmark > span:not(.wordmark-dot) { color: var(--cream-on-dark); }
.site-footer .wordmark-dot { color: var(--gold); }
.site-footer .eyebrow { color: #efd99f; }
.footer-top > div:first-child > p, .footer-small { color: #ddcddd; }
.footer-links a, .footer-links button, .footer-links .text-link { color: var(--cream-on-dark); }
.footer-bottom { color: #ddcddd; border-top-color: #68516d; }
.footer-bottom button { color: #ddcddd; }
.site-footer a:focus-visible, .site-footer button:focus-visible { outline-color: var(--gold); }

@media (max-width: 650px) {
  .nav-band .primary-nav { border-top-color: #975f76; }
  .nav-band .nav-story { border-top-color: #975f76; }
  .hero { display: flex; flex-direction: column; min-height: 0; align-items: stretch; }
  .hero::before { display: none; }
  .hero-image { position: relative; inset: auto; order: 2; z-index: auto; width: 100%; height: clamp(265px,80vw,330px); object-fit: cover; object-position: right center; }
  .hero-copy { order: 1; width: calc(100% - 36px); max-width: 390px; margin-inline: auto; padding: 35px 0 25px; }
  .hero-copy > p:not(.eyebrow) { max-width: none; }
  .hero-copy > p.hero-footnote { color: #75495f; }
  .product-detail-image img { object-fit: contain; }
}

/* Compact spacing where the homepage changes background color. */
#main:has(> .hero) > .section { padding-block: 40px; }
#main:has(> .hero) > .tea-types { padding-block: 24px 18px; }
#main:has(> .hero) > [aria-labelledby="ways-title"] { padding-top: 32px; }
#main:has(> .hero) .section-heading,
#main:has(> .hero) .title-row { margin-bottom: 24px; }
#main:has(> .hero) .section-heading > :last-child { margin-bottom: 0; }
#main:has(> .hero) .product-notes { margin-bottom: 0; }
#main:has(> .hero) > .section.featured-section { padding-block: 40px; margin-bottom: 28px; }
#main:has(> .hero) > .tea-finder { margin-top: 28px; }
#main:has(> .hero) .finder-inner { padding-block: 28px; }
#main:has(> .hero) .center-action { margin-top: 24px; }
#main:has(> .hero) .editorial-card > p:last-child { margin-bottom: 0; }
#main:has(> .hero) + .site-footer .footer-top { padding-block: 36px; }

@media (max-width: 650px) {
  #main:has(> .hero) > .section { padding-block: 28px; }
  #main:has(> .hero) > .tea-types { padding-block: 22px 16px; }
  #main:has(> .hero) > [aria-labelledby="ways-title"] { padding-top: 24px; }
  #main:has(> .hero) .section-heading,
  #main:has(> .hero) .title-row { margin-bottom: 20px; }
  #main:has(> .hero) > .section.featured-section { padding-block: 28px; margin-bottom: 20px; }
  #main:has(> .hero) > .tea-finder { margin-top: 20px; }
  #main:has(> .hero) .finder-inner { padding-block: 24px; }
  #main:has(> .hero) + .site-footer .footer-top { padding-block: 28px; }
}

/* Phone proportions: keep three-item collections together as a swipe row. */
@media (max-width: 650px) {
  .hero-copy h1 { font-size: clamp(42px, 11.7vw, 50px); line-height: 1.02; }
  .hero-copy { padding-block: 28px 24px; }
  .hero-copy > p:not(.eyebrow) { font-size: 13px; line-height: 1.7; margin-bottom: 22px; }
  .hero-actions { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; align-items: stretch; }
  .hero-actions .button, .hero-actions .tea-test-button {
    min-height: 48px; margin: 0; padding: 11px 10px; font-size: 11px; line-height: 1.4;
    justify-content: center; gap: 7px; text-align: center;
  }
  .hero-image { height: clamp(240px, 70vw, 300px); }
  #main > [aria-labelledby="ways-title"] .category-grid,
  #main > [aria-labelledby="leaf-title"] .tea-three-grid {
    display: grid; grid-template-columns: none; grid-auto-flow: column;
    grid-auto-columns: clamp(230px, 76vw, 300px); align-items: start;
    gap: 14px; overflow-x: auto; overscroll-behavior-inline: contain;
    scroll-snap-type: x mandatory; scroll-padding-inline: 5px;
    margin-inline: -5px; padding: 5px 5px 14px;
    scrollbar-width: thin; scrollbar-color: #c0a7b3 transparent;
    -webkit-overflow-scrolling: touch;
  }
  #main > [aria-labelledby="ways-title"] .category-grid::-webkit-scrollbar,
  #main > [aria-labelledby="leaf-title"] .tea-three-grid::-webkit-scrollbar { height: 3px; }
  #main > [aria-labelledby="ways-title"] .category-grid::-webkit-scrollbar-thumb,
  #main > [aria-labelledby="leaf-title"] .tea-three-grid::-webkit-scrollbar-thumb { background: #c0a7b3; border-radius: 2px; }
  #main > [aria-labelledby="ways-title"] .category-card,
  #main > [aria-labelledby="leaf-title"] .product-card { min-width: 0; scroll-snap-align: start; }
  #main > [aria-labelledby="ways-title"] .category-card:focus-visible { outline-offset: -3px; }
  #main > [aria-labelledby="ways-title"] .category-grid:focus-visible,
  #main > [aria-labelledby="leaf-title"] .tea-three-grid:focus-visible { outline: 2px solid var(--wine); outline-offset: 3px; }
  #main > [aria-labelledby="ways-title"] .category-image img { aspect-ratio: 1.12; object-fit: cover; }
  #main > [aria-labelledby="ways-title"] .category-copy { padding-top: 12px; }
  #main > [aria-labelledby="ways-title"] .category-copy h3 { font-size: 27px; line-height: 1.1; }
  #main > [aria-labelledby="ways-title"] .category-copy p { font-size: 12px; line-height: 1.5; }
  #main > [aria-labelledby="leaf-title"] .product-name { font-size: 27px; line-height: 1.12; margin-bottom: 4px; }
  #main > [aria-labelledby="leaf-title"] .product-name button { min-height: 44px; text-align: left; }
  #main > [aria-labelledby="leaf-title"] .product-notes { font-size: 12px; line-height: 1.6; }
  #main > [aria-labelledby="ways-title"] .section-heading h2,
  #main > [aria-labelledby="leaf-title"] .title-row h2 { font-size: clamp(31px, 8.5vw, 37px); line-height: 1.08; }
  .featured-section .title-row { align-items: flex-start; flex-direction: column; gap: 12px; }
  .featured-section .title-row .text-link { font-size: 12px; }
  .product-grid:not(.tea-three-grid) .product-name { font-size: clamp(21px, 5.4vw, 24px); line-height: 1.13; }
  .product-grid:not(.tea-three-grid) .product-name button { min-height: 44px; text-align: left; }
  .product-grid:not(.tea-three-grid) .product-notes { font-size: 11px; line-height: 1.6; }
  .story-copy { padding: 28px 22px 30px; }
  .story-copy h2 { font-size: clamp(33px, 9vw, 40px); line-height: 1.08; }
  .story-copy > p:not(.eyebrow), .gift-copy > p:not(.eyebrow) { font-size: 13px; line-height: 1.75; }
  .gift-copy h2 { font-size: clamp(35px, 9.5vw, 43px); }
  .filter-panel .filter-option { font-size: 12px; min-height: 34px; margin-bottom: 4px; gap: 8px; }
  .collection-toolbar { flex-wrap: wrap; gap: 12px; }
  .collection-toolbar .catalog-search-label { flex: 1 1 100%; width: 100%; }
  .collection-toolbar #catalog-search { width: 100%; min-height: 46px; font-size: 16px; padding: 10px 12px; }
  .collection-toolbar .sort-label { justify-content: flex-end; width: 100%; font-size: 12px; }
  .collection-toolbar .sort-select { min-height: 44px; max-width: none; font-size: 13px; padding: 9px 28px 9px 10px; }
  .collection-result-line { font-size: 11px; }
  .filter-panel .filter-footnote { font-size: 12px; }
}
@media (max-width: 359px) {
  .hero-actions { grid-template-columns: 1fr; }
}
