/* =========================================================
   ZAANEX STORE · base
   Tokens, reset, typography and shared primitives
   ========================================================= */

:root {
  --paper: #f4f1e8;
  --paper-soft: #ede9dd;
  --paper-deep: #e3ded0;
  --cream: #fbf9f2;
  --white: #fffdf8;
  --ink: #12150f;
  --ink-2: #22271e;
  --ink-soft: #4d5347;
  --ink-muted: #797e71;
  --lime: #d8ff63;
  --lime-bright: #e4ff8c;
  --lime-deep: #b7dc3f;
  --coral: #ff6a3d;
  --coral-soft: #ff9b7e;
  --line: rgba(18, 21, 15, 0.14);
  --line-strong: rgba(18, 21, 15, 0.26);
  --line-light: rgba(255, 255, 255, 0.14);
  --success: #26734d;
  --danger: #c13d2a;
  --font-sans: "Segoe UI Variable Text", "Segoe UI", system-ui, -apple-system,
    BlinkMacSystemFont, "Helvetica Neue", Arial, sans-serif;
  --font-display: "Bahnschrift", "Segoe UI Variable Display", "Aptos Display",
    "Segoe UI", system-ui, sans-serif;
  --font-serif: "Iowan Old Style", "Palatino Linotype", "Book Antiqua", Georgia,
    "Times New Roman", serif;
  --radius-xs: 8px;
  --radius-sm: 12px;
  --radius-md: 18px;
  --radius-lg: 28px;
  --radius-xl: 40px;
  --shadow-sm: 0 6px 18px rgba(18, 21, 15, 0.06);
  --shadow-md: 0 18px 50px rgba(18, 21, 15, 0.12);
  --shadow-lg: 0 34px 90px rgba(18, 21, 15, 0.18);
  --container: 1280px;
  --header-height: 76px;
  --ease-out: cubic-bezier(0.22, 1, 0.36, 1);
  --ease-spring: cubic-bezier(0.34, 1.56, 0.64, 1);
}

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

html {
  scroll-behavior: smooth;
  scroll-padding-top: calc(var(--header-height) + 20px);
}

body {
  margin: 0;
  min-width: 320px;
  background: var(--paper);
  color: var(--ink);
  font-family: var(--font-sans);
  font-size: 16px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

body.is-locked {
  overflow: hidden;
}

h1,
h2,
h3,
h4,
p,
figure,
blockquote {
  margin: 0;
}

h1,
h2,
h3,
h4 {
  font-family: var(--font-display);
  font-weight: 650;
  line-height: 1.04;
  letter-spacing: -0.035em;
}

ul,
ol {
  margin: 0;
  padding: 0;
  list-style: none;
}

img {
  display: block;
  max-width: 100%;
}

a {
  color: inherit;
  text-decoration: none;
}

button,
input,
select,
textarea {
  font: inherit;
  color: inherit;
}

button {
  border: 0;
  background: none;
  cursor: pointer;
}

button:disabled {
  cursor: not-allowed;
  opacity: 0.55;
}

svg {
  display: block;
}

::selection {
  background: var(--lime);
  color: var(--ink);
}

:focus-visible {
  outline: 2px solid var(--ink);
  outline-offset: 3px;
}

[hidden] {
  display: none !important;
}

.container {
  width: min(100% - 48px, var(--container));
  margin-inline: auto;
}

.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;
}

.skip-link {
  position: fixed;
  left: 16px;
  top: 12px;
  z-index: 200;
  transform: translateY(-160%);
  border-radius: 999px;
  background: var(--ink);
  color: var(--white);
  padding: 10px 18px;
  font-size: 0.85rem;
  transition: transform 0.2s ease;
}

.skip-link:focus {
  transform: translateY(0);
}

.eyebrow {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 0.72rem;
  font-weight: 650;
  letter-spacing: 0.14em;
  line-height: 1.4;
  text-transform: uppercase;
  color: var(--ink-soft);
}

.eyebrow-dot {
  width: 7px;
  height: 7px;
  flex: 0 0 auto;
  border-radius: 50%;
  background: var(--coral);
  box-shadow: 0 0 0 3px rgba(255, 106, 61, 0.16);
}

.eyebrow-light {
  color: rgba(255, 253, 248, 0.62);
}

.eyebrow-light .eyebrow-dot {
  background: var(--lime);
  box-shadow: 0 0 0 3px rgba(216, 255, 99, 0.14);
}

.button {
  --btn-bg: var(--ink);
  --btn-color: var(--white);
  --btn-border: var(--ink);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  min-height: 52px;
  padding: 0 24px;
  border: 1px solid var(--btn-border);
  border-radius: 999px;
  background: var(--btn-bg);
  color: var(--btn-color);
  font-family: var(--font-sans);
  font-size: 0.92rem;
  font-weight: 650;
  letter-spacing: -0.01em;
  line-height: 1;
  cursor: pointer;
  transition: transform 0.25s var(--ease-out), background 0.25s ease,
    color 0.25s ease, border-color 0.25s ease, box-shadow 0.25s ease;
}

.button svg {
  transition: transform 0.3s var(--ease-out);
}

.button:hover {
  transform: translateY(-2px);
  box-shadow: 0 12px 24px rgba(18, 21, 15, 0.14);
}

.button:hover svg {
  transform: translate(2px, -2px);
}

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

.button-primary {
  --btn-bg: var(--ink);
  --btn-color: var(--white);
  --btn-border: var(--ink);
}

.button-primary:hover {
  --btn-bg: var(--ink-2);
}

.button-lime {
  --btn-bg: var(--lime);
  --btn-color: var(--ink);
  --btn-border: var(--lime);
}

.button-lime:hover {
  --btn-bg: var(--lime-bright);
  --btn-border: var(--lime-bright);
}

.button-outline {
  --btn-bg: transparent;
  --btn-color: var(--ink);
  --btn-border: var(--line-strong);
}

.button-outline:hover {
  --btn-bg: var(--ink);
  --btn-color: var(--white);
  --btn-border: var(--ink);
}

.button-ghost-light {
  --btn-bg: transparent;
  --btn-color: var(--white);
  --btn-border: rgba(255, 255, 255, 0.32);
}

.button-ghost-light:hover {
  --btn-bg: rgba(255, 255, 255, 0.08);
}

.button-wide {
  width: 100%;
}

.text-link {
  position: relative;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding-block: 6px;
  font-size: 0.92rem;
  font-weight: 650;
  color: var(--ink);
}

.text-link-line {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  height: 1px;
  background: currentColor;
  transform-origin: right;
  transition: transform 0.4s var(--ease-out);
}

.text-link:hover .text-link-line {
  transform: scaleX(0);
  transform-origin: left;
}

.text-link-dark {
  color: var(--ink);
}

.media-fallback {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  background: linear-gradient(135deg, var(--paper-deep), var(--paper-soft));
}

.media-fallback span {
  font-family: var(--font-display);
  font-size: clamp(4rem, 9vw, 8rem);
  font-weight: 700;
  color: rgba(18, 21, 15, 0.12);
  letter-spacing: -0.08em;
}

.toast-region {
  position: fixed;
  z-index: 120;
  right: 24px;
  bottom: 24px;
  display: flex;
  flex-direction: column;
  gap: 10px;
  pointer-events: none;
}

.toast {
  display: flex;
  align-items: center;
  gap: 10px;
  max-width: 380px;
  border-radius: 14px;
  background: var(--ink);
  color: var(--white);
  padding: 13px 18px;
  font-size: 0.88rem;
  font-weight: 550;
  box-shadow: var(--shadow-md);
  animation: toast-in 0.35s var(--ease-out) both;
  pointer-events: auto;
}

.toast::before {
  content: "";
  width: 8px;
  height: 8px;
  flex: 0 0 auto;
  border-radius: 50%;
  background: var(--lime);
}

.toast.is-error::before {
  background: var(--coral);
}

.toast.is-leaving {
  animation: toast-out 0.3s ease both;
}

@keyframes toast-in {
  from {
    opacity: 0;
    transform: translateY(14px) scale(0.97);
  }
  to {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
}

@keyframes toast-out {
  to {
    opacity: 0;
    transform: translateY(8px) scale(0.97);
  }
}

@media (max-width: 720px) {
  .container {
    width: min(100% - 32px, var(--container));
  }

  .toast-region {
    left: 16px;
    right: 16px;
    bottom: 16px;
  }

  .toast {
    max-width: none;
  }
}

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }

  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    scroll-behavior: auto !important;
    transition-duration: 0.01ms !important;
  }
}
