/* Medibrisa Software Ltd. — site styles. Self-contained: no external fonts, CDNs or trackers.
   Palette sampled from the official logo (brand/medibrisa-logo-original.jpg):
   navy #133353 (wordmark), wave navy #164265, teal #599283 (cross), wave teal #44787C,
   orange #F38A38, deep orange #EB6B34, gold #F8C05F. Darker teal #2D6A5E is a derived
   text-safe shade of the logo teal. */
:root {
  --ink: #133353;        /* logo navy: body text & headings */
  --muted: #334E68;      /* secondary text */
  --navy: #133353;
  --navy-2: #164265;     /* logo wave navy */
  --teal: #599283;       /* logo teal (decorative / large) */
  --teal-wave: #44787C;  /* logo wave teal */
  --teal-dark: #2D6A5E;  /* derived AA-safe teal for links/buttons */
  --teal-darker: #1F5247;
  --orange: #F38A38;     /* logo orange: decoration, or text on navy only */
  --gold: #F8C05F;
  --tint: #EEF5F3;       /* light teal tint */
  --tint-2: #D6E8E3;
  --line: #B9D6CF;
  --white: #FFFFFF;
  --max: 70rem;
  --radius: 1rem;
  --font: system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, "Noto Sans", sans-serif;
}
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; text-size-adjust: 100%; }
body { margin: 0; font-family: var(--font); font-size: 1.0625rem; line-height: 1.65; color: var(--ink); background: var(--white); }
img, svg { display: block; max-width: 100%; }
a { color: var(--teal-dark); text-decoration-thickness: 0.08em; text-underline-offset: 0.18em; }
a:hover { color: var(--navy); }
:focus-visible { outline: 3px solid var(--teal-dark); outline-offset: 3px; border-radius: 4px; }
.on-dark :focus-visible, .site-footer :focus-visible { outline-color: var(--orange); }

.skip-link { position: absolute; left: 1rem; top: -4rem; z-index: 100; padding: 0.6rem 1rem; background: var(--navy); color: var(--white); font-weight: 600; border-radius: 0.5rem; text-decoration: none; }
.skip-link:focus { top: 1rem; color: var(--white); outline: 3px solid var(--orange); outline-offset: 2px; }

.wrap { width: 100%; max-width: var(--max); margin: 0 auto; padding: 0 1.25rem; }
.narrow { max-width: 46rem; }

/* Header */
.site-header { background: var(--white); border-bottom: 1px solid var(--tint-2); }
.site-header .wrap { display: flex; align-items: center; justify-content: space-between; gap: 1rem; min-height: 4.5rem; flex-wrap: wrap; }
.brand { display: inline-flex; align-items: center; gap: 0.65rem; color: var(--navy); text-decoration: none; font-weight: 700; font-size: 1.3rem; letter-spacing: -0.01em; }
.brand:hover { color: var(--navy); }
.brand img { width: 3rem; height: 3rem; flex: none; }
.nav ul { display: flex; flex-wrap: wrap; gap: 0.25rem 1.25rem; list-style: none; margin: 0; padding: 0; }
.nav a { color: var(--ink); text-decoration: none; font-weight: 500; padding: 0.35rem 0; border-bottom: 2px solid transparent; }
.nav a:hover, .nav a[aria-current="page"] { color: var(--teal-dark); border-bottom-color: var(--teal-dark); }

/* Hero */
.hero { background: linear-gradient(180deg, var(--white) 0%, var(--tint) 100%); border-bottom: 1px solid var(--tint-2); }
.hero .wrap { display: grid; grid-template-columns: 1fr; gap: 2rem; align-items: center; padding-top: 4rem; padding-bottom: 4rem; }
.hero-logo { justify-self: center; width: min(100%, 22rem); }
.hero-logo img { width: 100%; height: auto; }
.eyebrow { display: inline-flex; align-items: center; gap: 0.5rem; margin: 0 0 1rem; color: var(--teal-dark); font-size: 0.875rem; font-weight: 700; letter-spacing: 0.06em; text-transform: uppercase; }
.eyebrow::before { content: ""; width: 1.75rem; height: 0.25rem; border-radius: 1rem; background: linear-gradient(90deg, var(--orange), var(--gold)); }
.hero h1 { margin: 0 0 1rem; max-width: 18ch; font-size: clamp(2.25rem, 4vw + 1rem, 3.75rem); line-height: 1.08; letter-spacing: -0.025em; color: var(--navy); }
.hero h1 .accent { color: var(--teal-dark); }
.hero p.lede { max-width: 36rem; margin: 0 0 2rem; font-size: 1.2rem; color: var(--muted); }
.btn { display: inline-block; padding: 0.8rem 1.4rem; border-radius: 999px; font-weight: 700; text-decoration: none; border: 2px solid transparent; }
.btn-primary { background: var(--teal-dark); color: var(--white); }
.btn-primary:hover { background: var(--teal-darker); color: var(--white); }
.btn-ghost { color: var(--navy); border-color: var(--navy); margin-left: 0.5rem; }
.btn-ghost:hover { background: var(--tint-2); color: var(--navy); }

/* Sections */
section { padding: 4.5rem 0; }
h2 { font-size: clamp(1.6rem, 2vw + 1rem, 2.25rem); line-height: 1.2; letter-spacing: -0.015em; margin: 0 0 1rem; color: var(--navy); }
h3 { font-size: 1.2rem; margin: 0 0 0.5rem; color: var(--navy); }
.section-intro { max-width: 40rem; color: var(--muted); margin: 0 0 2.5rem; }
.tint { background: var(--tint); }
.grid { display: grid; gap: 1.25rem; grid-template-columns: repeat(auto-fit, minmax(15rem, 1fr)); }
.card { background: var(--white); border: 1px solid var(--line); border-top: 4px solid var(--teal); border-radius: var(--radius); padding: 1.5rem; }
.card p { margin: 0; color: var(--muted); }
.card .icon { width: 2.75rem; height: 2.75rem; border-radius: 0.75rem; background: var(--navy-2); display: grid; place-items: center; margin-bottom: 1rem; }
.card .icon svg { width: 1.5rem; height: 1.5rem; }

.coming { display: grid; gap: 2rem; grid-template-columns: 1fr; align-items: center; }
.coming-panel { border: 2px dashed var(--teal-dark); border-radius: var(--radius); padding: 2rem; background: var(--white); }
.badge { display: inline-block; background: var(--navy); color: var(--gold); font-weight: 700; font-size: 0.875rem; padding: 0.25rem 0.75rem; border-radius: 999px; margin-bottom: 0.75rem; }
.coming-panel p { margin: 0; color: var(--muted); }

.contact { background: var(--navy); color: var(--white); border-top: 4px solid var(--orange); }
.contact h2 { color: var(--white); }
.contact p { color: #E6EEF5; max-width: 38rem; }
.contact a.email { color: var(--orange); font-weight: 700; font-size: 1.35rem; word-break: break-word; }
.contact a.email:hover { color: #F8C05F; }

/* Legal pages */
.page-head { background: var(--tint); border-bottom: 1px solid var(--tint-2); padding: 3rem 0 2.5rem; }
.page-head h1 { margin: 0 0 0.5rem; font-size: clamp(2rem, 3vw + 1rem, 2.75rem); color: var(--navy); letter-spacing: -0.02em; line-height: 1.15; }
.page-head p { margin: 0; color: var(--muted); }
.legal { padding: 3rem 0 4rem; }
.legal h2 { font-size: 1.35rem; margin: 2.25rem 0 0.5rem; }
.legal p, .legal li { color: var(--ink); }
.legal ul { padding-left: 1.25rem; }
.legal li + li { margin-top: 0.35rem; }

/* 404 */
.notfound { padding: 6rem 0; text-align: center; }
.notfound h1 { color: var(--navy); font-size: clamp(2rem, 4vw + 1rem, 3rem); margin: 0 0 0.75rem; }

/* Footer */
.site-footer { background: #0E2740; color: #E6EEF5; padding: 2rem 0; font-size: 0.95rem; }
.site-footer .wrap { display: flex; flex-wrap: wrap; gap: 1rem 2rem; align-items: center; justify-content: space-between; }
.site-footer p { margin: 0; }
.site-footer ul { display: flex; flex-wrap: wrap; gap: 0.5rem 1.5rem; list-style: none; margin: 0; padding: 0; }
.site-footer a { color: var(--orange); }
.site-footer a:hover { color: #F8C05F; }

@media (min-width: 52rem) {
  .hero .wrap { grid-template-columns: 1.25fr 1fr; padding-top: 5rem; padding-bottom: 5rem; }
  .hero-logo { justify-self: end; }
  .coming { grid-template-columns: 1.1fr 1fr; }
}
@media (max-width: 40rem) {
  .hero .wrap { padding-top: 2.5rem; padding-bottom: 3rem; }
  .hero-logo { width: min(80%, 16rem); order: -1; }
  .btn-ghost { margin: 0.75rem 0 0; }
  section { padding: 3.25rem 0; }
  .site-header .wrap { padding-top: 0.75rem; padding-bottom: 0.75rem; }
}
@media (prefers-reduced-motion: reduce) { * { scroll-behavior: auto !important; transition: none !important; } }
@media print { .skip-link, .nav { display: none; } .contact, .site-footer { background: none; color: #000; } }

/* Cookie table + Privacy Officer block */
.table-wrap { overflow-x: auto; margin: 1rem 0 1.25rem; border: 1px solid var(--line); border-radius: 0.75rem; }
.legal table { width: 100%; border-collapse: collapse; font-size: 0.95rem; min-width: 36rem; }
.legal caption { text-align: left; font-weight: 700; color: var(--navy); padding: 0.75rem 1rem 0.25rem; }
.legal th, .legal td { text-align: left; vertical-align: top; padding: 0.65rem 1rem; border-top: 1px solid var(--tint-2); }
.legal thead th { background: var(--tint); color: var(--navy); border-top: 0; }
.legal tbody th { font-weight: 600; }
.legal code { font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace; font-size: 0.9em; color: var(--navy); }
.officer { font-style: normal; margin-top: 1rem; padding: 1rem 1.25rem; border-left: 4px solid var(--teal); background: var(--tint); border-radius: 0 0.5rem 0.5rem 0; }
.legal thead th:nth-child(1) { width: 22%; }
.legal thead th:nth-child(2) { width: 18%; }
.legal thead th:nth-child(3) { width: 34%; }
.legal thead th:nth-child(4) { width: 13%; }
.legal thead th:nth-child(5) { width: 13%; }
.legal tbody th code { white-space: nowrap; }
@media (max-width: 40rem) {
  .table-wrap { border: 0; overflow: visible; }
  .legal table, .legal thead, .legal tbody, .legal tr, .legal th, .legal td { display: block; min-width: 0; width: auto !important; }
  .legal thead { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); }
  .legal caption { display: block; padding: 0 0 0.5rem; }
  .legal tbody tr { border: 1px solid var(--line); border-radius: 0.75rem; margin-bottom: 0.75rem; padding: 0.5rem 0; }
  .legal tbody th, .legal tbody td { border: 0; padding: 0.3rem 1rem; }
  .legal tbody td::before { content: attr(data-label) ": "; font-weight: 700; color: var(--navy); }
}

/* Keep footer at the bottom on short pages (e.g. 404) */
body { min-height: 100vh; display: flex; flex-direction: column; }
body > main { flex: 1 0 auto; }
