// // Theme.swift // Poche // // Author: Simon-Pierre Boucher // Contact: contact@spboucher.ai // import SwiftUI enum Theme { // Brand: indigo → violet. Matches the AccentColor asset. static let accentA = Color(red: 0.39, green: 0.35, blue: 0.96) static let accentB = Color(red: 0.72, green: 0.33, blue: 0.98) static var accentGradient: LinearGradient { LinearGradient( colors: [accentA, accentB], startPoint: .topLeading, endPoint: .bottomTrailing ) } static let background = Color(.systemGroupedBackground) static let surface = Color(.secondarySystemGroupedBackground) static let spacingSmall: CGFloat = 6 static let spacingMedium: CGFloat = 12 static let spacingLarge: CGFloat = 24 static let bubbleCornerRadius: CGFloat = 22 static let cardCornerRadius: CGFloat = 20 } /// Soft app-wide backdrop: grouped background with a discreet brand wash /// at the top. Adapts to dark mode through the system colors. struct AppBackground: View { var body: some View { ZStack { Theme.background RadialGradient( colors: [Theme.accentA.opacity(0.12), .clear], center: .top, startRadius: 0, endRadius: 520 ) } .ignoresSafeArea() } } /// The Poche mark: gradient disc + sparkles. struct BrandMark: View { var size: CGFloat = 30 var body: some View { Circle() .fill(Theme.accentGradient) .overlay { Image(systemName: "sparkles") .font(.system(size: size * 0.48, weight: .semibold)) .foregroundStyle(.white) } .frame(width: size, height: size) .shadow(color: Theme.accentA.opacity(0.35), radius: size * 0.18, y: size * 0.08) } }