/* ============================================
   Fraktál Kávé - Premium Modern Design System
   ============================================ */

:root {
  /* Light Mode Colors */
  --color-bg-primary: #f9f7f3;
  --color-bg-secondary: #ffffff;
  --color-text-primary: #2d2d2d;
  --color-text-secondary: #5a5a5a;
  --color-text-light: #8b8b8b;
  --color-border: #e8e4de;
  --color-accent-primary: #a1662f;
  --color-accent-secondary: #e4572e;
  --color-accent-tertiary: #6b5d56;
  --color-shadow: rgba(0, 0, 0, 0.08);
  --color-header-bg: #f9f7f3;
  --color-footer-bg: #1a1a1a;
  --color-footer-text: #e8e4de;
}

[data-theme="dark"] {
  /* Dark Mode Colors */
  --color-bg-primary: #1a1a1a;
  --color-bg-secondary: #242424;
  --color-text-primary: #e8e4de;
  --color-text-secondary: #b5b5b5;
  --color-text-light: #8b8b8b;
  --color-border: #3a3a3a;
  --color-accent-primary: #c49461;
  --color-accent-secondary: #ff7555;
  --color-accent-tertiary: #9d8d85;
  --color-shadow: rgba(0, 0, 0, 0.3);
  --color-header-bg: #1a1a1a;
  --color-footer-bg: #0d0d0d;
  --color-footer-text: #c5c5c5;
}

/* Typography */
@import url('https://fonts.googleapis.com/css2?family=Crimson+Text:ital,wght@0,400;0,600;1,400&family=DM+Sans:ital,wght@0,400;0,500;0,700&display=swap');

* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  font-family: 'DM Sans', sans-serif;
  background-color: var(--color-bg-primary);
  color: var(--color-text-primary);
  line-height: 1.6;
  transition: background-color 0.3s ease, color 0.3s ease;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

h1, h2, h3, h4, h5, h6 {
  font-family: 'Crimson Text', serif;
  font-weight: 600;
  color: var(--color-text-primary);
  transition: color 0.3s ease;
  line-height: 1.2;
}

h1 { font-size: 3.5rem; }
h2 { font-size: 2.8rem; margin: 1.5rem 0 1rem 0; }
h3 { font-size: 2.2rem; margin: 1.2rem 0 0.8rem 0; }
h4 { font-size: 1.6rem; margin: 1rem 0 0.6rem 0; }
h5 { font-size: 1.3rem; margin: 0.8rem 0 0.5rem 0; }
h6 { font-size: 1.1rem; margin: 0.6rem 0 0.4rem 0; }

p { margin-bottom: 1rem; font-size: 1.05rem; color: var(--color-text-secondary); }
a { color: var(--color-accent-primary); text-decoration: none; transition: color 0.3s ease; }
a:hover { color: var(--color-accent-secondary); }

/* Header & Navigation */
header {
  background-color: var(--color-header-bg);
  border-bottom: 1px solid var(--color-border);
  transition: background-color 0.3s ease, border-color 0.3s ease;
  position: sticky;
  top: 0;
  z-index: 1000;
  backdrop-filter: blur(10px);
  background-color: rgba(249, 247, 243, 0.95);
}

[data-theme="dark"] header {
  background-color: rgba(26, 26, 26, 0.95);
}

nav.navbar {
  background-color: transparent;
  padding: 1.2rem 0;
}

.navbar-brand {
  font-family: 'Crimson Text', serif;
  font-size: 1.8rem;
  font-weight: 600;
  color: var(--color-accent-primary) !important;
  transition: color 0.3s ease;
}

.navbar-brand:hover {
  color: var(--color-accent-secondary) !important;
}

.nav-link {
  color: var(--color-text-primary) !important;
  font-weight: 500;
  margin: 0 0.5rem;
  position: relative;
  transition: color 0.3s ease;
}

.nav-link::after {
  content: '';
  position: absolute;
  bottom: -4px;
  left: 0;
  width: 0;
  height: 2px;
  background-color: var(--color-accent-secondary);
  transition: width 0.3s ease;
}

.nav-link:hover {
  color: var(--color-accent-secondary) !important;
}

.nav-link:hover::after {
  width: 100%;
}

.nav-link.active::after {
  width: 100%;
}

.navbar-toggler {
  border-color: var(--color-border);
}

.navbar-toggler-icon {
  background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 30 30'%3e%3cpath stroke='%232d2d2d' stroke-linecap='round' stroke-miterlimit='10' stroke-width='2' d='M4 7h22M4 15h22M4 23h22'/%3e%3c/svg%3e");
}

[data-theme="dark"] .navbar-toggler-icon {
  background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 30 30'%3e%3cpath stroke='%23e8e4de' stroke-linecap='round' stroke-miterlimit='10' stroke-width='2' d='M4 7h22M4 15h22M4 23h22'/%3e%3c/svg%3e");
}

/* Header Controls */
.header-controls {
  display: flex;
  align-items: center;
  gap: 1rem;
  margin-left: auto;
}

.theme-toggle, .lang-toggle {
  background: none;
  border: none;
  cursor: pointer;
  color: var(--color-accent-primary);
  font-size: 1.2rem;
  padding: 0.5rem;
  border-radius: 50%;
  transition: all 0.3s ease;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.theme-toggle:hover, .lang-toggle:hover {
  background-color: var(--color-border);
  color: var(--color-accent-secondary);
  transform: scale(1.1);
}

/* Buttons */
.btn {
  font-family: 'DM Sans', sans-serif;
  font-weight: 600;
  border: none;
  border-radius: 8px;
  padding: 0.8rem 1.8rem;
  transition: all 0.3s ease;
  cursor: pointer;
  text-decoration: none;
  display: inline-block;
  font-size: 1rem;
}

.btn-primary {
  background-color: var(--color-accent-primary);
  color: #ffffff;
}

.btn-primary:hover {
  background-color: var(--color-accent-secondary);
  transform: translateY(-2px);
  box-shadow: 0 8px 16px rgba(161, 102, 47, 0.2);
}

.btn-accent {
  background-color: var(--color-accent-secondary);
  color: #ffffff;
}

.btn-accent:hover {
  background-color: var(--color-accent-primary);
  transform: translateY(-2px);
  box-shadow: 0 8px 16px rgba(228, 87, 46, 0.2);
}

.btn-lg { padding: 1rem 2.2rem; font-size: 1.1rem; }

/* Container & Layout */
.container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 2rem;
}

@media (max-width: 768px) {
  .container { padding: 0 1rem; }
}

/* Bento Grid System */
.bento-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 1.5rem;
  margin: 2rem 0;
}

.bento-grid.grid-2 {
  grid-template-columns: repeat(2, 1fr);
}

.bento-grid.grid-3 {
  grid-template-columns: repeat(3, 1fr);
}

.bento-grid.grid-4 {
  grid-template-columns: repeat(4, 1fr);
}

.bento-item {
  background-color: var(--color-bg-secondary);
  border: 1px solid var(--color-border);
  border-radius: 14px;
  padding: 2rem;
  transition: all 0.3s ease;
  position: relative;
  overflow: hidden;
}

.bento-item::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: linear-gradient(135deg, rgba(255,255,255,0.1) 0%, rgba(255,255,255,0) 100%);
  pointer-events: none;
}

.bento-item:hover {
  border-color: var(--color-accent-primary);
  transform: translateY(-8px);
  box-shadow: 0 12px 32px var(--color-shadow);
}

.bento-item.size-2x1 { grid-column: span 2; }
.bento-item.size-1x2 { grid-row: span 2; }
.bento-item.size-2x2 { grid-column: span 2; grid-row: span 2; }

@media (max-width: 1024px) {
  .bento-item.size-2x1, .bento-item.size-2x2 { grid-column: span 1; }
}

/* Hero Section */
.hero-section {
  padding: 4rem 0;
  background: linear-gradient(135deg, var(--color-bg-secondary) 0%, var(--color-border) 100%);
  border-bottom: 1px solid var(--color-border);
  animation: slideUp 0.8s ease-out;
}

.hero-section h1 {
  font-size: 3.5rem;
  margin-bottom: 1.5rem;
}

.hero-section .lead {
  font-size: 1.3rem;
  color: var(--color-text-secondary);
  margin-bottom: 2rem;
}

/* Cards & Components */
.card {
  background-color: var(--color-bg-secondary);
  border: 1px solid var(--color-border);
  border-radius: 12px;
  overflow: hidden;
  box-shadow: 0 4px 12px var(--color-shadow);
  transition: all 0.3s ease;
}

.card:hover {
  transform: translateY(-4px);
  box-shadow: 0 8px 24px var(--color-shadow);
}

.card-header {
  background: linear-gradient(135deg, var(--color-accent-primary), var(--color-accent-secondary));
  color: #ffffff;
  padding: 1.5rem;
  border: none;
}

.card-body {
  padding: 2rem;
  color: var(--color-text-secondary);
}

.card-title {
  color: var(--color-text-primary);
  font-family: 'Crimson Text', serif;
  font-weight: 600;
  font-size: 1.5rem;
}

/* Feature Tiles */
.feature-tile {
  text-align: center;
  padding: 2rem;
}

.feature-tile-icon {
  width: 60px;
  height: 60px;
  margin: 0 auto 1.5rem;
  background: linear-gradient(135deg, var(--color-accent-primary), var(--color-accent-secondary));
  border-radius: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 2rem;
}

.feature-tile h3 {
  margin-bottom: 1rem;
  font-size: 1.4rem;
}

/* Section Spacing */
.section-spacing {
  padding: 4rem 0;
}

.section-spacing.pt-lg {
  padding-top: 6rem;
}

.section-spacing.pb-lg {
  padding-bottom: 6rem;
}

/* Text Styles */
.text-primary { color: var(--color-accent-primary); }
.text-accent { color: var(--color-accent-secondary); }
.text-muted { color: var(--color-text-light); }

.text-center { text-align: center; }
.text-left { text-align: left; }
.text-right { text-align: right; }

/* Spacing Utilities */
.mb-1 { margin-bottom: 0.5rem; }
.mb-2 { margin-bottom: 1rem; }
.mb-3 { margin-bottom: 1.5rem; }
.mb-4 { margin-bottom: 2rem; }
.mb-5 { margin-bottom: 3rem; }

.mt-1 { margin-top: 0.5rem; }
.mt-2 { margin-top: 1rem; }
.mt-3 { margin-top: 1.5rem; }
.mt-4 { margin-top: 2rem; }
.mt-5 { margin-top: 3rem; }

.p-1 { padding: 0.5rem; }
.p-2 { padding: 1rem; }
.p-3 { padding: 1.5rem; }
.p-4 { padding: 2rem; }
.p-5 { padding: 3rem; }

/* Animations */
@keyframes slideUp {
  from { opacity: 0; transform: translateY(20px); }
  to { opacity: 1; transform: translateY(0); }
}

@keyframes fadeIn {
  from { opacity: 0; }
  to { opacity: 1; }
}

@keyframes slideInLeft {
  from { opacity: 0; transform: translateX(-20px); }
  to { opacity: 1; transform: translateX(0); }
}

@keyframes slideInRight {
  from { opacity: 0; transform: translateX(20px); }
  to { opacity: 1; transform: translateX(0); }
}

.animate-slideUp {
  animation: slideUp 0.6s ease-out;
}

.animate-fadeIn {
  animation: fadeIn 0.6s ease-out;
}

/* Footer */
footer {
  background-color: var(--color-footer-bg);
  color: var(--color-footer-text);
  padding: 3rem 0 1rem;
  border-top: 1px solid var(--color-border);
  transition: background-color 0.3s ease, color 0.3s ease;
}

footer h5, footer h6 {
  color: var(--color-footer-text);
  font-weight: 600;
}

footer a {
  color: var(--color-footer-text);
  opacity: 0.8;
  transition: opacity 0.3s ease;
}

footer a:hover {
  opacity: 1;
  color: var(--color-accent-primary);
}

.footer-divider {
  border-top: 1px solid rgba(255, 255, 255, 0.1);
  margin-top: 2rem;
  padding-top: 2rem;
}

/* Responsive */
@media (max-width: 768px) {
  h1 { font-size: 2.5rem; }
  h2 { font-size: 2rem; }
  h3 { font-size: 1.6rem; }

  .container { padding: 0 1rem; }

  .section-spacing {
    padding: 2.5rem 0;
  }

  .bento-grid {
    grid-template-columns: 1fr;
    gap: 1rem;
  }

  .bento-item {
    padding: 1.5rem;
  }

  .nav-item { margin: 0.5rem 0; }

  .header-controls {
    flex-direction: column;
    gap: 0.5rem;
  }
}

/* Accessibility */
.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0,0,0,0);
  white-space: nowrap;
  border-width: 0;
}

/* Forms */
input, textarea, select {
  background-color: var(--color-bg-secondary);
  color: var(--color-text-primary);
  border: 1px solid var(--color-border);
  border-radius: 8px;
  padding: 0.8rem;
  font-family: 'DM Sans', sans-serif;
  transition: all 0.3s ease;
}

input:focus, textarea:focus, select:focus {
  outline: none;
  border-color: var(--color-accent-primary);
  box-shadow: 0 0 0 3px rgba(161, 102, 47, 0.1);
}

label {
  color: var(--color-text-primary);
  font-weight: 500;
  margin-bottom: 0.5rem;
  display: block;
}

/* Blockquote */
blockquote {
  border-left: 4px solid var(--color-accent-primary);
  padding: 1.5rem 0 1.5rem 2rem;
  margin: 2rem 0;
  font-style: italic;
  color: var(--color-text-secondary);
  background-color: rgba(161, 102, 47, 0.05);
  border-radius: 8px;
}

/* Images */
img {
  max-width: 100%;
  height: auto;
  border-radius: 12px;
  transition: transform 0.3s ease;
}

img:hover {
  transform: scale(1.02);
}

/* Lists */
ul, ol {
  margin-left: 1.5rem;
  margin-bottom: 1.5rem;
}

li {
  margin-bottom: 0.5rem;
}

/* Testimonials */
.testimonial {
  background: linear-gradient(135deg, var(--color-bg-secondary), var(--color-border));
  border-radius: 12px;
  padding: 2rem;
  border-left: 4px solid var(--color-accent-secondary);
  margin: 1.5rem 0;
}

.testimonial-author {
  font-weight: 600;
  margin-top: 1rem;
  color: var(--color-accent-primary);
}

/* Page Transition */
main {
  animation: fadeIn 0.4s ease-out;
}

/* Smooth Scrolling */
html {
  scroll-behavior: smooth;
}

/* Print Styles */
@media print {
  header, footer, .no-print {
    display: none;
  }

  body {
    background-color: #ffffff;
    color: #000000;
  }
}
