/*
 * Anahata v2 — design tokens
 * Source: Figma "Design System - Active" (1469:890). See docs/DESIGN-TOKENS.md.
 * Wired into layout/theme.liquid, loaded after base.css so these override Dawn.
 */

:root {
  /* ---- color ---- */
  /* ---- Neutrals: three cream anchors; every surface / fill / rule below is
     derived from them (color-mix), so changing an anchor re-tints the site.
     No pure white anywhere (owner, 2026-09-28: "more creamy"). ---- */
  --a-ivory: #fcf8f2;              /* lightest — cards, header, panels, text on dark */
  --a-paper: #f6efe5;              /* page background */
  --a-sand: #ece3d6;               /* fills — image grounds, tiles, discs */
  /* Dawn reads colours as "R, G, B" triplets (anahata-base.css) — the same
     anchors, written as triplets. Keep in step with the hex above. */
  --a-paper-rgb: 246, 239, 229;
  --a-ivory-rgb: 252, 248, 242;
  --a-sand-rgb: 236, 227, 214;
  --a-ink-rgb: 26, 26, 26;
  --a-ink-pure-rgb: 0, 0, 0;

  --a-ink: #1a1a1a;
  --a-ink-pure: #000000;
  --a-text-muted: #6a655f;  /* warm grey; Figma #727272 fell to 4.2:1 on paper — this is 5.0 (4.5 on sand) */
  --a-text-placeholder: #bfbfbf;
  --a-on-dark: var(--a-ivory);  /* text/icons on dark or brand grounds */

  --a-surface: var(--a-ivory);  /* cards, header, panels — was #ffffff */
  --a-bg: var(--a-paper);  /* page background */
  --a-bg-subtle: var(--a-sand);  /* placeholders, chips, soft fills */
  --a-photo-ground: #f6f6f6;       /* behind every product photo: the studio backdrop the packshots are shot on, so a photo and its frame read as one (designer review 2026-09-29 — replaced the cream multiply overlay) */
  --a-panel-neutral: color-mix(in srgb, var(--a-paper), var(--a-sand) 55%);  /* about-grid text panels (v1 look, warm) */
  --a-ink-slate: #454f5b;          /* v1 body/heading ink — FAQ classic style, desktop header */
  --a-rule-faint: rgb(0 0 0 / 12%); /* FAQ classic row rules */
  --a-rule-warm: color-mix(in srgb, var(--a-tan), transparent 55%);  /* product page: hairlines between the info blocks (owner 2026-09-28, replaced the outlined cards) */
  --a-bg-subtle-2: color-mix(in srgb, var(--a-paper), var(--a-sand) 60%);
  --a-bg-tint: color-mix(in srgb, var(--a-sand), var(--a-ink) 5%);
  --a-panel: color-mix(in srgb, var(--a-paper), var(--a-sand) 45%);  /* design-system panel/card surface (warm) */
                                  used by Payment Method Card, Detail Checkout Card,
                                  Preview Card, Highlights/Balance, Discount Card,
                                  Button/Secondary. Verified 2026-09-21 vs cached node. */
  --a-disc: var(--a-sand);  /* category disc fill */
  --a-fill-secondary: color-mix(in srgb, var(--a-sand), var(--a-ink) 6%);  /* secondary buttons, Logout */

  --a-border: color-mix(in srgb, var(--a-sand), var(--a-ink) 16%);
  --a-border-strong: #999999;
  --a-border-input: color-mix(in srgb, var(--a-sand), var(--a-ink) 12%);
  --a-border-soft: color-mix(in srgb, var(--a-sand), var(--a-ink) 7%);

  --a-grey-cool: #8f96a3;
  --a-grey: #8e8e93;
  --a-grey-2: #aeaeb2;             /* Figma "grays/gray-2": placeholder value text */

  /* brand accents (Figma Home 2026-09-10) */
  --a-tan: #c39e81;
  --a-whatsapp: #25d366;          /* WhatsApp's own green — the chat button (brand colour, not ours) */
  --a-rose: #e7b7a3;              /* dusty rose: PDP hero bottom rule (Figma "Rose") */
  --a-cream: #fff1f0;             /* selected size chip ground (Figma "Cream") */
  --a-grey-50: #808080;           /* unselected size chip border (Figma "color/grey/50") */
  --a-grabber: color-mix(in srgb, var(--a-sand), var(--a-ink) 12%);  /* bottom-sheet handle */
  --a-label-secondary: rgb(60 60 67 / 60%);  /* Figma "labels/secondary" */                 /* light-brown accent: card borders, filter chips, header cart */
  --a-brand: #00a99d;              /* teal-green */
  --a-brand-deep: #00766e;
  --a-brand-tint: color-mix(in srgb, var(--a-brand) 10%, transparent);  /* soft teal ground: the delivery promise on the product page */
  --a-gradient-brand: linear-gradient(90deg, var(--a-brand) 0%, var(--a-brand-deep) 100%);
  --a-flash-title: #ffde00;        /* "Flash Sale" yellow on the green bar */

  --a-star: #ffc107;
  --a-danger: #b80000;
  --a-danger-deep: #8e0b21;

  /* order status pills — Figma "Order Card" set (1525:9090). One colour per
     state so a list of orders can be scanned (designer review 2026-09-24). */
  --a-status-shipping: var(--a-tan);    /* In Shipping */
  --a-status-complete: #047b5d;         /* Figma color/spring-green/25 */
  --a-status-processing: #d4a72c;       /* "Proceed" — from the designer's review
                                           mock; Figma still has it grey */
  --a-status-returned: var(--a-grey-50);
  --a-btn-muted: rgb(123 146 173 / 20%); /* Figma color/azure/58-20%: Return / Cancel */

  --a-text-soft: #4d4d4d;               /* supporting copy that must read darker
                                           than --a-text-muted (balance note) */

  /* ---- elevation ----
     Codified from values already in component CSS, not from Figma. Values are
     unchanged; they exist so nothing hardcodes a shadow. Re-derive from Figma
     when elevation specs land. */
  --a-shadow-card: 0 4px 7px rgb(0 0 0 / 10%);
  --a-shadow-fab: 0 4px 14px rgb(0 0 0 / 18%);  /* floating WhatsApp button */
  --a-shadow-text-on-photo: 0 1px 10px rgb(0 0 0 / 35%);  /* cream text over a mid-tone photo (product cells) */
  --a-shadow-bar-top: 0 -3px 7px rgb(0 0 0 / 10%);
  --a-shadow-action-bar: 0 -2px 12px rgb(0 0 0 / 6%);
  --a-shadow-search: 0 0 16px rgb(0 0 0 / 10%);
  --a-shadow-bar: 0 0 2.15px rgb(0 0 0 / 25%);         /* PDP bottom action bar */
  --a-shadow-review: 1.151px 4.602px 3.912px rgb(0 0 0 / 10%);  /* review card */
  --a-shadow-card-sm: 0.822px 3.288px 2.795px rgb(0 0 0 / 10%); /* compact product card */

  /* ---- scrim / overlay ---- */
  --a-scrim-media: rgb(0 0 0 / 55%);   /* image-caption gradient foot */
  --a-scrim-backdrop: rgb(0 0 0 / 25%); /* drawer / menu backdrop */
  --a-scrim-press: rgb(0 0 0 / 16%);    /* pressed state on dark nav */
  --a-hairline: rgb(0 0 0 / 8%);        /* 1px divider on light surfaces */
  --a-scrim-veil: color-mix(in srgb, var(--a-ivory) 90%, transparent);  /* frosted sheet over media (PDP) */
  --a-ink-55: rgb(26 26 26 / 55%);         /* --a-ink at 55%, footer meta text */
  --a-scrim-sheet: rgb(0 0 0 / 17%);    /* behind a bottom sheet (Figma color/black/-17%) */
  --a-scrim-thumb: rgb(0 0 0 / 30%);    /* "+N" overlay on a review photo */
  --a-fill-tint: rgb(0 0 0 / 8%);       /* unselected delivery row (Figma color/black/-8%) */
  --a-hairline-photo: rgb(101 101 101 / 10%);  /* review photo border */
  --a-dot: rgb(0 0 0 / 30%);            /* inactive page-control dot */
  --a-dot-track: rgb(0 0 0 / 6%);       /* page-control pill ("Ultrathin" light) */
  --a-scrim-clear: rgb(0 0 0 / 0%);     /* transparent end-stop for scrim gradients */
  --a-scrim-veil-dark: rgb(0 0 0 / 18%); /* even grey over a whole card photo (category cards) */
  --a-scrim-soft: rgb(0 0 0 / 30%);      /* gentle caption foot on top of that veil */

  /* One caption scrim for every image-with-text-over-it component. Override
     --a-scrim-stop locally when a card needs the fade to start higher. */
  --a-scrim-stop: 50%;
  /* masks (alpha only — the colour in them is never seen): feather a
     packshot's edges into its frame so no seam shows (product-card-fit.js) */
  --a-mask-feather-x: linear-gradient(to right, transparent 0%, var(--a-ink-pure) 7%, var(--a-ink-pure) 93%, transparent 100%);
  --a-mask-feather-y: linear-gradient(to bottom, transparent 0%, var(--a-ink-pure) 7%, var(--a-ink-pure) 93%, transparent 100%);
  --a-gradient-scrim: linear-gradient(
    to top,
    var(--a-scrim-media) 0%,
    var(--a-scrim-clear) var(--a-scrim-stop)
  );
  /* Category cards (designer review 2026-09-26 #3): the full scrim read too
     harsh — the whole photo is dimmed evenly and the foot is gentler. */
  --a-gradient-card-veil: linear-gradient(
    to top,
    var(--a-scrim-soft) 0%,
    var(--a-scrim-veil-dark) 45%,
    var(--a-scrim-veil-dark) 100%
  );

  /* Alpha mask that fades an image in from its left edge, so a photo melts into
     the card's own ground instead of stopping at a hard crop line. Only the
     alpha of the stops matters. */
  --a-mask-fade-left: linear-gradient(
    to right,
    var(--a-scrim-clear) 0%,
    var(--a-ink-pure) 45%
  );

  /* ---- gift card (presentational stub palette) ---- */
  --a-giftcard-bg: linear-gradient(135deg, var(--a-giftcard-dark) 0%, var(--a-giftcard-dark-2) 100%);
  --a-giftcard-dark: #2b5b58;     /* green face — Buy Gift Card.png; designer review 2026-09-26 (#8) */
  --a-giftcard-dark-2: #214744;
  --a-giftcard-ink: var(--a-ivory);
  --a-giftcard-gold: #d9b779;
  --a-giftcard-muted: #cfcfcf;

  /* ---- component-local surfaces ---- */
  --a-flash-chip-bg: var(--a-cream);  /* countdown digit chip */
  --a-menu-bg: #f6f3f3;        /* nav drawer panel */

  /* ---- type ----
     Every size below is its Figma (402px) value times --a-type-scale. The
     scale is 1 on phones — the design's own numbers — and steps up at the
     breakpoints at the end of this file, so tablet/desktop text grows with
     the screen instead of staying phone-sized (designer review 2026-09-24). */
  --a-type-scale: 1;
  --a-font-display:"Aboreto", Georgia, "Times New Roman", serif;
  --a-font-body: "Figtree", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;

  --a-fs-title: calc(27px * var(--a-type-scale));       --a-lh-title: normal;   /* PDP product title (Aboreto) */
  --a-fs-rating-l: calc(21px * var(--a-type-scale));    /* reviews summary value */
  --a-lh-body-relaxed: calc(24px * var(--a-type-scale)); /* PDP intro copy */
  --a-lh-rich: calc(22.75px * var(--a-type-scale));      /* PDP product-details rich text */
  --a-fs-display-xl: calc(27.19px * var(--a-type-scale)); --a-lh-display-xl: calc(32px * var(--a-type-scale));  /* explore-grid card title:
                                 27.19/17 of the rail card per the design */
  --a-fs-display-l: calc(22px * var(--a-type-scale));   --a-lh-display-l: calc(25px * var(--a-type-scale));
  --a-fs-display-m: calc(21px * var(--a-type-scale));   --a-lh-display-m: calc(24px * var(--a-type-scale));
  --a-fs-display-s: calc(17px * var(--a-type-scale));   --a-lh-display-s: calc(20px * var(--a-type-scale));
  /* v1-derived pieces (rebuilt clean-room 2026-09-28; sizes measured on the live v1 site) */
  --a-fs-marquee: 17.6px;          /* running line, phones */
  --a-fs-marquee-l: 20.8px;        /* running line, ≥750px */
  --a-ls-marquee: 0.1em;
  --a-marquee-speed: 26s;          /* one loop, phones  (~54 px/s, as v1) */
  --a-marquee-speed-l: 8s;         /* one loop, ≥750px (~192 px/s, as v1) */
  --a-fs-tile: 22.4px;             /* square-grid caption, phones */
  --a-fs-tile-l: 28.8px;           /* square-grid caption, ≥750px */
  --a-fs-about-title: 24px;        /* about grid heading */
  --a-fs-about-title-l: 35.2px;
  --a-fs-about-sub: 16px;          /* about grid subtitle (italic) */
  --a-fs-about-sub-l: 20.8px;
  --a-fs-about-body: 15.2px;
  --a-fs-about-body-l: 18.4px;
  --a-fs-faq-title: 32px;          /* FAQ, classic (v1) style */
  --a-fs-faq-q: 17.6px;
  --a-fs-cell-price: 22.4px;       /* collection cell price (bold), phones */
  --a-fs-cell-price-l: 25.6px;
  --a-fs-collection-title: 40px;   /* collection page heading */
  --a-ls-caps: 0.1em;              /* letter-spaced display caps (cell names) */
  --a-fs-header-link: 14px;        /* desktop header SHOP / CART (v1) */
  --a-ls-header-link: 0.15em;
  --a-header-h: 176px;             /* desktop header: 120px logo row + 56px category row */
  --a-mega-speed: 0.5s;            /* category panel open / close (owner: Cartier-like, 0.5s) */
  --a-mega-ease: cubic-bezier(0.4, 0, 0.2, 1);
  --a-fs-price: calc(24px * var(--a-type-scale));       --a-lh-price: calc(29px * var(--a-type-scale));
  --a-fs-heading: calc(18px * var(--a-type-scale));     --a-lh-heading: calc(22px * var(--a-type-scale));
  --a-fs-subheading: calc(17px * var(--a-type-scale));  --a-lh-subheading: calc(20px * var(--a-type-scale));
  --a-fs-body-l: calc(17px * var(--a-type-scale));      --a-lh-body-l: calc(20px * var(--a-type-scale));
  --a-fs-body: calc(16px * var(--a-type-scale));        --a-lh-body: calc(19px * var(--a-type-scale));
  --a-fs-body-m: calc(15px * var(--a-type-scale));      /* cart product name (confirmed 2026-09-23) */
  --a-fs-body-s: calc(14px * var(--a-type-scale));      --a-lh-body-s: calc(17px * var(--a-type-scale));
  --a-fs-label: calc(12px * var(--a-type-scale));       --a-lh-label: calc(14px * var(--a-type-scale));
  --a-fs-caption: calc(10px * var(--a-type-scale));     --a-lh-caption: calc(12px * var(--a-type-scale));
  --a-fs-micro: calc(9px * var(--a-type-scale));        --a-lh-micro: calc(11px * var(--a-type-scale));
  --a-fs-body-xs: calc(13px * var(--a-type-scale));     /* countdown digits */
  --a-fs-tiny: calc(11px * var(--a-type-scale));        /* flash-sale subtitle, countdown label */

  /* Faux-bold for Aboreto, which ships in one weight: a hairline text stroke
     in the text's own colour (designer review 2026-09-24). */
  --a-stroke-hair: 0.2px;         /* product titles, "New Collection" */
  --a-stroke-bold: 0.5px;         /* balance amount */

  /* ---- radius ---- */
  --a-radius: 10px;
  --a-radius-pill: 20px;
  --a-radius-round: 9999px;
  --a-radius-dropdown: 12px;
  --a-radius-pill-btn: 30px;     /* PDP topbar round buttons */
  --a-radius-highlight: 8.352px; /* PDP highlight cards */
  --a-radius-chip-sm: 12.258px;  /* "5-7 Days" delivery chip */
  --a-radius-xs: 3px;          /* cart-card swatch */
  --a-radius-sm: 5px;          /* Figma Countdown frame, Tabs, media strip */
  --a-radius-6: 6px;
  --a-radius-7: 7px;
  --a-radius-8: 8px;
  --a-radius-15: 15px;

  /* ---- spacing (10px grid) ---- */
  --a-space-1: 4px;
  --a-space-2: 5px;
  --a-space-3: 10px;
  --a-space-4: 15px;
  --a-space-5: 20px;
  --a-space-6: 25px;
  --a-gutter: 20px;
  --a-page-pad: 1.5rem;     /* matches Dawn's .page-width padding — used to full-bleed a row out of it */

  /* ---- component scale ----
     Figma places some components as scaled instances. Rather than hardcoding
     every scaled px, the component keeps its base tokens and multiplies. */
  --a-scale-review: 1.151;        /* review card on PDP (base 289px -> 332.5px) */
  --a-scale-card-compact: 0.822;  /* "In the same set" card (base 236px -> 194px) */

  /* ---- controls ---- */
  --a-btn-radius: var(--a-radius);
  --a-btn-pad-y: 10px;
  --a-btn-pad-x: 10px;
  --a-icon-btn-size: 48px;
  --a-searchbar-height: 44px;
  --a-tabbar-height: 84px;
}

/* ---- responsive scale ----
   The Figma frames are phone-only (402px). On wider screens the layout already
   widens, but text, controls and the search bar stayed phone-sized and read as
   tiny (designer desktop review, 2026-09-24). One multiplier per breakpoint
   grows every type token together, so the hierarchy between sizes is kept. */
@media screen and (min-width: 750px) {
  :root {
    --a-type-scale: 1.12;
    --a-searchbar-height: 50px;
  }
}

@media screen and (min-width: 1200px) {
  :root {
    --a-type-scale: 1.25;
    --a-searchbar-height: 54px;
  }
}
