/* tapa. Design System — Impeccable Minimalist */

@import url('cookie-consent.css');

:root {
  --bg: #FAFAFA;
  --surface: #FFFFFF;
  --text: #18181B;
  --text-secondary: #71717A;
  --border: #E4E4E7;
  --black: #000000;
  --success: #16A34A;
  --warning: #CA8A04;
  --radius-sm: 6px;
  --radius-md: 10px;
  --radius-lg: 14px;
  --radius-xl: 20px;
  --shadow-sm: 0 1px 2px rgba(0, 0, 0, 0.04);
  --transition: 150ms ease;
  --font: 'Inter', system-ui, -apple-system, sans-serif;
  --max-width: 1120px;
  --space-1: 4px;
  --space-2: 8px;
  --space-3: 12px;
  --space-4: 16px;
  --space-5: 20px;
  --space-6: 24px;
  --space-8: 32px;
  --space-10: 40px;
  --space-12: 48px;
  --space-16: 64px;
  --space-24: 96px;
}

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

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

body {
  font-family: var(--font);
  font-size: 16px;
  line-height: 1.6;
  color: var(--text);
  background: var(--bg);
}

a {
  color: inherit;
  text-decoration: none;
}

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

::selection {
  background: var(--text);
  color: var(--surface);
}

/* Typography */
h1, h2, h3, h4 {
  letter-spacing: -0.03em;
  line-height: 1.15;
  font-weight: 600;
}

h1 { font-size: clamp(2.25rem, 5vw, 3.5rem); }
h2 { font-size: clamp(1.75rem, 3vw, 2.25rem); }
h3 { font-size: 1rem; }

p { color: var(--text-secondary); }

.text-sm { font-size: 0.875rem; }
.text-xs { font-size: 0.75rem; }

/* Layout */
.container {
  width: 100%;
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 0 var(--space-4);
}

@media (min-width: 640px) {
  .container { padding: 0 var(--space-6); }
}

.section {
  padding: var(--space-16) 0;
}

.section--surface {
  background: var(--surface);
  border-top: 1px solid var(--border);
  border-bottom: 1px solid var(--border);
}

.section-label {
  font-size: 0.875rem;
  font-weight: 500;
  color: var(--text-secondary);
  margin-bottom: var(--space-3);
}

.section-header {
  max-width: 560px;
  margin-bottom: var(--space-12);
}

.section-header--center {
  text-align: center;
  margin-left: auto;
  margin-right: auto;
}

/* Buttons */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: var(--space-2);
  font-family: var(--font);
  font-size: 0.875rem;
  font-weight: 500;
  line-height: 1;
  border: none;
  border-radius: var(--radius-md);
  cursor: pointer;
  transition: all var(--transition);
  white-space: nowrap;
}

.btn:active { transform: scale(0.98); }
.btn:disabled { opacity: 0.5; pointer-events: none; }

.btn--primary {
  background: var(--text);
  color: var(--surface);
  padding: 0 var(--space-6);
  height: 44px;
}

.btn--primary:hover { background: #27272A; }

.btn--secondary {
  background: var(--surface);
  color: var(--text);
  border: 1px solid var(--border);
  padding: 0 var(--space-6);
  height: 44px;
}

.btn--secondary:hover { background: var(--bg); }

.btn--ghost {
  background: transparent;
  color: var(--text-secondary);
  padding: 0 var(--space-4);
  height: 36px;
}

.btn--ghost:hover { color: var(--text); background: var(--bg); }

.btn--sm {
  height: 36px;
  padding: 0 var(--space-4);
  font-size: 0.8125rem;
}

.btn--full { width: 100%; }

.btn--lg {
  height: 48px;
  padding: 0 var(--space-8);
  font-size: 0.9375rem;
}

/* Inputs */
.input {
  width: 100%;
  height: 44px;
  padding: 0 var(--space-3);
  font-family: var(--font);
  font-size: 0.875rem;
  color: var(--text);
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  transition: all var(--transition);
  outline: none;
}

.input:focus {
  border-color: rgba(24, 24, 27, 0.3);
  box-shadow: 0 0 0 3px rgba(24, 24, 27, 0.06);
}

.input::placeholder { color: rgba(113, 113, 122, 0.6); }

textarea.input {
  height: auto;
  padding: var(--space-3);
  resize: vertical;
  min-height: 88px;
}

.form-group {
  display: flex;
  flex-direction: column;
  gap: var(--space-2);
}

.form-label {
  font-size: 0.875rem;
  font-weight: 500;
  color: var(--text);
}

.form-error {
  font-size: 0.75rem;
  color: #DC2626;
  margin-top: var(--space-1);
}

/* Badge */
.badge {
  display: inline-flex;
  align-items: center;
  padding: 2px var(--space-2);
  font-size: 0.75rem;
  font-weight: 500;
  border-radius: var(--radius-sm);
  background: var(--bg);
  color: var(--text-secondary);
  border: 1px solid var(--border);
}

.badge--success {
  background: #F0FDF4;
  color: var(--success);
  border-color: transparent;
}

.badge--dark {
  background: var(--text);
  color: var(--surface);
  border-color: transparent;
}

/* Card */
.card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: var(--space-6);
}

.card--hover {
  transition: all var(--transition);
}

.card--hover:hover {
  border-color: rgba(24, 24, 27, 0.15);
  box-shadow: var(--shadow-sm);
}

/* Grid */
.grid-2 { display: grid; gap: var(--space-6); }
.grid-3 { display: grid; gap: var(--space-6); }
.grid-4 { display: grid; gap: var(--space-4); }

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

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

.hidden { display: none !important; }

.flex { display: flex; }
.flex-col { flex-direction: column; }
.items-center { align-items: center; }
.justify-between { justify-content: space-between; }
.gap-2 { gap: var(--space-2); }
.gap-3 { gap: var(--space-3); }
.gap-4 { gap: var(--space-4); }
.gap-6 { gap: var(--space-6); }

.mt-2 { margin-top: var(--space-2); }
.mt-4 { margin-top: var(--space-4); }
.mt-6 { margin-top: var(--space-6); }
.mt-8 { margin-top: var(--space-8); }
.mb-4 { margin-bottom: var(--space-4); }
.mb-6 { margin-bottom: var(--space-6); }
.mb-8 { margin-bottom: var(--space-8); }

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

/* Toast */
.toast {
  position: fixed;
  bottom: var(--space-6);
  left: 50%;
  transform: translateX(-50%) translateY(100px);
  background: var(--text);
  color: var(--surface);
  padding: var(--space-3) var(--space-5);
  border-radius: var(--radius-md);
  font-size: 0.875rem;
  font-weight: 500;
  z-index: 9999;
  opacity: 0;
  transition: all 300ms ease;
  pointer-events: none;
}

.toast--visible {
  opacity: 1;
  transform: translateX(-50%) translateY(0);
}

.toast--success { background: var(--success); }

/* Native select — tapa. form control */
select,
.select {
  width: 100%;
  height: 52px;
  appearance: none;
  -webkit-appearance: none;
  -moz-appearance: none;
  border: 1px solid #E4E4E7;
  border-radius: 16px;
  background-color: #FFFFFF;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' viewBox='0 0 16 16' fill='none'%3E%3Cpath d='M4 6l4 4 4-4' stroke='%2371717A' stroke-width='1.5' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 16px center;
  color: #18181B;
  font: inherit;
  font-size: 0.875rem;
  font-weight: 500;
  padding: 0 44px 0 16px;
  outline: none;
  cursor: pointer;
  transition: all 0.15s cubic-bezier(0.4, 0, 0.2, 1);
  box-sizing: border-box;
}

select:focus,
.select:focus {
  border-color: #18181B;
  box-shadow: 0 0 0 4px rgba(24, 24, 27, 0.06);
}

select:disabled,
.select:disabled {
  opacity: 0.55;
  cursor: not-allowed;
  background-color: #FAFAFA;
  color: #71717A;
}
