#pragma once

// ── WiFi ──────────────────────────────────────────────────────────────────
#define WIFI_SSID     "YourSSID"
#define WIFI_PASS     "YourPassword"

// Optional: static IP — bypasses DHCP for maximum connection reliability.
// Recommended if you have reserved an IP for the ESP32's MAC in your router.
// Leave these commented to use DHCP.
// #define WIFI_STATIC_IP      "192.168.1.XXX"  // the reserved IP
// #define WIFI_STATIC_GW      "192.168.1.1"    // your router/gateway IP
// #define WIFI_STATIC_SUBNET  "255.255.255.0"
// #define WIFI_STATIC_DNS     "8.8.8.8"

// ── Companion proxy (Mac running companion/server.py) ─────────────────────
// Prefer the Mac's stable .local mDNS hostname over a raw IP — it never
// changes even if the router reassigns addresses.  Find it with: hostname
#define PROXY_HOST    "your-mac.local"  // e.g. "Jamess-Mac-mini.local" or static IP of that machine
#define PROXY_PORT    7842
#define REFRESH_SECS  300               // poll every 5 minutes
#define STATUS_SECS   5                 // local-only attention poll interval
#define NO_DATA_RETRY_SECS 30           // retry faster while companion is unavailable
#define STARTUP_GRACE_SECS 75           // show startup interstitial before no-data diagnostics

// ── Display ───────────────────────────────────────────────────────────────
#define TFT_BL_PIN   32
#define TFT_BRIGHTNESS 64
#define DIM_STEP        13  // five unchanged polls dim from 64 → near off

// Layout constants (portrait 170×320)
#define SCREEN_W     170
#define SCREEN_H     320

#define HEADER_H      28
#define FOOTER_H      22
#define WIDGET_H     (( SCREEN_H - HEADER_H - FOOTER_H - 1) / 2)  // ~134

// Arc gauge geometry — centered in each widget panel
#define ARC_R_OUTER   58   // outer radius
#define ARC_R_INNER   40   // inner radius (18px track width)
// TFT_eSPI angle convention: 0° = 12 o'clock, increases clockwise.
// 225° = lower-left (7:30).  Track spans 225°→135° clockwise = 270° sweep.
#define ARC_START    225   // degrees — lower-left (7:30 position)
#define ARC_SWEEP    270   // degrees of total travel

// Colors — computed at compile time via RGB565(r,g,b)
#define RGB565(r,g,b) ((uint16_t)(((r & 0xF8) << 8) | ((g & 0xFC) << 3) | (b >> 3)))

#define COL_BG       RGB565( 12,  10,   8)  // #0C0A08 Ember background
#define COL_TRACK    RGB565( 51,  44,  35)  // #332C23 arc track
#define COL_GREEN    RGB565( 84, 177, 115)  // #54B173 under pace
#define COL_YELLOW   RGB565(214, 163,  65)  // #D6A341 approaching pace
#define COL_ORANGE   RGB565(220, 139,  52)  // #DC8B34 on pace
#define COL_RED      RGB565(189,  67,  41)  // #BD4329 over pace / error
#define COL_GREEN_DIM  RGB565( 42,  89,  58)
#define COL_YELLOW_DIM RGB565(107,  82,  33)
#define COL_RED_DIM    RGB565( 95,  34,  21)
#define COL_WHITE    RGB565(243, 236, 220)  // #F3ECDC value text
#define COL_GRAY     RGB565(129, 119, 103)
#define COL_DIVIDER  RGB565( 34,  29,  23)
#define COL_CLAUDE   RGB565(200, 100,  58)
#define COL_CODEX    RGB565(142, 154, 170)
