:root {
  --ink: #052326;
  --brand: #007F79;
  --cyan: #18D6CF;
  --lime: #8EFFF0;
  --bg: #E6F7F4;
  --surface: #CBEDE8;
  --contrast: #011719;
  --line: rgba(3, 42, 44, 0.2);
  --muted: rgba(5, 35, 38, 0.72);
  --max: 1120px;
  --radius: 8px;
  /* Generic families only: no proprietary font is bundled or requested. */
  --display: "Manrope", ui-sans-serif, system-ui, sans-serif;
  --text: "Manrope", ui-sans-serif, system-ui, sans-serif;
}

@media (prefers-color-scheme: dark) {
  :root {
    --ink: #EAFDF9;
    --brand: #33DAD3;
    --cyan: #74FFF1;
    --lime: #9DFFF2;
    --bg: #021719;
    --surface: #052B2D;
    --contrast: #001113;
    --line: rgba(157, 255, 242, 0.18);
    --muted: rgba(234, 253, 249, 0.72);
  }
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: var(--text);
  line-height: 1.55;
  letter-spacing: 0;
}

body.menu-open {
  overflow: hidden;
}

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

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

button {
  font: inherit;
}

section[id] {
  scroll-margin-top: 92px;
}

.breadcrumb {
  border-bottom: 1px solid var(--line);
  background: color-mix(in srgb, var(--surface) 62%, var(--bg));
}

.breadcrumb ol {
  width: min(100% - 32px, var(--max));
  margin: 0 auto;
  padding: 12px 0;
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  list-style: none;
  color: var(--muted);
  font-size: 0.9rem;
}

.breadcrumb li + li::before {
  content: "/";
  margin-right: 8px;
  color: var(--brand);
}

.breadcrumb a {
  text-decoration: underline;
  text-decoration-color: transparent;
  text-underline-offset: 3px;
}

.breadcrumb a:hover {
  text-decoration-color: currentColor;
}

.site-header {
  position: sticky;
  top: 0;
  z-index: 10;
  background: rgba(1, 23, 25, 0.88);
  border-bottom: 1px solid rgba(234, 253, 249, 0.14);
  backdrop-filter: blur(18px);
  -webkit-backdrop-filter: blur(18px);
}

.nav,
.container {
  width: min(100% - 32px, var(--max));
  margin: 0 auto;
}

.nav {
  min-height: 68px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
}

.brand {
  display: inline-flex;
  align-items: flex-end;
  gap: 6px;
  color: #EAFDF9;
  font-weight: 800;
}

.brand span {
  margin-left: 0;
  padding-bottom: 1px;
}

.brand-logo {
  width: 40px;
  height: 40px;
  border-radius: var(--radius);
  object-fit: contain;
}

.brand strong {
  display: block;
  font-family: var(--display);
  font-size: 1.52rem;
  font-weight: 620;
  line-height: 0.92;
}

.brand small {
  display: block;
  margin-top: 2px;
  color: rgba(234, 253, 249, 0.7);
  font-family: var(--display);
  font-size: 0.68rem;
  font-weight: 460;
  letter-spacing: 0.13em;
}

.nav-links {
  display: none;
  align-items: center;
  gap: 22px;
  color: rgba(234, 253, 249, 0.78);
  font-size: 0.92rem;
  font-weight: 700;
}

.nav-links a:hover {
  color: var(--cyan);
}

.menu-toggle {
  width: 44px;
  height: 44px;
  border: 1px solid rgba(234, 253, 249, 0.18);
  border-radius: var(--radius);
  display: inline-grid;
  place-items: center;
  background: rgba(234, 253, 249, 0.12);
  color: #EAFDF9;
  cursor: pointer;
}

.menu-toggle span,
.menu-toggle::before,
.menu-toggle::after {
  content: "";
  width: 18px;
  height: 2px;
  display: block;
  background: currentColor;
  transition: transform 180ms ease, opacity 180ms ease;
}

.menu-toggle span {
  margin: 4px 0;
}

.menu-open .menu-toggle::before {
  transform: translateY(6px) rotate(45deg);
}

.menu-open .menu-toggle span {
  opacity: 0;
}

.menu-open .menu-toggle::after {
  transform: translateY(-6px) rotate(-45deg);
}

.mobile-panel {
  display: none;
  background: rgba(1, 23, 25, 0.96);
  color: #EAFDF9;
}

.menu-open .mobile-panel {
  display: block;
}

.mobile-panel nav {
  width: min(100% - 32px, var(--max));
  margin: 0 auto;
  padding: 18px 0 24px;
  display: grid;
  gap: 14px;
}

.hero {
  position: relative;
  isolation: isolate;
  overflow: hidden;
  padding: 86px 0 54px;
  background:
    radial-gradient(circle at 18% 18%, rgba(116, 255, 241, 0.34), transparent 28%),
    linear-gradient(116deg, rgba(234, 253, 249, 0.16), rgba(24, 214, 207, 0.12) 31%, transparent 62%),
    linear-gradient(146deg, #011719 0%, #053638 46%, #0A1E20 100%),
    var(--contrast);
  color: #EAFDF9;
}

.hero::before,
.hero::after {
  content: "";
  position: absolute;
  pointer-events: none;
  z-index: -1;
}

.hero::before {
  inset: -24%;
  background:
    linear-gradient(98deg, transparent 0 16%, rgba(255, 255, 255, 0.2) 24%, transparent 31% 48%, rgba(142, 255, 240, 0.18) 58%, transparent 67%),
    repeating-linear-gradient(112deg, rgba(255, 255, 255, 0.04) 0 1px, transparent 1px 13px),
    url("logo-marin-site.svg");
  background-size: auto, auto, 124px 124px;
  background-repeat: no-repeat, repeat, repeat;
  background-position: center, 0 0, 0 0;
  opacity: 0.18;
  mix-blend-mode: screen;
  transform: rotate(-11deg);
}

.hero::after {
  width: 520px;
  height: 220px;
  right: max(16px, calc((100vw - var(--max)) / 2));
  bottom: 18px;
  border-radius: 999px;
  background:
    radial-gradient(circle at 24% 26%, rgba(255, 255, 255, 0.72), transparent 23%),
    linear-gradient(135deg, rgba(234, 253, 249, 0.2), rgba(24, 214, 207, 0.1) 46%, rgba(1, 23, 25, 0.18));
  filter: blur(1px);
  opacity: 0.42;
  transform: rotate(-8deg);
}

.hero .container {
  position: relative;
  z-index: 1;
}

h1,
h2,
h3,
p {
  margin: 0;
}

h1 {
  position: relative;
  max-width: 11ch;
  font-family: var(--display);
  font-size: clamp(3rem, 9vw, 6.4rem);
  font-weight: 560;
  line-height: 0.94;
  letter-spacing: 0;
  text-shadow: 0 20px 70px rgba(0, 0, 0, 0.26);
}

.hero p {
  max-width: 48ch;
  margin-top: 18px;
  color: rgba(234, 253, 249, 0.78);
  font-size: clamp(1.08rem, 2vw, 1.25rem);
}

.btn {
  min-height: 48px;
  border-radius: var(--radius);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 13px 20px;
  border: 1px solid transparent;
  font-weight: 900;
  white-space: nowrap;
  cursor: pointer;
}

.btn-primary {
  background: var(--lime);
  color: var(--contrast);
}

.section {
  padding: 70px 0;
}

.section + .section {
  border-top: 1px solid var(--line);
}

.section h2 {
  max-width: 760px;
  font-family: var(--display);
  font-size: clamp(2rem, 6vw, 4.4rem);
  font-weight: 560;
  line-height: 0.98;
}

.lead {
  max-width: 62ch;
  margin-top: 18px;
  color: var(--muted);
  font-size: 1.12rem;
}

.topic-body,
.page-grid {
  margin-top: 34px;
  display: grid;
  gap: 18px;
}

.topic-row,
.page-card,
.compact-item {
  display: grid;
  gap: 8px;
  padding: 22px 0;
  border-top: 1px solid var(--line);
}

.page-card {
  min-height: 190px;
}

.topic-row h3,
.page-card h3 {
  font-size: 1.18rem;
  font-weight: 780;
}

.topic-row p,
.page-card p {
  max-width: 70ch;
  color: var(--muted);
}

.page-card strong {
  color: var(--brand);
  font-weight: 850;
}

.page-card span {
  align-self: end;
  color: var(--brand);
  font-weight: 800;
}

.text-link {
  color: var(--brand);
  font-weight: 800;
  text-decoration: underline;
  text-underline-offset: 4px;
}

/* Web approximation of Apple Liquid Glass, gated to browsers that can render blur-backed layers. */
@supports ((backdrop-filter: blur(18px)) or (-webkit-backdrop-filter: blur(18px))) {
  .hero h1::before {
    content: "";
    position: absolute;
    inset: -14px -22px -12px;
    z-index: -1;
    border: 1px solid rgba(234, 253, 249, 0.26);
    border-radius: 28px;
    background:
      radial-gradient(circle at 12% 0%, rgba(255, 255, 255, 0.52), transparent 30%),
      linear-gradient(116deg, rgba(255, 255, 255, 0.2), rgba(255, 255, 255, 0.06) 42%, rgba(142, 255, 240, 0.16));
    backdrop-filter: blur(28px) saturate(180%) contrast(1.08);
    -webkit-backdrop-filter: blur(28px) saturate(180%) contrast(1.08);
    box-shadow:
      inset 0 1px 0 rgba(255, 255, 255, 0.38),
      inset 0 -1px 0 rgba(255, 255, 255, 0.1),
      0 34px 90px rgba(0, 0, 0, 0.24);
  }

  .topic-row[href],
  .page-card {
    position: relative;
    overflow: hidden;
    border: 1px solid rgba(3, 42, 44, 0.16);
    border-radius: var(--radius);
    padding: 22px;
    background:
      linear-gradient(135deg, rgba(255, 255, 255, 0.36), rgba(255, 255, 255, 0.08)),
      rgba(255, 255, 255, 0.12);
    backdrop-filter: blur(18px) saturate(160%);
    -webkit-backdrop-filter: blur(18px) saturate(160%);
    box-shadow: 0 24px 70px rgba(3, 42, 44, 0.1);
  }

  .topic-row[href]::before,
  .page-card::before {
    content: "";
    position: absolute;
    inset: 0;
    background:
      radial-gradient(circle at 12% 0%, rgba(255, 255, 255, 0.46), transparent 28%),
      linear-gradient(96deg, transparent, rgba(24, 214, 207, 0.14), transparent);
    opacity: 0.74;
    pointer-events: none;
  }

  .topic-row[href] > *,
  .page-card > * {
    position: relative;
  }
}

@media (prefers-reduced-transparency: reduce) {
  .hero h1::before,
  .topic-row[href]::before,
  .page-card::before {
    display: none;
  }

  .topic-row[href],
  .page-card {
    background: transparent;
    backdrop-filter: none;
    -webkit-backdrop-filter: none;
    box-shadow: none;
  }
}

@media (prefers-reduced-motion: no-preference) {
  .hero::before {
    animation: metallicSweep 14s ease-in-out infinite alternate;
  }
}

@keyframes metallicSweep {
  from {
    transform: rotate(-11deg) translateX(-3%);
  }

  to {
    transform: rotate(-11deg) translateX(3%);
  }
}

details {
  border-top: 1px solid var(--line);
  padding: 18px 0;
}

summary {
  cursor: pointer;
  font-weight: 820;
}

details p {
  max-width: 70ch;
  margin-top: 12px;
  color: var(--muted);
}

.final-cta {
  position: relative;
  isolation: isolate;
  overflow: hidden;
  padding: 70px 0;
  background: var(--contrast);
  color: #EAFDF9;
}

.final-cta::before {
  content: "";
  position: absolute;
  inset: -30%;
  z-index: -1;
  background-image: url("logo-marin-site.svg");
  background-size: 132px 132px;
  background-repeat: repeat;
  opacity: 0.045;
  transform: rotate(-12deg);
}

.final-cta h2 {
  max-width: 760px;
  font-size: clamp(2rem, 6vw, 4rem);
  font-weight: 560;
  line-height: 0.98;
}

.final-cta p {
  max-width: 54ch;
  margin-top: 18px;
  color: rgba(234, 253, 249, 0.78);
}

.site-footer {
  background: var(--contrast);
  color: #EAFDF9;
  padding: 34px 0;
}

.footer-grid {
  display: grid;
  gap: 24px;
}

.footer-note,
.site-footer a {
  color: rgba(234, 253, 249, 0.72);
}

.footer-contact {
  display: grid;
  gap: 10px;
}

.copyright {
  display: grid;
  gap: 6px;
  margin-top: 28px;
  padding-top: 18px;
  border-top: 1px solid rgba(234, 253, 249, 0.12);
  color: rgba(234, 253, 249, 0.58);
  font-size: 0.9rem;
}

.site-footer a:hover {
  color: var(--lime);
}

@media (min-width: 760px) {
  .topic-body,
  .page-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (min-width: 980px) {
  .nav-links {
    display: flex;
  }

  .menu-toggle,
  .mobile-panel {
    display: none;
  }

  .footer-grid {
    grid-template-columns: 1.2fr 0.9fr;
    align-items: start;
  }
}

@media (max-width: 420px) {
  .nav,
  .container,
  .mobile-panel nav {
    width: min(100% - 24px, var(--max));
  }

  .section,
  .final-cta {
    padding: 54px 0;
  }

  .btn {
    width: 100%;
  }
}
