/* winemarkets.ai — site.css
   Tokens match the brand work already done for winemarkets (see
   WINO/www/brand/PASEK_SOCIAL_spec_2026-09-07.md and K4 brief):
   --ink/--muted/--wine/--green, light + dark via prefers-color-scheme.
   No framework, no external JS. Font: Inter (Google Fonts) with a
   system-font fallback stack. */

:root {
  --ink: #0f1115;
  --muted: #6d737b;
  --wine: #6E1E3C;
  --green: #0b7a4b;
  --paper: #ffffff;
  --paper-alt: #f7f5f2;
  --border: #e4e1dc;
  --font: "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  --radius: 10px;
  --shadow: 0 1px 2px rgba(15, 17, 21, 0.06), 0 4px 16px rgba(15, 17, 21, 0.05);
}

@media (prefers-color-scheme: dark) {
  :root {
    --ink: #ffffff;
    --muted: #9aa1a9;
    --wine: #D9678A;
    --green: #3DBD82;
    --paper: #0f1115;
    --paper-alt: #17191f;
    --border: #2a2d34;
    --shadow: 0 1px 2px rgba(0, 0, 0, 0.3), 0 4px 16px rgba(0, 0, 0, 0.25);
  }
}

* { box-sizing: border-box; }

html { -webkit-text-size-adjust: 100%; }

body {
  margin: 0;
  font-family: var(--font);
  color: var(--ink);
  background: var(--paper);
  line-height: 1.55;
  font-size: 16px;
}

a { color: inherit; }
img { max-width: 100%; display: block; }

.container {
  max-width: 1120px;
  margin: 0 auto;
  padding: 0 24px;
}

/* ---------- header ---------- */

.site-header {
  border-bottom: 1px solid var(--border);
  position: sticky;
  top: 0;
  background: var(--paper);
  z-index: 10;
}

.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  min-height: 64px;
  flex-wrap: wrap;
  padding-top: 12px;
  padding-bottom: 12px;
}

.brand {
  text-decoration: none;
  font-weight: 700;
  font-size: 1.15rem;
  letter-spacing: -0.01em;
}

.brand-mark { color: var(--ink); }
.brand-mark-wine { color: var(--wine); }

.brand-logo {
  height: 32px;
  width: auto;
  display: block;
}

.site-nav {
  display: flex;
  align-items: center;
  gap: 20px;
  flex-wrap: wrap;
  font-size: 0.92rem;
}

.nav-link {
  text-decoration: none;
  color: var(--ink);
  font-weight: 500;
}

.nav-link:hover { color: var(--wine); }

.nav-lang { color: var(--muted); font-size: 0.85rem; }
.nav-lang a { text-decoration: none; color: var(--muted); }
.nav-lang a:hover { color: var(--wine); }
.nav-lang-current { font-weight: 600; color: var(--ink); }

/* ---------- layout building blocks ---------- */

.site-main { min-height: 60vh; }

.section {
  padding: 56px 0;
  border-bottom: 1px solid var(--border);
}

.section:last-child { border-bottom: none; }

.section-alt { background: var(--paper-alt); }

.section h1 { font-size: 2.2rem; margin: 0 0 16px; letter-spacing: -0.01em; }
.section h2 { font-size: 1.5rem; margin: 0 0 20px; letter-spacing: -0.01em; }
.section h3 { font-size: 1.1rem; margin: 0 0 8px; }
.section p { margin: 0 0 16px; }
.section p:last-child { margin-bottom: 0; }

.lede { font-size: 1.15rem; color: var(--muted); max-width: 640px; }

.grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 20px;
}

.grid-2 { grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); }
.grid-4 { grid-template-columns: repeat(4, 1fr); }

@media (max-width: 720px) {
  .grid-4 { grid-template-columns: repeat(2, 1fr); }
}

.card {
  background: var(--paper);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 24px;
  box-shadow: var(--shadow);
}

.card h3 { margin-top: 0; }

/* ---------- buttons ---------- */

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 12px 22px;
  border-radius: 999px;
  background: var(--wine);
  color: #ffffff;
  text-decoration: none;
  font-weight: 600;
  font-size: 0.95rem;
  border: 1px solid var(--wine);
  cursor: pointer;
  transition: opacity 0.15s ease;
}

.btn:hover { opacity: 0.88; }

.btn-secondary {
  background: transparent;
  color: var(--ink);
  border: 1px solid var(--border);
}

.btn-secondary:hover {
  border-color: var(--wine);
  color: var(--wine);
  opacity: 1;
}

.cta-row {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
  margin-top: 24px;
}

/* ---------- text helpers ---------- */

.muted { color: var(--muted); }

.badge {
  display: inline-block;
  padding: 3px 10px;
  border-radius: 999px;
  background: var(--paper-alt);
  border: 1px solid var(--border);
  color: var(--muted);
  font-size: 0.78rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.03em;
}

.badge-wine { color: var(--wine); border-color: var(--wine); background: transparent; }

/* ---------- counters ---------- */

.counters {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
  gap: 16px;
  margin: 32px 0;
}

.counter-item { text-align: left; }

.counter {
  font-size: 2.1rem;
  font-weight: 700;
  color: var(--wine);
  line-height: 1.1;
  display: block;
}

.counter-label {
  color: var(--muted);
  font-size: 0.85rem;
  margin-top: 4px;
  display: block;
}

/* ---------- table ---------- */

.table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.92rem;
}

.table th, .table td {
  text-align: left;
  padding: 10px 12px;
  border-bottom: 1px solid var(--border);
}

.table th {
  color: var(--muted);
  font-weight: 600;
  font-size: 0.82rem;
  text-transform: uppercase;
  letter-spacing: 0.02em;
}

.table-wrap { overflow-x: auto; }

/* ---------- forms ---------- */

label { display: block; font-weight: 500; margin-bottom: 6px; font-size: 0.9rem; }

input[type="text"],
input[type="email"],
input[type="url"],
select,
textarea {
  width: 100%;
  padding: 10px 12px;
  border: 1px solid var(--border);
  border-radius: 8px;
  font-family: var(--font);
  font-size: 0.95rem;
  color: var(--ink);
  background: var(--paper);
  margin-bottom: 16px;
}

.field-hint { font-size: 0.82rem; color: var(--muted); margin-top: -12px; margin-bottom: 16px; }

/* ---------- footer ---------- */

.site-footer {
  border-top: 1px solid var(--border);
  padding: 28px 0;
  background: var(--paper-alt);
}

.footer-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  flex-wrap: wrap;
  font-size: 0.85rem;
  color: var(--muted);
}

.footer-legal { display: flex; align-items: center; gap: 16px; flex-wrap: wrap; }

.footer-entity { margin: 0; }
.footer-entity-name { font-weight: 600; color: var(--ink); }
.footer-entity-email { color: var(--muted); text-decoration: none; }

.footer-links { display: flex; gap: 12px; }
.footer-links a { text-decoration: none; color: var(--muted); }
.footer-links a:hover { color: var(--wine); }

.footer-powered { text-align: right; }
.powered-brand { text-decoration: none; font-weight: 700; color: var(--ink); }
.powered-ai { color: var(--green); }

@media (max-width: 560px) {
  .footer-inner { flex-direction: column; align-items: flex-start; }
  .footer-powered { text-align: left; }
}
