/* ==========================================================================
   Enigma — Kozmetika: brands, day/night routine, products
   ========================================================================== */

.phero__band--cream { aspect-ratio: 3 / 1; }

/* ---------- Brands ---------- */
.brands { padding: var(--space-xl) var(--gutter) var(--space-l); }
.brands__list { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: clamp(1.5rem, 3vw, 3rem); }
.brand { display: grid; gap: 0.9rem; align-content: start; padding-top: 1.5rem; border-top: 1px solid var(--line-strong); }
.brand__name { font-family: var(--f-serif); font-size: clamp(2.4rem, 1.4rem + 3vw, 4.6rem); line-height: 0.95; transition: font-style 0s, color var(--t-med); }
.brand:hover .brand__name { font-style: italic; color: var(--fuchsia); }
.brand__note { color: var(--muted); max-width: 32ch; }
@media (max-width: 860px) { .brands__list { grid-template-columns: 1fr; } }

/* ---------- Routine: the section turns from day to night ---------- */
.routine {
  position: relative; overflow: hidden; display: grid; gap: var(--space-l); padding: var(--space-xl) var(--gutter);
  transition: background-color 1100ms var(--ease-soft), color 1100ms var(--ease-soft);
}
.routine__head { position: relative; z-index: 1; display: grid; gap: 1.2rem; justify-items: start; }
.routine__head .h2 em { transition: color 1100ms; }
.routine__sky { position: absolute; top: clamp(2rem, 6vw, 5rem); right: var(--gutter); width: clamp(160px, 22vw, 300px); aspect-ratio: 2 / 1; }
.routine__sky::before {
  content: ''; position: absolute; inset: 0 0 -100% 0; border-radius: 50%;
  border: 1px dashed var(--line-strong); clip-path: inset(0 0 50% 0);
}
.routine__orb {
  --ang: -58deg;
  position: absolute; left: 50%; bottom: 0; width: 22%; aspect-ratio: 1; margin-left: -11%; margin-bottom: -11%; border-radius: 50%;
  background: radial-gradient(circle at 40% 38%, #FFE7C2, #F7A35C 62%, #E9733F);
  box-shadow: 0 0 40px 8px rgba(247, 163, 92, 0.45);
  transform: rotate(var(--ang)) translateY(clamp(-150px, -11vw, -80px)) rotate(calc(-1 * var(--ang)));
  transition: transform 1300ms var(--ease-io), background 900ms, box-shadow 900ms;
}
.routine.is-night .routine__orb {
  --ang: 58deg;
  background: radial-gradient(circle at 40% 38%, #FFFDF8, #E9E1D6 70%);
  box-shadow: inset -10px -4px 0 0 rgba(25, 17, 15, 0.25), 0 0 40px 4px rgba(242, 236, 230, 0.25);
}

.switch { position: relative; display: inline-grid; grid-template-columns: 1fr 1fr; padding: 4px; border-radius: var(--r-pill); box-shadow: inset 0 0 0 1px var(--line-strong); }
.switch__opt { position: relative; z-index: 1; min-width: 7.5rem; min-height: 46px; padding: 0.5rem 1.4rem; border-radius: var(--r-pill); font-weight: 600; transition: color var(--t-med); }
.switch__opt[aria-pressed="true"] { color: var(--bg); }
.switch__thumb { position: absolute; top: 4px; bottom: 4px; left: 4px; width: calc(50% - 4px); border-radius: var(--r-pill); background: var(--fg); transition: transform 700ms var(--ease-out), background-color 1100ms; }
.routine.is-night .switch__thumb { transform: translateX(100%); }

.routine__list { position: relative; z-index: 1; display: flex; gap: clamp(0.75rem, 1.5vw, 1.5rem); counter-reset: step; }
.rstep {
  counter-increment: step; flex: 1 1 0; min-width: 0; display: grid; gap: 1rem; align-content: start;
  padding: 1.25rem 1.25rem 1.5rem; border-radius: var(--r-card); box-shadow: inset 0 0 0 1px var(--line);
  transition: box-shadow 1100ms; will-change: transform;
}
.rstep[hidden] { display: none; }
.rstep__n::before { content: counter(step, decimal-leading-zero); font-size: 0.78rem; font-weight: 600; letter-spacing: 0.16em; color: var(--accent); }
.rstep__media { width: 92px; aspect-ratio: 1; border-radius: 50%; overflow: hidden; background: var(--pearl-2); }
.rstep__media img { width: 100%; height: 100%; object-fit: cover; }
.rstep__body { display: grid; gap: 0.25rem; }
.rstep__step { font-size: var(--fs-label); font-weight: 600; letter-spacing: 0.16em; text-transform: uppercase; color: var(--muted); }
.rstep__name { font-family: var(--f-serif); font-size: clamp(1.35rem, 1.1rem + 0.7vw, 1.8rem); line-height: 1.05; }
.rstep.is-leaving { opacity: 0; transform: scale(0.94); transition: opacity 220ms, transform 260ms; }
.rstep.is-entering { animation: stepIn 700ms var(--ease-out) both; }
@keyframes stepIn { from { opacity: 0; transform: translateY(16px) scale(0.96); } }
.routine .note { position: relative; z-index: 1; }

@media (max-width: 960px) {
  .routine__list { flex-direction: column; }
  .rstep { grid-template-columns: auto 1fr; grid-template-rows: auto auto; align-items: center; gap: 0.4rem 1rem; padding: 1rem 1.25rem; }
  .rstep__n { grid-column: 1 / -1; }
  .rstep__media { width: 72px; }
  .routine__sky { top: 1.5rem; width: 130px; opacity: 0.8; }
  .routine__orb { transform: rotate(var(--ang)) translateY(-65px) rotate(calc(-1 * var(--ang))); }
}

/* ---------- Products ---------- */
.products { padding: var(--space-xl) var(--gutter); }
.products__list { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: var(--space-m) clamp(1rem, 2vw, 2rem); }
.product { display: grid; gap: 1.2rem; align-content: start; }
.product--alt { margin-top: clamp(0rem, 6vw, 6rem); }
.product__media { aspect-ratio: 4 / 5; overflow: hidden; border-radius: 999px 999px var(--r-card) var(--r-card); background: var(--pearl-2); }
.product__media img { width: 100%; height: 100%; object-fit: cover; }
.product__body { display: grid; gap: 0.55rem; }
.product__name { font-family: var(--f-serif); font-size: var(--fs-h3); }
.product__lead { color: var(--muted); }
@media (max-width: 960px) { .products__list { grid-template-columns: 1fr 1fr; } .product--alt { margin-top: 3rem; } }
@media (max-width: 560px) { .products__list { grid-template-columns: 1fr; } .product--alt { margin-top: 0; } }
