/* Flyberry · shared styles. Every value comes from tokens.css.
   Page-only styles live in css/<page>.css. */

.wrap { max-width: var(--max); margin: 0 auto; padding: 0 var(--gutter); }
.section { padding: var(--s9) 0; }
.section + .section { padding-top: 0; }
.hide { display: none !important; }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }

.skip { position: absolute; left: var(--s4); top: -60px; z-index: 100; background: var(--ink); color: var(--oat); padding: var(--s2) var(--s4); border-radius: var(--radius); }
.skip:focus { top: var(--s3); }

/* ---- type helpers ---- */
h1, h2, h3, h4 { margin: 0; font-weight: 400; }
.h1 { font: 400 var(--t-3xl)/1.02 var(--serif); letter-spacing: -.02em; font-variation-settings: 'SOFT' 50; }
.h2 { font: 400 var(--t-2xl)/1.08 var(--serif); letter-spacing: -.01em; font-variation-settings: 'SOFT' 50; }
.h3 { font: 400 var(--t-xl)/1.2 var(--serif); font-variation-settings: 'SOFT' 50; }
.lead { font: 400 var(--t-lg)/1.5 var(--serif); color: var(--ink-2); max-width: 40ch; }
.muted { color: var(--ink-2); }
.fine { font-size: var(--t-xs); color: var(--ink-3); }

.sec-head { display: flex; align-items: flex-end; justify-content: space-between; gap: var(--s5); margin-bottom: var(--s7); }
.sec-head .eyebrow { margin-bottom: var(--s3); }
.sec-head p.muted { max-width: 46ch; margin: var(--s3) 0 0; }

/* ---- links & buttons ---- */
.pill, .btn { /* .pill kept as the shared small button name used across pages */
  display: inline-flex; align-items: center; justify-content: center; gap: var(--s2); min-height: 40px; padding: 0 var(--s4);
  border-radius: 999px; border: 1px solid var(--ink); background: transparent; color: var(--ink);
  font: 500 var(--t-sm)/1 var(--sans); text-decoration: none; cursor: pointer; white-space: nowrap;
  transition: background var(--d-fast) var(--ease), color var(--d-fast) var(--ease), border-color var(--d-fast) var(--ease);
}
.pill:hover, .btn:hover { background: var(--ink); color: var(--oat); }
.pill.solid, .btn-primary { background: var(--ameri); border-color: var(--ameri); color: #fff; }
.pill.solid:hover, .btn-primary:hover { background: var(--ameri-deep); border-color: var(--ameri-deep); color: #fff; }
.pill.ink { background: var(--ink); color: var(--oat); }
.pill.ink:hover { background: var(--walnut); border-color: var(--walnut); }
.pill:disabled, .btn:disabled { opacity: .4; cursor: default; }
.link { color: var(--ink); text-decoration: underline; text-decoration-color: var(--travertine); text-underline-offset: 4px; font-weight: 500; }
.link:hover { text-decoration-color: var(--ink); }

.arrows { display: flex; gap: var(--s2); }
.arrows button {
  width: 44px; height: 44px; border-radius: 50%; border: 1px solid var(--travertine); background: var(--bone);
  font: 400 18px/1 var(--sans); color: var(--ink); cursor: pointer; transition: border-color var(--d-fast) var(--ease);
}
.arrows button:hover:not(:disabled) { border-color: var(--ink); }
.arrows button:disabled { opacity: .35; cursor: default; }

/* ---- header ---- */
.nav {
  position: sticky; top: 0; z-index: 40; height: 68px; display: flex; align-items: center; gap: var(--s6);
  padding: 0 var(--gutter); background: transparent; border-bottom: 1px solid transparent;
  transition: background var(--d) var(--ease), border-color var(--d) var(--ease);
}
.nav.solid { background: rgba(243, 238, 229, .92); backdrop-filter: saturate(1.1) blur(12px); -webkit-backdrop-filter: saturate(1.1) blur(12px); border-bottom-color: var(--travertine); }
.logo { display: block; flex: none; }
.logo img { width: 104px; height: auto; }
.tabs { display: flex; gap: var(--s5); }
.tabs a { position: relative; text-decoration: none; font-size: var(--t-sm); font-weight: 500; color: var(--ink-2); padding: var(--s2) 0; transition: color var(--d-fast) var(--ease); }
.tabs a:hover, .tabs a[aria-current="page"] { color: var(--ink); }
.tabs a[aria-current="page"]::after { content: ''; position: absolute; left: 0; right: 0; bottom: 2px; height: 1px; background: var(--ink); }
.nav-end { margin-left: auto; display: flex; align-items: center; gap: var(--s5); }
.nav-acc { font-size: var(--t-sm); font-weight: 500; text-decoration: none; color: var(--ink-2); }
.nav-acc:hover { color: var(--ink); }
.nav-cart {
  display: inline-flex; align-items: center; gap: var(--s2); min-height: 38px; padding: 0 var(--s2) 0 var(--s4);
  border-radius: 999px; border: 1px solid var(--ink); text-decoration: none; font-size: var(--t-sm); font-weight: 500;
}
.nav-cart b { min-width: 24px; height: 24px; padding: 0 6px; border-radius: 999px; background: var(--ink); color: var(--oat); display: grid; place-items: center; font-size: var(--t-xs); font-weight: 600; }
.nav-cart:hover b { background: var(--ameri); }
.menu-btn { display: none; width: 44px; height: 44px; border: 0; background: none; cursor: pointer; position: relative; }
.menu-btn span, .menu-btn span::before { position: absolute; left: 11px; right: 11px; height: 1.5px; background: var(--ink); content: ''; }
.menu-btn span { top: 18px; }
.menu-btn span::before { left: 0; right: 0; top: 7px; }

/* ---- phone menu ---- */
.drawer { position: fixed; inset: 0; z-index: 60; background: var(--oat); display: flex; flex-direction: column; visibility: hidden; opacity: 0; transform: translateY(-8px); transition: opacity var(--d) var(--ease), transform var(--d) var(--ease), visibility 0s linear var(--d); }
.drawer.open { visibility: visible; opacity: 1; transform: none; transition-delay: 0s; }
.dr-bar { height: 68px; display: flex; align-items: center; justify-content: space-between; padding: 0 var(--gutter); border-bottom: var(--hair); flex: none; }
.dr-close { width: 44px; height: 44px; border: 0; background: none; cursor: pointer; }
.dr-close svg { width: 22px; height: 22px; stroke: var(--ink); stroke-width: 1.5; fill: none; }
.dr-scroll { overflow-y: auto; padding: var(--s5) var(--gutter) var(--s8); }
.dr-cats { list-style: none; margin: var(--s3) 0 var(--s6); padding: 0; }
.dr-cats a { display: flex; align-items: center; gap: var(--s4); padding: var(--s2) 0; text-decoration: none; font: 400 var(--t-lg)/1.2 var(--serif); }
.dr-cats img { width: 52px; height: 52px; object-fit: contain; background: var(--bone); border-radius: var(--radius); padding: 4px; mix-blend-mode: multiply; }
.dr-links { list-style: none; margin: 0; padding: var(--s4) 0 0; border-top: var(--hair); columns: 2; }
.dr-links a { display: block; padding: var(--s2) 0; text-decoration: none; font-weight: 500; }
.dr-foot { margin: var(--s6) 0 0; font-size: var(--t-xs); color: var(--ink-3); }

/* ---- product cards: the pack standing on a shelf in daylight ---- */
.art {
  position: relative; display: flex; align-items: flex-end; justify-content: center; aspect-ratio: 4 / 5; overflow: hidden;
  padding: 12% 14% 22%; border-radius: var(--radius-lg); text-decoration: none;
  background: linear-gradient(180deg, var(--bone) 0 78%, var(--linen) 78% 100%);
}
.art::after { /* contact shadow on the shelf */
  content: ''; position: absolute; left: 16%; right: 16%; bottom: calc(22% - 9px); height: 18px; background: var(--contact); pointer-events: none;
}
.art .pimg { position: relative; z-index: 1; max-width: 100%; max-height: 100%; width: auto; height: auto; object-fit: contain; mix-blend-mode: multiply; transition: transform var(--d) var(--ease); }
a.art:hover .pimg, .card:hover .art .pimg { transform: translateY(-5px); }
.ptype { position: relative; z-index: 1; align-self: center; display: flex; flex-direction: column; align-items: center; gap: var(--s2); text-align: center; }
.ptype b { font: 400 var(--t-xl)/1.15 var(--serif); font-variation-settings: 'SOFT' 50; color: var(--ink); max-width: 9ch; }
.ptype i { font: 500 10px/1 var(--sans); font-style: normal; letter-spacing: .14em; text-transform: uppercase; color: var(--ink-3); }
.art.ptype-wrap::after, .art:has(.ptype)::after { display: none; }
.tag, .sticker {
  position: absolute; z-index: 2; left: var(--s3); top: var(--s3); padding: 5px 8px; border-radius: 3px;
  background: var(--oat); color: var(--ink); font: 500 10px/1 var(--sans); letter-spacing: .1em; text-transform: uppercase;
}

.card { display: flex; flex-direction: column; min-width: 0; }
.card h3 { font: 500 var(--t-md)/1.3 var(--serif); margin: var(--s4) 0 var(--s1); font-variation-settings: 'SOFT' 50; }
.card h3 a { text-decoration: none; }
.card h3 a:hover { text-decoration: underline; text-decoration-thickness: 1px; }
.card .size { margin: 0; font-size: var(--t-xs); color: var(--ink-3); }
.card .row { display: flex; align-items: center; justify-content: space-between; gap: var(--s3); margin-top: auto; padding-top: var(--s3); }
.card .price { font-size: var(--t-sm); font-weight: 600; }
.card .price s { color: var(--ink-3); font-weight: 400; margin-left: var(--s1); }
.card .pill { min-height: 34px; padding: 0 var(--s3); font-size: var(--t-xs); }

.pgrid { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: var(--s7) var(--s5); }

/* horizontal shelves */
.track {
  display: grid; grid-auto-flow: column; grid-auto-columns: minmax(240px, calc((min(100vw, var(--max)) - 2 * var(--gutter) - 3 * var(--s5)) / 4));
  gap: var(--s5); overflow-x: auto; scroll-snap-type: x mandatory; scrollbar-width: none;
  padding: 0 max(var(--gutter), calc((100vw - var(--max)) / 2 + var(--gutter))); scroll-padding: 0 max(var(--gutter), calc((100vw - var(--max)) / 2 + var(--gutter)));
}
.track::-webkit-scrollbar { display: none; }
.track > * { scroll-snap-align: start; }

/* ---- crumbs, chips, filters ---- */
.crumbs { display: flex; flex-wrap: wrap; gap: var(--s2); font-size: var(--t-xs); color: var(--ink-3); margin: var(--s5) 0; }
.crumbs a { color: var(--ink-2); text-decoration: none; }
.crumbs a:hover { color: var(--ink); text-decoration: underline; }
.chips { display: flex; flex-wrap: wrap; gap: var(--s2); }
.chip {
  display: inline-flex; align-items: center; min-height: 36px; padding: 0 var(--s4); border-radius: 999px; border: var(--hair);
  background: transparent; color: var(--ink-2); font: 500 var(--t-sm)/1 var(--sans); text-decoration: none; cursor: pointer;
  transition: border-color var(--d-fast) var(--ease), color var(--d-fast) var(--ease);
}
.chip:hover { border-color: var(--ink); color: var(--ink); }
.chip.on, .chip[aria-pressed="true"], .chip[aria-selected="true"] { background: var(--ink); border-color: var(--ink); color: var(--oat); }

/* ---- forms ---- */
.field { display: flex; flex-direction: column; gap: var(--s2); margin-bottom: var(--s4); }
.field label, .lbl { font-size: var(--t-xs); font-weight: 600; letter-spacing: .04em; color: var(--ink-2); }
input[type="text"], input[type="email"], input[type="tel"], input[type="password"], input[type="number"], input[type="search"], select, textarea {
  width: 100%; min-height: 46px; padding: var(--s3) var(--s4); border: 1px solid var(--travertine); border-radius: var(--radius);
  background: var(--bone); color: var(--ink); font: 400 var(--t-md)/1.4 var(--sans); transition: border-color var(--d-fast) var(--ease);
}
textarea { min-height: 120px; resize: vertical; }
input:focus, select:focus, textarea:focus { outline: none; border-color: var(--ink); }
input::placeholder, textarea::placeholder { color: var(--ink-3); }
.qty { display: inline-flex; align-items: center; border: 1px solid var(--travertine); border-radius: 999px; background: var(--bone); }
.qty button { width: 36px; height: 36px; border: 0; background: none; font-size: 16px; cursor: pointer; color: var(--ink); }
.qty input, .qty span { width: 36px; min-height: 0; padding: 0; border: 0; background: none; text-align: center; font-weight: 600; }

/* ---- toast ---- */
.toast {
  position: fixed; left: 50%; bottom: var(--s5); z-index: 80; transform: translate(-50%, 20px); opacity: 0; pointer-events: none;
  display: flex; gap: var(--s4); align-items: center; padding: var(--s3) var(--s5); border-radius: 999px;
  background: var(--ink); color: var(--oat); font-size: var(--t-sm); box-shadow: var(--shadow-lift);
  transition: opacity var(--d) var(--ease), transform var(--d) var(--ease);
}
.toast.show { opacity: 1; transform: translate(-50%, 0); pointer-events: auto; }
.toast a { color: var(--oat); font-weight: 600; }

/* ---- reveal on scroll (site.js adds .in) ---- */
.rv { opacity: 0; transform: translateY(14px); transition: opacity var(--d-slow) var(--ease), transform var(--d-slow) var(--ease); transition-delay: calc(var(--d, 0) * 60ms); }
.rv.in { opacity: 1; transform: none; }

/* ---- 3D shopfront (shopfront.js): builds itself in view, day turns to dusk on scroll ---- */
.shopfront { position: relative; aspect-ratio: 4 / 5; border-radius: var(--radius-lg); overflow: hidden; background: var(--linen); }
.shopfront .sf-poster, .shopfront .sf-canvas { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; display: block; }
.shopfront .sf-canvas { opacity: 0; transition: opacity var(--d-slow) var(--ease); }
.shopfront.sf-ready .sf-canvas { opacity: 1; }
.sf-replay { position: absolute; left: var(--s3); bottom: var(--s3); z-index: 2; min-height: 32px; padding: 0 var(--s3); border: 0; border-radius: 999px;
  background: rgba(251, 248, 242, .88); color: var(--ink); font: 500 var(--t-xs)/1 var(--sans); cursor: pointer; opacity: 0; transition: opacity var(--d) var(--ease); }
.shopfront:hover .sf-replay, .sf-replay:focus-visible { opacity: 1; }
@media (hover: none) { .sf-replay { opacity: 1; } }

/* ---- first-visit note ---- */
.hello { width: min(420px, calc(100vw - 32px)); padding: var(--s6) var(--s6) var(--s5); border: 0; border-radius: var(--radius-lg);
  background: var(--oat); color: var(--ink); box-shadow: var(--shadow-lift); text-align: left; }
.hello::backdrop { background: rgba(36, 26, 20, .45); backdrop-filter: blur(2px); }
.hello[open] { animation: hello-in var(--d-slow) var(--ease); }
@keyframes hello-in { from { opacity: 0; transform: translateY(14px); } }
.hello-img { width: 84px; height: auto; margin-bottom: var(--s4); transform: rotate(-8deg); filter: drop-shadow(0 10px 10px rgba(60, 40, 25, .2)); }
.hello .eyebrow { margin: 0 0 var(--s2); }
.hello .h3 { margin: 0 0 var(--s3); }
.hello-copy { margin: 0 0 var(--s3); color: var(--ink-2); font-size: var(--t-sm); }
.hello-copy.fine { color: var(--ink-3); font-size: var(--t-xs); }
.hello-cta { display: flex; flex-wrap: wrap; gap: var(--s2); margin-top: var(--s5); }

/* ---- footer ---- */
.footer { background: var(--walnut); color: var(--bone); margin-top: var(--s9); }
.footer a { color: var(--bone); text-decoration: none; }
.footer a:hover { text-decoration: underline; }
.foot-top { display: grid; grid-template-columns: 1.6fr 1fr 1fr 1fr; gap: var(--s6); padding: var(--s8) 0 var(--s7); }
.foot-logo { width: 132px; height: auto; }
.foot-line { font: 400 var(--t-xl)/1.2 var(--serif); margin: var(--s4) 0 var(--s6); max-width: 18ch; font-variation-settings: 'SOFT' 50; }
.news .eyebrow { color: rgba(251, 248, 242, .7); display: block; margin-bottom: var(--s2); }
.news-row { display: flex; max-width: 380px; border-bottom: 1px solid rgba(251, 248, 242, .5); }
.news-row input { flex: 1; background: transparent; border: 0; border-radius: 0; color: var(--bone); padding-left: 0; }
.news-row input::placeholder { color: rgba(251, 248, 242, .55); }
.news-row button { border: 0; background: none; color: var(--bone); font: 600 var(--t-sm)/1 var(--sans); cursor: pointer; padding: 0 var(--s2); }
.news-msg { min-height: 1.4em; font-size: var(--t-sm); margin: var(--s2) 0 0; }
.foot-col h4 { font: 600 var(--t-xs)/1 var(--sans); letter-spacing: .14em; text-transform: uppercase; color: rgba(251, 248, 242, .6); margin-bottom: var(--s4); }
.foot-col ul { list-style: none; margin: 0; padding: 0; }
.foot-col li { margin-bottom: var(--s2); font-size: var(--t-sm); }
.foot-trust { list-style: none; margin: 0; padding: var(--s5) 0; display: flex; flex-wrap: wrap; gap: var(--s2) var(--s6); border-top: 1px solid rgba(251, 248, 242, .18); font-size: var(--t-xs); color: rgba(251, 248, 242, .75); }
.foot-bottom { display: flex; justify-content: space-between; align-items: center; padding: var(--s4) 0 var(--s6); font-size: var(--t-xs); color: rgba(251, 248, 242, .6); }
.top { border: 0; background: none; color: inherit; font: inherit; cursor: pointer; }
.top:hover { color: var(--bone); }
.footer.slim { background: transparent; color: var(--ink-3); border-top: var(--hair); margin-top: var(--s8); }
.footer.slim .wrap { display: flex; flex-wrap: wrap; justify-content: space-between; gap: var(--s4); padding-top: var(--s5); padding-bottom: var(--s5); font-size: var(--t-xs); }
.footer.slim a { color: var(--ink-2); margin-left: var(--s4); }

/* ---- responsive ---- */
@media (max-width: 900px) {
  .tabs, .nav-acc { display: none; }
  .menu-btn { display: block; }
  .nav-end { gap: var(--s2); }
  .foot-top { grid-template-columns: 1fr 1fr; }
  .foot-lead { grid-column: 1 / -1; }
  .track { grid-auto-columns: minmax(220px, 44%); }
}
@media (max-width: 560px) {
  .nav { height: 60px; gap: var(--s3); }
  .logo img { width: 92px; }
  .section { padding: var(--s8) 0; }
  .sec-head { flex-direction: column; align-items: flex-start; margin-bottom: var(--s6); }
  .pgrid { grid-template-columns: 1fr 1fr; gap: var(--s6) var(--s3); }
  .track { grid-auto-columns: 64%; gap: var(--s3); }
  .card .row { flex-wrap: wrap; }
  .foot-top { grid-template-columns: 1fr; gap: var(--s5); }
  .foot-bottom { flex-direction: column; gap: var(--s3); align-items: flex-start; }
}
