:root {
  color-scheme: light;
  --footer: #342b26;
  --footer-line: rgb(255 255 255 / 0.42);
  --shade-text: #f5f1eb;
  --gold: #efb854;
  --gold-dark: #d99e35;
  --ink: #17120f;

  /* Light theme for the /app production dashboard (parity with the Flutter
     app; see convert-page-polish.md). The dark tokens above stay for the
     marketing landing page. */
  --bg: #f4f1ec;
  --text: #2d251d;
  --text-muted: #5e554f;
  --accent: #efba55;
  --accent-dark: #d99e35;
  --line: #e6ddd3;
  --surface: #ffffff;
  --header: #332a25;
  --danger: #b00020;
  /* Muted tan pill (mockup: Export CSV button, active nav/sidebar items,
     user chip). */
  --pill: #e4d9c8;
  --pill-dark: #d8cbb8;
  --pill-text: #5e4f3b; /* PROD-026: darkened from #6b5b45 — 5.67:1 on --pill, 4.95:1 on --pill-dark (WCAG AA) */
}

* {
  box-sizing: border-box;
}

html {
  min-width: 320px;
  font-family:
    Inter,
    ui-sans-serif,
    system-ui,
    -apple-system,
    BlinkMacSystemFont,
    "Segoe UI",
    sans-serif;
  color: var(--ink);
  background: var(--footer);
}

body {
  margin: 0;
}

a {
  color: inherit;
}

.landing-shell {
  min-height: 100vh;
  display: grid;
  grid-template-rows: minmax(680px, 1fr) auto;
}

.hero {
  position: relative;
  min-height: min(78vw, 900px);
  display: grid;
  place-items: center;
  padding: 36px 20px 52px;
  isolation: isolate;
  overflow: hidden;
}

.hero::before {
  position: absolute;
  inset: 0;
  z-index: -2;
  content: "";
  background:
    linear-gradient(180deg, rgb(255 255 255 / 0.08), rgb(0 0 0 / 0.2)),
    url("/assets/Home-BG.jpeg") center / cover no-repeat;
}

.hero::after {
  position: absolute;
  inset: 0;
  z-index: -1;
  content: "";
  background: radial-gradient(
    circle at 50% 40%,
    transparent 0 28%,
    rgb(0 0 0 / 0.2) 75%
  );
}

.tools-logo {
  position: absolute;
  top: clamp(24px, 4vw, 46px);
  left: 50%;
  width: clamp(150px, 13vw, 220px);
  transform: translateX(-50%);
}

.tools-logo img,
.footer-brand img,
.social-links img {
  display: block;
  width: 100%;
  height: auto;
}

.shade-card {
  position: relative;
  width: min(34vw, 560px);
  min-width: 360px;
  aspect-ratio: 1 / 1;
  display: grid;
  place-items: center;
  margin-top: 62px;
  filter: drop-shadow(0 28px 42px rgb(0 0 0 / 0.38));
}

.shade-image {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: contain;
}

.shade-content {
  position: relative;
  z-index: 1;
  width: 68%;
  display: grid;
  justify-items: center;
  padding-top: 16%;
  color: var(--shade-text);
  text-align: center;
}

.shade-content h1 {
  margin: 0 0 24px;
  font-size: clamp(1.7rem, 2vw, 2.45rem);
  line-height: 1.05;
  letter-spacing: 0;
}

.shop-button {
  width: 100%;
  min-height: 48px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 999px;
  background: var(--gold);
  color: #1b1208;
  font-size: 0.9rem;
  font-weight: 900;
  text-decoration: none;
  transition:
    background-color 160ms ease,
    transform 160ms ease;
}

.shop-button:hover {
  background: var(--gold-dark);
  transform: translateY(-1px);
}

.employee-link {
  margin-top: clamp(72px, 8vw, 118px);
  color: rgb(255 255 255 / 0.78);
  font-size: 0.72rem;
  text-decoration: none;
}

.employee-link::after {
  margin-left: 8px;
  color: var(--gold);
  content: ">>";
  letter-spacing: -0.08em;
}

.employee-link:hover {
  color: white;
}

.site-footer {
  background: var(--footer);
  color: white;
}

.footer-inner {
  width: min(1480px, calc(100% - 48px));
  margin: 0 auto;
  padding: 30px 0 26px;
}

.footer-brand {
  width: 150px;
}

.social-links {
  display: flex;
  justify-content: flex-end;
  gap: 22px;
  margin-top: -24px;
}

.social-links a {
  width: 26px;
  height: 26px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  opacity: 0.78;
  transition:
    opacity 160ms ease,
    transform 160ms ease;
}

.social-links a:hover {
  opacity: 1;
  transform: translateY(-1px);
}

.footer-bottom {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  margin-top: 20px;
  padding-top: 18px;
  border-top: 1px solid var(--footer-line);
  color: rgb(255 255 255 / 0.76);
  font-size: 0.72rem;
}

.footer-bottom p {
  margin: 0;
}

.footer-bottom nav {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 28px;
}

.footer-bottom a {
  text-underline-offset: 3px;
}

.footer-bottom .need-help {
  color: var(--gold);
}

@media (max-width: 900px) {
  .landing-shell {
    grid-template-rows: minmax(640px, 1fr) auto;
  }

  .hero {
    min-height: 680px;
    padding-inline: 16px;
  }

  .shade-card {
    width: min(88vw, 480px);
    min-width: 0;
  }

  .social-links {
    justify-content: flex-start;
    margin-top: 28px;
  }

  .footer-bottom {
    align-items: flex-start;
    flex-direction: column;
  }

  .footer-bottom nav {
    justify-content: flex-start;
    gap: 14px 22px;
  }
}

@media (max-width: 520px) {
  .hero {
    min-height: 620px;
  }

  .shade-content {
    width: 72%;
  }

  .shade-content h1 {
    margin-bottom: 18px;
    font-size: 1.55rem;
  }

  .shop-button {
    min-height: 42px;
  }

  .employee-link {
    margin-top: 62px;
  }
}

/* --- Shared /app dashboard components (light theme) ---
   Buttons, cards, and inputs shared by the app pages (conversion, set-skus,
   settings) so they can't drift. Marketing styles above are untouched. */

/* PROD-026: visible keyboard focus on every interactive element. */
:focus-visible {
  outline: 3px solid var(--accent);
  outline-offset: 2px;
}

.btn {
  min-height: 48px; /* large touch target */
  padding: 8px 16px;
  font-size: 1rem;
  font-weight: 600;
  border: none;
  border-radius: 8px;
  cursor: pointer;
}

.btn:disabled {
  opacity: 0.5;
  cursor: default;
}

.btn-primary {
  color: var(--text);
  background: var(--accent);
}

.btn-primary:hover:not(:disabled) {
  background: var(--accent-dark);
}

.btn-subtle {
  /* Muted tan pill per the mockup's Export CSV button. */
  color: var(--pill-text);
  background: var(--pill);
  border-radius: 20px;
}

.btn-subtle:hover:not(:disabled) {
  background: var(--pill-dark);
}

.btn-danger {
  color: #fff;
  background: var(--danger);
}

.card {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 12px;
  /* Soft shadow per the mockup's table cards. */
  box-shadow: 0 2px 12px rgb(45 37 29 / 0.06);
}

.text-input {
  min-height: 48px;
  padding: 10px 14px;
  font-size: 1rem;
  color: var(--text);
  background: var(--surface);
  border: 2px solid var(--line);
  border-radius: 10px;
}

.text-input:focus {
  outline: 3px solid var(--accent);
  outline-offset: 1px;
  border-color: var(--accent);
}

/* Row-change flash on the conversion preview table: gold tint fading out so
   the eye lands on the row that was just added/edited. */
@keyframes row-flash {
  from {
    background: rgb(239 186 85 / 0.55);
  }
  to {
    background: transparent;
  }
}

.row-flash {
  animation: row-flash 1s ease-out;
}

/* --- Toasts (src/lib/toast.ts) ---
   Fixed bottom-center stack with a polite live region; success toasts are
   dark, error toasts use --danger. */
.toast-region {
  position: fixed;
  bottom: 16px;
  left: 50%;
  transform: translateX(-50%);
  z-index: 1000;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  width: min(480px, calc(100vw - 32px));
  pointer-events: none;
}

.toast {
  display: flex;
  align-items: center;
  gap: 16px;
  width: 100%;
  min-height: 48px;
  padding: 12px 16px;
  font-size: 0.9375rem;
  font-weight: 600;
  color: #f5f1eb;
  background: var(--header);
  border-radius: 10px;
  box-shadow: 0 8px 24px rgb(0 0 0 / 0.28);
  pointer-events: auto;
}

.toast.error {
  color: #fff;
  background: var(--danger);
}

.toast .toast-message {
  flex: 1;
}

.toast button.toast-action {
  min-height: 48px; /* PROD-026: floor touch-target standard */
  padding: 4px 12px;
  font-size: 0.9375rem;
  font-weight: 700;
  color: var(--accent);
  background: transparent;
  border: none;
  border-radius: 8px;
  cursor: pointer;
}

.toast.error button.toast-action {
  color: #fff;
}
