/* ==========================================================================
   The Chicanes — design tokens
   Direct translation of AppTheme.swift.

   SwiftUI values are converted as follows:
     Color(red: 0.13, green: 0.13, blue: 0.13)  ->  #212121
     Color(red: 0.18, green: 0.38, blue: 0.18)  ->  #2E612E
   UIColor semantic colours (systemBackground, label, separator …) are
   reproduced with their documented light and dark values, so the site
   follows the phone's appearance setting the way the app did.
   ========================================================================== */

:root {
  /* --- AppTheme.Colors --- */
  --header-background:     #212121;
  --header-text:           #FFFFFF;
  --accent:                #2E612E;
  --background:            #FFFFFF;              /* systemBackground */
  --secondary-background:  #F2F2F7;              /* secondarySystemBackground */
  --primary-text:          #000000;              /* label */
  --secondary-text:        rgba(60, 60, 67, .60);/* secondaryLabel */
  --divider:               rgba(60, 60, 67, .29);/* separator */

  /* System accents used by the map chrome and side menu */
  --tint:                  #007AFF;              /* systemBlue */
  --tint-wash:             rgba(0, 122, 255, .10);
  --pin:                   #FF3B30;              /* systemRed */

  /* Translucent chrome — the web stand-in for SwiftUI's .thinMaterial */
  --material:              rgba(255, 255, 255, .72);
  --material-border:       rgba(0, 0, 0, .07);
  --scrim:                 rgba(0, 0, 0, .40);
  --sheet-background:      #FFFFFF;
  --shadow:                rgba(0, 0, 0, .22);

  /* --- AppTheme.Typography ---
     SwiftUI's .serif design resolves to New York on Apple platforms; the
     stack below keeps that on Apple devices and degrades sensibly elsewhere. */
  --font-serif: ui-serif, "New York", "Iowan Old Style", Palatino, Georgia, "Times New Roman", serif;
  --font-sans:  -apple-system, BlinkMacSystemFont, "SF Pro Text", "Segoe UI", Roboto,
                "Helvetica Neue", Arial, sans-serif;

  --page-title-size:    28px;   /* .system(size: 28, weight: .bold, design: .serif) */
  --section-title-size: 18px;   /* .system(size: 18, weight: .bold) */
  --body-size:          16px;   /* .system(size: 16, weight: .regular) */
  --caption-size:       13px;   /* .system(size: 13, weight: .regular) */
  --label-size:         12px;   /* .system(size: 12, weight: .semibold) */
  --label-tracking:     1.2px;  /* .tracking(1.2) */

  /* --- AppTheme.Spacing --- */
  --page-padding: 20px;
  --section-gap:  24px;
  --item-gap:     12px;

  /* Layout constants from MainContainerView.swift */
  --menu-width: 260px;
  --topbar-height: 60px;
}

@media (prefers-color-scheme: dark) {
  :root {
    --background:           #000000;
    --secondary-background:  #1C1C1E;
    --primary-text:          #FFFFFF;
    --secondary-text:        rgba(235, 235, 245, .60);
    --divider:               rgba(84, 84, 88, .65);
    --tint:                  #0A84FF;
    --tint-wash:             rgba(10, 132, 255, .16);
    --pin:                   #FF453A;
    --material:              rgba(30, 30, 32, .74);
    --material-border:       rgba(255, 255, 255, .10);
    --sheet-background:      #1C1C1E;
    --shadow:                rgba(0, 0, 0, .55);
  }
}
