@font-face {
  font-family: Onest;
  src: url("assets/fonts/onest-latin-wght-normal.woff2") format("woff2");
  font-weight: 100 900;
  font-display: swap;
}
@font-face {
  font-family: Onest;
  src: url("assets/fonts/onest-cyrillic-wght-normal.woff2") format("woff2");
  font-weight: 100 900;
  font-display: swap;
  unicode-range: U+0400-045F, U+0490-0491, U+04B0-04B1, U+2116;
}
@font-face {
  font-family: "Cormorant Garamond";
  src: url("assets/fonts/cormorant-garamond-latin-wght-normal.woff2") format("woff2");
  font-weight: 300 700;
  font-display: swap;
}
@font-face {
  font-family: "Cormorant Garamond";
  src: url("assets/fonts/cormorant-garamond-cyrillic-wght-normal.woff2") format("woff2");
  font-weight: 300 700;
  font-display: swap;
  unicode-range: U+0400-045F, U+0490-0491, U+04B0-04B1, U+2116;
}

:root {
  color-scheme: light;
  --forest: #172720;
  --ink: #1d2b24;
  --paper: #f5f2e9;
  --mat: #e8e3d6;
  --sage: #c3cdb3;
  --copper: #945c44;
  --line: #c7c7b9;
  --serif: "Cormorant Garamond", Georgia, serif;
  --sans: Onest, "Segoe UI", sans-serif;
  --ease-out: cubic-bezier(0.23, 1, 0.32, 1);
}

*, *::before, *::after { box-sizing: border-box; }
[hidden] { display: none !important; }
html { scroll-padding-top: 85px; }
body { margin: 0; background: var(--paper); color: var(--ink); font: 16px/1.5 var(--sans); }
button, input { color: inherit; font: inherit; }
button { cursor: pointer; }
a { color: inherit; }
button, a { -webkit-tap-highlight-color: transparent; }
:focus-visible { outline: 2px solid #b66c45; outline-offset: 4px; }
h1, h2, h3, p, figure { margin: 0; }
.wrap { width: min(1280px, calc(100% - clamp(40px, 9vw, 128px))); margin-inline: auto; }
.sr-only, .skip:not(:focus) { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); }
.skip:focus { position: fixed; top: 10px; left: 10px; z-index: 4; background: white; padding: 10px; }
.header { position: sticky; top: 0; z-index: 2; background: var(--paper); border-bottom: 1px solid var(--line); }
.header-inner { min-height: 67px; display: flex; align-items: center; justify-content: space-between; gap: 20px; }
.brand { text-decoration: none; white-space: nowrap; font: 650 31px/1 var(--serif); letter-spacing: -.035em; }
.brand span { margin-left: 6px; color: var(--copper); font: 14px/1 var(--sans); vertical-align: top; }
nav { display: flex; gap: clamp(20px, 4vw, 54px); }
nav a { font-size: 14px; text-decoration: none; }
nav a:hover, .footer a:hover { text-decoration: underline; }
.basket-button { border: 1px solid var(--line); background: transparent; padding: 7px 10px 7px 13px; font-size: 14px; white-space: nowrap; }
.basket-button span { display: inline-grid; min-width: 24px; min-height: 24px; margin-left: 5px; place-content: center; border: 1px solid var(--line); border-radius: 50%; }
.hero { background: var(--forest); color: var(--paper); }
.hero-inner { display: grid; grid-template-columns: minmax(0, .9fr) minmax(0, 1.1fr); align-items: center; gap: clamp(28px, 6vw, 94px); padding-block: clamp(46px, 8vw, 105px); }
.hero-kicker { color: var(--sage); font-size: 14px; letter-spacing: .075em; margin-bottom: 23px; }
h1, h2 { font-family: var(--serif); font-weight: 600; line-height: .9; letter-spacing: -.04em; }
h1 { font-size: clamp(62px, 9.2vw, 136px); }
h1 span { color: var(--sage); }
.hero-intro { max-width: 37ch; margin-block: 27px 30px; color: #e1e4d8; font-size: clamp(15px, 1.5vw, 18px); }
.primary { display: inline-flex; align-items: center; justify-content: space-between; gap: 24px; min-height: 48px; padding: 9px 16px; border: 1px solid var(--forest); background: var(--forest); color: var(--paper); text-decoration: none; font-size: 14px; }
.primary:hover { background: #355144; }
.hero .primary { background: var(--paper); color: var(--forest); }
.hero .primary:hover { background: var(--sage); }
.hero-picture { position: relative; }
.hero-media, .plant-media { position: relative; overflow: hidden; }
.hero-picture img { width: 100%; aspect-ratio: 1.22; display: block; object-fit: cover; background: #2e4538; }
.hero-media canvas, .plant-media canvas { display: block; position: absolute; inset: 0; width: 100%; height: 100%; pointer-events: none; }
.motion-control { position: absolute; right: 12px; bottom: 12px; padding: 6px 12px; color: var(--paper); background: #172720; border: 1px solid #aebca4; border-radius: 20px; font-size: 13px; }
.hero-picture figcaption { display: flex; justify-content: flex-end; gap: .35em; margin-top: 12px; color: var(--sage); font-size: 13px; }
.catalog { padding-block: clamp(50px, 7vw, 92px); }
.catalog-head { display: flex; align-items: end; justify-content: space-between; gap: 16px; margin-bottom: 32px; }
h2 { font-size: clamp(48px, 6vw, 88px); }
.catalog-head p { max-width: 40ch; color: #4c594f; font-size: 15px; }
.tabs { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); margin-bottom: 28px; border-block: 1px solid var(--line); }
.tabs button { display: flex; justify-content: space-between; align-items: baseline; gap: 8px; padding: 15px 14px; border: 0; background: transparent; text-align: left; font-weight: 550; }
.tabs button + button { border-left: 1px solid var(--line); }
.tabs button[aria-pressed=true] { background: var(--mat); box-shadow: inset 0 -3px var(--copper); }
.tabs span, .category-options span { color: #586153; font-size: 13px; }
.catalog-layout { display: grid; grid-template-columns: minmax(145px, .75fr) minmax(0, 3.75fr); gap: clamp(20px, 4vw, 60px); }
.categories h3 { margin: 7px 0 12px; font-size: 14px; font-weight: 600; }
.category-options button { width: 100%; display: flex; justify-content: space-between; align-items: center; gap: 10px; padding: 8px 10px; border: 0; background: transparent; text-align: left; font-size: 14px; }
.category-options button[aria-pressed=true] { background: var(--forest); color: var(--paper); }
.category-options button[aria-pressed=true] span { color: var(--sage); }
.controls, .views { display: flex; }
.controls { gap: 10px; }
.views { flex: 0 0 auto; align-items: stretch; }
.views button { display: grid; min-width: 42px; min-height: 44px; place-items: center; border: 1px solid var(--line); background: transparent; }
.views button + button { border-left: 0; }
.views button[aria-pressed=true] { background: var(--forest); color: var(--paper); }
.grid-icon { width: 14px; height: 14px; background: linear-gradient(currentColor 0 0) 0 0, linear-gradient(currentColor 0 0) 100% 0, linear-gradient(currentColor 0 0) 0 100%, linear-gradient(currentColor 0 0) 100% 100%; background-size: 5px 5px; background-repeat: no-repeat; }
.list-icon { width: 15px; height: 12px; background: repeating-linear-gradient(to bottom, currentColor 0 2px, transparent 2px 5px); }
.search { display: flex; flex: 1; align-items: center; gap: 12px; min-width: 0; border: 1px solid var(--line); padding-inline: 12px; }
.search:focus-within { border-color: var(--copper); }
.search-icon { position: relative; width: 13px; height: 13px; border: 1px solid; border-radius: 50%; }
.search-icon::after { content: ''; position: absolute; width: 5px; background: currentColor; height: 1px; transform: rotate(45deg); right: -4px; bottom: -2px; }
.search input { width: 100%; min-width: 0; min-height: 42px; padding: 0 2px; border: 0; background: transparent; outline: none; }
.result-count { margin-block: 12px 14px; color: #586153; font-size: 14px; }
.products { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 30px clamp(12px, 2vw, 24px); }
.product { display: grid; grid-template-columns: minmax(0, 1fr) auto; grid-template-rows: auto 1fr; min-width: 0; column-gap: 8px; border-bottom: 1px solid var(--line); padding-bottom: 13px; }
.plant-photo { display: block; width: 100%; aspect-ratio: 1.17; padding: 0; border: 0; background: var(--mat); overflow: hidden; }
.product .plant-photo { grid-column: 1 / -1; }
.plant-photo img { width: 100%; height: 100%; object-fit: cover; display: block; }
.product-text { padding-top: 12px; }
.meta { color: #536053; font-size: 13px; }
.product h3 { margin: 2px 0 6px; font: 650 clamp(20px, 2.45vw, 31px)/.99 var(--serif); letter-spacing: -.02em; overflow-wrap: anywhere; }
.price { font-size: 14px; font-weight: 600; }
.add { display: grid; place-items: center; align-self: end; width: 44px; height: 44px; padding: 0; border: 1px solid var(--forest); border-radius: 50%; background: var(--forest); color: var(--paper); }
.plus-icon, .minus-icon { position: relative; display: block; width: 14px; height: 14px; }
.plus-icon::before, .plus-icon::after, .minus-icon::before { content: ''; position: absolute; inset: 6px 0; background: currentColor; border-radius: 1px; }
.plus-icon::after { inset: 0 6px; }
.products.is-list { grid-template-columns: 1fr; gap: 0; }
.is-list .product { grid-template-columns: min(92px, 25%) minmax(0, 1fr) auto; grid-template-rows: auto; align-items: center; gap: 12px; padding-block: 10px; }
.is-list .plant-photo { grid-column: auto; }
.is-list .product-text { padding-top: 0; }
.is-list .add { align-self: center; }
.empty { padding: 25px 0; }
.empty button { margin-top: 10px; border: 0; border-bottom: 1px solid; padding: 0; background: transparent; }
.guide { padding-block: clamp(60px, 9vw, 104px); color: var(--paper); background: var(--forest); }
.guide-inner { display: grid; grid-template-columns: .9fr 1.1fr; gap: 30px; }
.guide details { padding-block: 12px; border-top: 1px solid #56695b; }
.guide details:last-child { border-bottom: 1px solid #56695b; }
.guide summary { cursor: pointer; font: 650 27px/1.35 var(--serif); }
.guide p { max-width: 55ch; margin-top: 10px; color: #d7ddcb; }
.footer { display: flex; align-items: center; justify-content: space-between; flex-wrap: wrap; gap: 10px 25px; padding-block: 24px; font-size: 14px; }
.footer span { font: 650 25px var(--serif); }
dialog { width: min(500px, calc(100% - 30px)); max-height: 88vh; overflow: auto; color: var(--ink); background: var(--paper); padding: 22px; border: 1px solid var(--line); }
dialog::backdrop { background: #121e19b8; }
.dialog-top, .dialog-action { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.dialog-top { margin-bottom: 12px; }
.dialog-action { margin-top: 15px; }
.close { width: 36px; height: 36px; border: 1px solid var(--line); background: transparent; font-size: 24px; line-height: 1; }
.plant-media { margin-bottom: 15px; }
dialog img { width: 100%; aspect-ratio: 1.25; display: block; max-height: 42vh; object-fit: cover; background: var(--mat); }
dialog h2 { font-size: clamp(32px, 5vw, 46px); }
#plant-description { margin-top: 12px; }
.basket-items { list-style: none; padding: 0; margin: 0; }
.basket-items li { display: grid; grid-template-columns: 1fr auto; align-items: center; gap: 12px; padding-block: 10px; border-bottom: 1px solid var(--line); }
.quantity { display: flex; align-items: center; gap: 8px; }
.quantity button { display: grid; place-items: center; padding: 0; border: 1px solid var(--line); background: transparent; width: 32px; height: 32px; }
.basket-total { margin-block: 14px; font-weight: 600; }

@media (hover: hover) and (pointer: fine) {
  .add:hover { background: #355144; }
  .tabs button:hover:not([aria-pressed=true]), .category-options button:hover:not([aria-pressed=true]) { background: #eeece2; }
}

@media (prefers-reduced-motion: no-preference) {
  .add, .primary { transition: transform 140ms var(--ease-out); }
  .add:active, .primary:active { transform: scale(.96); }

  dialog[data-motion] {
    opacity: 0;
    transform: scale(.97);
    transition: opacity 220ms var(--ease-out), transform 220ms var(--ease-out), display 220ms allow-discrete, overlay 220ms allow-discrete;
  }
  dialog[data-motion][open] { opacity: 1; transform: scale(1); }
  @starting-style {
    dialog[data-motion][open] { opacity: 0; transform: scale(.97); }
  }
}

@media (prefers-reduced-motion: no-preference) and (hover: hover) and (pointer: fine) {
  .plant-photo img { transition: transform 240ms var(--ease-out); }
  .plant-photo:hover img { transform: scale(1.035); }
}

@media (max-width: 800px) {
  .catalog-head { display: block; }
  .catalog-head p { margin-top: 12px; }
  .catalog-layout { grid-template-columns: minmax(0, 1fr); gap: 12px; }
  .categories h3 { display: none; }
  .category-options { display: flex; overflow: auto; gap: 7px; padding: 5px 4px 8px; }
  .category-options button { width: auto; white-space: nowrap; border: 1px solid var(--line); }
}
@media (max-width: 580px) {
  html { scroll-padding-top: 65px; }
  .header-inner { min-height: 58px; }
  nav { display: none; }
  .hero-inner, .guide-inner { grid-template-columns: 1fr; }
  .hero-inner { padding-block: 38px; }
  .hero-picture img { aspect-ratio: 1.55; }
  .tabs button { padding: 10px 8px; font-size: 13px; }
  .products { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 20px 12px; }
  .add { width: 40px; height: 40px; }
  .products:not(.is-list) .product { grid-template-columns: minmax(0, 1fr); }
  .products:not(.is-list) .plant-photo { grid-area: 1 / 1; }
  .products:not(.is-list) .add { grid-area: 1 / 1; justify-self: end; z-index: 1; margin: 0 6px 6px 0; }
  .products:not(.is-list) .product-text { grid-area: 2 / 1; }
}
@media (max-width: 470px) {
  .tabs { grid-template-columns: minmax(0, 1fr); }
  .tabs button + button { border-left: 0; border-top: 1px solid var(--line); }
  .tabs button[aria-pressed=true] { box-shadow: inset 3px 0 var(--copper); }
}
