/* Culinari Sunset Coral Theme - Base Styles */
/* Based on culinari-theme.jsx design reference */

/* Font imports */
@import url("https://fonts.googleapis.com/css2?family=Inter:wght@400;500;600;700&display=swap");

/* ========================================
   CSS CUSTOM PROPERTIES (Design Tokens)
   ======================================== */
:root {
  color-scheme: light dark;

  /* Light Mode Colors */
  --bg: #FFF8F0;
  --bg-secondary: #FFF0E6;
  --bg-tertiary: #FEEBD9;
  --bg-card: #FFFFFF;
  --bg-card-hover: #FFFAF5;
  --bg-nav: rgba(255,248,240,0.85);

  /* Text: Neutral/Warm - nicht bunt! */
  --text: #1A1817;           /* Fast schwarz, minimal warm */
  --text-secondary: #4A4745; /* Dunkelgrau, warm */
  --text-tertiary: #6B6865;  /* Mittelgrau */
  --text-muted: #8A8785;     /* Hellgrau */
  --text-on-primary: #FFFFFF;

  --primary: #E8845C;
  --primary-hover: #D4694A;
  --primary-active: #C45A3A;
  --primary-light: #FDE8D8;
  --secondary: #D4694A;

  --border: rgba(61,43,31,0.08);
  --border-strong: rgba(61,43,31,0.15);
  --border-card: rgba(61,43,31,0.06);

  --leaf: #87A878;
  --success: #4CAF50;
  --warning: #F59E0B;
  --error: #EF4444;

  --shadow: 0 1px 3px rgba(45,27,20,0.06), 0 1px 2px rgba(45,27,20,0.04);
  --shadow-md: 0 4px 12px rgba(45,27,20,0.08), 0 2px 4px rgba(45,27,20,0.04);
  --shadow-glow: 0 0 20px rgba(232,132,92,0.15);
}

/* Dark Mode Colors */
html.dark {
  --bg: #0D0A09;
  --bg-secondary: #151110;
  --bg-tertiary: #1C1614;
  --bg-card: #1A1412;
  --bg-card-hover: #211A17;
  --bg-nav: rgba(13,10,9,0.9);

  /* Text: Neutral/Warm - nicht bunt! */
  --text: #F5F3F1;           /* Fast weiß, minimal warm */
  --text-secondary: #B8B5B2; /* Hellgrau, warm */
  --text-tertiary: #8A8784;  /* Mittelgrau */
  --text-muted: #5A5855;     /* Dunkelgrau */

  --primary: #E8845C;
  --primary-hover: #F0A080;  /* Lighter in dark mode! */
  --primary-active: #F5B898;
  --primary-light: #2D1B14;

  --border: rgba(255,248,240,0.06);
  --border-strong: rgba(255,248,240,0.12);
  --border-card: rgba(255,248,240,0.04);

  --shadow: 0 1px 3px rgba(0,0,0,0.3), 0 1px 2px rgba(0,0,0,0.2);
  --shadow-md: 0 4px 12px rgba(0,0,0,0.4), 0 2px 4px rgba(0,0,0,0.3);
  --shadow-glow: 0 0 24px rgba(232,132,92,0.2);
}

/* ========================================
   BASE STYLES
   ======================================== */
html {
  transition: background-color 0.4s ease, color 0.4s ease;
}

body {
  font-family: 'Trebuchet MS', 'Gill Sans', system-ui, -apple-system, BlinkMacSystemFont, sans-serif;
  background-color: var(--bg);
  color: var(--text);
  transition: background-color 0.4s ease, color 0.4s ease;
}

/* Heading font family */
h1, h2, h3, h4, h5, h6 {
  font-family: Georgia, Cambria, 'Times New Roman', serif;
}

/* Theme-aware transitions for all interactive elements */
a, button, input, select, textarea,
.transition-theme {
  transition: background-color 0.3s ease, border-color 0.3s ease, color 0.3s ease, box-shadow 0.3s ease;
}

/* Focus ring for accessibility */
:focus-visible {
  outline: 2px solid var(--primary);
  outline-offset: 2px;
}

/* Selection colors */
::selection {
  background-color: rgba(232, 132, 92, 0.3);
  color: inherit;
}

/* ========================================
   STICKY HEADER
   ======================================== */
.sticky-header {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 100;
  background: var(--bg-nav);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border-bottom: 1px solid var(--border);
  transition: all 0.4s ease;
}

/* Offset body content for sticky header */
.has-sticky-header {
  padding-top: 72px;
}

/* ========================================
   THEME TOGGLE
   ======================================== */
.theme-toggle {
  min-width: 44px;
  min-height: 44px;
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
}

/* Theme icon transitions */
.theme-icon-sun,
.theme-icon-moon {
  transition: opacity 0.3s ease, transform 0.3s ease;
}

html:not(.dark) .theme-icon-moon {
  opacity: 0;
  transform: rotate(90deg) scale(0);
  position: absolute;
}

html:not(.dark) .theme-icon-sun {
  opacity: 1;
  transform: rotate(0) scale(1);
}

html.dark .theme-icon-sun {
  opacity: 0;
  transform: rotate(-90deg) scale(0);
  position: absolute;
}

html.dark .theme-icon-moon {
  opacity: 1;
  transform: rotate(0) scale(1);
}

/* ========================================
   LOGO ANIMATION - Tree grows from pot
   ======================================== */
@keyframes treeGrow {
  0% {
    transform: scaleY(0);
    transform-origin: bottom center;
    opacity: 0;
  }
  30% {
    opacity: 1;
  }
  100% {
    transform: scaleY(1);
    transform-origin: bottom center;
    opacity: 1;
  }
}

@keyframes potBounce {
  0%, 100% {
    transform: translateY(0);
  }
  50% {
    transform: translateY(-2px);
  }
}

@keyframes familyFadeIn {
  0% {
    opacity: 0;
    transform: scale(0.5);
  }
  100% {
    opacity: 1;
    transform: scale(1);
  }
}

.animate-tree-grow {
  animation: treeGrow 0.8s ease-out 0.3s backwards;
}

.animate-pot-bounce {
  animation: potBounce 0.6s ease-out 0.2s;
}

.animate-family-fade {
  animation: familyFadeIn 0.5s ease-out 0.8s backwards;
}

/* ========================================
   CARD STYLES
   ======================================== */
.card {
  background: var(--bg-card);
  border: 1px solid var(--border-card);
  border-radius: 14px;
  box-shadow: var(--shadow);
  transition: all 0.3s ease;
}

.card:hover {
  background: var(--bg-card-hover);
  box-shadow: var(--shadow-md);
  border-color: var(--primary);
}

/* ========================================
   BUTTON STYLES
   ======================================== */
.btn-primary {
  background: var(--primary);
  color: var(--text-on-primary);
  font-weight: 600;
  padding: 0.75rem 1.5rem;
  border-radius: 12px;
  border: none;
  cursor: pointer;
  box-shadow: var(--shadow-glow);
  transition: all 0.2s ease;
}

.btn-primary:hover {
  background: var(--primary-hover);
  transform: translateY(-1px);
}

.btn-secondary {
  background: transparent;
  color: var(--text-secondary);
  font-weight: 500;
  padding: 0.75rem 1.5rem;
  border-radius: 12px;
  border: 1.5px solid var(--border-strong);
  cursor: pointer;
  transition: all 0.2s ease;
}

.btn-secondary:hover {
  border-color: var(--primary);
  color: var(--primary);
}

/* ========================================
   INPUT STYLES
   ======================================== */
input, select, textarea {
  background: var(--bg-card);
  border: 1.5px solid var(--border-strong);
  border-radius: 10px;
  padding: 10px 14px;
  color: var(--text);
  font-family: inherit;
  font-size: 13px;
}

input:focus, select:focus, textarea:focus {
  border-color: var(--primary);
  outline: none;
  box-shadow: 0 0 0 3px rgba(232,132,92,0.2);
}

/* ========================================
   BADGE STYLES
   ======================================== */
.badge {
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.5px;
  padding: 4px 10px;
  border-radius: 7px;
}

.badge-primary {
  background: var(--primary-light);
  color: var(--primary);
}

.badge-success {
  background: #E8F5E8;
  color: var(--success);
}

html.dark .badge-success {
  background: #1A2E1A;
}

.badge-leaf {
  background: #E8F0E4;
  color: var(--leaf);
}

html.dark .badge-leaf {
  background: #1A241A;
}

/* ========================================
   ALERT STYLES
   ======================================== */
.alert {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 8px 12px;
  border-radius: 9px;
  border-left: 3px solid;
}

.alert-success {
  background: #E8F5E8;
  border-color: var(--success);
  color: var(--success);
}

html.dark .alert-success {
  background: #1A2E1A;
}

.alert-warning {
  background: #FFF3E0;
  border-color: var(--warning);
  color: var(--warning);
}

html.dark .alert-warning {
  background: #2D2010;
}

.alert-error {
  background: #FEE2E2;
  border-color: var(--error);
  color: var(--error);
}

html.dark .alert-error {
  background: #3D1A1A;
}

.alert-info {
  background: var(--primary-light);
  border-color: var(--primary);
  color: var(--primary);
}

/* ========================================
   TEXT COLOR OVERRIDES
   Make text neutral (not orange!) while
   keeping warm backgrounds and accents
   ======================================== */

/* Override coral text classes to neutral */
.text-coral-950,
.text-coral-900 {
  color: #1A1817 !important;  /* Near-black, warm */
}

.text-coral-800,
.text-coral-700 {
  color: #4A4745 !important;  /* Dark grey */
}

.text-coral-600 {
  color: #6B6865 !important;  /* Medium grey */
}

html.dark .text-coral-100,
html.dark .dark\:text-coral-100 {
  color: #F5F3F1 !important;  /* Near-white, warm */
}

html.dark .text-coral-200,
html.dark .dark\:text-coral-200 {
  color: #E8E6E3 !important;  /* Light grey */
}

html.dark .text-coral-300,
html.dark .dark\:text-coral-300 {
  color: #D4D2CF !important;  /* Light grey */
}

html.dark .text-coral-400,
html.dark .dark\:text-coral-400 {
  color: #B8B5B2 !important;  /* Medium grey */
}

/* Keep coral-500 orange for accents/links */
.text-coral-500 {
  color: #E8845C !important;  /* Primary coral - for headings/accents only! */
}

/* White text stays white */
.text-white,
html.dark .dark\:text-white {
  color: #FFFFFF !important;
}
