/* STICKS 2026: the print layer (white, black, green, Benton) plus a realism layer. See docs/design-system.md. */
:root {
  --font-body: "Helvetica Neue", Helvetica, Arial, sans-serif;
  --font-hand: var(--font-hand-loaded), "Permanent Marker", "Marker Felt", cursive;
  --background: var(--sticks-white);
  --foreground: var(--sticks-black);
  --card: var(--sticks-white);
  --card-foreground: var(--sticks-black);
  --popover: var(--sticks-white);
  --popover-foreground: var(--sticks-black);
  --primary: var(--sticks-black);
  --primary-foreground: var(--sticks-white);
  --secondary: var(--sticks-white);
  --secondary-foreground: var(--sticks-black);
  --muted: oklch(0.97 0 0);
  --muted-foreground: oklch(0.556 0 0);
  --accent: var(--sticks-white);
  --accent-foreground: var(--sticks-black);
  --destructive: oklch(0.577 0.245 27.325);
  --destructive-foreground: var(--sticks-white);
  --border: var(--sticks-black);
  --input: var(--sticks-black);
  --ring: var(--sticks-black);
  --chart-1: oklch(0.646 0.222 41.116);
  --chart-2: oklch(0.6 0.118 184.704);
  --chart-3: oklch(0.398 0.07 227.392);
  --chart-4: oklch(0.828 0.189 84.429);
  --chart-5: oklch(0.769 0.188 70.08);
  --product-render-lighting: linear-gradient(
    90deg,
    rgba(0, 0, 0, 0.44) 0%,
    rgba(0, 0, 0, 0.28) 8%,
    rgba(0, 0, 0, 0.13) 22%,
    rgba(0, 0, 0, 0.02) 42%,
    rgba(255, 255, 255, 0.1) 58%,
    rgba(255, 255, 255, 0.24) 72%,
    rgba(255, 255, 255, 0.08) 86%,
    rgba(0, 0, 0, 0.08) 96%,
    rgba(0, 0, 0, 0.18) 100%
  );
  --product-shadow-core: rgba(24, 29, 25, 0.22);
  --product-shadow-mid: rgba(31, 36, 32, 0.13);
  --product-shadow-soft: rgba(31, 36, 32, 0.05);
  --product-shadow-clear: rgba(31, 36, 32, 0);
  --product-shadow-contact: rgba(24, 29, 25, 0.24);
  --radius: 0;

  /* STICKS design system: brand */
  --sticks-green: #00c438;
  --sticks-green-hover: #00a832;
  --sticks-green-dark: #007a22;
  --sticks-green-tint: rgba(0, 196, 56, 0.06);
  --sticks-black: #000000;
  --sticks-white: #ffffff;
  --sticks-off-white: #f5f5f5;
  --sticks-neutral-100: #f4f4f4;
  --sticks-smoke: #071a07;
  --paper-raised: #f5f5f5;
  --on-green-ink: #000000;
  --focus-ring: #007a22;

  /* Accents live on stickers and starbursts only. */
  --sticks-red: #b71a34;
  --sticks-yellow: #ffce00;

  /* Realism props */
  --photo-paper: #fbfaf5;
  --photo-ink: #1d1d1f;
  --tape: rgba(239, 228, 191, 0.84);
  --window-chrome: #f2f2f2;

  /* Strain colors belong on flavor surfaces only. */
  --strain-indica: #a100d9;
  --strain-indica-border: #7b00a8;
  --strain-sativa: #f34848;
  --strain-sativa-border: #c41e1e;
  --strain-hybrid: #00c438;
  --strain-hybrid-border: #007a22;

  /* STICKS design system: semantic color and surfaces */
  --fg-1: var(--sticks-black);
  --fg-2: rgba(0, 0, 0, 0.7);
  --fg-3: rgba(0, 0, 0, 0.5);
  --fg-4: rgba(0, 0, 0, 0.3);
  --fg-on-green-1: var(--sticks-white);
  --fg-on-green-2: rgba(255, 255, 255, 0.8);
  --fg-on-black-1: var(--sticks-white);
  --fg-on-black-2: rgba(255, 255, 255, 0.5);
  --surface-page: var(--sticks-white);
  --surface-alt: var(--sticks-white); /* Product stages stay pristine white. */
  --surface-product: var(--sticks-white);
  --surface-panel: var(--sticks-white);
  --surface-dark: var(--sticks-black);
  --surface-brand: var(--sticks-green);

  /* STICKS design system: structure */
  --rule-hairline: 1px;
  --rule-strong: 2px;
  --rule-heavy: 4px;
  --rule-label: 8px;
  --border-hairline: var(--rule-hairline) solid var(--sticks-black);
  --border-strong: var(--rule-strong) solid var(--sticks-black);
  --border-heavy: var(--rule-heavy) solid var(--sticks-black);
  --border-polaroid: 4px solid var(--sticks-green);
  --radius-0: 0;
  --radius-pill: 9999px;
  --radius-photo: 2px;
  --radius-sticker: 22px;
  --radius-window: 18px;
  --radius-phone: 54px;

  /* Two shadow modes that never mix on one object.
     Graphic UI: hard offset, 4px rule, square, straight. */
  --shadow-hard: 6px 6px 0 #000;
  --shadow-hard-sm: 5px 5px 0 #000;
  /* Physical props: layered soft realism. */
  --shadow-photo: 0 1px 1px rgba(0, 0, 0, 0.12), 0 4px 8px rgba(0, 0, 0, 0.1), 0 14px 28px -6px rgba(0, 0, 0, 0.22);
  --shadow-lift: 0 1px 1px rgba(0, 0, 0, 0.08), 0 2px 2px rgba(0, 0, 0, 0.08), 0 4px 4px rgba(0, 0, 0, 0.08),
    0 8px 8px rgba(0, 0, 0, 0.08), 0 16px 16px rgba(0, 0, 0, 0.08), 0 32px 32px rgba(0, 0, 0, 0.08);
  --shadow-window: 0 2px 6px rgba(0, 0, 0, 0.08), 0 24px 60px -12px rgba(0, 0, 0, 0.3);
  --shadow-polaroid: var(--shadow-photo);

  /* The refresh's exact slants. Never approximate with skewX() or italic. */
  --slant-flavor: matrix(1, 0, -0.3026, 0.9531, 0, 0);
  --slant-burst: matrix(1, 0, -0.2487, 0.9686, 0, 0);
  --ease-settle: cubic-bezier(0.34, 1.4, 0.64, 1);
  --grain: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='160' height='160'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.9' numOctaves='2' stitchTiles='stitch'/%3E%3CfeColorMatrix values='0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 .09 0'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
  --shadow-drop-emoji: drop-shadow(3px 4px 6px rgba(0, 0, 0, 0.35));
  --ticker-h: 38px;
  --nav-h-mobile: 77px;
  --nav-h-desktop: 85px;
  --racing-stripe-h: 3px;
  --page-gutter-mobile: 16px;
  --page-gutter-tablet: 24px;
  --page-gutter-desktop: 40px;
  --content-max: 72rem;
  --reading-max: 48rem;

  /* STICKS design system: type scale */
  --fs-eyebrow: 0.75rem;
  --fs-body-sm: 0.875rem;
  --fs-body: 1rem;
  --fs-body-lg: 1.125rem;
  --fs-lede: 1.25rem;
  --fs-h3: 1.5rem;
  --fs-h2-sm: 2rem;
  --fs-h2: 3rem;
  --fs-h1: 4.5rem;
  --fs-display: 5.5rem;
  --fs-mega: 7rem;
  --fs-lore: 11rem;
  --lh-tight: 0.85;
  --lh-snug: 0.9;
  --lh-body: 1.5;
  --lh-relaxed: 1.625;
  --tracking-tighter: -0.025em;
  --tracking-tight: -0.01em;
  --tracking-wide: 0.025em;
  --tracking-widest: 0.18em;

  /* Shared controls and rhythm. Optical hero layouts retain their own sizing. */
  --space-1: 4px;
  --space-2: 8px;
  --space-3: 12px;
  --space-4: 16px;
  --space-6: 24px;
  --space-8: 32px;
  --space-12: 48px;
  --control-height: 48px;
  --control-padding-x: 24px;
  --focus-width: 3px;
  --focus-offset: 4px;
  --motion-fast: 160ms;
  --motion-standard: 240ms;
  --ease-out: cubic-bezier(0.22, 1, 0.36, 1);
}

@layer components {
  .sticks-panel {
    background: var(--surface-panel);
    color: var(--fg-1);
    border: var(--border-strong);
    border-radius: var(--radius-0);
  }

  /* Graphic UI: the retail hero's square, 4px-rule, hard-shadow control. */
  .sticks-button {
    --button-bg: var(--sticks-green);
    --button-fg: var(--sticks-black);
    align-items: center;
    background: var(--button-bg);
    border: var(--rule-heavy) solid var(--sticks-black);
    border-radius: var(--radius-0);
    box-shadow: var(--shadow-hard-sm);
    color: var(--button-fg);
    display: inline-flex;
    font-family: var(--font-display);
    font-size: 1.625rem;
    font-weight: 700;
    gap: var(--space-3);
    justify-content: center;
    letter-spacing: 0.01em;
    line-height: 1;
    min-height: 56px;
    padding: 12px 24px 10px;
    text-align: center;
    text-decoration: none;
    text-transform: uppercase;
    transition: transform var(--motion-fast) var(--ease-out), box-shadow var(--motion-fast) var(--ease-out);
  }

  .sticks-button[data-variant="outline"],
  .sticks-button[data-variant="inverse"],
  .sticks-button[data-variant="white"] {
    --button-bg: var(--sticks-white);
  }

  .sticks-button[data-size="sm"] {
    font-size: 1.25rem;
    min-height: 44px;
    padding: 9px 16px 7px;
  }

  @media (hover: hover) {
    .sticks-button:not(:disabled):hover {
      box-shadow: 7px 7px 0 #000;
      transform: translate(-2px, -2px);
    }
  }

  .sticks-button:active:not(:disabled) {
    box-shadow: 0 0 0 #000;
    transform: translate(5px, 5px);
  }

  .sticks-button:focus-visible {
    outline: 3px solid var(--focus-ring);
    outline-offset: 4px;
  }

  .sticks-button:disabled {
    cursor: not-allowed;
    opacity: 0.45;
  }

  /* Graphic UI card: square, straight, 4px rule, hard shadow. Tilt belongs to physical props only. */
  .sticks-card {
    background: var(--sticks-white);
    border: var(--rule-heavy) solid var(--sticks-black);
    box-shadow: var(--shadow-hard);
    transition: transform var(--motion-fast) var(--ease-out), box-shadow var(--motion-fast) var(--ease-out);
  }

  @media (hover: hover) {
    a.sticks-card:hover,
    .sticks-card[data-interactive]:hover {
      transform: translate(-2px, -2px);
      box-shadow: 8px 8px 0 #000;
    }
  }

  /* Display type */
  .sticks-display {
    font-family: var(--font-display);
    font-weight: 700;
    letter-spacing: 0;
    line-height: 0.86;
    text-transform: uppercase;
  }

  /* Two-line display headlines on phones (see TwoLineHeadline). */
  @media (max-width: 767px) {
    .sticks-two-line {
      font-size: var(--fit-size) !important;
      max-width: none !important;
    }

    .sticks-two-line__line {
      display: block;
      white-space: nowrap;
    }
  }

  /* Flavor names: Comp Black with the refresh's slant. */
  .sticks-flavor {
    display: inline-block;
    font-family: var(--font-callout);
    font-weight: 900;
    line-height: 1.2;
    text-transform: uppercase;
    transform: var(--slant-flavor);
    transform-origin: 0 100%;
  }

  /* Info sticker: rounded green label from the refresh. */
  .sticks-info {
    background: var(--sticks-green);
    border-radius: var(--radius-sticker);
    color: var(--sticks-white);
    display: inline-block;
    font-family: var(--font-display);
    font-weight: 700;
    line-height: 0.9;
    padding: 0.32em 0.5em 0.24em;
    text-transform: uppercase;
  }

  .sticks-info[data-applied] {
    border: 4px solid var(--sticks-white);
    box-shadow: var(--shadow-photo);
    transform: rotate(var(--tilt, -3deg));
  }

  /* Paper grain on large brand fields. */
  .sticks-surface {
    background-image: var(--grain);
  }

  /* Polaroid: a real print on photo paper. */
  .sticks-polaroid {
    background: linear-gradient(180deg, #fefdf9, var(--photo-paper) 60%, #f4f2ea);
    border-radius: var(--radius-photo);
    box-shadow:
      inset 0 0 0 1px rgba(0, 0, 0, 0.04),
      var(--shadow-photo);
    color: var(--photo-ink);
    padding: 5% 5% 0;
    position: relative;
    transform: rotate(var(--tilt, 0deg));
    transition: transform 0.45s var(--ease-settle);
  }

  .sticks-polaroid::after {
    background: var(--grain), linear-gradient(135deg, rgba(255, 255, 255, 0.35), transparent 40%);
    border-radius: inherit;
    content: "";
    inset: 0;
    pointer-events: none;
    position: absolute;
  }

  .sticks-polaroid__photo {
    aspect-ratio: 1;
    background: #ddd;
    box-shadow: inset 0 0 0 1px rgba(0, 0, 0, 0.08);
    display: block;
    object-fit: cover;
    overflow: hidden;
    position: relative;
    width: 100%;
  }

  .sticks-polaroid__caption {
    display: block;
    font-family: var(--font-hand);
    font-size: 1.25rem;
    line-height: 1.1;
    padding: 0.7em 0.2em 0.9em;
    text-align: center;
  }

  @media (hover: hover) {
    a.sticks-polaroid:hover {
      transform: rotate(0deg) translateY(-4px);
    }
  }

  .sticks-tape {
    background: var(--tape);
    clip-path: polygon(2% 8%, 6% 0, 12% 10%, 20% 2%, 30% 9%, 42% 1%, 55% 8%, 68% 0, 80% 9%, 90% 2%, 98% 10%, 100% 92%, 94% 100%, 86% 90%, 74% 99%, 62% 91%, 50% 100%, 38% 92%, 26% 100%, 14% 91%, 4% 99%, 0 90%);
    height: 30px;
    left: 50%;
    position: absolute;
    top: -14px;
    transform: translateX(-50%) rotate(var(--tape-tilt, -3deg));
    width: 38%;
    z-index: 1;
  }

  @media (prefers-reduced-motion: reduce) {
    .sticks-button,
    .sticks-card,
    .sticks-polaroid {
      transition: none;
    }
  }
}
