// Laguna Seca — clean redraw. ViewBox 1000×560 (height reduced so bottom strip
// sits BELOW the track, not over it). Counter-clockwise.
//
// Track geography:
//   - Front straight runs vertically up the right side (T11 → T1)
//   - T1: soft left kink at top right
//   - T2 Andretti Hairpin: tight right-handed 180° at far top right
//   - T3-T4-T5: infield esses across the upper middle
//   - T6: long right sweep onto Rahal Straight
//   - Rahal Straight climbs to upper-LEFT
//   - T7 left into T8/8a CORKSCREW (left/right drop)
//   - T9 Rainey Curve right, drops to lower left
//   - T10 left, T11 right onto front straight

window.LAGUNA_PATH = [
  // Start/finish at bottom of front straight
  "M 700 480",
  // Front straight UP
  "L 700 280",
  // T1 soft left
  "C 700 245, 715 225, 750 220",
  // Up to T2 Andretti hairpin
  "L 815 215",
  "C 870 213, 895 195, 880 165",
  // Hairpin pulls back left
  "C 865 140, 820 138, 780 152",
  "L 700 175",
  // Through T3 infield (right then left)
  "C 660 188, 625 190, 600 170",
  // T4
  "C 575 150, 545 152, 525 175",
  // T5 — back across to Rahal Straight start
  "C 510 195, 480 200, 445 180",
  "L 360 165",
  // T6 sweep right
  "C 305 152, 270 165, 250 200",
  // Rahal Straight (going left and up)
  "L 200 240",
  // T7 left
  "C 175 255, 155 250, 145 230",
  "C 130 210, 105 220, 105 245",
  // T8 left (Corkscrew entry)
  "L 115 280",
  "C 122 305, 150 312, 165 295",
  // T8a right (Corkscrew exit) — drop
  "C 180 280, 200 285, 200 310",
  // Drop down to T9 Rainey Curve
  "L 195 360",
  "C 192 395, 175 415, 145 425",
  // T10 left at bottom-left
  "L 110 445",
  "C 85 458, 85 485, 115 495",
  // Across the bottom to T11
  "L 240 510",
  // T11 right onto front straight
  "C 320 520, 420 522, 520 502",
  "L 660 488",
  "C 685 485, 695 482, 700 480",
  "Z"
].join(" ");

// Turn marker positions
window.TURN_MARKERS = [
  { n: 1,  x: 720, y: 235, label: "T1" },
  { n: 2,  x: 895, y: 175, label: "T2", important: true, name: "ANDRETTI HAIRPIN" },
  { n: 3,  x: 660, y: 175, label: "T3" },
  { n: 4,  x: 560, y: 152, label: "T4" },
  { n: 5,  x: 470, y: 192, label: "T5" },
  { n: 6,  x: 270, y: 162, label: "T6" },
  { n: 7,  x: 110, y: 220, label: "T7" },
  { n: 8,  x: 95,  y: 290, label: "T8/8a", important: true, name: "CORKSCREW" },
  { n: 9,  x: 215, y: 380, label: "T9", name: "RAINEY" },
  { n: 10, x: 80,  y: 470, label: "T10" },
  { n: 11, x: 270, y: 530, label: "T11" },
];

window.SECTORS = [
  { s: "S1", from: 0.00, to: 0.22, color: "#5BB7E2" },
  { s: "S2", from: 0.22, to: 0.62, color: "#C9A24A" },
  { s: "S3", from: 0.62, to: 1.00, color: "#7DC383" },
];

window.PIT_LANE = "M 720 480 L 720 285 C 720 260, 728 248, 745 245";
