/* ===========================================================
   browsebarnviewnst.com — Soft Modern / Data Grid Cards
   =========================================================== */

:root {
  --space-1: 4px;
  --space-2: 8px;
  --space-3: 16px;
  --space-4: 24px;
  --space-5: 40px;
  --space-6: 64px;

  --header-height: 60px;

  --color-bg: #fbf8f4;
  --color-surface: #ffffff;
  --color-text: #2b2a3a;
  --color-text-muted: #5b5970;
  --color-border: #e7e2f5;

  --color-accent: #6650d1;
  --color-accent-dark: #4b3aa8;
  --color-accent-contrast: #ffffff;

  --color-error: #a8271b;
  --color-success-bg: #dff7ea;
  --color-success-text: #205c3c;

  --pastel-pink: #ffe3ea;
  --pastel-blue: #dff1ff;
  --pastel-mint: #dff7ea;
  --pastel-yellow: #fff3d6;
  --pastel-lavender: #eae3ff;

  --radius-sm: 10px;
  --radius-md: 16px;
  --radius-lg: 24px;

  --shadow-sm: 0 2px 8px rgba(43, 42, 58, 0.06);
  --shadow-md: 0 8px 24px rgba(43, 42, 58, 0.10);

  --font-base: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
}

@media (max-width: 768px) {
  :root { --header-height: 52px; }
}
@media (max-width: 400px) {
  :root { --header-height: 48px; }
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }

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

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

a {
  color: var(--color-accent-dark);
  text-decoration: underline;
  text-underline-offset: 2px;
}
a:hover { color: var(--color-accent); }

h1, h2, h3, h4 {
  font-weight: 700;
  line-height: 1.2;
  margin: 0 0 var(--space-3);
  color: var(--color-text);
}

p { margin: 0 0 var(--space-3); }

ul, ol { margin: 0 0 var(--space-3); padding-left: 1.2em; }

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

:focus-visible {
  outline: 3px solid var(--color-accent-dark);
  outline-offset: 2px;
}

.container {
  width: 100%;
  max-width: 1120px;
  margin: 0 auto;
  padding-left: var(--space-4);
  padding-right: var(--space-4);
}

.section {
  padding-block: var(--space-6);
}

.section-heading {
  max-width: 640px;
  margin-bottom: var(--space-5);
}
.section-heading h2 { font-size: clamp(1.5rem, 2.5vw, 2.1rem); }
.section-heading p { color: var(--color-text-muted); }

/* ===================== Buttons ===================== */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: var(--space-2);
  padding: var(--space-2) var(--space-4);
  border-radius: var(--radius-sm);
  font-weight: 600;
  font-size: 0.95rem;
  text-decoration: none;
  border: 2px solid transparent;
  cursor: pointer;
  transition: transform 0.15s ease, box-shadow 0.15s ease, background 0.15s ease;
}
.btn:hover { transform: translateY(-2px); }

.btn-solid {
  background: var(--color-accent);
  color: var(--color-accent-contrast);
}
.btn-solid:hover { background: var(--color-accent-dark); color: var(--color-accent-contrast); }

.btn-outline {
  background: var(--color-surface);
  color: var(--color-accent-dark);
  border-color: var(--color-border);
}
.btn-outline:hover { background: var(--pastel-lavender); color: var(--color-accent-dark); }

.btn-cta {
  background: var(--color-accent);
  color: var(--color-accent-contrast);
  padding: var(--space-2) var(--space-3);
  font-size: 0.85rem;
  white-space: nowrap;
}
.btn-cta:hover { background: var(--color-accent-dark); color: var(--color-accent-contrast); }

/* ===================== Header ===================== */
.site-header {
  height: var(--header-height);
  display: flex;
  align-items: center;
  background: var(--color-surface);
  border-bottom: 1px solid var(--color-border);
  position: relative;
  z-index: 200;
}
.header-inner {
  width: 100%;
  max-width: 1120px;
  margin: 0 auto;
  padding: 0 var(--space-4);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--space-3);
  height: 100%;
}

.logo {
  display: flex;
  align-items: center;
  gap: var(--space-2);
  text-decoration: none;
  color: var(--color-text);
  flex-shrink: 0;
}
.logo-mark { display: block; border-radius: 8px; }
.logo-text {
  font-weight: 800;
  font-size: 1rem;
  letter-spacing: -0.02em;
  color: var(--color-text);
}

.site-nav { flex: 1; display: flex; justify-content: center; }
.site-nav ul {
  display: flex;
  list-style: none;
  margin: 0;
  padding: 0;
  gap: var(--space-4);
}
.site-nav a {
  text-decoration: none;
  color: var(--color-text-muted);
  font-weight: 600;
  font-size: 0.88rem;
  white-space: nowrap;
}
.site-nav a:hover { color: var(--color-accent-dark); }

.header-actions {
  display: flex;
  align-items: center;
  gap: var(--space-3);
  flex-shrink: 0;
}

.nav-toggle {
  display: none;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  gap: 5px;
  width: 40px;
  height: 40px;
  background: var(--pastel-lavender);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-sm);
  cursor: pointer;
}
.nav-toggle-bar {
  width: 18px;
  height: 2px;
  background: var(--color-accent-dark);
  border-radius: 2px;
  transition: transform 0.2s ease, opacity 0.2s ease;
}
.nav-toggle.is-active .nav-toggle-bar:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.nav-toggle.is-active .nav-toggle-bar:nth-child(2) { opacity: 0; }
.nav-toggle.is-active .nav-toggle-bar:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

.mobile-nav {
  position: fixed;
  top: var(--header-height);
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(255, 255, 255, 0.97);
  backdrop-filter: blur(6px);
  display: flex;
  align-items: flex-start;
  justify-content: center;
  padding-top: var(--space-6);
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
  transform: translateY(-8px);
  transition: opacity 0.2s ease, transform 0.2s ease, visibility 0.2s ease;
  z-index: 150;
}
.mobile-nav.is-open {
  opacity: 1;
  visibility: visible;
  pointer-events: auto;
  transform: translateY(0);
}
.mobile-nav ul {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: var(--space-4);
  text-align: center;
}
.mobile-nav a {
  text-decoration: none;
  color: var(--color-text);
  font-weight: 700;
  font-size: 1.25rem;
}
.mobile-nav a:hover { color: var(--color-accent-dark); }

@media (max-width: 768px) {
  .site-nav { display: none; }
  .header-actions .btn-cta { display: none; }
  .nav-toggle { display: flex; }
}

/* ===================== Hero ===================== */
.hero {
  padding-block: var(--space-6);
  background: linear-gradient(135deg, var(--pastel-lavender) 0%, var(--pastel-blue) 45%, var(--pastel-pink) 100%);
}
.hero-inner {
  display: grid;
  grid-template-columns: 1.1fr 0.9fr;
  gap: var(--space-5);
  align-items: center;
}
.hero-copy h1 {
  font-size: clamp(2rem, 4vw, 3rem);
  margin-bottom: var(--space-3);
}
.hero-copy p {
  color: var(--color-text-muted);
  font-size: 1.05rem;
  max-width: 46ch;
}
.hero-actions {
  display: flex;
  gap: var(--space-3);
  flex-wrap: wrap;
  margin-top: var(--space-4);
}
.hero-media {
  border-radius: var(--radius-lg);
  overflow: hidden;
  box-shadow: var(--shadow-md);
}
.hero-media img { width: 100%; height: 100%; object-fit: cover; }

@media (max-width: 768px) {
  .hero-inner { grid-template-columns: 1fr; }
}

/* ===================== Cards: Data Grid style ===================== */
.card-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: var(--space-5);
}

.card {
  background: var(--color-surface);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-sm);
  overflow: hidden;
  display: flex;
  flex-direction: column;
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}
.card:hover { transform: translateY(-4px); box-shadow: var(--shadow-md); }

.card-header {
  padding: var(--space-4);
  display: flex;
  flex-direction: column;
  gap: var(--space-4);
}
.card-header--pink { background: var(--pastel-pink); }
.card-header--blue { background: var(--pastel-blue); }
.card-header--mint { background: var(--pastel-mint); }
.card-header--yellow { background: var(--pastel-yellow); }
.card-header--lavender { background: var(--pastel-lavender); }

.card-icon {
  width: 44px;
  height: 44px;
  border-radius: var(--radius-sm);
  background: rgba(255, 255, 255, 0.7);
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: var(--shadow-sm);
}

.card-stats {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: var(--space-3);
}
.stat {
  display: flex;
  flex-direction: column;
  gap: 12px;
}
.stat-value {
  font-size: 1.15rem;
  font-weight: 800;
  color: var(--color-text);
}
.stat-label {
  font-size: 0.72rem;
  font-weight: 600;
  color: var(--color-text-muted);
  text-transform: uppercase;
  letter-spacing: 0.03em;
}

.card-body {
  padding: var(--space-4);
  display: flex;
  flex-direction: column;
  gap: var(--space-4);
  flex: 1;
}
.card-body h3 { font-size: 1.2rem; margin-bottom: 0; }
.card-body p { color: var(--color-text-muted); margin-bottom: 0; }

.card-tags {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-2);
  list-style: none;
  margin: 0;
  padding: 0;
}
.card-tags li {
  background: var(--pastel-lavender);
  color: var(--color-accent-dark);
  font-size: 0.75rem;
  font-weight: 700;
  padding: 4px 10px;
  border-radius: 999px;
}

.card-cta {
  display: inline-flex;
  align-items: center;
  gap: var(--space-1);
  font-weight: 700;
  text-decoration: none;
  color: var(--color-accent-dark);
  margin-top: auto;
}
.card-cta:hover { color: var(--color-accent); }

/* ===================== Supporting section ===================== */
.support-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: var(--space-4);
}
.support-item {
  background: var(--color-surface);
  border-radius: var(--radius-md);
  padding: var(--space-4);
  box-shadow: var(--shadow-sm);
}
.support-item h3 { font-size: 1.05rem; }
.support-item p { color: var(--color-text-muted); margin-bottom: 0; }

/* ===================== Article / sub-page content ===================== */
.article-header {
  padding-block: var(--space-6) var(--space-5);
  background: var(--pastel-blue);
}
.article-header .container { max-width: 860px; }
.article-header h1 { font-size: clamp(1.8rem, 3.5vw, 2.6rem); }
.article-header p { color: var(--color-text-muted); font-size: 1.05rem; }

.article-media {
  border-radius: var(--radius-lg);
  overflow: hidden;
  margin: var(--space-5) 0;
  box-shadow: var(--shadow-sm);
}

.article-body {
  max-width: 780px;
  margin: 0 auto;
  padding-block: var(--space-6);
}
.article-body h2 {
  font-size: 1.5rem;
  margin-top: var(--space-5);
}
.article-body h3 { font-size: 1.15rem; }
.article-body p, .article-body li { color: var(--color-text-muted); }

.pros-cons {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: var(--space-4);
  margin: var(--space-4) 0;
}
.pros-cons > div {
  padding: var(--space-4);
  border-radius: var(--radius-md);
}
.pros { background: var(--pastel-mint); }
.cons { background: var(--pastel-pink); }
.pros h3, .cons h3 { margin-bottom: var(--space-2); color: var(--color-text); }
.pros ul, .cons ul { color: var(--color-text); margin-bottom: 0; }

@media (max-width: 600px) {
  .pros-cons { grid-template-columns: 1fr; }
}

table {
  width: 100%;
  border-collapse: collapse;
  margin: var(--space-4) 0;
  font-size: 0.92rem;
  background: var(--color-surface);
  border-radius: var(--radius-md);
  overflow: hidden;
}
caption {
  text-align: left;
  font-weight: 700;
  margin-bottom: var(--space-2);
  color: var(--color-text);
}
th, td {
  padding: var(--space-3);
  text-align: left;
  border-bottom: 1px solid var(--color-border);
}
thead th {
  background: var(--color-accent);
  color: var(--color-accent-contrast);
}
tbody tr:nth-child(even) { background: var(--pastel-lavender); }

.callout {
  background: var(--pastel-yellow);
  border-radius: var(--radius-md);
  padding: var(--space-4);
  margin: var(--space-4) 0;
}
.callout p:last-child { margin-bottom: 0; }

/* ===================== Legal pages ===================== */
.legal-body {
  max-width: 780px;
  margin: 0 auto;
  padding-block: var(--space-6);
}
.legal-body section { margin-bottom: var(--space-5); }
.legal-body h2 { font-size: 1.3rem; border-bottom: 2px solid var(--color-border); padding-bottom: var(--space-2); }
.legal-body address { font-style: normal; color: var(--color-text-muted); }

/* ===================== Contact page ===================== */
.contact-layout {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: var(--space-5);
  align-items: start;
}
@media (max-width: 800px) {
  .contact-layout { grid-template-columns: 1fr; }
}

.contact-card {
  background: var(--color-surface);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-sm);
  padding: var(--space-5);
}

.form-field {
  margin-bottom: var(--space-4);
  display: flex;
  flex-direction: column;
  gap: var(--space-1);
}
.form-field label { font-weight: 700; font-size: 0.9rem; }
.form-field input,
.form-field textarea {
  padding: var(--space-2) var(--space-3);
  border-radius: var(--radius-sm);
  border: 1px solid var(--color-border);
  font-family: inherit;
  font-size: 0.95rem;
  background: var(--color-bg);
  color: var(--color-text);
}
.form-field input:focus,
.form-field textarea:focus {
  outline: 3px solid var(--color-accent-dark);
  outline-offset: 1px;
}
.form-field input.is-invalid,
.form-field textarea.is-invalid {
  border-color: var(--color-error);
}
.form-error {
  color: var(--color-error);
  font-size: 0.82rem;
  min-height: 1.2em;
}

.form-success {
  background: var(--color-success-bg);
  color: var(--color-success-text);
  padding: var(--space-3) var(--space-4);
  border-radius: var(--radius-sm);
  margin-bottom: var(--space-4);
  font-weight: 600;
}

.info-card {
  background: var(--color-surface);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-sm);
  padding: var(--space-5);
  margin-bottom: var(--space-4);
}
.info-card h2 { font-size: 1.15rem; }

.map-block {
  border-radius: var(--radius-lg);
  overflow: hidden;
  min-height: 220px;
  background:
    linear-gradient(rgba(255,255,255,0.55), rgba(255,255,255,0.55)),
    repeating-linear-gradient(0deg, var(--pastel-blue) 0 2px, transparent 2px 40px),
    repeating-linear-gradient(90deg, var(--pastel-blue) 0 2px, transparent 2px 40px),
    var(--pastel-mint);
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
  box-shadow: var(--shadow-sm);
}
.map-pin {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: var(--space-2);
  text-align: center;
  background: rgba(255,255,255,0.85);
  padding: var(--space-3) var(--space-4);
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-sm);
}
.map-pin span { font-weight: 700; color: var(--color-text); }
.map-pin small { color: var(--color-text-muted); }

/* ===================== Footer ===================== */
.site-footer {
  background: var(--pastel-lavender);
  border-top: 1px solid var(--color-border);
}
.footer-inner {
  max-width: 1120px;
  margin: 0 auto;
  padding: var(--space-6) var(--space-4) var(--space-5);
  display: grid;
  grid-template-columns: 1.4fr 1fr 1fr 1.2fr;
  gap: var(--space-5);
}
.footer-col h3 {
  font-size: 0.85rem;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: var(--color-text-muted);
  margin-bottom: var(--space-3);
}
.footer-col ul { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: var(--space-2); }
.footer-col a { color: var(--color-text); text-decoration: none; font-size: 0.9rem; }
.footer-col a:hover { color: var(--color-accent-dark); }
.footer-brand-name { font-weight: 800; margin: var(--space-2) 0; }
.footer-brand p { color: var(--color-text-muted); font-size: 0.9rem; }
.footer-bottom {
  border-top: 1px solid var(--color-border);
  padding: var(--space-4);
  text-align: center;
  font-size: 0.82rem;
  color: var(--color-text-muted);
}

@media (max-width: 800px) {
  .footer-inner { grid-template-columns: 1fr 1fr; }
}
@media (max-width: 480px) {
  .footer-inner { grid-template-columns: 1fr; }
}

/* ===================== Cookie banner ===================== */
.cookie-banner {
  position: fixed;
  left: var(--space-3);
  right: var(--space-3);
  bottom: var(--space-3);
  max-width: 720px;
  margin: 0 auto;
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-md);
  padding: var(--space-4);
  z-index: 300;
  opacity: 0;
  transform: translateY(12px);
  transition: opacity 0.25s ease, transform 0.25s ease;
}
.cookie-banner.is-visible { opacity: 1; transform: translateY(0); }
.cookie-banner p { font-size: 0.9rem; color: var(--color-text-muted); margin-bottom: var(--space-3); }
.cookie-actions { display: flex; flex-wrap: wrap; gap: var(--space-2); }

/* ===================== Utility grids for legal/cookie table ===================== */
.two-col {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: var(--space-4);
}
@media (max-width: 600px) {
  .two-col { grid-template-columns: 1fr; }
}

/* ===================== Reduced motion ===================== */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.001ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.001ms !important;
  }
}

/* ===================== Small screens ===================== */
@media (max-width: 400px) {
  .header-inner { padding: 0 var(--space-3); }
  .logo-text { font-size: 0.85rem; }
  .card-stats { grid-template-columns: repeat(3, minmax(0,1fr)); gap: var(--space-2); }
  .stat-value { font-size: 1rem; }
  .hero-actions { flex-direction: column; }
  .hero-actions .btn { width: 100%; }
}