:root {
  color-scheme: light dark;
  --bg: light-dark(#f7f6f3, #15161a);
  --surface: light-dark(#ffffff, #1f2026);
  --text: light-dark(#1d1d1f, #ececf1);
  --muted: light-dark(#5c5f66, #a3a6ad);
  --border: light-dark(#e3e1dc, #33353d);
  --accent: light-dark(#3949ab, #8c9eff);
  --accent-text: light-dark(#ffffff, #10123a);
  --danger: light-dark(#b3261e, #ffb4ab);
  --success: light-dark(#1b7a3a, #7fd99a);
  --radius: 12px;
  --shadow: 0 1px 2px rgb(0 0 0 / 0.06), 0 4px 16px rgb(0 0 0 / 0.05);
  font-family:
    system-ui,
    -apple-system,
    'Segoe UI',
    Roboto,
    sans-serif;
  accent-color: var(--accent);
}

/* "Release v2": deliberate small visual changes for the visual regression demo. */
:root[data-release='2'] {
  --accent: light-dark(#c2185b, #ff8ab4);
  --radius: 4px;
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  line-height: 1.5;
}

a {
  color: var(--accent);
}
code {
  font-size: 0.9em;
}
h1,
h2,
h3 {
  line-height: 1.2;
  text-wrap: balance;
}

.notice {
  padding: 0.5rem 1rem;
  text-align: center;
  font-size: 0.875rem;
  background: light-dark(#fff4d6, #3a3220);
  color: light-dark(#5a4300, #f3dfa6);
}
.notice a {
  color: inherit;
}

.site-header {
  display: flex;
  flex-wrap: wrap;
  gap: 1rem;
  align-items: center;
  justify-content: space-between;
  padding: 1rem clamp(1rem, 4vw, 3rem);
  background: var(--surface);
  border-bottom: 1px solid var(--border);
}
.brand {
  font-weight: 700;
  font-size: 1.25rem;
  color: var(--text);
  text-decoration: none;
}
.brand-mark {
  color: var(--accent);
}
.site-header nav {
  display: flex;
  flex-wrap: wrap;
  gap: 1.25rem;
}
.site-header nav a {
  color: var(--text);
  text-decoration: none;
}
.site-header nav a:hover {
  color: var(--accent);
}

.badge {
  display: inline-block;
  min-width: 1.5em;
  padding: 0 0.4em;
  border-radius: 999px;
  background: var(--accent);
  color: var(--accent-text);
  font-size: 0.8rem;
  text-align: center;
}

main {
  max-width: 72rem;
  margin-inline: auto;
  padding-inline: clamp(1rem, 4vw, 3rem);
}

.hero {
  padding-block: clamp(2.5rem, 8vw, 5rem);
  text-align: center;
}
.hero h1 {
  font-size: clamp(2rem, 6vw, 3.25rem);
  margin: 0 0 0.5rem;
}
.hero-sub {
  color: var(--muted);
  font-size: 1.125rem;
  margin: 0 0 1.5rem;
}

.btn {
  display: inline-block;
  padding: 0.65rem 1.25rem;
  border: 1px solid transparent;
  border-radius: var(--radius);
  font: inherit;
  font-weight: 600;
  text-decoration: none;
  cursor: pointer;
}
.btn-primary {
  background: var(--accent);
  color: var(--accent-text);
}
.btn-primary:hover {
  filter: brightness(1.08);
}
.btn-ghost {
  background: transparent;
  border-color: var(--border);
  color: var(--text);
}
.btn:focus-visible,
a:focus-visible,
input:focus-visible,
select:focus-visible {
  outline: 3px solid var(--accent);
  outline-offset: 2px;
}

.section {
  padding-block: 2.5rem;
  border-top: 1px solid var(--border);
}
.section-head {
  display: flex;
  flex-wrap: wrap;
  gap: 1rem;
  align-items: center;
  justify-content: space-between;
}
.section-head h2 {
  margin: 0;
}
.section-tools {
  display: flex;
  flex-wrap: wrap;
  gap: 1rem;
  align-items: center;
}
.muted {
  color: var(--muted);
}
.link-subtle {
  font-size: 0.9rem;
}
.status {
  color: var(--muted);
}
.status.error {
  color: var(--danger);
}
.status:empty {
  display: none;
}

input,
select {
  font: inherit;
  color: inherit;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: calc(var(--radius) * 0.6);
  padding: 0.55rem 0.75rem;
}
.search input {
  width: min(16rem, 100%);
}

.product-grid,
.team-grid,
.cart-list {
  list-style: none;
  margin: 0;
  padding: 0;
}
.product-grid {
  display: grid;
  gap: 1.25rem;
  grid-template-columns: repeat(auto-fill, minmax(min(14rem, 100%), 1fr));
  margin-top: 1.5rem;
}
.product-card {
  display: flex;
  flex-direction: column;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  overflow: hidden;
}
.product-card img {
  width: 100%;
  aspect-ratio: 1;
  object-fit: contain;
  background: light-dark(#f0efeb, #26272e);
}
.product-body {
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
  padding: 1rem;
  flex: 1;
}
.product-body h3 {
  margin: 0;
  font-size: 1rem;
}
.product-meta {
  display: flex;
  justify-content: space-between;
  color: var(--muted);
  font-size: 0.875rem;
}
.price {
  font-size: 1.25rem;
  font-weight: 700;
}
.product-body .btn {
  margin-top: auto;
}
.stock-low {
  color: var(--danger);
}

.team-grid {
  display: grid;
  gap: 1rem;
  grid-template-columns: repeat(auto-fill, minmax(min(12rem, 100%), 1fr));
}
.member {
  display: flex;
  gap: 0.75rem;
  align-items: center;
  padding: 0.75rem;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
}
.member img {
  width: 3rem;
  height: 3rem;
  border-radius: 50%;
  background: var(--bg);
}
.member small {
  display: block;
  color: var(--muted);
}

.checkout {
  display: grid;
  gap: 2rem;
  grid-template-columns: repeat(auto-fit, minmax(min(20rem, 100%), 1fr));
  align-items: start;
}
.cart-panel,
.checkout-form {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1.5rem;
}
.cart-panel h2,
.checkout-form h3 {
  margin-top: 0;
}
.cart-list li {
  display: flex;
  gap: 0.5rem;
  align-items: center;
  justify-content: space-between;
  padding-block: 0.5rem;
  border-bottom: 1px solid var(--border);
}
.cart-list button {
  font: inherit;
  background: none;
  border: 0;
  color: var(--danger);
  cursor: pointer;
}
.cart-total {
  display: flex;
  justify-content: space-between;
  font-size: 1.125rem;
  margin-bottom: 0;
}

.field {
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
  margin-bottom: 1rem;
}
.field label {
  font-weight: 600;
}
.hint {
  color: var(--muted);
  font-size: 0.85rem;
}
.error-msg {
  display: none;
  color: var(--danger);
  font-size: 0.875rem;
}
:is(input, select):user-invalid {
  border-color: var(--danger);
  border-width: 2px;
}
:is(input, select):user-invalid + .error-msg {
  display: block;
}
:is(input, select):user-valid {
  border-color: var(--success);
}
.check {
  display: flex;
  gap: 0.5rem;
  align-items: center;
  margin-bottom: 1rem;
}
.form-message {
  min-height: 1.5em;
  margin: 0 0 0.75rem;
}
.form-message.error {
  color: var(--danger);
}

.newsletter-frame {
  width: 100%;
  height: 12rem;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: var(--surface);
}

.site-footer {
  max-width: 72rem;
  margin: 2rem auto 0;
  padding: 2rem clamp(1rem, 4vw, 3rem);
  border-top: 1px solid var(--border);
}
.demo-controls {
  border: 1px dashed var(--border);
  border-radius: var(--radius);
  padding: 1rem;
}
.demo-controls .check {
  margin: 0;
  flex-wrap: wrap;
}

dialog {
  max-width: min(28rem, calc(100% - 2rem));
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: var(--surface);
  color: var(--text);
  padding: 1.5rem;
}
dialog::backdrop {
  background: rgb(0 0 0 / 0.45);
}
dialog h2 {
  margin-top: 0;
}

.visually-hidden:where(:not(:focus-within, :active)) {
  position: absolute !important;
  clip-path: inset(50%) !important;
  overflow: hidden !important;
  width: 1px !important;
  height: 1px !important;
  margin: -1px !important;
  padding: 0 !important;
  border: 0 !important;
  white-space: nowrap !important;
}
