:root {
  /* Brand Colors - Red & White Theme */
  --ct-red: #E11D48;       /* Primary Brand Color */
  --ct-red-hover: #BE123C; /* Darker Red for Hover */
  --ct-red-light: #FFE4E6; /* Light Red Backgrounds */
  
  /* Neutrals */
  --ct-bg: #FFFFFF;
  --ct-surface: #F8FAFC;   /* Very light gray/blue for sections */
  --ct-surface-hover: #F1F5F9;
  --ct-ink: #0F172A;       /* Main Text (Slate 900) */
  --ct-muted: #475569;     /* Secondary Text (Slate 600) */
  --ct-border: #E2E8F0;    /* Borders (Slate 200) */
  --ct-border-focus: #E11D48;
  
  /* Feedback */
  --ct-success: #10B981;
  --ct-warning: #F59E0B;
  --ct-error: #EF4444;

  /* Spacing & Layout */
  --container-width: 1200px;
  --header-height: 72px;
  
  /* Radii */
  --radius-sm: 8px;
  --radius-md: 12px;
  --radius-lg: 16px;
  --radius-full: 9999px;

  /* Shadows */
  --shadow-sm: 0 1px 2px 0 rgba(15, 23, 42, 0.05);
  --shadow-md: 0 4px 6px -1px rgba(15, 23, 42, 0.1), 0 2px 4px -1px rgba(15, 23, 42, 0.06);
  --shadow-lg: 0 10px 15px -3px rgba(15, 23, 42, 0.1), 0 4px 6px -2px rgba(15, 23, 42, 0.05);
  --shadow-xl: 0 20px 25px -5px rgba(15, 23, 42, 0.1), 0 10px 10px -5px rgba(15, 23, 42, 0.04);
  
  /* Transitions */
  --transition-base: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
}

/* -------------------------------------------------------------------------- */
/* RESET & BASE */
/* -------------------------------------------------------------------------- */
*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  scroll-behavior: smooth;
  font-size: 16px;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

body {
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  background-color: var(--ct-bg);
  color: var(--ct-ink);
  line-height: 1.6;
}

a {
  text-decoration: none;
  color: inherit;
  transition: var(--transition-base);
}

img, svg {
  display: block;
  max-width: 100%;
}

/* -------------------------------------------------------------------------- */
/* TYPOGRAPHY */
/* -------------------------------------------------------------------------- */
h1, h2, h3, h4, h5, h6 {
  font-weight: 700;
  letter-spacing: -0.025em;
  color: var(--ct-ink);
  line-height: 1.2;
}

h1 { font-size: 2.5rem; margin-bottom: 1rem; }
h2 { font-size: 2rem; margin-bottom: 0.75rem; }
h3 { font-size: 1.5rem; margin-bottom: 0.5rem; }
p { margin-bottom: 1rem; color: var(--ct-muted); }

.text-center { text-align: center; }
.text-red { color: var(--ct-red); }

@media (min-width: 768px) {
  h1 { font-size: 3.5rem; }
  h2 { font-size: 2.25rem; }
}

/* -------------------------------------------------------------------------- */
/* LAYOUT UTILITIES */
/* -------------------------------------------------------------------------- */
.container {
  width: 100%;
  max-width: var(--container-width);
  margin: 0 auto;
  padding: 0 1.5rem;
}

.section {
  padding: 4rem 0;
  position: relative;
}

.bg-surface { background-color: var(--ct-surface); }
.bg-white { background-color: var(--ct-bg); }

.grid {
  display: grid;
  gap: 2rem;
}

.grid-2 { grid-template-columns: 1fr; }
.grid-3 { grid-template-columns: 1fr; }

@media (min-width: 768px) {
  .grid-2 { grid-template-columns: repeat(2, 1fr); }
  .grid-3 { grid-template-columns: repeat(3, 1fr); }
}

.flex { display: flex; }
.flex-col { flex-direction: column; }
.items-center { align-items: center; }
.justify-between { justify-content: space-between; }
.justify-center { justify-content: center; }
.gap-2 { gap: 0.5rem; }
.gap-4 { gap: 1rem; }
.gap-8 { gap: 2rem; }

/* -------------------------------------------------------------------------- */
/* COMPONENTS */
/* -------------------------------------------------------------------------- */

/* Buttons */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0.75rem 1.5rem;
  font-weight: 600;
  font-size: 1rem;
  border-radius: var(--radius-md);
  cursor: pointer;
  transition: var(--transition-base);
  border: 1px solid transparent;
  gap: 0.5rem;
  white-space: nowrap;
}

.btn-sm {
  padding: 0.5rem 1rem;
  font-size: 0.875rem;
}

.btn-primary {
  background-color: var(--ct-red);
  color: white;
  box-shadow: 0 4px 6px -1px rgba(225, 29, 72, 0.3); /* Red glow shadow */
}

.btn-primary:hover {
  background-color: var(--ct-red-hover);
  transform: translateY(-2px);
  box-shadow: 0 6px 8px -1px rgba(225, 29, 72, 0.4);
}

.btn-outline {
  background-color: white;
  border-color: var(--ct-border);
  color: var(--ct-ink);
}

.btn-outline:hover {
  border-color: var(--ct-red);
  color: var(--ct-red);
  background-color: var(--ct-surface);
}

/* Cards */
.card {
  background: white;
  border: 1px solid var(--ct-border);
  border-radius: var(--radius-lg);
  padding: 2rem;
  transition: var(--transition-base);
  display: flex;
  flex-direction: column;
  position: relative;
  overflow: hidden;
}

.card:hover {
  transform: translateY(-4px);
  box-shadow: var(--ct-shadow-hover);
  border-color: var(--ct-red-light);
}

.card-icon-wrapper {
  width: 56px;
  height: 56px;
  border-radius: var(--radius-md);
  background-color: var(--ct-red-light);
  color: var(--ct-red);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.75rem;
  margin-bottom: 1.5rem;
}

/* Forms & Inputs */
.form-group {
  margin-bottom: 1.5rem;
}

label {
  display: block;
  font-weight: 600;
  margin-bottom: 0.5rem;
  color: var(--ct-ink);
  font-size: 0.95rem;
}

input[type="text"],
input[type="email"],
input[type="number"],
input[type="password"],
textarea,
select {
  width: 100%;
  height: 48px;
  padding: 0 1rem;
  border: 1px solid var(--ct-border);
  border-radius: var(--radius-md);
  background-color: white;
  color: var(--ct-ink);
  font-size: 1rem;
  font-family: inherit;
  transition: var(--transition-base);
}

textarea {
  height: auto;
  padding: 1rem;
  min-height: 120px;
  resize: vertical;
}

input:focus,
textarea:focus,
select:focus {
  outline: none;
  border-color: var(--ct-red);
  box-shadow: 0 0 0 3px var(--ct-red-light);
}

input::placeholder,
textarea::placeholder {
  color: #94A3B8; /* Slate 400 */
}

/* File Upload Zone */
.file-drop-zone {
  border: 2px dashed var(--ct-border);
  border-radius: var(--radius-lg);
  padding: 3rem 2rem;
  text-align: center;
  cursor: pointer;
  transition: var(--transition-base);
  background-color: var(--ct-surface);
}

.file-drop-zone:hover,
.file-drop-zone.dragover {
  border-color: var(--ct-red);
  background-color: var(--ct-red-light);
}

.file-input-hidden {
  display: none;
}

/* Range Sliders */
input[type=range] {
  -webkit-appearance: none; 
  width: 100%; 
  background: transparent;
}

input[type=range]::-webkit-slider-thumb {
  -webkit-appearance: none;
  height: 20px;
  width: 20px;
  border-radius: 50%;
  background: var(--ct-red);
  cursor: pointer;
  margin-top: -8px; 
  box-shadow: 0 2px 4px rgba(0,0,0,0.2);
}

input[type=range]::-webkit-slider-runnable-track {
  width: 100%;
  height: 4px;
  cursor: pointer;
  background: var(--ct-border);
  border-radius: 2px;
}

/* Badges */
.badge {
  display: inline-flex;
  align-items: center;
  padding: 0.25rem 0.75rem;
  border-radius: var(--radius-full);
  font-size: 0.75rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  background-color: var(--ct-red-light);
  color: var(--ct-red);
}

/* -------------------------------------------------------------------------- */
/* HEADER */
/* -------------------------------------------------------------------------- */
header {
  height: var(--header-height);
  background-color: rgba(255, 255, 255, 0.9);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--ct-border);
  position: sticky;
  top: 0;
  z-index: 1000;
  display: flex;
  align-items: center;
}

header nav {
  display: flex;
  align-items: center;
  justify-content: space-between;
  width: 100%;
}

.logo {
  font-size: 1.25rem;
  font-weight: 800;
  color: var(--ct-ink);
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.logo span {
  color: var(--ct-red);
  font-size: 1.5rem;
}

.nav-links {
  display: none;
  list-style: none;
  gap: 2rem;
}

.nav-links a {
  font-weight: 500;
  color: var(--ct-muted);
  position: relative;
}

.nav-links a:hover {
  color: var(--ct-red);
}

.nav-links a.active {
  color: var(--ct-ink);
}

@media (min-width: 768px) {
  .nav-links { display: flex; }
  .mobile-menu-btn { display: none; }
}

/* -------------------------------------------------------------------------- */
/* HERO SECTION */
/* -------------------------------------------------------------------------- */
.hero {
  padding: 6rem 0 4rem;
  text-align: center;
  overflow: hidden;
}

.hero-blob {
  position: absolute;
  top: -20%;
  left: 50%;
  transform: translateX(-50%);
  width: 800px;
  height: 800px;
  background: radial-gradient(circle, rgba(225, 29, 72, 0.08) 0%, rgba(255,255,255,0) 70%);
  z-index: -1;
  pointer-events: none;
}

.hero h1 {
  max-width: 900px;
  margin: 0 auto 1.5rem;
  line-height: 1.1;
}

.hero p {
  font-size: 1.25rem;
  max-width: 600px;
  margin: 0 auto 2.5rem;
}

/* -------------------------------------------------------------------------- */
/* FOOTER */
/* -------------------------------------------------------------------------- */
footer {
  border-top: 1px solid var(--ct-border);
  background-color: var(--ct-bg);
  padding: 4rem 0 2rem;
  margin-top: auto;
}

.footer-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 3rem;
  margin-bottom: 3rem;
}

@media (min-width: 768px) {
  .footer-grid { grid-template-columns: 2fr 1fr 1fr 1fr; }
}

.footer-col h4 {
  font-size: 0.875rem;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--ct-muted);
  margin-bottom: 1.5rem;
}

.footer-col ul {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}

.footer-col a {
  color: var(--ct-ink);
  font-size: 0.95rem;
}

.footer-col a:hover {
  color: var(--ct-red);
}

.copyright {
  text-align: center;
  padding-top: 2rem;
  border-top: 1px solid var(--ct-border);
  color: var(--ct-muted);
  font-size: 0.875rem;
}

/* -------------------------------------------------------------------------- */
/* TOOL SPECIFIC */
/* -------------------------------------------------------------------------- */
.tool-sidebar {
  background: white;
  border: 1px solid var(--ct-border);
  border-radius: var(--radius-lg);
  padding: 1.5rem;
  height: fit-content;
}

.canvas-container {
  background: #1e293b; /* Dark bg for canvas contrast */
  border-radius: var(--radius-lg);
  padding: 2rem;
  display: flex;
  justify-content: center;
  align-items: center;
  min-height: 400px;
  box-shadow: inset 0 2px 4px rgba(0,0,0,0.3);
}
