/* cargo design tokens for the web (#287).

   This file mirrors cargo/AppTheme.swift (colours, shadows, header metrics) and the sizes
   DESIGN.md lists for type, spacing, corners and glass. The Swift file is the source of
   truth: change a value there first, then here, in the same PR, and update DESIGN.md.
   The app is light mode only (#196), so these are light values only.

   Every page links this file: the app-look pages (/, /c, /i, /u) use the tokens directly, and
   styles.css (the policy pages) imports it for its light palette. */

:root {
  /* ---- Colour (AppTheme) ---- */
  --app-background: #fbfbfb;            /* background */
  --app-card: #ffffff;                  /* cardBackground */
  --app-brown: #3e342e;                 /* primaryBrown */
  --app-text: #1e1e1e;                  /* textPrimary */
  --app-text-2: #424242;                /* textSecondary */
  --app-placeholder: #666666;           /* placeholder */
  --app-caption: #999999;               /* the app's #999 caption hex (CategoryDetailView); 2.85:1 on
                                           white, fails AA, so no web text uses it (#667) */
  --app-error: #a3341f;                 /* error */
  --app-ink: #5c3d2e;                   /* illustrationInk */
  --app-hairline: rgba(0, 0, 0, 0.06);  /* hairline */
  --app-field-border: rgba(0, 0, 0, 0.07); /* fieldBorder */
  --app-subtle: rgba(0, 0, 0, 0.04);    /* subtleFill */
  --app-disabled: rgba(0, 0, 0, 0.055); /* disabledFill */
  --app-image-backdrop: #ffffff;        /* imageBackdrop */
  --app-skeleton: rgba(0, 0, 0, 0.06);  /* skeletonFill */
  --app-toast: rgba(0, 0, 0, 0.85);     /* toastBackground */
  --app-silver-light: #b8bbc1;          /* logoSilverLight */
  --app-silver-dark: #5c6067;           /* logoSilverDark */
  /* profileInitialFill (ExploreView): the initial's circle while a profile has no picture */
  --app-avatar-fill: linear-gradient(135deg, #c89b6a, #3e342e);
  /* The profile picture's shadow: primaryBrown at 25%, radius 10, y 6 */
  --app-avatar-shadow: 0 6px 20px rgba(62, 52, 46, 0.25);

  /* ---- Shadow (cardShadow 2, cardShadowRadius 5, cardShadowOpacity 0.05) ----
     SwiftUI's shadow radius is a blur radius; CSS blur is twice that. */
  --app-card-shadow: 0 2px 10px rgba(0, 0, 0, 0.05);

  /* ---- Type (DESIGN.md "Type"): the system font, sizes in points = CSS px ---- */
  --app-font: -apple-system, BlinkMacSystemFont, "SF Pro Text", "Helvetica Neue", Helvetica, Arial, sans-serif;
  --app-type-flow-title: 700 36px/1.1 var(--app-font);   /* flow title, big name */
  --app-type-page-title: 700 26px/1.15 var(--app-font);  /* page title (DESIGN.md) */
  --app-type-header-title: 500 17px/1.2 var(--app-font); /* cargo name in the header pill */
  --app-type-question: 600 22px/1.2 var(--app-font);     /* screen question */
  --app-type-item-title: 700 22px/1.2 var(--app-font);   /* item title on the item screen */
  --app-type-section: 700 20px/1.2 var(--app-font);      /* section title */
  --app-type-button: 700 17px/1 var(--app-font);         /* primary button */
  --app-type-row: 500 16px/1.3 var(--app-font);          /* row title */
  --app-type-body: 400 15px/1.4 var(--app-font);         /* body */
  --app-type-caption: 400 13px/1.3 var(--app-font);      /* caption, metadata */
  --app-type-card: 500 12px/1.25 var(--app-font);        /* ItemCard title */
  --app-type-card-sub: 400 12px/1.25 var(--app-font);    /* ItemCard brand line */
  --app-type-pill: 500 13px/1 var(--app-font);           /* filter pill */
  --app-type-avatar: 600 11px/1 var(--app-font);         /* the letter in a 24pt avatar (size x 0.42, semibold) */
  /* Profile page (/u), the sizes of ExploreView.profileHero (#678) */
  --app-type-profile-name: 700 23px/1.2 var(--app-font);    /* display name (profileHero, 23 bold) */
  --app-type-profile-handle: 400 13.5px/1.3 var(--app-font); /* @handle (profileHero, 13.5) */
  --app-type-profile-initial: 600 30px/1 var(--app-font);   /* the letter in the 76pt picture (30 semibold) */
  --app-type-empty-title: 600 17px/1.3 var(--app-font);     /* /u "no cargos yet": the web's 17 as shipped; the app's EmptyStateView is 16 (#689) */

  /* ---- Spacing (DESIGN.md "Spacing and shape") ---- */
  --app-gutter: 8px;          /* between cards and at the screen edge in grids */
  --app-header-gutter: 16px;  /* header controls */
  --app-sheet-gutter: 20px;   /* inside sheets */
  --app-card-padding: 12px;   /* ItemCard contentPadding */
  --app-header-row: 36px;     /* headerRowHeight */
  --app-header-top: 4px;      /* headerTopInset */
  --app-header-gap: 8px;      /* headerContentGap */
  --app-home-header: 55px;    /* homeHeaderHeight: the glass bar on home and profile */
  --app-tap: 44px;            /* minimum tap target */

  /* ---- Corners ---- */
  --app-radius-card: 12px;
  --app-radius-image: 8px;
  --app-radius-sheet: 32px;
  --app-radius-pill: 999px;   /* Capsule */

  /* ---- Glass (LiquidGlass.swift, the pre-iOS 26 approximation) ----
     .ultraThinMaterial plus a warm white sheen. The web has no refraction, so this is
     the frosted fallback the app itself draws on older iOS. */
  --app-glass-fill: rgba(251, 251, 251, 0.62);
  --app-glass-sheen: linear-gradient(135deg, rgba(255, 255, 255, 0.30), rgba(255, 255, 255, 0.06));
  --app-glass-blur: saturate(180%) blur(20px);
  --app-glass-edge: rgba(255, 255, 255, 0.55);   /* the light rim on glass controls */
  --app-glass-shadow: 0 6px 24px rgba(0, 0, 0, 0.08);

  /* The phone column: the site is laid out at phone width and centred on wider screens. */
  --app-column: 440px;
}
