/* Header and navigation */
.site-header {
  position: relative;
  z-index: var(--z-header);
  min-height: var(--header-height);
  border-bottom: 1px solid rgb(237 220 210 / 72%);
  background: rgb(255 248 244 / 88%);
  backdrop-filter: blur(14px);
}

.site-header__inner {
  display: flex;
  min-height: var(--header-height);
  align-items: center;
  justify-content: space-between;
  gap: var(--space-4);
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: var(--space-3);
  color: var(--text-primary);
  font-weight: 800;
  letter-spacing: -0.02em;
  text-decoration: none;
}

.brand:hover {
  color: var(--color-brand-700);
}

.brand__mark {
  display: grid;
  width: 2.35rem;
  height: 2.35rem;
  place-items: center;
  transform: rotate(-7deg);
  border-radius: 45% 45% 50% 50%;
  background: linear-gradient(145deg, var(--color-brand-300), var(--color-brand-600));
  box-shadow: 0 6px 16px rgb(169 24 94 / 24%);
  color: var(--color-white);
  font-family: var(--font-display);
  font-size: var(--font-size-xl);
  font-style: italic;
}

.brand__logo {
  display: block;
  width: auto;
  max-width: min(11.25rem, 30vw);
  height: auto;
  max-height: 3rem;
  object-fit: contain;
}

.navigation {
  display: flex;
  align-items: center;
  gap: var(--space-4);
}

@media (max-width: 48rem) {
  .site-header__inner {
    align-items: flex-start;
    flex-direction: column;
    gap: var(--space-3);
    padding-block: var(--space-3);
  }

  .navigation {
    width: 100%;
    flex-wrap: wrap;
    justify-content: flex-start;
    gap: var(--space-2) var(--space-4);
  }
}

.navigation__link {
  position: relative;
  padding-block: var(--space-2);
  color: var(--text-secondary);
  font-size: var(--font-size-sm);
  font-weight: 700;
  text-decoration: none;
}

.navigation__link::after {
  position: absolute;
  right: 0;
  bottom: 0;
  left: 0;
  height: 2px;
  transform: scaleX(0);
  transform-origin: right;
  background: var(--color-brand-500);
  content: "";
  transition: transform var(--duration-normal) var(--ease-emphasized);
}

.navigation__link:hover::after,
.navigation__link[aria-current="page"]::after {
  transform: scaleX(1);
  transform-origin: left;
}

/* Buttons */
.button-group {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: var(--space-4);
}

.button {
  display: inline-flex;
  min-height: var(--control-height);
  align-items: center;
  justify-content: center;
  gap: var(--space-2);
  padding: 0.7rem var(--space-5);
  border: 1px solid transparent;
  border-radius: var(--radius-pill);
  cursor: pointer;
  font-weight: 800;
  line-height: 1.2;
  text-align: center;
  text-decoration: none;
  transition:
    transform var(--duration-fast) var(--ease-standard),
    background-color var(--duration-fast) var(--ease-standard),
    border-color var(--duration-fast) var(--ease-standard),
    box-shadow var(--duration-fast) var(--ease-standard);
}

.button:hover {
  transform: translateY(-2px);
}

.button:active {
  transform: translateY(0);
}

.button:disabled,
.button[aria-disabled="true"] {
  cursor: not-allowed;
  opacity: 0.62;
  pointer-events: none;
}

.button--primary {
  background: var(--action-primary);
  box-shadow: 0 10px 24px rgb(169 24 94 / 22%);
  color: var(--text-inverse);
}

.button--primary:hover {
  background: var(--action-primary-hover);
  box-shadow: 0 14px 30px rgb(133 21 76 / 28%);
  color: var(--text-inverse);
}

.button--secondary {
  border-color: var(--border-strong);
  background: var(--surface-raised);
  color: var(--color-brand-700);
}

.button--secondary:hover {
  border-color: var(--color-brand-400);
  background: var(--surface-soft);
}

.button--ghost {
  background: transparent;
  color: var(--text-primary);
}

.button--icon {
  width: var(--control-height);
  padding: 0;
}

/* Badges, headings, breadcrumbs, prices */
.badge {
  display: inline-flex;
  width: fit-content;
  min-height: 1.75rem;
  align-items: center;
  padding: var(--space-1) var(--space-3);
  border-radius: var(--radius-pill);
  background: var(--color-cream-200);
  color: var(--text-secondary);
  font-size: var(--font-size-xs);
  font-weight: 800;
  letter-spacing: 0.035em;
  line-height: 1.2;
}

.badge--accent {
  background: var(--color-brand-100);
  color: var(--color-brand-800);
}

.badge--success {
  background: #e3f4ec;
  color: var(--color-success);
}

.section-heading {
  display: grid;
  gap: var(--space-3);
  margin-bottom: var(--space-8);
}

.section-heading__eyebrow {
  color: var(--color-brand-700);
  font-size: var(--font-size-xs);
  font-weight: 800;
  letter-spacing: var(--letter-spacing-wide);
  text-transform: uppercase;
}

.section-heading__title {
  max-width: 18ch;
  margin: 0;
  font-family: var(--font-display);
  font-size: var(--font-size-2xl);
  letter-spacing: var(--letter-spacing-tight);
}

.breadcrumbs {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-2);
  align-items: center;
  padding: 0;
  color: var(--text-muted);
  font-size: var(--font-size-sm);
  list-style: none;
}

.breadcrumbs li:not(:last-child)::after {
  margin-left: var(--space-2);
  color: var(--border-strong);
  content: "/";
}

.price {
  display: inline-flex;
  flex-wrap: wrap;
  align-items: baseline;
  gap: var(--space-2);
  font-variant-numeric: tabular-nums;
}

.price__current {
  color: var(--text-primary);
  font-size: var(--font-size-xl);
  font-weight: 850;
}

.price__before {
  color: var(--text-muted);
  font-size: var(--font-size-sm);
  text-decoration: line-through;
}

/* Product card foundation */
.product-card {
  position: relative;
  overflow: hidden;
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-lg);
  background: var(--surface-raised);
  box-shadow: var(--shadow-xs);
  transition:
    transform var(--duration-normal) var(--ease-emphasized),
    box-shadow var(--duration-normal) var(--ease-emphasized);
}

.product-card:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-md);
}

.product-card__media {
  overflow: hidden;
  aspect-ratio: 4 / 5;
  background: var(--color-cream-200);
}

.product-card__media img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform var(--duration-slow) var(--ease-emphasized);
}

.product-card:hover .product-card__media img {
  transform: scale(1.025);
}

.product-card__body {
  display: grid;
  gap: var(--space-3);
  padding: var(--space-5);
}

.product-card__title {
  margin: 0;
  font-size: var(--font-size-md);
}

.product-card__link {
  color: inherit;
  text-decoration: none;
}

.product-card__link::after {
  position: absolute;
  inset: 0;
  content: "";
}

/* Forms and variant selector */
.form-field {
  display: grid;
  gap: var(--space-2);
}

.form-field__label,
.form-field legend {
  color: var(--text-primary);
  font-size: var(--font-size-sm);
  font-weight: 750;
}

.form-field__hint,
.form-field__error {
  margin: 0;
  font-size: var(--font-size-sm);
}

.form-field__hint {
  color: var(--text-muted);
}

.form-field__error {
  color: var(--color-danger);
}

.input,
.select,
.textarea {
  width: 100%;
  min-height: var(--control-height);
  padding: 0.75rem var(--space-4);
  border: 1px solid var(--border-strong);
  border-radius: var(--radius-sm);
  background: var(--surface-raised);
  color: var(--text-primary);
  transition:
    border-color var(--duration-fast) var(--ease-standard),
    box-shadow var(--duration-fast) var(--ease-standard);
}

.textarea {
  min-height: 8rem;
  resize: vertical;
}

.input:hover,
.select:hover,
.textarea:hover {
  border-color: var(--color-brand-400);
}

.input:focus,
.select:focus,
.textarea:focus {
  border-color: var(--focus-ring);
  box-shadow: 0 0 0 3px rgb(23 107 143 / 16%);
  outline: none;
}

.input[aria-invalid="true"],
.select[aria-invalid="true"],
.textarea[aria-invalid="true"] {
  border-color: var(--color-danger);
}

.variant-selector {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-2);
  padding: 0;
  border: 0;
}

.variant-selector__option {
  position: relative;
}

.variant-selector__option input {
  position: absolute;
  width: 1px;
  height: 1px;
  opacity: 0;
}

.variant-selector__label {
  display: grid;
  min-width: 3rem;
  min-height: var(--control-height);
  place-items: center;
  padding: var(--space-2) var(--space-4);
  border: 1px solid var(--border-strong);
  border-radius: var(--radius-pill);
  background: var(--surface-raised);
  cursor: pointer;
  font-size: var(--font-size-sm);
  font-weight: 750;
}

.variant-selector__option input:checked + .variant-selector__label {
  border-color: var(--color-brand-700);
  background: var(--color-brand-700);
  color: var(--text-inverse);
}

.variant-selector__option input:focus-visible + .variant-selector__label {
  outline: 3px solid var(--focus-ring);
  outline-offset: 3px;
}

.variant-selector__option input:disabled + .variant-selector__label {
  cursor: not-allowed;
  opacity: 0.5;
  text-decoration: line-through;
}

/* Feedback and transient surfaces */
.alert {
  display: grid;
  grid-template-columns: auto 1fr;
  gap: var(--space-3);
  padding: var(--space-4);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
  background: var(--surface-raised);
}

.alert--success {
  border-color: #acd9c6;
  background: #f0faf6;
  color: var(--color-success);
}

.alert--warning {
  border-color: #ead09f;
  background: #fff9e9;
  color: var(--color-warning);
}

.alert--danger {
  border-color: #efb5bf;
  background: #fff3f5;
  color: var(--color-danger);
}

.dialog,
.drawer {
  max-width: min(100% - (var(--space-4) * 2), 34rem);
  max-height: min(90vh, 50rem);
  padding: 0;
  border: 0;
  border-radius: var(--radius-lg);
  background: var(--surface-raised);
  box-shadow: var(--shadow-lg);
  color: var(--text-primary);
}

.dialog::backdrop,
.drawer::backdrop {
  background: var(--surface-scrim);
  backdrop-filter: blur(3px);
}

.dialog[open],
.drawer[open] {
  animation: surface-enter var(--duration-normal) var(--ease-emphasized);
}

.dialog__header,
.dialog__body,
.dialog__footer,
.drawer__header,
.drawer__body,
.drawer__footer {
  padding: var(--space-5);
}

.dialog__header,
.drawer__header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--space-4);
  border-bottom: 1px solid var(--border-subtle);
}

.dialog__footer,
.drawer__footer {
  border-top: 1px solid var(--border-subtle);
}

.drawer {
  width: min(100%, 28rem);
  height: 100%;
  max-height: 100%;
  margin: 0 0 0 auto;
  border-radius: var(--radius-lg) 0 0 var(--radius-lg);
}

.drawer[open] {
  animation-name: drawer-enter;
}

/* Skeletons and empty states */
.skeleton {
  overflow: hidden;
  border-radius: var(--radius-sm);
  background: var(--color-cream-200);
}

.skeleton::after {
  display: block;
  height: 100%;
  transform: translateX(-100%);
  background: linear-gradient(90deg, transparent, rgb(255 255 255 / 68%), transparent);
  animation: skeleton-shimmer 1.5s infinite;
  content: "";
}

.empty-state {
  display: grid;
  max-width: 34rem;
  justify-items: center;
  gap: var(--space-4);
  margin-inline: auto;
  padding: var(--space-10) var(--space-5);
  border: 1px dashed var(--border-strong);
  border-radius: var(--radius-lg);
  background: var(--surface-soft);
  text-align: center;
}

.empty-state__icon {
  display: grid;
  width: 4rem;
  height: 4rem;
  place-items: center;
  border-radius: 50%;
  background: var(--color-brand-100);
  color: var(--color-brand-700);
  font-size: var(--font-size-2xl);
}

.empty-state > * {
  margin: 0;
}

/* Phase 01 visual foundation page */
.foundation-hero {
  position: relative;
  overflow: hidden;
  min-height: calc(100svh - var(--header-height));
  padding-block: var(--space-12) var(--space-16);
  isolation: isolate;
}

.foundation-hero::before {
  position: absolute;
  z-index: -2;
  inset: 0;
  background:
    radial-gradient(circle at 5% 10%, rgb(248 180 208 / 48%), transparent 30rem),
    radial-gradient(circle at 92% 80%, rgb(202 166 195 / 35%), transparent 31rem),
    linear-gradient(150deg, var(--color-cream-50), var(--color-cream-100));
  content: "";
}

.foundation-hero__glow {
  position: absolute;
  z-index: -1;
  top: 10%;
  right: -8rem;
  width: 18rem;
  height: 18rem;
  border: 1px solid rgb(198 37 114 / 16%);
  border-radius: 45% 55% 42% 58%;
  animation: slow-float 8s var(--ease-standard) infinite alternate;
}

.foundation-hero__layout {
  display: grid;
  align-items: center;
  gap: var(--space-12);
}

.foundation-hero__content {
  display: grid;
  max-width: 42rem;
  gap: var(--space-6);
}

.foundation-hero__title {
  max-width: 10ch;
  margin: 0;
  font-family: var(--font-display);
  font-size: var(--font-size-3xl);
  font-weight: 500;
  letter-spacing: var(--letter-spacing-tight);
  line-height: var(--line-height-tight);
}

.foundation-hero__title span {
  color: var(--color-brand-600);
  font-style: italic;
}

.foundation-hero__intro {
  max-width: 37rem;
  margin: 0;
  color: var(--text-secondary);
  font-size: var(--font-size-lg);
}

.foundation-hero__note {
  color: var(--text-muted);
  font-size: var(--font-size-sm);
  font-weight: 650;
}

.foundation-art {
  position: relative;
  width: min(82vw, 22rem);
  aspect-ratio: 4 / 5;
  justify-self: center;
}

.foundation-art__card {
  position: absolute;
  inset: 0;
  border-radius: clamp(2rem, 8vw, 5rem);
}

.foundation-art__card--back {
  transform: rotate(8deg) translate(0.75rem, 0.25rem);
  background: var(--color-plum-700);
  box-shadow: var(--shadow-lg);
}

.foundation-art__card--front {
  display: grid;
  place-items: center;
  transform: rotate(-4deg);
  background:
    linear-gradient(rgb(255 255 255 / 18%), transparent),
    linear-gradient(145deg, var(--color-brand-200), var(--color-brand-500));
  color: var(--color-brand-900);
}

.foundation-art__card--front::before,
.foundation-art__card--front::after {
  position: absolute;
  border: 1px solid rgb(67 13 41 / 22%);
  border-radius: inherit;
  content: "";
}

.foundation-art__card--front::before {
  inset: var(--space-4);
}

.foundation-art__card--front::after {
  inset: var(--space-6);
  border-style: dashed;
}

.foundation-art__heart {
  transform: translateY(-0.5rem);
  font-family: var(--font-display);
  font-size: 9rem;
  line-height: 1;
  text-shadow: 0 8px 20px rgb(67 13 41 / 16%);
}

.foundation-art p {
  position: absolute;
  bottom: 18%;
  margin: 0;
  font-family: var(--font-display);
  font-size: var(--font-size-xl);
  font-style: italic;
}

.foundation-art__spark {
  position: absolute;
  color: var(--color-cream-50);
  font-size: var(--font-size-xl);
}

.foundation-art__spark--one {
  top: 16%;
  left: 18%;
}

.foundation-art__spark--two {
  right: 17%;
  bottom: 17%;
}

.foundation-promise {
  padding-block: var(--space-16);
  background: var(--surface-raised);
}

.foundation-promise__grid {
  display: grid;
  gap: var(--space-5);
}

.promise-card {
  padding: var(--space-6);
  border-top: 1px solid var(--border-subtle);
}

.promise-card__number {
  color: var(--color-brand-600);
  font-family: var(--font-mono);
  font-size: var(--font-size-xs);
}

.promise-card h2 {
  margin-block: var(--space-4) var(--space-2);
  font-family: var(--font-display);
  font-size: var(--font-size-xl);
}

.promise-card p {
  margin: 0;
  color: var(--text-secondary);
}

@keyframes surface-enter {
  from {
    transform: translateY(0.75rem) scale(0.98);
    opacity: 0;
  }
}

@keyframes drawer-enter {
  from {
    transform: translateX(100%);
  }
}

@keyframes skeleton-shimmer {
  to {
    transform: translateX(100%);
  }
}

@keyframes slow-float {
  to {
    transform: translate(-1rem, 1.5rem) rotate(8deg);
  }
}

@media (min-width: 48rem) {
  .foundation-hero {
    padding-block: var(--space-16) var(--space-20);
  }

  .foundation-hero__layout {
    grid-template-columns: minmax(0, 1.1fr) minmax(18rem, 0.9fr);
  }

  .foundation-art {
    width: min(34vw, 27rem);
  }

  .foundation-promise__grid {
    grid-template-columns: repeat(3, 1fr);
  }

  .promise-card {
    padding: var(--space-8);
    border-top: 0;
    border-left: 1px solid var(--border-subtle);
  }
}

@media (min-width: 64rem) {
  .foundation-hero__layout {
    gap: var(--space-20);
  }
}
