/* Ray Ray knows Beauty — site styles.
   Tokens and base components come from organic.css (the Organic design system).
   Everything below is the storefront layer ported from design/Ray Ray knows Beauty.dc.html. */
@import url('./organic.css');
@import url('https://fonts.googleapis.com/css2?family=Italiana&display=swap');

/* Brand display face. Licensed font — drop TAN-PEARL.otf/.ttf into fonts/ and it
   switches over automatically; until then Italiana carries the look. */
@font-face {
  font-family: "TAN Pearl";
  src: url("./fonts/TAN-PEARL.otf") format("opentype"), url("./fonts/TAN-PEARL.ttf") format("truetype");
  font-display: swap;
}

:root {
  --display: "TAN Pearl", "Italiana", serif;
  --ink: #2a2312;
  --moss: #354024;
  --moss-deep: #2a3320;
  --bark: #4c3d19;
  --soil: #6b5a33;
  --sand: #dccbb1;
  --cream: #f2eadc;
  --sage: #c9cfb0;
  --sage-2: #b3bb8f;
  --sage-3: #a0a878;
  --wheat: #cfbb99;
  --ground: #e5d7c4;
}

html { scroll-behavior: smooth; }
body { margin: 0; background: var(--ground); color: var(--ink); font-family: "Figtree", system-ui, sans-serif; }
a { color: var(--moss); }
a:hover { color: var(--moss-deep); }
button { font-family: inherit; }
select.input { appearance: none; -webkit-appearance: none; }
input[type=range] { accent-color: var(--moss); }
.btn { font-family: var(--display); letter-spacing: .02em; }
.display { font-family: var(--display); font-weight: 400; line-height: 1.05; margin: 0; }

/* — motion — */
@keyframes rr-rise { from { opacity: 0; transform: translateY(18px); } to { opacity: 1; transform: none; } }
@keyframes rr-fade { from { opacity: 0; } to { opacity: 1; } }
@keyframes rr-slide-in { from { transform: translateX(40px); opacity: 0; } to { transform: none; opacity: 1; } }
@keyframes rr-pop { 0% { transform: translateY(12px) scale(.96); opacity: 0; } 60% { transform: translateY(-2px) scale(1.01); opacity: 1; } 100% { transform: none; opacity: 1; } }
@keyframes rr-drift { 0%, 100% { transform: rotate(15deg) translateY(0); } 50% { transform: rotate(18deg) translateY(-10px); } }
@keyframes rr-pulse { 0%, 100% { transform: scale(1); } 50% { transform: scale(1.18); } }
@media (prefers-reduced-motion: reduce) { *, *::before, *::after { animation-duration: .01ms !important; transition-duration: .01ms !important; } }

/* — primitives — */
.reset { border: 0; background: none; cursor: pointer; font: inherit; color: var(--ink); padding: 0; text-align: left; }
.blob { border-radius: 0 100% 0 100%; }
.kicker { font-size: 11px; letter-spacing: .12em; text-transform: uppercase; color: var(--bark); font-weight: 600; }
.kicker.muted { color: var(--soil); }
.muted { color: var(--soil); }
.row { display: flex; align-items: center; gap: 10px; }
.between { display: flex; justify-content: space-between; gap: 10px; }
.col { display: flex; flex-direction: column; }
.wrap { flex-wrap: wrap; }
.stack-56 { margin-top: 56px; }
.thumb { border-radius: 14px; flex: none; }
.pill-note { font-size: 12px; padding: 4px 12px; border-radius: 999px; font-weight: 600; }

/* — hover states (the design declared these as style-hover; here they are real) — */
.hov-sage:hover { background: var(--sage); }
.hov-deep:hover { background: var(--moss-deep); }
.hov-cream:hover { background: #fff; }
.hov-sand:hover { background: var(--sand); }
.hov-ground:hover { background: var(--ground); }
.hov-invert:hover { background: var(--moss); color: var(--cream); }
.hov-dim:hover { filter: brightness(.96); }
.tile { transition: transform .35s cubic-bezier(.2,.7,.2,1), box-shadow .35s; }
.tile:hover { transform: translateY(-4px); box-shadow: 0 16px 32px rgba(53,64,36,.14); filter: brightness(1.02); }
.tier:hover { transform: translateY(-6px) !important; box-shadow: 0 22px 44px rgba(53,64,36,.16) !important; }
.ritual:hover { transform: translateY(-4px); }

/* — shell + header — */
.shell { position: relative; width: 100%; max-width: 1280px; margin: 0 auto; min-height: 100vh; display: flex; flex-direction: column; background: var(--ground); }
.site-header {
  display: flex; flex-wrap: wrap; align-items: center; gap: 12px; padding: 18px 28px;
  position: sticky; top: 0; z-index: 5; background: rgba(229,215,196,.92); backdrop-filter: blur(8px); -webkit-backdrop-filter: blur(8px);
}
.brand { display: flex; align-items: center; gap: 10px; flex: none; }
.brand-mark { width: 34px; height: 34px; background: var(--moss); display: block; }
.brand-name { font-family: var(--display); font-size: 20px; line-height: 1; white-space: nowrap; }
.site-nav { display: flex; align-items: center; gap: 14px; margin-left: 8px; position: relative; white-space: nowrap; }
.nav-link { font-size: 14px; display: flex; align-items: center; gap: 4px; }
.nav-link:hover { color: var(--moss); }
.menu-pop {
  position: absolute; top: 32px; left: -12px; width: 300px; background: var(--cream); border-radius: 24px;
  box-shadow: 0 12px 32px rgba(53,64,36,.22); padding: 12px; display: flex; flex-direction: column; gap: 2px; z-index: 20;
  white-space: normal; /* .site-nav is nowrap; long category blurbs must wrap, not push the counts out */
}
.menu-item { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 10px 14px; border-radius: 999px; }
.menu-item .col { flex: 1 1 auto; min-width: 0; }
.menu-item > :last-child { flex: none; white-space: nowrap; text-align: right; } /* counts share one right edge */
.search { position: relative; display: flex; align-items: center; min-width: 180px; max-width: 220px; flex: 1 1 180px; order: 10; }
.search svg { position: absolute; left: 14px; color: var(--soil); pointer-events: none; }
.search .input { width: 100%; min-width: 0; padding-left: 38px; background: var(--cream); border-color: transparent; }
.seg-pill { display: inline-flex; gap: 2px; padding: 3px; border-radius: 999px; background: var(--sand); flex: none; }
.cur { font-size: 12px; font-weight: 600; padding: 5px 10px; border-radius: 999px; background: var(--cream); color: var(--moss); }
.cur.on { background: var(--moss); color: var(--cream); }
.bag-count {
  position: absolute; top: -2px; right: -2px; min-width: 18px; height: 18px; border-radius: 999px; background: var(--moss); color: var(--cream);
  animation: rr-pulse .45s ease-out; font-size: 11px; font-weight: 700; display: flex; align-items: center; justify-content: center; padding: 0 5px;
}
.mobile-menu { padding: 4px 20px 16px; display: flex; flex-wrap: wrap; gap: 8px; }
.mobile-menu .input { background: var(--cream); border-color: transparent; }

main { flex: 1; padding: 0 28px 60px; }
@media (max-width: 859px) {
  main { padding: 0 16px 48px; }
  .site-header { padding: 14px 16px; }
  /* Narrow cards: price sits under the name instead of fighting it for width. */
  .product > .between { flex-direction: column; gap: 4px; }
  .product .price { align-self: flex-start; }
}

/* — home — */
.hero { position: relative; overflow: hidden; border-radius: 36px; background: var(--sage); margin-top: 8px; display: grid; gap: 32px; align-items: center; }
.hero-copy { position: relative; display: flex; flex-direction: column; gap: 18px; max-width: 560px; animation: rr-rise .8s cubic-bezier(.2,.7,.2,1) both; }
.hero h1 { color: var(--moss); text-wrap: pretty; }
.hero p { font-size: 16px; color: var(--bark); margin: 0; max-width: 440px; text-wrap: pretty; }
.hero-art { width: 100%; max-width: 380px; aspect-ratio: 4/5; border-radius: 190px 190px 40px 40px; background: repeating-linear-gradient(135deg, var(--wheat) 0 10px, var(--sand) 10px 22px); display: flex; align-items: flex-end; justify-content: center; padding: 18px; }
.hero-art .note { font-family: ui-monospace, Menlo, monospace; font-size: 11px; color: var(--soil); background: rgba(242,234,220,.8); padding: 4px 10px; border-radius: 999px; }
.cta { padding: 12px 24px; font-size: 15px; }
.cta.primary { background: var(--moss); color: var(--cream); }
.cta.soft { background: var(--cream); color: var(--moss); }
.ritual {
  display: flex; flex-direction: column; gap: 6px; min-height: 160px; justify-content: flex-end; padding: 22px; border-radius: 32px;
  position: relative; overflow: hidden; transition: transform .3s cubic-bezier(.2,.7,.2,1);
}
.ritual .glint { position: absolute; right: -20px; top: -20px; width: 90px; height: 90px; background: rgba(255,255,255,.35); transform: rotate(20deg); }
.feature { border-radius: 36px; overflow: hidden; display: flex; flex-direction: column; }
.feature .photo { height: 220px; background-position: center; background-size: cover; background-repeat: no-repeat; }
.feature .body { padding: 28px; display: flex; flex-direction: column; gap: 12px; }
.feature p { margin: 0; font-size: 15px; color: var(--bark); }
.tier {
  display: flex; flex-direction: column; gap: 14px; padding: 24px; border-radius: 28px; border: 2px solid transparent; background: var(--cream);
  transition: transform .35s cubic-bezier(.2,.7,.2,1), box-shadow .35s;
}
.tier .cta-inline { display: inline-flex; align-items: center; justify-content: center; padding: 12px 18px; border-radius: 999px; font-size: 14px; font-weight: 600; margin-top: 4px; }
.perk { display: flex; align-items: center; gap: 8px; font-size: 13px; color: var(--moss); }
.perk::before { content: ""; width: 6px; height: 6px; border-radius: 50%; background: var(--moss); flex: none; }
.product { display: flex; flex-direction: column; gap: 10px; min-width: 0; }
.product .tile { border: 0; cursor: pointer; padding: 12px; aspect-ratio: 4/5; border-radius: 28px; position: relative; display: flex; align-items: flex-start; justify-content: space-between; }
.product .badge { font-size: 11px; padding: 4px 10px; border-radius: 999px; background: rgba(242,234,220,.9); color: var(--moss); font-weight: 600; }
.product .add { background: var(--cream); color: var(--moss); font-size: 13px; align-self: flex-start; }
.product .name { font-weight: 600; font-size: 15px; }
.product .meta { font-size: 12px; color: var(--soil); }
.product .price { font-weight: 600; white-space: nowrap; }
.perk-card { padding: 24px; border-radius: 28px; background: var(--cream); display: flex; flex-direction: column; gap: 6px; }
.perk-card .title { font-family: var(--display); font-size: 20px; }
.perk-card .body { font-size: 14px; color: var(--bark); }

/* — catalog — */
.chip { font-size: 13px; padding: 7px 14px; }
.chip.on { background: var(--moss); color: var(--cream); }
.chip:not(.on) { background: var(--cream); color: var(--moss); }
.filters { display: flex; flex-direction: column; gap: 26px; position: sticky; top: 90px; }
.filters .group { display: flex; flex-direction: column; gap: 10px; }
.radio-row { display: flex; align-items: center; gap: 10px; cursor: pointer; font-size: 14px; position: relative; }
.radio-row input { position: absolute; opacity: 0; width: 0; height: 0; }
.radio-row .dot { width: 16px; height: 16px; border-radius: 50%; border: 1.5px solid #b5a27f; flex: none; background: transparent; }
.radio-row input:checked + .dot { background: var(--moss); box-shadow: inset 0 0 0 3px var(--cream); }
.radio-row input:focus-visible + .dot { outline: 2px solid var(--moss); outline-offset: 2px; }
.sort-pop { position: absolute; right: 0; top: 44px; width: 220px; background: var(--cream); border-radius: 22px; box-shadow: 0 12px 32px rgba(53,64,36,.22); padding: 8px; display: flex; flex-direction: column; z-index: 20; }
.sort-opt { font-size: 14px; padding: 10px 14px; border-radius: 999px; }
.sort-opt.on { background: var(--sage); font-weight: 600; }
.empty { padding: 48px 24px; border-radius: 32px; background: var(--cream); text-align: center; display: flex; flex-direction: column; gap: 10px; align-items: center; }
.empty .blob { width: 56px; height: 56px; background: var(--sage-2); transform: rotate(30deg); }

/* — product — */
.pdp-art { aspect-ratio: 4/5; border-radius: 36px; position: relative; display: flex; align-items: flex-end; padding: 16px; }
.shot-note { font-family: ui-monospace, Menlo, monospace; font-size: 10px; color: var(--soil); background: rgba(242,234,220,.85); padding: 3px 8px; border-radius: 999px; }
.concern { font-size: 12px; padding: 4px 12px; border-radius: 999px; background: var(--sage); color: var(--moss-deep); }
.qty { display: inline-flex; align-items: center; border-radius: 999px; background: var(--cream); height: 36px; }
.qty button { border: 0; background: none; width: 34px; height: 36px; cursor: pointer; font-size: 18px; color: var(--ink); }
.qty span { min-width: 20px; text-align: center; font-weight: 600; }
.select-wrap { position: relative; }
.select-wrap svg { position: absolute; right: 14px; top: 11px; pointer-events: none; color: var(--soil); }
.accordion { display: flex; flex-direction: column; border-radius: 24px; background: var(--cream); overflow: hidden; }
.accordion .head { display: flex; justify-content: space-between; align-items: center; font-size: 14px; font-weight: 600; padding: 14px 18px; width: 100%; }
.accordion .head + .head, .accordion .item + .item .head { border-top: 1px solid rgba(42,35,18,.08); }
.accordion p { margin: 0; padding: 0 18px 16px; font-size: 14px; color: var(--bark); }
.box-item { display: flex; align-items: center; gap: 12px; padding: 6px 0; width: 100%; }

/* — checkout — */
.step-chip { display: flex; align-items: center; gap: 8px; border: 0; cursor: pointer; font: inherit; font-size: 13px; padding: 8px 14px 8px 8px; border-radius: 999px; background: transparent; color: var(--ink); }
.step-chip.on { background: var(--sage); }
.step-chip:disabled { color: #b5a27f; cursor: default; }
.step-chip .mark { width: 22px; height: 22px; border-radius: 50%; display: flex; align-items: center; justify-content: center; font-size: 12px; font-weight: 700; background: var(--wheat); color: var(--soil); }
.step-chip.on .mark, .step-chip.done .mark { background: var(--moss); color: var(--cream); }
.panel { display: flex; flex-direction: column; gap: 18px; padding: 28px; border-radius: 32px; background: var(--cream); }
.panel .input { background: var(--ground); }
.two { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.delivery { display: flex; align-items: center; gap: 14px; border: 2px solid transparent; background: var(--ground); cursor: pointer; font: inherit; text-align: left; padding: 16px 18px; border-radius: 24px; color: var(--ink); }
.delivery.on { border-color: var(--moss); background: var(--sage); }
.delivery .dot { width: 18px; height: 18px; border-radius: 50%; border: 1.5px solid #b5a27f; flex: none; background: transparent; }
.delivery.on .dot { background: var(--moss); box-shadow: inset 0 0 0 3px var(--cream); }
.note-box { padding: 22px; border-radius: 24px; background: var(--ground); font-size: 14px; color: var(--bark); }
.review-card { padding: 18px; border-radius: 22px; background: var(--ground); display: flex; flex-direction: column; gap: 4px; font-size: 14px; }
.review-card .edit { color: var(--moss); font-size: 12px; padding: 4px 8px; align-self: flex-start; }
.error { font-size: 13px; color: var(--bark); background: var(--sand); padding: 10px 14px; border-radius: 999px; align-self: flex-start; }
.summary { display: flex; flex-direction: column; gap: 14px; padding: 24px; border-radius: 32px; background: var(--sage); position: sticky; top: 90px; }
.summary .input { background: var(--cream); border-color: transparent; }
.totals { display: flex; flex-direction: column; gap: 6px; font-size: 14px; border-top: 1px solid rgba(42,35,18,.12); padding-top: 12px; }
.link-btn { display: inline; padding: 0; font-size: 12px; color: var(--moss); text-decoration: underline; border-radius: 0; }

/* — confirmation — */
.confirm { position: relative; overflow: hidden; margin-top: 12px; border-radius: 36px; background: var(--sage); display: flex; flex-direction: column; gap: 18px; align-items: flex-start; }
.confirm .tick { width: 52px; height: 52px; border-radius: 50%; background: var(--moss); color: var(--cream); display: flex; align-items: center; justify-content: center; position: relative; }
.order-line { display: flex; gap: 12px; align-items: center; padding: 14px; border-radius: 24px; background: var(--cream); font-size: 14px; }

/* — account — */
.avatar { width: 64px; height: 64px; border-radius: 50%; background: var(--sage-2); display: flex; align-items: center; justify-content: center; font-family: var(--display); font-size: 24px; color: var(--moss-deep); }
.order-card { padding: 20px 22px; border-radius: 28px; background: var(--cream); display: flex; flex-direction: column; gap: 12px; }
.acct-tab { justify-content: flex-start; font-size: 14px; color: var(--ink); }
.acct-tab.on { background: var(--cream); }
.placeholder { padding: 40px 24px; border-radius: 28px; background: var(--cream); display: flex; flex-direction: column; gap: 8px; align-items: center; text-align: center; }
.placeholder .blob { width: 48px; height: 48px; background: var(--sage-2); transform: rotate(30deg); }

/* — terms — */
.terms { max-width: 760px; margin: 12px auto 0; display: flex; flex-direction: column; gap: 28px; }
.terms section { display: flex; flex-direction: column; gap: 8px; padding: 22px 24px; border-radius: 24px; background: var(--cream); }
.terms p { margin: 0; font-size: 14px; line-height: 1.6; color: var(--bark); text-wrap: pretty; }

/* — footer — */
.site-footer { padding: 28px; display: flex; flex-direction: column; gap: 18px; font-size: 13px; color: var(--soil); border-top: 1px solid rgba(42,35,18,.1); }
.site-footer .links { display: flex; gap: 6px; flex-wrap: wrap; }
.site-footer .links .btn, .site-footer .links a { font-size: 13px; color: var(--soil); padding: 6px 10px; border-radius: 999px; text-decoration: none; display: inline-flex; align-items: center; gap: 7px; font-family: var(--display); letter-spacing: .02em; }
.site-footer .links .btn:hover, .site-footer .links a:hover { background: var(--ground); color: var(--soil); }
.site-footer .legal { margin: 0; font-size: 12px; line-height: 1.6; max-width: 960px; text-wrap: pretty; }
.site-footer .legal strong { color: var(--moss); font-weight: 600; }

/* — cart drawer + toast — */
.overlay { position: fixed; inset: 0; background: rgba(53,64,36,.45); z-index: 40; animation: rr-fade .25s ease-out both; }
.drawer {
  position: fixed; top: 0; right: 0; bottom: 0; width: 420px; max-width: 100%; background: var(--cream); z-index: 41; display: flex; flex-direction: column;
  animation: rr-slide-in .35s cubic-bezier(.2,.7,.2,1) both; box-shadow: 0 12px 32px rgba(53,64,36,.3); border-radius: 32px 0 0 32px;
}
@media (max-width: 859px) { .drawer { width: 100%; border-radius: 34px; } }
.drawer .head { display: flex; align-items: center; justify-content: space-between; padding: 22px 24px 14px; }
.drawer .progress { height: 6px; border-radius: 999px; background: var(--sage); overflow: hidden; }
.drawer .progress > div { height: 100%; background: var(--moss); border-radius: 999px; transition: width .3s; }
.drawer .lines { flex: 1; overflow: auto; padding: 8px 24px; display: flex; flex-direction: column; gap: 14px; }
.drawer .foot { padding: 18px 24px 24px; display: flex; flex-direction: column; gap: 12px; border-top: 1px solid rgba(42,35,18,.1); }
.qty.small { height: 30px; background: var(--ground); }
.qty.small button { width: 30px; height: 30px; font-size: 16px; }
.qty.small span { min-width: 18px; font-size: 13px; }
.remove { font-size: 12px; color: var(--bark); padding: 4px 8px; border-radius: 999px; }
.toast {
  position: fixed; left: 50%; bottom: 24px; transform: translateX(-50%); background: var(--moss); color: var(--cream); padding: 10px 18px; border-radius: 999px;
  font-size: 14px; z-index: 50; animation: rr-pop .4s cubic-bezier(.2,.7,.2,1) both; box-shadow: 0 12px 32px rgba(53,64,36,.3); white-space: nowrap;
}
