/* ===== BRIKK MastiGum Theme — Design System ===== */

/* Fonts are loaded from <head> for better performance. */

/* ===== CSS Custom Properties ===== */

/* DARK MODE (default) */
:root {
  --font-sans: 'Inter', ui-sans-serif, system-ui, sans-serif;
  --font-mono: 'Space Mono', ui-monospace, monospace;

  --color-navy: #002061;
  --color-accent: #78C4F5;
  --color-accent-bright: #93d5ff;
  --color-rating: #facc15;
  --color-save: #4ade80;

  --bg-primary: #050810;
  --bg-surface: #0c1019;
  --bg-surface-2: #111620;
  --bg-surface-3: #171d2a;
  --text-primary: #f4f4f5;
  --text-secondary: #a1a1aa;
  --text-muted: #71717a;
  --text-faint: #3f3f46;
  --border: rgba(120, 196, 245, 0.06);
  --border-hover: rgba(120, 196, 245, 0.15);
  --glow: rgba(120, 196, 245, 0.08);
  --glow-strong: rgba(120, 196, 245, 0.15);
  --header-bg: rgba(5, 8, 16, 0.85);
  --card-hover: #111620;
  --btn-bg: #f4f4f5;
  --btn-text: #050810;
  --gradient: linear-gradient(135deg, #002061 0%, #78C4F5 100%);
  --gradient-text: linear-gradient(135deg, #78C4F5, #a8dcff, #78C4F5);
  color-scheme: dark;
}

/* ===== Reset & Base ===== */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

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

body {
  font-family: var(--font-sans);
  background: var(--bg-primary);
  color: var(--text-primary);
  transition: background 0.4s, color 0.4s;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  line-height: 1.6;
  padding-bottom: 82px;
}
@media (min-width: 768px) { body { padding-bottom: 0; } }

a { color: inherit; text-decoration: none; }
img { max-width: 100%; height: auto; display: block; }
button { cursor: pointer; font-family: inherit; border: none; background: none; }
input, select, textarea { font-family: inherit; }

::selection {
  background: rgba(120, 196, 245, 0.3);
  color: var(--text-primary);
}

/* Scrollbar */
body::-webkit-scrollbar { width: 6px; }
body::-webkit-scrollbar-track { background: var(--bg-primary); }
body::-webkit-scrollbar-thumb { background: var(--text-faint); border-radius: 3px; }
body::-webkit-scrollbar-thumb:hover { background: var(--text-muted); }

/* ===== Utilities ===== */
.container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 20px;
}
@media (min-width: 768px) {
  .container { padding: 0 64px; }
}
.container--wide {
  max-width: 1400px;
  margin: 0 auto;
  padding: 0 20px;
}
@media (min-width: 768px) {
  .container--wide { padding: 0 64px; }
}

.gradient-text {
  background: var(--gradient-text);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.text-accent { color: var(--color-accent); }
.text-rating { color: var(--color-rating); }
.text-save { color: var(--color-save); }
.font-mono { font-family: var(--font-mono); }

.btn-main {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  background: var(--btn-bg);
  color: var(--btn-text);
  font-weight: 800;
  font-size: 13px;
  letter-spacing: 0.03em;
  padding: 14px 32px;
  border-radius: 12px;
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  border: none;
  cursor: pointer;
  text-align: center;
}
.btn-main:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 32px rgba(120, 196, 245, 0.2);
}
.btn-main.is-adding {
  opacity: 0.78;
  transform: translateY(0);
  box-shadow: none;
  pointer-events: none;
}
.btn-main.is-added {
  background: #78c4f5;
  color: #050810;
}

.btn-outline {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 14px 20px;
  border-radius: 12px;
  font-size: 13px;
  font-weight: 500;
  border: 1px solid var(--text-faint);
  color: var(--text-secondary);
  transition: all 0.3s;
  text-align: center;
}
.btn-outline:hover { border-color: var(--color-accent); }

.glass {
  background: var(--header-bg);
  backdrop-filter: blur(24px) saturate(180%);
  -webkit-backdrop-filter: blur(24px) saturate(180%);
}

/* ===== Animations ===== */
@keyframes float {
  0%, 100% { transform: translate(0, 0); }
  50% { transform: translate(-20px, 20px); }
}
@keyframes pulse-dot {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.3; }
}
@keyframes fade-up {
  from { opacity: 0; transform: translateY(16px); }
  to { opacity: 1; transform: translateY(0); }
}
.animate-float { animation: float 8s ease-in-out infinite; }
.animate-pulse-dot { animation: pulse-dot 2s ease-in-out infinite; }
.animate-fade-up { animation: fade-up 0.5s ease-out forwards; opacity: 0; }

/* Scroll reveal */
.reveal {
  opacity: 0;
  transform: translateY(24px);
  transition: opacity 0.7s cubic-bezier(0.4, 0, 0.2, 1), transform 0.7s cubic-bezier(0.4, 0, 0.2, 1);
}
.reveal.visible {
  opacity: 1;
  transform: translateY(0);
}

/* Stagger */
.reveal-stagger .reveal:nth-child(1) { transition-delay: 0s; }
.reveal-stagger .reveal:nth-child(2) { transition-delay: 0.1s; }
.reveal-stagger .reveal:nth-child(3) { transition-delay: 0.2s; }
.reveal-stagger .reveal:nth-child(4) { transition-delay: 0.3s; }
.reveal-stagger .reveal:nth-child(5) { transition-delay: 0.4s; }
.reveal-stagger .reveal:nth-child(6) { transition-delay: 0.5s; }

/* ===== Section spacing ===== */
.section { padding: 80px 0; }
@media (min-width: 768px) { .section { padding: 128px 0; } }
.section--sm { padding: 56px 0; }
@media (min-width: 768px) { .section--sm { padding: 80px 0; } }

/* ===== Typography ===== */
.eyebrow {
  font-family: var(--font-mono);
  font-size: 10px;
  letter-spacing: 3px;
  text-transform: uppercase;
  color: var(--color-accent);
  display: block;
  margin-bottom: 8px;
}
@media (min-width: 768px) { .eyebrow { font-size: 11px; margin-bottom: 12px; } }

.heading-xl {
  font-size: clamp(32px, 5vw, 64px);
  font-weight: 900;
  letter-spacing: -2px;
  line-height: 0.95;
}
.heading-lg {
  font-size: clamp(28px, 4vw, 48px);
  font-weight: 900;
  letter-spacing: -1.5px;
  line-height: 1.05;
}
.heading-md {
  font-size: clamp(24px, 3vw, 36px);
  font-weight: 900;
  letter-spacing: -1px;
  line-height: 1.1;
}

.body-text {
  font-size: 14px;
  line-height: 1.7;
  color: var(--text-secondary);
}
@media (min-width: 768px) { .body-text { font-size: 15px; } }

/* ===== Grid helpers ===== */
.grid-2 { display: grid; grid-template-columns: 1fr; gap: 32px; }
@media (min-width: 768px) { .grid-2 { grid-template-columns: 1fr 1fr; gap: 64px; } }

.grid-3 { display: grid; grid-template-columns: 1fr; gap: 1px; }
@media (min-width: 640px) { .grid-3 { grid-template-columns: 1fr 1fr; } }
@media (min-width: 768px) { .grid-3 { grid-template-columns: 1fr 1fr 1fr; gap: 2px; } }

/* ===== Card ===== */
.card {
  background: var(--bg-surface);
  padding: 24px;
  transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}
@media (min-width: 768px) { .card { padding: 40px; } }
.card:hover { background: var(--card-hover); }
.card__icon {
  width: 44px;
  height: 44px;
  border-radius: 12px;
  border: 1px solid var(--border-hover);
  background: var(--glow);
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 16px;
  transition: transform 0.4s;
}
@media (min-width: 768px) { .card__icon { width: 48px; height: 48px; margin-bottom: 20px; } }
.card:hover .card__icon { transform: scale(1.1); }
.card__title {
  font-size: 15px;
  font-weight: 800;
  letter-spacing: -0.3px;
  margin-bottom: 6px;
}
@media (min-width: 768px) { .card__title { font-size: 16px; margin-bottom: 8px; } }
.card__desc {
  font-size: 12px;
  line-height: 1.6;
  color: var(--text-muted);
}
@media (min-width: 768px) { .card__desc { font-size: 13px; } }

/* ===== Accordion ===== */
.accordion__item { border-bottom: 1px solid var(--border); }
.accordion__trigger {
  width: 100%;
  padding: 16px 0;
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 13px;
  font-weight: 600;
  text-align: left;
  background: none;
  border: none;
  color: var(--text-primary);
  cursor: pointer;
}
@media (min-width: 768px) { .accordion__trigger { padding: 20px 0; font-size: 14px; } }
.accordion__icon {
  width: 24px;
  height: 24px;
  border-radius: 8px;
  border: 1px solid var(--text-faint);
  color: var(--text-secondary);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 14px;
  flex-shrink: 0;
  margin-left: 12px;
  transition: border-color 0.3s, color 0.3s;
}
@media (min-width: 768px) { .accordion__icon { width: 28px; height: 28px; } }
.accordion__trigger:hover .accordion__icon {
  border-color: var(--color-accent);
  color: var(--color-accent);
}
.accordion__content {
  font-size: 12px;
  line-height: 1.7;
  color: var(--text-muted);
  padding-bottom: 16px;
  padding-right: 32px;
  animation: fade-up 0.4s ease-out forwards;
}
@media (min-width: 768px) { .accordion__content { font-size: 13px; padding-bottom: 20px; padding-right: 40px; } }

/* ===== Mobile helpers ===== */
.desktop-only { display: none; }
@media (min-width: 768px) { .desktop-only { display: flex; } }
button.mobile-only, a.mobile-only, .mobile-only:not(.brikk-header__btn):not(button):not(a) { display: flex; }
@media (min-width: 768px) { button.mobile-only, a.mobile-only, .mobile-only:not(.brikk-header__btn):not(button):not(a) { display: none !important; } }
.mobile-only--block { display: block; }
@media (min-width: 768px) { .mobile-only--block { display: none; } }
.desktop-only--block { display: none; }
@media (min-width: 768px) { .desktop-only--block { display: block; } }

/* ===== Product form ===== */
.visually-hidden {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  border: 0;
}

/* ===== Cookie Banner ===== */
.brikk-cookie {
  position: fixed;
  left: 12px;
  right: 12px;
  bottom: calc(12px + env(safe-area-inset-bottom));
  z-index: 90;
}
.brikk-cookie__inner {
  border: 1px solid rgba(120, 196, 245, 0.26);
  border-radius: 16px;
  background: rgba(6, 10, 18, 0.93);
  backdrop-filter: blur(16px) saturate(150%);
  -webkit-backdrop-filter: blur(16px) saturate(150%);
  box-shadow: 0 14px 42px rgba(0, 0, 0, 0.38);
  padding: 12px;
}
.brikk-cookie__text {
  color: var(--text-secondary);
  font-size: 12px;
  line-height: 1.52;
}
.brikk-cookie__link {
  display: inline-flex;
  margin-top: 8px;
  color: var(--color-accent-bright);
  font-size: 11px;
  font-weight: 700;
  text-decoration: underline;
  text-underline-offset: 3px;
}
.brikk-cookie__link:hover {
  color: #d8efff;
}
.brikk-cookie__actions {
  margin-top: 10px;
  display: flex;
  gap: 8px;
}
.brikk-cookie__btn {
  flex: 1 1 0;
  min-height: 40px;
  padding: 10px 14px;
  font-size: 12px;
}
@media (min-width: 768px) {
  .brikk-cookie {
    left: 20px;
    right: auto;
    max-width: 460px;
  }
}
