:root {
  --bg: #f7f6f2;
  --surface: #ffffff;
  --surface-alt: #ecebea;
  --primary: #5c6b73;
  --primary-hover: #455259;
  --accent: #d28e75;
  --accent-hover: #b8765e;
  --text-main: #252627;
  --text-muted: #6b6c6e;
  --border: #dfddda;
  --focus: #d28e75;
  --error: #c05c5c;
  
  --radius: 12px;
  --radius-sm: 8px;
  --shadow: 0 4px 24px rgba(37, 38, 39, 0.06);
  --shadow-hover: 0 12px 32px rgba(37, 38, 39, 0.1);
  --blur: blur(12px);

  --font-base: system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  
  --space-4: 4px;
  --space-8: 8px;
  --space-12: 12px;
  --space-16: 16px;
  --space-24: 24px;
  --space-40: 40px;
  --space-64: 64px;
  --space-120: 120px;
}

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

body {
  font-family: var(--font-base);
  background-color: var(--bg);
  color: var(--text-main);
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
  display: flex;
  flex-direction: column;
  min-height: 100vh;
}

h1, h2, h3, h4, h5, h6 {
  font-weight: 600;
  line-height: 1.2;
  color: var(--text-main);
  overflow-wrap: anywhere;
}

h1 { font-size: 2.5rem; margin-bottom: var(--space-24); }
h2 { font-size: 1.75rem; margin-bottom: var(--space-16); }
h3 { font-size: 1.25rem; margin-bottom: var(--space-12); }
p { margin-bottom: var(--space-16); }

a {
  color: var(--primary);
  text-decoration: none;
  transition: color 0.2s ease;
}
a:hover { color: var(--primary-hover); }

:focus-visible {
  outline: 2px solid var(--focus);
  outline-offset: 2px;
}

.container {
  width: 100%;
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 var(--space-24);
  min-width: 0;
}

/* Header */
.site-header {
  height: 64px;
  background: rgba(255, 255, 255, 0.85);
  backdrop-filter: var(--blur);
  -webkit-backdrop-filter: var(--blur);
  border-bottom: 1px solid var(--border);
  display: flex;
  align-items: center;
  position: relative;
  z-index: 100;
}

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

.brand {
  display: flex;
  align-items: center;
  gap: var(--space-8);
  font-weight: 700;
  font-size: 1.125rem;
  color: var(--text-main);
  overflow-wrap: anywhere;
}

.brand svg {
  width: 24px;
  height: 24px;
  fill: var(--accent);
}

.nav-desktop {
  display: flex;
  gap: var(--space-24);
}

.nav-desktop a {
  color: var(--text-muted);
  font-size: 0.875rem;
  font-weight: 500;
}
.nav-desktop a:hover { color: var(--text-main); }

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0 var(--space-16);
  height: 40px;
  background-color: var(--accent);
  color: var(--surface);
  border-radius: var(--radius-sm);
  font-weight: 500;
  font-size: 0.875rem;
  border: none;
  cursor: pointer;
  transition: background-color 0.2s ease, transform 0.2s ease;
}
.btn:hover {
  background-color: var(--accent-hover);
  color: var(--surface);
}
.btn-outline {
  background-color: transparent;
  color: var(--text-main);
  border: 1px solid var(--border);
}
.btn-outline:hover {
  background-color: var(--surface-alt);
  color: var(--text-main);
}

.mobile-toggle {
  display: none;
  background: none;
  border: none;
  cursor: pointer;
  padding: var(--space-4);
}
.mobile-toggle svg {
  width: 24px;
  height: 24px;
  fill: var(--text-main);
}

.nav-mobile-overlay {
  display: none;
  position: absolute;
  top: 64px;
  left: 0;
  width: 100%;
  background: var(--surface);
  border-bottom: 1px solid var(--border);
  padding: var(--space-24);
  box-shadow: var(--shadow);
  z-index: 99;
}
.nav-mobile-overlay.is-visible {
  display: flex;
  flex-direction: column;
  gap: var(--space-16);
}

/* Layout */
main {
  flex: 1;
  padding: var(--space-64) 0 var(--space-120) 0;
}

section {
  margin-bottom: var(--space-64);
}

/* Hero */
.hero {
  text-align: left;
  max-width: 800px;
  margin-bottom: var(--space-64);
}
.hero p {
  font-size: 1.125rem;
  color: var(--text-muted);
  max-width: 600px;
}

/* Horizontal Split Card */
.card-list {
  display: flex;
  flex-direction: column;
  gap: var(--space-24);
}

.card {
  display: flex;
  background: var(--surface);
  border-radius: var(--radius);
  overflow: hidden;
  box-shadow: var(--shadow);
  border: 1px solid var(--border);
  transition: box-shadow 0.2s ease, transform 0.2s ease;
  min-width: 0;
}
.card:hover {
  box-shadow: var(--shadow-hover);
  transform: translateY(-2px);
}

.card-media {
  flex: 0 0 35%;
  min-width: 240px;
  background-color: var(--surface-alt);
  position: relative;
}
.card-media img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.card-content {
  padding: var(--space-40);
  display: flex;
  flex-direction: column;
  justify-content: center;
  flex: 1;
  min-width: 0;
}

.card-meta {
  display: flex;
  gap: var(--space-12);
  margin-bottom: var(--space-16);
}
.tag {
  font-size: 0.75rem;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  background: var(--surface-alt);
  padding: var(--space-4) var(--space-8);
  border-radius: var(--radius-sm);
  color: var(--primary);
  font-weight: 600;
}

.card-title {
  font-size: 1.5rem;
  margin-bottom: var(--space-12);
}
.card-desc {
  color: var(--text-muted);
  margin-bottom: var(--space-24);
}

.card-cta {
  margin-top: auto;
  align-self: flex-start;
}

/* Content Pages */
.page-header {
  margin-bottom: var(--space-40);
}
.content-grid {
  display: grid;
  grid-template-columns: 1fr 300px;
  gap: var(--space-64);
  align-items: start;
}
.article-body {
  background: var(--surface);
  padding: var(--space-40);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  border: 1px solid var(--border);
}
.article-body h2 {
  margin-top: var(--space-40);
}
.article-body ul {
  margin-left: var(--space-24);
  margin-bottom: var(--space-16);
}
.article-body li {
  margin-bottom: var(--space-8);
}
.spec-list {
  background: var(--bg);
  padding: var(--space-24);
  border-radius: var(--radius-sm);
  margin: var(--space-24) 0;
}
.spec-item {
  display: flex;
  justify-content: space-between;
  padding: var(--space-8) 0;
  border-bottom: 1px solid var(--border);
}
.spec-item:last-child {
  border-bottom: none;
}
.spec-label {
  font-weight: 500;
  color: var(--text-muted);
}
.spec-value {
  font-weight: 600;
}

/* Sidebar */
.sidebar-widget {
  background: var(--surface);
  padding: var(--space-24);
  border-radius: var(--radius);
  border: 1px solid var(--border);
  box-shadow: var(--shadow);
  margin-bottom: var(--space-24);
}

/* Table */
.data-table {
  width: 100%;
  border-collapse: collapse;
  margin: var(--space-24) 0;
  font-size: 0.875rem;
}
.data-table th, .data-table td {
  padding: var(--space-12);
  text-align: left;
  border-bottom: 1px solid var(--border);
}
.data-table th {
  background: var(--surface-alt);
  font-weight: 600;
}
.table-wrapper {
  overflow-x: auto;
  margin-bottom: var(--space-24);
}

/* Contact Form */
.form-group {
  margin-bottom: var(--space-24);
}
.form-label {
  display: block;
  font-weight: 500;
  margin-bottom: var(--space-8);
  font-size: 0.875rem;
}
.form-control {
  width: 100%;
  padding: var(--space-12);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  font-family: inherit;
  font-size: 1rem;
  background: var(--surface);
  color: var(--text-main);
  transition: border-color 0.2s ease;
}
.form-control:focus {
  outline: none;
  border-color: var(--focus);
  box-shadow: 0 0 0 3px rgba(210, 142, 117, 0.2);
}
.form-control.is-invalid {
  border-color: var(--error);
}
.error-message {
  display: none;
  color: var(--error);
  font-size: 0.75rem;
  margin-top: var(--space-4);
}
.error-message.is-visible {
  display: block;
}
.map-block {
  width: 100%;
  height: 300px;
  background: var(--surface-alt);
  border-radius: var(--radius);
  border: 1px solid var(--border);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--text-muted);
  margin-bottom: var(--space-24);
  position: relative;
  overflow: hidden;
}
.map-block::before {
  content: "";
  position: absolute;
  inset: 0;
  background: repeating-linear-gradient(45deg, transparent, transparent 10px, rgba(0,0,0,0.03) 10px, rgba(0,0,0,0.03) 20px);
}

/* Footer */
.site-footer {
  background: var(--surface);
  border-top: 1px solid var(--border);
  padding: var(--space-64) 0;
  margin-top: auto;
}
.footer-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: var(--space-40);
  margin-bottom: var(--space-40);
}
.footer-col h4 {
  font-size: 1rem;
  margin-bottom: var(--space-16);
}
.footer-links {
  list-style: none;
}
.footer-links li {
  margin-bottom: var(--space-8);
}
.footer-links a {
  color: var(--text-muted);
  font-size: 0.875rem;
}
.footer-links a:hover {
  color: var(--text-main);
}
.footer-bottom {
  border-top: 1px solid var(--border);
  padding-top: var(--space-24);
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: var(--space-16);
  font-size: 0.875rem;
  color: var(--text-muted);
}

/* Cookie Banner */
.cookie-banner {
  position: fixed;
  bottom: 0;
  left: 0;
  width: 100%;
  background: var(--surface);
  border-top: 1px solid var(--border);
  padding: var(--space-24);
  box-shadow: 0 -4px 24px rgba(0,0,0,0.08);
  z-index: 1000;
  transform: translateY(100%);
  transition: transform 0.3s ease;
}
.cookie-banner.is-visible {
  transform: translateY(0);
}
.cookie-content {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: var(--space-24);
  max-width: 1200px;
  margin: 0 auto;
}
.cookie-text {
  flex: 1;
  min-width: 280px;
  font-size: 0.875rem;
}
.cookie-actions {
  display: flex;
  gap: var(--space-12);
  flex-wrap: wrap;
}

/* Responsive */
@media (max-width: 768px) {
  .nav-desktop { display: none; }
  .mobile-toggle { display: block; }
  .header-actions { display: none; }
  
  .card { flex-direction: column; }
  .card-media { min-height: 200px; flex: none; }
  .card-content { padding: var(--space-24); }
  
  .content-grid { grid-template-columns: 1fr; }
  .article-body { padding: var(--space-24); }
  
  :root {
    --space-64: 40px;
    --space-40: 24px;
    --space-120: 80px;
  }
}

@media (max-width: 400px) {
  h1 { font-size: 2rem; }
  .cookie-actions { flex-direction: column; width: 100%; }
  .cookie-actions .btn { width: 100%; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
    scroll-behavior: auto !important;
  }
}