/* Echo & Chrome: background themes.
   Every color on the home, shop and product pages comes from the --t-* tokens below.
   The defaults are the charcoal look; themes.js swaps in a light palette when one is chosen.
   The hero photo and the "logo moment" screen stay dark in every theme (--night-*). */
:root {
  --t-bg: #262626;              /* page */
  --t-band: #1c1c1c;            /* footer, lamp viewer, photo frames */
  --t-bar: #1c1c1c;             /* header */
  --t-bar-ink: #dad62c;         /* header + footer type */
  --t-bar-soft: rgba(218, 214, 44, 0.62);
  --t-fg: #dad62c;              /* running type */
  --t-head: #dad62c;            /* headlines, product name and price */
  --t-soft: rgba(218, 214, 44, 0.62);
  --t-body: #e9e5d6;            /* product descriptions */
  --t-line: rgba(218, 214, 44, 0.22);
  --t-accent: #dad62c;          /* underlines, active menu item */
  --t-rule: rgba(218, 214, 44, 0.22);
  --t-hl: transparent;          /* highlighter behind "done timelessly" */

  /* photos and the words that sit on them never change */
  --night: #262626;
  --night-deep: #1c1c1c;
  --night-ink: #dad62c;
  --night-paper: #fffbf9;

  /* feed the tokens each page already uses */
  --ink: var(--t-bg);
  --ink-deep: var(--t-band);
  --yellow: var(--t-fg);
  --line: var(--t-line);
  --slot: radial-gradient(ellipse 58% 40% at 50% 47%, rgba(255, 186, 92, 0.28), rgba(255, 186, 92, 0.09) 55%, rgba(255, 186, 92, 0) 78%), linear-gradient(#2c2a26, #242321);   /* empty photo holder: lamplight glow */
  --slot-edge: rgba(218, 214, 44, 0.16);
  --soft: var(--t-soft);
}
html[data-tone="light"] { color-scheme: light; }

body { background: var(--t-bg); color: var(--t-fg); transition: background-color 0.35s ease, color 0.35s ease; }
body::before { background: var(--t-bar); }

/* header + footer */
.site-header { background: var(--t-bar); color: var(--t-bar-ink); border-bottom-color: var(--t-line); }
.site-footer { background: var(--t-band); color: var(--t-bar-ink); border-top-color: var(--t-line); }
.site-footer small { color: var(--t-bar-soft); }
.menu-btn { color: var(--t-bar-ink); border-color: var(--t-line); }
.nav a:hover, .nav a[aria-current="true"], .nav a[aria-current="page"] { border-bottom-color: var(--t-accent); }
@media (max-width: 760px) {
  .site-header .nav { background: var(--t-bar); border-bottom-color: var(--t-line); }
  .site-header .nav a { border-bottom-color: var(--t-line); }
}

/* type */
.big-head, .section-head, .designer__head, .shop__head, .product__name, .product__price { color: var(--t-head); }
.big-head em span { background: linear-gradient(transparent 58%, var(--t-hl) 58%); }
.text-link, .photo-link { text-decoration-color: var(--t-accent); }
html[data-tone="light"] .text-link, html[data-tone="light"] .photo-link { text-decoration-thickness: 2px; }
.swipe-hint { color: var(--t-soft); }
.product__desc { color: var(--t-body); }
.product__rule { background: var(--t-rule); }
.pager { border-top-color: var(--t-line); }

/* the hero and the logo moment always stay dark, with the chartreuse logo */
.hero { color: var(--night-ink); }
.hero .shot { background: var(--night); }
.hero .text-link { text-decoration-color: var(--night-ink); }
.veil { background: var(--night-deep); }
.veil__mark { color: var(--night-ink); }
.gallery__arrow { color: var(--night-ink); }

/* photos look exactly the same in every theme: same dimming, always over charcoal */
.shot { background: var(--night); }
html[data-tone="light"] .lighting .shot { border-left: 0; }

/* words that sit ON a photo keep the charcoal-theme colors */
.card__title { color: var(--night-ink); }
.card .photo-link { text-decoration-color: var(--night-ink); }
.about__text { color: var(--night-ink); }
.slot { background: var(--slot); border-color: var(--slot-edge); }
.slot span { color: var(--night-ink); }
@media (max-width: 760px) {
  /* on phones the bio sits above the photo, on the page itself */
  .about__text { color: var(--t-fg); }
}

/* lamp viewer */
.viewer { background: var(--t-band); color: var(--t-fg); border-color: var(--t-line); }
.viewer p { color: var(--t-body); }
.viewer__close { color: var(--t-fg); border-color: var(--t-line); }

/* ---------- Temporary background switcher (remove once a background is chosen) ---------- */
.bg-picker {
  position: fixed; z-index: 90;
  right: calc(14px + env(safe-area-inset-right, 0px)); bottom: calc(14px + env(safe-area-inset-bottom, 0px));
  display: flex; align-items: center; gap: 10px;
  padding: 8px 12px 8px 14px; border-radius: 999px;
  background: rgba(20, 20, 20, 0.9); color: #f4f2e6;
  font: 13px/1.2 var(--serif); box-shadow: 0 6px 24px rgba(0, 0, 0, 0.3);
  max-width: calc(100vw - 28px);
}
.bg-picker__label { white-space: nowrap; font-style: italic; }
.bg-picker__name { white-space: nowrap; min-width: 9.5em; }
.bg-picker__swatches { display: flex; gap: 6px; }
.bg-picker button {
  width: 24px; height: 24px; border-radius: 50%; padding: 0; cursor: pointer;
  border: 1px solid rgba(244, 242, 230, 0.45); position: relative; overflow: hidden;
  background: var(--sw);
}
.bg-picker button::after { content: ""; position: absolute; right: 0; bottom: 0; width: 46%; height: 46%; background: var(--sa); }
.bg-picker button[aria-pressed="true"] { outline: 2px solid #dad62c; outline-offset: 2px; }
@media (max-width: 520px) {
  .bg-picker__label { display: none; }
  .bg-picker__name { min-width: 0; }
}

/* light backgrounds: the designer heading sits fully above the portrait so dark type never lands on her hair */
html[data-tone="light"] .designer__head { margin-bottom: 0.18em; }


/* ---------- "Lights on": going to the Studio (see transition.js) ----------
   Leaving: the screen goes dark, a little ceramic pendant drops in on its cord and flickers on.
   Arriving on studio.html#lit: the lit lamp lifts away, the dark fades, then the page pops in. */
.lights {
  --drop: 24vh;
  position: fixed; inset: 0; z-index: 100; pointer-events: none;
  background: var(--night-deep, #1c1c1c);
  opacity: 0; visibility: hidden;
  transition: opacity 0.3s ease, visibility 0s linear 0.3s;
}
.lights.is-on, html.lit-arrive .lights { opacity: 1; visibility: visible; transition: opacity 0.3s ease; }
.lights__glow {
  position: absolute; left: 50%; top: calc(var(--drop) + min(14vmin, 120px));
  width: 130vmax; aspect-ratio: 1; transform: translate(-50%, -50%); border-radius: 50%; opacity: 0;
  background: radial-gradient(circle, rgba(255, 210, 130, 0.36), rgba(255, 186, 92, 0.13) 26%, rgba(255, 186, 92, 0) 55%);
}
/* the pendant from the options preview (Sam: "I like the original lamp icon"): a smooth ceramic dome,
   brass cap and a round bulb hanging just below; sized in em, where 1em = 1/16 of the lamp's width */
.lights__pendant {
  position: absolute; left: 50%; top: 0; width: min(26vmin, 210px); font-size: calc(min(26vmin, 210px) / 16);
  transform: translate(-50%, -105%);
}
.lights__cord { width: 1px; height: var(--drop); margin: 0 auto; background: #8a877c; }
.lights__cap { width: 2.4em; height: 2em; margin: 0 auto; border-radius: 0.4em 0.4em 0 0; background: linear-gradient(#e0bd66, #9c7a2e); }
.lights__shade {
  position: relative; height: 6.5em; border-radius: 50% 50% 8% 8% / 100% 100% 12% 12%;
  background: radial-gradient(circle at 30% 30%, #b39a77, #8d7552 60%, #6e5a3e);
}
.lights__shade::after {              /* the bulb under the shade, tucked behind its front rim (Sam) */
  content: ""; position: absolute; left: 50%; bottom: -2.2em; width: 4em; height: 4em; margin-left: -2em;
  border-radius: 50%; background: #3a3631; z-index: -1;
}
.lights.is-on .lights__pendant { animation: lights-drop 0.5s cubic-bezier(0.3, 0.9, 0.4, 1.15) 0.2s forwards; }
.lights.is-on .lights__shade::after { animation: lights-flicker 0.5s steps(1) 0.75s forwards; }
.lights.is-on .lights__glow { animation: lights-bloom 0.45s ease 1s forwards; }
html.lit-arrive .lights__pendant { transform: translate(-50%, 0); animation: lights-lift 0.5s cubic-bezier(0.5, 0, 0.75, 0.4) 0.3s forwards; }
html.lit-arrive .lights__shade::after, html.lit-arrive .lights__glow { animation: none; }
html.lit-arrive .lights__shade::after { background: #fff2c4; box-shadow: 0 0 4em 2em rgba(255, 210, 120, 0.85), 0 0 14em 7em rgba(255, 186, 92, 0.3); }
html.lit-arrive .lights__glow { opacity: 1; animation: lights-out 0.5s ease 0.3s forwards; }
html.lit-arrive .lights { animation: lights-out 0.45s ease 0.55s forwards; }
@keyframes lights-drop { to { transform: translate(-50%, 0); } }
@keyframes lights-lift { to { transform: translate(-50%, -105%); } }
@keyframes lights-bloom { to { opacity: 1; } }
@keyframes lights-out { to { opacity: 0; } }
@keyframes lights-flicker {
  0%   { background: #fff2c4; box-shadow: 0 0 3em 1.5em rgba(255, 210, 120, 0.9); }
  30%  { background: #3a3631; box-shadow: none; }
  45%, 100% { background: #fff2c4; box-shadow: 0 0 4em 2em rgba(255, 210, 120, 0.85), 0 0 14em 7em rgba(255, 186, 92, 0.3); }
}
@media (prefers-reduced-motion: reduce) { .lights { display: none; } }

/* ---------- Search + bag icons (top right of every page; shop-tools.js builds them) ---------- */
.site-header__inner { justify-content: flex-start; }
.site-header .nav { margin-left: auto; }
.tools { display: flex; align-items: center; gap: 2px; margin-right: -10px; }
.tool {
  position: relative; width: 44px; height: 44px; padding: 0;
  display: grid; place-items: center;
  background: none; border: 0; border-radius: 50%; cursor: pointer;
  color: var(--t-bar-ink);
}
.tool svg { width: 21px; height: 21px; fill: none; stroke: currentColor; stroke-width: 1.4; stroke-linecap: round; stroke-linejoin: round; transition: transform 0.2s ease; }
.tool:hover svg { transform: scale(1.08); }
.tool[aria-expanded="true"] { background: rgba(218, 214, 44, 0.1); }
.tool:focus-visible { outline: 2px solid var(--t-accent); outline-offset: 1px; }
.tool__count {
  position: absolute; top: 5px; right: 2px; min-width: 17px; height: 17px; padding: 0 4px; box-sizing: border-box;
  border-radius: 9px; background: var(--t-accent); color: var(--night-deep);
  font: 600 11px/17px var(--serif); text-align: center;
}
.tool__count[hidden] { display: none; }
@media (max-width: 760px) {
  .site-header__inner { gap: 6px; }
  .tools { margin-left: auto; margin-right: 6px; gap: 0; }
  .menu-btn { order: 3; }
}
@media (max-width: 360px) {
  .site-header__inner { gap: 4px; }
  .site-header .brandmark { font-size: 20px; }
  .tools { margin-right: 2px; }
  .tool { width: 38px; }
  .site-header .menu-btn { padding: 8px 10px; }
}

/* search: drops down under the header */
.search {
  position: absolute; left: 0; right: 0; top: 100%;
  background: var(--t-bar); color: var(--t-bar-ink);
  border-bottom: 1px solid var(--t-line);
  box-shadow: 0 22px 40px rgba(0, 0, 0, 0.35);
}
.search[hidden] { display: none; }
.search__inner { max-width: 640px; margin: 0 auto; padding: 14px var(--gutter-r, 20px) 16px var(--gutter-l, 20px); box-sizing: border-box; }
.search__form { display: flex; align-items: center; gap: 12px; border-bottom: 1px solid var(--t-accent); padding-bottom: 6px; }
.search__icon svg { display: block; width: 22px; height: 22px; fill: none; stroke: currentColor; stroke-width: 1.4; stroke-linecap: round; }
.search__form input {
  flex: 1; min-width: 0; background: transparent; border: 0; outline: none; border-radius: 0;
  color: var(--t-bar-ink); font: italic 22px/1.3 var(--serif); padding: 8px 0;
  -webkit-appearance: none; appearance: none;
}
.search__form input::placeholder { color: var(--t-bar-soft); opacity: 1; }
.search__form input::-webkit-search-cancel-button { -webkit-appearance: none; }
.bag__close {
  flex: none; background: none; border: 1px solid var(--t-line); color: var(--t-bar-ink);
  font: italic 16px/1 var(--serif); padding: 10px 14px; cursor: pointer;
}
.bag__close:hover { border-color: var(--t-accent); }
.search__close {
  flex: none; width: 40px; height: 40px; margin-right: -8px; padding: 0; display: grid; place-items: center;
  background: none; border: 0; border-radius: 50%; color: var(--t-bar-ink); cursor: pointer;
}
.search__close svg { width: 20px; height: 20px; fill: none; stroke: currentColor; stroke-width: 1.4; stroke-linecap: round; }
.search__close:hover { background: rgba(218, 214, 44, 0.1); }
.search__results { max-height: min(62vh, 540px); overflow-y: auto; overscroll-behavior: contain; }
.search__list { list-style: none; margin: 10px 0 0; padding: 0; display: grid; gap: 2px; }
.search__hit {
  display: grid; grid-template-columns: 44px minmax(0, 1fr) auto; align-items: center; gap: 14px;
  padding: 8px; text-decoration: none; color: var(--t-bar-ink);
}
.search__hit--page { grid-template-columns: minmax(0, 1fr); padding-block: 12px; }
.search__hit:hover, .search__hit:focus-visible { background: rgba(218, 214, 44, 0.08); outline: none; }
.search__thumb, .bag__thumb { display: block; background: var(--slot); border: 1px solid var(--slot-edge); overflow: hidden; }
.search__thumb { width: 44px; height: 44px; }
.search__thumb img, .bag__thumb img { display: block; width: 100%; height: 100%; object-fit: cover; }
.search__name { font-size: 18px; line-height: 1.2; min-width: 0; }
.search__price { font-family: var(--display); font-size: 20px; }
.search__none { margin: 16px 8px 4px; font-style: italic; color: var(--t-bar-soft); }

/* bag: slides in from the right */
.bag {
  position: fixed; inset: 0 0 0 auto; margin: 0;
  width: min(440px, 100vw); max-width: 100vw; height: 100%; max-height: 100%;
  padding: 0; border: 0; border-left: 1px solid var(--t-line);
  background: var(--t-band); color: var(--t-bar-ink);
}
.bag::backdrop { background: rgba(12, 12, 12, 0.62); }
.bag[open] { animation: bag-in 0.36s cubic-bezier(0.2, 0.7, 0.2, 1); }
@keyframes bag-in { from { transform: translateX(100%); } to { transform: none; } }
.bag__panel { display: flex; flex-direction: column; height: 100%; }
.bag__top {
  display: flex; align-items: center; justify-content: space-between; gap: 16px;
  padding: calc(18px + env(safe-area-inset-top, 0px)) 24px 18px; border-bottom: 1px solid var(--t-line);
}
.bag__title { margin: 0; font: 400 36px/1 var(--display); }
.bag__list { flex: 1; overflow-y: auto; list-style: none; margin: 0; padding: 4px 24px; }
.bag__list[hidden], .bag__empty[hidden], .bag__foot[hidden], .bag__msg[hidden] { display: none; }
.bag__item { display: grid; grid-template-columns: 72px minmax(0, 1fr) auto; gap: 16px; align-items: center; padding: 16px 0; border-bottom: 1px solid var(--t-line); }
.bag__thumb { width: 72px; aspect-ratio: 467 / 610; }
.bag__info { display: grid; gap: 4px; justify-items: start; min-width: 0; }
.bag__name { font-size: 19px; line-height: 1.2; color: var(--t-bar-ink); text-decoration: none; }
.bag__name:hover { text-decoration: underline; text-decoration-color: var(--t-accent); }
.bag__sold { font-size: 14px; font-style: italic; color: var(--t-body); }
.bag__remove {
  background: none; border: 0; padding: 6px 0; min-height: 32px; cursor: pointer;
  color: var(--t-bar-soft); font: italic 14px/1 var(--serif); text-decoration: underline; text-underline-offset: 3px;
}
.bag__remove:hover { color: var(--t-bar-ink); }
.bag__right { display: grid; gap: 8px; justify-items: end; }
.bag__price { font-family: var(--display); font-size: 23px; }
.bag__pay { font-style: italic; color: var(--t-bar-ink); text-decoration-color: var(--t-accent); }
.bag__empty { flex: 1; display: grid; align-content: center; justify-items: center; gap: 14px; padding: 24px; text-align: center; }
.bag__empty p { margin: 0; font-size: 22px; font-style: italic; color: var(--t-body); }
.bag__browse { color: var(--t-bar-ink); text-decoration-color: var(--t-accent); text-underline-offset: 4px; }
.bag__foot { display: grid; gap: 12px; padding: 20px 24px calc(24px + env(safe-area-inset-bottom, 0px)); border-top: 1px solid var(--t-line); }
.bag__total { display: flex; align-items: baseline; justify-content: space-between; font-size: 18px; }
.bag__sum { font-family: var(--display); font-size: 32px; }
.bag__note { margin: 0; font-size: 14px; font-style: italic; color: var(--t-bar-soft); }
.bag__checkout {
  display: flex; justify-content: center; align-items: center; width: 100%; min-height: 50px;
  padding: 15px 30px; border: 1px solid var(--t-accent); background: var(--t-accent); color: var(--night-deep);
  font: 500 17px/1 var(--serif); letter-spacing: 0.02em; cursor: pointer;
  transition: background-color 0.2s, color 0.2s;
}
.bag__checkout:hover { background: transparent; color: var(--t-accent); }
.bag__checkout:focus-visible, .bag__close:focus-visible, .search__close:focus-visible { outline: 2px solid var(--t-accent); outline-offset: 3px; }
.bag__msg { margin: 0; font-size: 15px; line-height: 1.5; font-style: italic; color: var(--t-body); }
.sr-only {
  position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px;
  overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0;
}
@media (prefers-reduced-motion: reduce) {
  .bag[open] { animation: none; }
  .tool svg { transition: none; }
}

/* ---------- Footer info links (Shipping & Returns, Care, Contact) ---------- */
.site-footer .nav--info { flex-basis: 100%; justify-content: flex-start; gap: 8px 28px; margin-top: -8px; }
/* same font as the menu links above it, but smaller (Sam) */
.site-footer .nav--info a { color: var(--t-bar-ink); font-size: 12.5px; font-style: normal; }

/* ---------- Menus a touch smaller (Sam: same font, "just a little smaller") ---------- */
.nav a { font-size: 14.5px; letter-spacing: 0.01em; }
.menu-btn { font-size: 15px; }
@media (max-width: 760px) {
  .site-header .nav a { font-size: 18px; }
}

/* ---------- Menu hover line: a short line centered under the word (Sam: "make the line when hovering smaller") ---------- */
.nav a, .nav a:hover, .nav a[aria-current] { border-bottom-color: transparent; }
.nav a { position: relative; }
.nav a::after {
  content: ""; position: absolute; left: 50%; bottom: 2px; height: 1px; width: 0;
  background: var(--t-accent); transform: translateX(-50%); transition: width 0.25s ease;
}
.nav a:hover::after, .nav a:focus-visible::after, .nav a[aria-current="true"]::after, .nav a[aria-current="page"]::after { width: 36%; }
@media (max-width: 760px) {
  /* the phone menu keeps its thin dividers between rows, no hover line */
  .site-header .nav a, .site-header .nav a:hover, .site-header .nav a[aria-current] { border-bottom-color: var(--t-line); }
  .site-header .nav a::after { display: none; }
}
@media (prefers-reduced-motion: reduce) { .nav a::after { transition: none; } }

/* Footer: Instagram + TikTok icons, centered on their own row (added by shop-tools.js) */
.site-footer .social { flex-basis: 100%; display: flex; justify-content: center; gap: 16px; list-style: none; margin: 0; padding: 0; }
.site-footer .social a, .site-footer .social span {
  display: grid; place-items: center; width: 44px; height: 44px; border-radius: 50%;
  color: var(--t-bar-ink); border: 1px solid var(--t-line, rgba(218, 214, 44, 0.22));
  transition: border-color 0.2s, background-color 0.2s;
}
.site-footer .social span { cursor: default; }
.site-footer .social a:hover { border-color: currentColor; background: rgba(218, 214, 44, 0.08); }
.site-footer .social svg { width: 20px; height: 20px; fill: none; stroke: currentColor; stroke-width: 1.5; stroke-linecap: round; stroke-linejoin: round; }
.site-footer .social svg .fill { fill: currentColor; stroke: none; }
@media (prefers-reduced-motion: reduce) { .site-footer .social a { transition: none; } }
